#include
#include
#include
#define s Sleep(800)
using namespace std;
int my_i=20,my_j=21;
int m_c_i=13,m_c_j=76;
int treasure_i=9,treasure_j=67;
int P_t_i=29,P_t_j=88;
int pyramid_i=22,pyramid_j=76,pyramid_k=1;
int School_i=50,School_j=1;
int line1=43,line2=35,line3=27,line4=19,line5=11,line6=3;
bool OK1,OK2,OK3,OK4,OK5,OK6;
char mapp[100][100]={
" ============================================== ------------------------- ",
"| | || |",
"| | || |",
"| | || |",
"| | || |",
"| cave | || |",
"| || |",
"| | || |",
"| | || |",
"|--------------- || |",
"| || |",
"| || |",
"| || |",
"| || |",
"| || |",
"| ||w:up |",
"| ||a:left |",
"| ||s:down |",
"| ||d:right |",
"| || |",
"| || |",
" ============================================== ------------------------- "
};
char cave[100][100]={
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^> ",
"Exit |",
"|---------------------------- ----------------- ------------------------- |",
"|-------------------------- | - ||----------------------| |",
"| | | | | | || | |",
"| ----------------------- | | | | | || |------------------| | |",
"| | | | | | | || |------------------| | |",
"| | -------------- | | | | || | | | |",
"| | | | | | || | |--------------- | | |",
"| ---------- ----------- -----| | | | || | | | | | | ",
"| | ------------- | | | | |-|| | | -------------| | | | ",
"| | | | | | |-------- ------------- | | | | | ",
"| | |----------- | | | | | -----------------| | | ",
"| |-------------- | |-| |-| |------ --------------| | ",
"| | | | | | |--------------------------",
"| |------------ | |---|-|---| | | |---------- | ",
"| | | |------------------| | | |--------------------- | ",
"| | | | | | | |------ | | ",
"| |-----------| | ----------| |----| | | | |----------------------| | ",
"| | | | |----| | | -----------------------------| | ",
"|---------------| | | | | ",
"|*:treasure | -----------------|-|-------------------------------------| ",
"| | | ",
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>| ",
};
char pyramid[100][100][100]={
{
"------------------------------------------------------------------------------------------",
"|up |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"------------------------------------------------------------------------------------------",
},
{
"------------------------------------------------------------------------------",
"|up |",
"|down |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"------------------------------------------------------------------------------",
},
{
"---------------------------------------------------------------------",
"|down |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"---------------------------------------------------------------------",
},
};
char school[1000][100]={
"----------------------------------------------------",
"| |",
"| |",
"|-------------- |",
"| | |",
"| | |",
"|Class 1 | |",
"|Senior 3 | |",
"| | |",
"| |",
"|-------------- |",
"| --------------",
"| | |",
"| | |",
"| | Class 1|",
"| | Senior 2|",
"| | |",
"| |",
"| --------------",
"|-------------- |",
"| | |",
"| | |",
"|Class 1 | |",
"|Senior 1 | |",
"| | |",
"| |",
"|-------------- |",
"| --------------",
"| | |",
"| | |",
"| | Class 1|",
"| | Junior 3|",
"| | |",
"| |",
"| --------------",
"|-------------- |",
"| | |",
"| | |",
"|Class 1 | |",
"|Junior 2 | |",
"| | |",
"| |",
"|-------------- |",
"| --------------",
"| | |",
"| | |",
"| | Class 1|",
"| | Junior 1|",
"| | |",
"| |",
"| --------------",
"----------------------------------------------------",
};
void Mercury_forced_landing();
void Adventure();
void Pyramid();
void to_continue()
{
string be_continue;
be_continue=getch();
system("cls");
}
void operation()
{
string ope;
ope=getch();
if((ope=="w"||ope=="W")&&my_i>1&&mapp[my_i-1][my_j]!='-'&&mapp[my_i-1][my_j]!='|')
{
my_i--;
}
if((ope=="a"||ope=="A")&&my_j>1&&mapp[my_i][my_j-1]!='-'&&mapp[my_i][my_j-1]!='|')
{
my_j--;
}
if((ope=="s"||ope=="S")&&my_i<20&&mapp[my_i+1][my_j]!='-'&&mapp[my_i+1][my_j]!='|')
{
my_i++;
}
if((ope=="d"||ope=="D")&&my_j<46&&mapp[my_i][my_j+1]!='-'&&mapp[my_i][my_j+1]!='|')
{
my_j++;
}
}
void operation_cave()
{
string ope;
ope=getch();
if((ope=="w"||ope=="W")&&m_c_i>1&&cave[m_c_i-1][m_c_j]!='-'&&cave[m_c_i-1][m_c_j]!='|')
{
m_c_i--;
}
if((ope=="a"||ope=="A")&&m_c_j>1&&cave[m_c_i][m_c_j-1]!='-'&&cave[m_c_i][m_c_j-1]!='|')
{
m_c_j--;
}
if((ope=="s"||ope=="S")&&m_c_i<22&&cave[m_c_i+1][m_c_j]!='-'&&cave[m_c_i+1][m_c_j]!='|')
{
m_c_i++;
}
if((ope=="d"||ope=="D")&&m_c_j<75&&cave[m_c_i][m_c_j+1]!='-'&&cave[m_c_i][m_c_j+1]!='|')
{
m_c_j++;
}
}
void operation_pyramid()
{
string ope;
ope=getch();
if((ope=="w"||ope=="W")&&pyramid_i>1)
{
pyramid_i--;
}
if((ope=="a"||ope=="A")&&pyramid_j>1)
{
pyramid_j--;
}
int temp_i,temp_j;
if(pyramid_k==0)
{
temp_i=29;
temp_j=88;
}
else if(pyramid_k==1)
{
temp_i=22;
temp_j=76;
}
else
{
temp_i=17;
temp_j=67;
}
if((ope=="s"||ope=="S")&&pyramid_i
pyramid_i++;
}
if((ope=="d"||ope=="D")&&pyramid_j
pyramid_j++;
}
}
void operation_School()
{
string ope;
ope=getch();
if((ope=="w"||ope=="W")&&School_i>1&&school[School_i-1][School_j]!='-'&&school[School_i-1][School_j]!='|'&&(School_i-1!=line1||OK1==true)&&(School_i-1!=line2||OK2==true)&&(School_i-1!=line3||OK3==true)&&(School_i-1!=line4||OK4==true)&&(School_i-1!=line5||OK5==true)&&(School_i-1!=line6||OK6==true))
{
School_i--;
}
if((ope=="a"||ope=="A")&&School_j>1&&school[School_i][School_j-1]!='-'&&school[School_i][School_j-1]!='|')
{
School_j--;
}
if((ope=="s"||ope=="S")&&School_i<50&&school[School_i+1][School_j]!='-'&&school[School_i+1][School_j]!='|')
{
School_i++;
}
if((ope=="d"||ope=="D")&&School_j<50&&school[School_i][School_j+1]!='-'&&school[School_i][School_j+1]!='|')
{
School_j++;
}
}
void print(char map[100][100])
{
for(int i=0;i<22;i++)
{
for(int j=0;j<76;j++)
{
if(i==my_i&&j==my_j)
{
cout<<0;
}
else
{
cout<
}
cout<
}
void print_cave(char cave[100][100])
{
for(int i=0;i<24;i++)
{
for(int j=0;j<78;j++)
{
if(i==m_c_i&&j==m_c_j)
{
cout<<0;
}
else if(i==treasure_i&&j==treasure_j)
{
cout<<"*";
}
else
{
cout<
}
cout<
cout<<"Your coordinate:("<
void print_pyramid(char pyramid[100][100][100])
{
if(pyramid_k==0)
{
for(int i=0;i<31;i++)
{
for(int j=0;j<90;j++)
{
if(i==P_t_i&&j==P_t_j)
{
cout<<"*";
}
else if(i==pyramid_i&&j==pyramid_j)
{
cout<<0;
}
else
{
cout<
if(pyramid_i==1&&pyramid_j==1)
{
pyramid_k=1;
}
}
cout<
}
else if(pyramid_k==1)
{
for(int i=0;i<24;i++)
{
for(int j=0;j<78;j++)
{
if(i==pyramid_i&&j==pyramid_j)
{
cout<<0;
}
else
{
cout<
if(pyramid_i==1&&pyramid_j==1)
{
pyramid_k=2;
}
if(pyramid_i==2&&pyramid_j==1)
{
pyramid_k=0;
}
}
cout<
}
else
{
for(int i=0;i<19;i++)
{
for(int j=0;j<69;j++)
{
if(i==pyramid_i&&j==pyramid_j)
{
cout<<0;
}
else
{
cout<
if(pyramid_i==1&&pyramid_j==1)
{
pyramid_k=1;
}
}
cout<
}
cout<<"Your coordinate:("<
void print_School(char school[1000][100])
{
for(int i=0;i<52;i++)
{
for(int j=0;j<52;j++)
{
if(i==School_i&&j==School_j)
{
printf("0");
}
else
{
printf("%c",school[i][j]);
}
if(OK1==false&&i==line1)
{
for(int p=0;p<52;p++)
{
cout<<"-";
}
break;
}
if(OK2==false&&i==line2)
{
for(int p=0;p<52;p++)
{
cout<<"-";
}
break;
}
if(OK3==false&&i==line3)
{
for(int p=0;p<52;p++)
{
cout<<"-";
}
break;
}
if(OK4==false&&i==line4)
{
for(int p=0;p<52;p++)
{
cout<<"-";
}
break;
}
if(OK5==false&&i==line5)
{
for(int p=0;p<52;p++)
{
cout<<"-";
}
break;
}
if(OK6==false&&i==line6)
{
for(int p=0;p<52;p++)
{
cout<<"-";
}
break;
}
if(School_i==49&&School_j==38)
{
system("cls");
Sleep(4000);
OK1=true;
School_j--;
}
if(School_i==41&&School_j==14)
{
system("cls");
Sleep(4000);
OK2=true;
School_j++;
}
if(School_i==33&&School_j==38)
{
system("cls");
Sleep(4000);
OK3=true;
School_j--;
}
if(School_i==25&&School_j==14)
{
system("cls");
Sleep(4000);
OK4=true;
School_j++;
}
if(School_i==17&&School_j==38)
{
system("cls");
Sleep(4000);
OK5=true;
School_j--;
}
if(School_i==9&&School_j==14)
{
system("cls");
Sleep(4000);
OK6=true;
School_j++;
}
}
cout<
cout<<"Your coordinate:("<
void Game_background()
{
cout<<" You live in Mercury and everything is so beautiful.But one day······BOOM!!! The Mercury made a forced landing."<
cout<<" When you open your eyes,you crossed!Now you have two choices."<
cout<<" 1、Go back to the crashed Mercury and there will be appear some Lucky Square(NOT OPEN)."<
}
void Choose()
{
string choose;
choose=getch();
cout<
if(choose=="1")
{
Mercury_forced_landing();
}
if(choose=="2")
{
Adventure();
}
}
void Die()
{
system("cls");
cout<<"YOU DIE!!!!!!!!!!"<
cout<<"I told you THINK······";
exit(1);
}
void DIE()
{
system("cls");
cout<<"You go through a long long long slide."<
system("cls");
cout<<"Oh,no!It's Hell·Vanishing Shadow!The king of devil."<
choose=getch();
if(choose=="1")
{
int HP=100,ATK=10;
int E_HP=10000,E_ATK=1000;
while(HP>0&&E_HP>0)
{
system("cls");
cout<<"(Your Turn):"<
if(Crit<20)
{
cout<<"CRIT!!!"<
}
else
{
cout<<"Cause "< E_HP-=ATK;
}
cout<<"Hell·Vanishing Shadow has "<
{
break;
}
Sleep(1500);
cout<<"(Enemy's turn):"<
if(Crit<60)
{
cout<<"CRIT!!!"<
}
else
{
cout<<"Cause "<
}
cout<<"You have "<
}
if(HP<=0)
{
Die();
}
else
{
cout<<"You have killed Hell·Vanishing Shadow."<
int Crazy_HP=100000,Crazy_ATK=10000;
while(HP>0&&Crazy_HP>0)
{
system("cls");
cout<<"(Your Turn):"<
if(Crit<20)
{
cout<<"CRIT!!!"<
}
else
{
cout<<"Cause "< Crazy_HP-=ATK;
}
cout<<"Crazy·Vanishing Shadow has "<
{
break;
}
Sleep(1500);
cout<<"(Enemy's turn):"<
if(Crit<60)
{
cout<<"CRIT!!!"<
}
else
{
cout<<"Cause "<
}
cout<<"You have "<
}
if(HP<=0)
{
Die();
}
else
{
cout<<"YOU WIN!";
exit(1);
}
}
}
else
{
Die();
}
}
bool Judge_cave()
{
if(my_i==6&&my_j==17)
{
return true;
}
return false;
}
bool Judge_treasure()
{
if(m_c_i==treasure_i&&m_c_j==treasure_j)
{
return true;
}
return false;
}
bool Judge_treasure_Pyramid()
{
if(pyramid_i==P_t_i&&pyramid_j==P_t_j&&pyramid_k==0)
{
return true;
}
return false;
}
bool Judge_Exit()
{
if(m_c_i==22&&m_c_j==75)
{
return true;
}
return false;
}
bool Judge_Exit_Pyramid()
{
if(pyramid_i==10&&pyramid_j==1&&pyramid_k==2)
{
return true;
}
return false;
}
bool Judge_die()
{
if(m_c_i==1&&m_c_j==1)
{
return true;
}
return false;
}
void The_Lost_Tomb_Cave()
{
string Page[20]={"one","two","three","four","five","six","seven","eight","nine","ten"};
int page=0;
while(1)
{
system("cls");
cout<<"Note:"<
{
cout<<" The Lost Tomb·Cave Ruins"<
cout<<" During the Warring States Period,many soldiers came to this cave.They lost,after three years ,local people came and found their bones."<
cout<<"After a year some brave hunters came to this cave.They lost,they die,the bones.One year later,lost,die,bones,the same time.Again and again······"<
cout<<" In the Qing Dynasty,no one wants to try.Soon the cave was faded······"<
else if(page==9)
{
cout<<"2275······"<
else
{
cout<
cout<<" "<
get=getch();
cout<
{
break;
}
if(get=="a")
{
if(page>0)
{
page--;
}
}
else
{
if(page<9)
{
page++;
}
}
}
}
void The_Lost_Tomb_Pyramid()
{
string Page[30]={"one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"};
int page=0;
while(1)
{
system("cls");
cout<<"Note:"<
{
cout<<" The Lost Tomb·Pyramid Temple"<
cout<<" Horu,the patron saint of the Pharaoh in ancient Egyptian mythology and the symbol of kingship and the God of revenge."<
cout<<" '`A νουβιs,the death of the Egypt.He alone plunged the whole ancient Egypt into chaos."<
cout<<" Horu use one hundred years subdued '`A νουβιs and take him to this Pyramid.But After that battle Horu was weak.He died."<
cout<<"But after a year,when the local people came to the Pyramid,he became very frightend,and he was dead.'`A νουβιs was gone······"<
if(page==9)
{
cout<<"!"<
if(page==11)
{
cout<<"!,!"<
if(page!=0&&page!=9&&page!=11)
{
cout<
cout<<" "<
get=getch();
cout<
{
break;
}
if(get=="a")
{
if(page>0)
{
page--;
}
}
else
{
if(page<19)
{
page++;
}
}
}
}
void The_Lost_Tomb_School()
{
string Page[30]={"one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"};
int page=0;
while(1)
{
system("cls");
cout<<"Note:"<
{
cout<<" The Lost Tomb·Thrill School"<
cout<<" During the school time,Buddy has split personality.He has double personalities.The fisrt personality is kind.He used it at school.But the second personality is tyrant."<
cout<<"Buddy was so hard to control his second personality that he took medicine to control it.But,I terrible day came:"<
cout<<"School bully took his madicine,a nightmare day came······"<
cout<<" He began to be crazy,and the second personality began······"<
cout<<" One year later this school change into Lunatic asylum.And This 'school' has also become a 'paradise' for";
Sleep(7000);
cout<<"——Buddy······"<
}
else
{
cout<
cout<<" "<
get=getch();
cout<
{
break;
}
if(get=="a")
{
if(page>0)
{
page--;
}
}
else
{
if(page<0)
{
page++;
}
}
}
}
void School()
{
system("cls");
bool flag=false;
while(flag==false)
{
print_School(school);
operation_School();
/*
if(Judge_treasure_Pyramid()==true)
{
The_Lost_Tomb_Pyramid();
P_t_i=1000;
P_t_j=1000;
}
if(Judge_Exit_Pyramid()==true)
{
pass_Pyramid();
}
*/
system("cls");
}
}
void Pyramid()
{
system("cls");
bool flag=false;
while(flag==false)
{
print_pyramid(pyramid);
operation_pyramid();
if(Judge_treasure_Pyramid()==true)
{
The_Lost_Tomb_Pyramid();
P_t_i=1000;
P_t_j=1000;
}
if(Judge_Exit_Pyramid()==true)
{
School();
flag=true;
}
system("cls");
}
}
void Cave()
{
bool flag=false;
while(flag==false)
{
print_cave(cave);
operation_cave();
if(Judge_treasure()==true)
{
The_Lost_Tomb_Cave();
treasure_i=1000;
treasure_j=1000;
}
if(Judge_Exit()==true)
{
Pyramid();
flag=true;
}
if(Judge_die()==true)
{
DIE();
}
system("cls");
}
}
void Mercury_forced_landing()
{
}
void Adventure()
{
while(1)
{
print(mapp);
operation();
system("cls");
if(Judge_cave()==true)
{
Cave();
}
}
}
int main()
{
// Sleep(3000);
// Game_background();
Choose();
// School();
// The_Lost_Tomb_School();
return 0;
}
//Cave Ruin->maze , Pyramid Temple->three-dimensional , School->many area , City Ruin->big , Adjust Level->easy , Shadow Of The Nether World->vision , Fearless Goast->map switch.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)