提交 82a1bf09 编写于 作者: struct_cym's avatar struct_cym

Update game.cpp

上级 abd8386c
......@@ -102,17 +102,17 @@ int fang(string shengfen)
return 1;
}
int year = 0;
int a1 = (shengfen[6] - '0') * 1000;
int a2 = (shengfen[7] - '0') * 100;
int a3 = (shengfen[8] - '0') * 10;
int s4 = (shengfen[9] - '0') * 1;
year = a1 + a2 + a3 + s4;
cout << "你出生在:" << year << endl;
int len = 2021 - year;
cout << "你现在:" << len << endl;
if(len < 18)
{
return 0;
int a1 = (shengfen[6] - '0') * 1000;
int a2 = (shengfen[7] - '0') * 100;
int a3 = (shengfen[8] - '0') * 10;
int s4 = (shengfen[9] - '0') * 1;
year = a1 + a2 + a3 + s4;
cout << "你出生在:" << year << endl;
int len = 2021 - year;
cout << "你现在:" << len << endl;
if(len < 18)
{
return 0;
}
return 1;
}
......@@ -122,7 +122,7 @@ int main()
cin >> shengfen;
if(!fang(shengfen))
{
cout << "未成年人, 禁止进入" << endl;
cout << "未成年人, 禁止进入" << endl;
return 0;
}
start();
......@@ -280,9 +280,10 @@ void bag() //bug
{
for(int j=0; j<5; j++)
{
if(!flag_bag[i]){
cout<<bags[i].cnn<<":"<<bags[i].bag[j]<<" ";
}
if(!flag_bag[i])
{
cout<<bags[i].cnn<<":"<<bags[i].bag[j]<<" ";
}
}
cout<<endl;
}
......@@ -395,7 +396,9 @@ int main12()
skill_board();
system("cls");
main12();
}else{
}
else
{
main12();
}
}
......@@ -444,7 +447,8 @@ void lingdong()
return;
}
}
if(jineng[i]&&i==2){
if(jineng[i]&&i==2)
{
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
......@@ -463,9 +467,10 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==3){
if(jineng[i]&&i==3)
{
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
......@@ -484,9 +489,10 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==4){
if(jineng[i]&&i==4)
{
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
......@@ -505,9 +511,10 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==5){
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
......@@ -526,7 +533,7 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
int sum=0;
......@@ -568,7 +575,8 @@ void lingdong()
return;
}
}
if(jineng[i]&&i==2){
if(jineng[i]&&i==2)
{
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
......@@ -587,9 +595,10 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==3){
if(jineng[i]&&i==3)
{
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
......@@ -608,9 +617,10 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==4){
if(jineng[i]&&i==4)
{
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
......@@ -629,9 +639,10 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==5){
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
......@@ -650,9 +661,9 @@ void lingdong()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
}
int y2=shanghai(attack[grade]);
temb-=y2;
temb+=jianshang(temf);
......@@ -697,105 +708,114 @@ void lingdong()
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==2){
if(jineng[i]&&i==2)
{
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==3){
if(jineng[i]&&i==3)
{
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==4){
if(jineng[i]&&i==4)
{
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==5){
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
}
int sum=0;
while(true)
{
......@@ -822,105 +842,114 @@ void lingdong()
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==2){
if(jineng[i]&&i==2)
{
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==3){
if(jineng[i]&&i==3)
{
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==4){
if(jineng[i]&&i==4)
{
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==5){
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了碧水金睛兽一只";
cout<<",你获得了太古龙象一只"<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了碧水珠";
cout<<",你获得了 龙象牙"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
}
int y2=shanghai((int)attack[grade]);
temb-=y2+jianshang(temf);
cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
......@@ -1064,7 +1093,8 @@ void huo()
return;
}
}
if(jineng[i]&&i==2){
if(jineng[i]&&i==2)
{
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
......@@ -1083,9 +1113,10 @@ void huo()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==3){
if(jineng[i]&&i==3)
{
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
......@@ -1104,9 +1135,10 @@ void huo()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==4){
if(jineng[i]&&i==4)
{
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
......@@ -1125,9 +1157,10 @@ void huo()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==5){
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
......@@ -1146,9 +1179,9 @@ void huo()
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
}
int sum=0;
while(true)
{
......@@ -1168,112 +1201,116 @@ void huo()
for(int i=1; i<=5; i++)
{
if(jineng[i]&&i==1)
{
cout<<"火神术--"<<endl;
cout<<"焚毁!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
cout<<"火神术--"<<endl;
cout<<"焚毁!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了熔岩宝石";
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
{
cout<<",你获得了熔岩宝石";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==2){
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
if(jineng[i]&&i==2)
{
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了熔岩宝石";
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
{
cout<<",你获得了熔岩宝石";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==3){
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
}
if(jineng[i]&&i==3)
{
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了熔岩宝石";
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
{
cout<<",你获得了熔岩宝石";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==4){
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
}
if(jineng[i]&&i==4)
{
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了熔岩虫一只";
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
{
cout<<",你获得了熔岩宝石";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
else
}
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了熔岩宝石";
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
{
cout<<",你获得了熔岩宝石";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
if(jineng[i]&&i==5){
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了";
int n=rand()%20+1;
if(n==1)
{
cout<<",你获得了熔岩虫一只";
}
else
{
cout<<",你获得了熔岩宝石";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
int y2=shanghai((int)attack[grade]);
temb-=y2+jianshang(temf);
cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
......@@ -1304,278 +1341,286 @@ void huo()
double temf=1;
cout<<name<<"开始释放技能";
for(int i=1; i<=5; i++)
{
if(jineng[i]&&i==1)
{
if(jineng[i]&&i==1)
{
cout<<"火神术--"<<endl;
cout<<"焚毁!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"火神术--"<<endl;
cout<<"焚毁!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==2){
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
if(jineng[i]&&i==2)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
if(jineng[i]&&i==3){
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
}
if(jineng[i]&&i==3)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==4){
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
if(jineng[i]&&i==4)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
if(jineng[i]&&i==5){
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
}
if(jineng[i]&&i==5)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
while(true)
}
}
while(true)
{
int sum=0;
int y1=shanghai(x);
tema-=y1+jianshang((int)defense[grade]);
cout<<"熔岩地龙打出了"<<y1<<"点伤害"<<endl;
Sleep(1);
cout<<name<<"还剩"<<tema<<"滴血"<<endl;
Sleep(1);
if(tema<=0)
{
int sum=0;
int y1=shanghai(x);
tema-=y1+jianshang((int)defense[grade]);
cout<<"熔岩地龙打出了"<<y1<<"点伤害"<<endl;
Sleep(1);
cout<<name<<"还剩"<<tema<<"滴血"<<endl;
Sleep(1);
if(tema<=0)
{
cout<<"你落败了,等级-1"<<endl;
grade--;
return;
}
cout<<endl;
int y2=shanghai((int)attack[grade]);
temb-=y2+jianshang(temf);
for(int i=1; i<=5; i++)
{
if(jineng[i]&&i==1)
{
cout<<"火神术--"<<endl;
cout<<"焚毁!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
cout<<"你落败了,等级-1"<<endl;
grade--;
return;
}
cout<<endl;
int y2=shanghai((int)attack[grade]);
temb-=y2+jianshang(temf);
for(int i=1; i<=5; i++)
{
if(jineng[i]&&i==1)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"火神术--"<<endl;
cout<<"焚毁!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==2){
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
if(jineng[i]&&i==2)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
if(jineng[i]&&i==3){
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
}
if(jineng[i]&&i==3)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==4){
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
if(jineng[i]&&i==4)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
if(jineng[i]&&i==5){
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
}
if(jineng[i]&&i==5)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<",你获得了 熔炎宝石"<<endl;
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
Sleep(1);
cout<<"熔岩地龙还剩"<<temb<<"滴血"<<endl;
Sleep(1);
sum++;
if(temb<=0)
}
cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
Sleep(1);
cout<<"熔岩地龙还剩"<<temb<<"滴血"<<endl;
Sleep(1);
sum++;
if(temb<=0)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<"你赢了"<<endl;
int n=rand()%10+1;
if(n==1)
{
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
cout<<",你获得了 地龙之心 "<<endl;
//加坐骑的属性
}
else
{
cout<<",你获得了 熔炎宝石"<<endl;
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
}
}
void bin()
......@@ -1739,66 +1784,70 @@ void shu()
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==2){
if(jineng[i]&&i==2)
{
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==3){
if(jineng[i]&&i==3)
{
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==4){
if(jineng[i]&&i==4)
{
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==5){
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
int sum=0;
while(true)
{
......@@ -1824,66 +1873,70 @@ void shu()
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==2){
if(jineng[i]&&i==2)
{
cout<<"木神术--"<<endl;
cout<<"千手顶上化佛!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==3){
if(jineng[i]&&i==3)
{
cout<<"水神术--"<<endl;
cout<<"水乱波!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==4){
if(jineng[i]&&i==4)
{
cout<<"土神术--"<<endl;
cout<<"土淹!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i==5){
if(jineng[i]&&i==5)
{
cout<<"金神术--"<<endl;
cout<<"金光剑!"<<endl;
temb-=5*10+attack[grade];
cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
if(temb<=0)
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
{
cout<<"你赢了"<<endl;
cout<<"你获得了 树魔心";
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
}
int y2=shanghai((int)attack[grade]);
temb-=y2+jianshang(temf);
cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册