protected int GetActualHurtValue(AttackPropertyType type, int hurtValue) { int value = 0; if (type == AttackPropertyType.PhysicalAttack) { value = Formula.ActuallyPhysicalDamage(hurtValue, armor); } else if (type == AttackPropertyType.MagicAttack) { value = Formula.ActuallyMagicDamage(hurtValue, magicResist); } else { DebugUtils.LogError(DebugUtils.Type.AI_Npc, string.Format("Can't handle this hurtType {0} now!", type)); } return(value); }