/// <summary> /// Enemy Battle Action /// </summary> /// <param name="hero">Hero it's fighting</param> public override void Action(Charater hero) { if (InfectedTurns > 0) { Damage = Random.Next((int)((5 - (0.1 * Level + 1))), (int)((5 + (0.1 * Level + 1)))); Console.WriteLine("Goblin took {0} fire damage", Damage); Defend(Damage); InfectedTurns--; } if (StunTurnes > 0) { StunTurnes--; } else { AttackDamage(hero); } }
/// <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> /// Player Battle Action /// </summary> /// <param name="enemy">Which enemy we are fighting</param> public override void Action(Charater enemy) { if (InfectedTurns > 0) { Hit = Random.Next((int)((5 - (0.1 * Level + 1))), (int)((5 + (0.1 * Level + 1)))); Health -= Hit; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Wizard took {0} fire damage", Hit); Console.ForegroundColor = ConsoleColor.White; InfectedTurns--; } if (StunTurnes > 0) { Console.WriteLine("Wizard is Frozen"); StunTurnes--; } else { AttackDamage(enemy); } }
public abstract void AttackDamage(Charater charater, float damage, int turns, AttackType skill);
public abstract void AttackDamage(Charater charater);
public abstract void Action(Charater charater);
/// <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); }