can someone help me with this - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

can someone help me with this

}#include
#include
#include

using namespace std;
int PlayerLVL=1;
int PlayerHP=100*PlayerLVL;
int PlayerDamage=PlayerLVL*3+10;
int GoblinHP=50;
int GoblinDamage=10;
int end=0;
void play();
void Death();
int sel;
int dead=0;
int act=0;

int main()
{
while(end==0)
{
cout<<"

THE ALLAERTS RPG";
cout<<"

By Christiaan Rakowski";
dead=0;
act=0;
cout<<"

1 to play or 2 to quit: ";
cin>>sel;
if(sel==1)
{
play();
}
if(sel==2)
{
end=1;
}
}
return 0;
}
int action;
int combat;

void play()
{
while(dead==0)
{
int PlayerHP=100*PlayerLVL;
int PlayerDamage=PlayerLVL*3+10;
cout << "
1-train, More funtions later:";
cin >> action;
switch(action)
{
case 1: //Train
{
while(act==0)
{
cout<<"
You encounter a goblin!";
cout<<"
Health:"<<PlayerHP<<" Goblin Health:"<<GoblinHP;
cout<<"
1-melee,2-magic,3-range,4-newtonpower: ";
cin>>combat;
if(combat==1)//Melee
{
cout<<"
You hit the goblin with your PHYSICS BOOK";
cout<<"
The goblin doesn't look too happy";
GoblinHP-=PlayerDamage;
}
if(combat==2)//Magic
{
cout<<"
You hit the goblin with your SINUS BEAM";
cout<<"
The goblin looks confused by your calculations";
GoblinHP-=PlayerDamage;
}
if(combat==3)//Range
{
cout<<"
You throw your GEO TRIANGLE at the goblin";
cout<<"
The goblin now has a GEO TRIANGLE sticking out his forehead";
GoblinHP-=PlayerDamage;
}
if(combat==4)//Newton Power
{
cout<<"
You cast Newton Power at the goblin!!";
cout<<"
A giant apple hits the goblin!!";
GoblinHP-=PlayerDamage;
}
if(combat==9)//NUKE, CHEAT
{
cout<<"
You found an easter egg!!";
cout<<"
You drop a nuke on the goblin!!";
cout<<"
The goblin sh*ts his pants!!";
GoblinHP=0;
}

if(PlayerHP<=0)
{
cout<<"
YOU DIED!!";
dead=1;
act=1;
}
if(GoblinHP<=0)
{
cout<<"
YOU WIN!!";
PlayerLVL++;
GoblinHP=50;
cout<<"
You leveled up, new LVL is: "<< PlayerLVL;
dead=1;
act=1;
}

cout<<"
The goblin attacks you!!";
cout<<"
He hits you with his stick!!";
PlayerHP-=GoblinDamage;

if(PlayerHP<=0)
{
cout<<"
YOU DIED!!";
PlayerLVL=1;
dead=1;
act=1;
}
if(GoblinHP<=0)
{
cout<<"
YOU WIN!!";
PlayerLVL++;
GoblinHP=50;
cout<<"
You leveled up, new LVL is: "<< PlayerLVL;
dead=1;
act=1;
}

cout<<"
Health:"<<PlayerHP<<" Goblin Health:"<<GoblinHP;
}
}
}
}
}

Comments

Sign In or Register to comment.