private static int HitTheCat(int monsterCat) { int hit = StartGame.RandomNumber(Weapon.LowestDmg, Weapon.HighestDmg); if (hit < 3) { Console.WriteLine(); Player.CenterText($"What are you doing?? You only did { hit } damage on the MonsterCat"); } else if (hit > 7) { Console.WriteLine(); Player.CenterText($"WHHHOOOOOAAAA!! You did { hit } damage on the MonsterCat"); } else { Console.WriteLine(); Player.CenterText($"You did { hit } damage on the Cat"); } Console.WriteLine(); int hpOnCat = monsterCat - hit; if (hpOnCat < 1) { Console.ForegroundColor = ConsoleColor.Green; Player.CenterTextWithoutNewLine($"THE CAT IS DEAD!!"); Console.ResetColor(); } else { Player.CenterTextWithoutNewLine($"The Cat now has { hpOnCat } hp left"); } Console.ReadKey(); return(hpOnCat); }
private static void CatHitMe() { int hit = StartGame.RandomNumber(MonsterCat.LowestMonsterDmg, MonsterCat.HighestMonsterDmg); Console.WriteLine(); Player.CenterText($"The MonsterCat did { hit } damage to you"); Player.HealthOfPlayer = Player.HealthOfPlayer - hit; Console.WriteLine(); if (Player.HealthOfPlayer < 1) { Console.ForegroundColor = ConsoleColor.Red; Player.CenterTextWithoutNewLine($"OHNOOO YOU'RE DEAD!"); Console.ResetColor(); } else { Player.CenterTextWithoutNewLine($"You have { Player.HealthOfPlayer } hp left"); } Console.ReadKey(); }
private static void KingHitMe() { int hit = StartGame.RandomNumber(NightKing.LowestMonsterDmg, NightKing.HighestMonsterDmg); if (hit < 3) { Player.CenterText("The King almost missed and only did " + hit + " damage to you"); } else if (hit > 7) { Player.CenterText("The King did his super punch and did " + hit + " damage to you"); } else if (hit == 0) { Player.CenterText("You avoided the punch from the King"); } else { Player.CenterText("The King did " + hit + " damage to you"); } Console.WriteLine(); Player.HealthOfPlayer = Player.HealthOfPlayer - hit; Player.CenterText("You have " + Player.HealthOfPlayer + " hp left"); }
private static void HitTheKing() { int hit = StartGame.RandomNumber(Weapon.LowestDmg, Weapon.HighestDmg); if (hit < 3) { Player.CenterText("You almost missed and only did " + hit + " damage on the King"); } else if (hit > 7) { Player.CenterText("SUUUUUUPER PUNCH! You did " + hit + " damage on the King"); } else if (hit == 0) { Player.CenterText("You missed the King with your sword"); } else { Player.CenterText("You did " + hit + " damage on the King"); } NightKing.MonsterHealth = NightKing.MonsterHealth - hit; Console.WriteLine(); Player.CenterText("The King now has " + NightKing.MonsterHealth + " hp left"); }
public static void FightAgainstTheDragon() { Dragon dragon = new Dragon(); Console.Clear(); PrintDragon(); Console.ReadKey(); while (Dragon.MonsterHealth > 0 && Player.HealthOfPlayer > 0) { int yourdmg = StartGame.RandomNumber(Weapon.LowestDmg, Weapon.HighestDmg); Dragon.MonsterHealth = Dragon.MonsterHealth - yourdmg; if (yourdmg == 0) { Console.WriteLine(); Player.CenterText("You missed the attack.."); } if (yourdmg >= 6) { Console.Clear(); Console.WriteLine(); Player.CenterText($"You got a critcial hit on the dragon with your {Weapon.Name} and dealt {yourdmg} damage"); Console.WriteLine(); Player.CenterText($"The dragon has {Dragon.MonsterHealth} health remaning"); Console.ReadKey(); } if (yourdmg < 6 && yourdmg > 0) { Console.Clear(); Console.WriteLine(); Player.CenterText($"You dealt {yourdmg} damage to the dragon "); Console.WriteLine(); Player.CenterText($"The dragon has {Dragon.MonsterHealth} health remaning"); Console.ReadKey(); } if (Dragon.MonsterHealth <= 0) { Console.WriteLine(); Player.CenterText("You managed to kill the dragon!!"); Console.ReadKey(); break; } int dragondmg = StartGame.RandomNumber(Dragon.LowestMonsterDmg, Dragon.HighestMonsterDmg); Player.HealthOfPlayer = Player.HealthOfPlayer - dragondmg; if (dragondmg >= 8) { Console.Clear(); Console.WriteLine(); Player.CenterText($"The dragon use he's fire breath against you and you take {dragondmg}"); Console.WriteLine(); Player.CenterText($"You got {Player.HealthOfPlayer} health remaning.."); Console.ReadKey(); } if (dragondmg < 8 && dragondmg > 4) { Console.Clear(); Console.WriteLine(); Player.CenterText($"The dragon bites you and you take {dragondmg} damage"); Console.WriteLine(); Player.CenterText($"You got {Player.HealthOfPlayer} health remaning.."); Console.ReadKey(); } if (dragondmg < 4 && dragondmg > 0) { Console.Clear(); Console.WriteLine(); Player.CenterText($"The dragon slashes you with he's claw and you take {dragondmg} damage"); Console.WriteLine(); Player.CenterText($"You got {Player.HealthOfPlayer} health remaning.."); Console.ReadKey(); } if (dragondmg == 0) { Console.Clear(); Console.WriteLine(); Player.CenterText($"The dragon missed the attack!"); Console.WriteLine(); Player.CenterText($"You got {Player.HealthOfPlayer} health remaning.."); Console.ReadKey(); } } }