public override void BattleAction(Entity owner, Entity target, DURPSBot.Equipment bodyPart) { Random rng = new Random(); switch (rng.Next(1, 1)) { case 1: Swing(owner, target, bodyPart); break; } }
public void Swing(Entity owner, Entity target, DURPSBot.Equipment bodyPart) { Random rng = new Random(); int penetratingDamage = (owner.BasicSwing() + rng.Next(1, 6) + TotalDamage()) - (target.DamageResistance + target.EquippedBody.DamageResistance); if (penetratingDamage < 0) { penetratingDamage = 0; } target.CurrentHitPoints -= penetratingDamage; return; }
public void Thrust(Entity owner, Entity target, DURPSBot.Equipment bodyPart) { Random rng = new Random(); int penetratingDamage = (owner.BasicThrust() + TotalDamage()) - (target.DamageResistance + bodyPart.DamageResistance); if (penetratingDamage < 0) { penetratingDamage = 0; } target.CurrentHitPoints -= penetratingDamage; return; }