• 个人简介

    zhhdsj:1mq

    #include<windows.h>
    #include<Windows.h>
    using namespace std;
    int g=15000000000000000000,x=30000000000000000000000,f=10000000000000000000,kj=10000000000000000000,chuan=100000000000000000000000000;
    int xue=300000000000000000000000000,ff=f;
    int bag[41]={999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,};
    void slowout(char *p)
    {
    while(1)
    {
    if(*p!=0)
    printf("%c",*p++);
    else
    break;
    Sleep(100);}}
    int zhandou(int g1,int x1,int f1,int q,int shan,int fang,char boss[20]) {
    int k=0;
    x=xue;
    ff=f;
    while(1) {
    int cc=g-f1;
    if(cc<=0)cc=0;
    x1-=cc;
    printf("你向%s攻击,%s扣了%d滴血,\
    还剩%d滴血\n",boss,boss,cc,x1<0?0:x1);
    if(x1<=0) {
    k++;
    break;}
    Sleep(10);
    if(rand()%fang)printf("%s十分恼怒,防御+%d\n",boss,q),f1+=q;
    else printf("%s气势低沉,防御-%d\n",boss,q),f1-=q;
    Sleep(10);
    printf("%s向你扑来\n",boss);
    Sleep(10);
    int ccc=g1-f;
    if(ccc<0)ccc=0;
    x-=ccc;
    printf("%s向你发动攻击,你扣了%d滴血,\
    还剩%d滴血\n",boss,ccc,x<0?0:x);
    if(x<=0) {
    printf("你已死亡!\n");
    Sleep(10);
    break;}
    Sleep(10);
    if(rand()%2)printf("你十分恼怒,防御+%d\n",q),f+=q;
    else printf("你气势低沉,防御-%d\n",q),f-=q;
    Sleep(10);}
    f=ff;
    return k;}
    int main()
    {char name[20];
    int vip,a,b,c,d,e,u,v,w,x,y,z,wuqi=0,key=0,sys=0,yhk=0,kc=0,slb=0;
    int exp=0,money=300,lv=1,lv1=1;
    for(int i=1;i<=40;i++)
    bag[i]==0;
    int xie=0,chuan=0,xz[21];
    for(int i=0;i<=20;i++)
    xz[i]=0;
    printf("歹");
    Sleep(500);
    printf("徒");
    Sleep(500);
    printf("逃");
    Sleep(500);
    printf("亡\n");
    Sleep(500);
    printf("1.5.1正式版\n");
    Sleep(500);
    system("cls");
    system("color 70");
    Sleep(10);
    slowout("在2999年,S城……\n");
    Sleep(10);
    slowout("这是一座充满未知的神秘城市…………\n");
    Sleep(10);
    slowout("某一天……\n");
    Sleep(10);
    Sleep(10);
    slowout("警察A:这都快半年了,S城一直平安无事,你说我们俩在这里天天转悠,够无聊的。\n");
    Sleep(10);
    slowout("警察B:哎,咋们也是为了混口饭吃,不容易啊!\n");
    Sleep(10);
    slowout("警察A:算了,巡逻巡逻吧。\n");
    Sleep(10);
    slowout("突然,惊天动地一声巨响,两名警察应声倒地\n") ;
    Sleep(10);
    slowout("烟雾中,你出现了~\n\n\n");
    Sleep(10);
    slowout("请输入你的名字:");
    cin>>name;
    system("cls");
    printf("确认名字:你的名字是%s\n",name);
    Sleep(10);
    slowout("下面正式开始游戏~//大力支持作者//\n\n\n\n\n");
    Sleep(10);
    printf("你,%s是一名S城的普通歹徒,然而,你想干出一番大事业。\n",name);
    Sleep(10);
    Sleep(10);
    Sleep(10);
    goto a1;
    a1:{while(exp>500)
    {
    exp-=500;
    lv+=1;
    }
    if(lv-lv1==1)
    {
    slowout("你升级了!\n");
    xue+=100;
    g+=50;
    f+=20;
    lv1++;
    }
    if(lv>lv1&&lv-lv1!=1)
    {
    int eeeee=lv-lv1;
    slowout("你连升了");
    cout<<eeeee;
    slowout("级!\n");
    xue+=100*eeeee;
    g+=50*eeeee;
    f+=20*eeeee;
    lv1+=eeeee;
    }
    slowout("现在你要去哪里\n");
    printf("1.大街 2.商店 3.矿场 4.实验室 5.省警察局 6.银行 7.查看背包 8.试炼场 9.黑市 10.开启VIP 11.饭店 12.抽奖机\n");
    cin>>a;}
    if(a==1)
    {
    int dajie;
    srand((unsigned)time(NULL));
    dajie=rand()%10;
    if(dajie>=0&&dajie<=4)
    {
    printf("大街上走来了一个路人\n");
    Sleep(10);
    printf("是否打他? 1.是 2.否\n");
    cin>>b;
    if(b==1)
    {
    if(zhandou(100,350,0,10,1,2,"路人"))
    {
    int luren;
    luren=rand()%10;
    printf("胜利!\n");
    Sleep(10);
    printf("获得50金币,30经验\n");
    money+=50;exp+=30;
    if(luren>=0&&luren<=4)
    {
    printf("恭喜获得:小瓶攻击药水*1\n");
    bag[1]++;
    }
    else {
    printf("没有获得物品\n");
    }}}
    goto a1;
    }
    if(dajie>4&&dajie<=6)
    {
    printf("大街上过来了一名警察\n");
    Sleep(10);
    printf("是否攻击?1.是 2.否\n");
    cin>>b;
    if(b==1)
    {
    if(zhandou(200,700,50,5,1,2,"警察"))
    {
    int police;
    police=rand()%10;
    printf("胜利!\n");
    Sleep(10);
    printf("获得100金币,80经验\n");
    money+=100;exp+=80;
    if(police>=0&&police<=3)
    {
    printf("恭喜获得:中瓶攻击药水*1\n");
    bag[2]++;
    }
    if(police>3&&police<=6)
    {
    printf("恭喜获得:长刀*1\n");
    bag[7]++;
    }
    else printf("没有获得任何物品\n");
    goto a1;
    }}
    goto a1;
    }
    if(dajie>6&&dajie<=8)
    {
    printf("安全。\n");
    goto a1;
    }
    if(dajie==9)
    {
    printf("大街上来了一辆装甲车\n");
    Sleep(10);
    printf("是否攻击?1.是 2.否\n");
    cin>>b;
    if(b==1)
    {
    if(zhandou(850,3000,660,0,1,2,"装甲车"))
    {
    printf("你胜利了!\n");
    Sleep(10);
    printf("获得600金币,500经验!!!\n");
    money+=600;exp+=500;
    Sleep(10);
    printf("你有资格驾驶这辆装甲车!\n");
    bag[13]++;
    }}
    goto a1;
    }}
    if(a==2)
    {
    slowout("黑店老板:你要做甚么? 1.购买 2.抢劫\n");
    cin>>c;
    if(c==1)
    {
    int shangdian[16];
    for(int aaaaa=1;aaaaa<=15;aaaaa++)
    shangdian[aaaaa]=0;
    slowout("黑店老板:你要买啥类?\n");
    Sleep(10);
    printf("1.长刀 200¥\n");
    printf("2.青龙偃月刀 666¥\n");
    printf("3.开启实验室的钥匙 500¥\n");
    printf("4.银行卡(别想了,里面没钱) 300¥\n");
    printf("5.手枪 800¥\n");
    printf("6.机关枪 1000¥\n");
    printf("7.98K 1999¥\n");
    printf("8.熔炼炉 650¥\n");
    printf("9.树皮/木头/白纸/碳(随机) 100¥\n");
    printf("10.黑市入场券 100¥\n");
    printf("11.挖矿镐 150¥\n");
    printf("12.黑市终身贵宾卡 9999¥\n");
    printf("13.等离子大炮 2000¥\n");
    printf("14. 高级装甲车升级道具 999999¥\n");
    printf("15.退出\n");
    cin>>b;
    shangdian[b]==1;
    slowout("黑店老板:你要买几个?\n");
    cin>>kj;
    int sdm=0,j;
    for(int i=1;i<=14;i++)
    {
    if(b==1){sdm==200;
    j=1;}
    if(b==2){sdm==666;
    j=8;}
    if(b==3){sdm==500;
    j=0;}
    if(b==4){sdm==300;
    j=-1;}
    if(b==5){sdm==800;
    j=9;}
    if(b==6){sdm==1000;
    j=10;}
    if(b==7){sdm==1999;
    j=11;}
    if(b==8){sdm==650;
    j=20;}
    if(b==9){sdm==100;
    j=-2;}
    if(b==10){sdm==100;
    j=21;}
    if(b==11){sdm==150;
    j=31;}
    if(b==12){sdm==9999;
    j=22;};
    if(b==13){sdm==2000;
    j=12;}
    if(b==14){sdm==999999;
    j=-3;}
    if(shangdian[i]==1)
    if(money<sdm*kj)
    slowout("黑店老板:钱都没有?来人,打出去!\n");
    else {
    slowout("购买成功!\n");
    if(j!=-3&&j!=0&&j!=-1&&j!=-2){
    bag[j]=1;
    money-=sdm*kj;}
    else {
    if(j==0)
    if(money<sdm*kj)
    slowout("黑店老板:钱都没有?来人,打出去!\n");
    else {
    slowout("购买成功!\n");
    sys=1;
    money-=sdm*kj;}
    if(j==-1)
    if(money<sdm*kj)
    slowout("黑店老板:钱都没有?来人,打出去!\n");
    else {
    slowout("购买成功!\n");
    yhk=1;
    money-=sdm*kj;}
    if(j==-2)
    if(money<sdm*kj)
    slowout("黑店老板:钱都没有?来人,打出去!\n");
    else {
    slowout("购买成功!\n");
    {{
    if(money<100*kj)slowout("黑店老板:钱都没有?来人,打出去!\n");
    else {
    slowout("购买成功!\n");
    money-=100*kj;
    int dian;
    for(int ss=1;ss<=kj;ss++){
    dian=rand()%15;
    if(dian<=4)
    {
    slowout("获得树皮\n");
    bag[16]++;
    }
    if(dian>4&&dian<=7)
    {
    slowout("获得木头\n");
    bag[17]++;
    }
    if(dian>7&&dian<=11)
    {
    slowout("获得白纸\n");
    bag[18]++;
    }
    if(dian>11)
    {
    slowout("获得碳\n");
    bag[19]++;
    }}}}}}
    if(j==-3)
    if(money<sdm*kj&&bag[13]<kj)
    slowout("黑店老板:钱(车)都没有?来人,打出去!\n");
    else {
    slowout("购买成功!\n");
    bag[14]+=kj;
    money-=sdm*kj;
    bag[13]-=kj;}}}}
    for(int aaaaa=1;aaaaa<=15;aaaaa++)
    shangdian[aaaaa]=0;
    }
    if(c==2)
    {
    slowout("黑店老板:来人呀!抢劫了!\n");
    Sleep(10);
    printf("一名持枪警察冲了过来!你没有办法,只能迎战!\n");
    Sleep(10);
    if(zhandou(400,700,50,10,1,2,"持枪警察"))
    {
    printf("你把黑店老板狠揍了一顿,并且抢到了600金币\n");
    money+=600;
    }
    else{
    printf("抢劫没抢成,反倒赔了200金币!\n");
    money-=200;
    }}
    Sleep(10);
    goto a1;
    }
    if(a==3)
    {
    if(kc==1){
    slowout("欢迎来到属于你的矿场!你要做什么?\n");
    printf("1.挖矿 2.退出\n");
    cin>>b;
    if(b==1)
    {
    if(bag[31]==0)
    slowout("你没有挖矿镐!\n");
    if(bag[31]>0){
    printf("挖矿开始!\n");
    Sleep(3000);
    int wk;
    wk=rand()%13;
    if(wk==0||wk==1||wk==2||wk==3)
    {
    slowout("挖中青铜矿*1\n");
    bag[26]++;
    }
    if(wk==4||wk==5)
    {
    slowout("挖中铁矿*1\n");
    bag[27]++;
    }
    if(wk==6)
    {
    slowout("挖中金矿*1\n");
    bag[28]++;
    }
    if(wk==7)
    {
    slowout("运气超赞,挖中钻石矿*1\n");
    bag[29]++;
    }
    if(wk==8)
    {
    slowout("运气爆棚,挖中翡翠矿*1,但是由于太过坚硬,废了一把稿子\n");
    bag[30]++;
    bag[31]--;
    }
    if(wk>8)
    {
    slowout("运气太差,啥也没挖到,稿子还断了\n");
    bag[31]--;
    }
    }
    }
    }
    if(kc==0)
    {
    slowout("你进入矿场\n");
    slowout("你看见许多劳工在不停地干活,而监工们却十分清闲,如果有劳工停了一下,他们还用鞭子抽打\n");
    slowout("你虽是歹徒,却也看不下去了\n");
    printf("%s:",name);
    slowout("你们这样太过分了,民主平等年代怎么还会有这种事!\n");
    slowout("监工:哪里来的乡巴佬,多管闲事!\n");
    printf("%s:",name);
    slowout("(怒)老子是歹徒,不是乡巴佬!\n");
    if(zhandou(350,800,100,10,1,2,"矿场监工"))
    slowout("另一名监工冲了过来\n");
    else{
    slowout("没实力就不要装B!\n");
    Sleep(10);
    goto a1;
    }
    if(zhandou(400,900,200,10,1,2,"矿场监工"))
    slowout("监工找来了总监工\n");
    else{
    slowout("没实力就不要装B!\n");
    Sleep(10);
    goto a1;
    }
    slowout("总监工:竟敢扰乱矿场秩序,老子杀了你!\n");
    if(zhandou(600,1200,250,5,1,2,"矿场总监工"))
    slowout("矿场主出现了!\n");
    else{
    slowout("没实力就不要装B!\n");
    Sleep(10);
    goto a1;
    }
    slowout("矿场主:乡巴佬,你不要自寻死路!\n");
    printf("%s:",name);
    slowout("(暴怒)再说一遍,老子不是乡巴佬!\n");
    if(zhandou(800,2000,200,10,1,2,"矿场主"))
    slowout("你干掉了矿场主,所有劳工都自由了!\n");
    else{
    slowout("没实力就不要装B!\n");
    Sleep(10);
    goto a1;
    }
    slowout("所有劳工:感谢您救了我们,以示报答,这个矿场属于您了!\n");
    system("cls");
    kc=1;
    }
    Sleep(10);
    goto a1;
    }
    if(a==4)
    {
    if(sys<1)
    slowout("你没有钥匙,进不去!\n");
    else{
    slowout("你要研制些甚么?\n");
    Sleep(10);
    printf("1.小瓶/中瓶/大瓶攻击药水 需要:①50¥/100¥/150¥ ②树皮*1/*2/*4\n");
    printf("2.小瓶/中瓶/大瓶增血药水 需要:①50¥/100¥/200¥ ②木头*1/*2/*3\n");
    printf("3.小瓶/中瓶/大瓶经验药水 需要 ①500¥/1000¥/2000¥ ②碳*3/*6/*9\n");
    printf("4.退出\n") ;
    printf("更多研制内容敬请期待……\n");
    if (bag[20]>0){
    cin>>b;
    if(b==1)
    {
    printf("小瓶/中瓶/大瓶?\n");
    cin>>c;
    slowout("你要研制几瓶?\n");
    cin>>kj;
    if(c==1)
    {
    if(money<50*kj&&bag[16]<kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<50*kj)
    {slowout("研制成功!\n");
    bag[16]-=kj;
    bag[1]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=50*kj;
    bag[1]+=kj;}
    }
    }
    if(c==2)
    {
    if(money<100*kj&&bag[16]<2*kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<100*kj)
    {slowout("研制成功!\n");
    bag[16]-=2*kj;
    bag[2]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=100*kj;
    bag[2]+=kj;}
    }
    }
    if(c==3)
    {
    if(money<150*kj&&bag[16]<4*kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<150*kj)
    {slowout("研制成功!\n");
    bag[16]-=4*kj;
    bag[3]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=150*kj;
    bag[3]+=kj;}
    }
    }
    }
    if(b==2)
    {
    printf("小瓶/中瓶/大瓶?\n");
    cin>>c;
    if(c==1)
    {
    if(money<=50*kj&&bag[17]<kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<50*kj)
    {slowout("研制成功!\n");
    bag[17]-=kj;
    bag[4]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=50*kj;
    bag[4]+=kj;}
    }
    }
    if(c==2)
    {
    if(money<=100*kj&&bag[17]<2*kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<100*kj)
    {slowout("研制成功!\n");
    bag[17]-=2*kj;
    bag[5]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=100*kj;
    bag[5]+=kj;}
    }
    }
    if(c==3)
    {
    if(money<=200*kj&&bag[17]<3*kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<200*kj)
    {slowout("研制成功!\n");
    bag[17]-=3*kj;
    bag[6]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=200*kj;
    bag[6]+=kj;}
    }
    }
    }
    if(b==3)
    {
    printf("小瓶/中瓶/大瓶?\n");
    cin>>c;
    slowout("你要研制几瓶?\n");
    cin>>kj;
    if(c==1)
    {
    if(money<=500*kj&&bag[19]<kj*3)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<500*kj)
    {slowout("研制成功!\n");
    bag[19]-=3*kj;
    bag[34]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=500*kj;
    bag[34]+=kj;}
    }
    }
    if(c==2)
    {
    if(money<=1000*kj&&bag[19]<6*kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<1000*kj)
    {slowout("研制成功!\n");
    bag[19]-=6*kj;
    bag[35]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=1000*kj;
    bag[35]+=kj;}
    }
    }
    if(c==3)
    {
    if(money<=1500*kj&&bag[19]<9*kj)
    slowout("钱(或材料)不够!\n");
    else{
    if(money<1500*kj)
    {slowout("研制成功!\n");
    bag[19]-=9*kj;
    bag[36]+=kj;}
    else{
    slowout("研制成功!\n");
    money-=1500*kj;
    bag[36]+=kj;}
    }
    }
    }
    }
    else slowout("你没有炼药炉\n");
    }
    Sleep(10);
    goto a1;
    }
    if(a==5)
    {
    slowout("你确定要闯进去吗?不要作死! 1.确定 2.算了\n");
    cin>>b;
    if(b==1)
    {
    slowout("你走到门口,门卫拦住了你\n");
    if(zhandou(200,600,50,5,1,2,"门卫"))
    slowout("战斗胜利,继续前进!\n");
    else{
    slowout("你都还没进门就嗝屁了~告诉过你不要作死!\n");
    goto a1;
    }
    Sleep(10);
    slowout("你走了进去,一名拿着青龙偃月刀(从哪儿冒出来的?)的警察拦住了你\n");
    if(zhandou(650,800,80,10,1,2,"警察"))
    slowout("战斗胜利,继续前进!\n");
    else{
    slowout("才第二关诶!你这个菜鸟水平也敢进省警察局?\n");
    goto a1;
    }
    Sleep(10);
    slowout("你继续前进,一名铁甲警察掏出手枪对准了你!\n");
    if(zhandou(600,1000,400,15,1,2,"铁甲警察"))
    slowout("战斗胜利,继续前进!\n");
    else{
    slowout("你也不赖了,可战力还需提高!\n");
    goto a1;
    }
    Sleep(10);
    slowout("你就要走到省警察局大楼的门口了,忽然,一名凭空出现的警察掏出了98K!\n");
    if(zhandou(1000,1100,150,10,1,2,"警察"))
    slowout("战斗胜利,继续前进!\n");
    else{
    slowout("你完蛋了,变强后再来吧!\n");
    goto a1;
    }
    Sleep(10);
    slowout("你走到了大楼门口,省警察局局长出现了!\n");
    slowout("局长:大胆歹徒,竟敢闯入省警察局,我要让你有去无回!\n");
    slowout("省警察局局长派出了一名保镖!\n");
    if(zhandou(900,1800,300,20,1,2,"局长保镖"))
    slowout("局长:什么?!你赢了!走着瞧!\n");
    else{
    slowout("你凉了……\n");
    goto a1;
    }
    Sleep(10);
    slowout("局长:没想到你这么难打,只好派出我的精英保镖了!\n");
    if(zhandou(1100,2200,450,20,1,2,"精英保镖"))
    slowout("局长:你这么厉害?!看来只能请求支援了!\n");
    else{
    slowout("……你失败了,下次再来吧!\n");
    goto a1;
    }
    Sleep(10);
    slowout("局长:呼叫上级,呼叫上级,请求支援!\n");
    slowout("一辆超强装甲车开了过来~\n");
    slowout("你有一次逃跑的机会,是否逃跑?1.逃跑 2.继续战斗!\n");
    cin>>c;
    if(c==1)
    {
    slowout("你溜了,作者表示很鄙视,但还是奖励你800金币,1000经验\n");
    money+=800;
    exp+=1000;
    goto a1;
    }
    if(zhandou(1200,4000,800,0,1,2,"超强装甲车"))
    slowout("局长:纳尼!只能使出终极武器了!\n");
    else{
    slowout("NO 作 NO die!\n");
    goto a1;
    }
    Sleep(10);
    slowout("一辆坦克说来就来了……\n");
    slowout("你已无法逃跑,决一死战吧!\n");
    if(zhandou(2000,7500,1000,0,1,2,"坦克"))
    slowout("局长:这……这怎么可能!\n");
    else{
    slowout("你被坦克轰死了~\n");
    goto a1;
    }
    Sleep(10);
    slowout("局长:我要亲自上,干掉你这个家伙!呃啊啊啊啊啊啊啊\n");
    slowout("局长进入了暴怒状态,血量暴增!\n");
    if(zhandou(1100,15000,0,100,1,2,"省警察局局长"))
    slowout("你把省警察局局长干掉了!你占领了整个省警察局!\n");
    else{
    slowout("唉,都最后一关了,真是遗憾!\n");
    goto a1;
    }
    Sleep(10);
    system("cls");
    slowout("你成功占领了省警察局,任务完成,游戏成功!\n\n\n\n\n\n\n\n\n");
    slowout("请不要关闭游戏,不然你会后悔的");
    Sleep(5000);
    system("cls");
    slowout("此时……国防部……\n");
    slowout("国防部部长:什么?!一个歹徒就把省警察局给占了?警察局的人都干什么吃的?!\n");
    slowout("国防部议员:部长,省警察局有很多的弹药和武器,我认为现在可以发射导弹,炸掉警察局,也炸掉那歹徒的老巢\n");
    slowout("国防部部长:嗯……好,就这样办!\n");
    slowout("导弹发射系统:准备发射导弹,准备发射导弹,目标:S城,省警察局。倒计时开始\n");
    Sleep(10);
    printf("五 ");
    Sleep(10);
    printf("四 ");
    Sleep(10);
    printf("三 ");
    Sleep(10);
    printf("二 ");
    Sleep(10);
    printf("一\n");
    Sleep(10);
    printf("歹徒逃亡第二部,敬请期待!\n");
    Sleep(3000);
    return 0;
    }
    Sleep(10);
    goto a1;
    }
    if(a==6)
    {
    slowout("前台:你要在银行作甚么? 1.存钱 2.抢银行\n");
    cin>>b;
    if(b==1)
    {
    if(yhk<1) slowout("你没有银行卡,存不了钱!\n");
    else{
    slowout("你要存多少钱?\n");
    cin>>c;
    if(c>money)
    slowout("前台:小伙子,你没有那么多钱!\n");
    else {
    printf("存钱成功!\n");
    Sleep(10);
    money-=c;
    printf("等待中……\n");
    Sleep(10000);
    int cunqian;
    cunqian=rand()%10;
    if(cunqian<=1)
    {
    slowout("运气不错,收获利息1.5倍!\n");
    c*=1.5;
    money+=c;
    }
    if(cunqian>1&&cunqian<=4)
    {
    slowout("运气不错,收获利息1.2倍!\n");
    c*=1.2;
    money+=c;
    }
    if(cunqian>4&&cunqian<=7)
    {
    slowout("很遗憾,运气不好,存的钱只剩一半了\n");
    c*=0.5;
    money+=c;
    }
    if(cunqian>7)
    slowout("很遗憾,运气不好,存的钱都打水漂了\n");
    }
    }
    }
    if(b==2)
    {
    slowout("前台:喂,110吗?这里有人抢银行啊!你们快来啊!\n");
    Sleep(10);
    printf("一名防弹持枪警察冲了过来!\n");
    Sleep(10);
    if(zhandou(900,1500,300,15,1,2,"防弹持枪警察"))
    {
    int qiang;
    qiang=rand()%10;
    if(qiang<=4){
    slowout("抢银行成功了!获得1000元\n");
    money+=1000;
    }
    if(qiang>4&&qiang<=7){
    slowout("抢银行成功了!获得2000元\n");
    money+=2000;
    }
    if(qiang>7&&qiang<=9){
    slowout("抢银行成功了!获得3000元\n");
    money+=3000;
    }
    if(qiang>9){
    slowout("抢银行成功了!获得5000元\n");
    money+=5000;
    }
    }
    else{
    slowout("抢银行没成功,你被警察带走了……你被关了一个月,还被罚了500金币\n");
    money-=500;
    slowout("一个月后……\n");
    }
    }
    Sleep(10);
    goto a1;
    }
    if(a==7)
    {
    printf("1.查看属性 2.查看武器 3.查看药水 4.查看其它\n");
    cin>>b;
    if(b==1){
    b1:
    system("cls");
    printf("%s\n",name);
    printf("等级:%d\n",lv);
    printf("金币:%d\n",money);
    printf("经验:%d\n",exp);
    printf("血量:%d\n",xue);
    printf("攻击:%d\n",g);
    printf("防御:%d\n",f);
    printf("试炼币:%d\n",slb);
    printf("请输入0退出\n");
    cin>>c;
    if(c==0){
    system("cls");
    goto a1;
    }
    else
    goto b1;
    }
    if(b==2)
    {
    b2://7.长刀 8.青龙偃月刀(乱入) 9.手枪 10.机关枪 11.98K
    //12.等离子大炮 13.装甲车 14.高级装甲车 15.坦克
    system("cls");
    printf("7.长刀*%d\n8.青龙偃月刀*%d\n9.手枪*%d\n10.机关枪*%d\n11.98K*%d\n",bag[7],bag[8],bag[9],bag[10],bag[11]);
    printf("12.等离子大炮*%d\n13.装甲车*%d\n14.高级装甲车*%d\n15.坦克*%d\n",bag[12],bag[13],bag[14],bag[15]);
    printf("输入1穿上装备,输入2卸下装备,输入0退出\n");
    cin>>c;
    if(c==0)
    {
    system("cls");
    goto a1;
    }
    if(c==1)
    {
    slowout("请输入要穿上的装备。\n");
    cin>>d;
    if(bag[d]==0)
    {
    slowout("抱歉,你没有这件装备!\n");
    goto b2;
    }
    if(chuan==1)
    {
    slowout("你已经穿上装备了!请先卸下原有装备!\n");
    goto b2;
    }
    if(bag[d]>0&&chuan==0)
    {
    slowout("装备成功!\n");
    chuan=1;
    system("cls");
    wuqi=d;
    if(d==7)
    {
    xue+=150;g+=100;f+=20;xz[7]==1;
    }
    if(d==8)
    {
    xue+=200;g+=200;f+=35;xz[8]==1;
    }
    if(d==9)
    {
    xue+=200;g+=250;f+=50;xz[9]==1;
    }
    if(d==10)
    {
    xue+220;g+=330;f+=60;xz[10]==1;
    }
    if(d==11)
    {
    xue+=230;g+=400;f+=60;xz[11]==1;
    }
    if(d==12)
    {
    xue+=250;g+=600;f+=80;xz[12]==1;
    }
    if(d==13)
    {
    xue+=400;g+=700;f+=300;xz[13]==1;
    }
    if(d==14)
    {
    xue+=420;g+=700;f+=380;xz[14]==1;
    }
    if(d==15)
    {
    xue+=650;g+=1000;f+=500;xz[15]==1;
    }
    }
    }
    if(c==2)
    {
    slowout("请输入你要卸下的装备\n");
    cin>>d;
    if(wuqi!=d)
    {
    slowout("你还没有穿这件装备!\n");
    goto b2;
    }
    if(wuqi==d)
    {
    slowout("成功卸下装备!\n");
    chuan=0;
    if(d==7)
    {
    xue-=150;g-=100;f-=20;xz[7]==0;
    }
    if(d==8)
    {
    xue-=200;g-=200;f-=35;xz[8]==0;
    }
    if(d==9)
    {
    xue-=200;g-=250;f-=50;xz[9]==0;
    }
    if(d==10)
    {
    xue-=220;g-=330;f-=60;xz[10]==0;
    }
    if(d==11)
    {
    xue-=230;g-=400;f-=60;xz[11]==0;
    }
    if(d==12)
    {
    xue-=250;g-=600;f-=80;xz[12]==0;
    }
    if(d==13)
    {
    xue-=400;g-=700;f-=300;xz[13]==0;
    }
    if(d==14)
    {
    xue-=420;g-=700;f-=380;xz[14]==0;
    }
    if(d==15)
    {
    xue-=650;g-=1000;f-=500;xz[15]==0;
    }
    goto b2;
    }
    }
    else goto b2;
    }
    if(b==3)
    {
    b3:
    system("cls");
    printf("1.小瓶攻击药水*%d\n2.中瓶*%d\n3.大瓶*%d\n",bag[1],bag[2],bag[3]);
    printf("4.小瓶增血药水*%d\n5.中瓶*%d\n6.大瓶*%d\n",bag[4],bag[5],bag[6]);
    printf("7.小瓶经验药水*%d\n8.中瓶*%d\n9.大瓶*%d\n",bag[34],bag[35],bag[36]);
    printf("输入1喝下药水,输入0退出\n");
    cin>>c;
    if(c==0)
    {
    system("cls");
    goto a1;
    }
    if(c==1)
    {
    slowout("请输入药水序号\n");
    cin>>d;
    slowout("请输入要使用的数量\n");
    cin>>e;
    if(d!=7&&d!=8&&d!=9)
    if(e>bag[d]||e<=0)
    {
    slowout("你没有那么多药水!\n");
    goto b3;
    }
    if(d==7||d==8||d==9)
    if(e>bag[27+d]||e<=0)
    {
    slowout("你没有那么多药水!\n");
    goto b3;
    }
    if(d!=7&&d!=8&&d!=9)
    if(e<=bag[d]&&e>0)
    {
    slowout("成功喝下药水\n");
    bag[d]-=e;
    if(d==1)
    g+=10*e;
    if(d==2)
    g+=20*e;
    if(d==3)
    g+=35*e;
    if(d==4)
    xue+=40*e;
    if(d==5)
    xue+=75*e;
    if(d==6)
    xue+=100*e;
    system("cls");
    }
    if(d==7||d==8||d==9)
    if(e<=bag[d+27]&&e>0){
    bag[d+27]-=e;
    if(d==7)
    exp+=500*e;
    if(d==8)
    exp+=1000*e;
    if(d==9)
    exp+=2000*e;
    }
    goto a1;
    }
    }
    if(b==4)
    {
    b4:
    system("cls");
    printf("树皮*%d\n木头*%d\n白纸*%d\n碳*%d\n熔炼炉*%d\n",bag[16],bag[17],bag[18],bag[19],bag[20]);
    /*21.黑市入场券 22.黑市终身贵宾卡 23.黑市交易券 24.试炼券 25.抽奖券*/
    printf("黑市入场券*%d\n黑市终身贵宾卡*%d\n试炼1.2倍经验符*%d\n试炼券*%d\n抽奖券*%d\n",bag[21],bag[22],bag[23],bag[24],bag[25]);
    /*26.青铜矿 27.铁矿 28.金矿 29.钻石矿 30.翡翠矿 31.挖矿镐*/
    printf("青铜矿*%d\n铁矿*%d\n金矿*%d\n钻石矿*%d\n翡翠矿*%d\n挖矿镐*%d\n",bag[26],bag[27],bag[28],bag[29],bag[30],bag[31]);
    printf("输入0退出\n");
    cin>>c;
    if(c==0)
    {
    system("cls");
    goto a1;
    }
    else goto b4;
    }
    Sleep(10);
    goto a1;
    }
    if(a==8)
    {
    slowout("请选择模式,1为战斗试炼场,2为商店,3抢劫\n");
    cin>>c;
    if(c==1)
    if(bag[24]==0){
    slowout("你没有试炼券\n");
    Sleep(10);
    goto a1;
    }
    else{
    slowout("即将迎来您的对手:小猪佩奇\n");
    {
    printf("试炼场上来了一只小猪佩奇\n");
    Sleep(10);
    printf("是否攻击?1.是 2.否\n");
    cin>>b;
    if(b==1)
    {
    if(zhandou(250,3000,560,0,1,2,"小猪佩奇"))
    {
    printf("你胜利了!\n");
    Sleep(10);
    printf("获得500试炼币!!!\n");
    slb+=500;
    Sleep(10);
    {
    printf("试炼场上来了一辆火箭\n");
    Sleep(10);
    printf("是否攻击?1.是 2.否\n");
    cin>>b;
    if(b==1)
    {
    if(zhandou(1550,1,2000,0,1,2,"火箭"))
    {
    printf("你胜利了!\n");
    Sleep(10);
    printf("获得2000试炼币!!!\n");
    slb+=2000;
    Sleep(10);
    }
    }
    }
    goto a1;
    }
    }
    }
    Sleep(10);
    goto a1;
    }
    if(c==2)
    {
     
    slowout("商店老板:你要买啥类?\n");
    Sleep(10);
    printf("1. 坦克 23333¥\n");
    printf("2. 退出\n");
    cin>>b;
    if(b==1)
    {
    slowout("商店老板:你要买几个?\n");
    cin>>kj;
    if(slb<23333*kj)
    slowout("没钱还来买东西\n");
    else {
    slowout("购买成功\n");
    bag[15]+=kj;
    slb-=23333*kj;}
    }
    goto a1;
    }
    if(c==3)
    {
    slowout("商店老板:抢劫了,救命啊\n");
    slowout("一名未来战士小跑而来,你避无可避,只能迎战\n");
    if(zhandou(1780,12200,1220,10,1,2,"未来战士"))
    slowout("你干掉了未来战士,获得了2000试炼币!\n");
    else{
    slowout("没实力就不要装B!\n");
    Sleep(10);
    goto a1;
    }
    Sleep(10);
    slb+=2000;
    goto a1;
    }
    }
    if(a==9)
    {
    if(bag[22]==0)
    {
    slowout("黑衣人:您好,黑市是秘密地点,请问您有黑市入场券吗?\n");
    printf("1.进入(消耗黑市入场券*1) 2.算了\n");
    cin>>b;
    if(b==1)
    { if(bag[21]==0)
    slowout("入场券不足。\n");
    else{
    bag[21]--;
    int hs;
    hs=rand()%3;
    if(hs==0)
    {
    printf("今日上架:\n");
    printf("1.500¥ 交换 300经验\n");
    printf("2.碳*2 交换 中瓶攻击药水*4\n");
    printf("3.小瓶增血药水*3 交换 金币*400\n");
    cin>>c;
    if(c==1)
    {
    if(money<500)
    slowout("钱不够!\n");
    else
    {
    printf("交易成功,获得300经验\n");
    exp+=300;money-=500;
    }
    }
    if(c==2)
    {
    if(bag[19]<2)
    slowout("材料不足。\n");
    else{
    printf("交易成功,获得中瓶攻击药水*4\n");
    bag[19]-=2;
    bag[2]+=4;
    }
    }
    if(c==3)
    {
    if(bag[4]<3)
    slowout("药水不足\n");
    else{
    printf("交易成功,获得金币*400\n");
    bag[4]-=3;
    money+=400;
    }
    }
    }
    if(hs>0)
    printf("黑市歇业中……\n");
    }
    }
    }
    if(bag[22]>0)
    {
    slowout("黑衣人:啊,您有终身贵宾卡!赶快迎接!\n");
    printf("%s",name);
    slowout("大摇大摆地走了进去。\n");
    printf("贵宾上架:\n");
    printf("1.金币*100 交换 抽奖券*3\n");
    printf("2.钻石矿*1 交换 金币*1000\n");
    printf("3.小瓶攻击药水*2 交换 大瓶增血药水*5\n");
    cin>>c;
    if(c==1)
    {
    if(money<100)
    slowout("金币不足!\n");
    else{
    slowout("交易成功,获得抽奖券*3\n");
    money-=100;
    bag[25]+=3;
    }
    }
    if(c==2)
    {
    if(bag[29]==0)
    slowout("钻石矿不足。\n");
    else{
    slowout("交易成功,获得金币*1000\n");
    money+=1000;
    bag[29]--;
    }
    }
    if(c==3)
    {
    if(bag[1]<2)
    slowout("药水不足。\n");
    else{
    slowout("交易成功,获得大瓶增血药水*5\n");
    bag[1]-=2;
    bag[6]+=5;
    }
    }
    }
    Sleep(10);
    goto a1;
    }
    if(a==10)
    {
    if(vip!=1)
    {
    system("cls");
    printf("-----------VIP模式特权:-------------\n");
    printf(" 1.超高金币 \n");
    printf(" 2.超高生命值 \n");
    printf(" 3.超高攻击力 \n");
    printf(" 4.抽奖券*9\n");
    printf(" 5.直接拥有最强武器——坦克\n");
    Sleep(50);
    printf("请输入密码:");
    cin>>d;
    if(d==lqzsdsg)
    {
    for(int ii=1; ii<=5; ii++) {
    system("color 10");
    system("color 20");
    system("color 30");
    system("color 40");
    system("color 50");
    system("color 60");
    system("color 70");
    system("color 80");
    system("color 90");
    system("color a0");
    system("color b0");
    system("color c0");
    system("color d0");
    system("color e0");
    system("color f0");
    }
    slowout("恭喜密码正确!成功开启VIP模式!!!\n");
    money+=99999;
    xue+=9999;
    g+=999;
    bag[25]+=9;
    bag[15]++;
    vip=1;
    Sleep(10);
    system("color 0A");
    system("cls");
    goto a1;
    }
    else {
    slowout("不晓得密码就别开启了,你只配玩普通模式!\n");
    Sleep(10);
    system("cls");
    goto a1;
    }
    }
    else {
    slowout("你已经是VIP了!\n");
    goto a1;
    }
    }
    if(a==11)
    {
    slowout("GG:欢迎光临真香饭店,我是店长GG。你要点什么?\n");
    printf(" 真香菜单\n");
    printf("1.独家秘制招牌真香蛋炒饭 300¥\n");
    printf("2.宫保鸡丁 150¥\n");
    printf("3.鱼香肉丝 180¥\n");
    printf("4.番茄炒蛋 200¥\n");
    printf("0.退出\n");
    cin>>b;
    int fd;
    if(b==1)
    {
    if(money<300)
    slowout("你的钱不够!\n");
    else{
    printf("%s:真香!\n",name);
    money-=300;
    Sleep(10);
    slowout("获得150经验\n");
    exp+=150;
    fd=rand()%5;
    if(fd==0)
    {
    slowout("你元气爆棚,加血500滴,加攻击力200点,加防御力80点!\n");
    g+=200;xue+=500;f+=80;
    }
    if(fd==1)
    {
    slowout("你感觉全身充满了力量,加攻击力200点,防御力50点!\n");
    g+=200;f+=50;
    }
    if(fd==2)
    {
    slowout("你奇迹般地获得了2张试炼券!\n");
    bag[24]+=2;
    }
    }
    }
    if(b==2)
    {
    if(money<150)
    slowout("你的钱不够!\n");
    else{
    printf("%s:味道不错!\n",name);
    money-=150;
    Sleep(10);
    slowout("加经验80点\n");
    exp+=80;
    fd=rand()%3;
    if(fd==0)
    {
    slowout("你运气很好,获得黑市终身贵宾卡一张!\n");
    bag[22]++;
    }
    if(fd==1)
    {
    slowout("你奇迹般地获得了3张抽奖券!\n");
    bag[25]+=3;
    }
    }
    }
    if(b==3)
    {
    if(money<180)
    slowout("你的钱不够!\n");
    else{
    printf("%s:太好吃了!",name);
    money-=180;
    Sleep(10);
    slowout("获得经验80点\n");
    exp+=80;
    fd=rand()%2;
    if(fd==0)
    {
    slowout("你从鱼香肉丝中获得了神奇的力量,血量加300滴!\n");
    xue+=300;
    }
    }
    }
    if(b==4)
    {
    if(money<200)
    slowout("你的钱不够!\n");
    else{
    printf("%s:DELICIOUS!\n",name);
    money-=200;
    Sleep(10);
    slowout("获得经验100点\n");
    exp+=100;
    fd=rand()%2;
    if(fd==0)
    {
    slowout("你瞬间爆发出神力,加攻击力200点,防御力30点!\n");
    g+=200;f+=30;
    }
    }
    }
    Sleep(10);
    goto a1;
    }
    if(a==12)
    {
    slowout("欢迎来到抽奖机!拥有抽奖券即有机会获得以下惊喜大礼!\n");
    printf("1.试炼券*3 2.500金币 3.试炼券*2 4.黑市入场券*3 5.2000经验\n");
    printf("6.1000金币 7.大瓶增血药水*10 8.钻石矿*5(终极大奖)\n");
    printf("1.开始抽奖(消耗抽奖券*1)2.退出\n");
    cin>>b;
    if(b==1)
    {
    int aca;
    cin>>aca;
     
    if(bag[25]<=aca)
    slowout("抽奖券不足!\n");
    else{
    printf("正在抽奖中……\n");
    bag[25]-=aca;
    Sleep(5000);
    for(int i=0;i<=aca;i++){int cj;
    cj=rand()%11;
    if(cj==1)
    {
    slowout("获得试炼券*3\n");
    bag[24]+=3;
    }
    if(cj==2)
    {
    slowout("获得500金币\n");
    money+=500;
    }
    if(cj==3)
    {
    slowout("获得试炼券*2\n");
    bag[24]+=2;
    }
    if(cj==4)
    {
    slowout("获得黑市入场券*3\n");
    bag[22]+=3;
    }
    if(cj==5)
    {
    slowout("获得2000经验\n");
    exp+=2000;
    }
    if(cj==6)
    {
    slowout("获得1000金币\n");
    money+=1000;
    }
    if(cj==7||cj==8)
    {
    slowout("获得大瓶增血药水*10\n");
    bag[6]+=10;
    }
    if(cj==9)
    {
    slowout("抽中大奖:钻石矿*5\n");
    bag[29]+=5;
    }
    if(cj>9)
    slowout("很遗憾,没有抽中!\n");
    }
    }
    Sleep(10);
    goto a1;
    }
     
    }
    if(a>12||a<1){slowout("输出错误\n");
    goto a1; }
    return 0;
    }
    
    
    副作用:药丸轮盘赌
    
    1.12 Beta更新公告
    增加商城中心(测试中)
    增加难度选择(测试中)
    增加联机大厅(测试中)
    增加存档功能(测试中)
    
    1.12正式版更新预告
    增加难度选择
    增加商城和兑换码
    增加存档功能
    增加双人模式
    丰富剧情
    

    根据用户反馈药剂师太强势了,所以将在1.12正式版削弱

    如有编译问题请洛谷私信或线下找我

    //1.12 Beta(未完成)(测试版)(QZ计划)	 
    #include <iostream>
    #include <cstdlib>
    #include <ctime>
    #include <vector>
    #include <string>
    #include <algorithm>
    #include <windows.h>
    
    using namespace std;
    
    // 游戏常量
    const int INITIAL_HEALTH = 6;
    const int MAX_PILLS = 8;
    const int MAX_ITEMS = 20;
    
    // 药丸类型
    enum PillType {
        RED,        // 红色药丸 - 剧毒
        BLUE,       // 蓝色药丸 - 治疗
        YELLOW,     // 黄色药丸 - 伤害+特殊
        GREEN,      // 绿色药丸 - 强力治疗
        PURPLE,     // 紫色药丸 - 特殊效果
        BLACK,      // 黑色药丸 - 剧毒
        WHITE,      // 白色药丸 - 治疗
        RAINBOW,    // 彩虹药丸 - 特殊
        GOLDEN,     // 金色药丸 - 无尽模式钥匙
        COUNT       // 药丸类型总数
    };
    
    // 道具类型
    enum ItemType {
        ANTIDOTE,       // 解毒剂 - 免疫下一次毒药
        EMETIC,         // 催吐药 - 吐出一颗已服药丸
        MICROSCOPE,     // 显微镜 - 查看所有药丸
        MAGNIFIER,      // 放大镜 - 查看下一颗药丸
        FILTER,         // 过滤器 - 移除当前药丸
        STABILIZER,     // 稳定剂 - 将下一颗变为治疗
        SHIELD,         // 护盾 - 抵挡下一次伤害
        MIRROR,         // 镜子 - 反弹效果给对手
        DILUTER,        // 稀释剂 - 减半药效
        AMPLIFIER,      // 放大器 - 加倍药效
        REVERSER,       // 逆转剂 - 反转药效
        DUPLICATOR,     // 复制器 - 复制当前药丸
        SHUFFLER,       // 洗牌器 - 重新洗牌
        TRANSMUTER,     // 转化器 - 改变药丸类型
        SYRINGE,        // 注射器 - 跳过当前药丸
        HOLSTER,        // 枪套 - 跳过对手回合
        LUCKY_CHARM,    // 幸运符 - 增加好药几率
        CURSED_ITEM,    // 诅咒物 - 增加毒药几率
        TIME_WARP,      // 时间扭曲 - 重做回合
        PULVERIZER      // 粉碎器 - 摧毁同类型药丸
    };
    
    // 药丸结构体
    struct Pill {
        PillType type;
        string name;
        string description;
        int healthEffect;
        bool isSpecial;
        bool isPoisonous;
    };
    
    // 道具结构体
    struct Item {
        ItemType type;
        string name;
        string description;
    };
    
    // 玩家结构体
    struct Player {
        string name;
        int health;
        vector<Item> items;
        int specialEffect; // 特殊效果标记
    };
    
    // 游戏状态
    struct GameState {
        int round;
        vector<Pill> pillBottle;
        int currentPillIndex;
        Player player;
        Player opponent;
        bool endlessMode;
        bool goldenPillUsed;
        int poisonCount; // 毒药计数
    };
    
    // 初始化药丸
    vector<Pill> initializePills() {
        vector<Pill> pills = {
            {RED,    "红色药丸", "鲜红如血,散发着甜腻气味", -3, false, true},
            {BLUE,   "蓝色药丸", "晶莹剔透,表面有细微裂纹", 1, false, false},
            {YELLOW, "黄色药丸", "发出微弱荧光,触感油腻", -2, true, true},
            {GREEN,  "绿色药丸", "薄荷香气,表面有螺旋纹路", 3, false, false},
            {PURPLE, "紫色药丸", "不规则形状,偶尔轻微震动", 0, true, false},
            {BLACK,  "黑色药丸", "吸收周围光线,摸起来冰凉", -4, false, true},
            {WHITE,  "白色药丸", "纯白无瑕,散发着牛奶香气", 2, false, false},
            {RAINBOW,"彩虹药丸", "色彩不断变化,温度忽冷忽热", 0, true, false},
            {GOLDEN, "金色药丸", "散发着神秘光芒,表面有奇异纹路", 0, true, false}
        };
        return pills;
    }
    
    // 初始化道具
    vector<Item> initializeItems() {
        vector<Item> items = {
            {ANTIDOTE,    "解毒剂",    "免疫下一次毒药效果"},
            {EMETIC,      "催吐药",    "吐出一颗已服用的药丸"},
            {MICROSCOPE,  "显微镜",    "查看药瓶中所有药丸"},
            {MAGNIFIER,   "放大镜",    "查看下一颗药丸"},
            {FILTER,      "过滤器",    "移除当前药丸"},
            {STABILIZER,  "稳定剂",    "将下一颗药丸变为治疗药"},
            {SHIELD,      "护盾",      "抵挡下一次伤害"},
            {MIRROR,      "镜子",      "将效果反弹给对手"},
            {DILUTER,     "稀释剂",    "减半下一颗药丸的效果"},
            {AMPLIFIER,   "放大器",    "加倍下一颗药丸的效果"},
            {REVERSER,    "逆转剂",    "反转下一颗药丸的效果"},
            {DUPLICATOR,  "复制器",    "复制当前药丸放入药瓶"},
            {SHUFFLER,    "洗牌器",    "重新随机药丸顺序"},
            {TRANSMUTER,  "转化器",    "改变当前药丸的类型"},
            {SYRINGE,     "注射器",    "跳过当前药丸"},
            {HOLSTER,     "枪套",      "跳过对手的下回合"},
            {LUCKY_CHARM, "幸运符",    "增加好药丸的几率"},
            {CURSED_ITEM, "诅咒物",    "增加毒药的几率"},
            {TIME_WARP,   "时间扭曲",  "重新开始当前回合"},
            {PULVERIZER,  "粉碎器",    "摧毁所有同类型药丸"}
        };
        return items;
    }
    
    // 随机获取道具
    Item getRandomItem() {
        static vector<Item> allItems = initializeItems();
        int index = rand() % allItems.size();
        return allItems[index];
    }
    
    // 初始化游戏
    GameState initializeGame(bool endless) {
        GameState game;
        game.round = 1;
        game.endlessMode = endless;
        game.goldenPillUsed = false;
        game.poisonCount = 0;
        
        // 初始化玩家
        game.player.name = "玩家";
        game.player.health = INITIAL_HEALTH;
        game.player.specialEffect = 0;
        
        // 初始化对手
        game.opponent.name = "药剂师";
        game.opponent.health = INITIAL_HEALTH;
        game.opponent.specialEffect = 0;
        
        // 初始化药瓶
        vector<Pill> allPills = initializePills();
        for (int i = 0; i < MAX_PILLS; i++) {
            int index = rand() % (allPills.size() - 1); // 不包括金色药丸
            game.pillBottle.push_back(allPills[index]);
            if (allPills[index].isPoisonous) {
                game.poisonCount++;
            }
        }
        
        // 无尽模式开始时加入金色药丸
        if (endless) {
            game.pillBottle.push_back(allPills[GOLDEN]);
            random_shuffle(game.pillBottle.begin(), game.pillBottle.end());
        }
        
        game.currentPillIndex = 0;
        
        // 给玩家初始道具
        for (int i = 0; i < 3; i++) {
            game.player.items.push_back(getRandomItem());
        }
        
        // 给对手初始道具
        for (int i = 0; i < 2; i++) {
            game.opponent.items.push_back(getRandomItem());
        }
        
        return game;
    }
    
    // 显示游戏状态
    void displayGameState(const GameState& game) {
        system("cls");
        cout << "=== 副作用 - 第 " << game.round << " 回合 ===" << endl;
        cout << "[" << game.player.name << "] 生命: ";
        for (int i = 0; i < game.player.health; i++) cout << "O";
        cout << endl;
        
        cout << "[" << game.opponent.name << "] 生命: ";
        for (int i = 0; i < game.opponent.health; i++) cout << "O";
        cout << endl << endl;
        
        cout << "药瓶中剩余药丸: " << game.pillBottle.size() - game.currentPillIndex << endl;
        cout << "其中有毒药丸: " << game.poisonCount << "颗" << endl;
    }
    
    // 显示道具
    void displayItems(const vector<Item>& items) {
        cout << "\n道具列表:" << endl;
        for (size_t i = 0; i < items.size(); i++) {
            cout << i+1 << ". " << items[i].name << " - " << items[i].description << endl;
        }
    }
    
    // 处理药丸效果
    void applyPillEffect(GameState& game, Pill pill, bool isPlayer) {
        Player& target = isPlayer ? game.player : game.opponent;
        Player& other = isPlayer ? game.opponent : game.player;
        
        cout << "\n>>> " << (isPlayer ? "你" : "药剂师") << "服用了: " << pill.name << endl;
        cout << pill.description << endl;
        Sleep(2000);
        
        // 更新毒药计数
        if (pill.isPoisonous) {
            game.poisonCount--;
        }
        
        // 检查护盾效果
        if (target.specialEffect & (1 << SHIELD)) {
            if (pill.healthEffect < 0) {
                cout << (isPlayer ? "你的护盾" : "药剂师的护盾") << "抵挡了伤害!" << endl;
                target.specialEffect &= ~(1 << SHIELD);
                Sleep(1500);
                return;
            }
        }
        
        // 检查解毒剂效果
        if (target.specialEffect & (1 << ANTIDOTE)) {
            if (pill.healthEffect < 0) {
                cout << (isPlayer ? "你的解毒剂" : "药剂师的解毒剂") << "中和了毒素!" << endl;
                pill.healthEffect /= 2;
                target.specialEffect &= ~(1 << ANTIDOTE);
            }
        }
        
        // 检查镜子效果
        if (target.specialEffect & (1 << MIRROR)) {
            cout << (isPlayer ? "你的镜子" : "药剂师的镜子") << "反弹了效果!" << endl;
            target.specialEffect &= ~(1 << MIRROR);
            applyPillEffect(game, pill, !isPlayer);
            return;
        }
        
        // 应用药丸基础效果
        if (pill.healthEffect != 0) {
            target.health += pill.healthEffect;
            if (pill.healthEffect > 0) {
                cout << (isPlayer ? "你" : "药剂师") << "恢复了 " << pill.healthEffect << " 点生命!" << endl;
            } else {
                cout << (isPlayer ? "你" : "药剂师") << "受到了 " << -pill.healthEffect << " 点伤害!" << endl;
            }
        }
        
        // 处理特殊药丸效果
        if (pill.isSpecial) {
            switch(pill.type) {
                case YELLOW:
                    cout << "你感到一阵眩晕,视线开始模糊..." << endl;
                    target.specialEffect |= (1 << (rand() % 5 + 5)); // 随机负面效果
                    break;
                case PURPLE:
                    cout << "周围的空间似乎扭曲了..." << endl;
                    swap(target.health, other.health);
                    cout << "你和药剂师的生命值交换了!" << endl;
                    break;
                case RAINBOW:
                    cout << "你看到了无数色彩在眼前旋转..." << endl;
                    target.specialEffect = (1 << LUCKY_CHARM) | (1 << AMPLIFIER);
                    cout << "你获得了幸运和强化的效果!" << endl;
                    break;
                case GOLDEN:
                    cout << "一股强大的能量流遍全身!" << endl;
                    game.goldenPillUsed = true;
                    game.endlessMode = true;
                    cout << "无尽模式已激活!游戏将继续直到一方倒下!" << endl;
                    break;
                default:
                    break;
            }
        }
        
        // 确保生命值不会超过上限或低于0
        target.health = min(max(target.health, 0), INITIAL_HEALTH * (game.endlessMode ? 2 : 1));
        Sleep(2000);
    }
    
    // 使用道具
    bool useItem(Player& user, Player& target, vector<Pill>& pillBottle, int& currentPillIndex, int& poisonCount) {
        if (user.items.empty()) {
            cout << user.name << "没有可用的道具!" << endl;
            return false;
        }
        
        cout << user.name << "选择使用道具:" << endl;
        displayItems(user.items);
        
        int choice;
        if (user.name == "玩家") {
            cin >> choice;
        } else {
            // AI简单逻辑:优先使用防御性道具
            for (size_t i = 0; i < user.items.size(); i++) {
                if (user.items[i].type == ANTIDOTE || user.items[i].type == SHIELD) {
                    choice = i + 1;
                    break;
                }
            }
            if (choice < 1 || choice > static_cast<int>(user.items.size())) {
                choice = rand() % user.items.size() + 1;
            }
            Sleep(1500);
        }
        
        if (choice < 1 || choice > static_cast<int>(user.items.size())) {
            cout << "无效选择!" << endl;
            return false;
        }
        
        Item usedItem = user.items[choice-1];
        user.items.erase(user.items.begin() + choice - 1);
        
        cout << user.name << "使用了: " << usedItem.name << endl;
        cout << usedItem.description << endl;
        Sleep(1500);
        
        switch(usedItem.type) {
            case ANTIDOTE:
                user.specialEffect |= (1 << ANTIDOTE);
                break;
            case EMETIC:
                if (user.health < INITIAL_HEALTH) {
                    user.health += 1;
                    cout << user.name << "吐出了一颗药丸,感觉好多了!" << endl;
                } else {
                    cout << user.name << "想吐但吐不出来!" << endl;
                }
                break;
            case MICROSCOPE:
                cout << "药瓶中的药丸:" << endl;
                for (size_t i = currentPillIndex; i < pillBottle.size(); i++) {
                    cout << i+1 << ". " << pillBottle[i].name << endl;
                }
                return false; // 不消耗回合
            case MAGNIFIER:
                if (currentPillIndex + 1 < static_cast<int>(pillBottle.size())) {
                    cout << "下一颗药丸是: " << pillBottle[currentPillIndex+1].name << endl;
                } else {
                    cout << "这是最后一颗药丸了!" << endl;
                }
                break;
            case FILTER:
                if (currentPillIndex < static_cast<int>(pillBottle.size())) {
                    cout << "移除了: " << pillBottle[currentPillIndex].name << endl;
                    if (pillBottle[currentPillIndex].isPoisonous) {
                        poisonCount--;
                    }
                    pillBottle.erase(pillBottle.begin() + currentPillIndex);
                }
                break;
            case STABILIZER:
                user.specialEffect |= (1 << STABILIZER);
                break;
            case SHIELD:
                user.specialEffect |= (1 << SHIELD);
                break;
            case MIRROR:
                user.specialEffect |= (1 << MIRROR);
                break;
            case DILUTER:
                user.specialEffect |= (1 << DILUTER);
                break;
            case AMPLIFIER:
                user.specialEffect |= (1 << AMPLIFIER);
                break;
            case REVERSER:
                user.specialEffect |= (1 << REVERSER);
                break;
            case DUPLICATOR:
                if (currentPillIndex < static_cast<int>(pillBottle.size())) {
                    pillBottle.insert(pillBottle.begin() + currentPillIndex, pillBottle[currentPillIndex]);
                    if (pillBottle[currentPillIndex].isPoisonous) {
                        poisonCount++;
                    }
                    cout << "复制了: " << pillBottle[currentPillIndex].name << endl;
                }
                break;
            case SHUFFLER:
                random_shuffle(pillBottle.begin() + currentPillIndex, pillBottle.end());
                cout << "药丸顺序被打乱了!" << endl;
                break;
            case TRANSMUTER:
                if (currentPillIndex < static_cast<int>(pillBottle.size())) {
                    vector<Pill> allPills = initializePills();
                    bool wasPoisonous = pillBottle[currentPillIndex].isPoisonous;
                    pillBottle[currentPillIndex] = allPills[rand() % allPills.size()];
                    if (wasPoisonous && !pillBottle[currentPillIndex].isPoisonous) {
                        poisonCount--;
                    } else if (!wasPoisonous && pillBottle[currentPillIndex].isPoisonous) {
                        poisonCount++;
                    }
                    cout << "药丸变成了: " << pillBottle[currentPillIndex].name << endl;
                }
                break;
            case SYRINGE:
                cout << "跳过了当前药丸!" << endl;
                currentPillIndex++;
                break;
            case HOLSTER:
                cout << target.name << "的下回合将被跳过!" << endl;
                target.specialEffect |= (1 << HOLSTER);
                break;
            case LUCKY_CHARM:
                user.specialEffect |= (1 << LUCKY_CHARM);
                break;
            case CURSED_ITEM:
                target.specialEffect |= (1 << CURSED_ITEM);
                break;
            case TIME_WARP:
                cout << "时间倒流了!" << endl;
                return false; // 重新开始回合
            case PULVERIZER:
                if (currentPillIndex < static_cast<int>(pillBottle.size())) {
                    PillType typeToDestroy = pillBottle[currentPillIndex].type;
                    int destroyedPoisons = 0;
                    for (auto it = pillBottle.begin() + currentPillIndex; it != pillBottle.end(); ) {
                        if (it->type == typeToDestroy) {
                            if (it->isPoisonous) destroyedPoisons++;
                            cout << "摧毁了: " << it->name << endl;
                            it = pillBottle.erase(it);
                        } else {
                            ++it;
                        }
                    }
                    poisonCount -= destroyedPoisons;
                }
                break;
        }
        
        return true;
    }
    
    // 玩家回合
    void playerTurn(GameState& game) {
        bool turnEnded = false;
        
        while (!turnEnded) {
            displayGameState(game);
            
            if (game.currentPillIndex >= static_cast<int>(game.pillBottle.size())) {
                cout << "药瓶已经空了!" << endl;
                break;
            }
            
            cout << "\n当前药丸: " << game.pillBottle[game.currentPillIndex].name << endl;
            cout << "描述: " << game.pillBottle[game.currentPillIndex].description << endl;
            cout << "1. 服用这颗药丸" << endl;
            cout << "2. 使用道具(按0退出)" << endl;
            cout << "3. 查看道具说明" << endl;
            
            int choice;
            cin >> choice;
            
            if (choice == 1) {
                // 服用当前药丸
                Pill currentPill = game.pillBottle[game.currentPillIndex];
                applyPillEffect(game, currentPill, true);
                game.currentPillIndex++;
                turnEnded = true;
            }
            else if (choice == 2) {
                // 使用道具
                if (useItem(game.player, game.opponent, game.pillBottle, game.currentPillIndex, game.poisonCount)) {
                    turnEnded = true;
                }
                Sleep(1500);
            }
            else if (choice == 3) {
                displayItems(game.player.items);
                system("pause");
            }
            else {
                cout << "无效选择!" << endl;
                Sleep(1000);
            }
        }
        
        // 回合结束时获得新道具
        if (turnEnded && game.player.items.size() < 5) {
            game.player.items.push_back(getRandomItem());
        }
    }
    
    // 对手回合
    void opponentTurn(GameState& game) {
        displayGameState(game);
        
        // 检查是否被跳过回合
        if (game.opponent.specialEffect & (1 << HOLSTER)) {
            cout << "\n药剂师被跳过回合!" << endl;
            game.opponent.specialEffect &= ~(1 << HOLSTER);
            Sleep(1500);
            return;
        }
        
        cout << "\n药剂师的回合..." << endl;
        Sleep(1500);
        
        // 简单AI逻辑
        bool usedItem = false;
        
        // 有道具且随机决定使用道具
        if (!game.opponent.items.empty() && rand() % 3 != 0) {
            usedItem = useItem(game.opponent, game.player, game.pillBottle, game.currentPillIndex, game.poisonCount);
        }
        
        // 如果没用道具且药瓶不为空,服药
        if (!usedItem && game.currentPillIndex < static_cast<int>(game.pillBottle.size())) {
            Pill currentPill = game.pillBottle[game.currentPillIndex];
            applyPillEffect(game, currentPill, false);
            game.currentPillIndex++;
        }
        
        // 对手回合结束时获得新道具
        if (game.opponent.items.size() < 3) {
            game.opponent.items.push_back(getRandomItem());
        }
    }
    
    // 主游戏循环
    void gameLoop(bool endlessMode) {
        GameState game = initializeGame(endlessMode);
        
        // 开场剧情
        cout << "=== 副作用 - 剧情===" << endl;
        cout << "你走进一家昏暗的药店,柜台后站着一位穿着白大褂的古怪药剂师。\n";
        cout << "'啊,新来的病人!'他咯咯笑着,'让我们玩个游戏吧...'\n";
        cout << "他拿出一个装满各色药丸的瓶子,'每人轮流服药,看看谁的运气更好!'\n";
        if (endlessMode) {
            cout << "'不过这次...我们玩个更大的!'药剂师神秘地笑着,放入一颗金色药丸...\n";
        }
        system("pause");
        
        while (true) {
            // 检查游戏结束条件
            if (game.player.health <= 0 && game.opponent.health <= 0) {
                cout << "你们双双倒下...平局!\n";
                break;
            } else if (game.player.health <= 0) {
                cout << "你倒下了...药剂师站在你面前咯咯笑。'看来我的药方更有效!'\n";
                break;
            } else if (game.opponent.health <= 0) {
                if (game.endlessMode && !game.goldenPillUsed) {
                    cout << "药剂师瘫倒在地!但就在你以为胜利时...\n";
                    cout << "他突然狂笑起来,掏出一颗金色药丸吞下!'游戏才刚开始!'\n";
                    game.opponent.health = INITIAL_HEALTH * 2;
                    game.round++;
                    game.goldenPillUsed = true;
                    continue;
                } else {
                    cout << "药剂师瘫倒在地!你赢得了这场危险的游戏!\n";
                    break;
                }
            }
            
            // 检查是否需要重新装填药瓶
            if (game.currentPillIndex >= static_cast<int>(game.pillBottle.size())) {
                cout << "药瓶空了...重新装填!" << endl;
                vector<Pill> allPills = initializePills();
                game.pillBottle.clear();
                game.poisonCount = 0;
                
                for (int i = 0; i < MAX_PILLS; i++) {
                    int index = rand() % (allPills.size() - 1); // 不包括金色药丸
                    game.pillBottle.push_back(allPills[index]);
                    if (allPills[index].isPoisonous) {
                        game.poisonCount++;
                    }
                }
                
                // 无尽模式每3轮加入一颗金色药丸
                if (game.endlessMode && game.round % 3 == 0) {
                    game.pillBottle.push_back(allPills[GOLDEN]);
                }
                
                random_shuffle(game.pillBottle.begin(), game.pillBottle.end());
                game.currentPillIndex = 0;
                Sleep(2000);
            }
            
            // 玩家回合
            playerTurn(game);
            
            // 对手回合
            if (game.opponent.health > 0 && game.currentPillIndex < static_cast<int>(game.pillBottle.size())) {
                opponentTurn(game);
            }
            
            game.round++;
            
            // 无尽模式难度提升
            if (game.endlessMode && game.round % 5 == 0) {
                cout << "\n你感觉药剂变得更加强烈了...\n";
                game.opponent.health += 1;
                Sleep(1500);
            }
        }
    }
    
    // 主菜单
    void mainMenu() {
        while (true) {
            system("cls");
            cout << "=== 副作用 - 药丸轮盘赌 1.12 Beta===" << endl;
            cout << "1. 开始游戏" << endl;
            cout << "2. 无尽模式" << endl;
            cout << "3. 游戏说明" << endl;
            cout << "4. 商城中心" << endl;
    		cout << "5. 难度选择" << endl;
    		cout << "6. 联机大厅" << endl; 
            cout << "7. 退出" << endl;
            
            int choice;
            cin >> choice;
            
            if (choice == 1) {
                gameLoop(false);
                system("pause");
            }
            else if (choice == 2) {
                cout << "\n警告: 无尽模式会越来越难,直到你倒下!\n";
                cout << "药剂师会强化,道具也会随着游戏进度越来越少!\n"; 
                cout << "确定要开始吗? (y/n): ";
                char confirm;
                cin >> confirm;
                if (confirm == 'y' || confirm == 'Y') {
                    gameLoop(true);
                    system("pause");
                }
            }
            else if (choice == 3) {
                cout << "\n=== 副作用 - 游戏说明 ===" << endl;
                cout << "1. 轮流服用药瓶中的药丸,有些治疗,有些有毒" << endl;
                cout << "2. 界面会显示剩余毒药数量,但不会告诉你具体哪颗" << endl;
                cout << "3. 使用道具来获得优势,每回合会获得新道具" << endl;
                cout << "4. 无尽模式中,找到金色药丸可解锁真正挑战" << endl;
                cout << "5. 合理使用道具组合是获胜关键" << endl;
                cout << "6. @bjlqz_leo出品/. @qfcwyh2运营/. @bjzzr审核/." << endl;
                cout << "7. 每周更新/." << endl;
                system("pause");
            }
            else if (choice == 4){
            	int leo;
    			cout << "欢迎来到leo的商城" << endl;
    			cout << "当前可购买:" << endl;
    			cout << "1. 幸运星\n" << "类型:" << "游戏内道具\n" << "效果:" << "幸运值+100%" << "\n" << "免费获得" << endl;
    			cout << "2. 手机\n" << "类型:" << "游戏内道具\n" << "效果:" << "买通裁判使对手受伤+50%" << "\n" << "一键三连获得" << endl;
    			cout << "买什么?" << endl;
    			cin >> leo;
    			if (leo == 1 || leo == 2){
    			cout << "购买成功!\n" << "正在返回主页..." << endl;
    			} 
    			else{
    			cout << "无效选择!" << endl; 
    			}
    			system("pause");
    		}
    		else if (choice == 5){
    		cout << "由于此版本为测试阶段,尚未完善该功能!"<< endl;
    		cout << "正在返回主页..." << endl;
    		system("pause");	
    		} 
    		else if (choice == 6){
    		int baocuo;
    		cout << "公告:" << endl << "欢迎来到联机大厅!" << endl;
    		cout << "由于此服务器非常小(只有一个房间),断连是常有的事,请耐心等待!" << endl;
    		cout << "正在连接房间..." << endl;
    		Sleep(10000); 
    		srand(time(NULL));
    		baocuo = (rand() % 2) + 1; 
    		if (baocuo == 1){
    		cout << "连接成功!" << endl;
    		Sleep(5000);
    		cout << "正在加入!" << endl;
    		Sleep(5000);
    		cout << "Error:无法加入房间1" << endl;
    		Sleep(5000);
    		cout << "正在上报错误" << endl;
    		Sleep(5000);
    		cout << "正在返回主页..." << endl;	
    		}
    		else if (baocuo == 2){
    		cout << "找不到服务器IP地址,请检查是否有误" << endl;
    		Sleep(5000);
    		cout << "正在上报错误" << endl;
    		Sleep(5000);
    		cout << "正在返回主页..." << endl;	
    		}
    		system("pause");
    		}
            else if (choice == 7) 
    		{
                break;
            }
        }
    }
    string lianjigongneng(string lianji,string room){
    	;
    }
    int main() {
        srand(static_cast<unsigned>(time(0)));
        mainMenu();
        return 0;
    }
    

    鼠标放在这里,会有好事情发生哦

    my洛谷团队

    TM的这人抄我主页,一模一样,连我名字都没改!!!

    预告

    ITR(真实地铁大亨)

    你将扮演地铁大亨,制作不同线路,购买不同车型,成为大赢家

  • 通过的题目

  • 最近活动

    This person is lazy and didn't join any contests or homework.
  • 最近编写的题解

题目标签

聪明人游戏
2
贪心
1
深搜 广搜
1
广搜
1
大沥2021
1