Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DELUXEHUNTER authored Feb 6, 2024
1 parent 5aaff49 commit cd6bf21
Show file tree
Hide file tree
Showing 3 changed files with 490 additions and 179 deletions.
307 changes: 306 additions & 1 deletion Lore.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,309 @@ Neoa is a massive kingdom, in the realm of **[PLACEHOLDER2]**, filled with creat



#### NEOA
#### NEOA



//Ignore
/*
OWNER:
DEACON HUNTER

CONTRIBUTERS:
DEACON HUNTER


DATE CREATED:
FEBRUARY 1ST 2024

INDIRECT CONTRIBUTERS:
1. TUTORIAL USED


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

using System.Runtime.Serialization.Formatters.Binary;

namespace Neoa
{
public class Program
{
public static Player CNAME = new Player();
static void Main(string[] args)
{
if(!Directory.Exists("saves"))
{
Directory.CreateDirectory("saves")
}
Console.ForegroundColor = ConsoleColor.Red;


Encounters.FirstEncounter();

}
static void Start()
{
WriteLine("NEOA");
WriteLine("Enter your name.");
string CNAME = Console.ReadLine();
Console.Clear();
WriteLine("You awake in a dark cell, with no memory of anything from your past..");
if (CNAME == "")
WriteLine("Not even your name..");
else
WriteLine("The only thing you remember is your name " + CNAME);
Console.ReadKey();
WriteLine("The knob on the door begins to turn.. a guard walks through the door");
WriteLine("he pulls you up and tells you to follow him.");
WriteLine("\""+CNAME+"you've got a friend in a high place, the king has ordered your release\"" ) ;
WriteLine("the prison guard ");
}
public static void WriteLine(string text, int speed = 60)
{
foreach (char c in text)
{
Console.Write(c);
System.Threading.Thread.Sleep(98);
}
Console.WriteLine();
}



//Program Class end
}








class Encounters
{
static Random rand = new Random();
//Encounters
public static void FirstEncounter()
{
WriteLine("Rahhh");
Console.ReadKey();
Combat(false, "Prisoner",2,5);

}
public static void BasicFightEncounter()
{
WriteLine("Hi");
Console.ReadKey();
Combat(true, "",0,0);

}


//Encounter Tools
public static void RandomEncounter()
{
switch(rand.Next(0,2))
{
case 0:
BasicFightEncounter();
break;


}
}
public static void Combat(bool random, string name, int power, int health )
{
string n = "";
int p = 0;
int h = 0;
if (random)
{
n = GetName();
p = Program.CNAME.GetPower();
h = Program.CNAME.GetHealth();

}
else
{
n = name;
p = power;
h = health;
}
while (h > 0)
{
Console.Clear();
Console.WriteLine(n);
Console.WriteLine("Health: "+h);
Console.WriteLine("Strength: "+p);
Console.WriteLine("======================");
Console.WriteLine("| (A)ttack (D)efend |");
Console.WriteLine("| (R)un (H)eal |");
Console.WriteLine("======================");
Console.WriteLine(" Potions: "+Program.CNAME.potion+" Health: "+Program.CNAME.health);
string input = Console.ReadLine();
if(input.ToLower() == "a" || input.ToLower() == "attack")
{
//Attack
WriteLine("A quick thrust towards the "+n+" as you thrust the "+n+" strikes you");
int damage = p - Program.CNAME.armorValue;
if (damage < 0)
damage = 0;
int attack = rand.Next(0, Program.CNAME.weaponValue) + rand.Next(1,4);
WriteLine("You lose "+ damage + "health and deal "+attack+" damage");
Program.CNAME.health -= damage;
h -= attack;
}
else if(input.ToLower() == "d" || input.ToLower() == "defend")
{
//Defend
WriteLine("As the "+n+" prepares to strike, you ready your sword in a defensive stane");
int damage = (p/4) - Program.CNAME.armorValue;
if (damage < 0)
damage = 0;
int attack = rand.Next(0, Program.CNAME.weaponValue)/2;
WriteLine("You lose "+ damage + "health and deal "+attack+" damage");
Program.CNAME.health -= damage;
h -= attack;
}
else if(input.ToLower() == "r" || input.ToLower() == "run")
{
//Run
if(rand.Next(0,2) == 0)
{
WriteLine("As you sprint away the "+n+" strikes you in the back, sending you sprawling");
int damage = p - Program.CNAME.armorValue;
if (damage < 0)
damage = 0;
WriteLine("You lose "+damage+" health and are unable to escape.");
Console.ReadKey();
}
else
{
WriteLine("You use your agility to escape from the "+n+" and you successfullY escape!");
Console.ReadKey();
//Go to store

}
}
else if(input.ToLower() == "h" || input.ToLower() == "Heal")
{
//Heal
WriteLine("");
if (Program.CNAME.potion==0)
{
WriteLine("You deprately grasp for a potion in your bag but all you can feel are empty flasks");
int damage = p - Program.CNAME.armorValue;
if (damage < 0)
damage = 0;
WriteLine("The "+n+" stikes you with a sword and you lose "+damage+" health!");
}
else
{
WriteLine("You reach into your bag and drink the liquid in the vial");
int potionV = 5;
WriteLine("You gain "+ potionV + " health");
Program.CNAME.health += potionV;

}
Console.ReadKey();
}
if (Program.CNAME.health<0)
{
//Death
WriteLine("As the "+n+" stands high it "+n+" has slain you");
Console.ReadKey();
}
Console.ReadKey();

}
int c = rand.Next(1,15);
Console.WriteLine("You stand victorious over "+n+" and gain "+c+" Neoan Marks");
Program.CNAME.NeoanMarks +=c;
Console.ReadKey();
}

public static string GetName()
{
switch (rand.Next(0, 4))
{
case 0:
return "Keeper";
case 1:
return "Guardian";
case 2:
return "Human Cultist";
}
return "Escaped Prisoner";

}
public static void WriteLine(string text, int speed = 60)
{
foreach (char c in text)
{
Console.Write(c);
System.Threading.Thread.Sleep(98);
}
Console.WriteLine();
}

//Encounter Class end
}


//Player
[Serializable]
public class Player
{
Random rand;

public string CNAME;
public int NeoanMarks = 0;
//Neoan marks are coins
public int health = 10;
public int damage = 1;
public int armorValue = 0;
public int potion = 5;
public int weaponValue = 1;

public int mods = 0;

public int GetHealth()
{
int upper = (2 * mods + 7);
int lower = (mods + 2);
return rand.Next(lower,upper);

}
public int GetPower()
{
int upper = (2 * mods + 2);
int lower = (mods + 2);
return rand.Next(lower,upper);

}
//Player class End
}





//Namespace-End
}

Loading

0 comments on commit cd6bf21

Please sign in to comment.