Namespace League of Legends battle
{
Class Program
{
struct player
{
public string name;
public int hp;
public int GJ;
public int fy;
public int DJ;
Public Jn Jineng;
Public WG W;
}
struct JN
{
public string q;
public string W;
public string E;
public string R;
}
struct WG
//{
public string name;
public int ATK;
//}
static void Main (string[] args)
{
//wg[] wg1=new wg[4];
Wg1[0].name = "Oops Hello ... ";
WG1[0].ATK = 100;
Player A = new player ();
Player B = new player ();
Console.WriteLine ("Please enter the first hero's name:");
A.name = Console.ReadLine ();
Console.WriteLine ("Please enter a second hero's name:");
B.name = Console.ReadLine ();
Random R =new Random ();
A.HP = R.next (1, 100) + 5000;
A.GJ = R.next (1, 100) +100;
A.fy = R.next (1, 100);
A.DJ = R.next (6, 18);
A.JINENG.Q = "Big Jade spiral pill";
A.JINENG.W = "multiple shadow ubiquitous";
A.JINENG.E = "Wind Dun: the sword in the spiral hand";
A.JINENG.R = "Six-way Mode";
B.HP = R.next (1, 100) + 5000;
B.GJ = R.next (1, 100) + 100;
B.fy = R.next (1, 100);
B.DJ = R.next (6, 18);
B.JINENG.Q = "Fire escape: Hao fireball of the technique";
B.JINENG.W = "Thousand Birds";
B.JINENG.E = "Day Photo";
B.JINENG.R = "unicorn";
Console.WriteLine ("Player 1 Hero:" +a.name+ "\ t-qi:" +a.hp+ "\ T attack" +a.gj+ "\ T Defense:" +a.fy+ "\ T level:" +A.DJ ";
Console.WriteLine ("Skill used:" + "Q:" +a.jineng.q+ "\TW:" +a.jineng.w+ "\te:" +a.jineng.e+ "\TR:" +A.JINENG.R ");
Console.WriteLine ("Player 2 hero:" + b.name + "\ t blood:" + b.hp + "\ t attack" + B.GJ + "\ T Defense:" + b.fy + "\ t level:" + B.DJ);
Console.WriteLine ("Skill used:" + "Q:" + b.jineng.q + "\TW:" + B.JINENG.W + "\te:" + b.jineng.e + "\TR:" + B.JINENG.R);
Console.WriteLine ("Press any key to start the game");
Console.readkey ();
while (true)
{
if (a.hp <= 0 && b.hp <= 0)
{
Console.WriteLine ("Draw");
Break
}
else if (a.hp<=0)
{
Console.WriteLine (b.name+ "Win");
Break
}
else if (b.hp <= 0)
{
Console.WriteLine (A.name + "Win");
Break
}
Else
{
Random m=new random ();
//Player A attacks player B
if (M.next (1,10) >7)//Over 7 use of big strokes
{
Console.foregroundcolor = Consolecolor.green;
Console.WriteLine ("Player" +a.name+ "use great skill" +A.JINENG.R);
B.HP = B.hp-r.next (300, 400);
}
else if (M.next (1,10) >5&&m.next (1,10) <=7)
{
Console.foregroundcolor = Consolecolor.gray;
Console.WriteLine ("Player" +a.name+ "use small skill" +a.jineng.q);
B.HP = B.hp-r.next (50, 100);
}
else if (M.next (1, ten) > 3 && m.next (1, ten) <= 5)
{
Console.foregroundcolor = Consolecolor.gray;
Console.WriteLine ("Player" + a.name + "Use small skill" + A.JINENG.W);
B.HP = B.hp-r.next (50, 150);
}
Else
{
Console.foregroundcolor = Consolecolor.gray;
Console.WriteLine ("Player" + a.name + "Use small skill" + a.jineng.e);
B.HP = B.hp-r.next (100, 200);
}
if (B.HP < 0)
{
B.HP = 0;
}
Console.foregroundcolor = consolecolor.red;
Console.WriteLine ("Player" + b.name + "qi and Blood Surplus for:" + b.hp);
//Player B attacks player a
if (M.next (1, ten) > 7)//Over 7 use of big strokes
{
Console.foregroundcolor = Consolecolor.green;
Console.WriteLine ("Player" + b.name + "use big skill" + B.JINENG.R);
A.HP = A.hp-r.next (300, 400);
}
else if (M.next (1, ten) > 5 && m.next (1, ten) <= 7)
{
Console.foregroundcolor = Consolecolor.gray;
Console.WriteLine ("Player" + b.name + "Use small skill" + b.jineng.q);
A.HP =a.hp-r.next (50, 100);
}
else if (M.next (1, ten) > 3 && m.next (1, ten) <= 5)
{
Console.foregroundcolor = Consolecolor.gray;
Console.WriteLine ("Player" + b.name + "Use small skill" + B.JINENG.W);
A.HP = A.hp-r.next (50, 150);
}
Else
{
Console.foregroundcolor = Consolecolor.gray;
Console.WriteLine ("Player" + b.name + "Use small skill" + b.jineng.e);
A.HP = A.hp-r.next (100, 200);
}
if (A.HP < 0)
{
A.HP = 0;
}
Console.foregroundcolor = Consolecolor.yellow;
Console.WriteLine ("Player" + A.name + "qi and Blood Surplus for:" + a.hp);
Thread.Sleep (800);
}
Console.WriteLine ();
Curly braces for}//while
Console.ReadLine ();
}
}
}
League of Legends Battle