// --- Inherited Methods --- // Called when the unit has taken damage public override int onTakeDamage(Profession prof, ref Unit unit, int oldHealth, int newHealth, int amount, ref Unit instigator, ref BattleMap map) { if(Start.rng.Next(0, 5)> 2) return amount; if(instigator.getAttackPerc()> 0f) return (int)(0.5f*amount); return amount; }