예제 #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;
        }