Game

Super_Cube Legendary 2021-03-31 14:27:06 2021-04-01 14:44:29 3

我是一名洛谷搬运工

#include<iostream>
#include<string>
#include<windows.h> 
using namespace std;
int main(){
    bool kn=true,op=true,opq=true,lm=true,pdo=true,bq=true,bbq=true,bbbq=true,lock=true,first=false,second=false,third=false,lockk=false,lockkk=false,kops=false;
    int a,q,l,g=1,blood=3,qnb,z,lopa,poo,loo=1,nush=1;
    string uio,lpq;
    cout<<"欢迎来到暗夜寻踪(测试版)!输入1开始游戏"<<endl;
    Sleep(500);
    cin>>a;
    while(a==1){
        blood=3;
        nush=1;
        kops=false;
        kn=true;
        op=true;
        opq=true;
        lm=true;
        pdo=true;
        bq=true;
        bbq=true;
        bbbq=true;
        lock=true;
        first=false;
        second=false;
        third=false;
        lockk=false;
        lockkk=false;
        a=2;
        cout<<endl<<endl<<"电闪雷鸣。乌云用眼泪疯狂地拍着他,巨风也呼呼地叫着他名字。"<<endl;
        Sleep(500);
        cout<<"可这又有什么用——他还是再也没有醒过来了。"<<endl;
        Sleep(500);
        cout<<"警笛“呜呜”地响着,你匆匆地走下车,拿着你最厉害的手电筒。"<<endl;
        Sleep(500);
        cout<<"刚买的笔记本一夜就写满了,可那个可怜的生命却仍没记上千分之一。"<<endl;
        Sleep(500);
        cout<<"“他很孤僻的!”每个人都这么说。"<<endl;
        Sleep(500);
        cout<<"“我从未见过这么难的案子!”各个办案的侦探都毫无头绪。"<<endl;
        Sleep(500);
        cout<<"难道——真的没有办法了吗?"<<endl;
        Sleep(500);
        cout<<"别怕(我也相信你百分之九十都没有怕),这是个搞笑游戏……"<<endl;
        Sleep(500);
        cout<<"您一共有3滴血,受到伤害会减少一滴,当血量为0时角色将死亡"<<endl; 
        Sleep(500);
        while(kn){
            kn=false;
            cout<<"场景选择:"<<endl;
            Sleep(500);
            cout<<"破旧的小木屋(输入1);豪华的凶宅(输入2);沉寂凶险的海底城堡(输入3)"<<endl;
            Sleep(500);
            cin>>z;
            if(z==1){
                cout<<"进入游戏";
                Sleep(500);
                for(int i=1;i<=6;i++){
                    cout<<".";
                    Sleep(1000);
                }
                Sleep(500);
                cout<<endl;
                cout<<"提示:作案人名字为三个英文大写字母"<<endl;
                while(op){
                    if(blood==0){
                        cout<<"你倒在地上,身上四肢无力,脑子无法思索,不一会,你永远的闭上了眼睛。"<<endl;
                        Sleep(500);
                        cout<<"你成为了第2个倒在这间屋子的人"<<endl;
                        Sleep(500);
                        cout<<"你失败了"<<endl;
                        Sleep(500);
                        cout<<"是否重新启动游戏?(是;否)"<<endl;
                        Sleep(500);
                        while(opq){
                            opq=false;
                            cin>>lpq;
                            if(lpq==""){
                                blood=3;
                                g=1;
                                kn=true;
                                lm=true;
                                pdo=true;
                                op=true;
                                opq=true;
                                a=1;
                                bq=false;
                                bbq=false;
                                bbbq=false;
                                lock=false;
                                lockk=false;
                                lockkk=false;
                                break;
                            }else if(lpq==""){
                                return 0;
                            }else{
                                cout<<"输入错误,请重新输入"<<endl;
                                Sleep(500);
                                opq=true;
                            }
                        }
                        if(bq==false) break;
                    }
                    Sleep(500);
                    cout<<"请输入:"<<endl;
                    Sleep(500);
                    cout<<"警察署(输入1);寻找线索(输入2);定案(输入3);查找血量(输入4);查看提示(你有"<<nush<<"次机会可以看提示)(输入5);结束游戏(输入0)"<<endl; 
                    Sleep(500);
                    cin>>q;
                    if(q==1){
                        cout<<"照片(输入1);取东西(输入2);返回(输入0)"<<endl;
                        Sleep(500);
                        while(pdo){
                            pdo=false;
                            cin>>l;
                            if(l==1){
                                if(kops==false){
                                    cout<<"照片居然上了锁!好奇怪啊……"<<endl;
                                    Sleep(500);
                                    cout<<"没办法去找其他的吧"<<endl;
                                    Sleep(500);
                                    pdo=true;
                                    break; 
                                }
                                if(g==1){
                                    cout<<"你打开了信封,里面有这样一张照片:"<<endl;
                                    Sleep(500);
                                    cout<<"*****************"<<endl;
                                    cout<<"*               *"<<endl;
                                    cout<<"*   **     **   *"<<endl;
                                    cout<<"*  ****   ****  *"<<endl;
                                    cout<<"*   **     **   *"<<endl;
                                    cout<<"*               *"<<endl;
                                    cout<<"*****************"<<endl;
                                    Sleep(500);
                                    cout<<"我们还在相纸里找到了字母'L'"<<endl;
                                    Sleep(500);
                                    cout<<"也许是作案人名字之一吧"<<endl;
                                    Sleep(500);
                                    cout<<"我们把它放回了信封"<<endl;
                                    Sleep(500);
                                    pdo=true;
                                    first=true;
                                    loo++;
                                    break;
                                }else{
                                    cout<<"你再次打开信封,却看到了不一样的东西:一把钥匙!"<<endl;
                                    Sleep(500);
                                    cout<<"是谁放的呢?你思索着,还打开了照片,却发现照片变了样:"<<endl;
                                    Sleep(500);
                                    cout<<"*****************"<<endl;
                                    cout<<"*               *"<<endl;
                                    cout<<"*               *"<<endl;
                                    cout<<"*               *"<<endl;
                                    cout<<"*               *"<<endl;
                                    cout<<"*               *"<<endl;
                                    cout<<"*****************"<<endl;
                                    Sleep(500);
                                    cout<<"图像呢?你发现照片上的图像不见了"<<endl;
                                    Sleep(500);
                                    cout<<"却失手把照片掉的了旁边的灯台上"<<endl;
                                    Sleep(500);
                                    cout<<"你连忙拿起来,照片却没有一丝被烧毁的迹象"<<endl;
                                    Sleep(500);
                                    cout<<"照片却变成了这样:"<<endl;
                                    Sleep(500);
                                    cout<<"*****************"<<endl;
                                    cout<<"*  *         *  *"<<endl;
                                    cout<<"*   **     **   *"<<endl;
                                    cout<<"*     ** **     *"<<endl;
                                    cout<<"*       *       *"<<endl;
                                    cout<<"*       *       *"<<endl;
                                    cout<<"*****************"<<endl;
                                    Sleep(500);
                                    cout<<"看起来是一个'Y'!"<<endl;
                                    Sleep(500);
                                    cout<<"这里还有一瓶药!!!"<<endl; 
                                    Sleep(500);
                                    cout<<"生命水?!?"<<endl;
                                    Sleep(500);
                                    cout<<"喝喝看吧。。。"<<endl;
                                    Sleep(500);
                                    cout<<"生命加一。"<<endl;
                                    Sleep(500);
                                    loo++;
                                    lock=false;
                                    pdo=true;
                                    second=true;
                                    blood++;
                                    break;
                                }
                            }else if(l==2){
                                cout<<"有你的一封信!"<<endl;
                                Sleep(500);
                                cout<<"你拿起来看了一眼:"<<endl;
                                Sleep(500); 
                                cout<<"钥……片……"<<endl;
                                Sleep(500); 
                                cout<<"这代表了什么呢?"<<endl;
                                Sleep(500); 
                                cout<<"这里有把钥匙!!!"<<endl;
                                Sleep(500); 
                                cout<<"能开哪里呢???"<<endl;
                                Sleep(500);
                                loo++;
                                kops=true; 
                                pdo=true;
                                break;
                            }else if(l==0){
                                pdo=true;
                                break;
                            }else{
                                cout<<"输入错误,请重新输入"<<endl;
                                pdo=true; 
                            }
                        }
                    }else if(q==2){
                        cout<<"去厨房(输入1);去厕所(输入2);去车库(输入3);返回(输入0)"<<endl;
                        Sleep(500);
                        cin>>l;
                        if(l==1){
                            if(lockk==false){
                                cout<<"这里上锁了进不去!"<<endl;
                                Sleep(500); 
                            }else{
                                cout<<"突然周围画面突变"<<endl;
                                Sleep(500);
                                cout<<"‘进入游戏世界’"<<endl;
                                Sleep(500);
                                cout<<"有一个机械的女声说,"<<endl;
                                Sleep(500);
                                cout<<"你上前去,想观察发生了什么事,"<<endl;
                                Sleep(500);
                                cout<<"但是突然后方狂风呼啸"<<endl;
                                Sleep(500);
                                cout<<"你猛一转头发现一个机械女武者,"<<endl;
                                Sleep(500);
                                cout<<"请输入:"<<endl;
                                Sleep(500);
                                cout<<"躲开(输入1);接下(输入2);投降(输入3)"<<endl;
                                Sleep(500);
                                cin>>lopa;
                                if(lopa==1){
                                    cout<<"你躲开了攻击,却掉入了一个洞,摔死了"<<endl;
                                    Sleep(500);
                                    cout<<"血量减1"<<endl;
                                    Sleep(500);
                                    blood--;
                                }else if(lopa==2){
                                    cout<<"你接了攻击,在她的刀上扒拉下来了一个钥匙状的东西,却被她的攻击打爆了"<<endl;
                                    Sleep(500);
                                    cout<<"血量减1"<<endl;
                                    Sleep(500);
                                    blood--;
                                    lockkk=true;
                                    loo++;
                                }else if(lopa==3){
                                    cout<<"你被她带入了一个房间"<<endl;
                                    Sleep(500);
                                    cout<<"她开启了电击!!!"<<endl;
                                    Sleep(500);
                                    cout<<"你被电屎了"<<endl;
                                    Sleep(500);
                                    cout<<"血量减1"<<endl;
                                    Sleep(500);
                                    blood--;
                                }
                            }
                        }else if(l==2){
                            cout<<"你来到了厕所看见了一坨棕色的奥力给"<<endl;
                            Sleep(500);
                            cout<<"吃它!(输入1);走开调查马桶(输入2);返回(输入0)"<<endl;
                            Sleep(500);
                            while(lm){
                                lm=false;
                                cin>>qnb;
                                if(qnb==1){
                                    if(lockkk==false){
                                        cout<<"那竟然是幻觉!"<<endl;
                                        Sleep(5000);
                                        lm=true;
                                        break;
                                    }
                                    cout<<"味道针不戳!"<<endl;
                                    Sleep(500);
                                    cout<<"居然发现了一张纸条!"<<endl;
                                    Sleep(500);
                                    cout<<"上面写着:"<<endl;
                                    Sleep(500);
                                    cout<<"新的机关已经开启,厕所即将坍塌,请尽快离开。"<<endl;
                                    Sleep(500);
                                    cout<<"你立刻冲出厕所,厕所果然在你冲出去后一秒内坍塌了"<<endl;
                                    Sleep(500);
                                    cout<<"好险……"<<endl;
                                    Sleep(500);
                                    cout<<"新的机关指什么呢?怎么办呢?去哪调查呢?"<<endl;
                                    Sleep(500);
                                    g=2;
                                    lm=true;
                                    loo++;
                                    break;
                                }else if(qnb==2){
                                    cout<<"你发现了马桶边上的血迹,"<<endl; 
                                    Sleep(500);
                                    cout<<"你打开手电筒查看,"<<endl;
                                    Sleep(500);
                                    cout<<"却发现那光滑如镜的马桶上有一个人,"<<endl;
                                    Sleep(500);
                                    cout<<"你转过头去,"<<endl;
                                    Sleep(500);
                                    cout<<"却被一拳击倒了,"<<endl;
                                    Sleep(500);
                                    cout<<"昏迷中看见一个女鬼,"<<endl;
                                    Sleep(500);
                                    cout<<"身上有把钥匙,"<<endl;
                                    Sleep(500);
                                    cout<<"你不顾一切地在回到出生点的前0.000000000001秒拿走了钥匙。"<<endl;
                                    Sleep(500);
                                    cout<<"血量减1"<<endl;
                                    Sleep(500);
                                    blood--;
                                    lockk=true;
                                    lm=true;
                                    loo++;
                                    break;
                                }else if(qnb==0){
                                    lm=true;
                                    break;
                                }else{
                                    cout<<"输入错误,请重新输入"<<endl;
                                    Sleep(500);
                                    lm==true;
                                }
                            }
                        }else if(l==3){
                            if(lock){
                                cout<<"这里上锁了进不去!"<<endl;
                                Sleep(500); 
                            }else{
                                cout<<"车库里灯光幽暗宁静无声,你连自己的脚步声都听不到"<<endl;
                                Sleep(500);
                                cout<<"难道你已经变成鬼魂了吗?"<<endl;
                                Sleep(500);
                                cout<<"你看着身后自己毫无生气躺在地上的身体,感叹了一句:"<<endl;
                                Sleep(500);
                                cout<<"也许这就是进入车库的代价吧……"<<endl;
                                Sleep(500);
                                cout<<"突然,你发现了一个牌子,上述:"<<endl;
                                Sleep(500);
                                cout<<"你可以回魂,但是要进入这个机器,你就没法看到线索了"<<endl;
                                Sleep(500);
                                cout<<"你想念你的家人,于是进入了机器里"<<endl;
                                Sleep(500);
                                cout<<"你却看到机器里有两个按钮"<<endl;
                                Sleep(500);
                                cout<<"1.生命减一,有惊喜 2.直接回去"<<endl;
                                Sleep(500);
                                cout<<"选择吧……"<<endl;
                                Sleep(500);
                                cout<<"没办法修改了……"<<endl;
                                Sleep(500); 
                                cin>>poo;
                                if(poo==1){
                                    cout<<"你感到了疼痛感"<<endl;
                                    Sleep(500);
                                    cout<<"看来是‘血契’生效了"<<endl;
                                    Sleep(500); 
                                    cout<<"你默默地忍受着"<<endl;
                                    Sleep(500); 
                                    cout<<"就在回魂的前一刻"<<endl;
                                    Sleep(500); 
                                    cout<<"你好像听到了谁在低沉地说'R'这个字母"<<endl;
                                    Sleep(500); 
                                    cout<<"好像集齐了吔"<<endl;
                                    Sleep(500); 
                                    cout<<"血量减1"<<endl;
                                    Sleep(500); 
                                    third=true; 
                                    blood--;
                                }else{
                                    cout<<"你在一片失忆中传回了身体里……"<<endl;
                                    Sleep(500); 
                                    cout<<"也许你不再想回去车库了……"<<endl;
                                    Sleep(500);
                                }
                            }
                        }
                    }else if(q==3){
                        cout<<"你认为的罪犯的名字是:"<<endl;
                        Sleep(500);
                        cin>>uio;
                        if(uio=="LYR"){
                            if(first&&second&&third){
                                cout<<"恭喜您,您获得了胜利!【重新开始请输入1;查看案件详情请输入2;退出请输入3】"<<endl;
                                Sleep(500);
                                cin>>a; 
                                if(a==1){
                                    blood=3;
                                    g=1;
                                    kn=true;
                                    lm=true;
                                    op=true;
                                    opq=true;
                                    pdo=true;
                                    bq=false;
                                    bbq=false;
                                    bbbq=false;
                                    lock=false;
                                    lockk=false;
                                    lockkk=false;
                                    break;
                                }else if(a==2){
                                    cout<<"********************"<<endl;
                                    cout<<"*                  *"<<endl;
                                    cout<<"* *   *     * ***  *"<<endl;
                                    cout<<"* *    *   *  *  * *"<<endl;
                                    cout<<"* *     ***   ***  *"<<endl;
                                    cout<<"* *      *    * *  *"<<endl;
                                    cout<<"* ***    *    *  * *"<<endl;
                                    cout<<"*                  *"<<endl;
                                    cout<<"********************"<<endl;
                                    Sleep(500);
                                    cout<<"LYR:"<<endl;
                                    Sleep(500);
                                    cout<<"资深电脑C++程序猿,因程序报错而发狂,冲进小木屋而攻击木屋主人……"<<endl;
                                    Sleep(500);
                                    cout<<"………………好了编不动了"<<endl;
                                    Sleep(500);
                                    cout<<"再见了……"<<endl;
                                    Sleep(500);
                                    return 0;
                                }else if(a==3){
                                    return 0;
                                }   
                            }else{
                                if(!first&&second&&third){
                                    cout<<"小伙纸,你没找到第一个线索哦,是不是蒙的?"<<endl;
                                }else if(first&&!second&&third){
                                    cout<<"小伙纸,你没找到第二个线索哦,是不是蒙的?"<<endl;
                                }else if(first&&second&&!third){
                                    cout<<"小伙纸,你没找到第三个线索哦,是不是蒙的?"<<endl;
                                }else if(!first&&!second&&third){
                                    cout<<"小伙纸,你没找到第一和第二个线索哦,是不是蒙的?"<<endl;
                                }else if(!first&&second&&!third){
                                    cout<<"小伙纸,你没找到第一和第三个线索哦,是不是蒙的?"<<endl;
                                }else if(first&&!second&&!third){
                                    cout<<"小伙纸,你没找到第二和第三个线索哦,是不是蒙的?"<<endl;
                                }else if(!first&&!second&&!third){
                                    cout<<"小伙纸,你没找到第一和第二和第三个线索哦,是不是蒙的?"<<endl;
                                }
                            }
                        }else{
                            cout<<"错了哦,您因为寻找错误被伤到,失去一滴血"<<endl;
                            Sleep(500);
                            blood--;
                        }
                    }else if(q==4){
                        cout<<"您还剩"<<blood<<"点血"<<endl;
                    }else if(q==5){
                        if(nush==0){
                            cout<<"你没有机会看提示了"<<endl;
                            Sleep(500);
                        }else{
                            if(loo==1){
                                cout<<"也许应该去取一下东西……"<<endl;
                                Sleep(500);
                                nush--;
                            }else if(loo==2){
                                cout<<"也许可以去找一下相片……"<<endl;
                                Sleep(500);
                                nush--;
                            }else if(loo==3){
                                cout<<"也许可以去厕所找一下马桶……"<<endl;
                                Sleep(500);
                                nush--;
                            }else if(loo==4){
                                cout<<"也许可以去一下厨房……"<<endl;
                                Sleep(500);
                                nush--;
                            }else if(loo==5){
                                cout<<"也许可以再去看一下照片……"<<endl;
                                Sleep(500);
                                nush--;
                            }else if(loo==6){
                                cout<<"也许可以去一下车库……"<<endl;
                                Sleep(500);
                                nush--;
                            }
                        }
                    }else if(q==0){
                        return 0;
                    }else{
                        cout<<"输入错误,请重新输入"<<endl;
                        Sleep(500);
                    }
                    if(bq==false) break;
                }
                if(bbq==false) break;
            }else if(z==2){
                cout<<"暂未开放!"<<endl;
                Sleep(500);
                cout<<"返回场景选择"<<endl;
                Sleep(500);
                kn=true;
            }else if(z==3){
                cout<<"暂未开放!"<<endl;
                Sleep(500);
                cout<<"返回场景选择"<<endl;
                Sleep(500);
                kn=true;
            }else{
                cout<<"输入错误,请重新输入"<<endl;
                Sleep(500);
                kn=true;
            }
        }
    }
}
{{ vote && vote.total.up }}

共 3 条回复

JupHamaster 木星拜

原地

OIer (Orz加长版

null him

原地

Orz

Xionghaoyu straight a student

啊这