Пример #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;
            }
        }
Пример #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;
        }
Пример #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;
        }