Skip to content

Commit

Permalink
Actual ReadKey Improvement, made not enough coins message clear the r…
Browse files Browse the repository at this point in the history
…est of the screen.
  • Loading branch information
TraceEntertains committed May 5, 2022
1 parent 7a7fad2 commit 2015d50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Encounters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static void Combat(Enemy enemy)
WriteLine("You lose " + damage + " health and deal " + attack + " damage");
currentPlayer.health -= damage;
enemy.health -= attack;
ReadKey();
ReadKey(true);
}
else if (input == "r")
{
Expand All @@ -108,12 +108,12 @@ public static void Combat(Enemy enemy)
damage = 0;
WriteLine("You lose " + damage + " health and are unable to escape.");
currentPlayer.health -= damage;
ReadKey();
ReadKey(true);
}
else
{
WriteLine("You use your crazy mobility to evade the attacks of " + enemy.name + " and you escape!");
ReadKey();
ReadKey(true);

Shop.RunShop(currentPlayer);
}
Expand Down Expand Up @@ -143,12 +143,12 @@ public static void Combat(Enemy enemy)
WriteLine("You lose " + damage + " health. \nOne Potion Consumed.");
currentPlayer.potion--;
}
ReadKey();
ReadKey(true);
}
if (currentPlayer.health <= 0)
{
WriteLine("\nAs the " + enemy.name + " strikes you it hits with a fatal blow!");
ReadKey();
ReadKey(true);
System.Environment.Exit(0);
}
}
Expand All @@ -157,7 +157,7 @@ public static void Combat(Enemy enemy)
WriteLine("\nAs you stand victorious over the " + enemy.name + ", it's body dissolves into " + lootCoins + " gold coins!");
currentPlayer.coins += lootCoins;
currentPlayer.LevelCheck(enemy.xp);
ReadKey();
ReadKey(true);
}
}
}
3 changes: 2 additions & 1 deletion Shop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ static void TryBuy(string item, int cost, Player player)
}
else
{
Clear();
WriteLine("You don't have enough coins.");
ReadKey();
ReadKey(true);
}
}

Expand Down

0 comments on commit 2015d50

Please sign in to comment.