首页 > 其他 > 详细

新手教程完成

时间:2020-05-21 14:23:38      阅读:42      评论:0      收藏:0      [点我收藏+]

新手教程已完成,想要 exe 就 email 我<2393014054@qq.com>

2020-05-21 13:59:23

技术分享图片
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
int xinshou(){
    int fangyu=0,shengmin=20,gongji=10,tili=15,sudu=10;
    int choose,user_input,qiangzhigongji;
    int rjfangyu,rjshengmin,rjgongji,rjtili,rjsudu,rjshangxian;
    srand(time(NULL));
    cout<<"你发现了";
    Sleep(1500); 
    rjfangyu=rand()%(9-7+1)+7;
    rjshengmin=rand()%(50-35+1)+35;
    rjgongji=rand()%(7-5+1)+5;
    rjshangxian=rand()%(13-10+1)+10;
    rjsudu=rand()%(9-5+1)+5;
    rjtili=rjshangxian;
    user_input=getchar();
start:
    cout<<"怪物"<<endl;
    cout<<"1.查看其属性(选择可查看怪物属性)"<<endl;
    cout<<"2.查看自身属性(选择可查看主角属性)"<<endl;
    cout<<"3.防御(选择可加强一点防御属性,并减少3体力)"<<endl;
    cout<<"4.攻击(选择可伤害怪物生命,受怪物防御影响,并减少1体力)"<<endl;
    cout<<"5.技能(选择可查看所有技能)"<<endl;
    cout<<"6.结束此回合(选择可结束操作,轮到怪物攻击)"<<endl;
    if(tili>0) {
        cin>>choose;
        system("cls");
        switch(choose) {
            case 1:
                goto a1;
                break;
            case 2:
                goto a2;
                break;
            case 3:
                goto a3;
                break;
            case 4:
                goto a4;
                break;
            case 5:
                goto a5;
                break;
            case 6:
                goto a6;
                break;
            default:
                goto start;

        }

    } else {
        cout<<"你的体力已耗尽,轮到怪物了"<<endl;
        Sleep(1500);
        choose=rand()%(4-1+1)+1;
        switch(choose) {
            case 1:
                cout<<"怪物:哈哈,天道好轮回,苍天饶过谁!" <<endl;
                break;
            case 2:
                cout<<"怪物:哈哈,待我长发及腰,你已成夜宵!" <<endl;
                break;
            case 3:
                cout<<"怪物:哈哈,今朝有酒今朝醉,大铁锅里两行泪!" <<endl;
                break;
            case 4:
                cout<<"怪物:哈哈,有缘千里来相会,我要你的心肝肺!" <<endl;
                break;
            default:
                goto start;

        }
        rjtili=rjshangxian;
        Sleep(1500);
        system("cls");
        goto rjhuihe;

    }
a1:
    cout<<"皮糙肉厚,却略微笨拙的怪物"<<endl;
    cout<<"防御:"<<rjfangyu<<endl;
    cout<<"生命:"<<rjshengmin<<endl;
    cout<<"攻击:"<<rjgongji<<endl;
    cout<<"体力:"<<rjtili<<endl;
    cout<<"速度:"<<rjsudu<<endl;
    Sleep(2000);
    system("cls");
    goto start;

a2:
    cout<<"防御:"<<fangyu<<endl;
    cout<<"生命:"<<shengmin<<endl;
    cout<<"攻击:"<<gongji<<endl;
    cout<<"体力:"<<tili<<endl;
    cout<<"速度:"<<sudu<<endl;
    Sleep(2000);
    system("cls");
    goto start;

a3:
    if(tili>=3) {
        cout<<"你强化了防御"<<endl;
        tili=tili-3;
        fangyu++;
        Sleep(1500);
        system("cls");
        goto start;
    } else {
        cout<<"体力不支了"<<endl;
        Sleep(1500);
        system("cls");
        goto start;
    }

a4:
    qiangzhigongji=rand()%(2-1+1)+1;
    if(gongji-rjfangyu>0) {
        cout<<"你打出一击"<<endl;
        cout<<"造成了"<<gongji-rjfangyu<<"点伤害"<<endl;
        rjshengmin=rjshengmin+rjfangyu-gongji;

    } else {
        cout<<"你打出一击,却连怪物的鳞片都打不烂,只能踹出一脚,造成" <<qiangzhigongji<<"点伤害" <<endl;
        rjshengmin=rjshengmin-qiangzhigongji;

    }
    tili--;
    Sleep(1500);
    system("cls");
    if(rjshengmin>0) {
        goto start;

    } else goto rjdie;
a5:
    cout<<"技能列表" <<endl;
    cout<<"1.诅咒之术(减少对方体力上限,减少4体力)"<<endl;
    cout<<"2.祝福之术(恢复3生命,提升2攻击,提升1防御,减少5体力)"<<endl;
    cout<<"3.返回"<<endl;
    cin>>choose;
    switch(choose) {
        case 1:
            goto jineng1;
            break;
        case 2:
            goto jineng2;
            break;
        case 3:
            system("cls");
            goto start;
            break;
        default:
            goto a5;

    }

a6:
    choose=rand()%(4-1+1)+1;
        switch(choose) {
            case 1:
                cout<<"怪物:哈哈,天道好轮回,苍天饶过谁!" <<endl;
                break;
            case 2:
                cout<<"怪物:哈哈,待我长发及腰,你已成夜宵!" <<endl;
                break;
            case 3:
                cout<<"怪物:哈哈,今朝有酒今朝醉,大铁锅里两行泪!" <<endl;
                break;
            case 4:
                cout<<"怪物:哈哈,有缘千里来相会,我要你的心肝肺!" <<endl;
                break;
            default:
                goto start;

        }
        rjtili=rjshangxian;
        Sleep(1500);
        system("cls");
        goto rjhuihe;

rjhuihe:
    choose=rand()%(2-1+1)+1;
    if(rjtili>0) {
        switch(choose) {
            case 1:
                goto rj1;
                break;
            case 2:
                goto rj2;
                break;
            default:
                goto rjhuihe;

        }

    } else
        cout<<"怪物的体力已耗尽,轮到你了"<<endl;
    tili=15;
    Sleep(1500);
    system("cls");
    goto start;

rj1:
    if(rjtili>=3) {
        cout<<"怪物的鳞片更坚硬了"<<endl;
        rjfangyu++;
        rjtili=rjtili-3;
        Sleep(1500);
        system("cls");
        goto rjhuihe;

    } else goto rjhuihe;

rj2:
    qiangzhigongji=rand()%(2-1+1)+1;
    if(rjgongji-fangyu>0) {
        cout<<"怪物朝你扑来,造成了" <<rjgongji-fangyu<<"点伤害" <<endl;
        shengmin=shengmin+fangyu-rjgongji;

    } else {
        cout<<"怪物朝你扑来,却连你的盔甲都抓不烂,只能一巴掌拍飞你,造成" <<rand()%(2-1+1)+1<<"点伤害" <<endl;
        shengmin=shengmin-qiangzhigongji;

    }
    rjtili--;
    Sleep(1500);
    system("cls");
    if(shengmin>0) {
        goto rjhuihe;

    } else goto die;
rjdie:
    cout<<"怪物倒飞了出去,再也没有站起来......"<<endl;
    Sleep(1500);
    cout<<"你,赢了";
    Sleep(1500);
    cout<<"我:太棒了!";
    Sleep(1500);
    user_input=getchar();
    return 0;

die:
    cout<<"怪物的爪子扎进了你的心脏,你缓缓倒在了血泊中......"<<endl;
    Sleep(1500);
    cout<<"你,输了";
    Sleep(1500);
    cout<<"我:这也太难了吧。";
    Sleep(1000);
    cout<<"我:只能重来了。";
    Sleep(1000);
    goto start;

jineng1:
    if(tili>=4) {
        if(rjshangxian>2) {
            cout<<"怪物变得虚弱"<<endl;
            rjshangxian--;
            tili=tili-4;
            Sleep(1500);
            system("cls");
            goto start;

        } else {
            cout<<"怪物已经虚弱得不能再虚弱了"<<endl;
            Sleep(1500);
            system("cls");
            goto start;

        }
    } else {
        cout<<"体力不支了"<<endl;
        Sleep(1500);
        system("cls");
        goto start;
    }

jineng2:
    if(tili>=5) {
        cout<<"你感觉一道圣光照在你身上,你的伤口有所愈合,肌肉也更坚韧了"<<endl;
        shengmin=shengmin+3;
        gongji=gongji+2;
        fangyu++;
        tili=tili-5;
        Sleep(1500);
        system("cls");
        goto start;
    } else {
        cout<<"体力不支了"<<endl;
        Sleep(1500);
        system("cls");
        goto start;
    }
    return 0;
}
int main() {
    int choose,user_input,cishu;
    srand(time(NULL));
    cout<<"温馨提示(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"此游戏过程中,请不要乱按回车键(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"否则会错过很多剧情(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"好的(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"现在(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"正片开始(按回车以继续)";
    user_input=getchar();
    system("cls");
    Sleep(1000); 
    for(cishu=1; cishu<=5; cishu++) {
        Sleep(500);
        cout<<"12:30 a.m." ;
        Sleep(500);
        system("cls");
    }
    Sleep(1500);
    cout<<"深夜了(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"小区居民楼的一间卧室里(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"传来了敲击键盘的声音(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"我:喔呼!,《混乱世界》终于发售了!(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"我:以前看到他们玩内测版是真的羡慕啊,终于可以亲自体验一把了!(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"兴奋地运行了下载软件(按回车以继续)";
    user_input=getchar();
    system("cls");
    for(cishu=1; cishu<=99; cishu++) {
        cout<<"正在检查更新"<<cishu<<"%";
        Sleep(100);
        if(cishu!=99) {
            system("cls");
        }
    }
    Sleep(1500);
    system("cls");
    cout<<"更新完成(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"主页(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"搜索"<<endl;
    cout<<" "<<endl;
    cout<<"最热   最新   推荐"<<endl;
    cout<<"(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"搜索   混(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"搜索   混乱(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"搜索   混乱世(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"搜索   混乱世界(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"混乱世界  12G  30元(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"支付中...";
    Sleep(1500);
    system("cls");
    cout<<"支付完成(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"连接中";
    Sleep(1500);
    system("cls");
    cout<<"连接完成(按回车以继续)";
    user_input=getchar();
    system("cls");
    for(cishu=1; cishu<=99; cishu++) {
        cout<<"下载中"<<cishu<<"%";
        Sleep(200);
        if(cishu!=99) {
            system("cls");
        }
    }
    Sleep(1500);
    system("cls");
    cout<<"下载完成!(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"混乱世界.exe(按回车以继续)";
    user_input=getchar();
    system("cls");
    cout<<"欢迎进入";
    Sleep(500);
    system("cls");
    cout<<"欢迎进入 混";
    Sleep(500);
    system("cls");
    cout<<"欢迎进入 混乱";
    Sleep(500);
    system("cls");
    cout<<"欢迎进入 混乱世";
    Sleep(500);
    system("cls");
    cout<<"欢迎进入 混乱世界";
    Sleep(500);
    system("cls");
jinjiaocheng:
    cout<<"1.开始新手教程"<<endl;
    cout<<"2.开始新的冒险"<<endl;
    cout<<"3.继续冒险"<<endl;
    cin>>choose;
    switch(choose) {
        case 1: {
            cout<<"欢迎来到新手教程"<<endl;
            Sleep(1000);
            system("cls");
            xinshou();
            break;
        }
        case 2: {
            cout<<"请先开始新手教程"<<endl;
            Sleep(1000);
            system("cls");
            goto jinjiaocheng;
            break;
        }
        case 3: {
            cout<<"没有检测到存档"<<endl;
            Sleep(1000);
            system("cls");
            goto jinjiaocheng;
            break;
        }
        default:
            goto jinjiaocheng;
    }
    return 0;
}
新手教程

 

新手教程完成

原文:https://www.cnblogs.com/Tianyu1105/p/12930382.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!