public void handle_armor_buffs(Scroll.Status_Type fx_type, ref Attack atk) { int slash_resist = 0; int crush_resist = 0; int pierce_resist = 0; int fire_resist = 0; int acid_resist = 0; int frost_resist = 0; int elec_resist = 0; switch (fx_type) { case Scroll.Status_Type.LesserMageArmor: slash_resist = 3; crush_resist = 2; pierce_resist = 3; fire_resist = 1; frost_resist = 1; acid_resist = 1; elec_resist = 2; break; case Scroll.Status_Type.LesserSOF: slash_resist = 1; crush_resist = 1; pierce_resist = 2; fire_resist = 1; frost_resist = 2; acid_resist = 1; elec_resist = 1; break; } int atk_dmg = atk.get_damage_amt(); switch (atk.get_dmg_type()) { case Attack.Damage.Acid: atk.reset_dmg(atk_dmg - acid_resist); break; case Attack.Damage.Crushing: atk.reset_dmg(atk_dmg - crush_resist); break; case Attack.Damage.Electric: atk.reset_dmg(atk_dmg - elec_resist); break; case Attack.Damage.Fire: atk.reset_dmg(atk_dmg - fire_resist); break; case Attack.Damage.Frost: atk.reset_dmg(atk_dmg - frost_resist); break; case Attack.Damage.Piercing: atk.reset_dmg(atk_dmg - pierce_resist); break; case Attack.Damage.Slashing: atk.reset_dmg(atk_dmg - slash_resist); break; } }