NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace Memes
{
class Program
{

static void Main(string[] args)
{
//Determines level, xp, name and class.
int level = 1;
int xp = 1;
string firstname;
string surname;
string pClass = "warrior";
int pmhp = 100;
int php = 100;
int ehp;
string aType;

//Determines attributes
int strength = 1;
int dexterity = 1;
int intelligence = 1;

//Failsafe string
string agree = "n";
string agree2 = "yes";

//Choosing First Name
Console.WriteLine("What is your first name?");
firstname = Console.ReadLine();

//Choosing Last Name
Console.WriteLine("What is your surname?");
surname = Console.ReadLine();

//Quality of life line break
Console.WriteLine("");

//Choosing Class
while (agree == "n")
{
Console.WriteLine("What class are you?");
Console.WriteLine("Choices:");
Console.WriteLine("Warrior (+2 Str)");
Console.WriteLine("Archer (+2 Dex)");
Console.WriteLine("Mage (+2 Int)");
pClass = Console.ReadLine();
pClass.ToLower();
Console.WriteLine("");

//Failsafe for cunts who choose null class
switch (pClass)
{
case "warrior":
Console.WriteLine("You have chosen " + pClass + ", is this correct? (Y/N)");
agree = Console.ReadLine();
agree.ToLower();
Console.WriteLine("");
break;
case "archer":
Console.WriteLine("You have chosen " + pClass + ", is this correct? (Y/N)");
agree = Console.ReadLine();
agree.ToLower();
Console.WriteLine("");
break;
case "mage":
Console.WriteLine("You have chosen " + pClass + ", is this correct? (Y/N)");
agree = Console.ReadLine();
agree.ToLower();
Console.WriteLine("");
break;
default:
Console.WriteLine("Invalid selection, please select: Warrior, Archer or Mage");
break;
}
}

//Assigning attributes
switch (pClass)
{
case "warrior":
strength++;
strength++;
break;
case "archer":
dexterity++;
dexterity++;
break;
case "mage":
intelligence++;
intelligence++;
break;
}

//Beginning the game
classlist(strength, dexterity, intelligence, level, pmhp, xp);
Console.WriteLine("");

//Enemy event
Console.WriteLine("You stumble across an enemy Goblin...");
enemy(ehp = 100, aType = null, xp, level, pmhp);
Console.WriteLine("");
levelcheck(level, xp, pmhp);

//Second enemy event
Console.WriteLine("You stumble across a second Goblin...");
enemy(ehp = 100, aType = null, xp, level, pmhp);
Console.WriteLine("");
levelcheck(level, xp, pmhp);

//Stats check
classlist(strength, dexterity, intelligence, level, pmhp, xp);
}

//Stats list function
public static void classlist(int strength, int dexterity, int intelligence, int level, int pmhp, int xp)
{
Console.WriteLine("Your current Strength level is: " + strength + ".");
Console.WriteLine("Your current Dexerity level is: " + dexterity + ".");
Console.WriteLine("Your current Intelligence level is: " + intelligence + ".");
Console.WriteLine("Your current experience amount is: " + xp + ".");
Console.WriteLine("Your overall level is: " + level + ".");
Console.WriteLine("Your max health is: " + pmhp + ".");
}
public static void enemy(int ehp, string aType, int xp, int level, int pmhp)
{
//Initial combat line
ehp = 100;

//Repeated attacks
while (ehp > 0)
{
//Options
Console.WriteLine(" ");
Console.WriteLine("The enemy has " + ehp + " health left");
Console.WriteLine("What would you like to do?");
Console.WriteLine("Attack");
Console.WriteLine("Defend");
Console.WriteLine("Mage");
aType = Console.ReadLine();
aType.ToLower();

switch (aType)
{
case "attack":
ehp -= 20;
break;
case "defend":
break;
case "mage":
ehp -= 30;
break;
default:
Console.WriteLine("This is not a correct option, please choose a correct option.");
break;
}
}
}
public static void levelcheck(int level, int xp, int pmhp)
{
//Long if-statement on level conditions
if (xp >= 50)
{
level = 2;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 100)
{
level = 3;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 150)
{
level = 4;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 200)
{
level = 5;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 250)
{
level = 6;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 300)
{
level = 7;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 350)
{
level = 8;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 300)
{
level = 9;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 400)
{
level = 10;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 450)
{
level = 11;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
else if (xp >= 500)
{
level = 12;
pmhp += 20;
Console.WriteLine("You have levelled up to level " + level + "!");
}
}
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.