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)); } }
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)); } }
public virtual void MeleeAttack(Actor target) { if (attributes.CheckHit()) { target.TakeDamage(this, attributes.CheckMeleeDamage()); } }
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)); } }