Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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;
        }