跳到正文

个人记录

失落之城盗版

lzh009约 39 分钟
原文
文章信息与版本

文章信息

发布
2023年5月26日
收录
2025年12月12日
更新
2026年11月13日
篇幅
约 39 分钟

版本

  1. v1当前

失落之城盗版 原版请见失落之城-最终版

代码
                                              失落之城
C++
#include<bits/stdc++.h>
#include<windows.h>
#include<cstdlib>
using namespace std;
long long s=1 ,x=1,a; 
long long gjl=1e9000,fyl=1e9000,xl=1e9000,jb=1e9000,dj=1e9000;
int cw=1e9000,cwdj=1e9000;
int jy=1e9000;
int wjn=1e9000;
int jnd=1e9000;
int wdjn[6]={0,0,0,0,0,0};
int gg[19]={1,5,15,35,55,75,95,115,135,155,175,195,215,235,255,500,750,1000,10000};
int ll[19]={1,5,15,35,55,75,95,115,135,155,175,195,215,235,255,500,750,1000,10000};
int yy[19]={15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,1000,1250,1500,15000};
void srand(unsigned int seed);
long long pt=1e9000,xy=1e9000,ss=1e9000,cq=1e9000;
long long f=1e9000; 
void print(char a[]);
void wwdjn();
void cww();
void zz();
void start();
void hjnd(){
    system("cls");
    cout<<"金币:"<<jb<<endl;
    print("+-------------------+");
    print("|        |_|        |");
    print("|                   |");
    print("|===================|");
    print("|===================|");
    print("!___________________!");
    print("1.电击宝箱    500金币");
    print("2.雷电宝箱   1000金币");
    cin>>a;
    int t1=time(NULL)%10+1;
    if(a==1){
        if(jb<500)MessageBox(NULL,"金币不足!","提醒",MB_OK);
        else{
            jb-=500;
            print("技能点:");
            cout<<t1*2<<"张"<<endl;
            jnd+=t1*2;
        }
    }else if(a==2){
        if(jb<0)MessageBox(NULL,"金币不足!","提醒",MB_OK);
        else{
            jb-=1000;
            print("技能点:");
            cout<<t1*5<<"张"<<endl;
            jnd+=t1*5;
        }
    }
    system("pause");
    wwdjn();
}
void gmjn(){
    while(1){
        system("cls");
        cout<<"金币:"<<jb<<endl;
        cout<<
        "购买"<<endl<<
        "1.治疗术 1000金币"<<endl<<
        "2.狂暴 1000金币"<<endl<<
        "3.控制 1000金币"<<endl<<
        "4.净化 1000金币"<<endl<<
        "5.金元宝 1000金币"<<endl<<
        "6.返回"<<endl;
        cin>>a;
        if(a==6)wwdjn();
        else{
            if(jb<0)MessageBox(NULL,"金币不足!","提醒",MB_OK);
            else{
                cout<<"购买成功!";
                jb-=1000;
                wdjn[0]=1;
                wdjn[a]=1;
                system("pause");
            }
        } 
    }
}
void wwdjn(){
    while(1){
        system("cls");
        cout<<"我的技能:"<<endl;
        if(wdjn[0]==0)cout<<"无"<<endl;
        if(wdjn[1]!=0)cout<<"1.治疗术:每回合增加血量"<<wdjn[1]*5<<"%"<<endl<<"等级:"<<wdjn[1]<<"级"<<endl;
        if(wdjn[2]!=0)cout<<"2.狂暴:每回合攻击伤害增加"<<wdjn[2]*5<<"%"<<endl<<"等级:"<<wdjn[2]<<"级"<<endl;
        if(wdjn[3]!=0)cout<<"3.控制:怪兽攻击力减"<<wdjn[3]*5<<"%"<<endl<<"等级:"<<wdjn[3]<<"级"<<endl;
        if(wdjn[4]!=0)cout<<"4.净化:当血量小于50%,暴击概率增加"<<wdjn[4]*5<<"%"<<endl<<"等级:"<<wdjn[4]<<"级"<<endl;
        if(wdjn[5]!=0)cout<<"5.金元宝:战斗结束后,你可以额外获得"<<wdjn[5]*10<<"%"<<"的金币"<<endl<<"等级:"<<wdjn[5]<<"级"<<endl;
        cout<<"装备技能:";
        if(wjn==0)cout<<"无"<<endl;
        else if(wjn==1)cout<<"治疗术"<<endl;
        else if(wjn==2)cout<<"狂暴"<<endl;
        else if(wjn==3)cout<<"控制"<<endl;
        else if(wjn==4)cout<<"净化"<<endl;
        else if(wjn==5)cout<<"金元宝"<<endl;
        cout<<
        "技能点:"<<jnd<<endl<<
        "1.购买技能"<<endl<<
        "2.获取技能点"<<endl<<
        "3.升级技能"<<endl<<
        "4.装备技能"<<endl<<
        "5.返回"<<endl;
        cin>>a;
        if(a==5)zz();
        else if(a==1){
            gmjn();
        }else if(a==2){
            hjnd();
        }else if(a==3){
            system("cls");
            cout<<"升级耗费50点技能点"<<endl<<
            "1.治疗术"<<endl<<
            "2.狂暴"<<endl<<
            "3.控制"<<endl<<
            "4.净化"<<endl<<
            "5.金元宝"<<endl<<
            "选择技能:";
            cin>>a;
            if(wdjn[a]>9)MessageBox(NULL,"已经满级啦!","提醒",MB_OK);
            else{
                if(jnd<50)MessageBox(NULL,"技能点不足!","提醒",MB_OK);
                else{
                    jnd-=50;
                    wdjn[a]++;
                    cout<<"成功!"<<endl;
                    system("pause");
                }
            }
        }else if(a==4){
            cout<<
            "1.治疗术"<<endl<<
            "2.狂暴"<<endl<<
            "3.控制"<<endl<<
            "4.净化"<<endl<<
            "5.金元宝"<<endl<<
            "选择技能:";
            cin>>a;
            if(wdjn[0]!=0){
                if(wdjn[a]!=0)wjn=a;
            }
        }
    }
}
void my_pet(){
    while(1){
        system("cls");
        if(cw==1){
            cout<<
            "╭︿︿︿╮"<<endl<<
            "{/-■■-/}"<<endl<<
            " ( (oo) )" <<endl<< 
            "  ︶︶︶ "<<endl<<
            "技能:猪猪粘液"<<endl<<
            "让敌人攻击力、防御力减半(%15)"<<endl;
        }else if(cw==2){
            cout<<
            "■■■■■■■■"<<endl<<
            "■            ■"<<endl<<
            "■  ■    ■  ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■■■■■■■■"<<endl<<
            "技能:屁卡球冲撞"<<endl<<
            "让敌人眩晕,暂停一回合(%10)"<<endl;
        }else if(cw==3){
            cout<<
            " ______________________"<<endl<<
            "|                      |"<<endl<<
            "| B        B         B |"<<endl<<
            "| U  404   U   404   U |"<<endl<<
            "| G        G         G |"<<endl<<
            "|______________________|"<<endl<<
            "技能:黑客入侵"<<endl<<
            "恢复至原始血量(%10)"<<endl;
        }
        cout<<"1.返回"<<endl;
        cin>>a;
        if(a==1)cww();
    }
}
void buy_pet(){
    while(1){
    system("cls");
    cout<<"金币:"<<jb<<endl;
    print("宠物商店");
    print(" ___________________");
    print("/                   \\");
    print("|    商      店     |");
    print("|                   |");
    print("|        __         |");
    print("!_______|__|________!");
    print("1.猪zhu     1000金币");
    print("2.屁卡球     1000金币");
    print("3.祖传BUG    1000金币");
    print("4.返回");
    cin>>a;
    if(a==4){
        cww();
    }else{
        if(MessageBox(NULL,"购买后以前的宠物将消失","警告",MB_OKCANCEL)==1){
            if(jb<1000){
                MessageBox(NULL,"金币不足!","提醒",MB_OK);
            }else{
                cout<<"购买成功!";
                system("pause");
                cw=a;
                dj=1;
                jb-=1000;
            }
        }
    }
    }
}
void cww(){
    system("cls");
    print("宠物屋");
    print("1.我的宠物");
    print("2.购买宠物");
    print("3.返回");
    cin>>a;
    if(a==1) my_pet();
    else if(a==2) buy_pet();
    else if(a==3) zz();
}
void ggg(){
    system("cls");
    cout<<
    "欢迎您找到了盗版游戏,如有不满请拨打举报电话:54188"<<endl; 
    system("pause");
    zz();
}
void cs(){
    system("cls");
    while(1){ 
    system("cls");
    print("普通碎片:");
    cout<<pt<<"张"<<endl;
    print("稀有碎片:");
    cout<<xy<<"张"<<endl;
    print("史诗碎片:");
    cout<<ss<<"张"<<endl;
    print("传奇碎片:");
    cout<<cq<<"张"<<endl;
    print(" ___________________");
    print("/                   \\");
    print("|    黑      市     |");
    print("|                   |");
    print("|        __         |");
    print("!_______|__|________!");
    print("1.普通碎片      5金币");
    print("2.稀有碎片     15金币");
    print("3.史诗碎片     30金币");
    print("4.传奇碎片     45金币");
    print("5.返回");
    cin>>a;
    if(a==5){
        zz();
    }else{
        int t;
        print("出售数量:");
        cin>>t;
        switch(a){
            case 1:{
                if(pt-t<0){
                    cout<<"碎片不足!"<<endl;
                }else{
                    pt-=t;
                    jb+=t*5;
                    cout<<"金币+"<<t*15<<endl;
                }
                break;
            } 
            case 2:{
                if(xy-t<0){
                    cout<<"碎片不足!"<<endl;
                }else{
                    xy-=t;
                    jb+=t*15;
                    cout<<"金币+"<<t*50<<endl;
                }
                break;
            }
            case 3:{
                if(ss-t<0){
                    cout<<"碎片不足!"<<endl;
                }else{
                    ss-=t;
                    jb+=t*30;
                    cout<<"金币+"<<t*75<<endl;
                }
                break;
            }
            case 4:{
                if(cq-t<0){
                    cout<<"碎片不足!"<<endl;
                }else{
                    cq-=t;
                    jb+=t*45;
                    cout<<"金币+"<<t*100<<endl;
                }
                break;
            }
        }
        system("pause"); 
    }
    }
}
void zd(){
    system("cls"); 
    print("前往什么世界?(1.火世界 2.水世界 3.黑暗世界 4.风世界)");
    cin>>a;
    if(a>4||a<1)zd();
    int shx=a;
    system("cls");
    print("正在前往中......");
    Sleep(1);
    system("cls");
    print("到达!");
    system("pause");
    system("cls");
    print("输入怪兽等级(0~17):");
    cin>>a;
    if(a>18)zd();
    int yl=yy[a];
    while(1){
        if(wjn==1)xl=xl+xl/20*wdjn[1];
        if(xl>100+(10*(dj/10)))xl=100+(10*(dj/10));
        int jl=int(rand()%100)+1;
        int kk;
        int t=time(NULL)%10+1;
        int tt=time(NULL)%10+1;
        cout<<"1.攻击 2.逃跑"<<endl;
        cout<<"你的血量:"<<xl<<endl;
        cout<<"怪兽血量:"<<yl<<endl;
        if(shx==1)cout<<"怪兽属性:火"<<endl;
        if(shx==2)cout<<"怪兽属性:水"<<endl;
        if(shx==3)cout<<"怪兽属性:暗"<<endl;
        cin>>kk;
        if(kk==2) zz();
        else{
            if(cw==3&&jl<=10) xl=100+(10*(dj/10)),cout<<"黑客入侵!"<<endl;
            int gj=gjl;
            int ggj=gg[a];
            if(shx==1&&(tt==1||tt==2||tt==3))gj=0,cout<<"你被怪兽眩晕了!暂停一回合。"<<endl;
            if(shx==2&&(tt==1||tt==2||tt==3||tt==4))gj/=2,cout<<"怪兽用水冲你,你的攻击力和防御力只有50%"<<endl;
            if(shx==3&&(tt==1||tt==2||tt==3||tt==4))ggj*=2,cout<<"怪兽强化!攻击力*2"<<endl;
            if(wjn==2)gj=gj+gj/20*wdjn[2];
            if(wjn==3)ggj=ggj-ggj/20*wdjn[3];
            if(wjn==4&&xl<=50)t=time(NULL)%(10-wdjn[4])+1;
            if(t==1) gj=gjl+gjl/2,cout<<"暴击!"<<endl;
            if(tt==10) ggj=gg[a]+gg[a]/2,cout<<"怪兽暴击!"<<endl;
            if(cw==1&&jl<=15) yl/=2,ggj/=2,cout<<"粘液!"<<endl;
            if(cw==2&&jl<=10) ggj=0,cout<<"屁卡球冲撞!"<<endl;
            if(ll[a]/2<=gj){
                yl-=gj;
            }
            if(shx==4&&(tt==1||tt==2||tt==3||tt==4))cout<<"怪兽速度快如风!无视防御力"<<endl;
            else{
                if(fyl/2<=ggj){
                    if(shx==2&&tt==1)xl+=fyl/4;
                    else xl+=fyl/2;
                }
            } 
            xl-=ggj;
            cout<<"造成"<<gj<<"点伤害"<<endl;
            cout<<"受到"<<ggj<<"点伤害"<<endl;
            if(xl<=0){
                print("失败!");
                jb+=t;
                if(wjn==5){
                    t=t+t/10*wdjn[5],cout<<"金元宝!"<<endl;
                }
                cout<<"金币+"<<t<<endl;
                cout<<"经验+"<<0<<endl;
                system("pause");
                zz();   
            }
            if(yl<=0){
                print("胜利!");
                jb+=tt*(a+2);
                jy+=a*25;
                if(wjn==5){
                    tt=tt+tt/10*wdjn[5],cout<<"金元宝!"<<endl;
                }
                cout<<"金币+"<<tt*(a+2)<<endl;
                cout<<"经验+"<<a*25<<endl;
                system("pause");
                zz();
            }

        }
    }
}
void hc(){
    while(1){ 
    system("cls");
    print("普通碎片:");
    cout<<pt<<"张"<<endl;
    print("稀有碎片:");
    cout<<xy<<"张"<<endl;
    print("史诗碎片:");
    cout<<ss<<"张"<<endl;
    print("传奇碎片:");
    cout<<cq<<"张"<<endl;
    print("/*******************\\");
    print("|                   |");
    print("|     Good luck!    |");
    print("|                   |");
    print("!___________________!");
    print("  /               \\");
    print("1.普通合成     15碎片");
    print("2.稀有合成     15碎片");
    print("3.史诗合成     15碎片");
    print("4.传奇合成     15碎片");
    print("5.返回");
    cin>>a;
    int t=time(NULL)%2;
    if(a==1&&pt>=15){
        pt-=15;
        if(t){
            print("普通 攻击");
            gjl+=15;
        }else{
            print("普通 防御");
            fyl+=15;
        }
        system("pause");
    }else if(a==2&&xy>=15){
        xy-=15;
        if(t){
            print("稀有 攻击");
            gjl+=45;
        }else{
            print("稀有 防御");
            fyl+=45;
        }
        system("pause");
    }else if(a==3&&ss>=15){
        ss-=15;
        if(t){
            print("史诗 攻击");
            gjl+=75;
        }else{
            print("史诗 防御");
            fyl+=75;
        }
        system("pause");
    }else if(a==4&&cq>=15){
        cq-=15;
        if(t){
            print("传奇 攻击");
            gjl+=100;
        }else{
            print("传奇 防御");
            fyl+=100;
        }
        system("pause");
    }else if(a==5){
        zz();
    }else{
        print("碎片不够!"); 
    }
    }
}
void hd(){
    while(1){
    system("cls");
    cout<<"金币:"<<jb<<endl;
    print("+-------------------+");
    print("|        |_|        |");
    print("|                   |");
    print("|===================|");
    print("|===================|");
    print("!___________________!");
    print("1.普通宝箱     50金币");
    print("2.稀有宝箱    100金币");
    print("3.史诗宝箱    250金币");
    print("4.传奇宝箱    500金币");
    print("5.返回");
    cin>>a;
    int t1=time(NULL)%10+1;
    int t2=time(NULL)%50+1;
    if(a==1&&jb>=50){
        jb-=50; 
        print("普通碎片:");
        cout<<t1*2<<"张"<<endl;
        pt+=t1*2;
        if(t1==10){
            print("稀有碎片:");
            print("3张");
            xy+=3;
        }
        if(t2==50){
            print("史诗碎片:");
            print("1张");
            ss+=1;  
        } 
        system("pause");
    }else if(a==2&&jb>=100){
        jb-=100;
        print("稀有碎片:");
        cout<<t1*2<<"张"<<endl;
        xy+=t1*2;
        if(t1==10){
            print("史诗碎片:");
            print("3张");
            ss+=3;
        }
        if(t2==50){
            print("传奇碎片:");
            print("1张");
            cq+=1;  
        } 
        system("pause");
    }else if(a==3&&jb>=250){
        jb-=250;
        print("史诗碎片:");
        cout<<t1*2<<"张"<<endl;
        ss+=t1*2;
        if(t1==10){
            print("传奇碎片:");
            print("3张");
            cq+=3;
        }
        system("pause");
    }else if(a==4&&jb>=500){
        jb-=500;
        print("传奇碎片:");
        cout<<t1*2<<"张"<<endl;
        cq+=t1*2;
        system("pause");
    }else if(a==5){
        zz();
    }else{
        print("金币不够!"); 
    }
    }
}
void zz(){
    while(1){
        system("cls");
        if(jy>99){
            dj+=jy/100;
            jy=jy%100;
        }
        cout<<
        "失落之城-盗版货"<<endl<< 
        "呼呼~   呼呼~   呼呼~   \n课上的你睡得好香"<<endl<<
        "攻击力:"<<gjl<<endl<<
        "防御力:"<<fyl<<endl<<
        "血量:"<<xl<<"(每十级血量上升10%)"<<endl<<
        "等级:"<<dj<<endl<<
        "金币:"<<jb<<endl<<
        "经验:"<<jy<<endl;
        print("普通碎片:");
        cout<<pt<<"张"<<endl;
        print("稀有碎片:");
        cout<<xy<<"张"<<endl;
        print("史诗碎片:");
        cout<<ss<<"张"<<endl;
        print("传奇碎片:");
        cout<<cq<<"张"<<endl;
        cout<<
        "                      "<<endl<< 
        "1.战斗|热血沸腾"<<endl<<
        "2.回血|医院欢迎您(15元)"<<endl<<
        "3.获得碎片|淘金大作战"<<endl<<
        "4.合成|圣盾、宝剑(塑料做的)"<<endl<<
        "5.出售|money!"<<endl<<
        "6.公告|你自己看吧"<<endl<<
        "7.宠物屋|卡哇伊!"<<endl<<
        "8.我的技能|再也不怕怪兽啦!"<<endl<<
        "9.外挂|金币+oo"<<endl; 
        if(xl<=0)cout<<"生命垂危!请及时回血!"<<endl; 
        cin>>a;
        if(a==1){
            if(xl<=0){
                MessageBox(NULL,"生命垂危!请及时回血!","警告",MB_OK);
            }else zd();
        }else if(a==2){
            if(jb>=15){
                system("cls");
                print("回血成功!");
                jb-=15;
                xl=100+(10*(dj/10));
                system("pause");
            }else{
                system("cls");
                print("金币不足!");
                Sleep(100);
            }
        }else if(a==3){
            hd();
        }else if(a==4){
            hc();
        }else if(a==9){
            if(MessageBox(NULL,"1","1",MB_YESNO)==6){
                print("外挂生效"); 
                jb+=10000000;
                cq+=10000000;
                jnd+=10000000;
                gjl+=1000;
                fyl+=1000;
                system("pause");
            }else print("哼!请遵守游戏规则!!"),system("pause");
        }else if(a==5){
            cs();
        }else if(a==6){
            ggg();
        }else if(a==7){
            cww();
        }else if(a==8){
            wwdjn();
        }
    }
    return;
}
void dd(){
    system("cls");
    print("失落之城-盗版货");
    system("pause");
    print(" n 年前,老师的  作业  堆满了地球……");
    Sleep(500);
    print("(现在的你是否有同感呢?)");
    Sleep(500);
    print("所有的孩子全都逃离了地球");
    Sleep(500);
    print(" 违禁品  的能量就要没了"); 
    Sleep(500);
    print("你能否打败作业呢?注意只有一直笔,一盏灯");
    Sleep(500);
    print("你能否用一个夜晚,点亮这盏灯,使用这支笔,创造一个奇迹呢?");
    system("pause");
    system("cls");
    cout<<"进入家园.";
    Sleep(800);
    system("cls");
    cout<<"进入家园..";
    Sleep(250);
    system("cls");
    cout<<"进入家园...";
    Sleep(250);
    system("cls");
    cout<<"进入家园.";
    Sleep(250);
    system("cls");
    cout<<"进入家园..";
    Sleep(250);
    system("cls");
    cout<<"进入家园...";
    Sleep(250);
    system("cls");
    cout<<"加载完毕!";
    system("pause");
    system("cls");
    zz();
}
void get(){
    freopen("c.txt","r",stdin);
    int i=0;
    while(1){
        i++;
        float ttt=2;
        cin>>ttt;
        if(ttt==0){
            fclose(stdin);
            break;
            return;
        }
        switch(i){
            case 1:{
                cin>>s>>x;
                break;
            }
            case 2:{
                cin>>gjl>>fyl>>xl>>dj>>jb>>jy;
                break;
            }
            case 3:{
                cin>>pt>>xy>>ss>>cq;
                break;
            }
            case 4:{
                cin>>cw>>cwdj;
                break;
            }
            case 5:{
                cin>>wjn>>jnd;
                break;
            }
            case 6:{
                for(int j=0;j<=5;j++)cin>>wdjn[j];
                break;
            }
            case 7:{
                cin>>f;
                break;
            }
        }
    }
    fclose(stdin);
    return;
}
int main(){
    system("title 失落之城-盗版货!!!!!!!");
    MessageBox(NULL,"欢迎来到“失落之城”,请先确认您的游戏是不是盗版,如是盗版,请拨打举报电话:54188","来自“小黑子的提醒”",MB_OKCANCEL); 
    start();
    dd();
    return 0;
} 
void print(char a[]){
    int t=strlen(a);
    for(int i=0;i<=t;i++){
        cout<<a[i];
        Sleep(10);
    }
    cout<<endl;
}
void start(){
    print("");
    print("■■■■■■■■");
    print("■            ■");
    print("■  ■    ■  ■");
    print("■            ■");
    print("■            ■");
    print("■            ■");
    print("■■■■■■■■");
    system("cls");
    int sssss=2;
    while(sssss--){
        system("cls");
        cout<<
            "■■■■■■■■"<<endl<<
            "■            ■"<<endl<<
            "■  ■    ■  ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■■■■■■■■"<<endl;
        Sleep(300);
        system("cls");
        cout<<endl;
        cout<<
            "■■■■■■■■"<<endl<<
            "■            ■"<<endl<<
            "■  ■    ■  ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■■■■■■■■"<<endl;
        Sleep(300);
    }
    system("cls");
    cout<<
            "■■■■■■■■"<<endl<<
            "■            ■"<<endl<<
            "■  ^     ^   ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■            ■"<<endl<<
            "■■■■■■■■"<<endl;
    print("欢迎");
    system("pause");
}
原文