问题标题: 酷町堂:四界传说游戏

1
0
已解决
朱优扬
朱优扬
中级天翼
中级天翼

最近有事,没更新,所以这次发的有点晚……

#include <iostream>
#include <cstdlib>
#include <windows.h>
#include <conio.h>
#include <time.h>
#include <ctime>
#include <string>
#define MAX 42
using namespace std;
int cnt,cntcnt,cntj;
int main(){ 
    int yingcang,yingcang1;
    int maxnz=1,minnz=9,maxn=14,minn=1,minn1=1,maxn1=3,minnyc=1,maxnyc=10;
    int ans,ans2,ansycdt;
    bool xw=false,xm=false,yx=false,yt=false,hs=false,hw=false;
    bool c1p1=false,c1p2=false,c5p1=false,c5p2=false,c6p1=false,c6p2=false;
    string c61,c62,c63,c64,c65,c66,c67;
    string zuihouyigestring;
    string mmppcc;
    bool zc1=false,zc2=false,zc3=false,zc4=false,zc5=false,zc6=false,zc7=false;
    bool c1=false,c2=false,c3=false,c4=false,c5=false,c6=false,c7=false;
    bool bluebanana=false,bluebananas=false,bluebananass=false,bluebananasss=false;
    bool b1=false,b2=false,b3=false,b4=false;
    bool xcc=1,xcc1=1,xcc2=1,xcc3=1;
    int jinbi=500;
    int wx=70;
    int kg=2,kg1=2,kg2=2,kg3=2;
    char tianqixuanze,tianqixuanze1,tianqixuanze2,tianqixuanze3;
    int guaixue;
    int gxs; 
    char a,b,c,d,e;
    char yidong,yidong1,yidong2,yidong3;
    bool ycdt=false;
    for(int i=1;i<=9;i++)
        cerr<<"\t";
    cout<<"游戏加载中\n";
    for(int i=1;i<=MAX;i++){
        cerr<<"----";
        Sleep(100);
    }
    Sleep(500);
    system("cls");
    cerr<<"剧情一直按c";
    while(1){ 
        a=getch();
        if(a=='c'){
            cerr<<"\n你是一个冒险家,在海上航行时,不小心进入了四界传送门。";
            b=getch();
            if(b=='c'){
                cerr<<"\n那里有着四个世界,你必须将四界里所有的宝藏都拿到,才能回到家。";
                c=getch();
                if(c=='c'){
                    cerr<<"\n每个世界只有一个宝藏,(宝藏就是秘密)";
                    d=getch();
                    if(d=='c'){
                        cerr<<"\n到最后面,就是一个boss";Sleep(1000);
                        cerr<<"\n现在,开始你的四界之旅吧!";Sleep(2000);
                        break;
                    } 
                } 
            }
        }
    }
    system("cls");
    cout<<"游戏说明:\n    1.这个游戏需要用英文输入,因为用英文就可以不打回车\n    2.在武器抽奖里如果抽到了两边有空格的武器,那就说明是稀有武器\n    3.如果抽到了稀有武器,那么在商店里就可以购买皮肤了(只有稀有武器才有皮肤)"; 
    cout<<'\n'<<"    ";
    system("pause");
    bool qjcs=true;
    while(qjcs){ 
        system("cls");
        char bbj;
        system("COLOR 0F");
        cout<<"A.冒险           B.武器(随机抽奖)          C.商店            D.仓库";
        bbj=getch(); 
        if(bbj=='A'){
            system("cls");
            string dtxz;
            if((b1==false||b2==false||b3==false||b4==false)&&dtxz!="E"){ 
                cout<<"a键向后移动,d键向前移动,f打开秘密,s打开背包(z第几个装备),w打boss,e吃附魔金苹果\n";
                system("pause"); 
            }
            cout<<"A.苦力怕森林             B.湿润沼泽        C.红石矿山        D.高墩大厅        E.回家";
            if(ycdt==true)
                cout<<"        F.隐藏地图--Notch 303";
            cin>>dtxz;
            system("cls");
            if(dtxz=="gamerulekeepInventorytrue"){
                cout<<"已解锁隐藏地图!\n";
                system("pause"); 
                ycdt=true;
            }
            else if(dtxz=="A"){
                cntcnt=0;
                cout<<"A.天启Ⅰ        B.天启Ⅱ        C.天启Ⅲ        D.天启Ⅳ";
                tianqixuanze=getch();
                if(tianqixuanze=='A'){
                    guaixue=70;
                    gxs=70;
                    wx=70;
                }
                else if(tianqixuanze=='B'){
                    guaixue=80;
                    gxs=80;
                    wx=70;
                }
                else if(tianqixuanze=='C'){
                    guaixue=90;
                    gxs=90;
                    wx=70;
                }
                else{
                    guaixue=110;
                    gxs=110;
                    wx=70;
                }
                kg=2;
                while(1){ 
                    system("COLOR a0"); 
                    system("cls");
                    if(kg+2+1>=73){
                        break;
                    } 
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg;i++){
                        cout<<" ";
                    }
                    cout<<"你                    ";
                    if(xcc==1){
                        cout<<"秘密";
                    } 
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    yidong=getch();
                    if(yidong=='a'){
                        kg-=1;
                    }
                    else if(yidong=='d'){
                        kg+=1;
                    }
                    else if(yidong=='f'){
                        cout<<"秘密打开成功!";
                        xcc=0;
                        Sleep(1000); 
                    }
                    else if(yidong=='s'){
                        string zhuangbei;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"     ";
                        }
                        cin>>zhuangbei;
                        if(zhuangbei=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc7=false;
                            zc6=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    } 
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        }
                    }
                } 
                int dklpslboss;
                while(1){
                    system("cls");
                    if(wx<=0){
                        cout<<"\n你输了!";
                        Sleep(1000);
                        break; 
                    }
                    else if(guaixue<=0){
                        srand((int)time(NULL));
                        yingcang=minn+rand()%(minnz-maxnz+1);
                        if(cntcnt<=5){
                            cout<<"锁定猎物";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(cntcnt<=7&&cnt>5){
                            cout<<"百步穿杨";
                            Sleep(1000);
                            system("cls");  
                        }
                        if(wx<=5){ 
                            cout<<"丝血反杀";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(yingcang==1){
                            cout<<"碎甲专家";
                            Sleep(1000);
                            system("cls"); 
                        }
                        cout<<"\n你赢了!";
                        jinbi+=60;
                        b1=true;
                        Sleep(1000); 
                        break; 
                    }
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg+7;i++){
                        cout<<" ";
                    }
                    cout<<"你"<<"         "<<"疯狂苦力怕("<<guaixue<<"/"<<gxs<<")";
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    dklpslboss=getch();
                    if(dklpslboss=='w'){
                        cntcnt++;
                        if(zc1==true){
                            if(xw==true){
                                guaixue-=30;
                                wx-=2;
                            } 
                            else if(xm==true){
                                guaixue-=50;
                                wx-=2;
                            } 
                            else{ 
                                guaixue-=15;
                                wx-=2;
                            }
                        } 
                        else if(zc2==true){
                            guaixue-=12;
                            wx-=3;
                        }
                        else if(zc3==true){
                            guaixue-=8;
                            wx-=5;
                        }
                        else if(zc4==true){
                            guaixue-=12;
                            wx-=3;
                        }
                        else if(zc5==true){
                            if(yx==true){
                                guaixue-=30;
                                wx-=2;
                            }
                            else if(yt==true){
                                guaixue-=47;
                                wx-=2;
                            }
                            else{ 
                                srand((int)time(NULL));
                                ans2=minn+rand()%(maxn1-minn1+1);
                                if(ans2==1||ans2==2){
                                    guaixue-=14;
                                    wx-=2;
                                }
                                else{
                                    guaixue-=17;
                                    wx-=2;
                                }
                            }
                        }
                        else if(zc6==true){
                            if(hs==true){
                                guaixue-=39;
                                wx-=2;
                            }
                            else if(hw==true){
                                guaixue-=28;
                                wx-=2;
                            }
                            else{ 
                                guaixue-=16;
                                wx-=2;
                            }
                        }
                        else if(zc7==true){
                            guaixue-=7;
                            wx-=5;
                        }
                    }
                    else if(dklpslboss=='s'){
                        string zhuangbei;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"      ";    
                        }
                        cin>>zhuangbei;
                        if(zhuangbei=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    }   
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000); 
                        }
                    }                            
                }
            } 
            else if(dtxz=="B"){
                    cntcnt=0;
                    cout<<"A.天启Ⅰ        B.天启Ⅱ        C.天启Ⅲ        D.天启Ⅳ";
                    tianqixuanze1=getch();
                    if(tianqixuanze1=='A'){
                    guaixue=80;
                    gxs=80;
                    wx=70; 
                    }
                    else if(tianqixuanze1=='B'){
                    guaixue=90;
                    gxs=90;
                    wx=70;
                    }
                    else if(tianqixuanze1=='C'){
                    guaixue=100;
                    gxs=100;
                    wx=70;
                    }
                    else{
                    guaixue=120;
                    gxs=120;
                    wx=70;
                    }
                    kg1=2;
                    while(1){ 
                    system("COLOR a0"); 
                    system("cls");
                    if(kg1+2+1>=73){
                        break;
                    } 
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg1;i++){
                        cout<<" ";
                    }
                    cout<<"你                    ";
                    if(xcc1==1){
                        cout<<"秘密";
                    } 
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    yidong1=getch();
                    if(yidong1=='a'){
                        kg1-=1;
                    }
                    else if(yidong1=='d'){
                        kg1+=1;
                    }
                    else if(yidong1=='f'){
                        cout<<"秘密打开成功!";
                        xcc1=0;
                        Sleep(1000); 
                    }
                    else if(yidong1=='s'){
                        string zhuangbei1;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"     ";
                        }
                        cin>>zhuangbei1;
                        if(zhuangbei1=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei1=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei1=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei1=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei1=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei1=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei1=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    } 
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        }
                    }
                    } 
                    int dklpslboss1;
                    while(1){
                        system("cls");
                        if(wx<=0){
                        cout<<"\n你输了!";
                        Sleep(1000);
                        break; 
                        }
                        else if(guaixue<=0){
                            srand((int)time(NULL));
                            yingcang=minn+rand()%(minnz-maxnz+1);
                            if(cntcnt<=5){
                                cout<<"锁定猎物";
                                Sleep(1000);
                                system("cls"); 
                            }
                            if(cntcnt<=7&&cnt>5){
                                cout<<"百步穿杨";
                                Sleep(1000);
                                system("cls");  
                            }
                            if(wx<=5){ 
                                cout<<"丝血反杀";
                                Sleep(1000);
                                system("cls"); 
                            }
                            if(yingcang==1){
                                cout<<"碎甲专家";
                                Sleep(1000);
                                system("cls"); 
                            }
                            cout<<"\n你赢了!";
                            b2=true;
                            jinbi+=70;
                            Sleep(1000); 
                            break; 
                        }
                        for(int i=1;i<=wx;i++){
                        cout<<"★";
                        }
                        for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                        }
                        for(int i=1;i<=kg1+7;i++){
                        cout<<" ";
                        }
                        cout<<"你"<<"         "<<"沼泽巨兽("<<guaixue<<"/"<<gxs<<")";
                        cout<<endl; 
                        for(int i=1;i<=168;i++){ 
                            cout<<"▉";
                        }
                        dklpslboss1=getch();
                        if(dklpslboss1=='w'){
                            cntcnt++;
                            if(zc1==true){
                                if(xw==true){
                                    guaixue-=29;
                                    wx-=2;
                                } 
                                else if(xm==true){
                                    guaixue-=48;
                                    wx-=2;
                                } 
                                else{
                                    guaixue-=15;
                                    wx-=2;
                                }
                            } 
                            else if(zc2==true){
                            guaixue-=8;
                            wx-=4;
                            }
                            else if(zc3==true){
                            guaixue-=8;
                            wx-=5;
                            }
                            else if(zc4==true){
                            guaixue-=8;
                            wx-=4;
                            }
                            else if(zc5==true){
                                if(yx==true){
                                    guaixue-=26;
                                    wx-=2;
                                }
                                else if(yt==true){
                                    guaixue-=43;
                                    wx-=2;
                                }
                                else{ 
                                    srand((int)time(NULL));
                                    ans2=minn+rand()%(maxn1-minn1+1);
                                    if(ans2==1||ans2==2){
                                    guaixue-=14;
                                    wx-=3;
                                    }
                                    else{
                                    guaixue-=17;
                                    wx-=2;
                                    }
                                }
                            }
                            else if(zc6==true){
                                if(hs==true){
                                    guaixue-=27;
                                    wx-=2;
                                }
                                else if(hw==true){
                                    guaixue-=28;
                                    wx-=2;
                                }
                                else{ 
                                    guaixue-=14;
                                    wx-=1;
                                }
                            }
                            else if(zc7==true){
                                guaixue-=7;
                                wx-=5;
                            }
                        }
                        else if(dklpslboss1=='s'){
                            string zhuangbei1;
                            if(c1==true){
                            cout<<c61<<"     ";
                            }
                            if(c2==true){
                            cout<<c62<<"     ";
                            }
                            if(c3==true){
                            cout<<c63<<"     ";
                            }
                            if(c4==true){
                            cout<<c64<<"     ";
                            }
                            if(c5==true){
                            cout<<c65<<"     ";
                            }
                            if(c6==true){
                            cout<<c66<<"     ";
                            }
                            if(c7==true){
                                cout<<c67<<"     ";
                            }
                            cin>>zhuangbei1;
                            if(zhuangbei1=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                            } 
                            else if(zhuangbei1=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                            } 
                            else if(zhuangbei1=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                            }
                            else if(zhuangbei1=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                            }
                            else if(zhuangbei1=="z5"&&c5==true){
                                cout<<"已装备";  
                                zc1=false;
                                zc2=false;
                                zc3=false;
                                zc4=false;
                                zc5=true;
                                zc6=false;
                                zc7=false;
                                Sleep(1000); 
                            }
                            else if(zhuangbei1=="z6"&&c6==true){
                                cout<<"已装备";
                                zc1=false;
                                zc2=false;
                                zc3=false;
                                zc4=false;
                                zc5=false;
                                zc6=true;
                                zc7=false;
                                Sleep(1000); 
                            }
                            else if(zhuangbei1=="z7"&&c7==true){
                                cout<<"已装备";
                                zc1=false;
                                zc2=false;
                                zc3=false;
                                zc4=false;
                                zc5=false;
                                zc6=false;
                                zc7=true;
                                Sleep(1000); 
                            }
                        }
                        else{
                            if(cntj!=0){ 
                            wx+=25;
                            cntj--;
                            cout<<"已吃";
                            Sleep(1000); 
                            }
                            else{
                                cout<<"附魔金苹果吃完了";
                                Sleep(1000);
                            }
                        } 
                    }
                }
            else if(dtxz=="C"){
                cntcnt=0;
                cout<<"A.天启Ⅰ        B.天启Ⅱ        C.天启Ⅲ        D.天启Ⅳ";
                tianqixuanze2=getch();
                if(tianqixuanze2=='A'){
                    guaixue=80;
                    gxs=80;
                    wx=70;
                }
                else if(tianqixuanze2=='B'){
                    guaixue=90;
                    gxs=90;
                    wx=70;
                }
                else if(tianqixuanze2=='C'){
                    guaixue=100;
                    gxs=100;
                    wx=70;
                }
                else{
                    guaixue=120;
                    gxs=120;
                    wx=70;
                }
                kg2=2;
                while(1){ 
                    system("COLOR 34"); 
                    system("cls");
                    if(kg2+2+1>=73){
                        break;
                    } 
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg2;i++){
                        cout<<" ";
                    }
                    cout<<"你                    ";
                    if(xcc2==1){
                        cout<<"秘密";
                    } 
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    yidong2=getch();
                    if(yidong2=='a'){
                        kg2-=1;
                    }
                    else if(yidong2=='d'){
                        kg2+=1;
                    }
                    else if(yidong2=='f'){
                        cout<<"秘密打开成功!";
                        xcc2=0;
                        Sleep(1000); 
                    }
                    else if(yidong2=='s'){
                        string zhuangbei2;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"     ";
                        }
                        cin>>zhuangbei2;
                        if(zhuangbei2=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei2=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei2=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc7=false;
                            zc6=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei2=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei2=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei2=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei2=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    } 
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        }
                    } 
                } 
                int dklpslboss2;
                while(1){
                    system("cls");
                    if(wx<=0){
                        cout<<"\n你输了!";
                        Sleep(1000);
                        break; 
                    }
                    else if(guaixue<=0){
                        srand((int)time(NULL));
                        yingcang=minn+rand()%(minnz-maxnz+1);
                        if(cntcnt<=5){
                            cout<<"锁定猎物";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(cntcnt<=7&&cnt>5){
                            cout<<"百步穿杨";
                            Sleep(1000);
                            system("cls");  
                        }
                        if(wx<=5){ 
                            cout<<"丝血反杀";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(yingcang==1){
                            cout<<"碎甲专家";
                            Sleep(1000);
                            system("cls"); 
                        }
                        cout<<"\n你赢了!";
                        jinbi+=60;
                        b3=true;
                        Sleep(1000); 
                        break; 
                    }
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg2+7;i++){
                        cout<<" ";
                    }
                    cout<<"你"<<"         "<<"红石傀儡("<<guaixue<<"/"<<gxs<<")";
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    dklpslboss2=getch();
                    if(dklpslboss2=='w'){
                        cntcnt++;
                        if(zc1==true){
                            if(xw==true){
                                guaixue-=29;
                                wx-=2;
                            } 
                            else if(xm==true){
                                guaixue-=48;
                                wx-=2;
                            } 
                            else{ 
                                guaixue-=15;
                                wx-=2;
                            }
                        } 
                        else if(zc2==true){
                            guaixue-=4;
                            wx-=6;
                        }
                        else if(zc3==true){
                            guaixue-=8;
                            wx-=5;
                        }
                        else if(zc4==true){
                            guaixue-=8;
                            wx-=7;
                        }
                        else if(zc5==true){
                            if(yx==true){
                                guaixue-=26;
                                wx-=2;
                            }
                            else if(yt==true){
                                guaixue-=43;
                                wx-=2;
                            }
                            else{ 
                                srand((int)time(NULL));
                                ans2=minn+rand()%(maxn1-minn1+1);
                                if(ans2==1||ans2==2){
                                    guaixue-=14;
                                    wx-=2;
                                }
                                else{
                                    guaixue-=16;
                                    wx-=2;
                                }
                            }
                        }
                        else if(zc6==true){
                            if(hs==true){
                                guaixue-=24;
                                wx-=5;
                            }
                            else if(hw==true){
                                guaixue-=35;
                                wx-=8;
                            }
                            else{
                                guaixue-=7;
                                wx-=6;
                            } 
                        }
                        else if(zc7==true){
                            guaixue-=5;
                            wx-=8;
                        }
                    }
                    else if(dklpslboss2=='s'){
                        string zhuangbei;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"      ";    
                        }
                        cin>>zhuangbei;
                        if(zhuangbei=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    }
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        }
                    }                                
                }
            }
            else if(dtxz=="D"){
                cntcnt=0;
                cout<<"A.天启Ⅰ        B.天启Ⅱ        C.天启Ⅲ        D.天启Ⅳ";
                tianqixuanze3=getch();
                if(tianqixuanze3=='A'){
                    guaixue=90;
                    gxs=90;
                    wx=70;
                }
                else if(tianqixuanze3=='B'){
                    guaixue=100;
                    gxs=100;
                    wx=70;
                }
                else if(tianqixuanze3=='C'){
                    guaixue=120;
                    gxs=120;
                    wx=70;
                }
                else{
                    guaixue=150;
                    gxs=150;
                    wx=70;
                }
                kg3=2;
                while(1){ 
                    system("COLOR 03"); 
                    system("cls");
                    if(kg3+2+1>=73){
                        break;
                    } 
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg3;i++){
                        cout<<" ";
                    }
                    cout<<"你                    ";
                    if(xcc3==1){
                        cout<<"秘密";
                    } 
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    yidong3=getch();
                    if(yidong3=='a'){
                        kg3-=1;
                    }
                    else if(yidong3=='d'){
                        kg3+=1;
                    }
                    else if(yidong3=='f'){
                        cout<<"秘密打开成功!";
                        xcc3=0;
                        Sleep(1000); 
                    }
                    else if(yidong3=='s'){
                        string zhuangbei3;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"     ";
                        }
                        cin>>zhuangbei3;
                        if(zhuangbei3=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc7=false;
                            zc6=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    } 
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        } 
                    } 
                } 
                int dklpslboss3;
                while(1){
                    system("cls");
                    if(wx<=0){
                        cout<<"\n你输了!";
                        Sleep(1000);
                        break; 
                    }
                    else if(guaixue<=0){
                        srand((int)time(NULL));
                        yingcang=minn+rand()%(minnz-maxnz+1);
                        if(cntcnt<=5){
                            cout<<"锁定猎物";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(cntcnt<=7&&cnt>5){
                            cout<<"百步穿杨";
                            Sleep(1000);
                            system("cls");  
                        }
                        if(wx<=5){ 
                            cout<<"丝血反杀";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(yingcang==1){
                            cout<<"碎甲专家";
                            Sleep(1000);
                            system("cls"); 
                        }
                        cout<<"\n你赢了!";
                        jinbi+=60;
                        b4=true;
                        Sleep(1000); 
                        break; 
                    }
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg3+7;i++){
                        cout<<" ";
                    }
                    cout<<"你"<<"         "<<"无名者("<<guaixue<<"/"<<gxs<<")";
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    dklpslboss3=getch();
                    if(dklpslboss3=='w'){
                        cntcnt++;
                        if(zc1==true){
                            if(xw==true){
                                guaixue-=29;
                                wx-=2;
                            } 
                            else if(xm==true){
                                guaixue-=48;
                                wx-=2;
                            } 
                            else{ 
                                guaixue-=15;
                                wx-=2;
                            }
                        } 
                        else if(zc2==true){
                            guaixue-=4;
                            wx-=6;
                        }
                        else if(zc3==true){
                            guaixue-=8;
                            wx-=5;
                        }
                        else if(zc4==true){
                            guaixue-=8;
                            wx-=7;
                        }
                        else if(zc5==true){
                            if(yx==true){
                                guaixue-=26;
                                wx-=2;
                            }
                            else if(yt==true){
                                guaixue-=43;
                                wx-=2;
                            }
                            else{ 
                                srand((int)time(NULL));
                                ans2=minn+rand()%(maxn1-minn1+1);
                                if(ans2==1||ans2==2){
                                    guaixue-=6;
                                    wx-=5;
                                }
                                else{
                                    guaixue-=7;
                                    wx-=6;
                                }
                            }
                        }
                        else if(zc6==true){
                            if(hs==true){
                                guaixue-=24;
                                wx-=5;
                            }                               
                            else if(hw==true){
                                guaixue-=35;
                                wx-=8;
                            }
                            else{ 
                                guaixue-=7;
                                wx-=6;
                            }
                        }
                        else if(zc7==true){
                            guaixue-=5;
                            wx-=8;
                        }
                    }
                    else if(dklpslboss3=='s'){
                        string zhuangbei3;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"      ";    
                        }
                        cin>>zhuangbei3;
                        if(zhuangbei3=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;                                                                                          
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    }
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        }
                    }                                
                }
            } 
            else if(dtxz=="E"){
                if(b1==true&&b2==true&&b3==true&&b4==true){
                    system("cls");
                    string djj="你拿到了四个世界的宝藏,回到了家,和家人团聚了";
                    for(int i=0;i<=djj.size()-1;i++){
                        cout<<djj[i];
                        Sleep(100);
                    }
                    Sleep(1000);
                    cout<<"按任意键结束~^u^~";
                    if(kbhit()){
                        MessageBox(NULL,"游戏已结束"," ",MB_OK);
                        Sleep(3000);
                        return 0; 
                    } 
                    else{
                        system("cls");
                        cout<<"按任意键结束~^u^~";
                    }
                    system("COLOR F0");
                    return 0; 
                }
                else{
                    cout<<"你还没有拿到四个世界的宝藏哦!";
                    Sleep(1762);
                }
            } 
            else if(ycdt==true&&dtxz=="F"){
                cntcnt=0;
                cout<<"A.天启Ⅰ        B.天启Ⅱ        C.天启Ⅲ        D.天启Ⅳ";
                tianqixuanze3=getch();
                if(tianqixuanze3=='A'){
                    guaixue=290;
                    gxs=290;
                    wx=71;
                }
                else if(tianqixuanze3=='B'){
                    guaixue=400;
                    gxs=400;
                    wx=71;
                }
                else if(tianqixuanze3=='C'){
                    guaixue=520;
                    gxs=520;
                    wx=71;
                }
                else{
                    guaixue=640;
                    gxs=640;
                    wx=71;
                }
                kg3=2;
                while(1){ 
                    system("COLOR 03"); 
                    system("cls");
                    if(kg3+2+1>=73){
                        break;
                    } 
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg3;i++){
                        cout<<" ";
                    }
                    cout<<"你";
                    cout<<endl; 
                    for(int i=1;i<=168;i++){ 
                        cout<<"▉";
                    }
                    yidong3=getch();
                    if(yidong3=='a'){
                        kg3-=1;
                    }
                    else if(yidong3=='d'){
                        kg3+=1;
                    }
                    else if(yidong3=='s'){
                        string zhuangbei3;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"     ";
                        }
                        cin>>zhuangbei3;
                        if(zhuangbei3=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc7=false;
                            zc6=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    }
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        }
                    }  
                } 
                int dklpslboss3;
                while(1){
                    system("cls");
                    if(wx<=0){
                        cout<<"你输了!";
                        Sleep(1000);
                        break; 
                    }
                    else if(guaixue<=0){ 
                        srand((int)time(NULL));
                        yingcang=minn+rand()%(minnz-maxnz+1);
                        if(cntcnt<=5){
                            cout<<"锁定猎物";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(cntcnt<=7&&cnt>5){
                            cout<<"百步穿杨";
                            Sleep(1000);
                            system("cls");  
                        }
                        if(wx<=5){ 
                            cout<<"丝血反杀";
                            Sleep(1000);
                            system("cls"); 
                        }
                        if(yingcang==1){
                            cout<<"碎甲专家";
                            Sleep(1000);
                            system("cls"); 
                        }
                        system("cls");
                        cout<<"你赢了!(因此关是隐藏地图,所以金币加500)";
                        jinbi+=500;
                        Sleep(3000); 
                        break; 
                    }
                    for(int i=1;i<=wx;i++){
                        cout<<"★";
                    }
                    for(int i=1;i<=19;i++){ 
                        cout<<endl; 
                    }
                    for(int i=1;i<=kg3+7;i++){
                        cout<<" ";
                    }
                    cout<<"你"<<"         "<<"Notch 303("<<guaixue<<"/"<<gxs<<")";
                    cout<<endl; 
                    for(int i=1;i<=168;i++){  
                        cout<<"▉";
                    }
                    dklpslboss3=getch();
                    if(dklpslboss3=='w'){
                        cntcnt++;
                        if(zc1==true){
                            if(xw==true){
                                guaixue-=29;
                                wx-=21;
                            } 
                            else if(xm==true){
                                guaixue-=36;
                                wx-=14;
                            } 
                            else{ 
                                guaixue-=15;
                                wx-=25;
                            }
                        } 
                        else if(zc2==true){
                            guaixue-=4;
                            wx-=30;
                        }
                        else if(zc3==true){
                            guaixue-=8;
                            wx-=30;
                        }
                        else if(zc4==true){
                            guaixue-=8;
                            wx-=30;
                        }
                        else if(zc5==true){
                            if(yx==true){
                                guaixue-=20;
                                wx-=30;
                            }
                            else if(yt==true){
                                guaixue-=20;
                                wx-=30;
                            }
                            else{ 
                                srand((int)time(NULL));
                                ans2=minn+rand()%(maxn1-minn1+1);
                                if(ans2==1||ans2==2){
                                    guaixue-=30;
                                    wx-=30;
                                }
                                else{
                                    guaixue-=30;
                                    wx-=30;
                                }
                            }
                        }
                        else if(zc6==true){
                            if(hs==true){
                                guaixue-=30;
                                wx-=30;
                            }                               
                            else if(hw==true){
                                guaixue-=30;
                                wx-=30;
                            }
                            else{ 
                                guaixue-=30;
                                wx-=30;
                            }
                        }
                        else if(zc7==true){
                            guaixue-=30;
                            wx-=30;
                        }
                    }
                    else if(dklpslboss3=='s'){
                        string zhuangbei3;
                        if(c1==true){
                            cout<<c61<<"     ";
                        }
                        if(c2==true){
                            cout<<c62<<"     ";
                        }
                        if(c3==true){
                            cout<<c63<<"     ";
                        }
                        if(c4==true){
                            cout<<c64<<"     ";
                        }
                        if(c5==true){
                            cout<<c65<<"     ";
                        }
                        if(c6==true){
                            cout<<c66<<"     ";
                        }
                        if(c7==true){
                            cout<<c67<<"      ";    
                        }
                        cin>>zhuangbei3;
                        if(zhuangbei3=="z1"&&c1==true){
                            cout<<"已装备";
                            zc1=true;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;                                                                                          
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z2"&&c2==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=true;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000);
                        } 
                        else if(zhuangbei3=="z3"&&c3==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=true;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z4"&&c4==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=true;
                            zc5=false;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z5"&&c5==true){
                            cout<<"已装备";  
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=true;
                            zc6=false;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z6"&&c6==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=true;
                            zc7=false;
                            Sleep(1000); 
                        }
                        else if(zhuangbei3=="z7"&&c7==true){
                            cout<<"已装备";
                            zc1=false;
                            zc2=false;
                            zc3=false;
                            zc4=false;
                            zc5=false;
                            zc6=false;
                            zc7=true;
                            Sleep(1000); 
                        }
                    }
                    else{
                        if(cntj!=0){ 
                        wx+=25;
                        cntj--;
                        cout<<"已吃";
                        Sleep(1000); 
                        }
                        else{
                            cout<<"附魔金苹果吃完了";
                            Sleep(1000);
                        }
                    }                                
                }
            }
            } 
            else if(bbj=='B'){
                while(1){ 
                    system("cls");
                    cerr<<"20金币一次\n";
                    cerr<<"你有";
                    cerr<<jinbi;
                    char choujiang; 
                    cerr<<"个金币\n\n按H抽奖";
                    choujiang=getch();
                    if(choujiang=='H'){
                        if(jinbi>=20){
                            system("cls"); 
                            srand((int)time(NULL));
                            ans=minn+rand()%(maxn-minn+1);
                            if(ans==1){ 
                                cout<<"你抽到了 笑到最后 ";
                                c61="A.笑到最后";
                                c1=true;
                                Sleep(2000);
                                jinbi-=20;
                                break; 
                            }
                            else if(ans>=2&&ans<=3){
                                cout<<"你抽到了阔剑";
                                c62="B.阔剑";
                                c2=true; 
                                Sleep(2000);
                                jinbi-=20;
                                break; 
                            } 
                            else if(ans>=6&&ans<=8){
                                cout<<"你抽到了雷霆之锤";
                                c63="C.雷霆之锤";
                                c3=true;
                                Sleep(2000);
                                jinbi-=20;
                                break; 
                            } 
                            else if(ans==4||ans==5){
                                cout<<"你抽到了龙爪";
                                c64="D.龙爪";
                                c4=true;
                                Sleep(2000);
                                jinbi-=20;
                                break; 
                            } 
                            else if(ans==9){
                                cout<<"你抽到了 月神匕首 ";
                                c65="E.月神匕首";
                                c5=true;
                                Sleep(2000);
                                jinbi-=20;
                                break; 
                            } 
                            else if(ans==10){
                                cout<<"你抽到了 寒霜獠牙 ";
                                c66="F.寒霜獠牙";
                                c6=true;
                                Sleep(2000);
                                jinbi-=20;
                                break;
                            } 
                            else{
                            cout<<"你抽到了镐";
                                c67="G.镐";
                                c7=true;
                                Sleep(2000);
                                jinbi-=20;
                                break; 
                            } 
                        }
                        else{
                            system("cls"); 
                            cout<<"金币不足!";
                            Sleep(1000);
                            break; 
                        }
                    }
                }
            }
            else if(bbj=='C'){
                system("cls");
                char pifu; 
                while(1){ 
                    cout<<"A.笑到最后--五爪金龙(150金币)        B.笑到最后--梦幻火箭(160金币)        C.月神匕首--生命誓言(80金币)        D.月神匕首--特工banana(110金币)       \nE.寒霜獠牙--时之沙漏(120金币)        F.寒霜獠牙--百万伏特(90金币)        ";
                    cout<<"G.附魔金苹果(50金币)        H.退出";
                    pifu=getch();
                    if(pifu=='A'){
                        if(jinbi>=150&&c1==true){
                            system("cls"); 
                            cout<<"购买成功!";
                            Sleep(1000); 
                            jinbi-=150;
                            c1p1=true; 
                            break;
                        }
                        else{
                            system("cls");
                            cout<<"购买失败!";
                            Sleep(1000); 
                            break;
                        } 
                    }
                    else if(pifu=='B'){
                        if(jinbi>=160&&c1==true){
                            system("cls");
                            cout<<"购买成功!";
                            Sleep(1000);
                            jinbi-=160; 
                            c1p2=true;
                            break;
                        }
                        else{
                            system("cls");
                            cout<<"购买失败!";
                            Sleep(1000);
                            break; 
                        }
                    }
                    else if(pifu=='C'){
                        if(jinbi>=80&&c5==true){
                            system("cls");
                            cout<<"购买成功!";
                            Sleep(1000); 
                            jinbi-=80;
                            c5p1=true;
                            break;
                        }
                        else{
                            system("cls");
                            cout<<"购买失败!";
                            Sleep(1000); 
                            break;
                        } 
                    }
                    else if(pifu=='D'){
                        if(jinbi>=110&&c5==true){
                            system("cls");
                            cout<<"购买成功!";
                            Sleep(1000); 
                            jinbi-=110;
                            c5p2=true;
                            break;
                        }
                        else{
                            system("cls");
                            cout<<"购买失败!";
                            Sleep(1000); 
                            break;
                        } 
                    }
                    else if(pifu=='E'){
                        if(jinbi>=120&&c6==true){
                            system("cls");
                            cout<<"购买成功!";
                            Sleep(1000); 
                            jinbi-=120;
                            c6p1=true;
                            break;
                        }
                        else{
                            system("cls");
                            cout<<"购买失败!";
                            Sleep(1000); 
                            break;
                        } 
                    }
                    else if(pifu=='F'){
                        if(jinbi>=90&&c6==true){
                            system("cls");
                            cout<<"购买成功!";
                            Sleep(1000); 
                            jinbi-=90;
                            c6p2=true;
                            break;
                        }
                        else{
                            system("cls");
                            cout<<"购买失败!";
                            Sleep(1000); 
                            break;
                        } 
                    }
                    else if(pifu=='G'){
                        if(jinbi>=50){
                            system("cls");
                            cout<<"购买成功!";
                            Sleep(1000); 
                            jinbi-=50;
                            cntj++;
                            break;
                        }
                        else{
                            system("cls");
                            cout<<"购买失败!";
                            Sleep(1000); 
                            break;
                        }   
                    }
                    else
                        break;
                }
            }
            else{ 
                while(1){ 
                    system("cls"); 
                    if(c1p1==true){
                        cout<<"A.笑到最后--五爪金龙    ";
                    }
                    if(c1p2==true){
                        cout<<"B.笑到最后--梦幻火箭    ";                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
                    } 
                    if(c5p1==true){
                        cout<<"C.月神匕首--生命誓言    ";
                    }
                    if(c5p2==true){ 
                        cout<<"D.月神匕首--特工banana    ";
                    }
                    if(c6p1==true){
                        cout<<"E.寒霜獠牙--时之沙漏    ";
                    }
                    if(c6p2==true){
                        cout<<"F.寒霜獠牙--百万伏特    ";
                    }
                zuihouyigestring=getch();
                if(zuihouyigestring=="A"){
                    if(c1p1==true){ 
                        cout<<"已装备";
                        Sleep(1000); 
                        xw=true;
                        xm=false;
                        yx=false;
                        yt=false;           
                        hs=false;
                        hw=false;
                        break;
                    }
                    else{
                        cout<<"你没有这把武器";
                        Sleep(1000);
                        break;
                    }
                }
                else if(zuihouyigestring=="B"){
                    if(c1p2==true){ 
                    cout<<"已装备";
                    Sleep(1000); 
                    xw=false;
                    xm=true;
                    yx=false;
                    yt=false;
                    hs=false;
                    hw=false; 
                    break;
                    }
                    else{
                        cout<<"你没有这把武器";
                        Sleep(1000);
                        break;
                    } 
                }
                else if(zuihouyigestring=="C"){
                    if(c5p1==true){ 
                    cout<<"已装备";
                    Sleep(1000); 
                    xw=false;
                    xm=false;
                    yx=true;
                    yt=false;
                    hs=false;
                    hw=false;
                    break;
                    }
                    else{
                        cout<<"你没有这把武器";
                        Sleep(1000);
                        break;
                    } 
                }
                else if(zuihouyigestring=="D"){
                    if(c5p2==true){ 
                    cout<<"已装备";
                    Sleep(1000); 
                    xw=false;
                    xm=false;
                    yx=false;
                    yt=true;
                    hs=false;
                    hw=false;
                    break;
                    }
                    else{
                        cout<<"你没有这把武器";
                        Sleep(1000);
                        break;
                    } 
                }
                else if(zuihouyigestring=="E"){
                    if(c6p1==true){ 
                    cout<<"已装备";
                    Sleep(1000); 
                    xw=false;
                    xm=false;
                    yx=false;
                    yt=false;
                    hs=true;
                    hw=false;
                    break;
                    }
                    else{
                        cout<<"你没有这把武器";
                        Sleep(1000);
                        break;
                    } 
                }
                else if(zuihouyigestring=="F"){
                    if(c6p2==true){ 
                        cout<<"已装备";
                        Sleep(1000); 
                        xw=false;
                        xm=false;
                        yx=false;
                        yt=false;
                        hs=false;
                        hw=true;
                        break;
                    }
                    else{
                        cerr<<"你没有这把武器";
                        Sleep(1000);
                        break;
                    } 
                }
                else
                    break;
            } 
        }
    } 
    return 0;
}

 


0
已采纳
丁博扬
丁博扬
中级天翼
中级天翼

厉害,这代码太长了,你写了多长时间啊?大佬的世界,我一个弱鸡搞不懂

0
李致远
李致远
高级光能
高级光能

厉害!(太长了,本想帮你优化,结果c++未响应了。。。)

 

0
0
0
0
我要回答