/// <summary> /// Ataack /// </summary> /// <param name="enemy">Which enemy we are fighting</param> public override void AttackDamage(Charater enemy) { Damage = Random.Next((int)(Attack - (5 * (0.1 * Level + 1))), (int)(Attack + (5 * (0.1 * Level + 1)))); if (ChanceCheck()) { Damage *= 2; Console.WriteLine("Wizard Critical Hit with {0} damage", Damage); } else { Console.WriteLine("Wizard Attack with {0} damage", Damage); } if (ChanceCheck()) { AttackDamage(enemy, Damage, TurnsNumber(), Skill); } else { enemy.Defend(Damage); } }
/// <summary> /// Attack With Skill /// </summary> /// <param name="enemy">Which enemy we are fighting</param> /// <param name="damage">Damage to enemy</param> /// <param name="turns">Turns for the skill effect</param> /// <param name="skill">Which Skill effect applied</param> public override void AttackDamage(Charater enemy, float damage, int turns, AttackType skill) { Console.WriteLine("Wizard applied {0} for {1} turns", skill, turns); enemy.Defend(damage, turns, skill); }
/// <summary> /// Attack With Skill /// </summary> /// <param name="hero">Hero it's fighting</param> /// <param name="damage">Damage to hero</param> /// <param name="turns">Turns for the skill effect</param> /// <param name="skill">Which Skill effect applied</param> public override void AttackDamage(Charater hero, float damage, int turns, AttackType skill) { Console.WriteLine("Goblin applied {0} for {1} turns", skill, turns); hero.Defend(damage, turns, skill); }