歹徒逃亡2

#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int bag[21];//1.钻石套装 2.经验之石(S)3.经验之石(M)4.经验之石(L)5.万能石 6.

void slowout(char* p)
{
    while (1)
    {
        if (*p != 0)
            printf("%c", *p++);
        else
            break;
        Sleep(100);
    }
}
int main()
{
    int xue = 1000, xmax = 1000, g = 300, f = 50, money = 500, exp = 0, lv = 1, lv1 = 1, kg = 0, hos = 0;
    int renwu = 0, total = 0;
    int ren[4];
    for (int ii = 1; ii <= 4; ii++)
        ren[ii] = 0;
    for (int ii = 1; ii <= 20; ii++)
        bag[ii] = 0;
    int a, b, c, d, e, h, i, j, k;
    int gxue, gg, gf;
    int di = 0, fs = 0;
    char name[20];
    int jn;
    printf("歹徒逃亡 2——魔法之城\n");
    Sleep(500);
    printf("2.0正式版\n");
    Sleep(1000);
    printf("额………………出品\n");
    Sleep(3000);
    system("cls");
    
    slowout("给自己取一个更帅的名字吧:");
    cin >> name;
    printf("%s,游戏开始!\n", name);
    Sleep(1000);
    system("cls");
    printf("歹徒逃亡系列第二部,全新启程!\n");
    Sleep(1000);
    system("cls");
    slowout("经过三天三夜的长途跋涉,你来到了M城\n");
    slowout("这时,一封信飘到了你手里。\n");
    printf("是否看信? 1.看信 2.不看\n");
    cin >> a;
    if (a == 1)
    {
        system("cls");
        slowout(" 来自作者的一封信\n");
        slowout(" 为了让第二部的游戏更好玩,我特意在编写M城时加入了魔法元素。\n");
        slowout(" 也就是说,这座城里的每个人都会魔法,都拥有各自的技能,包括路人。\n");
        slowout(" 所以,没有技能的你要小心了……祝你好运!(哈哈哈哈哈哈哈哈)\n\n\n\n\n\n");
        Sleep(1000);
        printf("输入任意数字退出\n");
        cin >> b;
    }
    system("cls");
    srand((unsigned)time(NULL));
a1:slowout("你要到哪里去?\n");
    printf("1.十字路口 2.商店 3.魔法部 4.国防部 5.银行 6.赌城 7.医院 8.背包 9.开挂 10.任务生成器 0.退出\n");
    if (xue > xmax) xue = xmax;
    cin >> a;
    if (a == 1)
    {
        int shi;
        shi = rand() % 10;
        if (shi == 0 || shi == 1)
        {
            printf("十字路口上来了一名路人\n");
            gxue = 400; gg = 150; gf = 20;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> b;
                if (b == 1)
                {
                    printf("你向路人发起攻击,路人减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        slowout("获得 100金币,50经验\n");
                        money += 100; exp += 50;
                        if (ren[1] == 1)
                            total++;
                        goto a2;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("路人使出了技能“回血”!增加血量100点!\n");
                            gxue += 100;
                            Sleep(1000);
                        }
                        printf("路人对你发起攻击,你减血%d滴", gg - f);
                        xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (b == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        if (shi == 2 || shi == 3)
        {
            printf("十字路口上来了一名路人\n");
            gxue = 400; gg = 150; gf = 20;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> b;
                if (b == 1)
                {
                    printf("你向路人发起攻击,路人减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n\n");
                        Sleep(1000);
                        slowout("获得 100金币,50经验\n");
                        money += 100; exp += 50;
                        if (ren[1] == 1)
                            total++;
                        goto a2;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("路人使出了技能“狂暴”!攻击力增强100!\n");
                            gg += 100;
                            Sleep(1000);
                        }
                        printf("路人对你发起攻击,你减血%d滴", gg - f);
                        xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (b == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        if (shi == 4 || shi == 5)
        {
            printf("十字路口上来了一名警察\n");
            gxue = 500; gg = 250; gf = 40;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> b;
                if (b == 1)
                {
                    printf("你向警察发起攻击,警察减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        slowout("获得 200金币,120经验\n");
                        money += 200; exp += 120;
                        if (ren[1] == 1)
                            total++;
                        goto a2;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("警察使出了技能“武装”!攻击力增强100,防御力增强50!\n");
                            gg += 100; gf += 50;
                            Sleep(1000);
                        }
                        printf("警察对你发起攻击,你减血%d滴", gg - f);
                        xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (b == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        if (shi == 6 || shi == 7)
        {
            printf("十字路口上来了一名盔甲警察\n");
            gxue = 650; gg = 300; gf = 100;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> b;
                if (b == 1)
                {
                    printf("你向盔甲警察发起攻击,盔甲警察减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        slowout("获得 350金币,250经验\n");
                        money += 350; exp += 250;
                        if (ren[1] == 1)
                            total++;
                        goto a2;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("盔甲警察使出了技能“护盾”!增加防御力100!\n");
                            gf += 100;
                            Sleep(1000);
                        }
                        printf("盔甲警察对你发起攻击,你减血%d滴", gg - f);
                        xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (b == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        if (shi == 8)
        {
            printf("十字路口上来了一辆装甲车!\n");
            gxue = 1500; gg = 650; gf = 200;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> b;
                if (b == 1)
                {
                    printf("你向装甲车发起攻击,装甲车减血%d滴", g - gf);
                    if (gf <= g)
                        gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        slowout("获得 700金币,500经验\n");
                        money += 700; exp += 500;
                        if (ren[1] == 1)
                            total++;
                        goto a2;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("装甲车使出了绝技“全副武装”!增加血量200点,攻击力150,防御力50!\n");
                            gxue += 200; gg += 150; gf += 50;
                            Sleep(1000);
                        }
                        printf("装甲车对你发起攻击,你减血%d滴", gg - f);
                        xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (b == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        if (shi == 9)
        {
            int tank = 0;
            printf("十字路口上来了一辆坦克!\n");
            gxue = 2200; gg = 900; gf = 300;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> b;
                if (b == 1)
                {
                    printf("你向坦克发起攻击,坦克减血%d滴", g - gf);
                    if (gf <= g)
                        gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        slowout("获得 1200金币,800经验\n");
                        money += 1200; exp += 800;
                        if (ren[1] == 1)
                            total++;
                        goto a2;
                    }
                    if (gxue > 0) {
                        jn = rand() % 4;
                        if (jn == 0)
                        {
                            printf("坦克使出了技能“炮击”!你被击中了!减血500滴!\n");
                            xue -= 500;
                            Sleep(1000);
                        }
                        if (jn == 1)
                        {
                            printf("坦克使出了绝技“炮火连天”!你受到灼烧伤害,每回合减血200滴!\n");
                            tank = 1;
                            Sleep(1000);
                        }
                        if (tank == 1)
                        {
                            printf("灼烧伤害中,减血200滴。\n");
                            xue -= 200;
                        }
                        printf("坦克对你发起攻击,你减血%d滴", gg - f);
                        xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (b == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        Sleep(1000);
        goto a1;
    }
    if (a == 2)
    {
        slowout("店老板:欢迎来到童叟无欺的信用商店。偶是老板blyat。你要买什么?\n");
        printf("1.经验之石(S) 500¥\n2.经验之石(M) 1000¥\n3.经验之石(L) 1800¥\n0.退出\n");
        cin >> b;
        if (b == 1)
        {
            if (money < 500)
                slowout("没钱就别来买东西!\n");
            else {
                slowout("购买成功!\n");
                money -= 500;
                bag[2]++;
                if (ren[2] == 1)
                    total++;
            }
        }
        if (b == 2)
        {
            if (money < 1000)
                slowout("没钱就别来买东西!\n");
            else {
                slowout("购买成功!\n");
                money -= 1000;
                bag[3]++;
                if (ren[2] == 1)
                    total++;
            }
        }
        if (b == 3)
        {
            if (money < 1800)
                slowout("没钱就别来买东西!\n");
            else {
                slowout("购买成功!\n");
                money -= 1800;
                bag[4]++;
                if (ren[2] == 1)
                    total++;
            }
        }
        Sleep(1000);
        goto a1;
    }
    if (a == 3)
    {
        slowout("任务:占领魔法部,可获得丰厚奖励! 1.开始挑战 2.变强后再来。(本任务中所加血量均是临时血量)\n");
        cin >> b;
        if (b == 1)
        {
            slowout("你走向魔法部,门卫拦住你,说:干什么的!\n");
            gxue = 450; gg = 300; gf = 50;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    printf("你向门卫发起攻击,门卫减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        Sleep(1000);
                        printf("加血100滴\n");
                        xue += 100;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("门卫使出了技能“天谴”!你减血200滴!\n");
                            xue -= 200;
                            Sleep(1000);
                        }
                        printf("门卫对你发起攻击,你减血%d滴", gg - f);
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
            slowout("你干掉门卫,继续前进。\n");
            slowout("一个从地上冒出来的黑衣人把你拦下了!\n");
            gxue = 700; gg = 450; gf = 100;
            int cr = 0, i = 0;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    if (cr == 1)
                        printf("你被缠绕住,不能攻击!\n");
                    if (cr == 0)
                    {
                        printf("你向黑衣人发起攻击,黑衣人减血%d滴", g - gf);
                        gxue -= g - gf;
                        printf(",剩余血量%d滴\n", gxue);
                    }
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        Sleep(1000);
                        printf("加血300滴。\n");
                        xue += 300;
                    }
                    if (gxue > 0) {
                        jn = rand() % 2;
                        if (jn == 0)
                        {
                            printf("黑衣人使出了技能“缠绕”!你在一回合内无法攻击!\n");
                            cr = 1;
                            i = 2;
                            Sleep(1000);
                        }
                        printf("黑衣人对你发起攻击,你减血%d滴", gg - f);
                        if (gg - f >= 0)
                            xue -= gg - f;
                        i--;
                        if (i <= 0)
                            cr = 0;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
            slowout("干掉黑衣人,继续前进。\n");
            slowout("你走进魔法部大楼,机器人警察准备对你发射激光束!\n");
            gxue = 800; gg = 400; gf = 150;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    printf("你向机器人警察发起攻击,机器人警察减血%d滴", g - gf);
                    if (gf <= g)
                        gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        Sleep(1000);
                        printf("加血500滴\n");
                        xue += 500;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("机器人警察使出了绝技“激光扫射”!你减血500滴!\n");
                            xue -= 500;
                            Sleep(1000);
                        }
                        printf("机器人警察对你发起攻击,你减血%d滴", gg - f);
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
            slowout("你走向走廊深处,魔法部议员出现在走廊尽头!\n");
            slowout("议员举起了魔杖!\n");
            int tt = 0, j = 0;
            gxue = 1100; gg = 600; gf = 150;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    printf("你向魔法部议员发起攻击,魔法部议员减血%d滴", g - gf);
                    if (gf <= g)
                        gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        Sleep(1000);
                        printf("加血1000滴\n");
                        xue += 1000;
                    }
                    if (gxue > 0) {
                        jn = rand() % 2;
                        if (jn == 0)
                        {
                            printf("魔法部议员使出了绝技“钻心刻骨”!你将在5回合内连续受到疼痛攻击!\n");
                            tt = 1; j = 6;
                            Sleep(1000);
                        }
                        if (tt == 1)
                        {
                            printf("疼痛伤害中,减血100滴。\n");
                            xue -= 100;
                        }
                        j--;
                        if (j <= 0)
                            tt == 0;
                        printf("魔法部议员对你发起攻击,你减血%d滴", gg - f);
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
            slowout("走廊尽头是一扇门,你走了进去\n");
            slowout("一进门,魔法部部长举起老魔杖(爱信不信)对准了你!\n");
            int k = 0, sleep = 0;
            gxue = 2200; gg = 1200; gf = 300;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    if (sleep == 1)
                        printf("你正在昏睡中,不能攻击!\n");
                    if (sleep == 0)
                    {
                        printf("你向BOSS魔法部部长发起攻击,BOSS魔法部部长减血%d滴", g - gf);
                        if (gf <= g)
                            gxue -= g - gf;
                        printf(",剩余血量%d滴\n", gxue);
                    }
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        Sleep(1000);
                        system("cls");
                        slowout("你占领了魔法部,获得:2000金币,1000经验!\n");
                        if (bag[1] == 0)
                        {
                            slowout("恭喜获得超级宝物:钻石套装\n已为你自动装备钻石套装,提升属性:血量+800,攻击力+400,防御力+100\n");
                            xmax += 800; g += 400; f += 100;
                            bag[1] = 1;
                        }
                        money += 2000; exp += 1000;
                        goto a2;
                        //待定
                    }
                    if (gxue > 0) {
                        jn = rand() % 5;
                        if (jn == 0)
                        {
                            printf("BOSS魔法部部长使出了绝技“阿瓦达索命”!你减血1000滴!\n");
                            xue -= 1000;
                            Sleep(1000);
                        }
                        if (jn == 1)
                        {
                            printf("BOSS魔法部部长使出了绝技“昏昏欲睡”!你在一回合内无法攻击!\n");
                            sleep = 1;
                            k = 2;
                            Sleep(1000);
                        }
                        if (jn == 2)
                        {
                            printf("BOSS魔法部部长使出了绝技“超级狂暴”!加血500滴,攻击力增强250,防御力增强100!\n");
                            gxue += 500; gg += 250; gf += 100;
                            Sleep(1000);
                        }
                        printf("BOSS魔法部部长对你发起攻击,你减血%d滴", gg - f);
                        k--;
                        if (k <= 0)
                            sleep = 0;
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        Sleep(1000);
        goto a1;
    }
    if (a == 4)
    {
        slowout("终极任务:占领国防部! 1.开始挑战 2.待会儿\n");
        cin >> b;
        if (b == 2)
            goto a1;
        if (b == 1)
        {
            slowout("高级门卫抽出钻石剑把你拦下了!\n");
            gxue = 650; gg = 400; gf = 80;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    printf("你向高级门卫发起攻击,高级门卫减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0)
                    {
                        printf("你胜利了!\n");
                        Sleep(1000);
                        printf("加血300滴\n");
                        xue += 300;
                    }
                    if (gxue > 0) {
                        jn = rand() % 3;
                        if (jn == 0)
                        {
                            printf("高级门卫使出了技能“飞斩”!你减血400滴!\n");
                            xue -= 400;
                            Sleep(1000);
                        }
                        printf("高级门卫对你发起攻击,你减血%d滴", gg - f);
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
            slowout("你把门卫砍倒后,闯了进去。\n");
            slowout("你看到了终极大BOSS——国防部部长,准备开打吧!\n");
            Sleep(2000);
            system("cls");
            slowout("呵呵呵呵呵 你以为终极任务就这么容易吗?这不是额………………的风格……国防部部长用魔杖召唤出了国防部议员!\n");
            gxue = 1200; gg = 600; gf = 150;
            int gfb = 0;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    printf("你向国防部议员发起攻击,国防部议员减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0 && gfb == 1)
                    {

                        printf("你胜利了!\n");
                        Sleep(1000);
                        printf("加血700滴\n");
                        xue += 700;
                    }
                    if (gxue <= 0 && gfb == 0)
                    {
                        printf("国防部部长使出绝技“浴火重生”!国防部议员满血复活了!\n");
                        gxue = 1200;
                        gfb = 1;
                        Sleep(1000);
                    }
                    if (gxue > 0) {
                        jn = rand() % 4;
                        if (jn == 0)
                        {
                            printf("国防部部长用魔杖给议员加血500滴!\n");
                            gxue += 500;
                            Sleep(1000);
                        }
                        if (jn == 1)
                        {
                            printf("国防部部长用魔杖给议员加了一层护盾!议员防御力提升200!\n");
                            gf += 200;
                            Sleep(1000);
                        }
                        if (jn == 2)
                        {
                            printf("国防部部长用魔杖把议员激怒了,议员攻击力提升500!\n");
                            gg += 500;
                            Sleep(1000);
                        }
                        printf("国防部议员对你发起攻击,你减血%d滴", gg - f);
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
            slowout("国防部部长派出了机器人保镖!\n");
            gxue = 1800; gg = 800; gf = 300;
            int bb = 0;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    if (bb > 0)
                        printf("你无法攻击!\n");
                    if (bb <= 0)
                    {
                        printf("你向机器人保镖发起攻击,机器人保镖减血%d滴", g - gf);
                        gxue -= g - gf;
                        printf(",剩余血量%d滴\n", gxue);
                    }
                    Sleep(1000);
                    if (gxue <= 0)
                    {

                        printf("你胜利了!\n");
                        Sleep(1000);
                        printf("加血1000滴\n");
                        xue += 1000;
                    }
                    if (gxue > 0) {
                        jn = rand() % 4;
                        if (jn == 0)
                        {
                            printf("国防部部长用魔杖把你捆住了,两回合内无法攻击!\n");
                            bb = 3;
                            Sleep(1000);
                        }
                        if (jn == 1)
                        {
                            printf("国防部部长用魔杖使机器人保镖进入狂暴状态!机器人保镖增血500滴,攻击力增强200,防御力增强100!\n");
                            gxue += 500; gg += 200; gf += 100;
                            Sleep(1000);
                        }
                        printf("机器人保镖对你发起攻击,你减血%d滴", gg - f);
                        bb--;
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
            slowout("国防部部长:不知天高地厚的家伙,我要亲自灭了你!\n");
            gxue = 5000; gg = 1500; gf = 500;
            int bbb = 0;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    if (bbb > 0)
                        printf("你无法攻击!\n");
                    if (bbb <= 0)
                    {
                        printf("你向国防部部长发起攻击,国防部部长减血%d滴", g - gf);
                        gxue -= g - gf;
                        if (gxue <= 0)
                            gxue = 1;
                        printf(",剩余血量%d滴\n", gxue);
                    }
                    Sleep(1000);
                    if (gxue == 1)
                    {
                        printf("%s", name);
                        slowout(":你都只有一滴血了,投降吧!\n");
                        slowout("国防部部长:(冷笑)你以为终极BOSS那么容易打败吗!\n");
                        slowout("国防部部长说着,用魔杖对准一辆坦克发射\n");
                        slowout("那坦克空无一人,但它却自己启动,开到你面前。\n");
                        Sleep(1000);
                        goto a11;
                    }
                    if (gxue > 0) {
                        jn = rand() % 10;
                        if (jn == 0)
                        {
                            printf("国防部部长用魔杖把你捆住了,两回合内无法攻击!\n");
                            bbb = 3;
                            Sleep(1000);
                        }
                        printf("国防部部长对你发起攻击,你减血%d滴", gg - f);
                        bbb--;
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
    a11:gxue = 4000; gg = 1400; gf = 499;
        int tank = 0;
        do
        {
            cout << endl << "是否攻击/逃跑?(1/2)";
            cin >> b;
            if (b == 1)
            {
                printf("你向坦克发起攻击,坦克减血%d滴", g - gf);
                if (gf <= g)
                    gxue -= g - gf;
                printf(",剩余血量%d滴\n", gxue);
                Sleep(1000);
                if (gxue <= 0)
                {
                    printf("你胜利了!\n");
                    Sleep(1000);
                    printf("加血1200滴\n");
                    xue += 1200;
                }
                if (gxue > 0) {
                    jn = rand() % 4;
                    if (jn == 0)
                    {
                        printf("坦克使出了技能“炮击”!你被击中了!减血500滴!\n");
                        xue -= 500;
                        Sleep(1000);
                    }
                    if (jn == 1)
                    {
                        printf("坦克使出了绝技“炮火连天”!你受到灼烧伤害,每回合减血200滴!\n");
                        tank = 1;
                        Sleep(1000);
                    }
                    if (tank == 1)
                    {
                        printf("灼烧伤害中,减血200滴。\n");
                        xue -= 200;
                    }
                    printf("坦克对你发起攻击,你减血%d滴", gg - f);
                    xue -= gg - f;
                    printf(",剩余血量%d滴\n", xue);
                }
                if (xue <= 0)
                {
                    printf("你凉了……\n");
                    xue = 200;
                    goto a1;
                }
            }
            if (b == 2)
                goto a1;
        } while (gxue > 0 && xue > 0);
        slowout("当你与坦克对决时,国防部部长悄悄给自己回满了血。\n");
        slowout("他用魔杖向直升机发射了一个咒语,那直升机飞过来,悬在你头顶上方。\n");
        gxue = 5000; gg = 1500; gf = 400;
        int xxue = 0;
        do
        {
            cout << endl << "是否攻击/逃跑?(1/2)";
            cin >> b;
            if (b == 1)
            {
                printf("你向国防部部长发起攻击,国防部部长减血%d滴", g - gf);
                if (gf <= g)
                    gxue -= g - gf;
                printf(",剩余血量%d滴\n", gxue);
                Sleep(1000);
                if (gxue <= 0)
                {
                    printf("你胜利了!\n");
                    goto b11;
                }
                if (gxue > 0) {
                    jn = rand() % 4;
                    if (jn == 0)
                    {
                        printf("国防部部长使出了绝技“神锋无影”!");
                        int shen;
                        shen = rand() % 10;
                        if (shen == 0)
                            shen = 2;
                        if (shen == 1)
                            shen = 3;
                        printf("你被连中%d刀,减血%d滴!\n", shen, shen * 150);
                        xue -= shen * 150;
                        Sleep(1000);
                    }
                    if (jn == 1)
                    {
                        printf("国防部部长使出了绝技“星石陨落”!你减血1500滴!\n");
                        xue -= 1500;
                        Sleep(1000);
                    }
                    if (jn == 2)
                    {
                        printf("国防部部长使出了绝技“强力吸血”!该效果持续3回合!\n");
                        xxue = 4;
                        Sleep(1000);
                    }
                    xxue--;
                    int plane;
                    plane = rand() % 10;
                    if (plane < 2) plane = 3;
                    printf("直升机向你扔下%d个炸弹,你减血%d滴!\n", plane, plane * 100);
                    xue -= plane * 100;
                    Sleep(1000);
                    if (xxue > 0)
                    {
                        printf("国防部部长从你那里吸血400滴。\n");
                        xue -= 400;
                        gxue += 400;
                    }
                    printf("国防部部长对你发起攻击,你减血%d滴", gg - f);
                    xue -= gg - f;
                    printf(",剩余血量%d滴\n", xue);
                }
                if (xue <= 0)
                {
                    printf("你凉了……\n");
                    xue = 200;
                    goto a1;
                }
            }
        } while (gxue > 0 && xue > 0);
    b11:
        slowout("占领国防部,终极任务完成!\n");
        slowout("请不要关闭,马上为您带来后续剧情……\n");
        Sleep(5000);
        system("cls");
        slowout("你占领国防部的消息很快传到了首都VT市。\n");
        slowout("一天后,3000年的8月26日,在新世纪的第n天,一道总统令发布了。\n");
        slowout(" 总统令第001号\n");
        slowout(" 从即日起,将全国通缉歹徒");
        printf("%s", name);
        slowout("。一旦发现,务必即刻处决,捉拿者可获得重赏。\n");
        slowout(" 总统  额………………\n");
        slowout(" 3000年8月26日\n\n\n");
        printf("敬请期待第三部——刺杀行动!\n");
        Sleep(3000);
        return 0;
    }
    if (a == 5)
    {
        slowout("暂未开放。\n");
        Sleep(1000);
        goto a1;
    }
    if (a == 6)
    {
        slowout("暂未开放。\n");
        //printf("你的本金:%d\n",money);
        //printf("请选择:\n1.掷骰子\n2.猜数\n3.21点\n4.退出赌城\n");
        Sleep(1000);
        goto a1;
    }
    if (a == 7)
    {
        if (hos == 0)
        {
            slowout("神秘医生:Hello,你好啊。只要你能打败我,我就可以有偿为你恢复血量哦~!\n");
            gxue = 900; gg = 600; gf = 150;
            int ys = 0;
            do
            {
                cout << endl << "是否攻击/逃跑?(1/2)";
                cin >> c;
                if (c == 1)
                {
                    printf("你向神秘医生发起攻击,神秘医生减血%d滴", g - gf);
                    gxue -= g - gf;
                    printf(",剩余血量%d滴\n", gxue);
                    Sleep(1000);
                    if (gxue <= 0 && ys == 2)
                    {

                        printf("你胜利了!\n");
                        Sleep(1000);
                        slowout("神秘医生:你挺厉害的,以后你就可以找我回血了!\n");
                        hos = 1;
                    }
                    if (gxue <= 0 && ys < 2)
                    {
                        printf("神秘医生使出绝技“起死回生”!神秘医生满血复活了!\n");
                        gxue = 1200;
                        ys++;
                        Sleep(1000);
                    }
                    if (gxue > 0) {
                        jn = rand() % 2;
                        if (jn == 0)
                        {
                            printf("神秘医生使出了绝技“华佗再世”!生命恢复500滴!\n");
                            gxue += 500;
                            Sleep(1000);
                        }
                        printf("神秘医生对你发起攻击,你减血%d滴", gg - f);
                        if (gg - f >= 0)
                            xue -= gg - f;
                        printf(",剩余血量%d滴\n", xue);
                    }
                    if (xue <= 0)
                    {
                        printf("你凉了……\n");
                        xue = 200;
                        goto a1;
                    }
                }
                if (c == 2)
                    goto a1;
            } while (gxue > 0 && xue > 0);
        }
        if (hos == 1)
        {
            slowout("神秘医生:你好啊!只要");
            int huix;
            huix = 150 + lv * 50;
            printf("%d", huix);
            slowout("金币,就可以回满血了哦!\n");
            printf("是否回血?1.是 2.否\n");
            cin >> b;
            if (b == 1)
            {
                if (xue == xmax)
                    slowout("你都已经满血了,没必要回血!\n");
                else {
                    if (money < huix)
                        slowout("钱不够!\n");
                    else {
                        slowout("你的血量已满。\n");
                        money -= huix;
                        xue = xmax;
                        if (ren[3] == 1)
                            total++;
                    }

                }
            }
        }
        Sleep(1000);
        goto a1;
    }
    if (a == 8)
    {
        printf("1.查看属性 2.查看物品\n");
        cin >> b;
        if (b == 1)
            printf("歹徒姓名:%s\n等级:%d\n血量:%d/%d\n攻击力:%d\n防御力:%d\n金币:%d\n经验:%d\n还需%d经验可升级\n", name, lv, xue, xmax, g, f, money, exp, 500 * lv - exp);
        if (b == 2) {
            printf("1.钻石套装*%d\n2.经验之石(S)*%d\n3.经验之石(M)*%d\n4.经验之石(L)*%d\n", bag[1], bag[2], bag[3], bag[4]);
            printf("输入序号来使用物品,输入0退出。\n");
            cin >> c;
            if (c == 1)
            {
                if (bag[1] == 0)
                    slowout("你没有钻石套装!\n");
                else
                    slowout("你已经装备钻石套装了!\n");
            }
            if (c == 2)
            {
                if (bag[2] == 0)
                    slowout("物品不足。\n");
                else {
                    printf("使用经验之石,增加经验300\n");
                    bag[2]--;
                    exp += 300;
                    goto a2;
                }
            }
            if (c == 3)
            {
                if (bag[3] == 0)
                    slowout("物品不足。\n");
                else {
                    printf("使用经验之石,增加经验600\n");
                    bag[3]--;
                    exp += 600;
                    goto a2;
                }
            }
            if (c == 4)
            {
                if (bag[4] == 0)
                    slowout("物品不足。\n");
                else {
                    printf("使用经验之石,增加经验1000\n");
                    bag[4]--;
                    exp += 1000;
                    goto a2;
                }
            }
        }
        Sleep(1000);
        goto a1;
    }
    if (a == 9)
    {
        if (kg == 1)
            slowout("本游戏禁止重复开挂!\n");
        if (kg == 0) {
            printf("请输入开挂密匙:");
            cin >> b;
            if (b != 1)
            {
                slowout("密码错误,为了惩罚你这个不知天高地厚的家伙,你的金币我全没收了。\n");
                money = 0;
            }
            if (b == 1)
            {
                slowout("恭喜你成功开挂,变身为cyka blyat!\n");
                money = 9999;
                xmax = 19999;
                xue = xmax;
                g = 1111;
                f = 555;
                kg = 1;
            }
        }
        Sleep(1000);
        goto a1;
    }
    if (a == 10)
    {
        system("cls");
        if (renwu == 0)
        {
            int suiji;
            suiji = rand() % 4;
            if (suiji == 0)
                suiji = 1;
            if (suiji == 1)
            {
                printf("任务:在十字路口击杀任意10个目标。 可获奖励:300金币 200经验。\n");
                printf("1.接受任务 2.放弃\n");
                cin >> b;
                if (b == 2)
                {
                    system("cls");
                    goto a1;
                }
                if (b == 1)
                {
                    printf("任务开始!!!\n");
                    Sleep(2000);
                    ren[1] = 1;
                    renwu = 1;
                    goto a1;
                }
            }
            if (suiji == 2)
            {
                printf("任务:在商店购买任意5件物品。 可获奖励:200金币 经验之石(M)*3。\n");
                printf("1.接受任务 2.放弃\n");
                cin >> b;
                if (b == 2)
                {
                    system("cls");
                    goto a1;
                }
                if (b == 1)
                {
                    printf("任务开始!!!\n");
                    Sleep(2000);
                    ren[2] = 1;
                    renwu = 1;
                    goto a1;
                }
            }
            if (suiji == 3)
            {
                printf("任务:在医院回血5次。 可获奖励:250金币 经验之石(L)*2。\n");
                printf("1.接受任务 2.放弃\n");
                cin >> b;
                if (b == 2)
                {
                    system("cls");
                    goto a1;
                }
                if (b == 1)
                {
                    printf("任务开始!!!\n");
                    Sleep(2000);
                    ren[3] = 1;
                    renwu = 1;
                    goto a1;
                }
            }
        }
        if (renwu == 1)
        {
            if (ren[1] == 1)
            {
                printf("当前任务:在十字路口击杀任意10个目标。\n任务进度:%d/10\n", total);
                if (total >= 10)
                {
                    printf("任务已完成。获得:300金币 200经验\n");
                    money += 300; exp += 200; ren[1] = 0; renwu = 0; total = 0;
                }
            }
            if (ren[2] == 1)
            {
                printf("当前任务:在商店购买任意5件物品。\n任务进度:%d/5\n", total);
                if (total >= 5)
                {
                    printf("任务已完成。获得:200金币 经验之石(M)*3\n");
                    money += 200; bag[3] += 3; ren[2] = 0; renwu = 0; total = 0;
                }
            }
            if (ren[3] == 1)
            {
                printf("当前任务:在医院回血5次。\n任务进度:%d/5\n", total);
                if (total >= 5)
                {
                    printf("任务已完成。获得:250金币 经验之石(L)*2\n");
                    money += 250; bag[4] += 2; ren[3] = 0; renwu = 0; total = 0;
                }
            }
        }
        Sleep(5000);
        system("cls");
        goto a2;
    }
    if (a < 0 || a>9)
    {
        slowout("请不要乱输!!!\n");
        Sleep(1000);
        goto a1;
    }
    if (a == 0)
        return 0;
a2:
    lv = exp / 500 + 1;
    if (lv == lv1 + 1)
    {
        slowout("你升级了!\n");
        xmax += 100;
        xue = xmax;
        g += 20;
        f += 5;
        lv1 += 1;
    }
    if (lv == lv1 + 2)
    {
        slowout("你连升两级!\n");
        xmax += 200;
        xue = xmax;
        g += 40;
        f += 10;
        lv1 += 2;
    }
    if (lv == lv1 + 3)
    {
        slowout("你连升3级!\n");
        xmax += 300;
        xue = xmax;
        g += 60;
        f += 15;
        lv1 += 3;
    }
    if (lv == lv1 + 4)
    {
        slowout("你连升4级!\n");
        xmax += 400;
        xue = xmax;
        g += 80;
        f += 20;
        lv1 += 4;
    }
    Sleep(1000);
    goto a1;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值