public override void Hero_action(BaseEnemy enemy, BaseHero hero) { if (hero.health == hero.max_health) { Console.WriteLine("You don't need healing, You are already in good health... Steal Something Else!!"); } else { if (hero.Mana < 0 || hero.Mana < ManaCost) { Console.WriteLine("You do not have enough mana"); } else { Random rand = new Random(); int luckHealth = rand.Next(hero.luck, 51); int healthAmountReceived = luckHealth; int healthNeeded = hero.max_health - hero.health; // damage enemy as passive effect of stealing health enemy.TakeDamage(hero.dexterity / 4); // mana cost hero.Mana -= ManaCost; if (healthAmountReceived > healthNeeded) { hero.health += healthNeeded; } else { hero.health += healthAmountReceived; } Console.WriteLine("Your Health is now: " + hero.health); Console.WriteLine(enemy.name + " health went down by " + 10); } } }
public override void Hero_action(BaseEnemy enemy, BaseHero hero) { if (hero.Mana < 0 || hero.Mana < ManaCost) { Console.WriteLine("You do not have enough mana"); } else { hero.Mana -= 20; // enemy.health-=20; enemy.TakeDamage(ManaCost); enemy.Mana -= ManaCost; Console.WriteLine("The {0} is bleeding {1} Mana and Health...", enemy.name, ManaCost); } }
public override void Hero_action(BaseEnemy enemy, BaseHero hero) { if (hero.Mana < 0 || hero.Mana < ManaCost) { Console.WriteLine("You do not have enough mana"); } else { Random randDamage = new Random(); int topDamage = 50 + hero.intelligence; int damageDone = randDamage.Next(20, topDamage); enemy.TakeDamage(damageDone); hero.Mana = hero.Mana - ManaCost; Console.WriteLine("The Fireball did " + damageDone + " damage to the " + enemy.name); } }
public override void Hero_action(BaseEnemy enemy, BaseHero hero) { if (hero.Mana < 0 || hero.Mana < ManaCost) { Console.WriteLine("You do not have enough mana"); } else { Random rand = new Random(); int luckdamage = rand.Next(hero.luck + 10, 80); enemy.TakeDamage(luckdamage); // mana cost hero.Mana -= ManaCost; // reset luck to default hero.luck = 20; Console.WriteLine(enemy.name + " health went down by " + luckdamage); } }
public override void Hero_action(BaseEnemy enemy, BaseHero hero) { if (hero.Mana < 0 || hero.Mana < ManaCost) { Console.WriteLine("You do not have enough mana"); } else { hero.Mana -= ManaCost; // this.health-=10; hero.TakeDamage(10); if (enemy.health <= 50) { enemy.health = 0; Console.WriteLine("Enemy {0} Executed", enemy.name); } else { // enemy.health-=50; enemy.TakeDamage(50); Console.WriteLine("Enemy {0} health is now {1}..Stike The Vermine", enemy.name, enemy.health); } } }
public override void Hero_action(BaseEnemy enemy, BaseHero hero) { enemy.TakeDamage(hero.strength); Console.WriteLine("You did " + hero.strength + " damage to " + enemy.name); }