人类沦陷-史诗级巨作

前言

黑_白(永远的CC)和段建泽共同出品。

剧情

总剧情

在千年以前,有一群人类被感染成了异种
它们变得与常人不同,拥有更强大的力量与更强大的身体
正常人类带着排斥接受着它们
不知过了多久,人类异种窃取了正常人类的技术,但仍然没能继承人类的人性
人类异种YZ带着他的亲卫队,妄图与创世主CC抗衡,夺取世界能量的来源——定界石
那次人类使出了全力对抗异种
双方死伤惨重,人类花了200年才恢复过来
而人类异种从此销声匿迹
但现在,他们卷土重来了!!!
作为人类守护联盟的盟主,你能否担起重任,像千年以前的CC一样拯救世界?

分剧情1:default:最后堡垒

这是人类最后的希望...
你将坚守最后的城池,保卫身后那颗普蓝色的定界石
这个阶段,史称
最后堡垒!!!

分剧情2:beta:失落城邦

人类从曾经摔倒的地方重新站起
我们即将迎来第一场反击战!
目光灼灼地望向前方,那曾是我们的家园
这个阶段,史称
失落城邦!!!

攻略

首先,你可以一直按0大约10次,攒到大约200
然后,你可以建一层护盾和一个哨兵塔,用来进攻
接着,继续攒钱,建高射炮来防御坦克及飞机
最后,只需要在建筑有破损时重建就行了

各世界属性

造物主模式初始资源很多
生存模式资源中等
衰竭模式资源匮乏,每回合我方扣固定的100血量

Tips

高射炮不仅可以打飞机,把它压下来也可以打地面敌人!
迫击炮不仅可以打小兵,还能打敌方基地!
小兵打敌方基地的伤害十分可观。
导弹可以直接打对方的基地!
千万别让小兵接近你的基地,你的建筑十分危险!
激光炮可以攻击小兵、坦克、飞机或直接进攻敌方,十分强大!
护盾可以抵挡敌方的一次远程进攻哦!
克隆法术可以将小兵数量变成原来的两倍,在关键时刻能起到意想不到的作用
岩石地雷可以在五回合后炸死敌方所有小兵哦!
晶坷垃是一种新型货币,不可与金币互换。
头铁少年破盾,钻地少年清兵。但需要耗费晶坷垃,且没有动静。
歼击机攻击力极高,无法被防御塔击毁,需要谨慎防备。

游戏代码

#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#include<iomanip>
#include<iostream>
#include<ctime>
#include<windows.h>
#include<cstdlib>
#include <algorithm>
#include <windows.h>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <conio.h>
#include <ctype.h>
#include <cstdio>
#include <cmath>
#include <ctime>
#include<mmsystem.h>
//#pragma comment(lib, "winmm.lib")
using namespace std;
int e,g=50,o1=3000,o2,e1=3000,e2,o1_max=3000,Lv;//金币:g, 晶坷垃 jkl
int s,l,sl,pj,dd,i,ts,k,tk,tke,tkk,xx,bt,gs,fj,fje,jjj,jjje;
int fk,jg,jk,hd,hde,jd,jde,zx,iii,pz,lzpz,pze,lzpze;
int dl,dle,jkl,jkl_kc,tt,zd,reblood,water;
//bdaguai
int Rand;
int dgsr;
int fy=15;
int gj=30;
int Rand2;
int hp=100;
int gwhp;
int moneyrand;
int jbrand;
int jklrand;
int mjrand;
int gfrand;
int grand;
int frand;
int dgcs;
//bdaguai
int hxcs;
//kaibx
int ksr;
int gbrand1;
int jklrand1;
int Rand1;
int gfrand1;
int grand1;
int frand1;
int kxcs;
int zjay;//买到终极宝箱(终极奥义)1
int fxjs;//买宝箱20次  (奉献精神)1
int gwlr;//杀死20个怪  (怪物猎人)1
int hxds;//买回血器5个 (回血大师)1
int dgds;//打死十级怪物(打怪大师)1
//(打怪大师)
//(终极奥义)
//(奉献精神)
//(怪物猎人)
//(回血大师)
//kaibx
//2048
int game_answer=0;
//2048
char d,ch;
bool beta;
string ssss;
//cj
int qqqq;
int www,jjj1,zzz,lll,vvv,hhh;
int cjcs;
//cj
/*设置背景颜色*/int setBackColor(unsigned char bColor){
    HANDLE hd = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_SCREEN_BUFFER_INFO csbInfo;
    GetConsoleScreenBufferInfo(hd, &csbInfo);
    return SetConsoleTextAttribute(hd, (bColor << 4) | (csbInfo.wAttributes&~0xF0));
}
void appGotoXY(int x,int y)  //移动光标
{
    swap(x,y);
    CONSOLE_SCREEN_BUFFER_INFO    csbiInfo;
    HANDLE    hConsoleOut;
    hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
    GetConsoleScreenBufferInfo(hConsoleOut,&csbiInfo);
    csbiInfo.dwCursorPosition.X = x;
    csbiInfo.dwCursorPosition.Y = y;
    SetConsoleCursorPosition(hConsoleOut,csbiInfo.dwCursorPosition);
}
void appGetXY() //得到光标位置
{
    HANDLE hStdout;
    CONSOLE_SCREEN_BUFFER_INFO pBuffer;
    hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
    GetConsoleScreenBufferInfo(hStdout, &pBuffer);
    cout << pBuffer.dwCursorPosition.X <<" "<< pBuffer.dwCursorPosition.Y <<endl;;
}
/*设置字体颜色*/int setTextColor(unsigned char fColor){
    HANDLE hd = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_SCREEN_BUFFER_INFO csbInfo;
    GetConsoleScreenBufferInfo(hd, &csbInfo);
    return SetConsoleTextAttribute(hd, fColor | (csbInfo.wAttributes&~0x0F));
}
void START(){
    appGotoXY(0,0);
    setBackColor(15);//大背景颜色
    for(int i=1;i<=26*80;i++)
        cout<<" ";
    appGotoXY(0,0);
    cout<<" ";
    appGotoXY(20,19);
    setBackColor(7);//小背景颜色
    for(int i=1;i<=42;i++)
        cout<<" ";
    setTextColor(0);//字体颜色
    appGotoXY(3,19);
    printf("┏━━━━┳━━━━┳━━━━┳━━━━┓\n");
    appGotoXY(4,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(5,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(6,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(7,19);
    printf("┣━━━━╋━━━━╋━━━━╋━━━━┫\n");
    appGotoXY(8,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(9,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(10,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(11,19);
    printf("┣━━━━╋━━━━╋━━━━╋━━━━┫\n");
    appGotoXY(12,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(13,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(14,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(15,19);
    printf("┣━━━━╋━━━━╋━━━━╋━━━━┫\n");
    appGotoXY(16,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(17,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(18,19);
    printf("┃        ┃        ┃        ┃        ┃\n");
    appGotoXY(19,19);
    printf("┗━━━━┻━━━━┻━━━━┻━━━━┛\n");
    //Sleep(100000);
    return ;
}
inline int Get_X(int x,int y){
    if(x==1)    return 5;
    if(x==2)    return 9;
    if(x==3)    return 13;
    if(x==4)    return 17;
}
inline int Get_Y(int x,int y){
    if(y==1)    return 24;
    if(y==2)    return 34;
    if(y==3)    return 44;
    if(y==4)    return 54;
}

void HideCursor(){//隐藏光标
    CONSOLE_CURSOR_INFO cursor_info = {1, 0};
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
}

int a[5][5];
bool if_game_over(){
    for(int i=1;i<=4;i++)
        for(int j=1;j<=4;j++)
            if(!a[i][j])
                return 1;
    for(int i=2;i<=4;i++)
        for(int j=1;j<=4;j++){
            if(a[j][i]==a[j][i-1])
                return 1;
            if(a[i][j]==a[i-1][j])
                return 1;
        }
    return 0;
}
bool vis[20];

void Pr_a_num_with_color(int x){
    switch (x){/*
        1 = 蓝色   9  = 淡蓝色
        2 = 绿色   10 = 淡绿色
        3 = 湖蓝色 11 = 淡浅绿色
        4 = 红色   12 = 淡红色
        5 = 紫色   13 = 淡紫色
        6 = 黄色   14 = 淡黄色
        7 = 白色   15 = 亮白色*/
        case 2:setTextColor(9);printf("CE");setTextColor(0);break ;
        case 4:setTextColor(10);printf("RE");setTextColor(0);break ;
        case 8:setTextColor(11);printf("TLE");setTextColor(0);break ;
        case 16:setTextColor(12);printf("MLE");setTextColor(0);break ;
        case 32:setTextColor(13);printf("ILE");setTextColor(0);break ;
        case 64:setTextColor(14);printf("OLE");setTextColor(0);break ;
        case 128:setTextColor(15);printf("UKE");setTextColor(0);break ;
        case 256:setTextColor(1);printf("WA");setTextColor(0);break ;
        case 512:setTextColor(2);printf("AC");setTextColor(0);break ;
        case 1024:setTextColor(3);printf("AU");setTextColor(0);break ;
        case 2048:setTextColor(4);printf("AK");setTextColor(0);break ;
    }
}

void Pr_all_num(){
    for(int i=1;i<=4;i++)
        for(int j=1;j<=4;j++){
            int x=Get_X(i,j),y=Get_Y(i,j);
            appGotoXY(x,y);
            if(a[i][j]==0)
                printf("    ");
            else{
                Pr_a_num_with_color(a[i][j]);
                //printf("%4d",a[i][j]);
            }
        }
    return ;
}
//**************************************************
bool clear_up(){
    bool bb=0;
    for(int k=1;k<=4;k++)
        for(int i=3;i>=1;i--)
            for(int j=1;j<=4;j++)
                if(a[i][j]==0&&a[i+1][j]!=0){
                    swap(a[i][j],a[i+1][j]);
                    bb=1;
                }
    if(bb==1)
        return 1;
    return 0;
}
bool do_up(){
    if(!if_game_over())
        return 1;
    bool bb=1;
    if(!clear_up())//没空间不能移动
        bb=0;
    for(int j=1;j<=4;j++){
        int i=1;
        while(i<4){
            if(!a[i+1][j])
                break ;
            if(a[i][j]!=a[i+1][j]){
                i++;
                continue ;
            }
            if(a[i][j]==a[i+1][j]){
                a[i][j]+=a[i+1][j]; game_answer+=a[i+1][j];
                a[i+1][j]=0;
                i+=2;
                bb=1;//可以合并
            }
        }
    }
    if(bb==0)//没空间又不能合并
        return 0;
    clear_up();
    return 1;
}
//**************************************************
bool clear_down(){
    bool bb=0;
    for(int k=1;k<=4;k++)
        for(int i=2;i<=4;i++)
            for(int j=1;j<=4;j++)
                if(a[i][j]==0&&a[i-1][j]!=0){
                    swap(a[i][j],a[i-1][j]);
                    bb=1;
                }
    if(bb==1)
        return 1;
    return 0;
}
bool do_down(){
    if(!if_game_over())
        return 1;
    bool bb=1;
    if(!clear_down())
        bb=0;
    for(int j=1;j<=4;j++){
        int i=4;
        while(i>1){
            if(!a[i-1][j])
                break ;
            if(a[i][j]!=a[i-1][j]){
                i--;
                continue ;
            }
            if(a[i][j]==a[i-1][j]){
                a[i][j]+=a[i-1][j];  game_answer+=a[i-1][j];
                a[i-1][j]=0;
                i-=2;
                bb=1;
            }
        }
    }
    if(bb==0)
        return 0;
    clear_down();
    return 1;
}
//**************************************************
bool clear_left(){
    bool bb=0;
    for(int k=1;k<=4;k++)
        for(int i=1;i<=4;i++)
            for(int j=3;j>=1;j--)
                if(a[i][j]==0&&a[i][j+1]!=0){
                    swap(a[i][j],a[i][j+1]);
                    bb=1;
                }
    if(bb==1)
        return 1;
    return 0;
}
bool do_left(){
    if(!if_game_over())
        return 1;
    bool bb=1;
    if(!clear_left())
        bb=0;
    for(int i=1;i<=4;i++){
        int j=1;
        while(j<4){
            if(!a[i][j+1])
                break ;
            if(a[i][j]!=a[i][j+1]){
                j++;
                continue ;
            }
            if(a[i][j]==a[i][j+1]){
                a[i][j]+=a[i][j+1];  game_answer+=a[i][j+1];
                a[i][j+1]=0;
                j+=2;
                bb=1;
            }
        }
    }
    if(bb==0)
        return 0;
    clear_left();
    return 1;
}
//**************************************************
bool clear_right(){
    bool bb=0;
    for(int k=1;k<=4;k++)
        for(int i=1;i<=4;i++)
            for(int j=2;j<=4;j++)
                if(a[i][j]==0&&a[i][j-1]!=0){
                    swap(a[i][j],a[i][j-1]);
                    bb=1;
                }
    if(bb==1)
        return 1;
    return 0;
}
bool do_right(){
    if(!if_game_over())
        return 1;
    bool bb=1;
    if(!clear_right())
        bb=0;
    for(int i=1;i<=4;i++){
        int j=4;
        while(j>1){
            if(!a[i][j-1])
                break ;
            if(a[i][j]!=a[i][j-1]){
                j--;
                continue ;
            }
            if(a[i][j]==a[i][j-1]){
                a[i][j]+=a[i][j-1];  game_answer+=a[i][j-1];
                a[i][j-1]=0;
                j-=2;
                bb=1;
            }
        }
    }
    if(bb==0)
        return 0;
    clear_right();
    return 1;
}
void END(){
    setBackColor(15);
    appGotoXY(21,30);
    char s_1[30]="游戏结束,您的得分为:";
    for(int i=0;i<22;i++){
        cout<<s_1[i];
        Sleep(30);
    }
    Sleep(500);
    cout<<game_answer<<endl;
    g+=game_answer;
    Sleep(500);
    appGotoXY(22,30);
    char s_2[30]="请按任意键结束游戏。";
    for(int i=0;i<20;i++){
        cout<<s_2[i];
        Sleep(30);
    }
}
void rlsb(){
    srand(time(0));
    HideCursor();//隐藏光标

    START();

    while(if_game_over()){
        //system("cls");
        //appGotoXY(0,0);

        int bb=0;//bb判断是否有空位
        for(int i=1;i<=4;i++)
            for(int j=1;j<=4;j++)
                if(!a[i][j])
                    bb=1;
        if(bb==1){
            int num_new=rand()%10+1;//新出现4还是2
            if(num_new==1)  num_new=4;
            else    num_new=2;
            int place_new=0,x=0,y=0;
            while(1){
                place_new=rand()%16+1;
                x=(place_new-1)/4+1,y=place_new%4+1;
                if(!a[x][y])
                    break ;
            }
            a[x][y]=num_new;
        }

        Pr_all_num();

    again:
        char ch_1=getch(),ch_2;
        if(ch_1!=-32){
            appGotoXY(20,30);
            char s_1[30]="您输入的字符不合法。";
            for(int i=0;i<20;i++){
                cout<<s_1[i];
                Sleep(1);
            }
            Sleep(200);
            for(int i=1;i<=19;i++)
                printf("\b \b");
            goto again;
        }
        ch_2=getch();
        if(ch_2==72)//up
            if(!do_up())
                goto again;
        if(ch_2==80)//down
            if(!do_down())
                goto again;
        if(ch_2==75)//left
            if(!do_left())
                goto again;
        if(ch_2==77)//right
            if(!do_right())
                goto again;
        appGotoXY(20,30);
        printf("您当前的总分为:%d",game_answer);
    }
    appGotoXY(20,30);
    printf("                     ");
    END();
    return;
}
void cj(){
	system("cls");
	while(1){
		giao:
		system("cls");
		printf("0 退出\n");
		printf("1 查看几率\n");
		printf("2 抽奖\n");
		printf("纯属娱乐\n");
		scanf("%d",&qqqq);
		if(qqqq==0) return;
		if(qqqq==1){
			system("cls");
			printf("200次%65几率抽到金色传说,%10抽中透明无敌\n");
			printf("100次%30几率抽到金色传说,%5抽中透明无敌\n");
			printf("50次%15几率抽到金色传说,%2抽中透明无敌\n");
			printf("10次%4几率抽到金色传说,%1抽中透明无敌\n");
			printf("5次%2几率抽中金色传说,%0.5抽中透明无敌\n");
			printf("1次%0.4几率抽中金色传说,%0.1抽中透明无敌\n");
			Sleep(5000);
		}else if(qqqq==2){
			printf("输入次数:\n");
			scanf("%d",&cjcs);
			if(g<cjcs*5){
				system("cls");
				printf("钱不够\n");
				Sleep(5000);
				goto giao;
			}else{
				system("cls");
				g-=cjcs*5;
				while(cjcs--){
					int x=std::rand()%1000*rand()%10000;
					if(x<=1){
						printf("透明无敌!!!\n");
						MessageBox(NULL,"你竟然抽中了爆率为%0.1的透明无敌!","透明无敌!",MB_OK);
						www++;
						goto f;
					}
					if(x<=30){
						printf("金色传说!\n");
						MessageBox(NULL,"金色传说","nb",MB_OK);
						jjj1++;
						goto f;
					}
					if(x<=100){
						printf("紫色史诗\n");
						zzz++;
						goto f;
					}
					if(x<=1000){
						printf("蓝色精英\n");
						lll++;
						goto f;
					}
					if(x<=2000){
						printf("绿色普通\n");
						vvv++;
						goto f;
					}
					printf("灰色渣渣\n"),hhh++;
					f:
					Sleep(30);
				}
				printf("透明无敌:%d\n",www);
				printf("金色传说:%d\n",jjj1);
				printf("紫色史诗:%d\n",zzz);
				printf("蓝色精英:%d\n",lll);
				printf("绿色普通:%d\n",vvv);
				printf("灰色渣渣:%d\n",hhh);
				Sleep(3000);
				goto giao;
			}
		}
	}
}
void kaibx(){
	bugo:
	if(kxcs>=20&&fxjs!=1){
		fxjs=1;
		system("cls");
		printf("恭喜你取得了奉献精神的成就!!!\n");
		Sleep(5000);
		printf("奖励50晶坷垃,150金币");
		g+=150;
		jkl+=50;
		Sleep(5000);
	}
	system("cls");
	printf("▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉\n");
	printf("▉                宝箱                ▉\n");
	printf("▉1.  木头宝箱(10金币)              ▉\n");
	printf("▉2.  白银宝箱(20金币)              ▉\n");
	printf("▉3.  黄金宝箱(20金币,10晶坷垃)    ▉\n");
	printf("▉4.  钻石宝箱(50金币,20晶坷垃)    ▉\n");
	printf("▉5.  电击宝箱(100金币,40晶坷垃)   ▉\n");
	printf("▉6.  雷电宝箱(500金币,100晶坷垃)  ▉\n");
	printf("▉7.  终极宝箱(5000金币,500晶坷垃) ▉\n");
	printf("▉8.  退出                            ▉\n");
	printf("▉▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▉\n");
	printf("  金币:%d                              \n",g);
	printf("  晶坷垃:%d                            \n",jkl);
	printf("  开箱次数:%d                          \n",kxcs);
	printf("▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉\n");
	scanf("%d",&ksr);
	if(ksr==0){
		return;
	}
	if(ksr==1){
		if(g>=10){
			kxcs++;
			g-=10;
			Rand1=std::rand()%2;
			if(Rand1==1){
				gbrand1=std::rand()%15+5;
				system("cls");
				printf("奖励%d金币\n",gbrand1);
				g+=gbrand1;
				Sleep(4000);
				goto bugo;
			}else{
				jklrand1=std::rand()%6+2;
				system("cls");
				printf("奖励%d晶坷垃",jklrand1);
				jkl+=jklrand1;
				Sleep(4000);
				goto bugo;
			}
		}else{
			system("cls");
			printf("钱不够\n");
			Sleep(4000);
			goto bugo;
		}
	}
	else if(ksr==2){
		if(g>=20){
			kxcs++;
			g-=20;
			Rand1=std::rand()%2;
			if(Rand1==1){
				gbrand1=std::rand()%25+10;
				system("cls");
				printf("奖励%d金币\n",gbrand1);
				g+=gbrand1;
				Sleep(4000);
				goto bugo;
			}else{
				jklrand1=std::rand()%15+5;
				system("cls");
				printf("奖励%d晶坷垃",jklrand1);
				jkl+=jklrand1;
				Sleep(4000);
				goto bugo;
			}
		}else{
			system("cls");
			printf("钱不够\n");
			Sleep(4000);
			goto bugo;
		}
	}
	else if(ksr==3){
		if(g>=20 && jkl>=10){
			kxcs++;
			g-=20;
			jkl-=10;
			Rand1=std::rand()%3;
			if(Rand1==1){
				gbrand1=std::rand()%35+25;
				system("cls");
				printf("奖励%d金币\n",gbrand1);
				g+=gbrand1;
				Sleep(4000);
				goto bugo;
			}else if(Rand1==2){
				jklrand1=std::rand()%15+15;
				system("cls");
				printf("奖励%d晶坷垃",jklrand1);
				jkl+=jklrand1;
				Sleep(4000);
				goto bugo;
			}else{
				gfrand=std::rand()%2;
				if(gfrand==1){
					system("cls");
					grand1=std::rand()%5+3;
					printf("奖励%d攻击力",grand1);
					gj+=grand1;
					Sleep(4000);
					goto bugo;
				}else{
					system("cls");
					frand1=std::rand()%5+3;
					printf("奖励%d防御力",frand1);
					fy+=frand1;
					Sleep(4000);
					goto bugo;
				}
			}
		}else{
			system("cls");
			printf("钱不够\n");
			Sleep(4000);
			goto bugo;
		}
	}
	else if(ksr==4){
		if(g>=50 && jkl>=20){
			kxcs++;
			g-=50;
			jkl-=20;
			Rand1=std::rand()%3;
			if(Rand1==1){
				gbrand1=std::rand()%60+30;
				system("cls");
				printf("奖励%d金币\n",gbrand1);
				g+=gbrand1;
				Sleep(4000);
				goto bugo;
			}else if(Rand1==2){
				jklrand1=std::rand()%40+30;
				system("cls");
				printf("奖励%d晶坷垃",jklrand1);
				jkl+=jklrand1;
				Sleep(4000);
				goto bugo;
			}else{
				gfrand=std::rand()%2;
				if(gfrand==1){
					system("cls");
					grand1=std::rand()%10+5;
					printf("奖励%d攻击力",grand1);
					gj+=grand1;
					Sleep(4000);
					goto bugo;
				}else{
					system("cls");
					frand1=std::rand()%10+5;
					printf("奖励%d防御力",frand1);
					fy+=frand1;
					Sleep(4000);
					goto bugo;
				}
			}
		}else{
			system("cls");
			printf("钱不够\n");
			Sleep(4000);
			goto bugo;
		}
	}
	else if(ksr==5){
		if(g>=100 && jkl>=40){
			kxcs++;
			g-=100;
			jkl-=40;
			Rand1=std::rand()%3;
			if(Rand1==1){
				gbrand1=std::rand()%190+80;
				system("cls");
				printf("奖励%d金币\n",gbrand1);
				g+=gbrand1;
				Sleep(4000);
				goto bugo;
			}else if(Rand1==2){
				jklrand1=std::rand()%100+40;
				system("cls");
				printf("奖励%d晶坷垃",jklrand1);
				jkl+=jklrand1;
				Sleep(4000);
				goto bugo;
			}else{
				gfrand=std::rand()%2;
				if(gfrand==1){
					system("cls");
					grand1=std::rand()%20+5;
					printf("奖励%d攻击力",grand1);
					gj+=grand1;
					Sleep(4000);
					goto bugo;
				}else{
					system("cls");
					frand1=std::rand()%20+5;
					printf("奖励%d防御力",frand1);
					fy+=frand1;
					Sleep(4000);
					goto bugo;
				}
			}
		}else{
			system("cls");
			printf("钱不够\n");
			Sleep(4000);
			goto bugo;
		}
	}
	else if(ksr==6){
		if(g>=500 && jkl>=100){
			kxcs++;
			g-=500;
			jkl-=100;
			Rand1=std::rand()%3;
			if(Rand1==1){
				gbrand1=std::rand()%700+250;
				system("cls");
				printf("奖励%d金币\n",gbrand1);
				g+=gbrand1;
				Sleep(4000);
				goto bugo;
			}else if(Rand1==2){
				jklrand1=std::rand()%250+70;
				system("cls");
				printf("奖励%d晶坷垃",jklrand1);
				jkl+=jklrand1;
				Sleep(4000);
				goto bugo;
			}else{
				gfrand=std::rand()%2;
				if(gfrand==1){
					system("cls");
					grand1=std::rand()%30+10;
					printf("奖励%d攻击力",grand1);
					gj+=grand1;
					Sleep(4000);
					goto bugo;
				}else{
					system("cls");
					frand1=std::rand()%30+10;
					printf("奖励%d防御力",frand1);
					fy+=frand1;
					Sleep(4000);
					goto bugo;
				}
			}
		}else{
			system("cls");
			printf("钱不够\n");
			Sleep(4000);
			goto bugo;
		}
	}
	else if(ksr==7){
		if(g>=5000 && jkl>=500){
			if(zjay!=1){
				zjay=1;
				system("cls");
				printf("恭喜你取得了终极奥义的成就!!!\n");
				Sleep(5000);
				printf("奖励100晶坷垃,500金币");
				g+=500;
				jkl+=100;
				Sleep(5000);
			}
			kxcs++;
			g-=5000;
			jkl-=500;
			Rand1=std::rand()%3;
			if(Rand1==1){
				gbrand1=std::rand()%5000+3500;
				system("cls");
				printf("奖励%d金币\n",gbrand1);
				g+=gbrand1;
				Sleep(4000);
				goto bugo;
			}else if(Rand1==2){
				jklrand1=std::rand()%2000+700;
				system("cls");
				printf("奖励%d晶坷垃",jklrand1);
				jkl+=jklrand1;
				Sleep(4000);
				goto bugo;
			}else{
				gfrand=std::rand()%2;
				if(gfrand==1){
					system("cls");
					grand1=std::rand()%100+30;
					printf("奖励%d攻击力",grand1);
					gj+=grand1;
					Sleep(4000);
					goto bugo;
				}else{
					system("cls");
					frand1=std::rand()%100+30;
					printf("奖励%d防御力",frand1);
					fy+=frand1;
					Sleep(4000);
					goto bugo;
				}
			}
		}else{
			system("cls");
			printf("钱不够\n");
			Sleep(4000);
			goto bugo;
		}
	}
}
void bdaguai(){
	shengli:
	if(dgcs>=20&&gwlr!=1){
		gwlr=1;
		system("cls");
		printf("恭喜你取得了怪物猎人的成就!!!\n");
		Sleep(5000);
		printf("奖励20晶坷垃,100金币");
		g+=100;
		jkl+=20;
		Sleep(5000);
	}
	system("cls");
	printf("杀死怪物:%d\n",dgcs);
	printf("血量:%d\n",hp);
	printf("攻击力:%d\n",gj);
	printf("防御力:%d\n",fy);
	printf("1. 购买血瓶(10$/20hp)\n");
	printf("2. 返回\n");
	printf("3. 继续\n");
	scanf("%d",&dgsr);
	if(dgsr==2) return;
	else if(dgsr==1){
		if(g<20){
			system("cls");
			printf("钱不够\n");
			Sleep(2000);
			goto shengli;
		}else{
			g-=10;
			hp+=20;
			system("cls");
			printf("回血成功\n");
			Sleep(2000);
			goto shengli;
		}
	}else if(dgsr==3){
		system("cls");
		if(hp<=0){
			system("cls");
			printf("血量不足无法冒险\n");
			printf("1. 购买血瓶(10$/20hp)\n");
			printf("2. 返回\n");
			scanf("%d",&dgsr);
			if(dgsr==2) return;
			else{
				if(g<20){
					system("cls");
					printf("钱不够\n");
					Sleep(2000);
					goto shengli;
				}else{
					g-=10;
					hp+=20;
					system("cls");
					printf("回血成功\n");
					Sleep(2000);
					goto shengli;
				}
			}
			return;
		}
		Rand=std::rand()%10+1;
		gwhp=Rand*30;
		printf("你遇到了%d级怪物\n",Rand);
		printf("血量:%d\n",hp);
		printf("攻击力:%d\n",gj);
		printf("防御力:%d\n",fy);
		printf("怪物血量:%d\n",gwhp);
		printf("怪物攻击力:%d\n",Rand*10);
		printf("怪物防御力:%d\n",Rand*5);
		printf("1. 迎战\n");
		printf("2. 逃跑\n");
		scanf("%d",&dgsr);
		if(dgsr==2) goto shengli;
		else{
			while(1){
				system("cls");
				printf("血量:%d\n",hp);
				printf("攻击力:%d\n",gj);
				printf("防御力:%d\n",fy);
				printf("怪物血量:%d\n",gwhp);
				printf("怪物攻击力:%d\n",Rand*10);
				printf("怪物防御力:%d\n",Rand*5);
				printf("1. 攻击\n");
				printf("2. 防御\n");
				scanf("%d",&dgsr);
				if(dgsr==1){
					system("cls");
					Rand2=std::rand()%5;
					if(Rand2==0){
						system("cls");
						printf("怪物暴击\n");
						hp-=(Rand*20-fy);
						if(hp<=0){
							system("cls");
							printf("KO\n");
							Sleep(2000);
							return;
						}
						Sleep(2000);
					}else{
						hp-=(Rand*10-fy);
						if(hp<=0){
							system("cls");
							printf("KO\n");
							Sleep(2000);
							return;
						}
					}
					Rand2=std::rand()%5;
					if(Rand2==0){
						system("cls");
						printf("暴击");
						gwhp-=(gj*2-Rand*5);
						if(gwhp<=0){
							dgcs++;
							if(Rand==10) dgds=1;
							system("cls");
							printf("胜利\n");
							mjrand=std::rand()%3;
							if(mjrand==0){
								jbrand=std::rand()%(Rand*15)+5;
								printf("奖励%d金币\n",jbrand);
								g+=jbrand;
							}else if(mjrand==1){
								jklrand=std::rand()%(Rand*10)+1;
								printf("奖励%d晶坷垃\n",jklrand);
								jkl+=jklrand;
							}else{
								gfrand=std::rand()%2;
								if(gfrand==0){
									grand=std::rand()%(Rand*3)+1;
									printf("增加%d攻击力\n",grand);
									gj+=grand;
								}else{
									frand=std::rand()%(Rand*3)+1;
									printf("增加%d防御力\n",frand);
									fy+=frand;
								}
							}
							Sleep(2000);
							goto shengli;
						}
						Sleep(2000);
					}else{
						gwhp-=(gj-Rand*5);
						if(gwhp<=0){
							dgcs++;
							if(Rand==10 && dgds!=1){
								dgds=1;
								system("cls");
								printf("恭喜你取得了打怪大师的成就!!!\n");
								Sleep(5000);
								printf("奖励200晶坷垃,1000金币");
								g+=1000;
								jkl+=200;
								Sleep(5000);
							}
							system("cls");
							printf("胜利\n");
							mjrand=std::rand()%5;
							if(mjrand==0){
								jbrand=std::rand()%(Rand*15)+5;
								printf("奖励%d金币\n",jbrand);
								g+=jbrand;

							}else if(mjrand==1){
								jklrand=std::rand()%(Rand*10)+5;
								printf("奖励%d晶坷垃\n",jklrand);
								jkl+=jklrand;
							}else{
								gfrand=std::rand()%2;
								if(gfrand==0){
									grand=std::rand()%(Rand*3)+1;
									printf("增加%d攻击力\n",grand);
									gj+=grand;
								}else{
									frand=std::rand()%(Rand*3)+1;
									printf("增加%d防御力\n",frand);
									fy+=frand;
								}
							}
							Sleep(2000);
							goto shengli;
						}
					}
				}
			}
		}
	}
}
void xs(char ccc){
	cout<<"金币数($):"<<g<<endl;
	cout<<"晶坷垃(G):"<<jkl<<endl;
	cout<<"我方人数:"<<o2+jde<<endl;
	cout<<"敌方人数:"<<e2+jd<<endl;
	cout<<"我方血量:"<<o1<<endl;
	cout<<"敌方血量:"<<e1<<endl;
	if(beta) cout<<"主塔级别:"<<Lv<<endl;
	if(ccc=='3') cout<<"已生存天数:"<<iii<<endl;
	if(zx!=0) cout<<"已处于诈降状态"<<endl;
	return ;
}
void bg();
void aa(string sssss){
	if(e1<1000) bg();
	if(ssss=="16391639"){
		g=50000;
		e1=1000000;
		hd=10;
		o1=5000;
	}
	if(ssss!="test"&&ssss!="16391639"){
		cout<<"在千年以前,有一群人类被感染成了异种\n";
		Sleep(2000);
		cout<<"它们变得与常人不同,拥有更强大的力量与更强大的身体\n";
		Sleep(2000);
		cout<<"正常人类带着排斥接受着它们\n";
		Sleep(2000);
		cout<<"不知过了多久,人类异种窃取了正常人类的技术,但仍然没能继承人类的人性\n";
		Sleep(2000);
		cout<<"人类异种YZ带着他的亲卫队,妄图与创世主CC抗衡,夺取世界能量的来源——定界石\n";
		Sleep(2000);
		cout<<"那次人类使出了全力对抗异种\n";
		Sleep(2000);
		cout<<"双方死伤惨重,人类花了200年才恢复过来\n";
		cout<<"而人类异种从此销声匿迹\n";
		Sleep(2000);
		system("cls");
		cout<<"但现在,他们卷土重来了!!!";
		Sleep(2000);
		system("cls");
		cout<<"作为人类守护联盟的盟主,你能否担起重任,像千年以前的CC一样拯救世界?";
		Sleep(2000);
	}
	while(true){
		system("cls");
		cout<<"请选择模式\n";
		cout<<"1 default:最后堡垒\n";
		cout<<"2 beta:失落城邦\n";
		ch=getch();
		system("cls");
		if(ch=='1'){
			if(MessageBox(NULL,"你真的要进入default模式吗?","提示",MB_YESNO)==IDYES){
				cout<<"这是人类最后的希望...\n";
				Sleep(2000);
				cout<<"你将坚守最后的城池,保卫身后那颗普蓝色的定界石\n";
				Sleep(3500);
				cout<<"这个阶段,史称\n";
				Sleep(1000);
				system("cls");
				cout<<"最后堡垒!!!\n";
				break;
			}
		}
		else if(ch=='2'){
			if(MessageBox(NULL,"你真的要进入beta模式吗?","提示",MB_YESNO)==IDYES){
				cout<<"人类从曾经摔倒的地方重新站起\n";
				Sleep(2000);
				cout<<"我们即将迎来第一场反击战!\n";
				Sleep(2000);
				cout<<"目光灼灼地望向前方,那曾是我们的家园\n";
				Sleep(2000);
				cout<<"这个阶段,史称\n";
				Sleep(2000);
				system("cls");
				cout<<"失落城邦!!!\n";
				beta=true;
				break;
			}
		}
	}
	Sleep(2000);
	while(true){
		system("cls");
		if(!beta){
			cout<<"战争 7.5.7\n";
			cout<<"1 攻略\n";
			cout<<"2 各世界属性\n";
			cout<<"3 造物主模式\n";
			cout<<"4 生存模式\n";
			cout<<"5 衰竭模式\n";
			cout<<"6 普通模式\n";
		}else{
			cout<<"战争-beta 1.2.1\n";//beta模式版本号-6,-3,-6
			cout<<"开始\n";
		}
		ch=getch();
		if(beta){
			system("cls");
			g=200;
			jkl=50;
			e1=8000;
			o1=5000;
			o1_max=5000;
			break;
		}
		if(!beta&&ch=='1'){
			cout<<char(7);
			cout<<"首先,你可以一直按0大约10次,攒到大约200\n";
			cout<<"然后,你可以建一层护盾和一个哨兵塔,用来进攻\n";
			cout<<"接着,继续攒钱,建高射炮来防御坦克及飞机\n";
			cout<<"最后,只需要在建筑有破损时重建就行了\n";
			getch();
		}
		else if(!beta&&ch=='2'){
			system("cls");
			cout<<"造物主模式初始资源很多\n";
			cout<<"生存模式资源中等\n";
			cout<<"衰竭模式资源匮乏,每回合我方扣固定的100血量\n";
			Sleep(5000);
		}
		else if(!beta&&ch=='3'){
			system("cls");
			g=10000;
			jkl=500;
			e1=100000;
			hd=10;
			o1=5000;
			o1_max=5000;
			break;
		}
		else if(!beta&&ch=='4'){
			system("cls");
			g=1000;
			e1=100000;
			hd=5;
			o1=5000;
			o1_max=5000;
			break;
		}
		else if(!beta&&ch=='5'){
			system("cls");
			e=100;
			break;
		}
		else if(!beta&&ch=='@'){
			cout<<char(7)<<char(7)<<char(7)<<char(7);
			cout<<"此版本已上传至永远的CC的博客\n";
			Sleep(1500);
		}
		else if(!beta&&ch=='6'){
			system("cls");
			g=200;
			jkl=50;
			e1=8000;
			o1=5000;
			o1_max=5000;
			break;
		}
		else cout<<"不要乱输\n",Sleep(1500);
	}
	system("cls");
	if(ssss!="test"){
		cout<<"加载中...";
		cout<<endl;
		srand(time(0));
		xx=rand()%int(rand?12:11);
		switch(xx){
			case 0:cout<<"高射炮不仅可以打飞机,把它压下来也可以打地面敌人!";break;
			case 1:cout<<"迫击炮不仅可以打小兵,还能打敌方基地!";break;
			case 2:cout<<"小兵打敌方基地的伤害十分可观。";break;
			case 3:cout<<"导弹可以直接打对方的基地!";break;
			case 4:cout<<"千万别让小兵接近你的基地,你的建筑十分危险!";break;
			case 5:cout<<"激光炮可以攻击小兵、坦克、飞机或直接进攻敌方,十分强大!";break;
			case 6:cout<<"护盾可以抵挡敌方的一次远程进攻哦!";break;
			case 7:cout<<"克隆法术可以将小兵数量变成原来的两倍,在关键时刻能起到意想不到的作用";break;
			case 8:cout<<"岩石地雷可以在五回合后炸死敌方所有小兵哦!";break;
			case 9:cout<<"晶坷垃是一种新型货币,不可与金币互换。";break;
			case 10:cout<<"头铁少年破盾,钻地少年清兵。但需要耗费晶坷垃,且没有动静。";break;
			case 11:cout<<"歼击机攻击力极高,无法被防御塔击毁,需要谨慎防备。";break;
		}
		cout<<'\n';
		for(i=0;i<=12;i++) cout<<'<',Sleep(100);
		Beep(1500,200);
		for(i=0;i<=12;i++) cout<<'<',Sleep(100);
		Beep(1500,200);
		for(i=0;i<=12;i++) cout<<'<',Sleep(100);
		Beep(1500,200);
		for(i=0;i<=14;i++) cout<<'<',Sleep(100);
		Beep(2000,1000);
		cout<<" 100%";
		Sleep(1500);
		system("cls");
	}else
	{
		cout<<"ji guang pao (ji fang):";
		cin>>jg;
		cout<<"di fang gong ji li:";
		cin>>e;
	}
	//system("taskkill -f -im f_bgm.exe");
	//system("start bgm.exe");
	system("cls");
	while(o1>0&&e1>0&&(sssss=="16391639"||ch=='3'||ch=='2'||g<=100000&&o1<=300000)){
		int ttt=o2;
		int fff=e2;
		o1-=e;
		int last_hp=o1;
		int last_hpe=e1;
		jkl++;
		jkl+=jkl_kc;
		water++;
		xs(ch);
		d=' ';
		srand(time(NULL));
		for(i=1;i<=1+int(beta);i++){
			l=rand()%30+1;
			if(zx!=0){
				zx--;
				l=12;
			}
			if(l>=0&&l<=1){
				sl=rand()%20+1;
				cout<<sl<<"个小兵出现了\n";
				e2+=sl;
			}
			if(l>=2&&l<=3){
				if(hd==0){
					o1-=100;
					cout<<"一颗导弹在空中画出了一道完美的弧线\n";
				}
				else{
					hd--;
					cout<<"一颗导弹炸毁了一层护盾\n";
				}
			}
			if(l>=4&&l<=5){
				if(o2==0)
					if(tk!=0){
						cout<<"迫击炮轰然发射出一颗炮弹,炸毁一辆坦克\n";
						tk--;
					}
					else if(hd!=0){
						cout<<"迫击炮轰然发射出一颗炮弹,炸毁了一层护盾\n";
						hd--;
					}
					else{
						cout<<"迫击炮轰然发射出一颗炮弹,向你方飞来\n";
						o1-=80;
					}
				else{
					o2-=40;
					if(o2<0) o2=0;
					cout<<"迫击炮轰然发射出一颗炮弹,炸死一批小兵\n";
				}
			}
			if(l>=6&&l<=7){
				cout<<"一块巨石忽忽悠悠地飞来\n";
				o2-=35;
				if(o2<0) o2=0;
			}
			if(l>=8&&l<=9){
				cout<<"一颗狙击枪子弹射来,";
				if(pj!=0){
					cout<<"一门迫击炮炸了\n";
					pj--;
				}
				else if(jg!=0){
					cout<<"一门激光炮炸了\n";
					jg--;
				}
				else if(ts!=0){
					cout<<"一门投石机炸了\n";
					ts--;
				}
				else if(bt!=0){
					cout<<"一座哨兵塔炸了\n";
					bt--;
				}
				else if(hd!=0){
					cout<<"一层护盾炸了\n";
					hd--;
				}
				else{
					cout<<"扣血150点\n";
					o1-=150;
				}
			}
			if(l>=10&&l<=10){
				srand(time(NULL));
				sl=rand()%3+1;
				if(sl==3) sl=2;
				else sl=1;
				cout<<sl<<"辆坦克轰然出现\n";
				tke+=sl;
			}
			if(l>=11&&l<=11){
				if(beta){
					cout<<"咻!一架歼击机穿过云层\n";
					jjje++;
				}else cout<<"这轮什么也没出现\n";
			}
			if(l>=13&&l<=13){
				cout<<"敌方建造了一个护盾\n";
				hde++;
			}
			if(l>=14&&l<=15){
				if(fj!=0){
					cout<<"高射炮向天空扫去,一架飞机掉了下来\n";
					fj--;
				}
				else{
					if(tk!=0){
						cout<<"高射炮向地面扫去,炸毁一辆坦克\n";
						tk--;
					}
					else{
						if(o2!=0){
							cout<<"高射炮向地面扫去,炸死一个小兵\n";
							o2--;
						}
						else cout<<"高射炮没有目标\n";
					}
				}
			}
			if(l>=16&&l<=16){
				cout<<"一架飞机出现了\n";
				fje++;
			}
			if(l>=17&&l<=18){
				cout<<"瘟疫发生了\n";
				o2/=2;
			}
			if(l>=19&&l<=19){
				if(fj>=2){
					cout<<"一束激光射向天空,两架飞机掉了下来\n";
					fj-=2;
				}
				else{
					if(fj==1){
						cout<<"一束激光射向天空,一架飞机掉了下来\n";
						fj--;
					}
					else if(tk!=0&&o2!=0){
						cout<<"一束激光平射而来,击毁了"<<min(3,tk)<<"辆坦克,炸死"<<min(20,o2)<<"个小兵\n";
						tk-=min(3,tk);
						o2-=min(20,o2);
					}
					else{
						if(tk!=0){
							cout<<"一束激光平射而来,击毁了"<<min(3,tk)<<"辆坦克\n";
							tk-=min(3,tk);
						}
						else{
							if(o2!=0){
								cout<<"一束激光平射而来,炸死"<<min(20,o2)<<"个小兵\n";
								o2-=min(20,o2);
							}
							else if(hd!=0){
								cout<<"一束激光平射而来,一层护盾炸了\n";
								hd--;
							}
							else{
								cout<<"一束激光向你方平射而来\n";
								o1-=100;
							}
						}
					}
				}
			}
			if(l<=20&&l>=20){
				cout<<"对方使用了神秘的法术,小兵数量变成了两倍\n";
				e2*=2;
			}
			if(l<=21&&l>=21){
				cout<<"这轮什么也没出现\n";
				jde++;
			}
			if(l>=12&&l<=12||l>=22&&l<=23||l>=28&&l<=30){
				cout<<"这轮什么也没出现\n";
			}
			if(l>=24&&l<=25){
				cout<<"敌方建造了一个屏障\n";
				pze++;
			}
			if(l>=26&&l<=26){
				cout<<"敌方建造了一个量子屏障\n";
				lzpze++;
			}
			if(l>=27&&l<=27){
				cout<<"这轮什么也没出现\n";
				dle++;
			}
			if(i==1) Sleep(2000);
		}
		dd=rand()%(beta?40:30)+1+jk*5;
		cout<<"你得到了"<<dd<<"个金币\n";
		g+=dd;
		Sleep(2000);
		system("cls");
		while(d!='0'){
			xs(ch);
			cout<<left<<setw(20)<<"1   派出小兵 3$/1";
			cout<<left<<setw(20)<<"             2   导弹 50$/1"<<"\n";
			cout<<left<<setw(20)<<"3   迫击炮 120$/1";
			cout<<left<<setw(20)<<"             4   投石机 100$/1"<<"\n";
			cout<<left<<setw(20)<<"5   坦克 60$/1";
			cout<<left<<setw(20)<<"             6   哨兵塔 100$/1"<<"\n";
			cout<<left<<setw(20)<<"7   高射炮 120$/1";
			cout<<left<<setw(20)<<"             8   飞机 80$/1"<<"\n";
			cout<<left<<setw(20)<<"9   瘟疫 50$/1";
			cout<<left<<setw(20)<<"             a   激光炮 180$/1"<<"\n";
			cout<<left<<setw(20)<<"b   护盾 80$/1";
			cout<<left<<setw(20)<<"             c   克隆法术 80$/1";
			if(ch=='3') cout<<"禁用\n";
			else cout<<"\n";
			cout<<left<<setw(20)<<"d   金矿开采机 50$/1";
			cout<<left<<setw(20)<<"             e   间谍 80$/1"<<"\n";
			cout<<left<<setw(20)<<"f   诈降书 150$/1";
			if(zx!=0) cout<<"禁用";
			else cout<<"";
			cout<<left<<setw(20)<<"             g   屏障 2$/1"<<"\n";
			cout<<left<<setw(20)<<"h   量子屏障 10$/1";
			cout<<left<<setw(20)<<"             i   岩石地雷 50$/1"<<"\n";
			cout<<left<<setw(20)<<"j   晶坷垃开采器 5G/1";
			cout<<left<<setw(20)<<"            k   头铁少年 5G/1"<<"\n";
			cout<<left<<setw(20)<<"l   钻地少年 5G/1";
			cout<<left<<setw(20)<<"             m   回血药水(回250) 10G+20$/1"<<"\n";
			cout<<left<<setw(20)<<"n   回血器(一次回50) 30G+60$/1"<<"\n";
			if(beta) cout<<left<<setw(20)<<"o   歼击机 120$+25G/1"<<"\n";
			cout<<left<<setw(20)<<"p   打怪(实在不行去刷)"<<endl;
			cout<<left<<setw(20)<<"q   查看注释"<<endl;
			cout<<left<<setw(20)<<"r   开宝箱"<<endl;
			cout<<left<<setw(20)<<"s   查看成就"<<endl;
			cout<<left<<setw(20)<<"t   查看如何获得成就"<<endl;
			cout<<left<<setw(20)<<"u   抽奖"<<endl;
			if(beta) cout<<"*   升级主塔 100$+20G/1\n";
			cout<<"\\   关闭\n";
			cout<<"#   礼包码(hehe为官方礼包码)\n";
			cout<<"0   继续";
			d=getch();
			if(d=='u'){
				cj();
			}
			if(d=='t'){
				system("cls");
				printf("买到终极宝箱(终极奥义)\n");
				printf("买宝箱20次  (奉献精神)\n");
				printf("杀死20个怪  (怪物猎人)\n");
				printf("买回血器5个 (回血大师)\n");
				printf("打死十级怪物(打怪大师)\n");
				Sleep(5000);
			}
			if(d=='s'){
				system("cls");
				if(zjay) printf("终极奥义\n");
				if(fxjs) printf("奉献精神\n");
				if(gwlr) printf("怪物猎人\n");
				if(hxds) printf("回血大师\n");
				if(dgds) printf("打怪大师\n");
				Sleep(5000);
			}
			if(d=='r'){
				kaibx();
			}
			if(d=='q'){
				system("cls");
				printf("因打怪,宝箱模板没有时间了,所以做得简陋一点\n");
				printf("下个版本升级的打怪\n");
				Sleep(5000);
			}
			if(d=='p'){
				bdaguai();
			}
			if(d=='#'){
				system("cls");
				cout<<"请输入礼包码形如 *** 及你名字的缩写的小写形式\n";
				cout<<"请输入:";
				string str;
				cin>>str;
				if(str==ssss)
				  g+=100,jkl+=100,e1+=100;
				cout<<"正在处理...";
				Sleep(1500);
				system("cls");
				continue;
			}
			if(d=='\\'){
				system("cls");
				return;
			}
			if(beta&&d=='*'){
				if(g>=100&&jkl>=20){
					g-=100;
					jkl-=20;
					Lv++;
					o1_max+=500;
					o1+=500;
					lzpz+=10;
				}
			}
			if(d=='1'){
				system("cls");
				xs(ch);
				cout<<"数量:";
				cin>>s;
				while(s*3>g){
					system("cls");
					xs(ch);
					cout<<"数量:";
					cin>>s;
				}
				o2+=s;
				g-=s*3;
				system("cls");
			}
			if(d=='2'){
				if(g>=50){
					g-=50;
					if(hde!=0){
						e1-=100;
					}
					else{
						hde--;
					}
				}
			}
			if(d=='3'){
				if(g>=120){
					g-=120;
					pj++;
				}
			}
			if(d=='4'){
				if(g>=100){
					g-=100;
					ts++;
				}
			}
			if(d=='5'){
				if(g>=60){
					g-=60;
					tk++;
				}
			}
			if(d=='6'){
				if(g>=100){
					g-=100;
					bt++;
				}
			}
			if(d=='7'){
				if(g>=120){
					g-=120;
					gs++;
				}
			}
			if(d=='8'){
				if(g>=80){
					g-=80;
					fj++;
				}
			}
			if(d=='9'){
				if(g>=50){
					g-=50;
					e2/=2;
				}
			}
			if(d=='a'){
				if(g>=180){
					g-=180;
					jg++;
				}
			}
			if(d=='b'){
				if(g>=80){
					g-=80;
					hd++;
				}
			}
			if(d=='c'){
				if(g>=80&&ch!='3'){
					g-=80;
					system("cls");
					cout<<"一抹神秘的光辉映在天空中,小兵变成了原来的两倍\n";
					Sleep(2500);
					o2*=2;
				}
			}
			if(d=='d'){
				if(g>=50){
					g-=50;
					jk++;
				}
			}
			if(d=='e'){
				if(g>=80){
					g-=80;
					jd++;
				}
			}
			if(d=='f'){
				if(g>=150&&zx==0){
					g-=150;
					zx+=5;
				}
			}
			if(d=='g'){
				system("cls");
				xs(ch);
				cout<<"数量:";
				cin>>s;
				while(s*2>g){
					system("cls");
					xs(ch);
					cout<<"数量:";
					cin>>s;
				}
				pz+=s;
				g-=s*2;
				system("cls");
			}
			if(d=='h'){
				system("cls");
				xs(ch);
				cout<<"数量:";
				cin>>s;
				while(s*10>g){
					system("cls");
					xs(ch);
					cout<<"数量:";
					cin>>s;
				}
				lzpz+=s;
				g-=s*10;
				system("cls");
			}
			if(d=='i'){
				if(g>=50){
					g-=50;
					dl+=5;
				}
			}
			if(d=='j'){
				if(jkl>=5){
					jkl-=5;
					jkl_kc++;
				}
			}
			if(d=='k'){
				if(jkl>=5){
					jkl-=5;
					tt++;
				}
			}
			if(d=='l'){
				if(jkl>=5){
					jkl-=5;
					zd++;
				}
			}
			if(d=='m'){
				if(jkl>=10&&g>=20){
					jkl-=10;
					g-=20;
					o1=min(o1_max,o1+250);
				}
			}
			if(d=='n'){
				if(jkl>=30&&g>=60){
					jkl-=30;
					g-=60;
					reblood++;
					hxcs++;
					if(hxcs>=5&&hxds!=1){
						hxds=1;
						system("cls");
						printf("恭喜你取得了回血大师的成就!!!\n");
						Sleep(5000);
						printf("奖励10晶坷垃,100金币");
						g+=100;
						jkl+=10;
						Sleep(5000);
					}
				}
			}
			if(d=='o'){
				if(g>=120&&jkl>=25){
					g-=120;
					jkl-=25;
					jjj++;
				}
			}
			system("cls");
		}
		if(dl!=0){
			if(dl%5!=0)
			  dl-=(dl/5+1);else
			  dl-=dl/5;
			if(dl%5==0){
				cout<<"一声惊天巨响,敌方小兵化为骨灰\n";
				e2=0;
			}
		}
		if(dle!=0){
			if(dle%5!=0)
			  dle-=(dle/5+1);else
			  dle-=dle/5;
			if(dle%5==0){
				cout<<"一声惊天巨响,我方小兵化为骨灰\n";
				o2=0;
			}
		}
		if(jd!=0){
			if(e2!=0){
				cout<<"我方间谍使敌方"<<min(jd,e2)<<"个小兵叛变了\n";
				e2-=min(jd,e2);
				o2+=min(jd,e2);
			}
			else{
				cout<<"我方间谍被发现!\n";
				jd=0;
			}
		}
		if(jde!=0){
			if(o2!=0){
				o2-=min(jde,o2);
				e2+=min(jde,o2);
			}
			else{
				cout<<"敌方间谍被发现!\n";
				jde=0;
			}
		}
		if(tt!=0){
			if(hde!=0){
				hde-=min(min(tt,hde),jkl);
				jkl-=min(min(tt,hde),jkl);
			}
			if(hde<=0) hde=0;
		}
		if(zd!=0){
			if(e2!=0){
				e2-=min(min(e2/10,zd),jkl);
				jkl-=min(min(e2/10,zd),jkl);
			}
			if(e2<=0) e2=0;
		}
		for(i=1;i<=pj;i++)
			if(e2==0)
				if(tke!=0){
					cout<<"迫击炮轰然发射出一颗炮弹,炸毁一辆坦克\n";
					tke--;
				}
				else{
					if(hde!=0){
						cout<<"迫击炮轰然发射出一颗炮弹,击毁一层护盾\n";
						hde--;
					}
					else{
						cout<<"迫击炮轰然发射出一颗炮弹,向敌方飞去\n";
						e1-=80;
					}
				}
			else{
				if(e2>=40){
					g+=80;
					e2-=40;
				}
				else{
					g+=e2*2;
					e2=0;
				}
				if(e2<0) e2=0;
				cout<<"迫击炮轰然发射出一颗炮弹,炸死一批小兵\n";
			}
		for(i=1;i<=ts;i++){
			if(e2>=35){
				e2-=35;
				g+=70;
			}
			else{
				g+=e2*2;
				e2=0;
			}
			cout<<"一块巨石忽忽悠悠地飞去\n";
		}
		for(i=1;i<=bt;i++){
			cout<<"5个小兵慢悠悠地从哨兵塔里走出来\n";
			o2+=5;
		}
		for(i=1;i<=gs;i++){
			if(fje!=0){
				cout<<"高射炮向天空扫去,一架飞机掉了下来\n";
				fje--;
			}
			else{
				if(tke!=0){
					cout<<"高射炮向地面扫去,炸毁一辆坦克\n";
					tke--;
				}
				else{
					if(e2!=0){
						cout<<"高射炮向地面扫去,炸死一个小兵\n";
						e2--;
					}
					else cout<<"高射炮没有目标\n";
				}
			}
		}
		for(i=1;i<=jg;i++)
			if(fje>=2){
				cout<<"一束激光射向天空,两架飞机掉了下来\n";
				fje-=2;
			}
			else{
				if(fje==1){
					cout<<"一束激光射向天空,一架飞机掉了下来\n";
					fje--;
				}
				else if(tke!=0&&e2!=0){
					cout<<"一束激光平射出去,击毁了"<<min(3,tke)<<"辆坦克,炸死"<<min(15,e2)<<"个小兵\n";
					tke-=min(3,tke);
					e2-=min(15,e2);
				}
				else{
					if(tke!=0){
						cout<<"一束激光平射出去,击毁了"<<min(3,tke)<<"辆坦克\n";
						tke-=min(3,tke);
					}
					else{
						if(e2!=0){
							cout<<"一束激光平射出去,炸死"<<min(15,e2)<<"个小兵\n";
							e2-=min(15,e2);
						}
						else{
							if(hde!=0){
								cout<<"一束激光平射出去,击毁一层护盾\n";
								hde--;
							}
							else{
								cout<<"一束激光向敌方平射出去\n";
								e1-=150;
							}

						}
					}
				}
			}
		if(fj!=0&&fje!=0){
			fk=fj<fje?fj:fje;
			fj-=fk;fje-=fk;
			cout<<"双方都有"<<fk<<"架飞机从空中落下来了\n";
		}
		for(i=1;i<=fj;i++){
			if(hde!=0){
				cout<<"我方飞机击毁一层护盾\n";
				hde--;
			}
			else{
				cout<<"我方飞机俯冲轰炸!\n";
				e1-=150;
			}
		}
		for(i=1;i<=fje;i++){
			if(hd!=0){
				cout<<"敌方飞机击毁我方一层护盾\n";
				hd--;
			}
			else{
				cout<<"敌方飞机俯冲轰炸!\n";
				o1-=150;
			}
		}
		if(jjj!=0&&jjje!=0){
			fk=jjj<jjje?jjj:jjje;
			jjj-=fk;jjje-=fk;
			cout<<"双方都有"<<fk<<"架歼击机从空中落下来了\n";
		}
		for(i=1;i<=jjj;i++){
			if(hde!=0){
				cout<<"我方歼击机击毁一层护盾\n";
				hde--;
			}
			else{
				cout<<"我方歼击机俯冲轰炸!\n";
				e1-=200;
			}
		}
		for(i=1;i<=jjje;i++){
			if(hd!=0){
				cout<<"敌方歼击机击毁我方一层护盾\n";
				hd--;
			}
			else{
				cout<<"敌方歼击机俯冲轰炸!\n";
				o1-=200;
			}
		}
		if(tk!=0&&tke!=0){
			tkk=tk<tke?tk:tke;
			cout<<"坦克开炮了,双方都有"<<tkk<<"门坦克损毁了\n";
			tk-=tkk;tke-=tkk;
		}
		if(o2!=0&&tke*20>o2){
			cout<<"坦克开炮了,"<<o2<<"个小兵死去了\n";
			if(o2/20!=0)
				cout<<o2/20<<"门坦克损毁了\n";
			o2=0;tke-=o2/20;
		}
		if(tke!=0&&o2>=tke*20){
			cout<<"坦克开炮了,"<<tke*20<<"个小兵死去了\n";
			g+=tke*60;
			cout<<tke<<"门坦克损毁了\n";
			o2-=tke*20;tke=0;
		}
		if(o2!=0&&e2!=0)
			cout<<"有小兵倒下去了\n";
		else cout<<"没有小兵倒下\n";
		if(e2!=0&&tk*20>e2){
			cout<<"坦克开炮了,"<<e2<<"个小兵死去了\n";
			g+=tk*60;
			if(e2/20!=0)
				cout<<e2/20<<"门坦克损毁了\n";
			e2=0;tk-=e2/20;
		}
		if(tk!=0&&e2>=tk*20){
			cout<<"坦克开炮了,"<<tk*20<<"个小兵死去了\n";
			g+=tk*60;
			cout<<tk<<"门坦克损毁了\n";
			e2-=tk*20;tk=0;
		}
		if(ttt-o2>50){
			o2-=(ttt-o2)/10;
			cout<<"我方有"<<(ttt-o2)/10<<"个小兵逃走了";
		}
		if(fff-e2>50){
			e2-=(fff-e2)/10;
			cout<<"敌方有"<<(fff-e2)/10<<"个小兵逃走了";
		}
		if(o2>e2){
			g+=e2*2;
			o2-=e2;
			e2=0;
		}
		else{
			g+=o2*2;
			e2-=o2;
			o2=0;
		}
		if(o2!=0){
			e1-=o2*5;
			cout<<"我方小兵围殴敌方,扣血"<<o2*5<<"点\n";
		}
		if(tk!=0){
			e1-=tk*20;
			cout<<"我方坦克围殴敌方,扣血"<<tk*20<<"点\n";
		}
		if(e2!=0){
			k=e2;
			if(pj*30>k){
				if(k/30!=0)
					cout<<k/30<<"门迫击炮损坏了\n";
				pj-=k/30;
			}
			else{
				if(pj!=0)
					cout<<pj<<"门迫击炮损坏了\n";
				k-=pj*30;pj=0;
				if(ts*25>k){
					if(k/25!=0)
						cout<<k/25<<"门投石机损坏了\n";
					ts-=k/25;
				}
				else{
					if(ts!=0)
						cout<<ts<<"门投石机损坏了\n";
					k-=ts*25;ts=0;
					if(jg*35>k){
						if(k/35!=0)
							cout<<k/35<<"架激光炮损坏了\n";
						jg-=k/35;
					}
					else{
						if(jg!=0)
							cout<<jg<<"架激光炮损坏了\n";
						k-=jg*35;jg=0;
						if(bt*20>k){
							if(k/20!=0)
								cout<<k/20<<"座哨兵塔损坏了\n";
							bt-=k/20;
						}
						else{
							if(bt!=0)
								cout<<bt<<"座哨兵塔损坏了\n";
							k-=bt*20;bt=0;
							if(k!=0){
								cout<<"敌方小兵围殴我方,扣血"<<k*5<<"点\n";
								o1-=k*5;
							}
						}
					}
				}
			}
		}
		for(i=1;i<=tke;i++){
			if(pj!=0){
				pj--;
				cout<<"1门迫击炮损坏了\n";
			}
			else if(jg!=0){
				jg--;
				cout<<"1架激光炮损坏了\n";
			}
			else if(ts!=0){
				ts--;
				cout<<"1门投石机损坏了\n";
			}
			else if(bt!=0){
				bt--;
				cout<<"1座哨兵塔损坏了\n";
			}
			else{
				o1-=(tke-i+1)*100;
				cout<<"敌方坦克围殴我方,扣血"<<(tke-i+1)*100<<"点\n";
				i=tke;
			}
		}
		if(o1<last_hp) o1+=min(lzpz,last_hp-o1);
		if(o1<last_hp){
			o1+=min(pz,last_hp-o1);
			pz-=min(pz,last_hp-o1);
		}
		if(e1<last_hpe) e1+=min(lzpze,last_hpe-e1);
		if(e1<last_hpe){
			e1+=min(pze,last_hpe-e1);
			pze-=min(pze,last_hpe-e1);
		}
		cout<<"咕嘟嘟,+"<<reblood*50<<"血\n";
		o1=min(o1_max,o1+reblood*50);
		Sleep(3000);
		system("cls");
		if(ch=='3') ++iii;
	}
	if(g>10000||o1>10000) bg();
	if(o1<=0){
		if(e1>500&&e1<1500) cout<<"城池被攻破,人类的最后一道防线破碎,人类沦为了宇宙中的一片尘埃。\n";
		if(e1>=1500) cout<<"你已经很努力了,但敌方太强,你无法抗衡\n人类不堪的淹没在了历史的长河中。\n";
		if(e1<=500) cout<<"你的各个方面都很强,但在最后无法力挽狂澜,才使人类文明灭亡。\n";
	}
	else{
		if(o1>500&&o1<1500) cout<<"你靠自己的顽强决心守住了城池,救回了人类文明。\n";
		if(o1<=500) cout<<"你在最后的紧要关头击退了人类异种,挽救了人类文明。\n";
		if(o1>=1500) cout<<"你以自己的高超指挥能力击退了人类异种,拯救了整个人类!!!\n\n";
	}
	Sleep(3000);
	system("cls");
	if(ssss!="16391639"){
		system("cls");
		cout<<"若有bug,加入需求及新想法,请发表\n";
		cout<<"goodbye"<<endl;
		Sleep(2500);
		return;
	}
	//system("taskkill -f -im bgm.exe");
	//system("cls");
	//system("start second.exe");
	//Sleep(5000);
	//system("start third.exe");
	//system("pause");
	return;
}
void bg(){
	system("cls");
	cout<<"小朋友想走不正当途径是不好的\n";
	Sleep(3000);
	xs(ch);
	for(i=1;i<=10000;i++)
		 cout<<"迫击炮轰然发射出一颗炮弹,向你方飞来\n";
	cout<<"你死了!";
}
int main(){
	//system("start f_bgm.exe");
	//system("start first.exe");
	//system("cls");
	std::srand(time(0));
	printf("加载中...\n");
	for(i=0;i<=12;i++) cout<<'<',Sleep(100);
	Beep(1500,200);
	for(i=0;i<=12;i++) cout<<'<',Sleep(100);
	Beep(1500,200);
	for(i=0;i<=12;i++) cout<<'<',Sleep(100);
	Beep(1500,200);
	for(i=0;i<=14;i++) cout<<'<',Sleep(100);
	Beep(2000,1000);
	cout<<" 100%";
	Sleep(1500);
	system("cls");
	cout<<"黑_白(永远的CC) 段建泽出品\n";
	cout<<"请输入姓名\n";
	cout<<"格式为***,前后没有空格,全部为小写\n";
	cin>>ssss;
	system("cls"),aa(ssss);
	return 0;
}