修仙小游戏 1.0
yanziwei88 · · 休闲·娱乐
请看准正版
#include <bits/stdc++.h>
using namespace std;
int jnn[19];
int cnt=1,ran=0;
string name;
int money1=100;
int money2=0;
int a=0,b=0;
int c=0,d=0;
bool s=0,xx=0,bj=0,jia=0,jia1=0;
int tl=10;
int cen=0;
int i11=1;
struct cww{
string nm;
int j,x,jy=0,cjn;
int ccnt=1;
}cw[1009];
int hh[1009];
bool zhan(int x,int y){
bool hb=1;
bool df=1;
int b1=b,cs=3+cnt/1000;
for(int i=1;i<=i11;i++){
hh[i]=cw[i].x;
}
while(1){
if(y<=0)return 1;
if(b1<=0)return 0;
cout<<"你 攻击:"<<a<<"血量:"<<b1<<endl;
cout<<"敌方 攻击:"<<x<<"血量:"<<y<<endl;
cout<<"(1)攻击"<<endl;
if(jnn[1]==1){
cout<<"(2)横扫千军"<<endl;
}
if(jnn[2]==1){
cout<<"(3)回血"<<endl;
}
if(jnn[3]==1){
cout<<"(4)肘击"<<endl;
}
if(jnn[4]==1){
cout<<"(5)寒冰尖刺"<<endl;
}
if(jnn[5]==1){
cout<<"(6)激光炮"<<endl;
}
if(jnn[6]==1){
cout<<"(7)打狗棒法"<<endl;
}
if(jnn[7]==1){
cout<<"(8)火焰之力"<<endl;
}
if(jnn[8]==1){
cout<<"(9)水之力"<<endl;
}
if(jnn[9]==1&&cs!=0){
cout<<"(10)创世之力"<<endl;
}
if(jnn[10]==1){
cout<<"(11)天荒"<<endl;
}
if(jnn[14]==1){
cout<<"(15)天龙掌"<<endl;
}
if(jnn[11]==1){
cout<<"(12)天地拳"<<endl;
}
if(jnn[12]==1){
cout<<"(13)火日飞踢"<<endl;
}
if(jnn[13]==1){
cout<<"(14)炎黄之掌"<<endl;
}
int f;
cin>>f;
if(f==1){
cout<<"你攻击了他 "<<a<<"滴血"<<endl;
y-=a;
hb=1;
df=1;
}
if(f==2&&jnn[1]==1){
cout<<"你用横扫千军攻击了他 "<<2*a<<"滴血"<<endl;
hb=1;
y-=a*2;
df=1;
}
if(f==3&&jnn[2]==1){
cout<<"你回了"<<b/3<<"滴血"<<endl;
hb=1;
b1+=b/3;
df=1;
}
if(f==4&&jnn[3]==1){
cout<<"你肘击了他 "<<a*1.5<<"滴血"<<endl;
hb=1;
y-=a*1.5;
df=1;
}
if(f==5&&jnn[4]==1&&hb==1){
cout<<"你攻击了他 "<<a*1.4<<"滴血"<<endl;
cout<<"你冰冻了他"<<endl;
y-=a*1.4;
df=0;
hb=0;
}
if(f==6&&jnn[5]==1){
cout<<"你轰了他 "<<300<<"滴血"<<endl;
y-=300;
df=1;
hb=1;
}
if(f==7&&jnn[6]==1){
cout<<"你打了他 "<<a*0.9<<"滴血"<<endl;
srand(time(0));
int lj=rand()%3;
y-=a*0.9;
for(int l=1;l<=lj;l++){
cout<<"你触发连击"<<endl;
cout<<"你打了他 "<<a*0.9<<"滴血"<<endl;
y-=a*0.9;
}
df=1;
hb=1;
}
if(f==8&&jnn[7]==1){
cout<<"你烧了他 "<<a*1.1+200<<"滴血"<<endl;
y-=a*1.1+200;
df=1;
hb=1;
}
if(f==9&&jnn[8]==1){
cout<<"你回了"<<b/3<<"滴血"<<endl;
cout<<"你攻击了他 "<<a*0.8<<"滴血"<<endl;
y-=a*0.8;
hb=1;
b1+=b/3;
df=1;
}
if(f==10&&jnn[9]==1&&cs!=0){
cout<<"你攻击了他 "<<a*3<<"滴血"<<endl;
cout<<"你回了"<<cnt/2<<"滴血"<<endl;
y-=a*3;
b+=cnt/2;
df=1;
hb=1;
cs--;
}
if(f==11&&jnn[10]==1){
cout<<"你用天荒攻击了他 "<<1.8*a<<"滴血"<<endl;
hb=1;
y-=a*1.8;
df=1;
}
if(f==12&&jnn[11]==1){
cout<<"你用天地拳攻击了他 "<<1.1*a<<"滴血"<<endl;
hb=1;
y-=a*1.1;
df=1;
}
if(f==13&&jnn[12]==1){
cout<<"你用火日飞踢掌攻击了他 "<<1.2*a<<"滴血"<<endl;
hb=1;
y-=a*1.2;
df=1;
}
if(f==14&&jnn[13]==1){
cout<<"你用炎黄之掌攻击了他 "<<1.4*a<<"滴血"<<endl;
hb=1;
y-=a*1.4;
df=1;
}
if(f==15&&jnn[14]==1){
cout<<"你用天龙掌攻击了他 "<<1.7*a<<"滴血"<<endl;
hb=1;
y-=a*1.7;
df=1;
}
if(xx==1){
cout<<"你吸了他"<<a/3<<"滴血"<<endl;
b1+=a/3;
y-=a/3;
}
if(bj==1){
srand(time(0));
int x1=rand()%2;
if(x1==1){
cout<<"你打出爆击他-"<<a/2<<"滴血"<<endl;
}
y-=a/2;
}
for(int i=1;i<=i11;i++){
if(hh[i]<=0)continue;
srand(time(0));
int x1x=rand()%3;
if(x1x==2){
cout<<cw[i].nm<<"用";
int h=cw[i].cjn,gj=cw[i].j;
if(h==1){
cout<<"十万伏特"<<"打了他"<<cw[i].j*1.5<<"滴血"<<endl;
y-=gj*1.5;
}
if(h==2){
cout<<"喷火"<<"打了他"<<cw[i].j*1.4<<"滴血"<<endl;
ran+=1;
y-=gj*1.4;
}
if(h==3){
cout<<"水弹"<<"打了他"<<cw[i].j*1.4<<"滴血"<<endl;
y-=gj*1.4;
df=1;
}
if(h==4){
cout<<"藤蔓抽打"<<"打了他"<<cw[i].j*1.4<<"滴血"<<endl;
y-=gj*1.4;
hh[i]+=gj/3;
}
if(h==5){
cout<<"放电"<<"打了他"<<cw[i].j*1.5<<"滴血"<<endl;
y-=gj*1.5;
}
if(h==6){
cout<<"火雨"<<"打了他"<<cw[i].j*1.2<<"滴血"<<endl;
y-=gj*1.2;
ran+=2;
}
if(h==7){
cout<<"尖刺重击"<<"打了他"<<cw[i].j*1.5<<"滴血"<<endl;
y-=gj*1.5;
}
if(h==8){
cout<<"巨石"<<"打了他"<<cw[i].j*1.3<<"滴血"<<endl;
y-=gj*1.2;
df=1;
hh[i11]+=gj/4;
}
}else{
cout<<cw[i].nm<<"打了他"<<cw[i].j<<"滴血"<<endl;
y-=cw[i].j;
}
cout<<"他打了"<<cw[i].nm<<x<<"滴血"<<endl;
hh[i]-=x;
cw[i].jy+=1;
if(cw[i].jy>=cw[i].ccnt*10){
cw[i].jy-=cw[i].ccnt*10;
cw[i].ccnt++;
cw[i].j+=10;
cw[i].x+=100;
cout<<cw[i].nm<<"升级了"<<endl;
}
}
srand(time(0));
int x11=rand()%20;
if(x11==2){
cout<<"他格挡了"<<a/3<<"的伤害"<<endl;
b+=a/3;
}
if(ran>0){
ran--;
int fff=abs(y/20);
cout<<"敌方因燃烧血量-"<<fff<<endl;
y-=fff;
}
if(df==1){
srand(time(0));
int x1=rand()%4;
if(x1==1){
cout<<"他开了大招你 -"<<x*2<<"滴血"<<endl;
}else if(x1==2){
cout<<"他用了技能你 -"<<x*1.4<<"滴血"<<endl;
}else{
cout<<"他攻击了你 -"<<x<<"滴血"<<endl;
}
b1-=x;
}
if(jia==1){
srand(time(0));
int x1=rand()%10;
if(x1==1){
cout<<"你格挡了"<<x/3<<"的伤害"<<endl;
b+= x/3;
}
if(x1==2){
cout<<"你格挡了"<<x/5<<"的伤害"<<endl;
b+= x/5;
}
if(x1==3){
cout<<"你格挡了"<<x/10<<"的伤害"<<endl;
b+= x/10;
}
}
if(jia1==1){
srand(time(0));
int x1=rand()%10;
if(x1==1){
cout<<"你格挡了"<<x<<"的伤害"<<endl;
b+= x;
}
if(x1==2){
cout<<"你格挡了"<<x/2<<"的伤害"<<endl;
b+= x/2;
}
if(x1==3){
cout<<"你格挡了"<<x/4<<"的伤害"<<endl;
b+= x/4;
}
if(x1==4){
cout<<"你格挡了"<<x/9<<"的伤害"<<endl;
b+= x/9;
}
}
}
return 1;
}
void shangdian(){
cout<<"(1)青龙偃月刀 1000金币或10钻石"<<endl;
cout<<"(2)藤甲 200金币或2钻石"<<endl;
cout<<"(3)城市升级 100金币或1钻石"<<endl;
cout<<"(4)加命丹 300金币或3钻石"<<endl;
cout<<"(5)宝刀 100金币或1钻石"<<endl;
cout<<"(6)匕首 10金币"<<endl;
cout<<"(7)小镇升级 20金币"<<endl;
cout<<"(8)横扫千军 1800金币或18钻石"<<endl;
cout<<"(9)回血 400金币或4钻石"<<endl;
cout<<"(10)肘击 800金币或8钻石"<<endl;
cout<<"(11)寒冰尖刺 1100金币或11钻石"<<endl;
cout<<"(12)激光炮 300金币或3钻石"<<endl;
cout<<"(13)打狗棒法 700金币或7钻石"<<endl;
cout<<"(14)泣血之刃 80钻石"<<endl;
cout<<"(15)宗师长剑 50钻石"<<endl;
cout<<"(16)天荒锤 3000金币"<<endl;
cout<<"(17)麟甲战衣 1500金币"<<endl;
cout<<"(18)破天战甲 4000金币"<<endl;
cout<<"(19)抽奖 4000金币"<<endl;
int y;
cin>>y;
if(y==1)
{
if(money1<1000 && money2<10)
{
cout<<"钱不够"<<endl;
}
else
{
a+=150;
if(money1>=1000)
{
money1-=1000;
}
else
{
money2-=10;
}
}
}
if(y==2)
{
if(money1<200 && money2<2)
{
cout<<"钱不够"<<endl;
}
else
{
b+=30;
if(money1>=1000)
{
money1-=200;
}
else
{
money2-=2;
}
}
}
if(y==3)
{
if(money1<100 && money2<1)
{
cout<<"钱不够"<<endl;
}
else
{
d+=6;
if(money1>=100)
{
money1-=100;
}
else
{
money2-=1;
}
}
}
if(y==4)
{
if(money1<300 && money2<3)
{
cout<<"钱不够"<<endl;
}
else
{
c+=1;
if(money1>=300)
{
money1-=300;
}
else
{
money2-=3;
}
}
}
if(y==5)
{
if(money1<100 && money2<1)
{
cout<<"钱不够"<<endl;
}
else
{
a+=11;
if(money1>=100)
{
money1-=100;
}
else
{
money2-=1;
}
}
}
if(y==6)
{
if(money1<10 )
{
cout<<"钱不够"<<endl;
}
else
{
a+=1;
if(money1>=10)
{
money1-=10;
}
}
}
if(y==7)
{
if(money1<20 )
{
cout<<"钱不够"<<endl;
}
else
{
d+=1;
if(money1>=20)
{
money1-=20;
}
}
}
if(y==8)
{
if(money1<1800&&money2<18 )
{
cout<<"钱不够"<<endl;
}
else
{
jnn[1]=1;
if(money1>=1800)
{
money1-=1800;
}else{
money2-=18;
}
}
}
if(y==9)
{
if(money1<400&&money2<4 )
{
cout<<"钱不够"<<endl;
}
else
{
jnn[2]=1;
if(money1>=400)
{
money1-=400;
}else{
money2-=4;
}
}
}
if(y==10)
{
if(money1<800&&money2<8 )
{
cout<<"钱不够"<<endl;
}
else
{
jnn[3]=1;
if(money1>=800)
{
money1-=800;
}else{
money2-=8;
}
}
}
if(y==11)
{
if(money1<1100&&money2<11 )
{
cout<<"钱不够"<<endl;
}
else
{
jnn[4]=1;
if(money1>=1100)
{
money1-=1100;
}else{
money2-=11;
}
}
}
if(y==12)
{
if(money1<300&&money2<3 )
{
cout<<"钱不够"<<endl;
}
else
{
jnn[5]=1;
if(money1>=300)
{
money1-=300;
}else{
money2-=3;
}
}
}
if(y==13)
{
if(money1<700&&money2<7 )
{
cout<<"钱不够"<<endl;
}
else
{
jnn[6]=1;
if(money1>=700)
{
money1-=700;
}else{
money2-=7;
}
}
}
if(y==14)
{
if(money2<80 )
{
cout<<"钱不够"<<endl;
}
else
{
a+=400;
xx=1;
if(money2>=80)
{
money2-=80;
}
}
}
if(y==15)
{
if(money2<50 )
{
cout<<"钱不够"<<endl;
}
else
{
bj=1;
a+=300;
if(money2>=50)
{
money2-=50;
}
}
}
if(y==16)
{
if(money1<3000 )
{
cout<<"钱不够"<<endl;
}
else
{
a+=260;
jnn[10]=1;
if(money1>=3000)
{
money1-=3000;
}
}
}
if(y==17)
{
if(money1<1500 )
{
cout<<"钱不够"<<endl;
}
else
{
b+=100;
jia=1;
if(money1>=1500)
{
money1-=1500;
}
}
}
if(y==18)
{
if(money1<4000 )
{
cout<<"钱不够"<<endl;
}
else
{
b+=200;
jia1=1;
if(money1>=4000)
{
money1-=4000;
}
}
}
if(y==19)
{
if(money1<4000 )
{
cout<<"钱不够"<<endl;
}
else
{
srand(time(0));
int f=rand()%8;
if(f==1){
cout<<"你获得了皮卡丘"<<endl;
cw[i11].nm="皮卡丘";
cw[i11].j=100;
cw[i11].x=1500;
cw[i11].cjn=1;
i11++;
}
if(f==2){
cout<<"你获得了小火龙"<<endl;
cw[i11].nm="小火龙";
cw[i11].j=150;
cw[i11].x=1200;
cw[i11].cjn=2;
i11++;
}
if(f==3){
cout<<"你获得了杰尼龟"<<endl;
cw[i11].nm="杰尼龟";
cw[i11].j=80;
cw[i11].x=2000;
cw[i11].cjn=3;
i11++;
}
if(f==4){
cout<<"你获得了妙蛙种子"<<endl;
cw[i11].nm="妙蛙种子";
cw[i11].j=90;
cw[i11].x=1800;
cw[i11].cjn=4;
i11++;
}
if(f==5){
cout<<"你获得了小电狐"<<endl;
cw[i11].nm="小电狐";
cw[i11].j=100;
cw[i11].x=1300;
cw[i11].cjn=5;
i11++;
}
if(f==6){
cout<<"你获得了小火鸟"<<endl;
cw[i11].nm="小火鸟";
cw[i11].j=120;
cw[i11].x=1100;
cw[i11].cjn=6;
i11++;
}
if(f==7){
cout<<"你获得了小刺球"<<endl;
cw[i11].nm="小刺球";
cw[i11].j=110;
cw[i11].x=1200;
cw[i11].cjn=7;
i11++;
}
if(f==8){
cout<<"你获得了小石熊"<<endl;
cw[i11].nm="小石熊";
cw[i11].j=80;
cw[i11].x=1800;
cw[i11].cjn=8;
i11++;
}
if(money1>=4000)
{
money1-=4000;
}
}
}
return ;
}
void caipiao(){
int f;
cin>>f;
if(f==1){
money1-=10;
srand(time(0));
int nm=rand()%20;
if(nm==0){
cout<<"特等奖"<<endl;
money1+=500;
}
if(nm==1){
cout<<"一等奖"<<endl;
money1+=200;
}
if(nm==2){
cout<<"二等奖"<<endl;
money1+=100;
}
if(nm==3){
cout<<"三等奖"<<endl;
money1+=50;
}
if(nm==4){
cout<<"四等奖"<<endl;
money1+=20;
}
if(nm==5){
cout<<"五等奖"<<endl;
money1+=10;
}
if(nm>=6){
cout<<"谢谢惠顾"<<endl;
}
}
if(f==2){
money1-=20;
srand(time(0));
int nm=rand()%20;
if(nm==0){
cout<<"特等奖"<<endl;
money1+=500*3;
}
if(nm==1){
cout<<"一等奖"<<endl;
money1+=200*3;
}
if(nm==2){
cout<<"二等奖"<<endl;
money1+=100*3;
}
if(nm==3){
cout<<"三等奖"<<endl;
money1+=50*3;
}
if(nm==4){
cout<<"四等奖"<<endl;
money1+=20*3;
}
if(nm==5){
cout<<"五等奖"<<endl;
money1+=10*3;
}
if(nm>=6){
cout<<"谢谢惠顾"<<endl;
}
}
if(f==3){
money1-=50;
srand(time(0));
int nm=rand()%20;
if(nm==0){
cout<<"特等奖"<<endl;
money1+=500*7;
}
if(nm==1){
cout<<"一等奖"<<endl;
money1+=200*7;
}
if(nm==2){
cout<<"二等奖"<<endl;
money1+=100*7;
}
if(nm==3){
cout<<"三等奖"<<endl;
money1+=50*7;
}
if(nm==4){
cout<<"四等奖"<<endl;
money1+=20*7;
}
if(nm==5){
cout<<"五等奖"<<endl;
money1+=10*7;
}
if(nm>=6){
cout<<"谢谢惠顾"<<endl;
}
}
if(f==4){
money1-=100;
srand(time(0));
int nm=rand()%20;
if(nm==0){
cout<<"特等奖"<<endl;
money1+=500*13;
}
if(nm==1){
cout<<"一等奖"<<endl;
money1+=200*13;
}
if(nm==2){
cout<<"二等奖"<<endl;
money1+=100*13;
}
if(nm==3){
cout<<"三等奖"<<endl;
money1+=50*13;
}
if(nm==4){
cout<<"四等奖"<<endl;
money1+=20*13;
}
if(nm==5){
cout<<"五等奖"<<endl;
money1+=10*13;
}
if(nm>=6){
cout<<"谢谢惠顾"<<endl;
}
}
return ;
}
void denji(){
if(cnt<=20){
cout<<"兵"<<endl;
}else if(cnt<=40){
cout<<"士"<<endl;
}else if(cnt<=80){
cout<<"将"<<endl;
}else if(cnt<=120){
cout<<"王"<<endl;
}else if(cnt<=180){
cout<<"主"<<endl;
}else if(cnt<=240){
cout<<"皇"<<endl;
}else if(cnt<=300){
cout<<"尊"<<endl;
}else if(cnt<=400){
cout<<"帝"<<endl;
}else if(cnt<=500){
cout<<"练气"<<endl;
}else if(cnt<=700){
cout<<"巩基"<<endl;
}else if(cnt<=800){
cout<<"金丹"<<endl;
}else if(cnt<=1000){
cout<<"元婴"<<endl;
}else if(cnt<=1200){
cout<<"化神"<<endl;
}else if(cnt<=1500){
cout<<"神"<<endl;
}else if(cnt<=2000){
cout<<"超神"<<endl;
}else if(cnt<=2500){
cout<<"真神"<<endl;
}else if(cnt<=3000){
cout<<"神王"<<endl;
}else if(cnt<=4000){
cout<<"神尊"<<endl;
}else if(cnt<=5000){
cout<<"圣尊"<<endl;
}else if(cnt<=7000){
cout<<"至尊"<<endl;
}else if(cnt<=9000){
cout<<"天尊"<<endl;
}else if(cnt<=12000){
cout<<"无敌强者"<<endl;
}else if(cnt<=15000){
cout<<"无敌强者 青铜3"<<endl;
}else if(cnt<=18000){
cout<<"无敌强者 青铜2"<<endl;
}else if(cnt<=20000){
cout<<"无敌强者 青铜1"<<endl;
}else if(cnt<=25000){
cout<<"无敌强者 白银3"<<endl;
}else if(cnt<=30000){
cout<<"无敌强者 白银2"<<endl;
}else if(cnt<=35000){
cout<<"无敌强者 白银1"<<endl;
}else if(cnt<=40000){
cout<<"无敌强者 黄金5"<<endl;
}else if(cnt<=45000){
cout<<"无敌强者 黄金4"<<endl;
}else if(cnt<=50000){
cout<<"无敌强者 黄金3"<<endl;
}else if(cnt<=55000){
cout<<"无敌强者 黄金2"<<endl;
}else if(cnt<=60000){
cout<<"无敌强者 黄金1"<<endl;
}else if(cnt<=70000){
cout<<"无敌强者 钻石5"<<endl;
}else if(cnt<=80000){
cout<<"无敌强者 钻石4"<<endl;
}else if(cnt<=90000){
cout<<"无敌强者 钻石3"<<endl;
}else if(cnt<=100000){
cout<<"无敌强者 钻石2"<<endl;
}else if(cnt<=110000){
cout<<"无敌强者 钻石1"<<endl;
}else{
cout<<"无敌"<<endl;
}
return ;
}
void xiulian(){
if(cnt%10!=0)
{
a++;
b+=5;
tl+=1;
cout<<"成功了!!"<<endl;
cnt+=1;
}
else
{
if(cnt==300){
jnn[11]=1;
}
if(cnt==800){
jnn[12]=1;
}
if(cnt==2000){
jnn[13]=1;
}
if(cnt==3500){
jnn[14]=1;
}
if(d>=1)
{
d--;
cnt+=1;
}
}
return ;
}
void dagong(){
tl--;
for(int i=1;i<=100;i++){
cout<<"打工中"<<endl;
}
srand(time(0));
int f=rand()%10;
if(f==3){
srand(time(0));
int zs=rand()%2;
cout<<"你获得了"<<zs<<"颗钻石"<<endl;
money2+=zs;
}else if(f==2){
cout<<"资本家太黑心了没给你金币"<<endl;
}else if(f==1){
cout<<"资本家太黑心了没给你金币"<<endl;
cout<<"于是你打了他"<<endl;
cout<<"金币-"<<10<<endl;
money1-=10;
}else{
srand(time(0));
int jb=rand()%10;
cout<<"你获得了"<<jb<<"枚金币"<<endl;
money1+=jb;
}
}
void yuwai(){
srand(time(0));
int x=rand()%20;
if(x==9){
cout<<"骷髅战士:攻击5150,防御10160 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(5150,10160);
if(l)
{
cout<<"你打赢了,获得125金币,25钻石"<<endl;
money1+=125;
money2+=25;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==10){
cout<<"骷髅法师:攻击7150,防御9408 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(7150,9408);
if(l)
{
cout<<"你打赢了,获得125金币,25钻石"<<endl;
money1+=125;
money2+=25;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==1){
cout<<"神龙:攻击21500,防御44080 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(21500,44080);
if(l)
{
cout<<"你打赢了,获得1000金币,100钻石"<<endl;
money1+=1000;
money2+=100;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==2){
cout<<"神圣巨龙:攻击15000,防御28080 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(15000,28080);
if(l)
{
cout<<"你打赢了,获得800金币,65钻石"<<endl;
money1+=800;
money2+=65;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==3){
cout<<"龙:攻击13000,防御27080 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(13000,27080);
if(l)
{
cout<<"你打赢了,获得485金币,55钻石"<<endl;
money1+=485;
money2+=55;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==13){
cout<<"小龙:攻击9500,防御18080 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(9500,18080);
if(l)
{
cout<<"你打赢了,获得325金币,36钻石"<<endl;
money1+=325;
money2+=36;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==8){
cout<<"劫匪:攻击11150,防御1900 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(11150,1900);
if(l)
{
cout<<"你打赢了,获得200金币"<<endl;
money1+=200;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==5){
cout<<"火神:攻击15150,防御35900 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(15150,35900);
if(l)
{
cout<<"你打赢了,获得火焰之力"<<endl;
jnn[7]=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==6){
cout<<"水神:攻击14500,防御41000 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(14500,41000);
if(l)
{
cout<<"你打赢了,获得水之力"<<endl;
jnn[8]=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==7){
cout<<"him:攻击12000,防御100000 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(12000,100000);
if(l)
{
cout<<"你打赢了,获得创世之力"<<endl;
jnn[9]=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==11){
cout<<"him分身:攻击7500,防御25000 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(7500,25000);
if(l)
{
cout<<"你打赢了,获得了him的一些力量"<<endl;
cnt+=10;
a+=30;
b+=100;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==4){
cout<<"财神:攻击15500,防御29000 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(15500,29000);
if(l)
{
cout<<"你打赢了,获得了100钻石"<<endl;
money2+=100;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==13){
cout<<"财神小弟:攻击6500,防御16000 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(6500,16000);
if(l)
{
cout<<"你打赢了,获得了10钻石"<<endl;
money2+=10;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==14){
cout<<"魔王:攻击8100,防御16200 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(8100,16200);
if(l)
{
cout<<"你打赢了,获得了23金币"<<endl;
money1+=23;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==14){
cout<<"冰魔:攻击3000,防御7500 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(3000,7500);
if(l)
{
cout<<"你打赢了,获得了8金币"<<endl;
money1+=8;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==15){
srand(time(0));
int m1=rand()%10;
cout<<"你获得了 "<<m1<<"枚金币"<<endl;
money1+=m1;
}
if(x==0){
cout<<"你获得了 泣血之刃"<<endl;
a+=300;
xx=1;
}
if(x==16){
srand(time(0));
int m1=rand()%2;
cout<<"你获得了 "<<m1<<"枚钻石"<<endl;
money2+=m1;
}
if(x==17){
cout<<"火魔:攻击4000,防御5500 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(4000,5500);
if(l)
{
cout<<"你打赢了,获得了8金币"<<endl;
money1+=8;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==18){
cout<<"石魔:攻击2100,防御7500 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(2100,7500);
if(l)
{
cout<<"你打赢了,获得了8金币"<<endl;
money1+=8;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==19){
cout<<"暗影魔:攻击8100,防御1500 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(8100,1500);
if(l)
{
cout<<"你打赢了,获得了8金币"<<endl;
money1+=8;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==20){
cout<<"杂血龙:攻击3100,防御7500 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(3100,7500);
if(l)
{
cout<<"你打赢了,获得了8金币"<<endl;
money1+=8;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
return ;
}
void xyc(){
cout<<"你的对手:攻击"<<cen*100+1000<<",防御"<<cen*250+5000 <<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1";
money1--;
return ;
} else{
bool l=zhan(cen*100+1000,cen*250+5000);
if(l)
{
cout<<"你打赢了,下一层"<<endl;
cen++;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
void vs(){
cout<<"(1)神"<<endl;
cout<<"(2)超神"<<endl;
cout<<"(3)真神"<<endl;
cout<<"(4)神王"<<endl;
cout<<"(5)神尊"<<endl;
int x;
cin>>x;
if(x==1)
{
cout<<"人机:攻击620,防御1252"<<endl;
bool l=zhan(620,1252);
if(l)
{
cout<<"你打赢了"<<endl;
cnt++;
return ;
}
else
{
cout<<"你输了 金币-12"<<endl;
money1-=12;
return ;
}
}
if(x==2)
{
cout<<"人机:攻击720,防御1452"<<endl;
bool l=zhan(720,1452);
if(l)
{
cout<<"你打赢了"<<endl;
cnt+=2;
return ;
}
else
{
cout<<"你输了 金币-23"<<endl;
money1-=23;
return ;
}
}
if(x==3)
{
cout<<"人机:攻击820,防御1652"<<endl;
bool l=zhan(820,1652);
if(a+b>820+852 )
{
cout<<"你打赢了,获得34金币"<<endl;
cnt+=3;
return ;
}
else
{
cout<<"你输了 金币-34"<<endl;
money1-=34;
return ;
}
}
if(x==4)
{
cout<<"人机:攻击920,防御1852"<<endl;
bool l=zhan(920,1852);
if(l)
{
cout<<"你打赢了,获得12金币"<<endl;
money1+=12;
return ;
}
else
{
cout<<"你输了 金币-12"<<endl;
money1-=12;
return ;
}
}
if(x==5)
{
cout<<"人机:攻击1020,防御2052"<<endl;
bool l=zhan(2020,2052);
if(l)
{
cout<<"你打赢了,获得12金币"<<endl;
money1+=12;
return ;
}
else
{
cout<<"你输了 金币-12"<<endl;
money1-=12;
return ;
}
}
return ;
}
void lilian(){
srand(time(0));
int x=rand()%10;
if(x<=3){
cout<<"赵云:攻击415,防御416 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1"<<endl;
money1--;
return ;
} else{
bool l=zhan(415,416);
if(l)
{
cout<<"你打赢了,获得25金币,2钻石"<<endl;
money1+=25;
money2+=2;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x>3&&x<=5){
cout<<"张辽:攻击431,防御386 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1"<<endl;
money1--;
return ;
} else{
bool l=zhan(431,386);
if(l)
{
cout<<"你打赢了,获得20金币,2钻石"<<endl;
money1+=20;
money2+=2;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x>5&&x<=8){
cout<<"董卓:攻击115,防御116 "<<endl<<" 1. 攻击 2.逃跑"<<endl;
int c;
cin>>c;
if(c==2){
cout<<"你跑了 金币-1"<<endl;
money1--;
return ;
} else{
bool l=zhan(115,116);
if(l)
{
cout<<"你打赢了,获得10金币"<<endl;
money1+=10;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
}
if(x==9){
srand(time(0));
int m1=rand()%5;
cout<<"你获得了 "<<m1<<"枚钻石"<<endl;
money2+=m1;
}
if(x==10){
srand(time(0));
int m1=rand()%10;
cout<<"你获得了 "<<m1<<"枚金币"<<endl;
money1+=m1;
}
return ;
}
void zhanchang(){
cout<<"(1)华雄(普通)"<<endl;
cout<<"(2)黄盖(进阶)"<<endl;
cout<<"(3)关羽(困难)"<<endl;
cout<<"(4)诸葛亮(噩梦)"<<endl;
cout<<"(5)小兵(容易)"<<endl;
cout<<"(6)张飞(困难)"<<endl;
cout<<"(7)吕布(噩梦)"<<endl;
cout<<"(8)黄忠(困难)"<<endl;
cout<<"(9)刘备(地狱)"<<endl;
// cout<<"(10)周瑜(困难)"<<endl;
int v;
cin>>v;
if(v==1)
{
cout<<"华雄:攻击45,防御46"<<endl;
bool l=zhan(45,46);
if(l)
{
cout<<"你打赢了,获得5金币"<<endl;
money1+=5;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==2)
{
cout<<"黄盖:攻击160,防御152"<<endl;
bool l=zhan(160,152);
if(l)
{
cout<<"你打赢了,获得12金币"<<endl;
money1+=12;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==3)
{
cout<<"关羽:攻击378,防御365"<<endl;
bool l=zhan(378,365);
if(l)
{
cout<<"你打赢了,获得30金币,1钻石"<<endl;
money1+=30;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==4)
{
cout<<"诸葛亮:攻击512,防御518"<<endl;
bool l=zhan(512,518);
if(a+b>512+518&& cnt>=25)
{
cout<<"你打赢了,获得53金币,3钻石"<<endl;
money1+=53;
money2+=3;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==5)
{
cout<<"小兵:攻击5,防御3"<<endl;
bool l=zhan(5,3);
if(l)
{
cout<<"你打赢了,获得1金币"<<endl;
money1+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==6)
{
cout<<"张飞:攻击380,防御356"<<endl;
bool l=zhan(380,356);
if(l)
{
cout<<"你打赢了,获得28金币,1钻石"<<endl;
money1+=28;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==7)
{
cout<<"吕布:攻击592,防御406"<<endl;
bool l=zhan(592,406);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==8)
{
cout<<"黄忠:攻击355,防御319"<<endl;
bool l=zhan(355,319);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==9)
{
cout<<"刘备:攻击1045,防御1246"<<endl;
bool l=zhan(1045,1246);
if(l)
{
cout<<"你打赢了,获得10金币"<<endl;
money1+=10;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
return ;
}
void zhanchang1(){
cout<<"(1)华雄(进阶)"<<endl;
cout<<"(2)黄盖(困难)"<<endl;
cout<<"(3)关羽(噩梦)"<<endl;
cout<<"(4)诸葛亮(地狱)"<<endl;
cout<<"(5)小兵(普通)"<<endl;
cout<<"(6)张飞(噩梦)"<<endl;
cout<<"(7)吕布(地狱)"<<endl;
cout<<"(8)黄忠(噩梦)"<<endl;
cout<<"(9)刘备(史诗)"<<endl;
// cout<<"(10)周瑜(困难)"<<endl;
int v;
cin>>v;
if(v==1)
{
cout<<"华雄:攻击145,防御346"<<endl;
bool l=zhan(145,146);
if(l)
{
cout<<"你打赢了,获得5金币"<<endl;
money1+=5;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==2)
{
cout<<"黄盖:攻击360,防御1002"<<endl;
bool l=zhan(360,1002);
if(l)
{
cout<<"你打赢了,获得12金币"<<endl;
money1+=12;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==3)
{
cout<<"关羽:攻击678,防御1650"<<endl;
bool l=zhan(678,1650);
if(l)
{
cout<<"你打赢了,获得30金币,1钻石"<<endl;
money1+=30;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==4)
{
cout<<"诸葛亮:攻击1012,防御3518"<<endl;
bool l=zhan(1012,3518);
if(a+b>512+518&& cnt>=25)
{
cout<<"你打赢了,获得53金币,3钻石"<<endl;
money1+=53;
money2+=3;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==5)
{
cout<<"小兵:攻击50,防御130"<<endl;
bool l=zhan(50,130);
if(l)
{
cout<<"你打赢了,获得1金币"<<endl;
money1+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==6)
{
cout<<"张飞:攻击780,防御1256"<<endl;
bool l=zhan(780,1256);
if(l)
{
cout<<"你打赢了,获得28金币,1钻石"<<endl;
money1+=28;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==7)
{
cout<<"吕布:攻击1392,防御3306"<<endl;
bool l=zhan(1392,3306);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==8)
{
cout<<"黄忠:攻击555,防御1519"<<endl;
bool l=zhan(555,1519);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==9)
{
cout<<"刘备:攻击2045,防御2246"<<endl;
bool l=zhan(2045,2246);
if(l)
{
cout<<"你打赢了,获得10金币"<<endl;
money1+=10;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
return ;
}
void zhanchang2(){
cout<<"(1)华雄(困难)"<<endl;
cout<<"(2)黄盖(噩梦)"<<endl;
cout<<"(3)关羽(地狱)"<<endl;
cout<<"(4)诸葛亮(史诗)"<<endl;
cout<<"(5)小兵(进阶)"<<endl;
cout<<"(6)张飞(地狱)"<<endl;
cout<<"(7)吕布(史诗)"<<endl;
cout<<"(8)黄忠(地狱)"<<endl;
cout<<"(9)刘备(传说)"<<endl;
// cout<<"(10)周瑜(困难)"<<endl;
int v;
cin>>v;
if(v==1)
{
cout<<"华雄:攻击345,防御1046"<<endl;
bool l=zhan(345,746);
if(l)
{
cout<<"你打赢了,获得5金币"<<endl;
money1+=5;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==2)
{
cout<<"黄盖:攻击660,防御2102"<<endl;
bool l=zhan(660,1402);
if(l)
{
cout<<"你打赢了,获得12金币"<<endl;
money1+=12;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==3)
{
cout<<"关羽:攻击1078,防4650"<<endl;
bool l=zhan(1078,2650);
if(l)
{
cout<<"你打赢了,获得30金币,1钻石"<<endl;
money1+=30;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==4)
{
cout<<"诸葛亮:攻击2012,防御8518"<<endl;
bool l=zhan(1012,3518);
if(a+b>512+518&& cnt>=25)
{
cout<<"你打赢了,获得53金币,3钻石"<<endl;
money1+=53;
money2+=3;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==5)
{
cout<<"小兵:攻击150,防御530"<<endl;
bool l=zhan(150,530);
if(l)
{
cout<<"你打赢了,获得1金币"<<endl;
money1+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==6)
{
cout<<"张飞:攻击1080,防御4256"<<endl;
bool l=zhan(1080,4256);
if(l)
{
cout<<"你打赢了,获得28金币,1钻石"<<endl;
money1+=28;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==7)
{
cout<<"吕布:攻击2392,防御7906"<<endl;
bool l=zhan(2392,7906);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==8)
{
cout<<"黄忠:攻击1055,防御4519"<<endl;
bool l=zhan(1055,4519);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==9)
{
cout<<"刘备:攻击6045,防御12746"<<endl;
bool l=zhan(6045,12746);
if(l)
{
cout<<"你打赢了,获得10金币"<<endl;
money1+=10;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
return ;
}
void zhanchang3(){
cout<<"(1)华雄(噩梦)"<<endl;
cout<<"(2)黄盖(地狱)"<<endl;
cout<<"(3)关羽(史诗)"<<endl;
cout<<"(4)诸葛亮(传说)"<<endl;
cout<<"(5)小兵(困难)"<<endl;
cout<<"(6)张飞(史诗)"<<endl;
cout<<"(7)吕布(传说)"<<endl;
cout<<"(8)黄忠(史诗)"<<endl;
cout<<"(9)刘备(神话)"<<endl;
// cout<<"(10)周瑜(困难)"<<endl;
int v;
cin>>v;
if(v==1)
{
cout<<"华雄:攻击745,防御2246"<<endl;
bool l=zhan(745,2246);
if(l)
{
cout<<"你打赢了,获得5金币"<<endl;
money1+=5;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==2)
{
cout<<"黄盖:攻击1100,防御5002"<<endl;
bool l=zhan(1100,5002);
if(l)
{
cout<<"你打赢了,获得12金币"<<endl;
money1+=12;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==3)
{
cout<<"关羽:攻击2178,防9050"<<endl;
bool l=zhan(2178,2050);
if(l)
{
cout<<"你打赢了,获得30金币,1钻石"<<endl;
money1+=30;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==4)
{
cout<<"诸葛亮:攻击6312,防御18178"<<endl;
bool l=zhan(4312,18178);
if(a+b>512+518&& cnt>=25)
{
cout<<"你打赢了,获得53金币,3钻石"<<endl;
money1+=53;
money2+=3;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==5)
{
cout<<"小兵:攻击450,防御1230"<<endl;
bool l=zhan(450,1230);
if(l)
{
cout<<"你打赢了,获得1金币"<<endl;
money1+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==6)
{
cout<<"张飞:攻击2280,防御8856"<<endl;
bool l=zhan(2280,8856);
if(l)
{
cout<<"你打赢了,获得28金币,1钻石"<<endl;
money1+=28;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==7)
{
cout<<"吕布:攻击6992,防御17806"<<endl;
bool l=zhan(6992,17806);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==8)
{
cout<<"黄忠:攻击2055,防御9219"<<endl;
bool l=zhan(2055,9219);
if(l)
{
cout<<"你打赢了,获得100金币,1钻石"<<endl;
money1+=100;
money2+=1;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
if(v==9)
{
cout<<"刘备:攻击10045,防御32746"<<endl;
bool l=zhan(10045,32746);
if(l)
{
cout<<"你打赢了,获得100金币"<<endl;
money1+=100;
}
else
{
if(c==0){
cout<<"你死了" <<endl;
s=1;
return ;
}
c--;
}
}
return ;
}
int main()
{
cout<<"请输入你的名字:";
cin>>name;
cout<<"第一章 变强"<<endl;
cout<<"你是一名小兵,这个世界出现了混乱三国"<<endl;
cout<<"你的梦想是征服世界,于是你踏上了旅途"<<endl;
while(cnt<=400)
{
cout<<"你有"<<c+1<<"条命"<<endl;
cout<<"金币:"<<money1<<" ,钻石:"<<money2<<" ,体力: "<<tl<<endl;
cout<<name<<':'<<cnt<<"级";
denji();
cout<<"(1)商店"<<endl;
cout<<"(2)练兵"<<endl;
cout<<"(3)战场"<<endl;
cout<<"(4)打工"<<endl;
cout<<"(5)彩票"<<endl;
if(cnt>=100){
cout<<"(6)历练"<<endl;
}
if(cnt>=350){
cout<<"(7)对战"<<endl;
}
if(cnt>=600){
cout<<"(8)域外"<<endl;
}
cout<<"攻击:"<<a<<"血量:"<<b<<endl;
int x;
cin>>x;
if(x==1)
{
shangdian();
}
if(x==2)
{
xiulian();
}
if(x==3){
zhanchang();
if(s==1){
return 0;
}
}
if(x==4&&tl>0){
dagong();
}
if(x==4&&tl<=0){
cout<<"你没体力了"<<endl;
}
if(x==5){
cout<<"(1)10元"<<endl;
cout<<"(2)20元"<<endl;
cout<<"(3)50元"<<endl;
cout<<"(4)100元"<<endl;
caipiao();
}
if(x==6&&cnt>=100){
lilian();
if(s==1){
return 0;
}
}
if(x==7&&cnt>=350){
vs();
}
if(x==8&&cnt>=600){
yuwai();
}
}
cout<<"第二章 修炼"<<endl;
cout<<"你成了第一强者但灵气复苏"<<endl;
cout<<"你又需要修炼"<<endl;
while(cnt<=2000)
{
cout<<"你有"<<c+1<<"条命"<<endl;
cout<<"金币:"<<money1<<" ,钻石:"<<money2<<" ,体力: "<<tl<<endl;
cout<<name<<':'<<cnt<<"级";
denji();
cout<<"(1)商店"<<endl;
cout<<"(2)练兵"<<endl;
cout<<"(3)战场"<<endl;
cout<<"(4)打工"<<endl;
cout<<"(5)彩票"<<endl;
if(cnt>=100){
cout<<"(6)历练"<<endl;
}
if(cnt>=350){
cout<<"(7)对战"<<endl;
}
if(cnt>=600){
cout<<"(8)域外"<<endl;
}
cout<<"攻击:"<<a<<"血量:"<<b<<endl;
int x;
cin>>x;
if(x==1)
{
shangdian();
}
if(x==2)
{
xiulian();
}
if(x==3){
zhanchang1();
if(s==1){
return 0;
}
}
if(x==4&&tl>0){
dagong();
}
if(x==4&&tl<=0){
cout<<"你没体力了"<<endl;
}
if(x==5){
cout<<"(1)10元"<<endl;
cout<<"(2)20元"<<endl;
cout<<"(3)50元"<<endl;
cout<<"(4)100元"<<endl;
caipiao();
}
if(x==6&&cnt>=100){
lilian();
if(s==1){
return 0;
}
}
if(x==7&&cnt>=350){
vs();
}
if(x==8&&cnt>=600){
yuwai();
}
}
cout<<"第三章 大世界"<<endl;
cout<<"一个声音传来,你有资格进入大世界"<<endl;
cout<<"你还没反应过来就感觉一阵头晕目眩"<<endl;
cout<<"你醒了"<<endl;
cout<<"你发现眼前的世界人都很强"<<endl;
cout<<"? : 喂!"<<"快过来"<<endl;
cout<<name<<": 你是谁 ?"<<endl;
cout<<"? : 我叫王小天是总部派来接相你一样从小世界出来的人"<<endl;
cout<<"王小天带你到了一个地方"<<endl;
cout<<"王小天 : 你去登记一下"<<endl;
cout<<"你登记了身份"<<endl;
cout<<"你下定决心要成为强者"<<endl;
while(cnt<=4000)
{
cout<<"你有"<<c+1<<"条命"<<endl;
cout<<"金币:"<<money1<<" ,钻石:"<<money2<<" ,体力: "<<tl<<endl;
cout<<name<<':'<<cnt<<"级";
denji();
cout<<"(1)商店"<<endl;
cout<<"(2)练兵"<<endl;
cout<<"(3)战场"<<endl;
cout<<"(4)打工"<<endl;
if(cnt>=100){
cout<<"(5)历练"<<endl;
}
if(cnt>=350){
cout<<"(6)对战"<<endl;
}
if(cnt>=600){
cout<<"(7)域外"<<endl;
}
cout<<"攻击:"<<a<<"血量:"<<b<<endl;
int x;
cin>>x;
if(x==1)
{
shangdian();
}
if(x==2)
{
xiulian();
}
if(x==3){
zhanchang2();
if(s==1){
return 0;
}
}
if(x==4&&tl>0){
dagong();
}
if(x==4&&tl<=0){
cout<<"你没体力了"<<endl;
}
if(x==5&&cnt>=100){
lilian();
if(s==1){
return 0;
}
}
if(x==6&&cnt>=350){
vs();
}
if(x==7&&cnt>=600){
yuwai();
}
}
cout<<"第四章"<<endl;
cout<<"王小天带你来到了一个地方"<<endl;
cout<<"王小天 :这是四星域大比,你代表我们白虎星域参赛"<<endl;
cout<<"你想拿第一 于是前往了大比"<<endl;
while(cen<=100){
cout<<"你有"<<c+1<<"条命"<<endl;
cout<<"你在第"<<cen<<"层"<<endl;
cout<<"(1)商店"<<endl;
cout<<"(2)练兵"<<endl;
cout<<"(3)闯关"<<endl;
cout<<"攻击:"<<a<<"血量:"<<b<<endl;
int x;
cin>>x;
if(x==1)
{
shangdian();
}
if(x==2)
{
xiulian();
}
if(x==3){
xyc();
if(s==1){
return 0;
}
}
}
cout<<"第五章"<<endl;
cout<<"你得到了第一,你肥肠开心"<<endl;
cout<<"因为你能进入人族核心:神城"<<endl ;
cout<<"你下定决心要成为强者"<<endl;
while(cnt<=4000)
{
cout<<"你有"<<c+1<<"条命"<<endl;
cout<<"金币:"<<money1<<" ,钻石:"<<money2<<" ,体力: "<<tl<<endl;
cout<<name<<':'<<cnt<<"级";
denji();
cout<<"(1)商店"<<endl;
cout<<"(2)练兵"<<endl;
cout<<"(3)战场"<<endl;
if(cnt>=100){
cout<<"(4)历练"<<endl;
}
if(cnt>=350){
cout<<"(5)对战"<<endl;
}
if(cnt>=600){
cout<<"(6)域外"<<endl;
}
cout<<"攻击:"<<a<<"血量:"<<b<<endl;
int x;
cin>>x;
if(x==1)
{
shangdian();
}
if(x==2)
{
xiulian();
}
if(x==3){
zhanchang3();
if(s==1){
return 0;
}
}
if(x==4&&cnt>=100){
lilian();
if(s==1){
return 0;
}
}
if(x==5&&cnt>=350){
vs();
}
if(x==6&&cnt>=600){
yuwai();
}
}
//cout<<"第章 出击"<<endl;
// cout<<"黑血大界入侵 无数百姓死于非命(百姓对作者说:我你********)"<<endl;
//cout<<"于是你为了让作者不被人骂死踏上了旅途....."<<endl;
return 0;
}