Nocturnal_Toker
New Coder
So I'm new to C# by about a week and a half.
I have managed to make myself a half made custom Pokemon game but for some reason it displays the hud but doesnt display the attack after if anyone could give me some pointers to get this working that would be fantastic.
thank you
Note: The Damage section is not finished yet so just ignore that section
It prints like this
but should look like this
I have managed to make myself a half made custom Pokemon game but for some reason it displays the hud but doesnt display the attack after if anyone could give me some pointers to get this working that would be fantastic.
thank you
Note: The Damage section is not finished yet so just ignore that section
C#:
int userhealth = 100;
int enemyhealth = 100;
Console.WriteLine("Trainer Name: " + userName);
Console.WriteLine("Your Pokemon: " + selectedPokemon);
Console.WriteLine(selectedPokemon + ": " + (char)3 + " Is: " + userhealth);
Console.WriteLine("Enemy: " + (char)3 + " Is: " + enemyhealth);
Console.WriteLine("------------------------------------------------------------------------------------------------------------------------");
Random Damage = new Random();
int damage;
//string selectedAttack;
int attackSelect;
attackSelect = Convert.ToInt32(Console.ReadLine()); <--- This seems to stop the console from writing the next line!
while (userhealth >= 0 && enemyhealth >= 0)
{
if (attackSelect == 1)
{
Console.WriteLine("Choose Attack: ");
Console.WriteLine("1: Growl: Lowers the Target's Attack by One HP");
Console.WriteLine("2: Thunder Shock: Deals damage and has a 10HP");
Console.WriteLine("3: Double Kick: Hits twice in one turn");
Console.WriteLine("4: Quick Attack: Inflicts regular damage with no additional effect");
Console.WriteLine("5: Thunder: Deals 20 HP Damage ");
Console.ReadKey();
damage = Damage.Next(1, 10);
}
It prints like this
but should look like this
Last edited by a moderator: