Esempio n. 1
0
 public override void MeleeAttack(Actor target)
 {
     if (attributes.CheckHit())
     {
         int dmgPoints = attributes.CheckMeleeDamage();
         GameManager.GetInstance().AddMessage(String.Format("You hit the {0} for {1} damage.", target.Name, dmgPoints));
         target.TakeDamage(this, dmgPoints);
     }
     else
     {
         GameManager.GetInstance().AddMessage(String.Format("Your attack misses the {0}", target.Name));
     }
 }
Esempio n. 2
0
        public override void MeleeAttack(Actor target)
        {
            if (attributes.CheckHit(target.Attributes))
            {
                int attack_damage = attributes.CheckMeleeDamage();

                if (inventory != null && inventory.equipped != null)
                    attack_damage += GameManager.GetInstance().Random.Next(1, inventory.equipped.Damage + 1);

                ownerMap.Gamestate.AddMessage(String.Format("You hit the {0} for {1} damage.", target.Name, attack_damage));
                target.TakeDamage(this, attack_damage);
            }
            else
            {
                ownerMap.Gamestate.AddMessage(String.Format("Your attack misses the {0}", target.Name));
            }
        }
Esempio n. 3
0
 public virtual void MeleeAttack(Actor target)
 {
     if (attributes.CheckHit())
     {
         target.TakeDamage(this, attributes.CheckMeleeDamage());
     }
 }
Esempio n. 4
0
        public virtual void MeleeAttack(Actor target)
        {
            if (attributes.CheckHit(target.Attributes))
            {
                int attack_damage = attributes.CheckMeleeDamage();

                if (inventory != null && inventory.equipped != null)
                    attack_damage += GameManager.GetInstance().Random.Next(1, inventory.equipped.Damage + 1);

                target.TakeDamage(this, attack_damage);
            }
            else
            {
                ownerMap.Gamestate.AddMessage(String.Format("The {0} attacks, but misses.", Name));
            }
        }