C++制作游戏(整合),《仅1500行》 ,代码奉上

//#include
#include
#include
#include 
#include
#include
#include
#include"cmath" 
//#define IsKeyDown(VK_NAME) ((GetAsyncKeyState(VK_NAME) & 0x8000) ? true:false) 
#define mm2 1200
#define mm1 700
#define mm3 1900
#define ctl 857
#define mop 10000
using namespace std;
string xiaotishi[200]={"","首先是活下来,再考虑别的","日出而作,日落而息","食用鱼类可获得不同的增益","",""}; 
/*int vf(int x,int t){
    if(x==t/2-1){return t/2+t/2-t;}
    else{return 100;}
}
int ttle(int fffa)
{
    fffa-=1;
    return fffa;
}*/  
void gettime()
{
    time_t rawtime;
    struct tm *ptminfo;
    time(&rawtime);
    ptminfo = localtime(&rawtime);
    printf(": %02d-%02d-%02d %02d:%02d:%02d(鸡霓太美)",
    ptminfo->tm_year + 1900, ptminfo->tm_mon + 1, ptminfo->tm_mday,
    ptminfo->tm_hour, ptminfo->tm_min, ptminfo->tm_sec);
}
void zairu()//组件
{
	int bl=70;
	int righl=0;
	for(int i=1;i<=20;i++)
	{
		if(xiaotishi[i]!=""){righl+=1;}
	}
	srand((int)time(0));
	int tim=rand()%righl+1;
	system("cls");
	for(int i=1;i<=bl+4;i+=1){
		int timett=25+(int)(75.0 * rand()/(RAND_MAX+1.0));
		if(i==bl+1){
			cout<<"                                                      \n";
			cout<<"                                                      \n";
			cout<<"                                                     \n";
			cout<<"                               (\\                               \n";
			cout<<"                              /  \\                             \n";
			cout<<"                             /    |                             \n";
			cout<<"                            /     |                             \n";
			cout<<"                            |     \\                             \n";
			cout<<"                            /      \\                            \n";
			cout<<"                           |________|____________                  \n";
			cout<<"                           |        |                       \n";
			cout<<"                            \\      /                        \n";
			cout<<"                            |     /                         \n";
			cout<<"                            \\     |                         \n";
			cout<<"                             \\    |                         \n";
			cout<<"                              \\  /                          \n";
			cout<<"                               (/                           \n";
			cout<<"                                                             \n";Sleep(300);	system("cls");continue;		
		}else if(i==bl+2){
			cout<<"                                                      \n";
			cout<<"                                                      \n";
			cout<<"                                                   \n";
			cout<<"                               (\\                               \n";
			cout<<"                             /   \\                             \n";
			cout<<"                            /     |                             \n";
			cout<<"                           /      |                             \n";
			cout<<"                          /       \\                             \n";
			cout<<"                         /         \\                            \n";
			cout<<"                        [___________|___________                  \n";
			cout<<"                         \\          |                       \n";
			cout<<"                          \\        /                        \n";
			cout<<"                           \\      /                         \n";
			cout<<"                            \\     |                         \n";
			cout<<"                             \\    |                         \n";
			cout<<"                              \\  /                          \n";
			cout<<"                               (/                           \n";
			cout<<"                                                             \n";		
			Sleep(300);system("cls");	continue;
		}
		else if(i==bl+3){
			cout<<"                                                      \n";
			cout<<"                                                      \n";
			cout<<"                                                     \n";
			cout<<"                              (\\                               \n";
			cout<<"                             /   \\                             \n";
			cout<<"                           /      |                             \n";
			cout<<"                         /        |                             \n";
			cout<<"                       /          \\                             \n";
			cout<<"                      /            \\                            \n";
			cout<<"                    [_______________|_____                  \n";
			cout<<"                    |               |                       \n";
			cout<<"                      \\            /                        \n";
			cout<<"                       \\          /                         \n";
			cout<<"                         \\        |                         \n";
			cout<<"                           \\      |                         \n";
			cout<<"                             \\   /                          \n";
			cout<<"                              (/                           \n";
			cout<<"                                                            \n";	Sleep(350);system("cls");	continue;
		}
		else if(i==bl+4){
		cout<<"                                                      \n";
		cout<<"                                                      \n";
		cout<<"                                                    \n";
		cout<<"                                   (\\                               \n";
		cout<<"                                   | \\                             \n";
		cout<<"                                   |  |                             \n";
		cout<<"                                   |  |                             \n";
		cout<<"                                   |  \\                             \n";
		cout<<"                                   |   \\                            \n";
		cout<<"                                   |    |                 -                 -\n";
		cout<<"                                   |    |                                                          -                -              \n";
		cout<<"                                   |   /                          -                        -     \n";
		cout<<"                                   |  /                         \n";
		cout<<"                                   |  |                         \n";
		cout<<"                                   |  |                         \n";
		cout<<"                                   | /                          \n";
		cout<<"                                   (/                           \n";
		cout<<"                                                             \n";Sleep(450);system("cls");	continue;		
		}
		else{
		cout<<"                                                      \n\n";
		cout<<"                         正  在  加  载  中...                            \n\n";
		cout<<"                                (\\                               \n";
		cout<<"                                | \\                             \n";
		cout<<"                                |  |                             \n";
		cout<<"                                |  |                             \n";
		cout<<"                                |  \\                             \n";
		cout<<"                                |   \\                            \n";
		cout<<"                                |____|__________________                        \n";
		cout<<"                                |    |                            \n";
		cout<<"                                |   /                            \n";
		cout<<"                                |  /                         \n";
		cout<<"                                |  |                         \n";
		cout<<"                                |  |                         \n";
		cout<<"                                | /                          \n";
		cout<<"                                (/                           \n\n";			
		}
		cout<<"       ";for(int iff=1;iff<=bl;iff++){cout<<"_";}cout<<"\n";
		cout<<"      |";for(int j=1;j<=i;j++){cout<<"▇";}for(int k=1;k<=bl-i;k++){cout<<" ";}cout<<" |\n";
		cout<<"       ";for(int itt=1;itt<=bl;itt++){cout<<"▔";}cout<<"\n";
		cout<<"                                     "<1){cout<<"已尝试"<=1;i-=1){
		cout<>nmt;Sleep(644);system("cls");
		cout<<"\n 请选择一个英雄:\n";Sleep(444);cout<<"1,人物1  2,迪卢克  3,温迪  4,可莉  5,莫娜  6,阿贝多  7,优菈  8,埃洛伊  9,蔡徐坤\n      ";
		cin>>yx;xl=xlz[yx];gj=gjz[yx];lt=ltz[yx];Sleep(400); system("cls");
		cout<<"\n 请选择一把武器:\n";Sleep(400);cout<<"1,天空之刃  2,风鹰剑  3,原木刀  4,阿莫斯之弓  5,赤沙之杖  6,无工之剑  7,偃月刀  8,反物质核弹\n        ";
		cin>>wq;cout<<"你装备了"<>cw;cwnm=cnm[cw];Sleep(399);system("cls");
		system("pause");
		cout<<"正在匹配中";for(int i=1;i<=3;i+=1){cout<<".";Sleep(555);} 
		cout<<"\n你的对手是:";Sleep(444);srand(time(NULL));
		int a=rand()%10+1;cout<=3){cout<<"3,逃跑";}cin>>kjk;
			if(kjk==3){
                if(i>=3){srand(time(0));int wers=rand()%8+1;
                    if(wers==1||wers==4||wers==5||wers==7){cout<<" 逃跑成功!"<1){cout<<"再次";}cout<<"攻击!"<>et;
        if(et==2){Sleep(555); cout<<"";return 0;}           
    }}
    if(h=='3'){
    	system("cls");
   		cout<<"\n 游戏规则:你需要在不撞墙的前提下,吃到 & 以加分\n";
		cout<<" 操作指示: 上W 下S 左A 右D  投掷炸弹T  装备F(靠近 道具 四周后点击f,不可站其上方碰撞) \n";
		cout<<" 道具指示: !,玩家(你)  \n           #,墙壁\n           *,炸弹补给\n           &,加分怪\n           @,生命药水\n\n";
	    system("pause");
	    int fg;int x=1,y=1,he,sh,t=0,max=0,cnt=0,tnt=2;
	    Sleep(888);system("cls");	
    char ch;
	while(4){
		int te=0;
		cout<<"请选择地图:\n 1,地图1  2,地图2  3,地图3  4,地图4  5,地图5  0,退出  ";cin>>fg;
		if(fg==0){break;} 
		if(fg==1){x=1;y=1;tnt=2; uxl=3;sx=3;}
		if(fg==2){x=1,y=1; tnt=2;uxl=3;sx=3;}  
		if(fg==3){y=17;x=7;tnt=1800;uxl=3;sx=3;}
		if(fg==4){y=17;x=2;tnt=3;uxl=3;sx=3;}
		if(fg==5){x=1,y=1;tnt=1;uxl=3;sx=3;} 
		for(int i=0;i<=16;i++){
    		for(int j=0;j<=35;j+=1){
    			if(fg==1){amy[i][j]=a1[i][j];}
				if(fg==2){amy[i][j]=a2[i][j];}
				if(fg==3){amy[i][j]=a3[i][j];}
				if(fg==4){amy[i][j]=a4[i][j];}
				if(fg==5){amy[i][j]=a5[i][j];}
			}
		} 	
		srand(time(0));
    	while(87){ 
    		he=rand()%13+2;sh=rand()%32+2;  
    		if(amy[he][sh]=='!'||amy[he][sh]=='#'||amy[he][sh]=='&'){continue;}
			amy[he][sh]='&';t=0;break;	 
		}   
		for(int i=0;i<=16;i++){
    		for(int j=0;j<=35;j+=1){
    			cout<=2&&y>=2){amy[x-2][y]=amy[x][y-2]=' ';}
				tnt-=1;
			}
			if(ch=='f'){
				if(amy[x+1][y]=='*'){amy[x+1][y]=' ';tnt+=1;}
				if(amy[x-1][y]=='*'){amy[x-1][y]=' ';tnt+=1;}
				if(amy[x][y+1]=='*'){amy[x][y+1]=' ';tnt+=1;}
				if(amy[x][y-1]=='*'){amy[x][y-1]=' ';tnt+=1;}
				if(amy[x+1][y]=='@'){amy[x+1][y]=' ';uxl+=1;}
				if(amy[x-1][y]=='@'){amy[x-1][y]=' ';uxl+=1;}
				if(amy[x][y+1]=='@'){amy[x][y+1]=' ';uxl+=1;}
				if(amy[x][y-1]=='@'){amy[x][y-1]=' ';uxl+=1;}
				if(uxl>sx){uxl=sx;}
			} 
        	if(ch=='a'){
        		if(amy[x][y-1]=='@'||amy[x][y-1]=='*'){continue;} 
	        	if(amy[x][y-1]=='#'){ uxl-=1; te=1;}
	        	if(amy[x][y-1]=='&')
        		{Beep(mm1,40);
        			cnt+=1;t=1;
        			amy[x][y]=' ';y--;
        			amy[x][y]='!';
				}else
           	 	if(amy[x][y-1]!='#'){amy[x][y]=' ';y--;amy[x][y]='!';}
        	}
        	if(ch=='s'){
        		if(amy[x+1][y]=='@'||amy[x+1][y]=='*'){continue;} 
        		if(amy[x+1][y]=='#'){uxl-=1;te=1;}
        		if(amy[x+1][y]=='&')
        		{Beep(mm1,40);
        			cnt+=1;t=1;
        			amy[x][y]=' ';x++;
        			amy[x][y]='!';
				}else
          	  if(amy[x+1][y]!='#'){amy[x][y]=' ';x++;amy[x][y]='!';}	
        	}
        	if(ch=='d'){
        		if(amy[x][y+1]=='@'||amy[x][y+1]=='*'){continue;} 
        		if(amy[x][y+1]=='#'){uxl-=1;te=1;}
        		if(amy[x][y+1]=='&')
        		{Beep(mm1,40);cnt+=1;t=1;
        			amy[x][y]=' ';y++;
        			amy[x][y]='!';
				}else
            	if(amy[x][y+1]!='#'){amy[x][y]=' ';y++;amy[x][y]='!';}
        	}
        	if(ch=='w'){
        		if(amy[x-1][y]=='@'||amy[x-1][y]=='*'){continue;} 
        		if(amy[x-1][y]=='#'){uxl-=1;te=1;}
        		if(amy[x-1][y]=='&')
        		{Beep(mm1,40);cnt+=1;t=1;
        			amy[x][y]=' ';x--;
        			amy[x][y]='!';
				}else
           	 	if(amy[x-1][y]!='#'){amy[x][y]=' ';x--;amy[x][y]='!';}
        	}
        	system("cls");
        	for(int i=0;i<=16;i++){
    			for(int j=0;j<=35;j+=1){
    				cout<>v;
        if(v==1){s5=1;}
        if(v==2){s5=3;}
        if(v==3){s5=50000;}
        cout<>s7;
            if(s6==1){s8="石头"; }if(s7==1){s9="石头"; }if(s6==2){s8="剪刀";}if(s7==2){s9="剪刀";}if(s6==3){s8="布"; }if(s7==3){s9="布"; }
            Sleep(300);system("cls");cout<<"石 头";Sleep(300);system("cls");cout<<"剪 刀";Sleep(350);system("cls");cout<<" 布"<>s13;if(s13==2){break;}}cout<s12){cout<<"你赢了"<s11){cout<<"你输了"< |                           | 出门 |            ",
    "                                                   |  ℡  |         ",
    "_|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|_|      |__|__|__|__|__|__",
    " |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | |      |  |  |  |  |  |",
    };
    char pictures2[200][200]={ 
    "                                              _________              ",
    "                         .  ..     .         |        |__3,世纪峡谷__",
    "                       . ..     .            |       ______________\\",
    "                        .     .              |      /               ",
    "      1,绿色平原          2,丘陵             |      |             ",
    "      _      _                               |  R   |               ",
    "       |____|                                |  I   \\              ", 
    "                                             |  V    |              ", 
    "                                             |  E    |     14,      ",
    "              10,篮球场                      |  R   /    隐藏矿洞 _ ",
    "                ———          回家         |      |            |_|",
    "               |+ 0 +|         |------|      |      |               ",
    "                ———         |0,home|      /      |               ",
    "                               |———|     |  桥  /                ",
    "                                        ___/|======|\\_              ",
    "                                        ___/|======|\\_              ",
    "                                            |      |                ",
    "       5,黑暗森林       6,部落             /       |                ", 
    "       [  , + , ]          /              /       /                 ",
    "      /~~  , , ~~\\      ---              /    |  /                  ",
    "     /  |   |  |  \\      /              /4,瀑布 /        -          ",
    "                     7,尸村   _________/       /        / \\         ",
    "                            /             |   /        /   \\        ",
    "                          _/                _/        |     |       ",
    "                         /       __________/           9,远山       ",
    "      15,               /   港  /                                   ",
    "     松林               |  湾  |                                    ", 
    "   ↑↑↑↑            /       |   11,      12,          13,        ",
    "           __________/         | 山顶洞  大山顶洞    超大的山顶洞   ",
    "       ___/    8,沉船          /    -     -----      -------------- ",
    "    __/      l----------/     /    | |   |     |    |              |",
    "   /          |l--------|     |     -     -----      -------------- ",
    }; 
    char pictures3[80][80]={
    "                                          __                   ",
    "                             ------------/  |                  ",
    "                            |-----------/|  |  钓鱼码头        ",
    "                             ------------|  J                  ",
    "  回家                                                         ",
    "      ___                                                      ",
    "    __|_|__                                                    ",
    "   /  HOME k                                                   ",
    "  /    _    k                种植园                            ",
    "  |   | |   |              +++++++++++                         ",
    "  |___|_|___|              |---------|                         ",
    "                           |---------|               野        ",
    "                           +++++++++++                         ",
    "                                                               ",
    "                                                     外        ",
    "                  ________                                     ",
    "                 |________|                                    ",
    "               ____|____|___                                   ",
    "                |  郊区   |                                    ",
    "                |   商店  |                                    ",
    "                |_________|                                    ",
    }; 
    char pictures4[100][100]={
    "                                                                          ",
    "   ___________________________________________________________________    ",
    "  /__________________________________________________________________/    ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||_____________________________________||                 ",
    "                ||_____________________________________||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ||                                     ||                 ",
    "                ︶                                     ︶                 ",
    "                                                                          ",
    };
    while(2){
            int shecheng=1;
        string dfs1[20]={"","","","","","",""}; 
        long long zidan=0;
//木材cll1  藤条cll2  棕榈叶cll3  铁锭cll4  石片cll5  青金石cll6  钢铁cll7 
//生肉sc1  土豆sc2   淡水sc3  蜂蜜sc4   
int cl7=0,ml1=0,ml2=0,tl1=0,tl2=0,tl3=0,tl4=0,tl5=0,tl6=0,tl7=0,plof=0;
short sc1=0,sc2=0,sc3=0,sc4=0,sc5=0,sc6=0,sc7=0; 
int tian20=1,tian21=1,tian22=1;
int zz1=0,zz2=2,zz3=2;
int cll1[49]={0,3,2,10,3,2,5,12,20,0,2,4,6,5,1,1,0,0,1,0,0,0,4,0,0,2,500,5,0,0,10,100,0,0,10,10,50,10};
int cll2[49]={0,0,10,15,0,2,3,5,12,0,0,3,4,3,5,30,5,0,0,0,1,0,0,0,0,1,0,7,0,40,0,100,0,0,50,0};  
int cll3[49]={0,3,0,15,2,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,2,0,0,10,50,100,80,200,0};
int cll4[49]={0,0,1,7,0,0,0,0,4,0,0,0,2,0,0,0,20,1,1,1,1,5,0,0,2,4,500,0,4,0,0,0,0,0,100,5};  
int cll5[49]={0,0,0,0,1,0,0,2,0,2,3,0,1,0,10,0,5,0,0,0,0,0,0,0,0,0,0,5,0,20,0,0,30,0,0,0};
int jnj[40]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};  
int hs[10]={0,0,0},hss[10]={0,0,0};
int j11[40]={0,1,2,4,6,10,15,20,60,150,151};
int j12[40]={0,7,15,25,50,100,220,340,1314,3000,250250,857857,22222,53453};
int j13[40]={0,25,50,90,175,220,350,700,1100,4500,3838,3838438,43553,114514};
int linjian[40]={0,0,0,0,0,0};
int jjjb[20]={0,7,12,30,50,80,300,520,700,2500,3830,413333,133331,310023};
int ve[20]={0,12,12,12};
int gjs[30]={0,2,3,2,7,10,12,19,31,54,92,8,15,100},xls[30]={0,15,21,70,40,82,100,120,200,2423,104664,5436,3665,200};
int jjjj[20]={0,8,13,5,25,39,65,90,160,275,1000,20,35,1500};
string ssss[30]={"","小野猪","狮子","鳄龟","成年狼","土蜥蜴","野人酋长","森林巨人","人物1","钏姍钾","蔡虚坤","悲伤的人物2","快乐的人物3","忧郁的人物4"};
int xxxx[20]={0,160,210,650,320,450,580,900,1620,2000,500000,114514,20005,123100};
int jbs[40]={0,90,15,120,220,400,550,300,1,8,1,10,35,40,20,400,500,1300,1800,10000,25000};
string sss[20]={"","绿色平原","沙漠丘陵","世纪峡谷","死亡瀑布","黑暗森林","野人部落","僵尸村落","沉船","远山","废弃的篮球场","山顶洞","大山顶洞","超大的山顶洞"};
int fmtj=0,fmtj2=0,fmtj3=0;int jl=150;
int uxl;int fy=0;int cl6=0;string dfs,dfs2; int ppm,ppm2;
int max1=0,max2=0;int zxc=0;int yd;int uyu;string ugg="当你坐上火箭,进入那广阔无垠的星空时,你意识到游戏胜利了"; 
long long q=0,am=0,cnt=0,sb=0,gj=0,xl=0,x1,t=0,bx1,sr,mjj,ll=8,sdd=0,gh=0,s5=0,s6=0,s7,s11=0,s12=0,s13,v,ti=15,yy=0,akm=0,ab=444,z,jj,n=0,x=0,y=100;
string s1,s2,s8,s9,s10,hj,s20;int k,gb,nd,yp,ugb=15,jxl=0,bd=0,jjb=0,sx=150,gsx=0,ggb=0,js=0,yls=0,ujy=0,jjy=0,jysx=100,dg=1,km=520,gm;int jm=20,jm2=5,io,cntm=100;string s45;
int njz=0,aqw=10;int akl=0,qwz=0,step,stepisSB,stepisverySB,lmk;int nm;int pl=0,srs=0; bool tm1=0,tm2=0,tm3=0,tm4=0,tm5=0;int cl1=2,cl2=2,cl3=2,cl4=0,cl5=0;int p1=0,p2=100,pdg=1;int tian=0,shi=8,fen=0; int rw1=0,rw11=0,rw2=0,rw21=0,rw3=0,rw31=0,rw4=0,rw41=0,rw51=0,rw61=0,rw7=0,rw71=0,rw8,rw81=0,rw9=0,rw91=0,rwa=0,rwa1=0,rwb=0,rwb1=0,rwc=0,rwc1=0,rwd=0,rwd1=0;
int et=0,jgj=0,jez=220,jezsx=220,sp1=1,sp2=1,sp3=0,jsp=0,sk12,cmk=180;
char amy[100][100];int k10=1; long long u;bool han=0;x1=5; int tm9=0;
uxl=150;sx=150;fmtj=fmtj2=fmtj3=0;int wsz=200,nsz=200,wszsx=200,nszsx=200;
        s1="拳头"; 
        for(int i=0;i<=sb1.size()-1;i++){
            cout<>s20; 
        if(s20=="只因"){
            jl=120;uxl=140;ugb=0;yls=1;sx=140;js=1;jjb=1;bd=1;jez=160;jezsx=160;
            cout<=60){shi+=fen/60;fen=fen%60;}
            if(shi>=24){shi=shi-24;tian+=1;ve[1]+=6;ve[2]+=6;ve[3]+=6;
            if(ve[1]>12){ve[1]=12;}           
            if(ve[2]>12){ve[2]=12;}
            if(ve[3]>12){ve[3]=12;}}
            if(tian%65>45){
                if(shi>=16||shi<=8){system("color 0F");}
                else{system("color F0");}
            } 
            else if(tian%65>15&&tian%65<30){
                if(shi>=19||shi<=6){system("color 0F");}
                else{system("color F0");}
            }   
            else{
                if(shi>=18||shi<=6){system("color 0F");}
                else{system("color F0");}
            }   
            if(qwz<0){uxl-=1;} 
            if(qwz<0)
            {if(akl!=1){aqw=4;}}        
        jez-=3;if(jez<=0){
        cout<<"干饭不积极,亲人两行泪"<18||shi<=6){cout<=15&&tian%65<30)
        {srand(time(0));qwz=rand()%10+1;s45="夏";qwz+=10;}else
        if(tian%65>30&&tian%65<=45){srand(time(0));qwz=rand()%8+1;s45="秋";qwz+=12;}
        else{srand(time(0));qwz=rand()%15+1;s45="冬";qwz=0-qwz;}
        cout<>u;cntm=300;if(u==0){continue;} gb=jbs[u];
        if(u!=1&&u!=2&&u!=3&&u!=4&&u!=5&&u!=6&&u!=7&&u!=8&&u!=100){cout<<"好,输入你要购买的数量吧:";cin>>pl;gb*=pl; } 
        if(ugb=60){shi+=fen/60;fen=fen-(60*(fen/60));}
            if(shi>=24){shi=shi-24;tian+=1;ve[1]+=6;ve[2]+=6;ve[3]+=6;
            if(ve[1]>12){ve[1]=12;}           
            if(ve[2]>12){ve[2]=12;}
            if(ve[3]>12){ve[3]=12;}}
            if(shi>18||shi<6) {cout<<"\n确定要出门探险么?夜里战斗可不利!\n   1,是  2,否"<>nd;if(nd==0||nd>15){continue;}Sleep(750);zairu();
            Sleep(333);
            system("cls");                             
            cout<<"你前往"; 
            if(nd==15){
                cout<<"松林";
                Sleep(555);               
                while(1){          
                srand(time(NULL));
                int mtts2=1+(int)(3.0 * rand()/(RAND_MAX+1.0)),mtts3=1+(int)(3.0 * rand()/(RAND_MAX+1.0));
                cout<<"===================================#"<18||shi<6){gj=gj*4/3;}
            if(fy==4){gj=gj*2/3;}                    
            else if(fy==3){gj=gj*3/4;}   
            else if(fy==2){if(nd!=3){gj=gj*7/8;}else{gj-=1;}}  
            else if(fy==1){if(nd!=3){gj=gj*9/10;} }        
            if(ppm2==1){gj=gj*20/19;}
            if(ppm2==2){gj=gj*10/9;}
            if(ppm2==3){gj=gj*7/6;}
            if(ppm2==4){gj=gj*4/3;xl=xl-8;}
            if(ppm2==5){gj=gj/2;xl=xl-15;}           
            cout<=60){fen=fen-60;shi+=1;}   
                if(cntm==-100){
                    cout<<"武器损坏了!!"<=3){cout<<"3,逃跑";}kjk=_getch();cout<<"\n"; 
                Sleep(344);char jnk;
                 
                if(kjk=='0'){
                    cout<1)
                    {
                        if(shecheng>=gjuli-ujuli)
                    	{}  
                    	else{cout<<"你向前一步\n\n";ujuli+=1;Sleep(350);    }
                    	if(gjuli-ujuli>1){gjuli-=1;cout<=3)
                    {x1=k1;
                        srand(time(0));int wers=rand()%7+1;
                        if(wers==1||wers==2||wers==4){cout<<" 逃跑成功!"<>gm;
                    if(gm==1){
                        if(ugb>=km){
                            cout<<"复活成功!";ugb-=km;km+=300;
                            uxl=sx/2;break;}
                        else{Sleep(333);
                            cout<<"你的钱不够本次复活, 游戏失败!#_#"<1){cout<<"再次";}
                        cout<<"攻击!"<0){uxl-=gj;}} 
            if(xl<=0){}else
            {Sleep(577);
            srand(time(NULL));
            int cxk=rand()%24+1;
            if(cxk==6&&nd==10){cout<<"蔡虚坤发动了技能:唱跳rap,回复满了血量"<=3){system("color 4C");}
                cout<18||shi<=6){system("color 0F");}
                else{system("color F0");}
                Sleep(222);cout<<"当前"<=jysx){
                cout<<"你升级了,当前等级为:";
                dg+=1+(jjy-jysx)/jysx;cout<>gm;
                    if(gm==1){
                    if(ugb>=km){cout<<"复活成功!";ugb-=km;km+=300;uxl=sx/2;break;}
                    else{Sleep(333);cout<<"你的钱不够本次复活, 游戏失败!#_#"<>asdfghjkl;  
                if(asdfghjkl==1){cout<=p2){cout<<"你升级了,当前等级为:";pdg+=1;cout<>aa;
            if(aa==1){cout<<"无!\n"; }
            if(aa==2){
                fen+=30;jl-=1;jez-=3;
                if(fen>=60){shi+=fen/60;fen=fen%60;}
                cout<<"你等待一会,";Sleep(800);srand(time(NULL));int aas=rand()%80+1;
                if(fishing[aas]==""){cout<<"并没有钓到什么东西\n\n";continue;} 
                cout<<"等待了30分钟收货了"<55&&uxl<=sx/2) {cout<<"伤痕累累"; }
            else if(uxl>sx/2&&uxl55&&uxl<=85){cout<<"伤痕累累";}
            else if(uxl>55&&uxl<125){cout<<"皮外伤";}
            else{cout<<"健康";}cout<>yp;
            if(yp>5||yp<1){cout<<"小兔崽子,重新输入!!!"<sx){uxl=sx;}
            Sleep(399);cout<<"     当前血量HP为"<=jez){cout<<"饥肠辘辘";}
            else if(jezsx/7*5>io;if(io>26||io<1){cout<<"重新输入\n";continue;} int ttm=0,ttm2=0; 
            for(int i=1;i<=14;i+=1){if(fishs[i].times ==0){if(io-3==i){ttm=1;continue;}}}
            if(ttm==1){cout<<"重新输入\n";continue;}
            for(int i=1;i<=7;i++)
            {
                if(cfs[i].ts ==0){if(io-17==i){ttm2=1;continue;}} 
             } if(ttm2==1){cout<<"重新输入";continue;} 
            fen+=10;cout<=jezsx){cout<<"你吃饱了!!"<3&&io<=17){if(fishs[io-3].times ==0){cout<<"没有"<17){if(cfs[io-17].ts ==0){cout<<"没有"<3&&io<=17){io-=3;cout<17){cout<jezsx){jez=jezsx;}
            cout<>cf;
            if(cf==1){if(cl1<1||sc1<1){cout<<"食材不够!";continue;}cl1-=1;sc1-=1;} 
            if(cf==2){if(cl1<1||sc4<1){cout<<"食材不够!";continue;}cl1-=1;sc4-=1;}
            if(cf==3){if(cl2<1||sc4<2||sc1<1){cout<<"食材不够!";continue;}cl2-=1;sc4-=2;sc1-=1;}
            if(cf==4){if(cl1<1||sc2<1){cout<<"食材不够!";continue;}cl1-=1;sc2-=1;}
            if(cf==5){if(sc3<1||sc2<1||sc1<1){cout<<"食材不够!";continue;}sc3-=1;sc2-=1;sc1-=1;}
            if(cf==6){if(sc3<1||sc2<1){cout<<"食材不够!";continue;}sc3-=1;sc2-=1;}
            if(cf==7){if(cl1<1||cl2<1||sc1<2||sc2<1||sc3<2||sc4<2){cout<<"食材不够!";continue;}cl1-=1;cl2-=1;sc1-=2;sc2-=1;sc3-=2;sc4-=2;}
            cout<<"正在烹饪"<7:00"<>stepisSB;
            if(stepisSB==1){stepisverySB=1;}
            if(stepisSB==2){stepisverySB=4;}
            if(stepisSB==3){stepisverySB=8;} 
            cout<<"确定要入睡吗?1确定,2否定(睡觉会消耗饥饿值,越好的床消耗饥饿值越少)";cin>>step;
            if(step==2){continue;}
            srand(time(0));int stm=rand()%aqw+1;
            if(stm==1){cout<<"\n\n睡梦中,你遭到了动物们的侵袭,\n";Sleep(555);cout<<"失去物品:金币"<=1&&shi<7){shi=7;jl+=(7-shi)*8;jez-=(7-shi)*7;}
                else{shi=7;tian+=1;jl=100;jez-=62;}ve[1]+=6;ve[2]+=6;ve[3]+=6;
            if(ve[1]>12){ve[1]=12;}           
            if(ve[2]>12){ve[2]=12;}
            if(ve[3]>12){ve[3]=12;}}
            else{shi+=stepisverySB;}  
            if(uxl>sx){uxl=sx;}if(jl>150){jl=150;}    
            } 
        }
    if(ch2=='4')
    {if(rw11==0){cout<<"\n\n任务1:击杀小野猪2只 ";
    if(rw1>=2){cout<<"已完成"<=10){cout<<"已完成"<=8){cout<<"已完成"<=3){
    cout<<"已完成"<=30){cout<<"已完成"<=30){cout<<"已完成"<=5){cout<<"已完成"<=3){cout<<"已完成"<=3){cout<<"已完成"<=30){cout<<"已完成"<=8){cout<<"已完成"<=1){cout<<"已完成"<=1){cout<<"已完成"<>nm;      
if(jl<15){cout<<"精力不够,无法建造!";Sleep(666);continue;} 
if(nm==18){continue;}int sll;
lx1=cll1[nm];
lx2=cll2[nm];
lx3=cll3[nm];
lx4=cll4[nm];
lx5=cll5[nm];
if(nm==28){cout<<"输入数量:";cin>>sll;lx4*=sll;} 
if(cl1=10&&tl2>0&&tl3>0&&tl4>0&&tl5>0&&tl6>0&&tl7>0){plof=1;} 
if(nm>36||nm<1){cout<<" 无此建造物品!";Sleep(564);continue; }
cout<<"正在建造中";for(int i=1;i<=3;i++){cout<<".";Sleep(555);}cout<>fmt;
if(fmt==1){
if(cl6<10){cout<<"材料不够!";continue;}
if(fmtj==1){cout<<"你附魔过此属性了";continue;}fmtj=1;
m0="锋利";cl6-=10;                                                        
}else              
if(fmt==2){
if(cl6<15){cout<<"材料不够!";continue;}
if(fmtj2==1){cout<<"你附魔过此属性了";continue;}fmtj2=1;
cl6-=15;m0="抗性";}               
else{
if(cl6<20){cout<<"材料不够!";continue;}
if(fmtj3==1){cout<<"你附魔过此属性了";continue;}fmtj3=1;
cl6-=20; m0="吸血";}
srand(time(0));int sa=rand()%5+1;
if(fmt==1){if(sa==1){x1=x1+15; }if(sa==2){x1=x1/5*6;}if(sa==3){x1=x1/5*7;}if(sa==4){x1=x1/5*8;}if(sa==5){x1=x1*2;}}   
if(sa==4){x1=x1/3*8;}if(fmt==2){if(sa==1){ppm2=1; }if(sa==2){ppm2=2;}if(sa==3){ppm2=3;}if(sa==4){ppm2=4;}if(sa==5){ppm2=5;}}if(fmt==3){if(sa==1){ppm=1;}if(sa==2){ppm=2;}if(sa==3){ppm=3;}if(sa==4){ppm=4;}if(sa==5){ppm=5;}}              
cout<<"正在附魔中";for(int i=1;i<=3;i++){cout<<".";Sleep(555);}
cout<

制作不易,多多支持

有问题的可以私信我

你可能感兴趣的:(c++小游戏,c++生存游戏,C++小程序,c++,开发语言,关卡设计,游戏程序)