fk4m1913

Untitled

May 20th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 77.66 KB | None | 0 0
  1. using System;
  2.  
  3. namespace GameRPG
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             // Player starts with pre-determined level, xp, hp, attack, defence, magic, coins
  10.             // The goal of the game is to pass through all rooms in the dungeon, collecting items and defeating enemies until you defeat the final boss, or die trying
  11.  
  12.             //** Player increases level if he reaches 100 xp, xp is gained by killing monsters. For each level hp++, attack++, magic++, coins++
  13.             //** If xp == 100, level++
  14.             //** Attack is increased by gaining weapons and increasing level
  15.             //** Defence is gained by gaining armour
  16.             //** Coins are increased by gaining level, defeating monsters, finding it in chests
  17.             //** The dungeon has 30 rooms in total
  18.             //** Room type can be monster room, shop room, regeneration room, chest room, final boss room
  19.             //** Monster types can be zombie, ghost, orc, minotaur
  20.             //** Regeneration room regenerates player health back to 100
  21.             //** Shop room gives chance to buy health potion, magic book, weapon or armour
  22.             //** Armour types = leather armour, iron armour, steel armour
  23.             //** Weapon types = knife, wooden spear, axe, sword
  24.             //** Chest room always gives reward which can be health potion, weapon, armour, spell book or coins
  25.             //** If player health <= 0, player dies
  26.  
  27.             int playerLevel = 1;
  28.             int playerXp = 0;
  29.             int playerHp = 100;
  30.             int playerAttack = 25;
  31.             int playerDefence = 10;
  32.             int playerMagic = 5;
  33.             int playerCoins = 0;
  34.             string playerWeapon = "None";
  35.             string playerArmour = "None";
  36.  
  37.             string playerName = "";
  38.             string roomType = "";
  39.             string monsterType = "";
  40.             int monsterHp = 0;
  41.             int monsterAttack = 0;
  42.             int magicToPassMonster = 0;
  43.             bool gameOver = false;
  44.  
  45.             Random random = new Random();
  46.  
  47.             for (int i = 2000; i >= 100; i -= 200)
  48.             {
  49.                 Console.Beep(i, 100);
  50.             }
  51.  
  52.             Console.WriteLine("Welcome to my dungeon!");
  53.             System.Threading.Thread.Sleep(2000);
  54.             Console.WriteLine("Many have entered and tried to complete it, but few have succeeded!");
  55.             System.Threading.Thread.Sleep(3000);
  56.             Console.WriteLine("Are you brave enough to enter?");
  57.             System.Threading.Thread.Sleep(2000);
  58.             Console.Write("Yes / No : ");
  59.  
  60.             string choiceEnter = Console.ReadLine();
  61.             Console.Clear();
  62.  
  63.             if (choiceEnter == "No" || choiceEnter == "no" || choiceEnter == "NO")
  64.             {
  65.                 System.Threading.Thread.Sleep(1000);
  66.                 Console.WriteLine("Ha-ha-ha...Come back when you are brave enough!");
  67.                 Console.WriteLine("");
  68.  
  69.                 string stringGameOver = "GAME OVER!";
  70.  
  71.                 for (int i = 0; i < stringGameOver.Length; i++)
  72.                 {
  73.                     System.Threading.Thread.Sleep(1000);
  74.                     char letter = stringGameOver[i];
  75.  
  76.                     Console.Write(letter);
  77.                 }
  78.                 System.Threading.Thread.Sleep(2000);
  79.             }
  80.  
  81.             else if (choiceEnter == "Yes" || choiceEnter == "yes" || choiceEnter == "YES")
  82.             {
  83.                 System.Threading.Thread.Sleep(1000);
  84.                 Console.WriteLine("Congratulations for deciding to enter my dungeon!");
  85.                 System.Threading.Thread.Sleep(2000);
  86.                 Console.Write("Your name is: ");
  87.                 playerName = Console.ReadLine();
  88.                 Console.Clear();
  89.  
  90.                 System.Threading.Thread.Sleep(2000);
  91.                 Console.WriteLine($"This will be the ultimate test for you {playerName}!");
  92.                 System.Threading.Thread.Sleep(3000);
  93.                 Console.WriteLine("Once you enter the first room there will be only two possible scenarios...");
  94.                 System.Threading.Thread.Sleep(3000);
  95.                 Console.WriteLine("... success or death!");
  96.                 System.Threading.Thread.Sleep(3000);
  97.                 Console.WriteLine($"Good luck {playerName}!...You will need a lot of it!");
  98.                 System.Threading.Thread.Sleep(2000);
  99.                 Console.Clear();
  100.  
  101.                 for (int room = 1; room <= 30; room++)
  102.                 {
  103.                     if (room == 30)
  104.                     {
  105.                         roomType = "Final boss room";
  106.                     }
  107.  
  108.                     else if (room == 8 || room == 16 || room == 26)
  109.                     {
  110.                         roomType = "Shop room";
  111.                     }
  112.  
  113.                     else if (room == 12 || room == 25)
  114.                     {
  115.                         roomType = "Regeneration room";
  116.                     }
  117.  
  118.                     else
  119.                     {
  120.                         int randRoomType = random.Next(1, 5);
  121.  
  122.                         switch (randRoomType)
  123.                         {
  124.                             case 1:
  125.                             case 2:
  126.                             case 3:
  127.                                 roomType = "Monster room";
  128.                                 break;
  129.                             case 4:
  130.                                 roomType = "Chest room";
  131.                                 break;
  132.                         }
  133.                     }
  134.  
  135.                     if (roomType == "Monster room")
  136.                     {
  137.                         int randMonsterType = random.Next(1, 5);
  138.  
  139.                         Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  140.                         Console.WriteLine("");
  141.                         Console.WriteLine("");
  142.                         System.Threading.Thread.Sleep(1000);
  143.                         Console.WriteLine($"ROOM - {room}, {roomType}!");
  144.                         Console.WriteLine("");
  145.                         Console.WriteLine("");
  146.                         Console.WriteLine("");
  147.  
  148.                         switch (randMonsterType)
  149.                         {
  150.                             case 1:
  151.                                 monsterType = "Zombie";
  152.                                 monsterHp = 20;
  153.                                 monsterAttack = 8;
  154.                                 magicToPassMonster = 2;
  155.                                 break;
  156.  
  157.                             case 2:
  158.                                 monsterType = "Ghost";
  159.                                 monsterHp = 25;
  160.                                 monsterAttack = 14;
  161.                                 magicToPassMonster = 3;
  162.                                 break;
  163.                             case 3:
  164.                                 monsterType = "Orc";
  165.                                 monsterHp = 40;
  166.                                 monsterAttack = 18;
  167.                                 magicToPassMonster = 4;
  168.                                 break;
  169.                             case 4:
  170.                                 monsterType = "Minotaur";
  171.                                 monsterHp = 50;
  172.                                 monsterAttack = 24;
  173.                                 magicToPassMonster = 5;
  174.                                 break;
  175.                         }
  176.  
  177.                         System.Threading.Thread.Sleep(1000);
  178.                         Console.WriteLine($"You have met a {monsterType}! Your action is:");
  179.                         Console.WriteLine("");
  180.                         System.Threading.Thread.Sleep(1000);
  181.                         Console.WriteLine($"1 - Fight the {monsterType}!");
  182.                         System.Threading.Thread.Sleep(1000);
  183.                         Console.WriteLine($"2 - Try to use magic and confuse the {monsterType}!");
  184.                         System.Threading.Thread.Sleep(1000);
  185.                         Console.WriteLine($"3 - Attempt to run from the {monsterType}!");
  186.                         Console.WriteLine("");
  187.                         System.Threading.Thread.Sleep(1000);
  188.                         Console.Write("You choose to: ");
  189.  
  190.                         int actionChoice = int.Parse(Console.ReadLine());
  191.                         Console.Clear();
  192.  
  193.                         switch (actionChoice)
  194.                         {
  195.                             case 1:
  196.  
  197.                                 bool monsterDead = false;
  198.                                 bool playerDead = false;
  199.  
  200.                                 Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  201.                                 Console.WriteLine("");
  202.                                 Console.WriteLine("");
  203.  
  204.                                 System.Threading.Thread.Sleep(1000);
  205.                                 Console.WriteLine($"You have entered in a fight with the {monsterType}");
  206.                                 Console.WriteLine("");
  207.                                 System.Threading.Thread.Sleep(2000);
  208.  
  209.                                 while (!monsterDead && !playerDead)
  210.                                 {
  211.                                     monsterHp -= playerAttack;
  212.                                     playerHp -= (monsterAttack - playerDefence);
  213.  
  214.                                     if (playerHp <= 0)
  215.                                     {
  216.                                         playerDead = true;
  217.                                     }
  218.  
  219.                                     else if (monsterHp <= 0)
  220.                                     {
  221.                                         monsterDead = true;
  222.                                     }
  223.  
  224.                                     if (playerDead == true)
  225.                                     {
  226.                                         gameOver = true;
  227.  
  228.                                         Console.WriteLine($"You have been killed by {monsterType}!");
  229.                                         Console.WriteLine("");
  230.                                         Console.WriteLine("");
  231.                                         Console.WriteLine("");
  232.  
  233.                                         string stringGameOver = "GAME OVER!";
  234.  
  235.                                         for (int i = 0; i < stringGameOver.Length; i++)
  236.                                         {
  237.                                             System.Threading.Thread.Sleep(1000);
  238.                                             char letter = stringGameOver[i];
  239.  
  240.                                             Console.Write(letter);
  241.                                         }
  242.                                     }
  243.  
  244.                                     else if (monsterDead == true)
  245.                                     {
  246.                                         int xpEarned = random.Next(15, 51);
  247.                                         playerXp += xpEarned;
  248.  
  249.                                         int coinsEarned = random.Next(50, 101);
  250.                                         playerCoins += coinsEarned;
  251.  
  252.                                         if (playerXp >= 100)
  253.                                         {
  254.                                             playerLevel++;
  255.                                             playerXp = playerXp - 100;
  256.                                             playerHp += 5;
  257.                                             playerCoins += 50;
  258.  
  259.                                             if (playerLevel % 2 == 0)
  260.                                             {
  261.                                                 playerAttack += 1;
  262.                                                 playerMagic += 1;
  263.                                             }
  264.                                         }
  265.                                         System.Threading.Thread.Sleep(2000);
  266.                                         Console.WriteLine($"You have killed the {monsterType}!");
  267.                                         Console.WriteLine("");
  268.                                         System.Threading.Thread.Sleep(1000);
  269.                                         Console.WriteLine($"You have earned {xpEarned} XP!");
  270.                                         System.Threading.Thread.Sleep(1000);
  271.                                         Console.WriteLine($"You have earned {coinsEarned} coins!");
  272.                                         Console.WriteLine("");
  273.                                         System.Threading.Thread.Sleep(2000);
  274.                                         Console.WriteLine($"Entering next room...");
  275.                                         System.Threading.Thread.Sleep(2000);
  276.                                         Console.Clear();
  277.                                     }
  278.                                 }
  279.                                 break;
  280.  
  281.                             case 2:
  282.  
  283.                                 if (playerMagic >= magicToPassMonster)
  284.                                 {
  285.                                     Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  286.                                     Console.WriteLine("");
  287.                                     Console.WriteLine("");
  288.  
  289.                                     playerMagic -= magicToPassMonster;
  290.                                     System.Threading.Thread.Sleep(2000);
  291.                                     Console.WriteLine($"You have successfully used magic to trick the {monsterType}!");
  292.                                     Console.WriteLine("");
  293.                                     System.Threading.Thread.Sleep(2000);
  294.                                     Console.WriteLine($"Entering next room...");
  295.                                     System.Threading.Thread.Sleep(2000);
  296.                                     Console.Clear();
  297.                                 }
  298.  
  299.                                 else
  300.                                 {
  301.                                     Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  302.                                     Console.WriteLine("");
  303.                                     Console.WriteLine("");
  304.  
  305.                                     System.Threading.Thread.Sleep(2000);
  306.                                     Console.WriteLine($"You do not have enough magic to get past the {monsterType}!");
  307.                                     Console.WriteLine("");
  308.                                     System.Threading.Thread.Sleep(2000);
  309.                                     Console.WriteLine("After the unsuccessful attempt to use magic you decide to:");
  310.                                     Console.WriteLine("");
  311.                                     System.Threading.Thread.Sleep(2000);
  312.                                     Console.WriteLine($"1 - Fight the {monsterType}!");
  313.                                     System.Threading.Thread.Sleep(1000);
  314.                                     Console.WriteLine($"2 - Attempt to run from the {monsterType}!");
  315.                                     Console.WriteLine("");
  316.                                     System.Threading.Thread.Sleep(1000);
  317.                                     Console.Write("You choose to: ");
  318.  
  319.                                     actionChoice = int.Parse(Console.ReadLine());
  320.  
  321.                                     switch (actionChoice)
  322.                                     {
  323.                                         case 1:
  324.  
  325.                                             monsterDead = false;
  326.                                             playerDead = false;
  327.  
  328.                                             Console.WriteLine("");
  329.                                             System.Threading.Thread.Sleep(1000);
  330.                                             Console.WriteLine($"You have entered in a fight with the {monsterType}");
  331.                                             System.Threading.Thread.Sleep(2000);
  332.  
  333.                                             while (!monsterDead && !playerDead)
  334.                                             {
  335.                                                 monsterHp -= playerAttack;
  336.                                                 playerHp -= (monsterAttack - playerDefence);
  337.  
  338.                                                 if (playerHp <= 0)
  339.                                                 {
  340.                                                     playerDead = true;
  341.                                                 }
  342.  
  343.                                                 else if (monsterHp <= 0)
  344.                                                 {
  345.                                                     monsterDead = true;
  346.                                                 }
  347.  
  348.                                                 if (playerDead == true)
  349.                                                 {
  350.                                                     gameOver = true;
  351.  
  352.                                                     Console.WriteLine($"You have been killed by {monsterType}!");
  353.                                                     Console.WriteLine("");
  354.                                                     Console.WriteLine("");
  355.                                                     Console.WriteLine("");
  356.  
  357.                                                     string stringGameOver = "GAME OVER!";
  358.  
  359.                                                     for (int i = 0; i < stringGameOver.Length; i++)
  360.                                                     {
  361.                                                         System.Threading.Thread.Sleep(1000);
  362.                                                         char letter = stringGameOver[i];
  363.  
  364.                                                         Console.Write(letter);
  365.                                                     }
  366.                                                 }
  367.  
  368.                                                 else if (monsterDead == true)
  369.                                                 {
  370.                                                     int xpEarned = random.Next(15, 51);
  371.                                                     playerXp += xpEarned;
  372.  
  373.                                                     int coinsEarned = random.Next(50, 101);
  374.                                                     playerCoins += coinsEarned;
  375.  
  376.                                                     if (playerXp >= 100)
  377.                                                     {
  378.                                                         playerLevel++;
  379.                                                         playerXp = playerXp - 100;
  380.                                                         playerHp += 5;
  381.                                                         playerCoins += 50;
  382.  
  383.                                                         if (playerLevel % 2 == 0)
  384.                                                         {
  385.                                                             playerAttack += 1;
  386.                                                             playerMagic += 1;
  387.                                                         }
  388.                                                     }
  389.                                                     Console.WriteLine("");
  390.                                                     System.Threading.Thread.Sleep(2000);
  391.                                                     Console.WriteLine($"You have killed the {monsterType}!");
  392.                                                     Console.WriteLine("");
  393.                                                     System.Threading.Thread.Sleep(1000);
  394.                                                     Console.WriteLine($"You have earned {xpEarned} XP!");
  395.                                                     System.Threading.Thread.Sleep(1000);
  396.                                                     Console.WriteLine($"You have earned {coinsEarned} coins!");
  397.                                                     Console.WriteLine("");
  398.                                                     System.Threading.Thread.Sleep(2000);
  399.                                                     Console.WriteLine($"Entering next room...");
  400.                                                     System.Threading.Thread.Sleep(2000);
  401.                                                     Console.Clear();
  402.                                                 }
  403.                                             }
  404.                                             break;
  405.  
  406.                                         case 2:
  407.  
  408.                                             int chanceRun = random.Next(1, 5);
  409.  
  410.                                             switch (chanceRun)
  411.                                             {
  412.                                                 case 1:
  413.                                                 case 2:
  414.                                                 case 3:
  415.                                                     Console.WriteLine("");
  416.                                                     System.Threading.Thread.Sleep(2000);
  417.                                                     Console.WriteLine($"Your attempt to run from the {monsterType} was not successful!");
  418.  
  419.                                                     monsterDead = false;
  420.                                                     playerDead = false;
  421.  
  422.                                                     Console.WriteLine("");
  423.                                                     System.Threading.Thread.Sleep(2000);
  424.                                                     Console.WriteLine($"You have entered in a fight with the {monsterType}");
  425.                                                     System.Threading.Thread.Sleep(2000);
  426.  
  427.                                                     while (!monsterDead && !playerDead)
  428.                                                     {
  429.                                                         monsterHp -= playerAttack;
  430.                                                         playerHp -= (monsterAttack - playerDefence);
  431.  
  432.                                                         if (playerHp <= 0)
  433.                                                         {
  434.                                                             playerDead = true;
  435.                                                         }
  436.  
  437.                                                         else if (monsterHp <= 0)
  438.                                                         {
  439.                                                             monsterDead = true;
  440.                                                         }
  441.  
  442.                                                         if (playerDead == true)
  443.                                                         {
  444.                                                             gameOver = true;
  445.  
  446.                                                             Console.WriteLine($"You have been killed by {monsterType}!");
  447.                                                             Console.WriteLine("");
  448.                                                             Console.WriteLine("");
  449.                                                             Console.WriteLine("");
  450.  
  451.                                                             string stringGameOver = "GAME OVER!";
  452.  
  453.                                                             for (int i = 0; i < stringGameOver.Length; i++)
  454.                                                             {
  455.                                                                 System.Threading.Thread.Sleep(1000);
  456.                                                                 char letter = stringGameOver[i];
  457.  
  458.                                                                 Console.Write(letter);
  459.                                                             }
  460.                                                         }
  461.  
  462.                                                         else if (monsterDead == true)
  463.                                                         {
  464.                                                             int xpEarned = random.Next(15, 51);
  465.                                                             playerXp += xpEarned;
  466.  
  467.                                                             int coinsEarned = random.Next(50, 101);
  468.                                                             playerCoins += coinsEarned;
  469.  
  470.                                                             if (playerXp >= 100)
  471.                                                             {
  472.                                                                 playerLevel++;
  473.                                                                 playerXp = playerXp - 100;
  474.                                                                 playerHp += 5;
  475.                                                                 playerCoins += 50;
  476.  
  477.                                                                 if (playerLevel % 2 == 0)
  478.                                                                 {
  479.                                                                     playerAttack += 1;
  480.                                                                     playerMagic += 1;
  481.                                                                 }
  482.                                                             }
  483.                                                             Console.WriteLine("");
  484.                                                             System.Threading.Thread.Sleep(2000);
  485.                                                             Console.WriteLine($"You have killed the {monsterType}!");
  486.                                                             Console.WriteLine("");
  487.                                                             System.Threading.Thread.Sleep(1000);
  488.                                                             Console.WriteLine($"You have earned {xpEarned} XP!");
  489.                                                             System.Threading.Thread.Sleep(1000);
  490.                                                             Console.WriteLine($"You have earned {coinsEarned} coins!");
  491.                                                             Console.WriteLine("");
  492.                                                             System.Threading.Thread.Sleep(2000);
  493.                                                             Console.WriteLine($"Entering next room...");
  494.                                                             System.Threading.Thread.Sleep(2000);
  495.                                                             Console.Clear();
  496.                                                         }
  497.                                                     }
  498.                                                     break;
  499.  
  500.                                                 case 4:
  501.                                                     Console.WriteLine("");
  502.                                                     System.Threading.Thread.Sleep(2000);
  503.                                                     Console.WriteLine($"You have successfully escaped from the {monsterType}!");
  504.                                                     Console.WriteLine("");
  505.                                                     System.Threading.Thread.Sleep(2000);
  506.                                                     Console.WriteLine("Entering next room...");
  507.                                                     Console.Clear();
  508.                                                     break;
  509.                                             }
  510.                                             break;
  511.                                     }
  512.                                 }
  513.                                 break;
  514.  
  515.                             case 3:
  516.  
  517.                                 int chance = random.Next(1, 5);
  518.  
  519.                                 switch (chance)
  520.                                 {
  521.                                     case 1:
  522.                                     case 2:
  523.                                     case 3:
  524.                                         Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  525.                                         Console.WriteLine("");
  526.                                         Console.WriteLine("");
  527.                                         Console.WriteLine("");
  528.                                         System.Threading.Thread.Sleep(2000);
  529.                                         Console.WriteLine($"Your attempt to run from the {monsterType} was not successful!");
  530.                                         System.Threading.Thread.Sleep(2000);
  531.  
  532.                                         monsterDead = false;
  533.                                         playerDead = false;
  534.  
  535.                                         Console.WriteLine("");
  536.                                         System.Threading.Thread.Sleep(2000);
  537.                                         Console.WriteLine($"You have entered in a fight with the {monsterType}");
  538.                                         System.Threading.Thread.Sleep(2000);
  539.  
  540.                                         while (!monsterDead && !playerDead)
  541.                                         {
  542.                                             monsterHp -= playerAttack;
  543.                                             playerHp -= (monsterAttack - playerDefence);
  544.  
  545.                                             if (playerHp <= 0)
  546.                                             {
  547.                                                 playerDead = true;
  548.                                             }
  549.  
  550.                                             else if (monsterHp <= 0)
  551.                                             {
  552.                                                 monsterDead = true;
  553.                                             }
  554.  
  555.                                             if (playerDead == true)
  556.                                             {
  557.                                                 gameOver = true;
  558.  
  559.                                                 Console.WriteLine($"You have been killed by {monsterType}!");
  560.                                                 Console.WriteLine("");
  561.                                                 Console.WriteLine("");
  562.                                                 Console.WriteLine("");
  563.  
  564.                                                 string stringGameOver = "GAME OVER!";
  565.  
  566.                                                 for (int i = 0; i < stringGameOver.Length; i++)
  567.                                                 {
  568.                                                     System.Threading.Thread.Sleep(1000);
  569.                                                     char letter = stringGameOver[i];
  570.  
  571.                                                     Console.Write(letter);
  572.                                                 }
  573.                                             }
  574.  
  575.                                             else if (monsterDead == true)
  576.                                             {
  577.                                                 int xpEarned = random.Next(15, 51);
  578.                                                 playerXp += xpEarned;
  579.  
  580.                                                 int coinsEarned = random.Next(50, 101);
  581.                                                 playerCoins += coinsEarned;
  582.  
  583.                                                 if (playerXp >= 100)
  584.                                                 {
  585.                                                     playerLevel++;
  586.                                                     playerXp = playerXp - 100;
  587.                                                     playerHp += 5;
  588.                                                     playerCoins += 50;
  589.  
  590.                                                     if (playerLevel % 2 == 0)
  591.                                                     {
  592.                                                         playerAttack += 1;
  593.                                                         playerMagic += 1;
  594.                                                     }
  595.                                                 }
  596.                                                 Console.WriteLine("");
  597.                                                 System.Threading.Thread.Sleep(2000);
  598.                                                 Console.WriteLine($"You have killed the {monsterType}!");
  599.                                                 Console.WriteLine("");
  600.                                                 System.Threading.Thread.Sleep(1000);
  601.                                                 Console.WriteLine($"You have earned {xpEarned} XP!");
  602.                                                 System.Threading.Thread.Sleep(1000);
  603.                                                 Console.WriteLine($"You have earned {coinsEarned} coins!");
  604.                                                 Console.WriteLine("");
  605.                                                 System.Threading.Thread.Sleep(2000);
  606.                                                 Console.WriteLine($"Entering next room...");
  607.                                                 System.Threading.Thread.Sleep(2000);
  608.                                                 Console.Clear();
  609.                                             }
  610.                                         }
  611.                                         break;
  612.  
  613.                                     case 4:
  614.                                         Console.WriteLine("");
  615.                                         System.Threading.Thread.Sleep(2000);
  616.                                         Console.WriteLine($"You have successfully escaped from the {monsterType}!");
  617.                                         Console.WriteLine("");
  618.                                         System.Threading.Thread.Sleep(2000);
  619.                                         Console.WriteLine("Entering next room...");
  620.                                         Console.WriteLine("");
  621.                                         System.Threading.Thread.Sleep(2000);
  622.                                         Console.Clear();
  623.                                         break;
  624.                                 }
  625.                                 break;
  626.                         }
  627.  
  628.                         if (gameOver == true)
  629.                         {
  630.                             break;
  631.                         }
  632.                     }
  633.  
  634.                     if (gameOver == true)
  635.                     {
  636.                         break;
  637.                     }
  638.  
  639.                     else if (roomType == "Chest room")
  640.                     {
  641.                         int chestType = random.Next(1, 6);
  642.  
  643.                         Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  644.                         Console.WriteLine("");
  645.                         Console.WriteLine("");
  646.                         System.Threading.Thread.Sleep(1000);
  647.                         Console.WriteLine($"ROOM - {room}, {roomType}!");
  648.                         Console.WriteLine("");
  649.                         Console.WriteLine("");
  650.                         Console.WriteLine("");
  651.  
  652.                         string reward = "";
  653.                         System.Threading.Thread.Sleep(1000);
  654.                         Console.WriteLine("You have found a chest!");
  655.  
  656.                         switch (chestType)
  657.                         {
  658.                             case 1:
  659.                                 reward = "coins";
  660.                                 int coinsGained = random.Next(50, 151);
  661.                                 playerCoins += coinsGained;
  662.  
  663.                                 Console.WriteLine("");
  664.                                 System.Threading.Thread.Sleep(2000);
  665.                                 Console.WriteLine($"You have been rewarded with {coinsGained} {reward}!");
  666.                                 Console.WriteLine("");
  667.                                 System.Threading.Thread.Sleep(3000);
  668.                                 Console.WriteLine("Entering next room...");
  669.                                 System.Threading.Thread.Sleep(3000);
  670.                                 Console.Clear();
  671.                                 break;
  672.  
  673.                             case 2:
  674.                                 reward = "healing potion";
  675.                                 playerHp += 20;
  676.  
  677.                                 if (playerHp > 100)
  678.                                 {
  679.                                     playerHp = 100;
  680.                                 }
  681.  
  682.                                 Console.WriteLine("");
  683.                                 System.Threading.Thread.Sleep(2000);
  684.                                 Console.WriteLine($"You have been rewarded with {reward} (+20 HP)!");
  685.                                 Console.WriteLine("");
  686.                                 System.Threading.Thread.Sleep(3000);
  687.                                 Console.WriteLine("Entering next room...");
  688.                                 System.Threading.Thread.Sleep(3000);
  689.                                 Console.Clear();
  690.                                 break;
  691.  
  692.                             case 3:
  693.                                 reward = "magic book";
  694.                                 playerMagic += 5;
  695.  
  696.                                 Console.WriteLine("");
  697.                                 System.Threading.Thread.Sleep(2000);
  698.                                 Console.WriteLine($"You have been rewarded with {reward} (+5 magic)!");
  699.                                 Console.WriteLine("");
  700.  
  701.                                 System.Threading.Thread.Sleep(3000);
  702.                                 Console.WriteLine("Entering next room...");
  703.                                 System.Threading.Thread.Sleep(3000);
  704.                                 Console.Clear();
  705.                                 break;
  706.  
  707.                             case 4:
  708.  
  709.                                 string armourType = "";
  710.  
  711.                                 int randomArmour = random.Next(1, 7);
  712.  
  713.                                 switch (randomArmour)
  714.                                 {
  715.                                     case 1:
  716.                                     case 2:
  717.                                         armourType = "Leather armour";
  718.  
  719.                                         if (playerArmour == "None")
  720.                                         {
  721.                                             playerArmour = armourType;
  722.                                             playerDefence += 2;
  723.                                         }
  724.                                         break;
  725.  
  726.                                     case 3:
  727.                                     case 4:
  728.                                         armourType = "Rusty armour";
  729.  
  730.                                         if (playerArmour == "None" || playerArmour == "Leather armour")
  731.                                         {
  732.                                             playerArmour = armourType;
  733.                                             playerDefence += 4;
  734.                                         }
  735.                                         break;
  736.  
  737.                                     case 5:
  738.                                         armourType = "Iron armour";
  739.  
  740.                                         if (playerArmour == "None" || playerArmour == "Leather armour" || playerArmour == "Rusty armour")
  741.                                         {
  742.                                             playerArmour = armourType;
  743.                                             playerDefence += 6;
  744.                                         }
  745.                                         break;
  746.  
  747.                                     case 6:
  748.                                         armourType = "Steel armour";
  749.  
  750.                                         if (playerArmour == "None" || playerArmour == "Leather armour" || playerArmour == "Rusty armour" || playerArmour == "Iron armour")
  751.                                         {
  752.                                             playerArmour = armourType;
  753.                                             playerDefence += 8;
  754.                                         }
  755.                                         break;
  756.                                 }
  757.  
  758.                                 Console.WriteLine("");
  759.                                 System.Threading.Thread.Sleep(2000);
  760.                                 Console.WriteLine($"You have been rewarded with {armourType} (Defence++)!");
  761.                                 Console.WriteLine("");
  762.  
  763.                                 System.Threading.Thread.Sleep(3000);
  764.                                 Console.WriteLine("Entering next room...");
  765.                                 System.Threading.Thread.Sleep(3000);
  766.                                 Console.Clear();
  767.                                 break;
  768.  
  769.                             case 5:
  770.  
  771.                                 string weaponType = "";
  772.  
  773.                                 int randomWeapon = random.Next(1, 7);
  774.  
  775.                                 switch (randomWeapon)
  776.                                 {
  777.                                     case 1:
  778.                                     case 2:
  779.                                         weaponType = "Knife";
  780.  
  781.                                         if (playerWeapon == "None")
  782.                                         {
  783.                                             playerWeapon = weaponType;
  784.                                             playerAttack += 2;
  785.                                         }
  786.                                         break;
  787.  
  788.                                     case 3:
  789.                                     case 4:
  790.                                         weaponType = "Spear";
  791.  
  792.                                         if (playerWeapon == "None" || playerWeapon == "Knife")
  793.                                         {
  794.                                             playerWeapon = weaponType;
  795.                                             playerAttack += 4;
  796.                                         }
  797.                                         break;
  798.  
  799.                                     case 5:
  800.                                         weaponType = "Axe";
  801.  
  802.                                         if (playerWeapon == "None" || playerWeapon == "Knife" || playerWeapon == "Spear")
  803.                                         {
  804.                                             playerWeapon = weaponType;
  805.                                             playerAttack += 6;
  806.                                         }
  807.                                         break;
  808.  
  809.                                     case 6:
  810.                                         weaponType = "Sword";
  811.  
  812.                                         if (playerWeapon == "None" || playerWeapon == "Knife" || playerWeapon == "Spear" || playerWeapon == "Axe")
  813.                                         {
  814.                                             playerWeapon = weaponType;
  815.                                             playerAttack += 8;
  816.                                         }
  817.                                         break;
  818.                                 }
  819.  
  820.                                 Console.WriteLine("");
  821.                                 System.Threading.Thread.Sleep(2000);
  822.                                 Console.WriteLine($"You have been rewarded with {weaponType} (Attack++)!");
  823.                                 Console.WriteLine("");
  824.  
  825.                                 System.Threading.Thread.Sleep(3000);
  826.                                 Console.WriteLine("Entering next room...");
  827.                                 System.Threading.Thread.Sleep(3000);
  828.                                 Console.Clear();
  829.                                 break;
  830.                         }
  831.  
  832.                     }
  833.  
  834.                     else if (roomType == "Regeneration room")
  835.                     {
  836.                         Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  837.                         Console.WriteLine("");
  838.                         Console.WriteLine("");
  839.                         System.Threading.Thread.Sleep(1000);
  840.                         Console.WriteLine($"ROOM - {room}, {roomType}!");
  841.                         Console.WriteLine("");
  842.                         Console.WriteLine("");
  843.                         Console.WriteLine("");
  844.  
  845.                         Console.WriteLine("");
  846.                         System.Threading.Thread.Sleep(1000);
  847.                         Console.WriteLine("Congratulations, you have entered a regeneration room!");
  848.                         Console.WriteLine("");
  849.                         System.Threading.Thread.Sleep(2000);
  850.                         Console.WriteLine("Your health has been fully restored!");
  851.                         playerHp = 100;
  852.                         System.Threading.Thread.Sleep(1000);
  853.                         Console.Clear();
  854.                     }
  855.  
  856.                     else if (roomType == "Shop room")
  857.                     {
  858.                         bool exitShop = false;
  859.                         int productPrice = 0;
  860.  
  861.                         while (!exitShop)
  862.                         {
  863.                             Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  864.                             Console.WriteLine("");
  865.                             Console.WriteLine("");
  866.                             System.Threading.Thread.Sleep(1000);
  867.                             Console.WriteLine($"ROOM - {room}, {roomType}!");
  868.                             Console.WriteLine("");
  869.                             Console.WriteLine("");
  870.                             Console.WriteLine("");
  871.  
  872.                             System.Threading.Thread.Sleep(1000);
  873.                             Console.WriteLine("You have entered the shop!");
  874.                             Console.WriteLine("");
  875.                             System.Threading.Thread.Sleep(1000);
  876.                             Console.WriteLine("The shop can offer:");
  877.                             Console.WriteLine("");
  878.                             System.Threading.Thread.Sleep(1000);
  879.                             Console.WriteLine("1 - Healing potions (80 coins)");
  880.                             System.Threading.Thread.Sleep(1000);
  881.                             Console.WriteLine("2 - Magic books (200 coins)");
  882.                             System.Threading.Thread.Sleep(1000);
  883.                             Console.WriteLine("3 - Armours (select to view)");
  884.                             System.Threading.Thread.Sleep(1000);
  885.                             Console.WriteLine("4 - Weapons (select to view)");
  886.                             System.Threading.Thread.Sleep(1000);
  887.                             Console.WriteLine("5 - Exit shop");
  888.                             System.Threading.Thread.Sleep(1000);
  889.                             Console.Write("You decide to buy: ");
  890.                             int shopChoice = int.Parse(Console.ReadLine());
  891.  
  892.                             switch (shopChoice)
  893.                             {
  894.                                 case 1:
  895.                                     productPrice = 80;
  896.  
  897.                                     if (playerCoins >= productPrice)
  898.                                     {
  899.                                         playerHp += 20;
  900.  
  901.                                         if (playerHp > 100)
  902.                                         {
  903.                                             playerHp = 100;
  904.                                         }
  905.  
  906.                                         Console.WriteLine("");
  907.                                         System.Threading.Thread.Sleep(1000);
  908.                                         Console.WriteLine("You have bought a healing potion!");
  909.                                         Console.WriteLine("");
  910.                                         System.Threading.Thread.Sleep(1000);
  911.                                         Console.WriteLine("You have slightly recovered your health!");
  912.                                         playerCoins -= productPrice;
  913.                                         System.Threading.Thread.Sleep(2000);
  914.                                         Console.Clear();
  915.                                     }
  916.  
  917.                                     else
  918.                                     {
  919.                                         Console.WriteLine("");
  920.                                         System.Threading.Thread.Sleep(2000);
  921.                                         Console.WriteLine("You do not have enough coins to buy this!");
  922.                                         System.Threading.Thread.Sleep(2000);
  923.                                         Console.Clear();
  924.                                     }
  925.                                     break;
  926.  
  927.                                 case 2:
  928.                                     productPrice = 200;
  929.  
  930.                                     if (playerCoins >= productPrice)
  931.                                     {
  932.                                         Console.WriteLine("");
  933.                                         System.Threading.Thread.Sleep(1000);
  934.                                         Console.WriteLine("You have bought a magic book!");
  935.                                         Console.WriteLine("");
  936.                                         System.Threading.Thread.Sleep(1000);
  937.                                         Console.WriteLine("Your magic abilities have increased!");
  938.                                         playerCoins -= productPrice;
  939.                                         Console.Clear();
  940.                                     }
  941.  
  942.                                     else
  943.                                     {
  944.                                         Console.WriteLine("");
  945.                                         System.Threading.Thread.Sleep(1000);
  946.                                         Console.WriteLine("You do not have enough coins to buy this!");
  947.                                         System.Threading.Thread.Sleep(2000);
  948.                                         Console.Clear();
  949.                                     }
  950.                                     break;
  951.  
  952.                                 case 3:
  953.                                     string armourType = "";
  954.                                     int price = 0;
  955.  
  956.                                     Console.WriteLine("");
  957.  
  958.                                     System.Threading.Thread.Sleep(2000);
  959.                                     Console.WriteLine("The shop can offer this armour types:");
  960.                                     Console.WriteLine("1 - Leather armour (200 coins)");
  961.                                     Console.WriteLine("2 - Rusty armour (400 coins)");
  962.                                     Console.WriteLine("3 - Iron armour (600 coins)");
  963.                                     Console.WriteLine("4 - Steel armour (800 coins)");
  964.                                     Console.WriteLine("5 - Go back");
  965.                                     Console.WriteLine("");
  966.                                     System.Threading.Thread.Sleep(2000);
  967.                                     Console.Write("Your choice is: ");
  968.  
  969.                                     int choice = int.Parse(Console.ReadLine());
  970.  
  971.                                     switch (choice)
  972.                                     {
  973.                                         case 1:
  974.  
  975.                                             price = 200;
  976.                                             armourType = "Leather armour";
  977.  
  978.                                             if (playerCoins >= price)
  979.                                             {
  980.                                                 if (playerArmour == "None")
  981.                                                 {
  982.                                                     playerArmour = armourType;
  983.                                                     playerDefence += 2;
  984.                                                     Console.WriteLine("");
  985.                                                     System.Threading.Thread.Sleep(1000);
  986.                                                     Console.WriteLine($"Congratulations, you have bought {armourType}!");
  987.                                                     playerCoins -= price;
  988.                                                 }
  989.  
  990.                                                 else if (playerArmour == "Leather armour")
  991.                                                 {
  992.                                                     Console.WriteLine("");
  993.                                                     System.Threading.Thread.Sleep(1000);
  994.                                                     Console.WriteLine("You already have this armour!");
  995.                                                 }
  996.  
  997.                                                 else
  998.                                                 {
  999.                                                     Console.WriteLine("");
  1000.                                                     System.Threading.Thread.Sleep(1000);
  1001.                                                     Console.WriteLine("You have a better armour equipped already!");
  1002.                                                 }
  1003.                                                 System.Threading.Thread.Sleep(2000);
  1004.                                                 Console.Clear();
  1005.                                                 break;
  1006.                                             }
  1007.  
  1008.                                             else
  1009.                                             {
  1010.                                                 Console.WriteLine("");
  1011.                                                 System.Threading.Thread.Sleep(1000);
  1012.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1013.                                                 Console.Clear();
  1014.                                             }
  1015.                                             break;
  1016.  
  1017.                                         case 2:
  1018.  
  1019.                                             price = 400;
  1020.  
  1021.                                             if (playerCoins >= price)
  1022.                                             {
  1023.                                                 if (playerArmour == "None" || playerArmour == "Leather armour")
  1024.                                                 {
  1025.                                                     playerArmour = armourType;
  1026.                                                     Console.WriteLine("");
  1027.                                                     playerDefence += 4;
  1028.                                                     System.Threading.Thread.Sleep(1000);
  1029.                                                     Console.WriteLine($"Congratulations, you have bought {armourType}!");
  1030.                                                     playerCoins -= price;
  1031.                                                 }
  1032.  
  1033.                                                 else if (playerArmour == "Rusty armour")
  1034.                                                 {
  1035.                                                     Console.WriteLine("");
  1036.                                                     System.Threading.Thread.Sleep(1000);
  1037.                                                     Console.WriteLine("You already have this armour!");
  1038.                                                 }
  1039.  
  1040.                                                 else
  1041.                                                 {
  1042.                                                     Console.WriteLine("");
  1043.                                                     System.Threading.Thread.Sleep(1000);
  1044.                                                     Console.WriteLine("You have a better armour equipped already!");
  1045.                                                 }
  1046.  
  1047.                                                 System.Threading.Thread.Sleep(2000);
  1048.                                                 Console.Clear();
  1049.                                                 break;
  1050.                                             }
  1051.  
  1052.                                             else
  1053.                                             {
  1054.                                                 Console.WriteLine("");
  1055.                                                 System.Threading.Thread.Sleep(1000);
  1056.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1057.                                                 Console.Clear();
  1058.                                             }
  1059.                                             break;
  1060.  
  1061.                                         case 3:
  1062.  
  1063.                                             price = 600;
  1064.  
  1065.                                             if (playerCoins >= price)
  1066.                                             {
  1067.                                                 if (playerArmour == "None" || playerArmour == "Leather armour" || playerArmour == "Rusty armour")
  1068.                                                 {
  1069.                                                     playerArmour = armourType;
  1070.                                                     Console.WriteLine("");
  1071.                                                     playerDefence += 6;
  1072.                                                     System.Threading.Thread.Sleep(1000);
  1073.                                                     Console.WriteLine($"Congratulations, you have bought {armourType}!");
  1074.                                                     playerCoins -= price;
  1075.                                                 }
  1076.  
  1077.                                                 else if (playerArmour == "Iron armour")
  1078.                                                 {
  1079.                                                     Console.WriteLine("");
  1080.                                                     System.Threading.Thread.Sleep(1000);
  1081.                                                     Console.WriteLine("You already have this armour!");
  1082.                                                 }
  1083.  
  1084.                                                 else
  1085.                                                 {
  1086.                                                     Console.WriteLine("");
  1087.                                                     System.Threading.Thread.Sleep(1000);
  1088.                                                     Console.WriteLine("You have a better armour equipped already!");
  1089.                                                 }
  1090.  
  1091.                                                 System.Threading.Thread.Sleep(2000);
  1092.                                                 Console.Clear();
  1093.                                                 break;
  1094.                                             }
  1095.  
  1096.                                             else
  1097.                                             {
  1098.                                                 Console.WriteLine("");
  1099.                                                 System.Threading.Thread.Sleep(1000);
  1100.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1101.                                                 Console.Clear();
  1102.                                             }
  1103.                                             break;
  1104.  
  1105.                                         case 4:
  1106.  
  1107.                                             price = 800;
  1108.  
  1109.                                             if (playerCoins >= price)
  1110.                                             {
  1111.                                                 if (playerArmour == "None" || playerArmour == "Leather armour" || playerArmour == "Rusty armour" || playerArmour == "Iron armour")
  1112.                                                 {
  1113.                                                     playerArmour = armourType;
  1114.                                                     Console.WriteLine("");
  1115.                                                     playerDefence += 8;
  1116.                                                     System.Threading.Thread.Sleep(1000);
  1117.                                                     Console.WriteLine($"Congratulations, you have bought {armourType}!");
  1118.                                                     playerCoins -= price;
  1119.                                                 }
  1120.  
  1121.                                                 else if (playerArmour == "Steel armour")
  1122.                                                 {
  1123.                                                     Console.WriteLine("");
  1124.                                                     System.Threading.Thread.Sleep(1000);
  1125.                                                     Console.WriteLine("You already have this armour!");
  1126.                                                 }
  1127.  
  1128.                                                 else
  1129.                                                 {
  1130.                                                     Console.WriteLine("");
  1131.                                                     System.Threading.Thread.Sleep(1000);
  1132.                                                     Console.WriteLine("You have a better armour equipped already!");
  1133.                                                 }
  1134.  
  1135.                                                 System.Threading.Thread.Sleep(2000);
  1136.                                                 Console.Clear();
  1137.                                                 break;
  1138.                                             }
  1139.  
  1140.                                             else
  1141.                                             {
  1142.                                                 Console.WriteLine("");
  1143.                                                 System.Threading.Thread.Sleep(1000);
  1144.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1145.                                                 Console.Clear();
  1146.                                             }
  1147.  
  1148.                                             break;
  1149.  
  1150.                                         case 5:
  1151.                                             Console.WriteLine("");
  1152.                                             System.Threading.Thread.Sleep(1000);
  1153.                                             Console.WriteLine("Going back to shop...");
  1154.                                             System.Threading.Thread.Sleep(2000);
  1155.                                             exitShop = true;
  1156.                                             Console.Clear();
  1157.                                             break;
  1158.                                     }
  1159.                                     break;
  1160.  
  1161.                                 case 4:
  1162.  
  1163.                                     int weaponPrice = 0;
  1164.  
  1165.                                     Console.WriteLine("");
  1166.                                     System.Threading.Thread.Sleep(2000);
  1167.                                     Console.WriteLine("The shop can offer this weapon types:");
  1168.                                     Console.WriteLine("1 - Knife (200 coins)");
  1169.                                     Console.WriteLine("2 - Spear (400 coins)");
  1170.                                     Console.WriteLine("3 - Axe (600 coins)");
  1171.                                     Console.WriteLine("4 - Sword (800 coins)");
  1172.                                     Console.WriteLine("5 - Go back");
  1173.                                     Console.WriteLine("");
  1174.                                     System.Threading.Thread.Sleep(2000);
  1175.                                     Console.Write("Your choice is: ");
  1176.  
  1177.                                     int weaponChoice = int.Parse(Console.ReadLine());
  1178.                                     string weaponType = "";
  1179.  
  1180.                                     switch (weaponChoice)
  1181.                                     {
  1182.                                         case 1:
  1183.  
  1184.                                             weaponPrice = 200;
  1185.                                             weaponType = "Knife";
  1186.  
  1187.                                             if (playerCoins >= weaponPrice)
  1188.                                             {
  1189.                                                 if (playerWeapon == "None")
  1190.                                                 {
  1191.                                                     Console.WriteLine("");
  1192.                                                     playerWeapon = "Knife";
  1193.                                                     playerAttack += 2;
  1194.                                                     System.Threading.Thread.Sleep(1000);
  1195.                                                     Console.WriteLine($"Congratulations, you have bought {weaponType}!");
  1196.                                                     playerCoins -= weaponPrice;
  1197.                                                 }
  1198.  
  1199.                                                 else if (playerWeapon == "Knife")
  1200.                                                 {
  1201.                                                     Console.WriteLine("");
  1202.                                                     System.Threading.Thread.Sleep(1000);
  1203.                                                     Console.WriteLine("You already have this weapon!");
  1204.                                                 }
  1205.  
  1206.                                                 else
  1207.                                                 {
  1208.                                                     Console.WriteLine("");
  1209.                                                     System.Threading.Thread.Sleep(1000);
  1210.                                                     Console.WriteLine("You have a better weapon equipped already!");
  1211.                                                 }
  1212.  
  1213.                                                 System.Threading.Thread.Sleep(2000);
  1214.                                                 Console.Clear();
  1215.                                                 break;
  1216.                                             }
  1217.  
  1218.                                             else
  1219.                                             {
  1220.                                                 Console.WriteLine("");
  1221.                                                 System.Threading.Thread.Sleep(1000);
  1222.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1223.                                                 Console.Clear();
  1224.                                             }
  1225.  
  1226.                                             break;
  1227.  
  1228.                                         case 2:
  1229.  
  1230.                                             weaponPrice = 400;
  1231.                                             weaponType = "Spear";
  1232.  
  1233.                                             if (playerCoins >= weaponPrice)
  1234.                                             {
  1235.                                                 if (playerWeapon == "None" || playerWeapon == "Knife")
  1236.                                                 {
  1237.                                                     Console.WriteLine("");
  1238.                                                     playerWeapon = "Spear";
  1239.                                                     playerAttack += 4;
  1240.                                                     System.Threading.Thread.Sleep(1000);
  1241.                                                     Console.WriteLine($"Congratulations, you have bought {weaponType}!");
  1242.                                                     playerCoins -= weaponPrice;
  1243.                                                 }
  1244.  
  1245.                                                 else if (playerWeapon == "Spear")
  1246.                                                 {
  1247.                                                     Console.WriteLine("");
  1248.                                                     System.Threading.Thread.Sleep(1000);
  1249.                                                     Console.WriteLine("You already have this weapon!");
  1250.                                                 }
  1251.  
  1252.                                                 else
  1253.                                                 {
  1254.                                                     Console.WriteLine("");
  1255.                                                     System.Threading.Thread.Sleep(1000);
  1256.                                                     Console.WriteLine("You have a better weapon equipped already!");
  1257.                                                 }
  1258.  
  1259.                                                 System.Threading.Thread.Sleep(2000);
  1260.                                                 Console.Clear();
  1261.                                                 break;
  1262.                                             }
  1263.  
  1264.                                             else
  1265.                                             {
  1266.                                                 Console.WriteLine("");
  1267.                                                 System.Threading.Thread.Sleep(1000);
  1268.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1269.                                                 Console.Clear();
  1270.                                             }
  1271.                                             break;
  1272.  
  1273.                                         case 3:
  1274.  
  1275.                                             weaponPrice = 600;
  1276.                                             weaponType = "Axe";
  1277.  
  1278.                                             if (playerCoins >= weaponPrice)
  1279.                                             {
  1280.                                                 if (playerWeapon == "None" || playerWeapon == "Knife" || playerWeapon == "Spear")
  1281.                                                 {
  1282.                                                     Console.WriteLine("");
  1283.                                                     playerWeapon = "Axe";
  1284.                                                     playerAttack += 6;
  1285.                                                     System.Threading.Thread.Sleep(1000);
  1286.                                                     Console.WriteLine($"Congratulations, you have bought {weaponType}!");
  1287.                                                     playerCoins -= weaponPrice;
  1288.                                                 }
  1289.  
  1290.                                                 else if (playerWeapon == "Axe")
  1291.                                                 {
  1292.                                                     Console.WriteLine("");
  1293.                                                     System.Threading.Thread.Sleep(1000);
  1294.                                                     Console.WriteLine("You already have this weapon!");
  1295.                                                 }
  1296.  
  1297.                                                 else
  1298.                                                 {
  1299.                                                     Console.WriteLine("");
  1300.                                                     System.Threading.Thread.Sleep(1000);
  1301.                                                     Console.WriteLine("You have a better weapon equipped already!");
  1302.                                                 }
  1303.  
  1304.                                                 System.Threading.Thread.Sleep(2000);
  1305.                                                 Console.Clear();
  1306.                                                 break;
  1307.                                             }
  1308.  
  1309.                                             else
  1310.                                             {
  1311.                                                 Console.WriteLine("");
  1312.                                                 System.Threading.Thread.Sleep(1000);
  1313.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1314.                                                 Console.Clear();
  1315.                                             }
  1316.                                             break;
  1317.  
  1318.                                         case 4:
  1319.  
  1320.                                             weaponPrice = 800;
  1321.                                             weaponType = "Sword";
  1322.  
  1323.                                             if (playerCoins >= weaponPrice)
  1324.                                             {
  1325.                                                 if (playerWeapon == "None" || playerWeapon == "Knife" || playerWeapon == "Spear" || playerWeapon == "Axe")
  1326.                                                 {
  1327.                                                     Console.WriteLine("");
  1328.                                                     playerWeapon = "Sword";
  1329.                                                     playerAttack += 8;
  1330.                                                     System.Threading.Thread.Sleep(1000);
  1331.                                                     Console.WriteLine($"Congratulations, you have bought {weaponType}!");
  1332.                                                     playerCoins -= weaponPrice;
  1333.                                                 }
  1334.  
  1335.                                                 else if (playerWeapon == "Sword")
  1336.                                                 {
  1337.                                                     Console.WriteLine("");
  1338.                                                     System.Threading.Thread.Sleep(1000);
  1339.                                                     Console.WriteLine("You already have this weapon!");
  1340.                                                 }
  1341.  
  1342.                                                 else
  1343.                                                 {
  1344.                                                     Console.WriteLine("");
  1345.                                                     System.Threading.Thread.Sleep(1000);
  1346.                                                     Console.WriteLine("You have a better weapon equipped already!");
  1347.                                                 }
  1348.  
  1349.                                                 System.Threading.Thread.Sleep(2000);
  1350.                                                 Console.Clear();
  1351.                                                 break;
  1352.                                             }
  1353.  
  1354.                                             else
  1355.                                             {
  1356.                                                 Console.WriteLine("");
  1357.                                                 System.Threading.Thread.Sleep(1000);
  1358.                                                 Console.WriteLine("You do not have enough coins to buy this!");
  1359.                                                 Console.Clear();
  1360.                                             }
  1361.  
  1362.                                             break;
  1363.  
  1364.                                         case 5:
  1365.                                             Console.WriteLine("");
  1366.                                             System.Threading.Thread.Sleep(1000);
  1367.                                             Console.WriteLine("Going back to shop...");
  1368.                                             Console.Clear();
  1369.                                             break;
  1370.                                     }
  1371.                                     break;
  1372.  
  1373.                                 case 5:
  1374.                                     exitShop = true;
  1375.                                     Console.WriteLine("");
  1376.                                     System.Threading.Thread.Sleep(1000);
  1377.                                     Console.WriteLine("Leaving the shop...");
  1378.                                     System.Threading.Thread.Sleep(2000);
  1379.                                     Console.Clear();
  1380.                                     break;
  1381.                             }
  1382.                         }
  1383.                     }
  1384.  
  1385.                     else if (roomType == "Final boss room")
  1386.                     {
  1387.                         Console.WriteLine($"Level:({playerLevel}) XP:({playerXp}) HP:({playerHp}) Attack:({playerAttack}) Defence:({playerDefence}) Magic:({playerMagic}) Coins:({playerCoins})");
  1388.                         Console.WriteLine("");
  1389.                         Console.WriteLine("");
  1390.                         System.Threading.Thread.Sleep(1000);
  1391.                         Console.WriteLine($"ROOM - {room}, {roomType}!");
  1392.                         Console.WriteLine("");
  1393.                         Console.WriteLine("");
  1394.                         Console.WriteLine("");
  1395.  
  1396.                         System.Threading.Thread.Sleep(2000);
  1397.                         Console.WriteLine("Congratulations for reaching this far...");
  1398.                         System.Threading.Thread.Sleep(2000);
  1399.                         Console.WriteLine("...You are about to enter the final room in the dungeon, but the hardest one too!");
  1400.                         System.Threading.Thread.Sleep(2000);
  1401.                         Console.WriteLine("Ready or not the final boss comes!");
  1402.                         System.Threading.Thread.Sleep(2000);
  1403.                         Console.Clear();
  1404.  
  1405.                         System.Threading.Thread.Sleep(2000);
  1406.                         Console.WriteLine($"*** Welcome {playerName}, i have expected you! ***");
  1407.                         Console.WriteLine("");
  1408.                         System.Threading.Thread.Sleep(2000);
  1409.                         Console.WriteLine("*** You don't seem that powerful to me so i will make it easier for you... ***");
  1410.                         Console.WriteLine("");
  1411.                         System.Threading.Thread.Sleep(2000);
  1412.                         Console.WriteLine("*** ...For every correct answer i will be dropping a part of my equipment. ***");
  1413.                         Console.WriteLine("");
  1414.                         System.Threading.Thread.Sleep(2000);
  1415.  
  1416.                     }
  1417.                 }
  1418.             }
  1419.         }
  1420.     }
  1421. }
Add Comment
Please, Sign In to add comment