parse damage code