问题标题: 酷町堂:亡灵战争2.0

0
0
已解决
赵泰来
赵泰来
高级光能
高级光能
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#include<sstream>
using namespace std;
long long xue=100,ji=0,qian=0,mutou=2,xian=0,jian=1,nu=1,dao=1,gong=1,x;
string c="";
long long wlg=20,wlx=30,jsg=50,jsx=50;
void ks(){
    cout<<"传说天地间有一个黑龙,它无恶不作";
    Sleep(1000);
    system("CLS");
    cout<<"一天,它出现了!人们拼命抵挡它,可以失败告终";
    Sleep(1000);
    system("CLS");
    cout<<"人们只好呆在安全基地里,不敢出去";
    Sleep(1000);
    system("CLS");
    cout<<"疾病突然爆发了,人们一个接着一个的死去";
    Sleep(1000);
    system("CLS");
    cout<<"只剩下你";
    Sleep(1000);
    system("CLS");
    while(1){
        cout<<"要出去吗\n1.出去  2.呆在基地";
        int a;
        cin>>a;
        if(a==1){
            system("CLS");
            cout<<"恭喜你,逃过一劫";
            Sleep(100);
            system("CLS");
            cout<<"走着走着,遇到一个悬崖,怎么过?\n1.武功秘籍  2.跳过去";
            int b;
            cin>>b;
            if(b==1){
                system("CLS");
                cout<<"你细细学习,学成飞天后,回头一看,那武功秘籍……是假的!你摔死了……";
                Sleep(3000);
                system("CLS");
                continue;
            }else{
                system("CLS"); 
                cout<<"你轻轻一跳,发现头上竟然有一个《超级玛丽》的幸运方块,他长出了藤蔓,你顺着藤蔓,爬了过去";
                Sleep(3000);
                system("CLS");
                cout<<"你遇到了恶龙!对决开始!";
                Sleep(1000);
                system("CLS");
                cout<<"你要干什么?\n1.杀 2.闪 3.决斗 4.角色技能 5.八卦阵"; 
                int c;
                cin>>c;
                if(c!=6){
                    system("CLS");
                    cout<<"你当这是三国杀啊!";
                    Sleep(1000);
                    continue; 
                }else{
                    cout<<"六六大神赐予我力量吧!!";
                    Sleep(3000);
                    system("CLS");
                    cout<<"   *******"<<endl;
                    cout<<"  *       *"<<endl;
                    cout<<" *    66   *    [·]>>>> "<<endl;
                    cout<<" *   之力  *   |-|||||||| <-龙 "<<endl;
                    cout<<"  *       *"<<endl;
                    cout<<"   *******"<<endl;
                    Sleep(1);
                    system("CLS");
                    cout<<"    *******"<<endl;
                    cout<<"   *       *"<<endl;
                    cout<<"  *    66   *   [·]>>>> "<<endl;
                    cout<<"  *   之力  *  |-|||||||| <-龙 "<<endl;
                    cout<<"   *       *"<<endl;
                    cout<<"    *******"<<endl;
                    Sleep(1);
                    system("CLS");
                    cout<<"     *******"<<endl;
                    cout<<"    *       *"<<endl;
                    cout<<"   *    66   *  [·]>>>> "<<endl;
                    cout<<"   *   之力  * |-|||||||| <-龙 "<<endl;
                    cout<<"    *       *"<<endl;
                    cout<<"     *******"<<endl;
                    Sleep(1);
                    system("CLS");
                    system("CLS");
                    cout<<"      *******"<<endl;
                    cout<<"     *       *"<<endl;
                    cout<<"    *    66   * [·]>>>> "<<endl;
                    cout<<"    *   之力  *|-|||||||| <-龙 "<<endl;
                    cout<<"     *       *"<<endl;
                    cout<<"      *******"<<endl;
                    Sleep(1);
                    system("CLS");
                    cout<<"龙挂了,遗言是:再厉害的BOOS也打不过开挂的人 ";
                    Sleep(1000);
                    system("CLS");
                    break;
                }
            }
        }else{
            cout<<"你被病死了";
            continue;
        }
    }
    Sleep(3000);
    cout<<"但事情没有结束,你回去时,发现死去的同伴不见了\n";
    cout<<"只有一张纸条:亡灵战争……开始了!";
    Sleep(3000);
    system("CLS");
}
void ck(){
    cout<<"你有"<<c<<" 木头:"<<mutou<<" 线"<<xian<<" "<<qian<<"元";
    Sleep(3000);
    system("CLS");
}
void zz(){
    cout<<"你要作什么\n1.剑 3个木头 2.刀 2个木头 3.弓 3个木头 1根线 4.弩 10个木头 3根线";
    int a;
    cin>>a;
    if(a==1){
        if(jian==0&&mutou>=3){
            cout<<"制作成功";
            jian=1;
            mutou-=3;
            c+=" 1剑";
            Sleep(100);
            system("CLS");
        }else{
            cout<<"无效"; 
            Sleep(100);
            system("CLS");
        }
    }
    if(a==2){
        if(dao==0&&mutou>=2){
            cout<<"制作成功";
            dao=1;
            mutou-=3;
            c+=" 2刀";
            Sleep(100);
            system("CLS");
        }else{
            cout<<"无效"; 
            Sleep(100);
            system("CLS");
        }
    }
    if(a==3){
        if(gong==0&&mutou>=3&&xian>=1){
            cout<<"制作成功";
            gong=1;
            mutou-=1;
            xian-=1;
            c+=" 3弓";
            Sleep(100);
            system("CLS"); 
        }else{
            cout<<"无效";
            Sleep(100);
            system("CLS");
        }
    }
    if(a==4){
        if(nu==0&&mutou>=10&&xian>=3){
            cout<<"制作成功";
            nu=1;
            mutou-=4;
            xian-=1;
            c+=" 4弩";
            Sleep(100);
            system("CLS");
        }else{
            cout<<"无效"; 
            Sleep(100);
            system("CLS");
        }
    }
} 
void sc(){
    cout<<"你要买什么?1.木头 10元 2.线 50元";
    int a;
    cin>>a; 
    if(a==1&&qian>=10){
        cout<<"购买成功";
        qian-=10;
        mutou++;
    }
    if(a==2&&qian>=50){
        cout<<"购买成功";
        qian-=50;
        xian++;
    }
    Sleep(100);
    system("CLS");
}
void wq(){
    cout<<"你要用什么武器\n"<<c;
    int a;
    cin>>a;
    if(a==1&&jian==1){
        ji+=40;
        cout<<"装备成功";
        x=1;
        Sleep(100);
        system("CLS");
    }else if(a==2&&dao==1){
        ji+=30;
        cout<<"装备成功";
        x=2;
        Sleep(100);
        system("CLS");
    }else if(a==3&&gong==1){
        ji+=50;
        cout<<"装备成功";
        x=3;
        Sleep(100);
        system("CLS");
    }else if(a==4&&nu==1){
        ji+=100;
        cout<<"装备成功";
        x=4;
        Sleep(100);
        system("CLS");
    }else{
        cout<<"你没有这件武器";
        Sleep(100);
        system("CLS");
    }
}
void wl(){
    while(1){
        cout<<"亡灵飞了过来!\n你要干什么\n1.攻击 2.我跑";
        int a;
        cin>>a;
        if(a==1){
            if(x==1){
                cout<<"吃我一剑\n";
                cout<<"            ^"<<endl;
                cout<<"           | |"<<endl;
                cout<<"           | |"<<endl;
                cout<<"           | |"<<endl;
                cout<<"         | |"<<endl;
                cout<<"            -----"<<endl; 
                cout<<"(  ▼∪▼)  |"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一剑\n\n\n\n\n\n\n"; 
                cout<<"(  ▼∪▼)--|========> 》》》》》》》》∑亡灵'";
                Sleep(1000);
                system("CLS");
            }else if(x==2){
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)---////////////////";
                Sleep(1);
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼) ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)  ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)   ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)    ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)     ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)      ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)       ---////////////////∑亡灵'";
                Sleep(1000);
                system("CLS");
            }else if(x==3){
                cout<<"吃我一弓\n"<<endl;
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼) -|--|->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"               |\\"<<endl; 
                cout<<"               | \\"<<endl;
                cout<<"(  ▼∪▼)   |--|-->"<<endl;
                cout<<"             | /"<<endl;
                cout<<"             |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  | -|--->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n"<<endl;
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  | ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |  ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |   ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |    ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |     ---->∑亡灵'"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
            }else if(x==4){
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->-->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->--->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  -----------> ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->  ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->   ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->    ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->     ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->      ---->∑亡灵'"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1000);
                system("CLS");
            }
            wlx-=ji;
        }else{
            cout<<"逃跑失败\n"; 
        }
        if(wlx<=0){
            cout<<"亡灵挂了";
            qian+=1;
            ji=0; 
            Sleep(1000);
            system("CLS");
            break;
        }
        cout<<"亡灵攻击!你血量减少20";
        xue-=wlg;
        Sleep(1000);
        system("CLS");
    }

}
void js(){
    while(1){
        cout<<"僵尸扑了过来!\n你要干什么\n1.攻击 2.我跑\n"; 
        int a;
        cin>>a;
        if(a==1){
            system("CLS");
            if(x==1){
                cout<<"吃我一剑\n";
                cout<<"            ^"<<endl;
                cout<<"           | |"<<endl;
                cout<<"           | |"<<endl;
                cout<<"           | |"<<endl;
                cout<<"         | |"<<endl;
                cout<<"            -----"<<endl; 
                cout<<"(  ▼∪▼)  |";
                Sleep(1);
                system("CLS");
                cout<<"吃我一剑\n\n\n\n\n\n\n"; 
                cout<<"(  ▼∪▼)--|========> 》》》》》》》》∑僵尸'";
                Sleep(1000);
                system("CLS");
            }else if(x==2){
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)---////////////////";
                Sleep(1);
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼) ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)  ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)   ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)    ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)     ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)      ---////////////////";
                system("CLS");
                cout<<"吃我一刀\n";
                cout<<"(  ▼∪▼)       ---////////////////∑僵尸'";
                Sleep(1000);
                system("CLS");
            }else if(x==3){
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼) -|--|->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"               |\\"<<endl; 
                cout<<"               | \\"<<endl;
                cout<<"(  ▼∪▼)   |--|-->"<<endl;
                cout<<"             | /"<<endl;
                cout<<"             |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  | -|--->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n"<<endl;
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  | ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |  ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |   ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |    ---->"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
                cout<<"吃我一弓\n";
                cout<<"              |\\"<<endl; 
                cout<<"              | \\"<<endl;
                cout<<"(  ▼∪▼)  |  |     ---->∑僵尸'"<<endl;
                cout<<"            | /"<<endl;
                cout<<"            |/"<<endl; 
                Sleep(1);
                system("CLS");
            }else if(x==4){
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n"<<endl;
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->-->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->--->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  -----------> ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->  ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n"<<endl;
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->   ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->    ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->     ---->"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1);
                system("CLS");
                cout<<"吃我一弩\n";
                cout<<"                        \\"<<endl;
                cout<<"(  ▼∪▼)  ----------->      ---->∑僵尸'"<<endl;
                cout<<"            /         /"<<endl;
                Sleep(1000);
                system("CLS");
            }
            jsx-=ji;
        }else{
            cout<<"逃跑失败"; 
        }
        if(jsx<=0){
            cout<<"僵尸挂了";
            qian+=2;
            ji=0;
            Sleep(1000);
            system("CLS");
            break;
        }
        cout<<"僵尸攻击!你血量减少50";
        Sleep(1000);
        system("CLS");
        xue-=jsg;
    }

}
void gj(){
    wq(); 
    cout<<"你要到哪去/n1.亡灵之地 2.僵尸空岛";
    int a;
    cin>>a;
    if(a==1){
        cout<<"已到达";
        Sleep(100);
        system("CLS");
        wl();
    }
    if(a==2){
        cout<<"已到达";
        Sleep(100);
        system("CLS");
        js();
    }
}
void yx(){
    while(1){
        xue=100,qian=0,ji=0;
        ks(); 
        while(1){
            cout<<"你要干什么?\n1.工作台 2.商城 3.仓库 4.出去";
            int a;
            cin>>a;
            if(a==1){
                zz();
            }
            if(a==2){
                sc();
            }
            if(a==3){
                ck();
            }
            if(a==4){
                gj();
            }
        }
    }
}
int main(){
    yx();
    return 0;
}

修复BUG


0
已采纳
张恩泽
张恩泽
高级天翼
高级天翼

额......几个小时没看问答,变化那么大

0
0
0
我要回答