• 个人简介

    该用户太懒,这里啥也没写 (´・ω・`) 注:本文为搬运,如需原资料请找胡汀菡_137654 (Jev) 哇!你居然换新电脑了!旧的呢? 扔了。。。。。。 6 (广告诈骗)


    大家好!🎉️

    我叫胡汀菡(​菡han四声​),但是大家都叫我​*胡汀涵(han二声)*​,我也不管了你爱怎么叫就怎么叫吧👀️ ​我是真的不管了​😕

    下面有超长游戏代码(五个) 和超短代码一个

    image

    imageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimage

    贪吃蛇:

    #include <iostream>
    #include <ctime>
    #include <conio.h>
    #include <windows.h>       //停顿:Sleep(); 
    #include <cstdlib>         //清屏:system("cls");
    #include <cstring>         //1:'◎' 2:'⊙' 3:'▲' 4:'◆' 5:'■'
    using namespace std;
    int a[100][100], dir[100][100];
    //string guo[5]={'▲','◆','■','▼','★'};
    int fx[4][2] = { {0,-1},{1,0},{0,1},{-1,0} }; //ap来记录奖励块的分   
    int n, m, ff, f = 1, t = 50, T = 50, ap = 10, egg[2], danshu, headx, heady, endx, endy, point = 0, apple = 0, fangx, stopp = 0, panduan = 0;  //ff用来判断  panduan 0:中途退出;1:咬到自己;2:重置  
    int lastfx;
    int zuobi = 0;
    int fff[110][110];
    string print[4][4] = { {"═","╔","  ","╚"},{"╝","║","╚","  "},{"  ","╗","═","╝"},{"╗"," ","╔","║"} };
     void color(int a)//颜色函数
    {
    	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), a);
    }
     void gotoxy(int x, int y)//位置函数(行为x 列为y)
    {
    	COORD pos;
    	pos.X = 2 * y;
    	pos.Y = x;
    	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
    }
     void reset() {
    	system("cls");
    	color(7); printf("                   ★"); color(10); printf("贪吃蛇"); color(11); printf("★\n\n"); color(7);
    	printf("⊙打印若有错位请调整窗口大小或按r重输小点的数⊙\n\n  请输入场地大小(格式:行数 列数) 推荐(20 20) \n\n>>");
    	scanf("%d%d", &n, &m);
    	system("cls");
    	color(14);
    	for (int i = 1; i <= m; i++) { gotoxy(0, i); printf("※"); gotoxy(n + 1, i); printf("※"); }
    	for (int i = 1; i <= n; i++) { gotoxy(i, 0); printf("※"); gotoxy(i, m + 1); printf("※"); }
    	color(10);
    	memset(fff, 0, sizeof(fff));
    	gotoxy(0, 0); printf("┍");
    	gotoxy(n + 1, 0); printf("┕");
    	gotoxy(0, m + 1); printf("┑");
    	gotoxy(n + 1, m + 1); printf("┙");
    	color(7);
    	gotoxy(0, m + 5); printf("方向:a/s/d/w | 1/2/3/5");
    	gotoxy(1, m + 5); printf("暂停:p       |       0");
    	gotoxy(2, m + 5); printf("减速:q/j     |     4/7");
    	gotoxy(3, m + 5); printf("加速:e/k     |     6/9");
    	gotoxy(4, m + 5); printf("重置:r       |       .");
    	gotoxy(5, m + 5); printf("地图:h       |       +");
    	headx = endx = endy = 1; heady = 3;
    	f = 1; ff = 3;
    	memset(a, 1, sizeof(a));
    	memset(dir, 0, sizeof(dir));
    	a[1][1] = a[1][2] = a[1][3] = 0;
    	gotoxy(1, 1); printf("⊙");
    	gotoxy(1, 2); printf("⊙");
    	gotoxy(1, 3); printf("◎");
    	dir[1][1] = dir[1][2] = dir[1][3] = 2;
    	apple = 0; fangx = 2; point = 0; danshu = 0; lastfx = 2; stopp = 0;
    	if (zuobi) { color(12); gotoxy(12, m + 5); printf("作弊可耻!"); gotoxy(m + 4, 0); printf("做了弊还没路走那就救不了你了,乖乖重来吧......"); color(7); }
    }
     void haha() {
    	char ch = getch();
    	if ((ch == 'a' || ch == '1') && dir[headx][heady] != 2) { fangx = 0; return; }
    	if ((ch == 's' || ch == '2') && dir[headx][heady] != 3) { fangx = 1; return; }
    	if ((ch == 'd' || ch == '3') && dir[headx][heady] != 0) { fangx = 2; return; }
    	if ((ch == 'w' || ch == '5') && dir[headx][heady] != 1) { fangx = 3; return; }
    	if (ch == 'p' || ch == '0') { stopp = (stopp + 1) % 2; return; }
    	if (ch == 'q' || ch == '4') { T += 10; if (T >= 1005) T = 1005; return; }
    	if (ch == 'e' || ch == '6') { T -= 10; if (T <= 1) T = 2; return; }
    	if (ch == 'j' || ch == '7') { T += 1; if (T >= 1005) T = 1005; return; }
    	if (ch == 'k' || ch == '9') { T -= 1; if (T <= 1) T = 2; return; }
    	if (ch == 'r' || ch == '.') { ff = 2; f = 0; panduan = 0; return; }
    	if (ch == 'h' || ch == '8') {
    		zuobi += 1; zuobi %= 2;
    		if (zuobi) { color(12); gotoxy(12, m + 5); printf("作弊可耻!"); gotoxy(m + 4, 0); printf("做了弊还没路走那就救不了你了,乖乖重来吧......"); color(7); }
    		else { printf("                "); gotoxy(m + 4, 0); printf("                                                   "); }
    	}
    	if (ch == 'g' || ch == '+') {
    		gotoxy(n + 50, 0);
    		printf("现在切换到地图编辑模式\n\nq/4 为开始放置模式(光标移动过的痕迹会留下障碍物)\n\ne/6 为取消放置障碍物模式\n\nj/0 为橡皮模式(再按一次退出橡皮模式)\n\n按 h/+ 继续游戏\n\n");
    		printf("\n按任意键开始编辑地图");
    		color(13);
    		int x = 1, y = 1, dfx, moshi = 0;
    		ch = getch(); gotoxy(0, 0); gotoxy(1, 1);
    		while (ch != 'h' && ch != '+') {
    			if (ch == 'a' || ch == '1') dfx = 0;
    			else if (ch == 's' || ch == '2') dfx = 1;
    			else if (ch == 'd' || ch == '3') dfx = 2;
    			else if (ch == 'w' || ch == '5') dfx = 3;
    			else dfx = 5;
    			if (ch == 'q' || ch == '4') moshi = 1;
    			if (ch == 'e' || ch == '6') moshi = 0;
    			if (ch == 'j' || ch == '0') if (moshi - 2) moshi = 2; else moshi = 0;
    			if (dfx <= 4) {
    				if (x + fx[dfx][0] > 0 && x + fx[dfx][0] <= n && y + fx[dfx][1] > 0 && y + fx[dfx][1] <= m) { x += fx[dfx][0]; y += fx[dfx][1]; }
    				if (x > 0 && x <= n && y > 0 && y <= m) {
    					gotoxy(x, y);
    					if (moshi == 1 && a[x][y] && !fff[x][y]) { a[x][y] = 0; fff[x][y] = 1; printf("□"); }
    					if (moshi == 2 && fff[x][y]) { a[x][y] = 1; fff[x][y] = 0; printf("  "); }
    					gotoxy(x, y);
    				}
    			}
    			ch = getch();
    		}
    		color(7);
    	}
    }
     void findegg() {
    	srand(time(NULL));
    	int aa = 1;
    	while (!a[egg[0]][egg[1]]) { egg[0] = (rand() % (n)) + 1; egg[1] = (rand() % m) + 1; }
    	a[egg[0]][egg[1]] = 0;
    	point += ap;
    	gotoxy(egg[0], egg[1]); if (!apple) { printf("★"); ap = 8000 / T; if (ap >= 200) ap = 200; }
    	else { printf("●"); ap = 10; }
    	apple++; apple = apple % 10;
    	gotoxy(n + 2, 0); printf("距离下一个奖励蛋还有 "); color(11); cout << 9 - (8 + apple) % 10; color(7); printf(" 个");
    	danshu++;
    	return;
    }
     int gg() {
     	if (ff == 0) return(0);
    	if (ff == 1) { gotoxy(n + 2, 1); Sleep(3000); gotoxy(n + 26, 1); gotoxy(n + 10, 0); printf("哦豁~ 你咬到自己了o( ̄▽ ̄)d\n\n\n你共吃蛋 %d 个\n\n\n你共得分 %d 分,恭喜!\n\n\n等一下就继续", danshu, point); Sleep(5000); if (kbhit) return(1); }
    	if (ff == 2) return(1);
    	return 0;
    }
     void dong() {
    	gotoxy(11, m + 3); printf("当前的蛋有 %d 分            ", ap);
    	if (ap - 3 > 10) ap -= 3;
    	if (ap != 10) {
    		gotoxy(egg[0], egg[1]);
    		color(ap % 10);
    		printf("★");
    		color(7);
    	}
     	int x, y;
    	x = (headx + fx[fangx][0] - 1 + n) % (n)+1; y = (heady + fx[fangx][1] - 1 + m) % (m)+1;
    	dir[headx][heady] = fangx;
    	if (x == egg[0] && y == egg[1]) {
    		gotoxy(headx, heady); cout << print[lastfx][fangx];
    		dir[headx][heady] = fangx;
    		headx = x; heady = y; a[x][y] = 0;
    		gotoxy(headx, heady); printf("◎");
    		findegg();
    	}
    	else if (a[x][y]) {
    		gotoxy(headx, heady); cout << print[lastfx][fangx];
    		headx = x; heady = y; a[x][y] = 0;
    		gotoxy(headx, heady); printf("◎");
    		gotoxy(endx, endy); printf("  "); a[endx][endy] = 1;
    		x = endx; y = endy;
    		endx += fx[dir[x][y]][0]; endx = (endx - 1 + n) % (n)+1;
    		endy += fx[dir[x][y]][1]; endy = (endy - 1 + m) % (m)+1;
    		dir[x][y] = -1;
    	}
    	else if (!zuobi) { f = 0; ff = 1; }
     	dir[headx][heady] = fangx;
    	lastfx = fangx;
    	return;
    }
     int main() {
    	while (1) {
    		srand(time(NULL));
    		reset();
    		egg[0] = (rand() % n - 1) + 2; egg[1] = (rand() % m) + 1;
    		a[egg[0]][egg[1]] = 0;
    		gotoxy(egg[0], egg[1]); if (apple) { printf("★"); ap = 100; }
    		else printf("●");
    		while (f) {
    			if (kbhit()) haha();
    			gotoxy(9, m + 5); printf("吃蛋:%d 个", danshu);
    			gotoxy(8, m + 5); printf("速度: %d   ", 1005 - T);
    			//while (stopp) {Sleep(10); if (kbhit()) haha();}
    			Sleep(1); t = (t - 1 + T) % T;
    			if (t == 0 && !stopp) dong();
    			gotoxy(7, m + 5); printf("得分:%d 分", point);
    			gotoxy(12, m + 5);
    		}
    		if (!gg()) return 0;
    	}
    	return 0;
    }
    

    Copy

    跑酷:

    #include<bits/stdc++.h>
    #include<windows.h>
    #include<stdio.h>
    #include<conio.h>
    #include<time.h>
    #define Nor if(B[b].x<5) B[b].x=5;
    #define Out1 Bx1-Bvx1<=6||Bx1-Bvx1>=28||By1-Bvy1<=7||By1-Bvy1>=27
    #define Out2 Bx2-Bvx2<=6||Bx2-Bvx2>=28||By2-Bvy2<=7||By2-Bvy2>=27
    #define Chang1 {Bwhat1=0;Bvx1=Bvy1=0;memset(Bgo1,0,sizeof(Bgo1));}
    #define Chang2 {Bwhat2=0;Bvx2=Bvy2=0;memset(Bgo2,0,sizeof(Bgo2));}
    #define Chang3 {Bwhat3=0;Bvx3=Bvy3=0;memset(Bgo3,0,sizeof(Bgo3));}
    using namespace std;
    int ti(float a) {return ((int)(a*10+5))/10;}
    void Setpos(float x,float y){COORD pos;pos.X=ti(y*4)/2;pos.Y=ti(x);SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);}
    void Color(int a){if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED);if(a==9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_BLUE);if(a==11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_BLUE);if(a==12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN);if(a==13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);if(a==14) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_BLUE);}
    int Blomax,Ren,Exp,Expmax,Lv,Lvl,Ice,Drug,ar1,ar2,Tar1,Tar2,bl,br,Win,T,Tb,Sy,Up,Upt,Down,u1,u2,Kill,Killb,L,Ll[4],Li,D,Gd[10],Biao,Fire,Fir,Water,Thun,Wind,Magne,I[20][2],ib,Dis,Disb,Dis1,Disb1,Boss,Bblo,Bblomax,Bwhat1,Bwhat2,Bwhat3,Bgo1[10],Bgo2[10],Bgo3[10],Bbr,Bbl,Bl[4];
    float X,Y,Vx,Vy,Ding,Blo,Hui,Bx1,By1,Bx2,By2,Bx3,By3,Bvx1,Bvy1,Bvx2,Bvy2,Bvx3,Bvy3,Bway[1001][2];
    struct bullet{float x,y,vx,vy;int what;int a,t,How;int life;bool kill;}B[100001];
    void Map(int a,int b);
    void Pan(int a,float x,float y,int b){
        float Nox[4],Noy[4];Nox[0]=X,Noy[0]=Y;
        if(Down==1&&X==22) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;else if(Down==2) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;else if(Down==1||X<18) Nox[1]=X-1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;else Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
        for(int i=0;i<3;i++){
            if(a==-1){if(abs(x-Nox[i])+abs(y-Noy[i])<1.5) {if(B[b].what==-10)Exp+=2;if(B[b].what==-11)Exp+=1;B[b].life=0;if(B[b].life==0&&b==bl) bl++;Map(3,b);break;}}
            if(a==-2){if(abs(x-Nox[i])+abs(y-Noy[i])<2.5) {if(B[b].what==-2)Exp+=5,Biao+=5;if(B[b].what==-3)Fire=300,Ice=0,Fir=3;if(B[b].what==-4)Water=200;if(B[b].what==-5){Wind=70;Ding=28.25;Ice=0;if(Y<Ding-1)Vy=5;else Vy=0;if(Up>=1) Vx=-5;if(Down==2) Vx=5;}if(B[b].what==-6){Thun=200;system("color 1F");Sleep(20);system("color 6F");Sleep(10);system("color 0F");}if(B[b].what==-7)Magne=300;if(B[b].what==-8)Ice=0,Drug=0,Blo=fmin((float)Blomax,Blo+20);if(B[b].what==-9)Exp=fmin((float)Expmax,Exp+20);B[b].life=0;if(B[b].life==0&&b==bl) bl++;Map(3,b);break;}}
        }if(Wind==0&&Thun==0&&(B[b].kill!=0||Killb>=15||Ren==1&&Killb>0)) return;
        for(int i=0;i<3;i++){
            if((Wind>=1||Thun>=1)&&abs(x-Nox[i])+abs(y-Noy[i])<2.5) {if(B[b].what<98)Exp+=2;B[b].life=0;Map(3,b);break;}
            if(a==1) {if(abs(x-Nox[i])<0.5&&abs(y-Noy[i])<1) {if(B[b].what>=99)Blo-=10;if(B[b].what==14)Blo-=15,Ice=100,B[b].life=0;else if(B[b].what==15)Blo-=20,Ice=0,B[b].life=0;else if(B[b].what==17)Blo-=5,Drug=100,B[b].life=0;else if(B[b].what>=13&&B[b].what<=17)Blo-=10,B[b].life=0;else Blo-=15;B[b].kill=1,Killb=20;Kill=1;Map(3,b);break;}}
            if (a==2||a==6||a==8||a==9||a==10||a==11||a==12) {
    			if(abs(x-Nox[i])+abs(y-Noy[i])<1.5) {
    				if(a==2)Blo-=20;
    				else if(a==8)Blo-=10;
    				else Blo-=15;B[b].kill=1,Killb=20;Kill=1;if(a!=2){B[b].life=0;if(B[b].life==0&&b==bl) bl++;Map(3,b);break;}}}
            if(a==4) {if((Wind>=1||Thun>=1)&&abs(x-Nox[i])<1.5&&Noy[i]-y<=0&&Noy[i]-y>=-8) {if(B[b].what<98)Exp+=2;B[b].life=0;Map(3,b);break;}if(abs(x-Nox[i])<1&&Noy[i]-y<=0&&Noy[i]-y>=-8) {Blo-=25,B[b].kill=1,Killb=20;Kill=1;Vy=-1;Y-=0.5;break;}}
        }
    }
    void Map(int a,int b){
        Color(0);
        if(a==-1){
            if(Boss==1||Boss==6){if(Bwhat1==5){if(ti(Bx1)==20)Setpos(Bx1,By1),cout<<"==";else Setpos(Bx1,By1),cout<<"  ";}else{Setpos(Bx1-1,By1-0.5),cout<<"    ";Setpos(Bx1,By1-1),cout<<"      ";Setpos(Bx1+1,By1-0.5),cout<<"    ";if(abs(ti(Bx1)-20)<=1)Setpos(20,By1-1),cout<<"======";}}
            if(Boss==2||Boss==6){Setpos(Bx2-1,By2-1);cout<<"    ";Setpos(Bx2,By2-1);cout<<"      ";Setpos(Bx2+1,By2-1),cout<<"      ";Color(0);if(abs(ti(Bx2)-20)<=1)Setpos(20,By2-1),cout<<"======";}
            if(Boss==3||Boss==6){Setpos(Bx3-1,By3-0.5);cout<<"     ";Setpos(Bx3,By3);cout<<"  ";Setpos(Bx3+1,By3-1),cout<<"      ";Color(0);if(abs(ti(Bx3)-20)<=1)Setpos(20,By3-1),cout<<"=======";}
            if(X<0)return;if(X>=17&&X<=19){Setpos(X-1,Y);cout<<"  ";Setpos(X,Y-1);cout<<"   ";Setpos(X+1,Y-1),cout<<"   ";}else if(X<=23&&X>=21){Setpos(X+1,Y);cout<<"  ";Setpos(X,Y-1);cout<<"   ";Setpos(X-1,Y-1),cout<<"    ";}else if(X>23){Setpos(X,Y-1);cout<<"    ";Setpos(X-1,Y-0.5),cout<<"   ";}else if(X<17&&Upt!=0){Setpos(X,Y-1);cout<<"    ";Setpos(X+1,Y-1.5),cout<<"    ";}else if(X<17){Setpos(X,Y-1);cout<<"    ";Setpos(X+1,Y-0.5),cout<<"   ";}if(Thun>0){Setpos(X-2,Y-1),cout<<"    ";Setpos(X+2,Y-1),cout<<"    ";Setpos(X,Y+2),cout<<"  ";Setpos(X,Y-2.5),cout<<"  ";Setpos(X-1,Y+1),cout<<"  ";Setpos(X+1,Y+1),cout<<"  ";Setpos(X-1,Y-2),cout<<"  ";Setpos(X+1,Y-2),cout<<"  ";Setpos(20,Y-2.5),cout<<"============";}if(Wind!=0){Setpos(X+1,Y-5);cout<<"        ";Setpos(X,Y-5);cout<<"        ";Setpos(X-1,Y-5);cout<<"        ";Setpos(20,Y-5),cout<<"========";}if(Water!=0){Setpos(X,Y-4);cout<<"       ";Setpos(X+2,Y-3.5);cout<<"     ";Setpos(X-2,Y-3.5);cout<<"     ";Setpos(X+1,Y-3.5);cout<<"     ";Setpos(X-1,Y-3.5);cout<<"     ";Setpos(20,Y-5),cout<<"========";}if(Fire!=0){Setpos(X,Y+1),cout<<"  ";Setpos(X+1,Y),cout<<"  ";Setpos(X-1,Y-1),cout<<"  ";Setpos(20,Y-1);cout<<"======";}
        }
        if(a==0){
            if(Boss==1||Boss==6){if(Bwhat1==5)Color(5),Setpos(Bx1,By1),cout<<"█",Color(0);else if(Bwhat1==4&&Bgo1[1]>6&&Bgo1[1]<11)Color(4),Setpos(Bgo1[5]-1,Bgo1[6]),cout<<"︻",Setpos(Bgo1[5],Bgo1[6]-1),cout<<"【",Setpos(Bgo1[5],Bgo1[6]+1),cout<<"】",Setpos(Bgo1[5]+1,Bgo1[6]),cout<<"︼",Color(0);else{Setpos(Bx1-1,By1-0.5),Color(0),cout<<"●●";Setpos(Bx1,By1-1);if(Bwhat1==2&&Bgo1[1]<=5)Color(1);else if(Bwhat1==3&&Bgo1[1]<=5)Color(5);else if(Bwhat1==6&&Bgo1[1]<=5)Color(8); else Color(4);if(Bwhat1==4) Setpos(Bx1,By1-0.5),cout<<"██(";else cout<<")██(";Setpos(Bx1+1,By1-0.5),cout<<"……";Color(0);}}
            if(Boss==2||Boss==6){Setpos(Bx2-1,By2-1);Color(0),cout<<"\\ ";Color(0);cout<<"●";Setpos(Bx2,By2-1);Color(3);cout<<"◥";Color(5),cout<<"JJJ";Color(0),cout<<">";Color(3);Setpos(Bx2+1,By2-1),cout<<"◢█◣";Color(0);}
            if(Boss==3||Boss==6){Setpos(Bx3-1,By3-0.5);if(Bwhat3==3||Bwhat3==9) Color(1);else if(Bwhat3==4||Bwhat3==10) Color(4);else if(Bwhat3==5||Bwhat3==11) Color(5);if(Bwhat3==11)cout<<' ';else if(Bwhat3==6) Color(3);else Color(2);cout<<"●-";Setpos(Bx3,By3);if(Bwhat3==11)cout<<"/";else cout<<"┃";Color(0);Setpos(Bx3+1,By3-1),cout<<"●●●";}
            if(X<0)return;if(Ren==2) Color(12);if(Ren==3) Color(1);if(Ren==4) Color(3);if(Ren==5) Color(4);if(Ren==6) Color(2);if(Drug!=0&&T%5!=0) Color(11);if(Drug!=0&&T%5==0) Color(11);if(Ice!=0) Color(6);if(b==1) Color(8);if(Li!=0) Color(5);if(Ren==1&&Killb>0&&T%4<2) Color(13);if(Wind>0&&T%4<=1) Color(1);if(Wind>0&&T%4>=2) Color(0);if(Thun>0&&T%4<=1) Color(1);if(Thun>0&&T%4>=2) Color(6);
            if(X>=17&&X<=19){Setpos(X-1,Y);cout<<"●";Setpos(X,Y-1);cout<<"━/";if(T%10<3) Setpos(X+1,Y-1),cout<<"┛╲";else if(T%10<6) Setpos(X+1,Y-1),cout<<"┦ ";else Setpos(X+1,Y-1),cout<<"╯>";if(Wind>0&&T%3==0) Setpos(X+1,Y-1),cout<<"┛╲";else if(Wind>0&&T%3==1) Setpos(X+1,Y-1),cout<<"┦ ";else if(Wind>0&&T%3==2)Setpos(X+1,Y-1),cout<<"╯>";}else if(X<=23&&X>=21){Setpos(X+1,Y);cout<<"●";Setpos(X,Y-1);cout<<"━\\";if(T%10<3) Setpos(X-1,Y-1),cout<<"┓╱";else if(T%10<6) Setpos(X-1,Y-1),cout<<"┪ ";else Setpos(X-1,Y-1),cout<<"╮>";if(Wind>0&&T%3==0) Setpos(X-1,Y-1),cout<<"┓╱";else if(Wind>0&&T%3==1) Setpos(X-1,Y-1),cout<<"┪ ";else if(Wind>0&&T%3==2)Setpos(X-1,Y-1),cout<<"╮>";}else if(X>23){Setpos(X,Y-1);cout<<"━ ●";Setpos(X-1,Y-0.5),cout<<"│>";}else if(X<17&&Upt!=0){Setpos(X,Y-1);cout<<"━ ●";Setpos(X+1,Y-1.5),cout<<"╱ >";}else if(X<17){Setpos(X,Y-1);cout<<"━ ●";Setpos(X+1,Y-0.5),cout<<"│>";}if(Thun>0){Setpos(X-2,Y-1),cout<<"▄▄";Setpos(X+2,Y-1),cout<<"▄▄";Setpos(X,Y+2),cout<<"▌";Setpos(X,Y-2.5),cout<<"▌";Setpos(X-1,Y+1),cout<<"█";Setpos(X+1,Y+1),cout<<"█";Setpos(X-1,Y-2),cout<<"█";Setpos(X+1,Y-2),cout<<"█";}if(Magne>0&&T%7<2)Setpos(X,Y),Color(5),cout<<"★";if(Wind>1){if(T%6<2)Color(1);else Color(0);if(T%8<=1){Setpos(X+1,Y-5);cout<<"----  --";Setpos(X,Y-5);cout<<"-  --- -";Setpos(X-1,Y-5);cout<<"--- - --";}else if(T%8<=3){Setpos(X+1,Y-5);cout<<"------  ";Setpos(X,Y-5);cout<<" --  ---";Setpos(X-1,Y-5);cout<<"----- - ";}else if(T%8<=5){Setpos(X+1,Y-5);cout<<"  ------";Setpos(X,Y-5);cout<<"-- --  -";Setpos(X-1,Y-5);cout<<"- ----- ";}else if(T%8<=7){Setpos(X+1,Y-5);cout<<"--  ----";Setpos(X,Y-5);cout<<" --- -- ";Setpos(X-1,Y-5);cout<<"- - ----";}}if(Water!=0){Color(1);if(T%20<5){Setpos(X+2,Y-3);cout<<"■";Setpos(X+1,Y-3.5);cout<<"■";Setpos(X-1,Y-2.5);cout<<"■";Setpos(X-2,Y-3);cout<<"■";}else if(T%20<10||T%20>=15){Setpos(X+2,Y-3);cout<<"■";Setpos(X,Y-4);cout<<"■■";Setpos(X-2,Y-3);  cout<<"■";}else if(T%20<15){Setpos(X+2,Y-3.5);cout<<"■";Setpos(X+1,Y-3);cout<<"■";Setpos(X-1,Y-3.5);cout<<"■";Setpos(X-2,Y-3);cout<<"■";}}if(Fire!=0){if(T%6<3)Color(4);else Color(5);if(Fir>=1)Setpos(X,Y+1),cout<<"●";if(Fir>=2)Setpos(X+1,Y),cout<<"●";if(Fir>=3)Setpos(X-1,Y-1),cout<<"●";}
        }
        if(a==1||a==3){
            if(B[b].what==1){Nor;Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<"      ";if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(B[b].How<=1) Color(13);else Color(4);cout<<"●";if(a==1) Pan(1,B[b].x,B[b].y,b);}}
            if(B[b].what==2){Nor;Setpos(B[b].x-1,B[b].y-1);if(ti(B[b].x-1)==20)cout<<"======";else cout<<"      ";Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<"      ";Setpos(B[b].x+1,B[b].y-1);if(ti(B[b].x+1)==20)cout<<"======";else cout<<"      ";if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);Color(5);if(B[b].How==0){Setpos(B[b].x-1,B[b].y),cout<<"↑";Setpos(B[b].x,B[b].y-1),cout<<"←┼ →";Setpos(B[b].x+1,B[b].y),cout<<"↓";}else if(B[b].How==1){Setpos(B[b].x-1,B[b].y-1),cout<<"↖  ↗";Setpos(B[b].x,B[b].y),cout<<"╳";Setpos(B[b].x+1,B[b].y-1),cout<<"↙  ↘";} if(a==1) Pan(2,B[b].x,B[b].y,b);}}
            if(B[b].what==3||B[b].what==5){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<"  ";if(B[b].life!=0){B[b].y-=B[b].vy;B[b].x-=B[b].vx;Setpos(B[b].x,B[b].y);if(B[b].How==1) Color(5);else Color(4);cout<<"◎";}}
            if(B[b].what==4){Nor;Setpos(B[b].x,fmax((float)0,B[b].y-8));if(ti(B[b].x)==20){for(int i=max(0,(int)B[b].y-8);i<=B[b].y;i++)cout<<"==";}else {for(int i=max(0,(int)B[b].y-8);i<=B[b].y;i++)cout<<"  ";}if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,fmax((float)0,B[b].y-8));Color(6); for(int i=max(0,(int)B[b].y-8);i<=B[b].y;i++)cout<<"═"; if(a==1) Pan(4,B[b].x,B[b].y,b);}}
            if(B[b].what==6||B[b].what==8||B[b].what==9){Nor;Setpos(B[b].x-1,B[b].y);if(ti(B[b].x)-1==20)cout<<"==";else cout<<"  ";Setpos(B[b].x+1,B[b].y);if(ti(B[b].x)+1==20)cout<<"==";else cout<<"  ";Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<"      ";if(B[b].life!=0){B[b].y-=B[b].vy;B[b].x-=B[b].vx;Setpos(B[b].x,B[b].y-1);if(B[b].what==6){if(B[b].How<=1) Color(1); else Color(6);}if(B[b].what==9){if(B[b].How<=1) Color(4); else Color(8);}if(B[b].what==8)Color(5);Setpos(B[b].x-1,B[b].y);cout<<"︹";Setpos(B[b].x+1,B[b].y);cout<<"︺";Setpos(B[b].x,B[b].y-1);if(B[b].How%2==1) cout<<"〔●〕"; else cout<<"﹝○﹞"; if(a==1) Pan(6,B[b].x,B[b].y,b);}}
            if(B[b].what==7){Nor;Setpos(B[b].x,B[b].y);if(B[b].How<0) for(int i=19;i>=20+B[b].How;i--) {Setpos(i,B[b].y);cout<<"  ";}if(B[b].How>0) for(int i=21;i<=20+B[b].How;i++) {Setpos(i,B[b].y);cout<<"  ";}if(B[b].life!=0){B[b].y-=B[b].vy;if(B[b].How<0) for(int i=19;i>=20+B[b].How;i--) {Setpos(i,B[b].y);cout<<"║"; if(a==1) Pan(7,i,B[b].y,b);}if(B[b].How>0) for(int i=21;i<=20+B[b].How;i++) {Setpos(i,B[b].y);cout<<"║"; if(a==1) Pan(7,i,B[b].y,b);}}}
            if(B[b].what==10||B[b].what==11||B[b].what==12){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<"  ";if(B[b].life!=0){B[b].x-=B[b].vx;B[b].y-=B[b].vy;if(B[b].How==1){B[b].vy-=0.2;}else B[b].vx-=0.35;if(B[b].x>=25) B[b].x=25,B[b].vx*=-0.8;if(B[b].what==11&&B[b].y<=1) B[b].y=1,B[b].vy*=-1;if(B[b].what==12&&B[b].y<=1) B[b].y=1,B[b].vx=0,B[b].vy=-0.5,B[b].How=1;Setpos(B[b].x,B[b].y);if(B[b].what==11)Color(1);else if(B[b].what==12)Color(5);else Color(0);if(B[b].t%4<2)cout<<"▃";else cout<<"▍";if(a==1) Pan(B[b].what,B[b].x,B[b].y,b);}}
            if(B[b].what>=13&&B[b].what<=17){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"====";else cout<<"    ";if(B[b].life!=0){B[b].x-=B[b].vx;B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(B[b].what==14) Color(1);else if(B[b].what==15) Color(4);else if(B[b].what==16) Color(5);else if(B[b].what==17) Color(3);else Color(2);cout<<"●";if(B[b].what==14)cout<<"*";if(B[b].what==15)cout<<"";if(B[b].what==16)cout<<"<";if(B[b].what==17)cout<<"X";} if(a==1) Pan(1,B[b].x,B[b].y,b);}
            if(B[b].what==98&&B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(ti(B[b].x==20))cout<<"==";else cout<<"  ";if(B[b].y<=3)B[b].life=0;} 
            if(B[b].what>=99){if(B[b].y<=3)B[b].life=0;if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);Color(5);if(B[b].what==99)cout<<"█";if(B[b].what>=100&&B[b].what<200){if(B[b].what%5==0)cout<<"我";if(B[b].what%5==1)cout<<"是";if(B[b].what%5==2)cout<<"最";if(B[b].what%5==3)cout<<"强";if(B[b].what%5==4)cout<<"的";}if(B[b].what>=200&&B[b].what<300){if(B[b].what%6==0)cout<<"神";if(B[b].what%6==1)cout<<"级";if(B[b].what%6==2)cout<<"怪";if(B[b].what%6==3)cout<<"物";if(B[b].what%6==4)cout<<"之";if(B[b].what%6==5)cout<<"光";}if(B[b].what>=300&&B[b].what<400){if(B[b].what%8==0)cout<<"颤";if(B[b].what%8==1)cout<<"抖";if(B[b].what%8==2)cout<<"吧";if(B[b].what%8==3)cout<<"无";if(B[b].what%8==4)cout<<"能";if(B[b].what%8==5)cout<<"的";if(B[b].what%8==6)cout<<"人";if(B[b].what%8==7)cout<<"类";}if(B[b].what>=400&&B[b].what<500){if(B[b].what%8==0)cout<<"还";if(B[b].what%8==1)cout<<"不";if(B[b].what%8==2)cout<<"快";if(B[b].what%8==3)cout<<"跪";if(B[b].what%8==4)cout<<"倒";if(B[b].what%8==5)cout<<"在";if(B[b].what%8==6)cout<<"朕";if(B[b].what%8==7)cout<<"前";}if(B[b].what>=500&&B[b].what<600){if(B[b].what%8==0)cout<<"看";if(B[b].what%8==1)cout<<"懂";if(B[b].what%8==2)cout<<"这";if(B[b].what%8==3)cout<<"句";if(B[b].what%8==4)cout<<"话";if(B[b].what%8==5)cout<<"的";if(B[b].what%8==6)cout<<"是";if(B[b].what%8==7)cout<<"猪";} if(a==1) Pan(1,B[b].x,B[b].y,b);}}
            if(B[b].what==-1){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<"  ";if(Boss==0) B[b].life=0;else if(((Boss==1&&abs(B[b].x-Bx1)+abs(B[b].y-By1)<1.5)||(Boss==2&&abs(B[b].x-Bx2)+abs(B[b].y-By2)<1.5)||(Boss==3&&abs(B[b].x-Bx3)+abs(B[b].y-By3)<1.5)||(B[b].t==10))&&B[b].life==1) Bblo-=8+Lv*2,B[b].life=0;if(B[b].life!=0){if(Boss==1)B[b].x=B[b].x+(Bx1-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By1-B[b].y)/(10-B[b].t)*1.0;if(Boss==2)B[b].x=B[b].x+(Bx2-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By2-B[b].y)/(10-B[b].t)*1.0;if(Boss==3)B[b].x=B[b].x+(Bx3-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By3-B[b].y)/(10-B[b].t)*1.0;Setpos(B[b].x,B[b].y);Color(7);if(B[b].t%2==0) cout<<"+";else cout<<"×";}}
            if(B[b].what<=-2&&B[b].what>=-9){Nor;Setpos(B[b].x-1,B[b].y);if(ti(B[b].x)-1==20)cout<<"==";else cout<<"  ";Setpos(B[b].x+1,B[b].y);if(ti(B[b].x)+1==20)cout<<"==";else cout<<"  ";Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<"      ";if(B[b].life!=0){B[b].y-=B[b].vy;B[b].x-=B[b].vx;if(B[b].what<=-3&&B[b].what>=-7){if(B[b].x<=7)B[b].x=7;if(B[b].x>=28)B[b].x=28;else if(B[b].x>=B[b].a+1&&B[b].How==1)B[b].How=0;else if(B[b].x<=B[b].a-1&&B[b].How==0)B[b].How=1;if(B[b].How==1&&B[b].vx>=-1)B[b].vx-=0.2;if(B[b].How==0&&B[b].vx<=1)B[b].vx+=0.2;}if(B[b].what==-2) Color(3);if(B[b].what==-3) Color(4);if(B[b].what==-4) Color(1);if(B[b].what==-5) Color(0);if(B[b].what==-6) Color(6);if(B[b].what==-7) Color(5);if(B[b].what==-8) Color(2);if(B[b].what==-9) Color(14);if(T%7<=1&&B[b].what==-5)Color(1);else if(T%7<=1)Color(0);Setpos(B[b].x-1,B[b].y);cout<<"︹";Setpos(B[b].x+1,B[b].y);cout<<"︺";Setpos(B[b].x,B[b].y-1);if(B[b].what==-2) cout<<"﹝镖﹞";if(B[b].what==-3) cout<<"﹝火﹞";if(B[b].what==-4) cout<<"﹝水﹞";if(B[b].what==-5) cout<<"﹝风﹞";if(B[b].what==-6) cout<<"﹝雷﹞";if(B[b].what==-7) cout<<"﹝磁﹞";if(B[b].what==-8) cout<<"﹝血﹞";if(B[b].what==-9) cout<<"﹝忍﹞"; if(a==1) Pan(-2,B[b].x,B[b].y,b);}}
            if(B[b].what==-11||B[b].what==-12){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<"  ";if(B[b].life!=0){if(Magne>0)B[b].How++,B[b].x=B[b].x+(X-B[b].x)/(10-B[b].How)*1.0,B[b].y=B[b].y+(Y-B[b].y)/(10-B[b].How)*1.0;B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(B[b].what==-10) Color(5);if(B[b].what==-11) Color(7);if(T%7<=1)Color(0);cout<<"◆"; if(a==1) Pan(-1,B[b].x,B[b].y,b);}}
            if(B[b].what==-13){Nor;Setpos(B[b].x,B[b].y-0.5);if(ti(B[b].x)==20)cout<<"===";else cout<<"   ";if(B[b].life!=0){if(B[b].a==13880086){if(Boss==0) B[b].life=0;else if(((Boss==1&&abs(B[b].x-Bx1)+abs(B[b].y-By1)<1.5)||(Boss==2&&abs(B[b].x-Bx2)+abs(B[b].y-By2)<1.5)||(Boss==3&&abs(B[b].x-Bx3)+abs(B[b].y-By3)<1.5)||(B[b].t==5))&&B[b].life==1) Bblo-=8+Lv*2,B[b].life=0;if(B[b].life!=0){if(Boss==1)B[b].x=B[b].x+(Bx1-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By1-B[b].y)/(5-B[b].t)*1.0;if(Boss==2)B[b].x=B[b].x+(Bx2-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By2-B[b].y)/(5-B[b].t)*1.0;if(Boss==3)B[b].x=B[b].x+(Bx3-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By3-B[b].y)/(5-B[b].t)*1.0;}}else{if(B[B[b].a].life==0) B[b].life=0;else if((abs(B[b].x-B[B[b].a].x)+abs(B[b].y-B[B[b].a].y)<1.5||(B[b].t==5))&&B[b].life==1) Exp+=2,B[B[b].a].life=B[b].life=0;if(B[b].life!=0){B[b].x=B[b].x+(B[B[b].a].x-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(B[B[b].a].y-B[b].y)/(5-B[b].t)*1.0;}}Setpos(B[b].x,B[b].y-0.5);if(T%6<3)Color(5);else Color(4);cout<<"●";}}
        }if(br<bl) {br=-1,bl=0;memset(B,0,sizeof(B));}Color(0);
    }
    void Move(){
        if(X<3) X=3;if(Y<1) Y=1,Vy=0;if(Y>29) Y=29,Vy=0;
        if(Ice!=0){X-=Vx/2.0;Y+=Vy/2.0;Vy=fmax(Vy-0.025,(float)0);if(T%6==0&&Up==0&&Y<Ding) Y+=0.25;if(T%6==3&&Up==0&&Y>=Ding) Y-=0.25;if(Up==0&&Y<=Ding-1.25) Vy=0.25;if(Up==0&&Y>=Ding+1.25&&Wind==0) Vy=-0.25;if(Up==0&&Down==0&&Vx>0&&X<=18) Up=0,Down=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2&&X<=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up==0&&Down==1&&Vx<0&&X>=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up>0&&Down==0&&X>18) Up=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2) Vx+=0.175;else if(Up>0&&Upt==0) Vx-=0.175;else if(Up>0&&Upt>0) {Vx=fmax(Vx-0.125,(float)0);if(Upt==1&&T%2==0)Map(-1,0);if(T%2==0)Upt--;}}
        else{X-=Vx;Y+=Vy;Vy=fmax(Vy-0.05,(float)0);if(Wind==0){if(T%6==0&&Up==0&&Y<Ding) Y+=0.5;if(T%6==3&&Up==0&&Y>=Ding) Y-=0.5;}else{if(T%2==0&&Up==0&&Y<Ding) Y+=0.5;if(T%2==1&&Up==0&&Y>=Ding) Y-=0.5;}if(Up==0&&Y<=Ding-1.25) Vy=0.5;if(Up==0&&Y>=Ding+1.25&&Wind==0) Vy=-0.5;if(Up==0&&Down==0&&Vx>0&&X<=18) Up=0,Down=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2&&X<=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up==0&&Down==1&&Vx<0&&X>=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up>0&&Down==0&&X>18) Up=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2) Vx+=0.35;else if(Up>0&&Upt==0) Vx-=0.35;else if(Up>0&&Upt>0) {Vx=fmax(Vx-0.25,(float)0);if(Upt==1)Map(-1,0); Upt--;}}
        for(int i=bl;i<=br;i++){
            if(B[i].what<98)if(B[i].x-B[i].vx<=5||B[i].x-B[i].vx>=30||B[i].y-B[i].vy<=0||B[i].y-B[i].vy>=30){B[i].life=0;Map(1,i);}
            for(int j=0;j<20;j++)if(B[i].what>0&&B[i].life!=0&&abs(B[i].x-I[j][0])<2&&B[i].y-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<"   ";I[j][0]=I[j][1]=-1;B[i].life=0;Exp+=2;}
            if(B[i].t>=100)B[i].life=0;if(B[i].life==0&&i==bl) bl++;
            Map(1,i);if(B[i].life==0) continue;
            else{B[i].t++;
                if(B[i].what==1){if(B[i].y<=25&&B[i].How==0) B[i].vy=0,B[i].How=1;if(B[i].t==30) B[i].y+=1.5,B[i].How=2;if(B[i].t==35) B[i].vy=1.5,B[i].How=3;}
                if(B[i].what==2){if(B[i].t%3==0) B[i].How=!B[i].How;} 
                if(B[i].what==3||B[i].what==5){if(B[i].what==3&&B[i].y<=20) B[i].vy=0;if(B[i].what==5&&B[i].y<=21) B[i].vy=0;if(B[i].t>30&&B[i].t%2==0) B[i].How=!B[i].How;if(B[i].what==5&&B[i].t<=30&&B[i].x<X) B[i].vx=-0.2;else if(B[i].what==5&&B[i].t<=70&&B[i].x>X) B[i].vx=0.2;else B[i].vx=0;if(B[i].t==45){B[i].life=0;br++;B[br].what=4;B[br].x=B[i].x;B[br].y=32;B[br].vy=3;B[br].life=1;}}
                if(B[i].what==6||B[i].what==8||B[i].what==9){if(B[i].vx<0.25&&B[i].vy<0.25&&B[i].t>=50){B[i].life=0;if(B[i].life==0&&i==bl) bl++;Map(1,i);break;}if(B[i].t%5==0) B[i].How=rand()%4;if(B[i].what==9){if(B[i].t==7){X9:float xx=(rand()%41)/40.0,yy=(rand()%41)/40.0;if(xx<=0.5&&yy<=0.5) goto X9;for(int j=1;j<=4;j++){br++,B[br].what=9;B[br].t=11;B[br].x=B[i].x,B[br].y=B[i].y,B[br].vx=xx,B[br].vy=yy;if(j%2==0)swap(B[br].vx,B[br].vy),B[br].vy*=-1;if(j<=2)B[br].vx*=-1,B[br].vy*=-1;B[br].life=1;}B[i].life=0;}}if(B[i].what==8){if(B[i].x>X&&B[i].vx<1.2) B[i].vx+=fmax((float)0,0.2-B[i].t/25);if(B[i].x<X&&B[i].vx>-1.2) B[i].vx-=fmax((float)0,0.2-B[i].t/25);if(B[i].y>Y&&B[i].vy<1.2) B[i].vy+=fmax((float)0,0.2-B[i].t/25);if(B[i].y<Y&&B[i].vy>-1.2) B[i].vy-=fmax((float)0,0.2-B[i].t/25);}}
                if(B[i].what>=13&&B[i].what<=15&&B[i].How!=0){if(B[i].x==B[i].How)B[i].vx=0,B[i].How=0;}
                if(B[i].what==16){if(B[i].x<X&&B[i].vx>=-1) B[i].vx-=0.2;else if(B[i].x>X&&B[i].vx<=1) B[i].vx+=0.2;}
            }
            if(B[i].life==1&&B[i].a==0&&B[i].what>0){if(B[i].y>Y&&abs(B[i].x-X)<=3&&((B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y))<Dis) Dis=(B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y),Disb=i;else if(((B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y))<Dis1) Dis1=(B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y),Disb1=i;}
        }
    }
    void Guai(int R,int r){
        if(R==-1){br++;B[br].what=-1;B[br].x=X+rand()%3-1;B[br].y=Y+rand()%3-1;B[br].life=1;}
        if(R<=-2&&R>=-11){br++;B[br].what=R;B[br].x=B[br].a=r;B[br].y=29;if(R<=-3&&R>=-7)B[br].vx=-1;B[br].vy=1;B[br].life=1;}
        if(R==0){br++;B[br].what=1;B[br].x=r;B[br].y=29;B[br].vy=1;B[br].life=1;}
        if(R==1){br++;B[br].what=2;B[br].x=r;B[br].y=29;B[br].vy=1;B[br].life=1;}
        if(R==2||R==3){br++;B[br].what=2*R-1;B[br].x=r;B[br].y=29;B[br].vy=1;B[br].life=1;}
        if(R==4){br++;B[br].what=6;if(r<5)r=5;if(r>30)r=30;B[br].x=r;if(r==11||r==25) B[br].y=29-(rand()%20);else B[br].y=29;X4:B[br].vx=(rand()%21-10)/30.0;B[br].vy=(rand()%25)/30.0;if(B[br].vx<=0.8&&B[br].vy<=0.8)goto X4;int rx=rand()%50;if(rx==0) B[br].vx=0;B[br].life=1;}
        if(R==5){br++;B[br].How=r;B[br].what=7;if(B[br].How<0) B[br].x=19;if(B[br].How>0) B[br].x=21;B[br].y=29;B[br].vy=1;B[br].life=1;}
    }
    void CpGuai(int R,float x,float y,float xx,float yy){
        if(R==4){br++;B[br].what=6;B[br].x=x;B[br].y=y;B[br].vx=xx;B[br].vy=yy;B[br].life=1;}
        if(R==6||R==7||R==8){br++;B[br].what=4+R;B[br].x=x;B[br].y=y;B[br].vx=xx;B[br].vy=yy;B[br].life=1;}
    }
    void MesGuai(int a,int rr){
        int R=rand()%rr,r=-10086;
        if(R==0){if(a==1) r=(5+rand()%8)*2;if(a<=3&&a!=1) r=10+rand()%16;if(a==4) r=rand()%75-20;if(a==5) r=2+rand()%4;if(r!=-10086) Guai(a,r);}
    }
    void NorGuai(int a,int b){
        if(a==1) {if(b==1||b==41) Guai(0,15),Guai(0,17),Guai(0,19);if(b==21||b==61) Guai(0,21),Guai(0,23),Guai(0,25);if(b==81) Guai(0,11),Guai(0,13),Guai(0,15),Guai(0,17),Guai(0,19);if(b==101||b==141) Guai(0,17),Guai(0,19),Guai(0,21),Guai(0,23),Guai(0,25);if(b==121) Guai(0,15),Guai(0,17),Guai(0,19),Guai(0,21),Guai(0,23);if(b>=160&&b<=260&&b%10==0) Guai(0,b/10-1);if(b>=270&&b<=370&&b%10==0) Guai(0,52-b/10);if(b>=460&&b<=560&&b%10==0) Guai(0,b/10-37),Guai(0,b/10-36),Guai(0,b/10-35);if(b>=570&&b<=670&&b%10==0) Guai(0,78-b/10),Guai(0,77-b/10),Guai(0,76-b/10);if(b>=760&&b<=960&&b%10==0) Guai(0,b/10-66),Guai(0,b/10-65),Guai(0,103-b/10),Guai(0,104-b/10);if(b>=1000&&b<=1300) MesGuai(0,30-b/50);}
        if(a==2) {if(b<=200&&b%30==1) {int r=rand()%4;if(r==1) r=0;for(int i=0;i<4;i++) if(i!=r) Guai(1,i*4+9);}if(b>200&&b<=220&&b%5==1) Guai(1,18);if(b>220&&b<=300&&b%7==1) Guai(1,b/5-26);if(b>350&&b<=370&&b%5==1) Guai(1,22);if(b>370&&b<=450&&b%7==1) Guai(1,96-b/5);if(b==461||b==501||b==541) Guai(1,13),Guai(1,17),Guai(1,21);if(b==481||b==521||b==561) Guai(1,17),Guai(1,21),Guai(1,25);if(b>=561&&b<=861&&b%20==1) Guai(1,b/40+5);if(b>=561&&b<=861&&b%20==11) Guai(1,35-b/40);if(b>=801&&b<=961&&b%15==1) Guai(1,20);if(b>=1000&&b<=1300) MesGuai(1,30-b/50);}
        if(a==3) {if(b==1||b==61) Guai(3,15),Guai(2,17),Guai(2,19);if(b==31||b==91) Guai(2,21),Guai(2,23),Guai(3,25);if(b>=120&&b<=220&&b%10==0) Guai(2,b/10+3);if(b>=240&&b<=340&&b%10==0) Guai(2,49-b/10);if(b>=360&&b<=460&&b%20==0) Guai(2,b/10-21),Guai(2,61-b/10);if(b>=480&&b<=580&&b%20==0) Guai(3,b/10-33),Guai(3,73-b/10);if(b>=600&&b<750&&b%30==0) {for(int i=0;i<5;i++) Guai(3,i*3+10);}if(b>=750&&b<830&&b%10==0) if(b<=200&&b%40==1) Guai(2,X);if(b>=830&&b<910&&b%20==0) Guai(2,X);if(b>=910&&b<980&&b%10==0) Guai(2,X);if(b>=1000&&b<=1300) MesGuai(rand()%2+2,40-b/50);}
        if(a==4) {if(b==1) CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,21,29,0,0.65);if(b==41) CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,18,29,0,0.65);if(b==81) CpGuai(4,5,20,-0.4,0.35),CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,30,20,0.25,0.4),CpGuai(4,21,29,0,0.65);if(b==121) CpGuai(4,5,20,-0.2,0.35),CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,30,20,0.4,0.4),CpGuai(4,18,29,0,0.65);if(b==161) CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,21,29,0,0.6),CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,18,29,0,0.65);if(b>=200&&b<=500&&b%40==1) {float r=0,rr;for(int i=1;i<=5;i++){X5:rr=0.7+(rand()%5)/10.0;if(rr==r)goto X5;r=rr;CpGuai(4,i*3+7,29,0,0.5+(rand()%50)/80.0);}}if(b>540&&b<=565&&b%5==1) CpGuai(4,5,8,-2,0.2);if(b>590&&b<=615&&b%5==1) CpGuai(4,30,8,1.5,0.2);if(b>640&&b<=665&&b%5==1) CpGuai(4,5,8,-1.5,0.3);if(b>690&&b<=715&&b%5==1) CpGuai(4,30,8,2,0.3);if(b>=750&&b<=950&&b%20==1) {float r=0,rr;for(int i=1;i<=3;i++){X6:rr=0.7+(rand()%5)/10.0;if(rr==r)goto X6;r=rr;CpGuai(4,i*5+7+(rand()%3),29,0,0.5+(rand()%50)/200.0);}}if(b>=1000&&b<=1300) MesGuai(4,5);}
    }
    void RandGood(){
        if(Biao>0){Biao--;Guai(-1,0);}
        if(Gd[1]==0){Gd[1]=rand()%1000+1;if(Win==7)Gd[1]=10086;Gd[3]=rand()%16+8;}
        else if(Gd[1]<=5){Guai(-2-Gd[1],Gd[3]);memset(Gd,0,sizeof(Gd));}
        else if(Gd[1]>=20&&Gd[1]<27){Guai(-8,Gd[3]);memset(Gd,0,sizeof(Gd));}
        else if(Gd[1]>=30&&Gd[1]<37){Guai(-9,Gd[3]);memset(Gd,0,sizeof(Gd));}
        else if(Gd[1]>=40&&Gd[1]<70){Gd[2]++;if(Gd[2]%2==1)Guai(-10,Gd[3]);if(Gd[2]>=9)memset(Gd,0,sizeof(Gd));}
        else if(Gd[1]>=70&&Gd[1]<100){Gd[2]++;if(Gd[2]%2==1)Guai(-11,Gd[3]);if(Gd[2]>=9)memset(Gd,0,sizeof(Gd));}
        else if(Boss!=0&&Gd[1]>=450&&Gd[1]<=500){Guai(-2,Gd[3]);memset(Gd,0,sizeof(Gd));}
        else Gd[1]=0;
        for(int i=0;i<20;i++){if(I[i][0]==-1) continue;Setpos(I[i][0],I[i][1]);Color(0);if(I[i][0]==20) cout<<"===";else cout<<"   ";I[i][1]++;if(I[i][0]>=28||I[i][0]<=0||I[i][1]>=29) I[i][0]=I[i][1]=-1;else Color(1),Setpos(I[i][0],I[i][1]),cout<<"■";Color(0);}
    }
    void Panboss(int bx,int by){
        float Nox[4],Noy[4];Nox[0]=X,Noy[0]=Y;
        if(Down==1&&X==22) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
        else if(Down==2) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
        else if(Down==1||X<18) Nox[1]=X-1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
        else Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
        for(int i=0;i<3;i++){if((Boss==1||Boss==6)&&Wind==0&&Thun==0&&abs(Nox[i]-bx)<1&&abs(Noy[i]-by)<1&&Bgo1[4]==0) Blo-=20,Bgo1[4]=1,Killb=20,Kill=1;if((Boss==2||Boss==6)&&Wind==0&&Thun==0&&abs(Nox[i]-bx)<1&&abs(Noy[i]-by)<1&&Bgo2[8]==0) Blo-=20,Bgo2[8]=1,Killb=20,Kill=1;}
    }
    void Boss1(){
        for(int j=0;j<20;j++)if(abs(Bx1-I[j][0])<2&&By1-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<"   ";I[j][0]=I[j][1]=-1;Bblo-=8+Lv*2;Exp+=2;}
        if(Bbr==Bbl&&Bbr!=0) Bbr=Bbl=0;
        for(int i=1;i<=3+(Bbl-Bbr)/5;i++)if(Bbr<Bbl){Setpos(Bway[Bbr][0],Bway[Bbr][1]);if(Bway[Bbr][0]==20) cout<<"==";else cout<<"  ";Bbr++;}
        if(Bwhat1==5){int bx,by;Color(5);for(int i=0;i<10;i++){bx=Bx1-i*Bvx1/10.0;by=By1-i*Bvy1/10.0;Setpos(bx,by),cout<<"█";Bbl++;Bway[Bbl][0]=bx;Bway[Bbl][1]=by;}Color(0);}
        Bx1-=Bvx1;By1-=Bvy1;
        if(Bwhat1==0){X2:Bwhat1=rand()%7;if(Bwhat1==2||Bwhat1==3){if(By1<=10||By1>25) goto X2;}if(Bwhat1==4){if(By1<=15||Bx1<20) goto X2;Bgo1[2]=Bx1;Bgo1[3]=By1-1;}if(Bwhat1==5) {X0:Bgo1[3]=rand()%4+1;Bvx1=(rand()%101)/20.0;Bvy1=(rand()%101)/20.0;if(Bgo1[3]<=2) Bvx1*=-1;if(Bgo1[3]%2==1) Bvy1*=-1;if(abs(Bvx1)+abs(Bvy1)<=3||Out1)goto X0;}if(Bwhat1==6){if(By1<=17||By1>25) goto X2;}}
        if(Bwhat1==1){Bgo1[1]++,Bgo1[2]++;int R=rand()%(5-Bgo1[1]),r=rand()%(10-Bgo1[2]);if(Out1) R=0;if(R==0) {int vx=Bvx1,vy=Bvy1;Bgo1[1]=0;Bvx1=(rand()%101-20)/50.0;Bvy1=(rand()%101-20)/50.0;if(Bgo1[3]<=2) Bvx1*=-1;if(Bgo1[3]%2==1) Bvy1*=-1;if(Out1) r=0;} if(r==0) Chang1 }
        if(Bwhat1==2){Bgo1[1]++;if(Bgo1[1]>6){Bvy1=-0.3;br++;B[br].x=Bx1,B[br].y=By1-1;B[br].what=6;X3:B[br].vx=(rand()%21-10)/40.0;B[br].vy=(rand()%25)/30.0;if(B[br].vx<=0.8&&B[br].vy<=0.8)goto X3;int rx=rand()%50;if(rx==0) B[br].vx=0;B[br].life=1;}if(Bgo1[1]>8) Chang1}
        if(Bwhat1==3){Bgo1[1]++;if(Bgo1[1]>6&&Bgo1[1]%3==0){Bvy1=-0.3;br++;B[br].x=Bx1,B[br].y=By1-1;B[br].what=8;B[br].life=1;}if(Bgo1[1]>15) Chang1}
        if(Bwhat1==4){Bgo1[1]++;if(Bgo1[1]<=8){Setpos(Bgo1[2],Bgo1[3]);if(Bgo1[1]==1)cout<<" ";else if(Bgo1[1]>1&&Bgo1[2]==20) cout<<"==";else cout<<"  ";Bgo1[2]--;Setpos(Bgo1[2],Bgo1[3]);int r=rand()%4;if(r%2==0) Color(6);else Color(9);if(r<2) cout<<") ";else cout<<"】";Color(0);}if(Bgo1[1]==6) Bgo1[5]=X,Bgo1[6]=Y;if(Bgo1[1]==11){Map(0,(bool)Kill);Setpos(Bgo1[5],Bgo1[6]+1),cout<<"  ";Setpos(Bgo1[5],Bgo1[6]-1),cout<<"  ";Setpos(Bgo1[5]+1,Bgo1[6]),cout<<"  ";Setpos(Bgo1[5]-1,Bgo1[6]),cout<<"  ";int bx,by,bvx=Bgo1[2]-Bgo1[5],bvy=Bgo1[3]-Bgo1[6];Color(6);int i=0;while(1){bx=Bgo1[2]-i*bvx/30.0;by=Bgo1[3]-i*bvy/30.0;if(bx<=5||bx>=30||by<0||by>=29) break;Panboss(bx,by);Setpos(bx,by),cout<<"█";Bbl++;Bway[Bbl][0]=bx;Bway[Bbl][1]=by;i++;}Color(0);Map(-1,0);Chang1}}
        if(Bwhat1==5){Bgo1[1]++,Bgo1[2]++;int R=rand()%(5-Bgo1[1]),r=rand()%(10-Bgo1[2]);if(Out1) R=0;if(R==0) {int vx=Bvx1,vy=Bvy1;Bgo1[1]=0;X1:Bvx1=(rand()%101-20)/20.0;Bvy1=(rand()%101-20)/20.0;if(Bgo1[3]<=2) Bvx1*=-1;if(Bgo1[3]%2==1) Bvy1*=-1;if(abs(Bvx1)+abs(Bvy1)<=3||abs(Bvx1-vx)<=1||abs(Bvy1-vy)<=1)goto X1;if(Out1) r=0;} if(r==0) Chang1 }
        if(Bwhat1==6){Bgo1[1]++;if(Bgo1[1]>6&&Bgo1[1]%10==0){By1-=1;br++;B[br].x=Bx1,B[br].y=By1-1;B[br].what=9;X30:B[br].vy=1;B[br].life=1;}if(Bgo1[1]>31) Chang1}
    }
    void Boss2(){
        for(int j=0;j<20;j++)if(abs(Bx2-I[j][0])<2&&By2-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<"   ";I[j][0]=I[j][1]=-1;Bblo-=8+Lv*2;Exp+=2;}
        if(Bbr==Bbl&&Bbr!=0) Bbr=Bbl=0;
        for(int i=1;i<=3+(Bbl-Bbr)/5;i++)if(Bbr<Bbl){Setpos(Bway[Bbr][0],Bway[Bbr][1]);if(Bway[Bbr][0]==20) cout<<"==";else cout<<"  ";Bbr++;}
        Bx2-=Bvx2;By2-=Bvy2;
        if(Bwhat2==0){X21:Bwhat2=rand()%7;if(Bwhat2==2){X31:for(int i=1;i<=3;i++){Bgo2[i*2+1]=rand()%28+1,Bgo2[i*2]=rand()%25+5;if((abs(Bgo2[i*2]-Bx2)<=2&&abs(Bgo2[i*2+1]-By2)<=2)||(abs(Bgo2[i*2]-X)<=2&&abs(Bgo2[i*2+1]-Y)<=2))goto X31;}if(Bgo2[2]==Bgo2[4]||Bgo2[2]==Bgo2[6]||Bgo2[6]==Bgo2[4]||Bgo2[5]==Bgo2[3]||Bgo2[3]==Bgo2[7]||Bgo2[5]==Bgo2[7]) goto X31;}if(Bwhat2==3){Bgo2[2]=rand()%2;}if(Bwhat2==4||Bwhat2==5||Bwhat2==6){Bvy2=-1.5;Bvx2=-0.5;}}
        if(Bwhat2==1){Bgo2[1]++,Bgo2[2]++;int R=rand()%(5-Bgo2[1]),r=rand()%(30-Bgo2[2]);if(Out2) R=0;if(R==0) {int vx=Bvx2,vy=Bvy2;Bgo2[1]=0;Bvx2=(rand()%101-20)/50.0;Bvy2=(rand()%101-20)/50.0;if(Bgo2[3]<=2) Bvx2*=-1;if(Bgo2[3]%2==1) Bvy2*=-1;if(Out2) r=0;} if(r==0) Chang2 }
        if(Bwhat2==2){Bgo2[1]++;float bx,by,bvx,bvy;if(Bgo2[1]<21){for(int i=1;i<=3;i++){bvx=Bgo2[i*2]-Bx2,bvy=Bgo2[i*2+1]-By2;if(Bgo2[1]<=10){Setpos(Bx2+(Bgo2[1]-1)*bvx/10.0,By2+(Bgo2[1]-1)*bvy/10.0);if(abs(Bx2+(Bgo2[1]-1)*bvx/10.0-20)<0.5)cout<<"==";else cout<<"  ";bx=Bx2+Bgo2[1]*bvx/10.0;by=By2+Bgo2[1]*bvy/10.0;Setpos(bx,by);}else Setpos(Bgo2[i*2],Bgo2[i*2+1]);int r=rand()%4;if(r%2==0) Color(3);else Color(10);if(r<=1) cout<<"×";else cout<<"+";Color(0);}}if(Bgo2[1]==21){Map(0,(bool)Kill);Color(3);int j=0;for(int j=0;j<=30;j++)for(int i=1;i<=3;i++)for(int k=1;k<=4;k++){if(k==1) bvx=j,bvy=0;if(k==2) bvx=-j,bvy=0;if(k==3) bvx=0,bvy=j;if(k==4) bvx=0,bvy=-j;bx=Bgo2[i*2]+bvx,by=Bgo2[i*2+1]+bvy;if(bx<=5||bx>=30||by<0||by>=30) {continue;}Panboss(bx,by);Setpos(bx,by),cout<<"█";Bbl++;Bway[Bbl][0]=bx;Bway[Bbl][1]=by;}Color(0);Map(-1,0);Chang2}}
        if(Bwhat2==3){Bgo2[1]++;if(Bgo2[1]<=18){if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<"  ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<"  ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<"    ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<"    ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";if(Bgo2[1]%4==0)Bgo2[3]=!Bgo2[3];if(Bgo2[1]%6<3)Color(3);else Color(5);if(Bgo2[3]==0) Setpos(X-3,Y),cout<<"▼",Setpos(X+3,Y),cout<<"▲",Bgo2[4]=(int)(X+0.5),Bgo2[5]=(int)(Y+0.5);if(Bgo2[3]==1) Setpos(X,Y-3),cout<<" ",Setpos(X,Y+3),cout<<" ",Bgo2[4]=(int)(X+0.5),Bgo2[5]=(int)(Y+0.5);Color(0);}if(Bgo2[1]==18){if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<"  ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<"  ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<"    ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<"    ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";}if(Bgo2[1]>18&&Bgo2[1]<=25){Bgo2[3]=Bgo2[2];if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<"  ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<"  ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<"    ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<"    ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";if(Bgo2[1]%4<2)Color(3);else Color(5);if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<"▼",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<"▲";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+3),cout<<" ";Color(0);}if(Bgo2[1]==25){if(Bgo2[2]==0){Color(3);for(int i=4;i<=29;i++){Setpos(i,Bgo2[5]),cout<<"█";Bbl++;Panboss(i,Bgo2[5]);Bway[Bbl][0]=i;Bway[Bbl][1]=Bgo2[5];}}if(Bgo2[2]==1){Color(3);for(int i=0;i<=28;i++){Setpos(Bgo2[4],i),cout<<"█";Bbl++;Panboss(Bgo2[4],i);Bway[Bbl][0]=Bgo2[4];Bway[Bbl][1]=i;}}Chang2}}
        if(Bwhat2==4||Bwhat2==5||Bwhat2==6){Bgo2[1]++;if(By2>27)Bvy2=0;if(Bx2>23)Bvx2=0;if(Bgo2[1]>13&&Bgo2[1]%3==0){float t=By2-Y,g=0.35;if(Boss==6) t/=2.0;CpGuai(Bwhat2+2,Bx2,By2,(Bx2-X)/t*1.0+(t-1)*g/2.0,1);}if(Bgo2[1]>20) Chang2}
    }
    void Boss3(){
        #define Bean br++;B[br].what=13;B[br].x=Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;
        for(int j=0;j<20;j++)if(abs(Bx3-I[j][0])<2&&By3-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<"   ";I[j][0]=I[j][1]=-1;Bblo-=8+Lv*2;Exp+=2;}
        Bx3-=Bvx3;By3-=Bvy3;
        if(Bwhat3<=8){if(Bx3>X&&Bvx3<1.5) Bvx3+=0.3;if(Bx3<X&&Bvx3>-1.5) Bvx3-=0.3;}
        if(Bwhat3==0){X22:Bwhat3=rand()%12;if(Bwhat3==11&&abs(Bx3-20)<=1)goto X22;if(Bwhat3==11)Bgo3[2]=rand()%5;}
        if(Bwhat3==1){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].what=13;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=1;B[br].How=(int)Bx3-4;B[br].life=1;br++;B[br].what=13;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=-1;B[br].How=(int)Bx3+2;B[br].life=1;br++;B[br].what=13;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;Chang3}}
        if(Bwhat3>=2&&Bwhat3<=6){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].what=11+Bwhat3;B[br].vy=0.5+(rand()%100)/80.0;if(Bwhat3==5)B[br].vy=B[br].vy*3/4.0;B[br].life=1;Chang3}}
        if(Bwhat3==7){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].what=14;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=1;B[br].How=(int)Bx3-4;B[br].life=1;br++;B[br].what=14;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=-1;B[br].How=(int)Bx3+2;B[br].life=1;br++;B[br].what=14;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;Chang3}}
        if(Bwhat3==8){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].what=15;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=1;B[br].How=(int)Bx3-4;B[br].life=1;br++;B[br].what=15;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=-1;B[br].How=(int)Bx3+2;B[br].life=1;br++;B[br].what=15;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;Chang3}}
        if(Bwhat3==9){Bvx3=0;Bgo3[1]++;if(Bgo3[1]==6||Bgo3[1]==8){Bean}if(Bgo3[1]>=8)Chang3}
        if(Bwhat3==10){Bvx3=0;Bgo3[1]++;if(Bgo3[1]==6||Bgo3[1]==8||Bgo3[1]==10||Bgo3[1]==12){Bean}if(Bgo3[1]>=12)Chang3}
        if(Bwhat3==11){Bvx3=0;Bgo3[1]++;if(Bgo3[1]>=8)for(int i=1;i<=4;i++){br++;B[br].what=80+100*Bgo3[2]+Bgo3[1]*4+i;B[br].x=Bx3-1,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=99;B[br].x=Bx3,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=99;B[br].x=Bx3-2,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;}if(Bgo3[1]>=20){for(int i=1;i<=4;i++){br++;B[br].what=98;B[br].x=Bx3-1,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3-2,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;}Chang3}}
    }
    void Ball(int ball){
        if(ball==1){if(Fir<3&&T%8==0) Fir++;if(Fir>0){br++;B[br].what=-13;B[br].x=X;B[br].y=Y+rand()%3-1;B[br].life=1;if(Dis<=30) B[br].a=Disb,B[Disb].a=1,Fir--;else if(Boss!=0) B[br].a=13880086,Fir--;else if(Dis!=13880087) B[br].a=Disb,B[Disb].a=1,Fir--;else if(Dis1!=13880087) B[br].a=Disb1,B[Disb1].a=1,Fir--;else B[br].life=0;Dis=Dis1=13880087;}}
        if(ball==2){if(T%4==0)ib=(ib+1)%20,I[ib][1]=Y-2;if(T%16==0)I[ib][0]=X;if(T%16==4)I[ib][0]=X-1;if(T%16==8)I[ib][0]=X+1;if(T%16==12)I[ib][0]=X-2;if(T%12==9)I[ib][0]=X+2;if(Water==1){for(int i=X-6;i<=X+6;i++)ib=(ib+1)%20,I[ib][0]=i,I[ib][1]=Y-2-0.5*abs(i-X);}}
        if(ball==3){if(Wind>5){if(Y<Ding-1)Vy=5;else Vy=0;if(Up>=1) Vx=-5;if(Down==2) Vx=5;}if(Wind<5){if(Y>Ding-1)Vy=-5;else Vy=0;if(Up>=1) Vx=-5;if(Down==2) Vx=5;}if(Wind==5){if(Boss==2) Ding=12.25;else Ding=6.25;if(Boss!=0) Bblo-=16+Lv*4;if(Boss==1) Chang1 if(Boss==2) Chang2 if(Boss==3) Chang3 system("color 3F");Sleep(20);system("color 6F");Sleep(10);system("color 0F");system("cls");for(int i=bl;i<=br;i++)if(B[i].what>0)B[i].life=0;Setpos(20,0);for(int i=1;i<=60;i++) printf("=");}}
        if(ball==4){if(Thun==1){if(Boss!=0) Bblo-=16+Lv*4;if(Boss==1) Chang1 if(Boss==2) Chang2 if(Boss==3) Chang3 system("color 9F");Sleep(20);system("color 6F");Sleep(10);system("color 0F");system("cls");for(int i=bl;i<=br;i++)if(B[i].what>0)B[i].life=0;Setpos(20,0);for(int i=1;i<=60;i++) printf("=");}}
        if(ball==5){system("cls"); Color(5);Setpos(10,10);cout<<"新天赋!";Y:int rr=rand()%4+2;Setpos(12,10);if(rr==Ren) goto Y;if(rr==2)cout<<"瞬跳";if(rr==3)cout<<"空之舞";if(rr==4)cout<<"三段跳";if(rr==5)cout<<"反重力跳跃";Setpos(14,10);cout<<"当前天赋:";if(Ren==1)cout<<"小无敌";if(Ren==2)cout<<"瞬跳";if(Ren==3)cout<<"空之舞";if(Ren==4)cout<<"三段跳";if(Ren==5)cout<<"反重力跳跃";Setpos(16,10);cout<<"换否?(y/n)";G:char g=_getch();if(g=='y')Ren=rr;else if(g!='n')goto G;system("cls");Setpos(20,0);Color(0);for(int i=1;i<=60;i++) printf("=");}
        if(ball==6){Color(4);for(float i=1;i<=Bblo;i+=Bblomax/20.0)cout<<"▄";Color(0);cout<<' '<<Bblo<<"                              ";Color(0);}
        if(ball==7){Color(1);if(Win==7&&T%6<3)Color(3);for(float i=1;i<=Blo;i+=Blomax/20.0)cout<<"▄";Color(0);if(Win==7&&T%6<3)Color(3);printf(" %0.1f                              ",Blo);}
    }
    int main(){
        system("mode con cols=60 lines=37");CONSOLE_CURSOR_INFO cursor_info={1,0};SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);srand((unsigned)time(NULL));
        Win=0;Ren=1;Lv=1;Blo=Blomax=100;Expmax=300;Hui=15;X=18,Y=6;
        ReStart:system("cls");memset(B,0,sizeof(B));memset(I,-1,sizeof(I));T=0;bl=0;br=-1;Upt=0;
        Start:Blo=Blomax * 100;Ding=6.25;
        memset(Bgo1,0,sizeof(Bgo1));memset(Bgo2,0,sizeof(Bgo2));memset(Bgo3,0,sizeof(Bgo3));
        if(Win%2==0) T=0;if(Win%2==0&&D==0){if(Win>0)Ball(5);Boss=0;lL:L=rand()%4+1;for(int i=0;i<=Win/2-1;i++)if(L==Ll[i]) goto lL;Ll[Win/2]=L;}if(Win%2==1&&D==0){if(Win==7)Boss=6,T=0,Blomax+=100;else{bl:Boss=rand()%3+1;for(int i=0;i<=3;i++)if(Boss==Bl[i]) goto bl;}Bl[Win/2]=Boss;Bwhat1=Bwhat2=Bwhat3=0,Bx1=10,By1=20,Bx2=15,By2=20,Bx3=21,By3=20;system("color 4C");Sleep(20);system("color 0F");Map(0,1);Sleep(1000);}if(Win%2==1){Bblomax=500+(Win/2)*500;Bblo=Bblomax;if(Boss==2) Ding=12.25;}
        while(1){
            T++;
            if(Wind==0){if(GetAsyncKeyState(VK_LEFT)&0x8000) Vy=-(10-abs(Ding-Y)*1.5)/20.0;if(GetAsyncKeyState(VK_RIGHT)&0x8000) Vy=(10-abs(Ding-Y)*1.5)/20.0;}if(GetAsyncKeyState(VK_UP)&0x8000&&u1==0) {u1++;if(Down==1){Down=0;Up=0;if(Ren==2)Map(-1,0),Vx=0,X=18,Li=5;else Vx=7,Vy=0.3;}else if(Up==0&&Wind==0) {Down=0;Up=1;if(Ren==2)Map(-1,0),Vx=1,X=10,Map(0,3),Li=5;else Vx=2,Vy=0.1;}else if(Up==1&&Wind==0) {Down=0;Up=2;if(Ren==2)Map(-1,0),Vx=1,X-=6,Map(0,3),Li=5;else Vx=1.5,Vy=0.1;}else if(Ren==3&&Up==2&&Wind==0) {Down=0;Up=3;Vx=1;Vy=0.5;Upt=30;}else if(Ren==4&&Up==2&&Wind==0) {Down=0;Up=3;Vx=1.8;Vy=0.1;}}if(GetAsyncKeyState(VK_DOWN)&0x8000&&u2==0) {u2++;if(Down==1&&Ren==5){Down=2;Up=0;Vx=-1.7;}else {Down=1;Up=0;if(Ren==2)Map(-1,0),Vx=0,X=22,Map(0,3),Li=5;else {if(Upt!=0) Map(-1,0),Upt=0;Vx=-7;}}}if((GetAsyncKeyState(VK_UP)&0x8000) ?0:1) u1=0;if((GetAsyncKeyState(VK_DOWN)&0x8000) ?0:1) u2=0;if(kbhit()){char g=_getch();if(g==' ') Sleep(100),Setpos(4,1),Sy++,system("pause");}if(Sy==1) Setpos(4,1),printf("                           "),Sy--;
            if(Drug==0) Blo=fmin((float)Blomax,Blo+Hui/100.0);else if(T%10==0)Blo--;if(T%20==0) {if(Kill!=0) Kill=0;if(Lvl!=0) Lvl=0;}if(Killb>0) Killb--;if(Li>0) Li--;if(Ice>0) Ice--;if(Drug>0) Drug--;if(Magne>0) Magne--;
            if(Fire>0) Ball(1),Fire--;if(Water>0) Ball(2),Water--;if(Wind>0) Ball(3),Wind--;if(Thun>0) Ball(4),Thun--;
            if(Boss==0) NorGuai(L,T%1500);RandGood();if(T%20==1)Exp++;
            if(T%50==1){Exp++;system("cls");Setpos(20,0);Color(0);for(int i=1;i<=60;i++) printf("=");if(Win==0&&T<300){Setpos(4,6);cout<<"↑/↓ 跳跃/下翻,←→ 些微移动(松手即返回)"; Setpos(8,6);cout<<"球可以开启特殊效果,经验积满(300)可提升级别。";Setpos(8,6);cout<<"打败 7 波即胜利,打败 BOSS 有新天赋。";Setpos(10,15);cout<<"空格可以暂停。";}}
            Map(-1,0);
            if(Boss==1) Boss1();if(Boss==2) Boss2();if(Boss==3) Boss3();if(Boss==6) Boss1(),Boss2(),Boss3();
            Move();Map(0,(bool)Kill);Color(0);
            Setpos(1,1);Blo=fmin(Blo,(float)Blomax);if(Boss==0)cout<<"血量: "<<(int)Blo<<"  ";Color(0);Setpos(1,9),cout<<"死亡次数: "<<D<<"  ";Setpos(2,1);Exp=min(Exp,Expmax);if(Exp>=Expmax)Exp=0,Lv++,Lvl++,Hui++,Blomax+=5;if(Lvl>0)Color(5);cout<<"级别: "<<Lv;Color(0);Setpos(2,9);cout<<"经验: "<<Exp<<"  ";if(Boss>0) Setpos(3,1),cout<<"血量     : ",Ball(7);if(Boss>0&&Boss!=6) Setpos(4,1),cout<<"怪物血量: ",Ball(6);if(Boss==6) Setpos(1,9),printf("时间: %0.1f s  ",T/15.0);
            if(Win==0) Sleep(55);if(Win==1) Sleep(50);if(Win==2) Sleep(35);if(Win==3) Sleep(40);if(Win==4) Sleep(25);if(Win==5) Sleep(30);if(Win==6) Sleep(20);if(Win>=7) Sleep(17);
            if(Boss==3&&Bblo<=0){for(int i=1;i<=4;i++){br++;B[br].what=98;B[br].x=Bx3-1,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3-2,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;}}
            if((Win%2==0&&T>=1400)||(Win%2==1&&Bblo<=0)||(Win==7&&T>=450)||Blo<=0) {Map(-1,0);break;}
        }
    	if(Blo<=0){
    		Sleep(1000);
    		D++;
    		system("color 7F");
    		Setpos(15,11);
    		Color(4);
    		cout<<"GAME OVER...";
    		Sleep(2000);
    		goto ReStart;
    	}
    	else if(Win==6){
    		system("color 7F");
    		Setpos(15,11);
    		Color(4);
    		cout<<"坚持30秒 !";
    		Sleep(2000);
    		Setpos(30,0);
    		Win++;
    		D=0;
    	}
    	else if(Win==7){
    		Sleep(1000);
    		system("color 6E");
    		Setpos(15,11);
    		Color(5);
    		cout<<"YOU WIN !";
    		Sleep(2000);
    		Setpos(30,0);
    		return 0;
    	}else Sleep(1000),Win++,D=0;
    	goto Start;
    }
    

    Copy

    哈利波特:

    //笔者的提示:作者咕咕咕了,只编写了前12个地图
    #include <iostream>
    #include <string>
    #include <windows.h>
    #include <conio.h>
    #include <fstream>
    #include <ctime>
    #include <time.h>
    #include <stdio.h>
    using namespace std;
     
    int D_Of_C, OK, ane, xy, D_Of_C1, OK1, ane1, xy1, nowM, MoralValue;
    int ict = 0, nowlevel = 0;
    int bag[44] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1};
    string Material1name[9] = { "猫狸子胡须","媚娃头发","马形水怪的鬃毛","龙心腱","雷鸟尾羽","凤凰羽毛","独角兽尾毛","龙神经","夜骐的尾羽" };
    string Material2name[10] = { "桦木","紫衫木","冬青木","山楂木柳条","橡木","械木","山毛榉木","栗木","樱桃木","桃花心木" };
    int health = 1000, maxhealth = 1000, money=0, attack = 250, defense = 10, experience = 0, camp, level = 1, amm = 0, f = 0, speed = 0;
    string Nwand = "空手";
    int LE1 = 1, LE2 = 1, Sl[13];
    bool dead = false;
    string wandname[100] = { "柳条魔杖","胡桃魔杖","鹅耳枥木魔杖","柳条魔杖","花心木魔杖","冬青木魔杖","紫杉木魔杖","老魔杖" };
    int wandpower[100] = { 200,500,1100,1300,2400,5000,9000,20000 }, wand[100], wandi = 8, wandnamei = 8, wandpoweri = 8;
    string name, password;
    int choose()
    {
        system("cls");
        cout << "请选择您的阵营。" << endl;
        cout << "0, 哈利.HarryPotter" << endl;
        cout << "1, 伏地魔 LordVoldemort" << endl;
        cin >> camp;
        if (camp != 0 && camp != 1) {
            cout << "输入错误。";
            Sleep(250);
            choose();
        }
        else {
            if (MessageBox(0, TEXT("你确定?"), TEXT("请选择"), MB_OKCANCEL | MB_ICONINFORMATION) == IDOK) return 0; 
            choose();
        }
        return 0;
    }
    int login()
    {
        string DN, DPW;
        bool isn = false;
        cout << "请输入账号和密码" << endl;
        cout << "账号:";
        cin >> name;
        cout << "密码:";
        cin >> password;
        ifstream fin("data2.txt");
        while(fin >> DN) {
            if (DN == name) {
                fin >> DPW;
                if (DPW != password) {
                    cout << "密码错误!" << endl; isn = true;
                    system("cls"); login();
                }
                else {
                    fin >> money >> attack >> defense >> health >> level >> experience >> LE1 >> LE2  >> camp >> maxhealth;
                    fin >> D_Of_C >> OK >> ane >> xy >> D_Of_C1 >> OK1 >> ane1 >> xy1 >> nowM;
                    fin >> bag[0] >> bag[1] >> bag[2] >> bag[3] >> bag[4] >> bag[5] >> bag[6] >> bag[7];
                    fin >> bag[8] >> bag[9] >> bag[10] >> bag[11] >> bag[12] >> bag[13] >> bag[14] >> bag[15];
                    fin >> bag[16] >> bag[17] >> bag[18] >> bag[19] >> bag[20] >> bag[21] >> bag[22] >> bag[23];
                    fin >> bag[24] >> bag[25] >> bag[26] >> bag[27] >> bag[28] >> bag[29] >> bag[30] >> bag[31];
                    fin >> bag[32] >> bag[33] >> bag[34] >> bag[35] >> bag[36] >> bag[37] >> bag[38] >> bag[39];
                    fin >> bag[40] >> bag[41] >> bag[42] >> bag[43];
                    fin >> Sl[0] >> Sl[1] >> Sl[2] >> Sl[3] >> Sl[4] >> Sl[5] >> Sl[6] >> Sl[7] >> Sl[8] >> Sl[9] >> Sl[10] >> Sl[11] >> Sl[12];
                    for (int i = 0; i < 100; i++) {
                        fin >> wandname[i];
                        fin >> wandpower[i];
                        fin >> wand[i];
                    }   
                    fin >> Nwand >> amm >> f >> wandi >> wandnamei >> wandpoweri >> ict >> speed >> nowlevel;
                    isn = true;
                }
            }
        }
        if (!isn) {
            cout << "无此用户!" << endl;
            login();
        }
        cout << "登入成功!" << endl;
        Sleep(1000);
        return 0;
    }
    int save()
    {
        ofstream outfile("data2.txt", ios::binary | ios::app | ios::in | ios::out);
        outfile << name << " " << password << " " << money << " " << attack << " " << defense << " " << health << " " << level << " " << experience << " " << LE1 << " " << LE2 << " " << camp << " " << maxhealth << " ";
        outfile << D_Of_C << " " << OK << " " << ane << " " << xy << " " << D_Of_C1 << " " << OK1 << " " << ane1 << " " << xy1 << " " << nowM << " ";
        outfile << bag[0] << " " << bag[1] << " " << bag[2] << " " << bag[3] << " " << bag[4] << " " << bag[5] << " " << bag[6] << " " << bag[7] << " ";
        outfile << bag[8] << " " << bag[9] << " " << bag[10] << " " << bag[11] << " " << bag[12] << " " << bag[13] << " " << bag[14] << " " << bag[15] << " ";
        outfile << bag[16] << " " << bag[17] << " " << bag[18] << " " << bag[19] << " " << bag[20] << " " << bag[21] << " " << bag[22] << " " << bag[23] << " ";
        outfile << bag[24] << " " << bag[25] << " " << bag[26] << " " << bag[27] << " " << bag[28] << " " << bag[29] << " " << bag[30] << " " << bag[31] << " ";
        outfile << bag[32] << " " << bag[33] << " " << bag[34] << " " << bag[35] << " " << bag[36] << " " << bag[37] << " " << bag[38] << " " << bag[39] << " ";
        outfile << bag[40] << " " << bag[41] << " " << bag[42] << " " << bag[43] << " ";
        outfile << Sl[0] << " " << Sl[1] << " " << Sl[2] << " " << Sl[3] << " " << Sl[4] << " " << Sl[5] << " " << Sl[6] << " " << Sl[7] << " " << Sl[8] << " " << Sl[9] << " " << Sl[10] << " " << Sl[11] << " " << Sl[12] << " ";
        for (int i = 0; i < 100; i++) {
            outfile << wandname[i] << " ";
            outfile << wandpower[i] << " ";
            outfile << wand[i] << " ";
        }
        outfile << Nwand << " " << amm << " " << f << " " << wandi << " " << wandnamei << " " << wandpoweri << " " << ict << " " << speed << " " << nowlevel << endl;
        outfile.close();
        return 0;
    }
    int Reg()
    {
        string DN, DPW;
        cout << "请输入账号和密码  " << endl;
        cout << "账号:";
        cin >> name;
        cout << endl << "密码:";
        cin >> password;
        ifstream fin("data2.txt");
        while(fin >> DN) {
            if (DN == name) {
                cout << "用户名已被使用=====请重新起名";
                Reg();
            }
        }
        choose();
        return 0;
    }
    int monsterfight(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP)
    {
        int mhealth = 10000, mdefense = 1000, mattack = 10000, mspeed = 500;
        int hfaint = 0;
        int mfaint = 0;
        dead = false;
        int ha = hisA;
        while (1) {
            if (hfaint > 0) hfaint -= 1; 
            if (mfaint > 0) {
                if (rand() % 3 == 0)
                {
                    mfaint = 0;
                    cout << "石怪使用技能咒立停,停止了魔咒!" << endl;
                }
                else mfaint -= 1;
            }
            if (mfaint <= 0) {
                if (rand() % 3) {
                    cout << "石怪使用技能快快复苏 生命增加200" << endl;
                    mhealth += 200;
                }
                if (rand() % 3) {
                    cout << "石怪使用技能铁甲护身 生命增加100 防御增加50" << endl;
                    mhealth += 100;
                    mdefense += 50;
                }
                if (rand() % 3) {
                    cout << "石怪使用技能神锋无影 攻击增加200 对方扣血200滴" << endl;
                    hisH -= 200;
                    mattack += 200;
                }
                Sleep(1000);
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > hisSP) {
                    if (attack + ran > hisD) {
                        cout << "石怪发起进攻 " << Hname << "扣血" << mattack - hisD + ran << "滴 剩余" << hisH - (mattack - hisD + ran) << "滴" << endl;
                        hisH -= mattack - hisD + ran;
                    }
                    else cout << "石怪发起进攻 " << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << "石怪一脚踹了过去,但没有踢中" << endl; 
                    else {
                        cout << "石怪一脚踹了过去,但只擦着了腰" << endl;
                        if ((mattack / 3) + ran > hisD) {
                            cout << Hname << "扣血" << (mattack / 3) + ran - hisD << "滴 剩余" << hisH - ((mattack / 3) + ran - hisD) << "滴" << endl;
                            hisH -= (mattack / 3) + ran - hisD;
                        }
                        else cout << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                    }
                }
            }
            Sleep(1000);
            if (hisH <= 0) {
                if (hisS == 20 && rand() % 3 == 0) {
                    cout << "对方发动技能:恢复如初 满血复活" << endl;
                    hisH = ha; Sleep(1000);
                }
                else {
                    cout << "对方死亡" << endl;
                    return 0;
                }
            }
            if (hfaint <= 0) {
                if (hisS != 0) {
                    if (rand() % 3 == 0) {
                        if (hisS == 14) {
                            cout << "对方发动技能:快快复苏  生命加200" << endl;
                            hisH += 200;
                        }
                        if (hisS == 15) {
                            cout << "对方发动技能:盔甲护身  生命加50 防御增加50" << endl;
                            hisH += 50;
                            hisD += 50;
                        }
                        if (hisS == 17) {
                            cout << "对方发动技能神锋无影 攻击增加200 扣血200滴" << endl;
                            health -= 200;
                            hisA += 200;
                        }
                    }
                    Sleep(1000);
                }
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > mspeed) {
                    if (hisA + ran > defense) {
                        cout << Hname << "发起进攻 " << "石怪扣血" << hisA - defense + ran << "滴 剩余" << mhealth - (hisA - defense + ran) << "滴" << endl;
                        mhealth -= hisA - defense + ran;
                    }
                    else cout << Hname << "发起进攻 " << "石怪扣血0滴 剩余" << mhealth << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << Hname << "一脚踹了过来,但没有踢中" << endl; 
                    else {
                        cout << "对方一脚踹了过来,但只擦着了石怪的腰" << endl;
                        if ((hisA / 3) + ran > hisD) {
                            cout << "石怪扣血" << (hisA / 3) + ran - defense << "滴 剩余" << mhealth - ((hisA / 3) + ran - defense) << "滴" << endl;
                            mhealth -= ((hisA / 3) + ran - defense);
                        }
                        else cout << "石怪扣血0滴 剩余" << mhealth << "滴" << endl;
                    }
                }
                Sleep(1000);
                if (mhealth <= 0) {
                    cout << "石怪死亡" << endl;
                    return hisH;
                }
            }
        }
        return 0;
    }
    int fight1(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP)
    {
        int hfaint = 0, hhurt = 0, hbeat = 0;
        int mfaint = 0, mhurt = 0;
        dead = false;
        int ha = hisA;
        int his = hisA + hisD + hisH;
        while (1) {
            if (hfaint > 0) {
                if (rand() % 3 == 0) {
                    cout << "对方使用技能:咒立停!停止了魔咒" << endl;
                    hfaint = 1;
                }
                hfaint -= 1;
            }
            if (hbeat == 1) {
                if (rand() % 10 == 0) {
                    cout << "对方一躲,躲过了你的石头" << endl;
                    hbeat = 0;
                }
                else {
                    cout << "对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴" << endl;
                    hisH -= 50;
                }
            }
            if (mfaint > 0) {
                if (Sl[6]) mfaint = 0; 
                else mfaint -= 1;
            }
            if (mhurt > 0) {
                if (Sl[6]) mhurt = 0; 
                else mhurt -= 1; 
                cout << "你的心像被一把刀刺穿了一样 扣血200滴" << endl;
                health -= 200;
            }
            if (mfaint <= 0) {
                if (rand() % 3 && Sl[0]) {
                    cout << "你使用技能快快复苏 生命增加200" << endl;
                    health += 200;
                }
                if (rand() % 3 && Sl[1]) {
                    cout << "你使用技能铁甲护身 生命增加100 防御增加50" << endl;
                    health += 100; defense += 50;
                }
                if (rand() % 3 && Sl[2]) {
                    cout << "你使用技能昏昏倒地 " << Hname << "一回合之内不能攻击" << endl;
                    hfaint += 1;
                }
                if (rand() % 3 && Sl[3]) {
                    cout << "你使用技能神锋无影 攻击增加200 扣血200滴" << endl;
                    hisH -= 200; attack += 200;
                }
                if (rand() % 3 && Sl[5]) {
                    if (rand() % 10) {
                        cout << "你使用技能统统石化 " << Hname << "二回合之内不能攻击" << endl;
                        hfaint += 2;
                    }
                    else {
                        cout << "你使用技能统统石化 " << Hname << "十回合之内不能攻击" << endl;
                        hfaint += 10;
                    }
                }
                if (rand() % 4 == 0 && Sl[7])
                {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                    hisH = monsterfight(Hname, hisH, hisA, hisD, hisS, hisSP);
                    if (hisH < 1) return 0;
                    if (Sl[0]) {
                        cout << "在对方和石怪的战斗中,你已经恢复了2000生命" << endl;
                        if (maxhealth < health + 2000) health = maxhealth; 
                        else health += 2000; 
                    }
                }
                if (rand() % 4 == 0 && Sl[8]) {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                }
                if (rand() % 3 && Sl[9]) {
                    cout << "你使用技能万弹齐发!变出几十块石头" << endl;
                    hbeat = 1;
                }
                if (rand() % 3 && Sl[10]) {
                    cout << "你使用技能钻心咒!对方将疼痛5回合" << endl;
                    hhurt += 5;
                }
                if (rand() % 3 && Sl[11]) {
                    cout << "魂魄出窍!你使用夺魂咒,企图让" << Hname << "自己攻击自己!" << endl;
                    Sleep((rand() % 1000) + 1000);
                    cout << Hname << "被你控制了,开始攻击自己" << endl;
                    Sleep(700);
                    int ran = rand() % 40 - 20;
                    if (hisA + ran > hisD) {
                        cout << "对方发起进攻 自己扣血" << hisH - hisD + ran << "滴 剩余" << hisH - (hisA - hisD + ran) << "滴" << endl;
                        hisH -= hisA - hisD + ran;
                    }
                    else cout << "对方发起进攻 自己扣血0滴 剩余" << hisH-1 << "滴" << endl; 
                }
                if (rand() % 2 && Sl[12]) {
                    cout << "你使用技能阿瓦达索命 " << Hname << "扣血" << hisH +hisH / 4 << "滴" << endl;
                    hisH /= 4;
                }
                Sleep(1000);
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > hisSP) {
                    if (attack + ran > hisD) {
                        cout << "你发起进攻 " << Hname << "扣血" << attack - hisD + ran << "滴 剩余" << hisH - (attack - hisD + ran) << "滴" << endl;
                        hisH -= attack - hisD + ran;
                    }
                    else cout << "你发起进攻 " << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << "你一脚踹了过去,但没有踢中" << endl; 
                    else {
                        cout << "你一脚踹了过去,但只擦着了腰" << endl;
                        if ((attack / 3) + ran > hisD) {
                            cout << Hname << "扣血" << (attack / 3) + ran - hisD << "滴 剩余" << hisH - ((attack / 3) + ran - hisD) << "滴" << endl;
                            hisH -= (attack / 3) + ran - hisD;
                        }
                        else cout << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                    }
                }
            }
            Sleep(700);
            if (hhurt > 0) {
                hhurt -= 1;
                cout << "对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴" << endl;
                hisH -= 200;
            }
            if (hisH <= 0) {
                if (hisS == 20 && rand() % 3 == 0) {
                    cout << "对方发动技能:恢复如初 满血复活" << endl;
                    hisH = ha;
                    Sleep(1000);
                }
                else {
                    cout << "对方死亡\n获得" << (his / 30) << "经验" << endl;
                    experience += (his / 30);
                    if (ane == 3) D_Of_C++;
                    if (ane1 == 3) D_Of_C1++;
                    return 0;
                }
            }
            if (hfaint <= 0) {
                if (rand() % 3 == 0) {
                    if (hisS == 14) {
                        cout << "对方发动技能:快快复苏  生命加200" << endl;
                        hisH += 200;
                    }
                    if (hisS == 15) {
                        cout << "对方发动技能:盔甲护身  生命加50 防御增加50" << endl;
                        hisH += 50; hisD += 50;
                    }
                    if (hisS == 17) {
                        cout << "对方发动技能神锋无影 攻击增加200 扣血200滴" << endl;
                        health -= 200; hisA += 200;
                    }
                    Sleep(1000);
                }
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > speed) {
                    if (hisA + ran > defense) {
                        cout << Hname << "发起进攻 " << "你扣血" << hisA - defense + ran << "滴 剩余" << health - (hisA - defense + ran) << "滴" << endl;
                        health -= hisA - defense + ran;
                    }
                    else cout << Hname << "发起进攻 " << "你扣血0滴 剩余" << health << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << Hname << "一脚踹了过来,但没有踢中" << endl; 
                    else {
                        cout << "对方一脚踹了过来,但只擦着了你的腰" << endl;
                        if ((hisA / 3) + ran > hisD) {
                            cout << "你扣血" << (hisA / 3) + ran - defense << "滴 剩余" << health - ((hisA / 3) + ran - defense) << "滴" << endl;
                            health -= ((hisA / 3) + ran - defense);
                        }
                        else cout << "你扣血0滴 剩余" << health << "滴" << endl; 
                    }
                }
                Sleep(700);
                if (health <= 0) {
                    if (Sl[6] && rand() % 2) {
                        cout << "你发动技能:恢复如初 满血复活" << endl;
                        health = maxhealth;
                        Sleep(1000);
                    }
                    else {
                        cout << "你死亡";
                        health = 20;
                        dead = true;
                        return 0;
                    }
                }
            }
        }
        return 0;
    }
    int fight2(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP)
    {
        int hfaint = 0, hhurt = 0, hbeat = 0;
        int mfaint = 0, mhurt = 0;
        dead = false;
        int ha = hisA;
        int his = hisA + hisD + hisH;
        while (1) {
            if (hfaint > 0) {
                if (rand() % 3 == 0) {
                    cout << "对方使用技能:咒立停!停止了魔咒";
                    hfaint = 1;
                }
                hfaint -= 1;
            }
            if (hbeat == 1) {
                if (rand() % 10 == 0) {
                    cout << "对方一躲,躲过了你的石头" << endl;
                    hbeat = 0;
                }
                else {
                    cout << "对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴" << endl;
                    hisH -= 50;
                }
            }
            if (mfaint > 0) {
                if (Sl[6]) mfaint = 0; 
                else mfaint -= 1; 
            }
            if (mhurt > 0) {
                if (Sl[6]) mhurt = 0;
                else mhurt -= 1;
                cout << "你的心像被一把刀刺穿了一样 扣血200滴" << endl;
                health -= 200;
            }
            if (mfaint <= 0) {
                if (rand() % 3 && Sl[0]) {
                    cout << "你使用技能快快复苏 生命增加200" << endl;
                    health += 200;
                }
                if (rand() % 3 && Sl[1]) {
                    cout << "你使用技能铁甲护身 生命增加100 防御增加50" << endl;
                    health += 100;
                    defense += 50;
                }
                if (rand() % 3 && Sl[2]) {
                    cout << "你使用技能昏昏倒地 " << Hname << "一回合之内不能攻击" << endl;
                    hfaint += 1;
                }
                if (rand() % 3 && Sl[3]) {
                    cout << "你使用技能神锋无影 攻击增加200 扣血200滴" << endl;
                    hisH -= 200;
                    attack += 200;
                }
                if (rand() % 3 && Sl[5]) {
                    if (rand() % 10) {
                        cout << "你使用技能统统石化 " << Hname << "二回合之内不能攻击" << endl;
                        hfaint += 2;
                    }
                    else {
                        cout << "你使用技能统统石化 " << Hname << "十回合之内不能攻击" << endl;
                        hfaint += 10;
                    }
                }
                if (rand() % 4 == 0 && Sl[7]) {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                    hisH = monsterfight(Hname, hisH, hisA, hisD, hisS, hisSP);
                    if (hisH < 1) return 0;
                    if (Sl[0]) {
                        cout << "在对方和石怪的战斗中,你已经恢复了2000生命" << endl;
                        if (maxhealth < health + 2000) health = maxhealth; 
                        else health += 2000; 
                    }
                    Sleep(1000);
                }
                if (rand() % 4 == 0 && Sl[8]) {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                }
                if (rand() % 3 && Sl[9]) {
                    cout << "你使用技能万弹齐发!变出几十块石头" << endl;
                    hbeat = 1;
                }
                if (rand() % 3 && Sl[10]) {
                    cout << "你使用技能钻心咒!对方将疼痛5回合" << endl;
                    hhurt += 5;
                }
                if (rand() % 3 && Sl[11]) {
                    cout << "魂魄出窍!你使用夺魂咒,企图让" << Hname << "自己攻击自己!" << endl;
                    Sleep((rand() % 1000) + 1000);
                    cout << Hname << "被你控制了,开始攻击自己" << endl;
                    Sleep(700);
                    int ran = rand() % 40 - 20;
                    if (hisA + ran > hisD) {
                        cout << "对方发起进攻 自己扣血" << hisH - hisD + ran << "滴 剩余" << hisH - (hisA - hisD + ran) << "滴" << endl;
                        hisH -= hisA - hisD + ran;
                    }
                    else cout << "对方发起进攻 自己扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                if (rand() % 2 && Sl[12]) {
                    cout << "你使用技能阿瓦达索命 " << Hname << "扣血" << hisH - hisH / 4 << "滴" << endl;
                    hisH /= 4;
                }
                Sleep(1000);
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > hisSP) {
                    if (attack + ran > hisD) {
                        cout << "你发起进攻 " << Hname << "扣血" << attack - hisD + ran << "滴 剩余" << hisH - (attack - hisD + ran) << "滴" << endl;
                        hisH -= attack - hisD + ran;
                    }
                    else cout << "你发起进攻 " << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << "你一脚踹了过去,但没有踢中" << endl; 
                    else {
                        cout << "你一脚踹了过去,但只擦着了腰" << endl;
                        if ((attack / 3) + ran > hisD) {
                            cout << Hname << "扣血" << (attack / 3) + ran - hisD << "滴 剩余" << hisH - ((attack / 3) + ran - hisD) << "滴" << endl;
                            hisH -= (attack / 3) + ran - hisD;
                        }
                        else cout << Hname << "扣血0滴 剩余" << hisH << "滴" << endl;
                    }
                }
            }
            Sleep(700);
            if (hhurt > 0) {
                hhurt -= 1;
                cout << "对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴" << endl;
                hisH -= 200;
            }
            if (hisH <= 0) {
                if (hisS == 20 && rand() % 3 == 0) {
                    cout << "对方发动技能:恢复如初 满血复活" << endl;
                    hisH = ha;
                    Sleep(1000);
                }
                else {
                    cout << "对方死亡\n获得" << (his / 200) << "金币" << endl;
                    money += (his / 200);
                    if (ane == 3) D_Of_C++;
                    if (ane1 == 3) D_Of_C1++;
                    return 0;
                }
            }
            if (hfaint <= 0) {
                if (rand() % 3 == 0) {
                    if (hisS == 14) {
                        cout << "对方发动技能:快快复苏  生命加200" << endl;
                        hisH += 200;
                    }
                    if (hisS == 15) {
                        cout << "对方发动技能:盔甲护身  生命加50 防御增加50" << endl;
                        hisH += 50; hisD += 50;
                    }
                    if (hisS == 17) {
                        cout << "对方发动技能神锋无影 攻击增加200 扣血200滴" << endl;
                        health -= 200; hisA += 200;
                    }
                    Sleep(1000);
                }
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > speed) {
                    if (hisA + ran > defense) {
                        cout << Hname << "发起进攻 " << "你扣血" << hisA - defense + ran << "滴 剩余" << health - (hisA - defense + ran) << "滴" << endl;
                        health -= hisA - defense + ran;
                    }
                    else cout << Hname << "发起进攻 " << "你扣血0滴 剩余" << health << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << Hname << "一脚踹了过来,但没有踢中" << endl; 
                    else {
                        cout << "对方一脚踹了过来,但只擦着了你的腰" << endl;
                        if ((hisA / 3) + ran > hisD) {
                            cout << "你扣血" << (hisA / 3) + ran - defense << "滴 剩余" << health - ((hisA / 3) + ran - defense) << "滴" << endl;
                            health -= ((hisA / 3) + ran - defense);
                        }
                        else cout << "你扣血0滴 剩余" << health << "滴" << endl;
                    }
                }
                Sleep(700);
                if (health <= 0) {
                    if (Sl[6] && rand() % 2) {
                        cout << "你发动技能:恢复如初 满血复活" << endl;
                        health = maxhealth;
                        Sleep(1000);
                    }
                    else {
                        cout << "你死亡";
                        health = 20;
                        dead = true;
                        return 0;
                    }
                }
            }
        }
        return 0;
    }
    int fight(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP)
    {
        int hfaint = 0, hhurt = 0, hbeat = 0;
        int mfaint = 0, mhurt = 0;
        dead = false;
        int ha = hisA;
        int his = hisA + hisD + hisH;
        while (1)
        {
            if (hfaint > 0) {
                if (rand() % 3 == 0) {
                    cout << "对方使用技能:咒立停!停止了魔咒" << endl;
                    hfaint = 0;
                }
                else hfaint -= 1;
            }
            if (hbeat == 1) {
                if (rand() % 10 == 0) {
                    cout << "对方一躲,躲过了你的石头" << endl;
                    hbeat = 0;
                }
                else {
                    cout << "对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴" << endl;
                    hisH -= 50;
                }
            }
            if (mfaint > 0) {
                if (Sl[6]) mfaint = 0; 
                else mfaint -= 1; 
            }
            if (mhurt > 0) {
                if (Sl[6]) mhurt = 0; 
                else mhurt -= 1;
                cout << "你的心像被一把刀刺穿了一样 扣血200滴" << endl;
                health -= 200;
            }
            if (mfaint <= 0) {
                if (rand() % 3 && Sl[0]) {
                    cout << "你使用技能快快复苏 生命增加200" << endl;
                    health += 200;
                }
                if (rand() % 3 && Sl[1]) {
                    cout << "你使用技能铁甲护身 生命增加100 防御增加50" << endl;
                    health += 100;
                    defense += 50;
                }
                if (rand() % 3 && Sl[2]) {
                    cout << "你使用技能昏昏倒地 " << Hname << "一回合之内不能攻击" << endl;
                    hfaint += 1;
                }
                if (rand() % 3 && Sl[3]) {
                    cout << "你使用技能神锋无影 攻击增加200 扣血200滴" << endl;
                    hisH -= 200; attack += 200;
                }
                if (rand() % 3 && Sl[5]) {
                    if (rand() % 10) {
                        cout << "你使用技能统统石化 " << Hname << "二回合之内不能攻击" << endl;
                        hfaint += 2;
                    }
                    else {
                        cout << "你使用技能统统石化 " << Hname << "十回合之内不能攻击" << endl;
                        hfaint += 10;
                    }
                }
                if (rand() % 4 == 0 && Sl[7]) {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                    hisH = monsterfight(Hname, hisH, hisA, hisD, hisS, hisSP);
                    if (hisH < 1) return 0; 
                    if (Sl[0]) {
                        cout << "在对方和石怪的战斗中,你已经恢复了2000生命" << endl;
                        if (maxhealth < health + 2000) health = maxhealth; 
                        else health += 2000; 
                    }
                }
                if (rand() % 4 == 0 && Sl[8]) {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                }
                if (rand() % 3 && Sl[9]) {
                    cout << "你使用技能万弹齐发!变出几十块石头" << endl;
                    hbeat = 1;
                }
                if (rand() % 3 && Sl[10]) {
                    cout << "你使用技能钻心咒!对方将疼痛5回合" << endl;
                    hhurt += 5;
                }
                if (rand() % 3 && Sl[11]) {
                    cout << "魂魄出窍!你使用夺魂咒,企图让" << Hname << "自己攻击自己!" << endl;
                    Sleep((rand() % 1000) + 1000);
                    cout << Hname << "被你控制了,开始攻击自己" << endl;
                    Sleep(700);
                    int ran = rand() % 40 - 20;
                    if (hisA + ran > hisD) {
                        cout << "对方发起进攻 自己扣血" << hisH- hisD + ran << "滴 剩余" << hisH - (hisA - hisD + ran) << "滴" << endl;
                        hisH -= hisA - hisD + ran;
                    }
                    else cout << "对方发起进攻 自己扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                if (rand() % 2 && Sl[12]) {
                    cout << "你使用技能阿瓦达索命 " << Hname << "扣血" << hisH - hisH / 4 << "滴" << endl;
                    hisH /= 4;
                }
                Sleep(1000);
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > hisSP) {
                    if (attack + ran > hisD) {
                        cout << "你发起进攻 " << Hname << "扣血" << attack - hisD + ran << "滴 剩余" << hisH - (attack - hisD + ran) << "滴" << endl;
                        hisH -= attack - hisD + ran;
                    }
                    else cout << "你发起进攻 " << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << "你一脚踹了过去,但没有踢中" << endl; 
                    else {
                        cout << "你一脚踹了过去,但只擦着了腰" << endl;
                        if ((attack / 3) + ran > hisD) {
                            cout << Hname << "扣血" << (attack / 3) + ran - hisD << "滴 剩余" << hisH - ((attack / 3) + ran - hisD) << "滴" << endl;
                            hisH -= (attack / 3) + ran - hisD;
                        }
                        else cout << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                    }
                }
            }
            Sleep(700);
            if (hhurt > 0) {
                hhurt -= 1;
                cout << "对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴" << endl;
                hisH -= 200;
            }
            if (hisH <= 0) {
                if (hisS == 20 && rand() % 3 == 0) {
                    cout << "对方发动技能:恢复如初 满血复活" << endl;
                    hisH = ha;
                    Sleep(1000);
                }
                else {
                    cout << "对方死亡\n获得" << his / 30 << "元" << endl;
                    money += his / 30;
                    experience += (his / 30) * 10;
                    if (ane == 3) D_Of_C++; 
                    if (ane1 == 3) D_Of_C1++; 
                    return 0;
                }
            }
            if (hfaint <= 0) {
                if (rand() % 3 == 0) {
                    if (hisS == 14) {
                        cout << "对方发动技能:快快复苏  生命加200" << endl;
                        hisH += 200;
                    }
                    if (hisS == 15) {
                        cout << "对方发动技能:盔甲护身  生命加50 防御增加50" << endl;
                        hisH += 50;
                        hisD += 50;
                    }
                    if (hisS == 17)
                    {
                        cout << "对方发动技能神锋无影 攻击增加200 扣血200滴" << endl;
                        health -= 200;
                        hisA += 200;
                    }
                    Sleep(1000);
                }
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > speed) {
                    if (hisA + ran > defense) {
                        cout << Hname << "发起进攻 " << "你扣血" << hisA - defense + ran << "滴 剩余" << health - (hisA - defense + ran) << "滴" << endl;
                        health -= hisA - defense + ran;
                    }
                    else cout << Hname << "发起进攻 " << "你扣血0滴 剩余" << health << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << Hname << "一脚踹了过来,但没有踢中" << endl; 
                    else {
                        cout << "对方一脚踹了过来,但只擦着了你的腰" << endl;
                        if ((hisA / 3) + ran > hisD) {
                            cout <<"你扣血" << (hisA / 3) + ran - defense << "滴 剩余" << health - ((hisA / 3) + ran - defense) << "滴" << endl;
                            health -= ((hisA / 3) + ran - defense);
                        }
                        else cout << "你扣血0滴 剩余" << health << "滴" << endl; 
                    }
                }
                Sleep(700);
                if (health <= 0) {
                    if (Sl[6] && rand() % 2) {
                        cout << "你发动技能:恢复如初 满血复活" << endl;
                        health = maxhealth;
                        Sleep(1000);
                    }
                    else {
                        cout << "你死亡" << endl;
                        health = 20;
                        dead = true;
                        return 0;
                    }
                }
            }
        }
        return 0;
    }
    int street()
    {
        switch (rand() % 6)
        {
        case 0:
            if (camp) {
                int f;
                cout << "你遇到了一个路人" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("路人", 500, 110, 0, 14, 1000);
                    if (!dead && rand() % 2) {
                        if (rand() % 4 == 0) {
                            cout << "获得一瓶经验药水" << endl;
                            bag[22] += 1;
                        }
                        else if (rand() % 4 == 1) {
                            cout << "获得一瓶攻击药水" << endl;
                            bag[21] += 1;
                        }
                        else if (rand() % 4 == 2) {
                            cout << "获得一瓶生命药水" << endl;
                            bag[19] += 1;
                        }
                        else {
                            cout << "获得一瓶防御药水" << endl;
                            bag[20] += 1;
                        }
                    }
                }
            }
            else {
                int f;
                cout << "你遇到了一个小混混" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("小混混", 500, 110, 0, 15, 1000);
                    if (!dead && rand() % 2) {
                        if (rand() % 4 == 0) {
                            cout << "获得一瓶经验药水" << endl;
                            bag[22] += 1;
                        }
                        else if (rand() % 4 == 1) {
                            cout << "获得一瓶攻击药水" << endl;
                            bag[21] += 1;
                        }
                        else if (rand() % 4 == 2) {
                            cout << "获得一瓶生命药水" << endl;
                            bag[19] += 1;
                        }
                        else {
                            cout << "获得一瓶防御药水" << endl;
                            bag[20] += 1;
                        }
                    }
                }
            }
            break;
        case 1:
            if (camp) {
                int f;
                cout << "你遇到了一个警察" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("警察", 2000, 500, 15, 15, 1000);
                    if (!dead && rand() % 3 != 0) {
                        if (rand() % 5 == 0) {
                            cout << "获得两瓶经验药水" << endl;
                            bag[22] += 2;
                        }
                        else if (rand() % 5 == 1) {
                            cout << "获得两瓶攻击药水" << endl;
                            bag[21] += 2;
                        }
                        else if (rand() % 5 == 2) {
                            cout << "获得两瓶生命药水" << endl;
                            bag[19] += 2;
                        }
                        else if (rand() % 5 == 3) {
                            cout << "获得一瓶全幅药水" << endl;
                            bag[23] += 1;
                        }
                        else {
                            cout << "获得两瓶防御药水" << endl;
                            bag[20] += 2;
                        }
                    }
                }
            }
            else {
                int f;
                cout << "你遇到了一个小食死徒" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("食死徒", 2000, 500, 15, 15, 1000);
                    if (!dead && rand() % 3 != 0) {
                        if (rand() % 5 == 0) {
                            cout << "获得两瓶经验药水" << endl;
                            bag[22] += 2;
                        }
                        else if (rand() % 5 == 1) {
                            cout << "获得两瓶攻击药水" << endl;
                            bag[21] += 2;
                        }
                        else if (rand() % 5 == 2) {
                            cout << "获得两瓶生命药水" << endl;
                            bag[19] += 2;
                        }
                        else if (rand() % 5 == 3) {
                            cout << "获得一瓶全幅药水" << endl;
                            bag[23] += 1;
                        }
                        else {
                            cout << "获得两瓶防御药水" << endl;
                            bag[20] += 2;
                        }
                    }
                }
            }
            break;
        case 2:
            if (camp) {
                int f;
                cout << "你遇到了一个凤凰社成员" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("凤凰社成员", 5000, 700, 50, 16, 1500);
                    if (!dead && rand() % 4 != 0) {
                        if (rand() % 5 == 0) {
                            cout << "获得三瓶经验药水" << endl;
                            bag[22] += 3;
                        }
                        else if (rand() % 5 == 1) {
                            cout << "获得三瓶攻击药水" << endl;
                            bag[21] += 3;
                        }
                        else if (rand() % 5 == 2) {
                            cout << "获得三瓶生命药水" << endl;
                            bag[19] += 3;
                        }
                        else if (rand() % 5 == 3) {
                            cout << "获得两瓶全幅药水" << endl;
                            bag[23] += 2;
                        }
                        else {
                            cout << "获得三瓶防御药水" << endl;
                            bag[20] += 3;
                        }
                    }
                }
            }
            else {
                int f;
                cout << "你遇到了一个真食死徒" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("食死徒", 5000, 700, 50, 15, 1500);
                    if (!dead && rand() % 4 != 0) {
                        if (rand() % 5 == 0) {
                            cout << "获得三瓶经验药水" << endl;
                            bag[22] += 3;
                        }
                        else if (rand() % 5 == 1) {
                            cout << "获得三瓶攻击药水" << endl;
                            bag[21] += 3;
                        }
                        else if (rand() % 5 == 2) {
                            cout << "获得三瓶生命药水" << endl;
                            bag[19] += 3;
                        }
                        else if (rand() % 5 == 3) {
                            cout << "获得两瓶全幅药水" << endl;
                            bag[23] += 2;
                        }
                        else {
                            cout << "获得三瓶防御药水" << endl;
                            bag[20] += 3;
                        }
                    }
                }
            }
            break;
        case 3:
            if (camp) {
                int f;
                cout << "你遇到了一个傲罗·穆迪" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("穆迪", 10000, 1200, 250, 17, 2000);
                    if (!dead) {
                        if (rand() % 3) {
                            if (rand() % 2) {
                                cout << "获得技能书神锋无影" << endl;
                                bag[9]++;
                            }
                            else {
                                cout << "获得技能书快快复苏" << endl;
                                bag[6]++;
                            }
                        }
                        if (rand() % 4) {
                            if (rand() % 5 == 0) {
                                cout << "获得四瓶经验药水" << endl;
                                bag[22] += 4;
                            }
                            else if (rand() % 5 == 1) {
                                cout << "获得四瓶攻击药水" << endl;
                                bag[21] += 4;
                            }
                            else if (rand() % 5 == 2) {
                                cout << "获得四瓶生命药水" << endl;
                                bag[19] += 4;
                            }
                            else if (rand() % 5 == 3) {
                                cout << "获得三瓶全幅药水" << endl;
                                bag[23] += 3;
                            }
                            else {
                                cout << "获得四瓶防御药水" << endl;
                                bag[20] += 4;
                            }
                        }
                    }
                }
            }
            else {
                int f;
                cout << "你遇到了卢修斯·马尔福" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("马尔福", 10000, 1200, 250, 17, 2000);
                    if (!dead) {
                        if (rand() % 3) {
                            if (rand() % 2) {
                                cout << "获得技能书神锋无影" << endl;
                                bag[9]++;
                            }
                            else {
                                cout << "获得技能书快快复苏" << endl;
                                bag[6]++;
                            }
                        }
                        if (rand() % 4) {
                            if (rand() % 5 == 0) {
                                cout << "获得四瓶经验药水" << endl;
                                bag[22] += 4;
                            }
                            else if (rand() % 5 == 1) {
                                cout << "获得四瓶攻击药水" << endl;
                                bag[21] += 4;
                            }
                            else if (rand() % 5 == 2) {
                                cout << "获得四瓶生命药水" << endl;
                                bag[19] += 4;
                            }
                            else if (rand() % 5 == 3) {
                                cout << "获得三瓶全幅药水" << endl;
                                bag[23] += 3;
                            }
                            else {
                                cout << "获得四瓶防御药水" << endl;
                                bag[20] += 4;
                            }
                        }
                    }
                }
            }
            if (!dead)
                if (ane1 == 2) D_Of_C1++;
            break;
        case 4:
            if (camp) {
                int f;
                cout << "你遇到了卢平" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("卢平", 100000, 12000, 2500, 17, 4000);
                    if (!dead) {
                        if (rand() % 3) {
                            if (rand() % 2) {
                                cout << "获得技能书恢复如初" << endl;
                                bag[12]++;
                            }
                            else {
                                cout << "获得技能书阿瓦达索命" << endl;
                                bag[18]++;
                            }
                        }
                        if (rand() % 5) {
                            if (rand() % 5 == 0) {
                                cout << "获得四瓶经验药水" << endl;
                                bag[22] += 4;
                            }
                            else if (rand() % 5 == 1) {
                                cout << "获得四瓶攻击药水" << endl;
                                bag[21] += 4;
                            }
                            else if (rand() % 5 == 2) {
                                cout << "获得四瓶生命药水" << endl;
                                bag[19] += 4;
                            }
                            else if (rand() % 5 == 3) {
                                cout << "获得三瓶全幅药水" << endl;
                                bag[23] += 3;
                            }
                            else {
                                cout << "获得四瓶防御药水" << endl;
                                bag[20] += 4;
                            }
                        }
                    }
                }
            }
            else {
                int f;
                cout << "你遇到了食死徒·卡卡洛夫" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("卡卡洛夫", 100000, 12000, 2500, 170, 4000);
                    if (!dead) {
                        if (rand() % 3) {
                            if (rand() % 2) {
                                cout << "获得技能书恢复如初" << endl;
                                bag[12]++;
                            }
                            else {
                                cout << "获得技能书阿瓦达索命" << endl;
                                bag[18]++;
                            }
                        }
                        if (rand() % 5) {
                            if (rand() % 5 == 0) {
                                cout << "获得四瓶经验药水" << endl;
                                bag[22] += 4;
                            }
                            else if (rand() % 5 == 1) {
                                cout << "获得四瓶攻击药水" << endl;
                                bag[21] += 4;
                            }
                            else if (rand() % 5 == 2) {
                                cout << "获得四瓶生命药水" << endl;
                                bag[19] += 4;
                            }
                            else if (rand() % 5 == 3) {
                                cout << "获得三瓶全幅药水" << endl;
                                bag[23] += 3;
                            }
                            else {
                                cout << "获得四瓶防御药水" << endl;
                                bag[20] += 4;
                            }
                        }
                    }
                }
            }
            break;
        case 5:
            if (camp) {
                int f;
                cout << "你遇到了邓布利多" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("邓布利多", 300000, 36000, 7500, 20, 5000);
                    if (!dead) {
                        if (rand() % 3) {
                            if (rand() % 2) {
                                cout << "获得技能书恢复如初" << endl;
                                bag[12]++;
                            }
                            else {
                                cout << "获得技能书阿瓦达索命" << endl;
                                bag[18]++;
                            }
                        }
                        if (rand() % 5) {
                            if (rand() % 5 == 0) {
                                cout << "获得四瓶经验药水" << endl;
                                bag[22] += 4;
                            }
                            else if (rand() % 5 == 1) {
                                cout << "获得四瓶攻击药水" << endl;
                                bag[21] += 4;
                            }
                            else if (rand() % 5 == 2) {
                                cout << "获得四瓶生命药水" << endl;
                                bag[19] += 4;
                            }
                            else if (rand() % 5 == 3) {
                                cout << "获得三瓶全幅药水" << endl;
                                bag[23] += 3;
                            }
                            else {
                                cout << "获得四瓶防御药水" << endl;
                                bag[20] += 4;
                            }
                        }
                    }
                }
            }
            else {
                int f;
                cout << "你遇到了纳尼吉" << endl;
                cout << "1进攻/2逃跑" << endl;
                cin >> f;
                if (f == 1) {
                    fight("纳尼吉", 300000, 36000, 7500, 20, 5000);
                    if (!dead) {
                        if (rand() % 3) {
                            if (rand() % 2) {
                                cout << "获得技能书恢复如初" << endl;
                                bag[12]++;
                            }
                            else {
                                cout << "获得技能书阿瓦达索命" << endl;
                                bag[18]++;
                            }
                        }
                        if (rand() % 5) {
                            if (rand() % 5 == 0) {
                                cout << "获得四瓶经验药水" << endl;
                                bag[22] += 4;
                            }
                            else if (rand() % 5 == 1) {
                                cout << "获得四瓶攻击药水" << endl;
                                bag[21] += 4;
                            }
                            else if (rand() % 5 == 2) {
                                cout << "获得四瓶生命药水" << endl;
                                bag[19] += 4;
                            }
                            else if (rand() % 5 == 3) {
                                cout << "获得三瓶全幅药水" << endl;
                                bag[23] += 3;
                            }
                            else {
                                cout << "获得四瓶防御药水" << endl;
                                bag[20] += 4;
                            }
                        }
                    }
                }
            }
            if (!dead)
                if (ane1 == 0) D_Of_C1++;
            break;
        }
        Sleep(1000);
        return 0;
    }
    int buy(int p, int m)
    {
        if (money < m) {
            cout << "没钱,打出去!" << endl;
            if (camp) {
                cout << "1抢劫 2逃离" << endl;
                int a;
                cin >> a;
                if (a == 1) {
                    fight("员工", 1000, 100, 10, 0, 1000);
                    if (dead) return 0;
                    cout << "另外一个员工冲了过来" << endl;
                    fight("员工", 1000, 100, 10, 14, 1000);
                    if (dead) return 0;
                    cout << "另外一个员工冲了过来" << endl;
                    fight("员工", 1000, 100, 10, 14, 2000);
                    if (dead) return 0; 
                    cout << "员工头冲了过来" << endl;
                    fight("员工头", 5000, 5000, 10, 14, 2000);
                    if (dead) return 0; 
                    cout << "店主冲了过来" << endl;
                    fight("店主", 10000, 1000, 100, 15, 4000);
                    if (dead) return 0; 
                    cout << "获得100元" << endl;
                    money += 100;
                    if (rand() % 10 < 3) {
                        Sleep(3000);
                        cout << "你翻了半天,终于找到了你要卖的东西" << endl;
                        bag[p]++;
                    }
                    else {
                        Sleep(3000);
                        cout << "你翻了半天,还是没找到你要卖的东西" << endl;
                        cout << "你要不要到大街上消消气(杀人)" << endl;
                        cout << "1要! 2不必了" << endl;
                        int q;
                        cin >> q;
                        if (q == 1) street(); 
                    }
                }
            }
        }
        else {
            cout << "购买成功" << endl;
            bag[p]++;
            money -= m;
            if (ane == 1) D_Of_C++; 
            if (ane1 == 1) D_Of_C1 += m; 
        }
        Sleep(1000);
        return 0;
    }
    int buywand(int p, int m)
    {
        if (money < m) cout << "没钱,打出去!" << endl;
        else {
            cout << "购买成功" << endl;
            wand[p - 6]++;
            money -= m;
            if (ane == 1) D_Of_C++;
            if (ane1 == 1) D_Of_C1 += m;
        }
        Sleep(1000);
        return 0;
    }
    int make(int w1, int w2, int c1, int c2)
    {
        if (w1 < 24 || w2 < 33) {
            cout << "根本就没有这种材料,你眼瞎啊!" << endl;
            Sleep(1000);
            return 0;
        }
        if (c1 == 0||c2 == 0) {
            cout << "你想拿0个材料来造魔杖!没门!" << endl;
            Sleep(1000);
            return 0;
        }
        if (bag[w1] < c1) {
            if (bag[w2] < c2) cout << "你木材和杖芯都不够"; 
            else cout << "杖芯不够"; 
        }
        else if (bag[w2] < c2) cout << "木材不够"; 
        else {
            cout << "制作成功" << endl;
            string wn;
            wn = Material1name[w1 - 24] + Material2name[w2 - 33] + "魔杖";
            bag[w1] -= c1;
            bag[w2] -= c2;
            wand[wandi++]++;
            wandpower[wandpoweri++] = c1 * 20 * (w1 - 4) + c1 * 10 * (w2 - 13);
            wandname[wandnamei++] = wn; 
        }
        Sleep(1000);
        return 0;
    }
    int levelup()
    {
        if (experience >= level * 100) {
            experience -= level * 100;
            level++;
            maxhealth += 100; health += 100; attack += 10; defense += 5; speed += 10;
            if (rand() % 2 && level > 4) bag[0] += 1; 
            cout << "你升了1级" << endl;
            levelup();
            if (ane1 == 4) D_Of_C1++; 
        }
        return 0;
    }
    int Hos()
    {
        int a;
        if (health < maxhealth) {
            cout << "剩余生命:(" << health << "/" << maxhealth << ")" << endl;
            cout << "需要" << ((maxhealth) - health) / 16 << "元 是否恢复. 等级小于等于10免费恢复" << endl;
            cout << "1,是 2,否" << endl;
            cin >> a;
            if (a == 1) {
                if (level > 10) {
                    if (money >= ((maxhealth) - health) / 16) {
                        money -= ((maxhealth) - health) / 16;
                        cout << "恢复成功\n剩余:" << money << "元";
                        if (ane == 2) D_Of_C++; 
                        if (ane1 == 1) D_Of_C1 += ((maxhealth) - health) / 16;
                        health = maxhealth;
                    }
                    else cout << "钱不足" << endl; 
                }
                else {
                    health = maxhealth;
                    cout << "恢复成功" << endl;
                    if (ane == 2) D_Of_C++; 
                }
            }
            else if (a == 2) return 0; 
            else {
                cout << "请别乱输";
                Hos();
            }
        }
        else {
            cout << "生命已满";
            Sleep(1000);
        }
        return 0;
    }
    int w()
    {
        int aaaa = 1;
        while (aaaa) {
            for (int i = 0; i < wandi; i++) {
                if (wandname[i] == Nwand) cout << "o"; 
                else cout << " "; 
                cout << i + 1 << "," << wandname[i] << " " << wand[i] << "个" << "  力量:" << wandpower[i] << endl;
            }
            cout << "1,装备魔杖 2,卸下现有魔杖 0,退出" << endl;
            cin >> aaaa;
            if (aaaa == 1) {
                cout << "请输入魔杖编号" << endl;
                int bbbb;
                cin >> bbbb;
                if (wand[bbbb - 1]) {
                    if (Nwand != "空手") {
                        cout << "已装备魔杖";
                        Sleep(1000);
                    }
                    else {
                        cout << "装备成功";
                        Nwand = wandname[bbbb - 1];
                        attack += wandpower[bbbb - 1];
                    }
                }
                else {
                    cout << "您还未拥有此魔杖";
                }
                Sleep(1000);
            }
            else if (aaaa == 2) {
                for (int ia = 0; ia < wandi - 1; ia++) {
                    if (Nwand == wandname[ia]) {
                        cout << "成功卸下";
                        attack -= wandpower[ia];
                        break;
                    }
                }
                Nwand = "空手";
                Sleep(1000);
            }
            else if (aaaa == 0) break; 
            else cout << "请别乱输"; 
            levelup();
            system("cls");
            cout << "魔法人士:" << name << endl;
            cout << "势力:";
            if (camp) cout << "伏地魔" << endl; 
            else cout << "哈利波特" << endl; 
            cout << "生命:" << health << "/" << maxhealth << endl;
            cout << "攻击:" << attack << endl;
            cout << "防御:" << defense << endl;
            cout << "速度:" << speed << endl;
            cout << "等级:" << level << endl;
            cout << "经验:" << experience << "/" << level * 100 << endl;
            cout << "金币:" << money << endl;
            cout << "1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,";
            if (camp) cout << "霍格沃茨(哈利波特不在) "; 
            else cout << "伏地魔总部(伏地魔不在) "; 
            cout << "4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,材料店 11,任务 12,终极任务 13,副本 14,保存 ";
            if (camp) cout << "15, 医疗兵(伏地魔的)"; 
            else cout << "15, 庞弗雷女士 "; 
            cout << "16,改变参数(测试专用 需要密码) 17,设置 18,登出" << endl;
            cout << "8" << endl;
            cout << "1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能" << endl;
            cout << "1" << endl;
        }
        return 0;
    }
    int e()
    {
        int bbbb = 1;
        while (bbbb) {
            cout << "1,经验石R " << bag[1] << "个" << endl;
            cout << "2,经验石SR " << bag[2] << "个" << endl;
            cout << "3,经验石SSR " << bag[3] << "个" << endl;
            cout << "4,经验石SSS " << bag[4] << "个" << endl;
            cout << "5,经验石X " << bag[5] << "个" << endl;
            cout << "0,退出 6,一键使用";
            int aaaa;
            cin >> bbbb;
            switch (bbbb)
            {
            case 1:
                cout << "几个?";
                cin >> aaaa;
                if (bag[1] >= aaaa) {
                    cout << "服用成功";
                    experience += aaaa * 100;
                    bag[1] -= aaaa;
                    Sleep(1000);
                    break;
                }
                break;
            case 2:
                cout << "几个?";
                cin >> aaaa;
                if (bag[2] >= aaaa) {
                    cout << "服用成功";
                    experience += aaaa * 250;
                    bag[2] -= aaaa;
                    Sleep(1000);
                    break;
                }
                break;
            case 3:
                cout << "几个?";
                cin >> aaaa;
                if (bag[3] >= aaaa) {
                    cout << "服用成功";
                    experience += aaaa * 500;
                    bag[3] -= aaaa;
                    Sleep(1000);
                    break;
                }
                break;
            case 4:
                cout << "几个?";
                cin >> aaaa;
                if (bag[4] >= aaaa) {
                    cout << "服用成功";
                    experience += aaaa * 1200;
                    bag[4] -= aaaa;
                    Sleep(1000);
                    break;
                }
                break;
            case 5:
                cout << "几个?";
                cin >> aaaa;
                if (bag[5] >= aaaa) {
                    cout << "服用成功";
                    experience += aaaa * 2500;
                    bag[5] -= aaaa;
                    Sleep(1000);
                    break;
                }
                break;
            case 0:
                break;
            case 6:
                cout << "服用成功";
                experience += bag[1] * 100;
                experience += bag[2] * 250;
                experience += bag[3] * 500;
                experience += bag[4] * 1200;
                experience += bag[5] * 2500;
                bag[1] = bag[2] = bag[3] = bag[4] = bag[5] = 0;
                break;
            default:
                cout << "请别乱输";
                Sleep(1000);
                break;
            }
            levelup();
            system("cls");
            cout << "魔法人士:" << name << endl;
            cout << "势力:";
            if (camp) cout << "伏地魔" << endl; 
            else cout << "哈利波特" << endl; 
            cout << "生命:" << health << "/" << maxhealth << endl;
            cout << "攻击:" << attack << endl;
            cout << "防御:" << defense << endl;
            cout << "速度:" << speed << endl;
            cout << "等级:" << level << endl;
            cout << "经验:" << experience << "/" << level * 100 << endl;
            cout << "金币:" << money << endl;
            cout << "1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,";
            if (camp) cout << "霍格沃茨(哈利波特不在) "; 
            else cout << "伏地魔总部(伏地魔不在) "; 
            cout << "4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,材料店 11,任务 12,终极任务 13,副本 14,保存 ";
            if (camp) cout << "15, 医疗兵(伏地魔的)"; 
            else cout << "15, 庞弗雷女士 ";
            cout << "16,改变参数(测试专用 需要密码) 17,设置 18,登出" << endl;
            cout << "8" << endl;
            cout << "1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能" << endl;
            cout << "3" << endl;
        }
        return 0;
    }
    int p()
    {
        int bbbb = 1;
        while (bbbb) {
            cout << "1,生命药水 " << bag[19] << "个" << endl;
            cout << "2,防御药水 " << bag[20] << "个" << endl;
            cout << "3,攻击药水 " << bag[21] << "个" << endl;
            cout << "4,经验药水 " << bag[22] << "个" << endl;
            cout << "5,速度药水 " << bag[23] << "个" << endl;
            cout << "6,全幅药水 " << bag[23] << "个" << endl;
            cout << "0,退出 7,一键使用";
            cin >> bbbb;
            int aaaa;
            switch (bbbb)
            {
            case 1:
                cout << "几个?";
                cin >> aaaa;
                if (bag[19] >= aaaa) {
                    cout << "服用成功";
                    health += aaaa * 50;
                    maxhealth += aaaa * 50;
                    bag[19] -= aaaa;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 2:
                cout << "几个?";
                cin >> aaaa;
                if (bag[20] >= aaaa) {
                    cout << "服用成功";
                    defense += aaaa * 10;
                    bag[20] -= aaaa;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 3:
                cout << "几个?";
                cin >> aaaa;
                if (bag[21] >= aaaa) {
                    cout << "服用成功";
                    attack += aaaa * 25;
                    bag[21] -= aaaa;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 4:
                cout << "几个?";
                cin >> aaaa;
                if (bag[22] >= aaaa) {
                    cout << "服用成功";
                    experience += aaaa * 200;
                    bag[22] -= aaaa;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 5:
                cout << "几个?";
                cin >> aaaa;
                if (bag[43] >= aaaa) {
                    cout << "服用成功";
                    speed += aaaa;
                    bag[43] -= aaaa;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 6:
                cout << "几个?";
                cin >> aaaa;
                if (bag[23] >= aaaa) {
                    cout << "服用成功";
                    health += aaaa * 50;
                    maxhealth += aaaa * 50;
                    defense += aaaa * 10;
                    attack += aaaa * 25;
                    experience += aaaa * 200;
                    speed += aaaa;
                    bag[23] -= aaaa;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl;
                break;
            case 7:
                cout << "服用成功";
                health += bag[19] * 50;
                maxhealth += bag[19] * 50;
                defense += bag[20] * 10;
                attack += bag[21] * 25;
                experience += bag[22] * 200;
                speed += bag[43];
                health += bag[23] * 50;
                maxhealth += bag[23] * 50;
                defense += bag[23] * 10;
                attack += bag[23] * 25;
                experience += bag[23] * 200;
                speed += bag[23];
                bag[19] = 0;
                bag[20] = 0;
                bag[21] = 0;
                bag[22] = 0;
                bag[23] = 0;
                bag[43] = 0;
                break;
            case 0:
                break;
            default:
                cout << "请别乱输";
                Sleep(1000);
                break;
            }
            levelup();
            system("cls");
            cout << "魔法人士:" << name << endl;
            cout << "势力:";
            if (camp) cout << "伏地魔" << endl; 
            else cout << "哈利波特" << endl; 
            cout << "生命:" << health << "/" << maxhealth << endl;
            cout << "攻击:" << attack << endl;
            cout << "防御:" << defense << endl;
            cout << "速度:" << speed << endl;
            cout << "等级:" << level << endl;
            cout << "经验:" << experience << "/" << level * 100 << endl;
            cout << "金币:" << money << endl;
            cout << "1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,";
            if (camp) cout << "霍格沃茨(哈利波特不在) "; 
            else cout << "伏地魔总部(伏地魔不在) "; 
            cout << "4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,材料店 11,任务 12,终极任务 13,副本 14,保存 ";
            if (camp) cout << "15, 医疗兵(伏地魔的)"; 
            else cout << "15, 庞弗雷女士 "; 
            cout << "16,改变参数(测试专用 需要密码) 17,设置 18,登出" << endl;
            cout << "8" << endl;
            cout << "1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能" << endl;
            cout << "2" << endl;
        }
        return 0;
    }
    int s()
    {
        int bbbb = 1;
        while (bbbb) {
            cout << "1,快快复苏 " << bag[6] << "个" << endl;
            cout << "2,盔甲护身 " << bag[7] << "个" << endl;
            cout << "3,昏昏倒地 " << bag[8] << "个" << endl;
            cout << "4,神锋无影 " << bag[9] << "个" << endl;
            cout << "5,咒立停 " << bag[10] << "个" << endl;
            cout << "6,统统石化 " << bag[11] << "个" << endl;
            cout << "7,恢复如初 " << bag[12] << "个" << endl;
            cout << "8,召唤咒 " << bag[13] << "个" << endl;
            cout << "9,一忘皆空 " << bag[14] << "个" << endl;
            cout << "10,万箭齐发 " << bag[15] << "个" << endl;
            cout << "11,钻心剜骨 " << bag[16] << "个" << endl;
            cout << "12,魂魄出窍 " << bag[17] << "个" << endl;
            cout << "13,阿瓦达索命 " << bag[18] << "个" << endl;
            cout << "0,退出";
            cin >> bbbb;
            switch (bbbb)
            {
            case 1:
                if (bag[6] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "能够恢复200滴血" << endl;
                    bag[6] -= 1;
                    Sl[0] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 2:
                if (bag[7] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "能恢复100滴血并加50防御" << endl;
                    bag[7] -= 1;
                    Sl[1] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl;
                break;
            case 3:
                if (bag[8] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "能使对方暂停一回合" << endl;
                    bag[8] -= 1;
                    Sl[2] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 4:
                if (bag[9] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "攻击加250并扣对方500滴血" << endl;
                    bag[9] -= 1;
                    Sl[3] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 5:
                if (bag[10] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "能使对方对你施加的状态没用" << endl;
                    bag[10] -= 1;
                    Sl[4] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 6:
                if (bag[11] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "%10概率能事对方冻结10回合" << endl;
                    cout << "%90概率能事对方冻结2回合" << endl;
                    bag[11] -= 1;
                    Sl[5] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 7:
                if (bag[12] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "%50概率能起死回生" << endl;
                    bag[12] -= 1;
                    Sl[6] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 8:
                if (bag[13] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "能召唤生物进攻" << endl;
                    bag[13] -= 1;
                    Sl[7] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 9:
                if (bag[14] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "%90能使对方无技能" << endl;
                    cout << "%10能使对方防御变为0" << endl;
                    bag[14] -= 1;
                    Sl[8] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 10:
                if (bag[15] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "对方一直减10滴血直到对方躲过(%10躲过)" << endl;
                    bag[15] -= 1;
                    Sl[9] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 11:
                if (bag[16] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "对方扣血5回合,每回合扣200滴" << endl;
                    bag[16] -= 1;
                    Sl[10] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 12:
                if (bag[17] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "让对方自己攻击自己(当然不攻击你)" << endl;
                    bag[17] -= 1;
                    Sl[11] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 13:
                if (bag[18] >= 1) {
                    cout << "学习成功" << endl;
                    cout << "让对方直接扣3/4的血" << endl;
                    bag[18] -= 1;
                    Sl[12] = 1;
                    Sleep(1000);
                    break;
                }
                else cout << "物品不足" << endl; 
                break;
            case 0:
                break;
            default:
                cout << "请别乱输";
                Sleep(1000);
                break;
            }
            system("cls");
            cout << "魔法人士:" << name << endl;
            cout << "势力:";
            if (camp) cout << "伏地魔" << endl;
            else cout << "哈利波特" << endl; 
            cout << "生命:" << health << "/" << maxhealth << endl;
            cout << "攻击:" << attack << endl;
            cout << "防御:" << defense << endl;
            cout << "速度:" << speed << endl;
            cout << "等级:" << level << endl;
            cout << "经验:" << experience << "/" << level * 100 << endl;
            cout << "金币:" << money << endl;
            cout << "1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,";
            if (camp) cout << "霍格沃茨(哈利波特不在) "; 
            else cout << "伏地魔总部(伏地魔不在) "; 
            cout << "4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,材料店 11,任务 12,终极任务 13,副本 14,保存 ";
            if (camp) cout << "15, 医疗兵(伏地魔的)"; 
            else cout << "15, 庞弗雷女士 "; 
            cout << "16,改变参数(测试专用 需要密码) 17,设置 18,登出" << endl;
            cout << "8" << endl;
            cout << "1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能" << endl;
            cout << "4" << endl;
        }
        return 0;
    }
    int LD()
    {
        cout << "剩余抽奖券:" << bag[0] << "张" << endl;
        cout << "1,抽奖 2,退出" << endl;
        int a;
        cin >> a;
        if (a == 1) {
            cout << "抽几次?";
            int num;
            cin >> num;
            if (bag[0] >= num) {
                bag[0] -= num;
                int num1 = 0, num2 = 0, num3 = 0, num4 = 0, num5 = 0;
                int num6 = 0, num7 = 0, num8 = 0, num9 = 0, num10 = 0;
                int num11 = 0;
                for (int i = 0; i < num; i++)
                {
                    switch (rand() % 20)
                    {
                    case 0:
                    case 1:
                        num1++;
                        bag[1]++;
                        break;
                    case 2:
                    case 3:
                        num2++;
                        bag[2]++;
                        break;
                    case 4:
                    case 5:
                        num3++;
                        bag[3]++;
                        break;
                    case 6:
                    case 7:
                        num4++;
                        bag[4]++;
                        break;
                    case 8:
                        num5++;
                        bag[5]++;
                        break;
                    case 9:
                    case 10:
                        num6++;
                        bag[19]++;
                        break;
                    case 11:
                    case 12:
                        num7++;
                        bag[20]++;
                        break;
                    case 13:
                    case 14:
                        num8++;
                        bag[21]++;
                        break;
                    case 15:
                    case 16:
                        num9++;
                        bag[22]++;
                        break;
                    case 17:
                        num10++;
                        bag[23]++;
                        break;
                    case 18:
                        num11 += 50;
                        money += 50;
                        break;
                    case 19:
                        num11 += 100;
                        money += 100;
                        break;
                    }
                }
                cout << "你获得了经验石R   " << num1 << "个" << endl;
                cout << "经验石SR         " << num2 << "个" << endl;
                cout << "经验石SSR        " << num3 << "个" << endl;
                cout << "经验石SSS        " << num4 << "个" << endl;
                cout << "经验石X          " << num5 << "个" << endl;
                cout << "生命药水         " << num6 << "个" << endl;
                cout << "防御药水         " << num7 << "个" << endl;
                cout << "攻击药水         " << num8 << "个" << endl;
                cout << "经验药水         " << num9 << "个" << endl;
                cout << "全幅药水         " << num10 << "个" << endl;
                cout << "金币             " << num11 << "个" << endl;
            }
            else cout << "您的抽奖券不足" << endl; 
        }
        else if (a == 2) return 0; 
        else {
            cout << "请别乱输。";
            system("cls");
            LD();
        }
        _getch();
        return 0;
    }
    int dig()
    {
        cout << "进入挖矿状态";
        Sleep(1000);
        system("cls");
        int x = 0;
        while (1) {
            system("cls");
            cout << "挖";Sleep(200);
            cout << "矿";Sleep(200);
            cout << "中";Sleep(200);
            cout << ".";Sleep(100);
            cout << ".";Sleep(100);
            cout << "." << endl;
            x++;Sleep(500);
            int ad = rand() % 3;
            if (ad == 2) {
                ad = rand() % 100;
                if (ad < 6) {
                    switch (rand() % 3)
                    {
                    case 0:
                        cout << "你挖到了技能书铁甲咒!!!" << endl;
                        bag[7]++;
                        break;
                    case 1:
                        cout << "你挖到了技能书咒立停!!!" << endl;
                        bag[10]++;
                        break;
                    case 2:
                        cout << "你挖到了技能书石化咒!!!" << endl;
                        bag[11]++;
                        break;
                    }
                    Sleep(500);
                }
                else if (ad >= 6 && ad < 20) {
                    switch (rand() % 20)
                    {
                    case 0:
                        cout << "你挖到了夜琪的尾羽!!!" << endl;
                        bag[32]++;
                        break;
                    case 1:
                    case 2:
                        cout << "你挖到了独角兽尾毛!" << endl;
                        bag[30]++;
                        break;
                    case 3:
                    case 4:
                        cout << "你挖到了龙神经!" << endl;
                        bag[31]++;
                        break;
                    case 5:
                    case 6:
                        cout << "你挖到了凤凰羽毛!" << endl;
                        bag[29]++;
                        break;
                    case 7:
                    case 8:
                        cout << "你挖到了龙心腱" << endl;
                        bag[27]++;
                        break;
                    case 9:
                    case 10:
                        cout << "你挖到了雷鸟尾羽" << endl;
                        bag[28]++;
                        break;
                    case 11:
                    case 12:
                    case 13:
                        cout << "你挖到了马形水怪的鬃毛" << endl;
                        bag[26]++;
                        break;
                    case 14:
                    case 15:
                    case 16:
                        cout << "你挖到了猫狸子胡须" << endl;
                        bag[24]++;
                        break;
                    case 17:
                    case 18:
                    case 19:
                        cout << "你挖到了媚娃头发" << endl;
                        bag[25]++;
                        break;
                    }
                    Sleep(500);
                }
                else if (ad >= 20 && ad < 50) {
                    switch (rand() % 10)
                    {
                    case 0:
                        cout << "你挖到了桦木" << endl;
                        bag[33]++;
                        break;
                    case 1:
                        cout << "你挖到了紫衫木" << endl;
                        bag[34]++;
                        break;
                    case 2:
                        cout << "你挖到了冬青木" << endl;
                        bag[35]++;
                        break;
                    case 3:
                        cout << "你挖到了山楂木柳条" << endl;
                        bag[36]++;
                        break;
                    case 4:
                        cout << "你挖到了橡木" << endl;
                        bag[37]++;
                        break;
                    case 5:
                        cout << "你挖到了械木" << endl;
                        bag[38]++;
                        break;
                    case 6:
                        cout << "你挖到了山毛榉木" << endl;
                        bag[39]++;
                        break;
                    case 7:
                        cout << "你挖到了栗木" << endl;
                        bag[40]++;
                        break;
                    case 8:
                        cout << "你挖到了樱桃木" << endl;
                        bag[41]++;
                        break;
                    case 9:
                        cout << "你挖到了桃花心木" << endl;
                        bag[42]++;
                        break;
                    }
                    Sleep(500);
                }
                else if (ad >= 50 && ad <= 100) {
                    int as = rand() % 20 + 30;
                    cout << "你挖到了" << as << "金币" << endl;
                    money += as;
                    Sleep(500);
                }
            }
            else if (ad == 1) {
                ad = rand() % 3;
                if (ad == 0) {
                    cout << "你遇到了大老鼠" << endl;
                    fight("大老鼠", 5000, 500, 50, 20, 1000);
                    if (dead)
                    {
                        cout << "你死了" << endl;
                        return 0;
                    }
                }
                if (ad == 1) {
                    cout<<"你遇到了食死徒" << endl;
                    fight("食死徒", 10000, 1000, 100, 17, 1000);
                    if (dead)
                    {
                        cout << "你死了" << endl;
                        return 0;
                    }
                }
                if (ad == 2) {
                    cout << "你遇到了坏矿工" << endl;
                    fight("矿工", 5000, 2000, 200, 17, 1000);
                    if (dead)
                    {
                        cout << "你死了" << endl;
                        return 0;
                    }
                }
                cout << "是否继续挖矿?" << endl;
                cout << "1,是 2,否" << endl;
                int ans;
                cin >> ans;
                if (ans == 2) return 0;
            }
        }
        return 0;
    }
    int clearance()
    {
        system("cls");
        cout << "你在出口处发现了一张纸条,上面写着:";
        if (camp) {
            cout << "伏地魔,我知道你在找我...我就告诉你吧,我在霍格沃茨等你!" << endl;
            cout << "                                           ————哈利·波特" << endl;
        }
        else {
            cout << "哈利·波特, 你看到这张纸条的时候, 你们的校已经掌握在我手中, 要么你前来送死,要么我就会把你的同们统统杀死!!!"<<endl;
            cout << "                                                                                               ——伏地魔" << endl;
        }
        _getch();
        f = 1;
        return 0;
    }
    int maze()
    {
        bool is[101][101];
        for (int i = 0; i < 100; i++)
            for (int j = 0; j < 100; j++)
                is[i][j] = false;  
        int x = 8, y = 1;
        string a[100] = { 
            "##################################################",
            "# 1   #   2  2 3#  #  1 #89#1#1# 1 1  #12  #3  #1#",
            "#2#1#5  # #1# #   ## # ##91  6   #9#7#11## # # 11#",
            "#   ## ## # # # #### # #####  # ####5##  # # #####",
            "#2########### # 4 #      ##  #####4    5##1# #189o",
            "# 1  1#     #2# ##  # ##   5#    ######### # #7#8#",
            "#1# #1 2# #     #  #9 # ### # ##2## #   ##  5#167#",
            "#  1## ## # # ### #4##  ##  6 #  3  ###   #####5##",
            "I 2 #### #### #  1 6   #1# ##  5###6##  # #11134##",
            "I  1  #      7 # # # #   227# #  #   # #2 #2#21#5#",
            "##1 #1  #1# ## 5 #   # #3####  #  1#5# # 1 111#6 #",
            "#  2##3##1# ### ## ### #    ## ####  # #1####### #",
            "# ##3  ##1###7#    ##### ##  #   ###3  4## 9   # #",
            "#23   #    3   # ##9 ##6 6##   ### 9## ##1 # #3  #",
            "# # #   # # ## # ##    ##7 ## # 9  ###9#11##2## ##",
            "### # #######  # 2 # #3 # # #  1## 1 1## ##1 #3  #",
            "#5  #2   ## # #### # #5#  # ### #8###1   #1# #1# #",
            "# # # #   # # 4 5  # #  # 7   # # #   ####  8  #9#",
            "#   2 # #42   # ##    # 11#2#3   9  # ##9  # #999#",
            "##################################################",
            };
        while (1) {
            is[x - 1][y - 1] = true;
            is[x - 1][y] = true;
            is[x - 1][y + 1] = true;
            is[x][y - 1] = true;
            is[x][y] = true;
            is[x][y + 1] = true;
            is[x + 1][y - 1] = true;
            is[x + 1][y] = true;
            is[x + 1][y + 1] = true;
            system("cls");
            cout << "生命:" << health << "/" << maxhealth << endl;
            for (int i = 0; i < 20; i++) {
                for (int j = 0; j < 50; j++) {
                    if (is[i][j]) cout << a[i][j]; 
                    else cout << "0"; 
                }
                cout << endl;
            }
            int ch;
            ch = _getch();
            if (ch == 'a') {
                if (a[x][y - 1] == ' ')
                {
                    a[x][y - 1] = '@';
                    a[x][y] = ' ';
                    y -= 1;
                }
                else if ('0' <= a[x][y - 1] && a[x][y - 1] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x][y - 1] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 10000 * (a[x][y - 1] - '0'), 2500 * (a[x][y - 1] - '0'), 100 * (a[x][y - 1] - '0'), 20, 500 * (a[x][y - 1] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x][y - 1] = '@';
                    a[x][y] = ' ';
                    y -= 1;
                    a[x][y] = ' ';
                }
                else if (a[x][y - 1] == 'I')
                {
                    cout << "你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x][y - 1] == 'o')
                {
                    cout << "你通关了" << endl;
                    _getch();
                    clearance();
                }
            }
            if (ch == 'd') {
                if (a[x][y + 1] == ' ')
                {
                    a[x][y + 1] = '@';
                    a[x][y] = ' ';
                    y += 1;
                }
                else if ('0' <= a[x][y + 1] && a[x][y + 1] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x][y + 1] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 10000 * (a[x][y + 1] - '0'), 2500 * (a[x][y + 1] - '0'), 100 * (a[x][y + 1] - '0'), 20, 500 * (a[x][y + 1] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x][y + 1] = '@';
                    a[x][y] = ' ';
                    y += 1;
                    a[x][y] = ' ';
                }
                else if (a[x][y + 1] == 'I')
                {
                    cout << "你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x][y + 1] == 'o')
                {
                    cout << "你通关了" << endl;
                    _getch();
                    clearance();
                }
            }
            if (ch == 'w') {
                if (a[x - 1][y] == ' ')
                {
                    a[x - 1][y] = '@';
                    a[x][y] = ' ';
                    x -= 1;
                }
                else if ('0' <= a[x - 1][y] && a[x - 1][y] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x - 1][y] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 10000 * (a[x - 1][y] - '0'), 2500 * (a[x - 1][y] - '0'), 100 * (a[x - 1][y] - '0'), 20, 500 * (a[x - 1][y] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x - 1][y] = '@';
                    a[x][y] = ' ';
                    x -= 1;
                    a[x][y] = ' ';
                }
                else if (a[x - 1][y] == 'I')
                {
                    cout << "你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x - 1][y] == 'o')
                {
                    cout << "你通关了" << endl;
                    _getch();
                    clearance();
                }
            }
            if (ch == 's') {
                if (a[x + 1][y] == ' ')
                {
                    a[x + 1][y] = '@';
                    a[x][y] = ' ';
                    x += 1;
                }
                else if ('0' <= a[x + 1][y] && a[x + 1][y] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x + 1][y] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 10000 * (a[x + 1][y] - '0'), 2500 * (a[x + 1][y] - '0'), 100 * (a[x + 1][y] - '0'), 20, 500 * (a[x + 1][y] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x + 1][y] = '@';
                    a[x][y] = ' ';
                    x += 1;
                    a[x][y] = ' ';
                }
                else if (a[x + 1][y] == 'I')
                {
                    cout << "你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x + 1][y] == 'o')
                {
                    cout << "你通关了" << endl;
                    _getch();
                    clearance();
                }
            }
        }
        return 0;
    }
    int DriveOut()
    {
        switch (rand() % 3)
        {
        case 1:
            cout << "店主:没钱还敢卖!!!打出去!!!" << endl;
            break;
        case 2:
            cout << "店主:什么!没钱!!!" << endl;
            break;
        case 3:
            cout << "你:可不可以降一降价?" << endl;
            cout << "店主:不行!哪有那么简单!" << endl;
            break;
        }
        Sleep(1000);
        return 0;
    }
    int poisonshop()
    {
        system("cls");
        cout << "店主:这位客人,您要卖什么?" << endl;
        cout << "1,购买      |小生命药水+200|     100元" << endl;
        cout << "2,购买     ||大生命药水+500||    200元" << endl;
        cout << "3,购买      |小防御药水 +20|     100元" << endl;
        cout << "4,购买     ||大防御药水 +50||    200元" << endl;
        cout << "5,购买      |小攻击药水+100|     100元" << endl;
        cout << "6,购买     ||大攻击药水+250||    200元" << endl;
        cout << "7,购买        |小全幅药水|       500元" << endl;
        cout << "8,购买       ||中全幅药水||      1000元" << endl;
        cout << "9,购买      |||大全幅药水|||     2000元" << endl;
        cout << "10,购买 *|||||极·全幅药水|||||*  10000元" << endl;
        cout << "你掏了掏自己的钱包,发现有" << money << "元" << endl;
        int which;
        cin >> which;
        switch (which)
        {
        case 1:
            if (money < 100) DriveOut(); 
            else {
                money -= 100;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                health += 200;
                maxhealth += 200;
            }
            break;
        case 2:
            if (money < 200) DriveOut(); 
            else {
                money -= 200;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                health += 500;
                maxhealth += 500;
            }
            break;
        case 3:
            if (money < 100) DriveOut(); 
            else {
                money -= 100;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                defense += 20;
            }
            break;
        case 4:
            if (money < 200) DriveOut(); 
            else {
                money -= 200;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                defense += 50;
            }
            break;
        case 5:
            if (money < 100) DriveOut(); 
            else {
                money -= 100;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                attack += 100;
            }
            break;
        case 6:
            if (money < 200) DriveOut(); 
            else {
                money -= 200;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                attack += 250;
            }
            break;
        case 7:
            if (money < 500) DriveOut(); 
            else {
                money -= 500;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                health += 50;
                defense += 5;
                attack += 25;
                experience += 1000;
            }
            break;
        case 8:
            if (money < 1000) DriveOut(); 
            else {
                money -= 1000;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                health += 150;
                defense += 15;
                attack += 75;
                experience += 3000;
            }
            break;
        case 9:
            if (money < 2000) DriveOut(); 
            else {
                money -= 2000;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                health += 450;
                defense += 45;
                attack += 225;
                experience += 9000;
            }
            break;
        case 10:
            if (money < 10000) DriveOut(); 
            else {
                money -= 10000;
                cout << "店主:一路走好!" << endl;
                cout << "你拿起药水就喝了下去。" << endl;
                health += 2500;
                defense += 250;
                attack += 1250;
                experience += 50000;
            }
            break;
        default:
            break;
        }
        Sleep(1000);
        return 0;
    }
    int bookshop()
    {
        system("cls");
        cout << "店主:这里是巫师们卖书的地方,您要卖什么?" << endl;
        cout << "1,购买  ||||恢复如初技能书||||   40000元  现货大量供应" << endl;
        cout << "2,购买     ||遗忘咒技能书||      10000元  已经售完" << endl;
        cout << "3,购买    |||钻心咒技能书|||     15000元  现货大量供应" << endl;
        cout << "4,购买    |||召唤咒技能书|||     20000元  现货大量供应" << endl;
        cout << "5,购买 *|||||咒立停技能书|||||*  25000元  现货大量供应" << endl;
        cout << "6,购买   ||||夺魂咒技能书||||    20000元  现货大量供应" << endl;
        cout << "7,购买    ||万弹齐发技能书||     15000元  现货大量供应" << endl;
        cout << "你掏了掏自己的钱包,发现有" << money << "元" << endl;
        int which;
        cin >> which;
        switch (which)
        {
        case 1:
            if (money < 40000) DriveOut(); 
            else {
                money -= 40000;
                cout << "店主:一路走好!" << endl;
                bag[12]++;
            }
            break;
        case 2:
            cout << "店主:对不起,本书已经售完" << endl;
            break;
        case 3:
            if (money < 20000) DriveOut(); 
            else {
                money -= 20000;
                cout << "店主:一路走好!" << endl;
                bag[16]++;
            }
            break;
        case 4:
            if (money < 20000) DriveOut(); 
            else {
                money -= 20000;
                cout << "店主:一路走好!" << endl;
                bag[13]++;
            }
            break;
        case 5:
            if (money < 25000) DriveOut(); 
            else {
                money -= 25000;
                cout << "店主:一路走好!" << endl;
                bag[10]++;
            }
            break;
        case 6:
            if (money < 20000) DriveOut(); 
            else {
                money -= 20000;
                cout << "店主:一路走好!" << endl;
                bag[17]++;
            }
            break;
        case 7:
            if (money < 15000) DriveOut(); 
            else {
                money -= 15000;
                cout << "店主:一路走好!" << endl;
                bag[15]++;
            }
            break;
        default:
            break;
        }
        return 0;
    }
    int NoticeBoard(int l, int x, int y)
    {
        if (l == 10 && x == 6 && y == 1) {
            system("cls");
            cout << "跟着'*'走" << endl;
            cout << "     ——作者" << endl;
            _getch();
        }
        if (l == 10 && x == 8 && y == 12) {
            system("cls");
            cout << "走吧,谁叫你不听命令呢..." << endl;
            cout << "                  ——作者" << endl;
            _getch();
        }
        if (l == 12 && x == 3 && y == 1) {
            system("cls");
            cout << "杀出重围!" << endl;
            cout << "      ——作者" << endl;
            _getch();
        }
        if (l == 12 && x < 4 && y == 20) {
            system("cls");
            cout << "恭喜通过一半!往下走继续..." << endl;
            cout << "       ——作者" << endl;
            _getch();
        }
        if (l == 12 && x > 4 && y == 20) {
            system("cls");
            cout << "恭喜通过一半!往上走继续..." << endl;
            cout << "       ——作者" << endl;
            _getch();
        }
        if (l == 12 && x == 10) {
            system("cls");
            cout << "拿走全部奖励吧!" << endl;
            cout << "       ——作者" << endl;
            _getch();
        }
        else {
            system("cls");
            cout << "回去吧,你来错地方了..." << endl;
            _getch();
        }
        return 0;
    }
    int checkpoint(int l)
    {
        bool is[101][101];
        for (int i = 0; i < 100; i++) 
            for (int j = 0; j < 100; j++) 
                is[i][j] = false;
        int x = 1, y = 1;
        string a[100];
        if (l == 1) {
            a[0] = "######";
            a[1] = "I    o";
            a[2] = "######";
        }
        else if (l == 2) {
            a[0] = "#######";
            a[1] = "I    1#";
            a[2] = "#### ##";
            a[3] = "##1  ##";
            a[4] = "#### ##";
            a[5] = "#P    o";
            a[6] = "#######";
        }
        else if (l == 3) {
            a[0] = "#########";
            a[1] = "I #  1#S#";
            a[2] = "# ## ##1#";
            a[3] = "# 2     #";
            a[4] = "#### ## #";
            a[5] = "#P1  #o #";
            a[6] = "#########";
        }
        else if (l == 4) {
            a[0] = "#######o#######";
            a[1] = "I       #P3   #";
            a[2] = "#       ##### #";
            a[3] = "#         1P  #";
            a[4] = "#       ##### #";
            a[5] = "#S      #    2#";
            a[6] = "######### #####";
            a[7] = "#P121 2 1  11P#";
            a[8] = "###############";
        }
        else if (l == 5) {
            a[0] = "###############";
            a[1] = "I 3     #P3   #";
            a[2] = "# 3 #   ##### #";
            a[3] = "# 2 #     1   #";
            a[4] = "# 2 # # ##### #";
            a[5] = "# 1 # #P#    2#";
            a[6] = "#####2S## ###o#";
            a[7] = "#P1 1 # 1   1P#";
            a[8] = "###############";
        }
        else if (l == 6) {
            a[0] = "###############";
            a[1] = "#   11  2  6PP#";
            a[2] = "#2# #P#########";
            a[3] = "#2##### #S#   o";
            a[4] = "I       #2# ###";
            a[5] = "# #####  11 ###";
            a[6] = "# #P##### #####";
            a[7] = "#1112       4P#";
            a[8] = "###############";
            x = 4;
        }
        else if (l == 7) {
            a[0] = "###############";
            a[1] = "#3 4#  P#  # B#";
            a[2] = "#1# #9## 1#  3#";
            a[3] = "#1#6# 9#  # ###";
            a[4] = "I #7   94 # # o";
            a[5] = "# #1 3 ##  P# #";
            a[6] = "# ########### #";
            a[7] = "#       1  P  #";
            a[8] = "###############";
            x = 4;
        }
        else if (l == 8) {
            a[0]  = "#################";
            a[1]  = "#PPPPPPPPPPPPPPP#";
            a[2]  = "#P#############P#";
            a[3]  = "#PPPP 9999999 PP#";
            if (rand() % 100 < 7) a[4] = "#################"; 
            else a[4] = "######### #######"; 
            a[5]  = "#2 2#2 2#9##2  P#";
            a[6]  = "# # # # # #22#  #";
            a[7]  = "# # # # # # #22##";
            a[8]  = "I # # # # # # # o";
            a[9]  = "##22# # # # # # #";
            a[10] = "#  #22# #3# # # #";
            a[11] = "#P  2##2 5 2#2 2#";
            a[12] = "#################";
            x = 8;
        }
        else if (l == 9) {
            a[0] = "#################";
            a[1] = "I     9###9     I";
            a[2] = "#      # #      #";
            a[3] = "#    ##P9P##    #";
            a[4] = "#   9# 9o9 #9   #";
            a[5] = "#    ##P9P##    #";
            a[6] = "#      # #      #";
            a[7] = "I     9###9     I";
            a[8] = "#################";
            if (rand() % 2) x = 7;
            if (rand() % 2) y = 15;
        }
        else if (l == 10) {
            a[0] = "#############################";
            a[1] = "#00*****009***P0000000000000#";
            a[2] = "#0*9000*00*000*0**P000000000#";
            a[3] = "#0*000**00*0#0*0900*****00**o";
            a[4] = "#0*00**00*90#0******000****0#";
            a[5] = "#0*00*00**00#0000000***00000#";
            a[6] = "#T*00*90*00##################";
            a[7] = "I**000***00#================I";
            a[8] = "############T################";
            x = 7;
            y = 1;
        }
        else if (l == 11) {
            a[0] = "#############################";
            a[1] = "#        33344555#P         #";
            a[2] = "#22222P  33344566#P         ##";
            a[3] = "#11   2  33344567#7 8 8 8 8 9######################";
            a[4] = "I 1   2  33344567           999999999999999  PPPPo#";
            a[5] = "#11   2  33344567#7 8 8 8 8 9######################";
            a[6] = "#22222P  33344566#P         ##";
            a[7] = "#        33344555#P         #";
            a[8] = "#############################";
            x = 4;
            y = 1;
        }
        else if (l == 12) {
            a[0] = "###################################################";
            a[1] = "#999999999999999999.T.999999999P999999999999999999#";
            a[2] = "#9999999999.99.99.99T.999999999P999999999999999999#";
            a[3] = "#T9...99.99999999999T.999999999P9999999999999999..#";
            a[4] = "I...9.9.9999.999.99...999999999P9999999999999999.X#";
            a[5] = "#T9...99999999.99999T.999999999P9999999999999999..#";
            a[6] = "#9999999.99.999.99.9T.999999999P999999999999999999#";
            a[7] = "#99999.9999999999999T.999999999P999999999999999999#";
            a[8] = "###################################################";
            a[9] = "#oPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP #";
            a[10] = "#################################################T#";
            x = 4;
            y = 1;
        }
        else {
            a[0] = "#############################";
            a[1] = "#T                         T#";
            a[2] = "#                           #";
            a[3] = "#                           #";
            a[4] = "#                           #";
            a[5] = "#                           #";
            a[6] = "#                           #";
            a[7] = "I                          T#";
            a[8] = "#############################";
            x = 7;
            y = 1;
            for (int i = 0; i < 100; i++)
                for (int j = 0; j < 100; j++) is[i][j] = true;
        }
        a[x][y] = '@';
        while (1) {
            is[x - 1][y - 1] = true;
            is[x - 1][y] = true;
            is[x - 1][y + 1] = true;
            is[x][y - 1] = true;
            is[x][y] = true;
            is[x][y + 1] = true;
            is[x + 1][y - 1] = true;
            is[x + 1][y] = true;
            is[x + 1][y + 1] = true;
            system("cls");
            cout << "生命:" << health << "/" << maxhealth << endl;
            cout << "攻击:" << attack << endl;
            cout << "防御:" << defense << endl;
            for (int i = 0; i < 25; i++) {
                for (int j = 0; j < 50; j++) {
                    if (is[i][j]) cout << a[i][j]; 
                    else cout << "0"; 
                }
                cout << endl;
            }
            int ch;
            ch = _getch();
            if (ch == 'a') {
                if ('0' < a[x][y - 1] && a[x][y - 1] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x][y - 1] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 1000 * (a[x][y - 1] - '0'), 250 * (a[x][y - 1] - '0'), 10 * (a[x][y - 1] - '0'), 12, 50 * (a[x][y - 1] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x][y - 1] = '@';
                    a[x][y] = ' ';
                    y--;
                    a[x][y] = ' ';
                }
                else if (a[x][y - 1] == 'I')
                {
                    cout << "你是否要退出?" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x][y - 1] == 'o')
                {
                    cout << "你通关了" << endl;
                    if (nowlevel + 1 == l)
                    {
                        nowlevel++;
                    }
                    _getch();
                    return 0;
                }
                else if (a[x][y - 1] == 'P')
                {
                    int m1 = rand() % 50;
                    int m2 = rand() % 2;
                    int m3 = rand() % 2;
                    int m4 = rand() % 2;
                    int m5 = rand() % 2;
                    int m6 = rand() % 2;
                    cout << "你获得了:" << endl;
                    cout << m1 << "元" << endl;
                    cout << m2 << "瓶生命药水" << endl;
                    cout << m3 << "瓶防御药水" << endl;
                    cout << m4 << "瓶攻击药水" << endl;
                    cout << m5 << "瓶经验药水" << endl;
                    cout << m6 << "瓶全幅药水" << endl;
                    money += m1;
                    bag[19] += m2;
                    bag[20] += m3;
                    bag[21] += m4;
                    bag[22] += m5;
                    bag[23] += m6;
                    _getch();
                    a[x][y - 1] = '@';
                    a[x][y] = ' ';
                    y--;
                }
                else if (a[x][y - 1] == 'S')
                {
                    poisonshop();
                }
                else if (a[x][y - 1] == 'B')
                {
                    bookshop();
                }
                else if (a[x][y - 1] == 'T')
                {
                    NoticeBoard(l, x, y - 1);
                }
                else if (a[x][y - 1] == '0' && l == 10)
                {
                    a[x][y] = '0';
                    x = 7;
                    y = 12;
                    a[x][y] = '@';
                }
                else if (a[x][y - 1] == 'X' && l == 12)
                {
                    a[x][y] = ' ';
                    x = 9;
                    y = 49;
                    a[x][y] = '@';
                }
                else if (a[x][y - 1] != '#')
                {
                    a[x][y - 1] = '@';
                    a[x][y] = ' ';
                    y -= 1;
                }
                if (l == 9 && x == 4 && y == 12)
                {
                    a[x][y - 2] = '@';
                    a[x][y] = ' ';
                    y -= 2;
                }
            }
            if (ch == 'd') {
                if ('0' < a[x][y + 1] && a[x][y + 1] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x][y + 1] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 1000 * (a[x][y + 1] - '0'), 250 * (a[x][y + 1] - '0'), 10 * (a[x][y + 1] - '0'), 12, 50 * (a[x][y + 1] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x][y + 1] = '@';
                    a[x][y] = ' ';
                    y++;
                    a[x][y] = ' ';
                }
                else if (a[x][y + 1] == 'I')
                {
                    cout << "你是否要退出?" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x][y + 1] == 'o')
                {
                    cout << "你通关了" << endl;
                    if (nowlevel + 1 == l)
                    {
                        nowlevel++;
                    }
                    _getch();
                    return 0;
                }
                else if (a[x][y + 1] == 'P')
                {
                    int m1 = rand() % 50;
                    int m2 = rand() % 2;
                    int m3 = rand() % 2;
                    int m4 = rand() % 2;
                    int m5 = rand() % 2;
                    int m6 = rand() % 2;
                    cout << "你获得了:" << endl;
                    cout << m1 << "元" << endl;
                    cout << m2 << "瓶生命药水" << endl;
                    cout << m3 << "瓶防御药水" << endl;
                    cout << m4 << "瓶攻击药水" << endl;
                    cout << m5 << "瓶经验药水" << endl;
                    cout << m6 << "瓶全幅药水" << endl;
                    money += m1;
                    bag[19] += m2;
                    bag[20] += m3;
                    bag[21] += m4;
                    bag[22] += m5;
                    bag[23] += m6;
                    _getch();
                    a[x][y + 1] = '@';
                    a[x][y] = ' ';
                    y++;
                }
                else if (a[x][y + 1] == 'S')
                {
                    poisonshop();
                }
                else if (a[x][y + 1] == 'B')
                {
                    bookshop();
                }
                else if (a[x][y + 1] == 'T')
                {
                    NoticeBoard(l, x, y + 1);
                }
                else if (a[x][y + 1] == '0' && l == 10)
                {
                    a[x][y] = '0';
                    x = 7;
                    y = 12;
                    a[x][y] = '@';
                }
                else if (a[x][y + 1] == 'X' && l == 12)
                {
                    a[x][y] = ' ';
                    x = 9;
                    y = 49;
                    a[x][y] = '@';
                }
                else if (a[x][y + 1] != '#')
                {
                    a[x][y + 1] = '@';
                    a[x][y] = ' ';
                    y++;
                }
                if (l == 9 && x == 4 && y == 4)
                {
                    a[x][y + 2] = '@';
                    a[x][y] = ' ';
                    y += 2;
                }
            }
            if (ch == 'w') {
                if ('0' < a[x - 1][y] && a[x - 1][y] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x - 1][y] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 1000 * (a[x - 1][y] - '0'), 250 * (a[x - 1][y] - '0'), 10 * (a[x - 1][y] - '0'), 12, 50 * (a[x - 1][y] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x - 1][y] = '@';
                    a[x][y] = ' ';
                    x--;
                    a[x][y] = ' ';
                }
                else if (a[x - 1][y] == 'I')
                {
                    cout << "你是否要退出?" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x - 1][y] == 'o')
                {
                    cout << "你通关了" << endl;
                    if (nowlevel + 1 == l)
                    {
                        nowlevel++;
                    }
                    _getch();
                    return 0;
                }
                else if (a[x - 1][y] == 'P')
                {
                    int m1 = rand() % 50;
                    int m2 = rand() % 2;
                    int m3 = rand() % 2;
                    int m4 = rand() % 2;
                    int m5 = rand() % 2;
                    int m6 = rand() % 2;
                    cout << "你获得了:" << endl;
                    cout << m1 << "元" << endl;
                    cout << m2 << "瓶生命药水" << endl;
                    cout << m3 << "瓶防御药水" << endl;
                    cout << m4 << "瓶攻击药水" << endl;
                    cout << m5 << "瓶经验药水" << endl;
                    cout << m6 << "瓶全幅药水" << endl;
                    money += m1;
                    bag[19] += m2;
                    bag[20] += m3;
                    bag[21] += m4;
                    bag[22] += m5;
                    bag[23] += m6;
                    _getch();
                    a[x - 1][y] = '@';
                    a[x][y] = ' ';
                    x--;
                }
                else if (a[x - 1][y] == 'S')
                {
                    poisonshop();
                }
                else if (a[x - 1][y] == 'B')
                {
                    bookshop();
                }
                else if (a[x - 1][y] == 'T')
                {
                    NoticeBoard(l, x - 1, y);
                }
                else if (a[x - 1][y] == '0' && l == 10)
                {
                    a[x][y] = '0';
                    x = 7;
                    y = 12;
                    a[x][y] = '@';
                }
                else if (a[x - 1][y] == 'X' && l == 12)
                {
                    a[x][y] = ' ';
                    x = 9;
                    y = 49;
                    a[x][y] = '@';
                }
                else if (a[x - 1][y] != '#')
                {
                    a[x - 1][y] = '@';
                    a[x][y] = ' ';
                    x -= 1;
                }
            }
            if (ch == 's') {
                if (a[x + 1][y] == ' ')
                {
                    a[x + 1][y] = '@';
                    a[x][y] = ' ';
                    x += 1;
                }
                else if ('0' < a[x + 1][y] && a[x + 1][y] <= '9')
                {
                    cout << "你遇到了" << (int)(a[x + 1][y] - '0') << "级怪物,迎战吧!";
                    fight("怪物", 1000 * (a[x + 1][y] - '0'), 250 * (a[x + 1][y] - '0'), 10 * (a[x + 1][y] - '0'), 12, 50 * (a[x + 1][y] - '0'));
                    if (dead)
                    {
                        Sleep(1000);
                        return 0;
                    }
                    a[x + 1][y] = '@';
                    a[x][y] = ' ';
                    x++;
                    a[x][y] = ' ';
                }
                else if (a[x + 1][y] == 'I')
                {
                    cout << "你是否要退出?" << endl;
                    cout << "1确定 2取消" << endl;
                    int num;
                    cin >> num;
                    if (num == 1)
                    {
                        break;
                    }
                }
                else if (a[x + 1][y] == 'o')
                {
                    cout << "你通关了" << endl;
                    if (nowlevel + 1 == l)
                    {
                        nowlevel++;
                    }
                    _getch();
                    return 0;
                }
                else if (a[x + 1][y] == 'P')
                {
                    int m1 = rand() % 50;
                    int m2 = rand() % 2;
                    int m3 = rand() % 2;
                    int m4 = rand() % 2;
                    int m5 = rand() % 2;
                    int m6 = rand() % 2;
                    cout << "你获得了:" << endl;
                    cout << m1 << "元" << endl;
                    cout << m2 << "瓶生命药水" << endl;
                    cout << m3 << "瓶防御药水" << endl;
                    cout << m4 << "瓶攻击药水" << endl;
                    cout << m5 << "瓶经验药水" << endl;
                    cout << m6 << "瓶全幅药水" << endl;
                    money += m1;
                    bag[19] += m2;
                    bag[20] += m3;
                    bag[21] += m4;
                    bag[22] += m5;
                    bag[23] += m6;
                    _getch();
                    a[x + 1][y] = '@';
                    a[x][y] = ' ';
                    x++;
                }
                else if (a[x + 1][y] == 'S')
                {
                    poisonshop();
                }
                else if (a[x + 1][y] == 'B')
                {
                    bookshop();
                }
                else if (a[x + 1][y] == 'T')
                {
                    NoticeBoard(l, x + 1, y);
                }
                else if (a[x + 1][y] == '0' && l == 10)
                {
                    a[x][y] = '0';
                    x = 7;
                    y = 12;
                    a[x][y] = '@';
                }
                else if (a[x + 1][y] == 'X' && l == 12)
                {
                    a[x][y] = ' ';
                    x = 9;
                    y = 49;
                    a[x][y] = '@';
                }
                else if (a[x + 1][y] != '#')
                {
                    a[x + 1][y] = '@';
                    a[x][y] = ' ';
                    x++;
                }
            }
        }
        return 0;
    }
    int MM()
    {
        if (amm == 0) {
            int lie = 0;
            cout << "....建议45级打,飘升80级...." << endl;
            cout << "攻击即可获得:" << endl;
            cout << "抽奖券*100 技能书昏昏倒地或技能书铁甲咒 全幅药水*50";
            cout << " 金币*2000 经验石X*50" << endl;
            cout << " 1攻击 2变强后再来" << endl;
            int a;
            cin >> a;
            if (a == 1) {
                cout << "你来到了魔法部大门" << endl;
                Sleep(1000);
                cout << "魔法部大门看守:你来这干嘛!" << endl;
                Sleep(1000);
                cout << "1抢劫! 2办事的。" << endl;
                cin >> a;
                if (a == 1) cout << "魔法部大门看守:拦下他!" << endl;
                else {
                    if (camp) cout << "魔法部大门看守:不可能,你是伏地魔的人!" << endl; 
                    else {
                        cout << "魔法部大门看守仔细一看。" << endl;
                        Sleep(1000);
                        cout << "魔法部大门看守:他是哈利波特的人,抓了他问哈利波特下落!" << endl;
                    }
                }
                Sleep(1000);
                fight("大门看守", 2000, 200, 20, 0, 1000);
                if (dead) return 0; 
                fight("大门看守", 2000, 200, 20, 0, 1000);
                if (dead) return 0; 
                cout << "增加100滴血" << endl;
                health += 100;
                Sleep(1000);
                cout << "你踢开了大门" << endl;
                Sleep(1000);
                cout << "里面的几个雕像活了" << endl;
                Sleep(1000);
                fight("雕像", 10000, 200, 20, 0, 500);
                if (dead) return 0; 
                fight("雕像", 10000, 200, 20, 0, 500);
                if (dead) return 0; 
                fight("雕像", 10000, 200, 20, 0, 500);
                if (dead) return 0; 
                cout << "增加500滴血" << endl;
                health += 500;
                cout << "你杀死了雕像后, 正准备往楼上走" << endl;
                Sleep(1000);
                cout << "突然一群员工跑了过来" << endl;
                Sleep(1000);
                cout << "员工:这是你干你的吗" << endl;
                Sleep(1000);
                cout << "1,撒谎  其他,是!" << endl;
                cin >> a;
                if (a == 1) {
                    cout << "员工:是谁干的?" << endl;
                    Sleep(1000);
                    cout << "你随便指了一个员工" << endl;
                    Sleep(1000);
                    cout << "他!" << endl;
                    Sleep(1000);
                    cout << "那群员工匆匆跑了过去" << endl;
                    Sleep(1000);
                    cout << "你赶快跑上楼梯" << endl;
                    Sleep(1000);
                    lie = 1;
                }
                else {
                    cout << "员工:干掉他!" << endl;
                    Sleep(1000);
                    fight("员工", 3000, 200, 100, 14, 1000);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 14, 1000);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 14, 1000);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 15, 1000);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 17, 1000);
                    if (dead) return 0; 
                    if (rand() % 3 == 0) {
                        cout << "你获得了技能书铁甲咒" << endl;
                        bag[7]++;
                        Sleep(1000);
                    }
                    cout << "你赶快跑上楼梯" << endl;
                    health += 500;
                }
                Sleep(1000);
                cout << "你遇到了副部长" << endl;
                Sleep(1000);
                fight("副部长", 10000, 1000, 100, 20, 3000);
                health += 5000;
                if (dead) return 0; 
                if (lie) {
                    cout << "上次的员工跑了过来" << endl;
                    Sleep(1000);
                    cout << "员工:你,你骗了我们!" << endl;
                    Sleep(1000);
                    fight("员工", 3000, 200, 100, 14, 1000);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 14, 1000);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 14, 1000);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 15, 1500);
                    if (dead) return 0; 
                    fight("员工", 3000, 200, 100, 17, 2000);
                    if (dead) return 0;
                    if (rand() % 3 == 0){
                        cout << "你获得了技能书铁甲咒" << endl;
                        bag[7]++;
                        Sleep(1000);
                    }
                    health += 500;
                }
                cout << "你遇到了部长";
                fight("部长", 15000, 1500, 150, 20, 4000);
                if (dead) return 0;
                cout << "你获得:" << endl;
                cout << "抽奖券*100 技能书昏昏倒地或技能书铁甲咒 全幅药水*50";
                cout << " 金币*2000 经验石X*50" << endl;
                bag[0] += 100; bag[8]++; bag[23] += 50; money += 2000; bag[5] += 50; amm = 1;
                Sleep(3000);
            }
            else if (a == 2) return 0;
            else {
                cout << "请勿乱输";
                Sleep(1000);
            }
        }
        else {
            cout << "你已占领魔法部 可以进入以下地方" << endl;
            cout << "0,退出 1,泡温泉 2,矿洞" << endl;
            int b;
            cin >> b;
            switch (b)
            {
            case 0:
                break;
            case 1:
                time_t c_start, t_start, c_end, t_end;
                c_start = clock();
                t_start = time(NULL);
                cout << "正在泡温泉 按下任意键停止" << endl;
                _getch();
                c_end = clock();
                t_end = time(NULL);
                cout << "你获得" << (int)difftime(c_end, c_start) / 100 << "元" << endl;
                cout << "你获得" << (int)difftime(c_end, c_start) / 10 << "经验" << endl;
                experience += (int)difftime(c_end, c_start) / 10;
                money += (int)difftime(c_end, c_start) / 100;
                _getch();
                break;
            case 2:
                cout << "你走进矿洞" << endl;
                Sleep(1000);
                ict++;
                if (ict == 5) cout << "你不小心靠在墙上,触发了机关" << endl;
                else if (ict > 5) cout << "你找到原来触发机关的地方,按下那块岩石,密道又出现了" << endl;
                cout << "0,退出 1,挖矿";
                if (ict > 4) cout << " 2,暗道";
                cout << endl;
                int c;
                cin >> c;
                if (c == 1) dig();
                else if (c == 2 && ict > 4) {
                    cout << "你走进暗道" << endl;
                    _getch();
                    cout << "你发现了一个完全不同的世界,里面充满了怪物" << endl;
                    _getch();
                    cout << "每去一个地方都有可能遇到他们" << endl;
                    _getch();
                    cout << "但你有一种直觉,穿过这个森林,就能找到某些东西" << endl;
                    _getch();
                    MessageBox(0, TEXT("建议 生命>60000 攻击>20000 防御>2000 速度>1000 时来打"), TEXT("重要提示"), MB_OK);
                    if (MessageBox(0, TEXT("用 wasd 移动,o出口,I入口,@你"), TEXT("重要提示"), MB_OKCANCEL | MB_ICONINFORMATION) != IDOK){
                        MessageBox(0, TEXT("下次再来吧!"), TEXT("重要提示"), MB_OK);
                        return 0;
                    };
                    cout << "开始吧!" << endl;
                    maze();
                }
                else cout << "请勿乱输" << endl; 
                Sleep(1000);
                break;
            }
        }
        return 0;
    }
    int finalfight(string Hname)
    {
        int hisH = 1000000000, hisA = 1000000, hisD = 500000, hisSP = 5000;
        int hfaint = 0, hhurt = 0, hbeat = 0;
        int mfaint = 0, mhurt = 0;
        dead = false;
        int ha = hisA;
        int his = hisA + hisD + hisH;
        while (1)
        {
            if (hfaint > 0) {
                if (rand() % 3 == 0) {
                    cout << "对方使用技能:咒立停!停止了魔咒" << endl;
                    hfaint = 1;
                }
                hfaint -= 1;
            }
            if (hbeat == 1) {
                if (rand() % 10 == 0) {
                    cout << "对方一躲,躲过了你的石头" << endl;
                    hbeat = 0;
                }
                else {
                    cout << "对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴" << endl;
                    hisH -= 50;
                }
            }
            if (mfaint > 0) {
                if (Sl[6]) mfaint = 0; 
                else mfaint -= 1; 
            }
            if (mhurt > 0) {
                if (Sl[6]) mhurt = 0; 
                else {
                    mhurt -= 1;
                    cout << "你的心像被一把刀刺穿了一样 扣血200滴" << endl;
                    health -= 200;
                }
            }
            if (mfaint <= 0) {
                if (rand() % 3 && Sl[0]) {
                    cout << "你使用技能快快复苏 生命增加200" << endl;
                    health += 200;
                }
                if (rand() % 3 && Sl[1]) {
                    cout << "你使用技能铁甲护身 生命增加100 防御增加50" << endl;
                    health += 100;
                    defense += 50;
                }
                if (rand() % 3 && Sl[2]) {
                    cout << "你使用技能昏昏倒地 " << Hname << "一回合之内不能攻击" << endl;
                    hfaint += 1;
                }
                if (rand() % 3 && Sl[3]) {
                    cout << "你使用技能神锋无影 攻击增加200 对方扣血200滴" << endl;
                    hisH -= 200;
                    attack += 200;
                }
                if (rand() % 3 && Sl[5]) {
                    if (rand() % 10) {
                        cout << "你使用技能统统石化 " << Hname << "二回合之内不能攻击" << endl;
                        hfaint += 2;
                    }
                    else {
                        cout << "你使用技能统统石化 " << Hname << "十回合之内不能攻击" << endl;
                        hfaint += 10;
                    }
                }
                if (rand() % 4 == 0 && Sl[7]) {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                    hisH = monsterfight(Hname, hisH, hisA, hisD, 23, hisSP);
                    if (hisH < 1)
                    {
                        cout << "对方死亡" << endl; Sleep(1000);
                        cout << "全部人都来庆祝你" << endl; Sleep(1000);
                        cout << "突然," << Hname << "的魔杖一转,指向了你。" << endl; Sleep(1000);
                        cout << "里面发出一束红色的光柱" << endl; Sleep(1000);
                        cout << "你连忙拿魔杖一挡" << endl; Sleep(1000);
                        cout << "那光柱击中你的魔杖,爆炸了" << endl; Sleep(1000);
                        cout << "你的魔杖断了" << endl; Sleep(1000);
                        cout << "你被炸出20多米" << endl; Sleep(1000);
                        cout << "未完待续..." << endl; Sleep(10000);
                        return 0;
                    }
                    if (Sl[0]) {
                        cout << "在对方和石怪的战斗中,你已经恢复了2000生命" << endl;
                        if (maxhealth < health + 2000) health = maxhealth; 
                        else  health += 2000; 
                    }
                }
                if (rand() % 4 == 0 && Sl[8]) {
                    cout << "你使用技能召唤咒!召唤出石怪跟" << Hname << "战斗" << endl;
                }
                if (rand() % 3 && Sl[9]) {
                    cout << "你使用技能万弹齐发!变出几十块石头" << endl;
                    hbeat = 1;
                }
                if (rand() % 3 && Sl[10]) {
                    cout << "你使用技能钻心咒!对方将疼痛5回合" << endl;
                    hhurt += 5;
                }
                if (rand() % 3 && Sl[11]) {
                    cout << "魂魄出窍!你使用夺魂咒,企图让" << Hname << "自己攻击自己!" << endl;
                    Sleep((rand() % 2000) + 1000);
                    cout << Hname << "被你控制了,开始攻击自己" << endl;
                    Sleep(700);
                    int ran = rand() % 40 - 20;
                    if (hisA + ran > hisD) {
                        cout << "对方发起进攻 自己扣血" << hisH - hisD + ran << "滴 剩余" << hisH - (hisA - hisD + ran) << "滴" << endl;
                        hisH -= hisA - hisD + ran;
                    }
                    else cout << "对方发起进攻 自己扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                if (rand() % 2 && Sl[12]) {
                    cout << "你使用技能阿瓦达索命 " << Hname << "扣血" << hisH - hisH / 4 << "滴" << endl;
                    hisH /= 4;
                }
                Sleep(1000);
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > hisSP) {
                    if (attack + ran > hisD) {
                        cout << "你发起进攻 " << Hname << "扣血" << attack - hisD + ran << "滴 剩余" << hisH - (attack - hisD + ran) << "滴" << endl;
                        hisH -= attack - hisD + ran;
                    }
                    else cout << "你发起进攻 " << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                }
                else
                {
                    if (rand() % 2) cout << "你一脚踹了过去,但没有踢中" << endl; 
                    else {
                        cout << "你一脚踹了过去,但只擦着了腰" << endl;
                        if ((attack / 3) + ran > hisD) {
                            cout << Hname << "扣血" << (attack / 3) + ran - hisD << "滴 剩余" << hisH - ((attack / 3) + ran - hisD) << "滴" << endl;
                            hisH -= (attack / 3) + ran - hisD;
                        }
                        else  cout << Hname << "扣血0滴 剩余" << hisH << "滴" << endl; 
                    }
                }
            }
            Sleep(700);
            if (hhurt > 0) {
                hhurt -= 1;
                cout << "对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴" << endl;
                hisH -= 200;
            }
            if (hisH <= 0) {
                if (rand() % 3 == 0) {
                    cout << "对方发动技能:恢复如初 满血复活" << endl;
                    hisH = ha;
                    Sleep(1000);
                }
                else {
                    cout << "对方死亡"<< endl; Sleep(1000);
                    cout << "全部人都来庆祝你" << endl; Sleep(1000);
                    cout << "突然," << Hname << "的魔杖一转,指向了你。" << endl; Sleep(1000);
                    cout << "里面发出一束红色的光柱" << endl; Sleep(1000);
                    cout << "你连忙拿魔杖一挡" << endl; Sleep(1000);
                    cout << "那光柱击中你的魔杖,爆炸了" << endl; Sleep(1000);
                    cout << "你的魔杖断了" << endl; Sleep(1000);
                    cout << "你被炸出20多米" << endl; Sleep(1000);
                    cout << "未完待续..." << endl; Sleep(10000);
                    return 0;
                }
            }
            if (rand() % 3 == 0) {
                cout << "对方发动技能:快快复苏  生命加200" << endl;
                hisH += 200; 
            }
            if (rand() % 3 == 0) {
                cout << "对方发动技能:盔甲护身  生命加50 防御增加50" << endl;
                hisH += 50;
                hisD += 50; 
            }
            if (rand() % 3 == 0) {
                cout << "对方使用技能神锋无影 攻击增加200 扣血200滴" << endl;
                health -= 200;
                hisA += 200; 
            }
            if (rand() % 3 == 0) {
                cout << "对方使用技能昏昏倒地 " << name << "一回合之内不能攻击" << endl;
                mfaint += 1; 
            }
            if (rand() % 3 == 0)
            {
                if (rand() % 10) {
                    cout << "对方使用技能统统石化 " << name << "二回合之内不能攻击" << endl;
                    mfaint += 2;
                }
                else {
                    cout << "对方使用技能统统石化 " << name << "十回合之内不能攻击" << endl;
                    mfaint += 10;
                }
            }
            if (rand() % 3 == 0) {
                cout << "对方使用技能阿瓦达索命 " << name << "扣血" << health - health / 4 << "滴" << endl;
                health /= 4;
            }
            Sleep(1000);
            if (hfaint <= 0) {
                int ran = rand() % 40 - 20;
                if (rand() % 10000 > speed) {
                    if (hisA + ran > defense) {
                        cout << Hname << "发起进攻 " << "你扣血" << hisA - defense + ran << "滴 剩余" << health - (hisA - defense + ran) << "滴" << endl;
                        health -= hisA - defense + ran;
                    }
                    else cout << Hname << "发起进攻 " << "你扣血0滴 剩余" << health << "滴" << endl; 
                }
                else {
                    if (rand() % 2) cout << Hname << "一脚踹了过来,但没有踢中" << endl; 
                    else {
                        if ((hisA / 3) + ran > hisD) {
                            cout << Hname << "发起进攻 你扣血" << (hisA / 3) + ran - defense << "滴 剩余" << health - ((hisA / 3) + ran - defense) << "滴" << endl;
                            health -= ((hisA / 3) + ran - defense);
                        }
                        else cout << Hname << "发起进攻 " << "你扣血0滴 剩余" << health << "滴" << endl; 
                    }
                }
                Sleep(1000);
                if (health <= 0) {
                    if (Sl[6] && rand() % 2) {
                        cout << "你发动技能:恢复如初 满血复活" << endl;
                        health = maxhealth;
                        Sleep(1000);
                    }
                    else {
                        cout << "你死亡";
                        health = 20;
                        dead = true;
                        return 0;
                    }
                }
            }
        }
        return 0;
    }
    int main()
    {
        int isbreak;
        isbreak = false;
        if (MessageBox(0, TEXT("除输入名字外,请不要输入任何字符,否则将导致游戏崩溃!"), TEXT("重要提示"), MB_OKCANCEL | MB_ICONINFORMATION) != IDOK)
        {
            MessageBox(0, TEXT("既然你不同意,那就别玩了"), TEXT("重要提示"), MB_OK);
            return 0;
        };
        srand((unsigned)time(NULL));
        cout << "                              1.2.9 \n";
        cout << "      MagicWorld--HarryPotter       \n";
        cout << "                                    \n";
        cout << "         / >                        \n";
        cout << "        /    >          /           \n";
        cout << "       < _____ >       /            \n";
        cout << "        |-O--O-|      /             \n";
        cout << "       /   == - .    /              \n";
        cout << "     /           . [  ]             \n";
        cout << "       /      /` ___/               \n";
        cout << "                                    \n";
        cout << "                             by evan\n";
        cout << "输入‘start’开始游戏                  \n";
        string start;
        cin >> start;
        for (int i = 8; i < 100; i++) wandname[i] = "1";
        if (start == "start") {
            int i;
            system("cls");
            for (i = 0; i < 20; i++) {
                cout << "loading..." << endl << "--------------------------" << endl << "   ";
                for (int j = 0; j <= i % 5; j++) cout << "+==+";
                cout << "   " << endl << "--------------------------" << endl;
                switch (rand() % 4)
                {
                case 0:
                    cout << "打怪是升级和提升战力的好方法。" << endl;
                    break;
                case 1:
                    cout << "开始游戏时记得选择阵营。" << endl;
                    break;
                case 2:
                    cout << "退出时要保存。" << endl;
                    break;
                case 3:
                    cout << "新手开始游戏时会有3瓶经验药水1张抽奖券。" << endl;
                    break;
                }
                Sleep(250);
                system("cls");
            }
            while (1)
            {
                isbreak = false;
                cout << "1,登录 2,注册";
                int a;
                cin >> a;
                if (a == 1) login();
                else Reg();
                while (1) {
                    if (isbreak)
                    {
                        break;
                    }
                    system("cls");
                    cout << "魔法人士:" << name << endl;
                    cout << "势力:";
                    if (camp) cout << "伏地魔" << endl;
                    else cout << "哈利波特" << endl;
                    cout << "生命:" << health << "/" << maxhealth << endl;
                    cout << "攻击:" << attack << endl;
                    cout << "防御:" << defense << endl;
                    cout << "速度:" << speed << endl;
                    cout << "等级:" << level << endl;
                    cout << "经验:" << experience << "/" << level * 100 << endl;
                    cout << "金币:" << money << endl;
                    cout << "1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,";
                    if (camp) cout << "霍格沃茨(哈利波特不在) ";
                    else cout << "伏地魔总部(伏地魔不在) ";
                    cout << "4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,材料店 11,任务 12,终极任务 13,副本 14,保存 ";
                    if (camp) cout << "15, 医疗兵(伏地魔的)";
                    else cout << "15, 庞弗雷女士 ";
                    cout << "16,改变参数(测试专用 需要密码) 17,设置 18,登出" << endl;
                    cin >> a;
                    switch (a)
                    {
                    case 1:
                        MM();
                        break;
                    case 2:
                        street();
                        break;
                    case 3:
                        for (int i = 1; i < 100; i++) {
                            cout << "|";
                            for (int j = 0; j < 10 && i < 100; j++, i++) {
                                if (nowlevel + 1 < i) cout << " " << i << " |";
                                else cout << ":" << i << ":|";
                            }
                            cout << endl;
                        }
                        int num;
                        cin >> num;
                        if (nowlevel + 1 < num) cout << "你未解锁这关" << endl;
                        else checkpoint(num);
                        Sleep(1000);
                        break;
                    case 4:
                        if (camp) {
                            if (f) finalfight("哈利·波特");
                            else cout << "你需要先寻找哈利波特的下落" << endl;
                        }
                        else {
                            if (f) finalfight("伏地魔");
                            else cout << "你需要先寻找伏地魔的下落" << endl;
                        }
                        Sleep(1000);
                        break;
                    case 5:
                        cout << "1 柳条独角兽尾毛魔杖   100元" << endl;
                        cout << "2 胡桃木龙神经魔杖     200元" << endl;
                        cout << "3 鹅耳枥木魔杖        550元" << endl;
                        cout << "4 柳条魔杖            1200元" << endl;
                        cout << "5 花心木魔杖          3650元" << endl;
                        cout << "6 冬青木凤凰羽毛魔杖   5780元" << endl;
                        cout << "7 紫杉木凤凰羽毛魔杖   7120元" << endl;
                        cout << "8 老魔杖              50000元" << endl;
                        cout << "0 退出              0元" << endl;
                        int b;
                        cin >> b;
                        switch (b)
                        {
                        case 1:
                            buywand(6, 10);
                            system("cls");
                            break;
                        case 2:
                            buywand(7, 20);
                            system("cls");
                            break;
                        case 3:
                            buywand(8, 55);
                            system("cls");
                            break;
                        case 4:
                            buywand(9, 120);
                            system("cls");
                            break;
                        case 5:
                            buywand(10, 365);
                            system("cls");
                            break;
                        case 6:
                            buywand(11, 578);
                            system("cls");
                            break;
                        case 7:
                            buywand(12, 712);
                            system("cls");
                            break;
                        case 8:
                            buywand(13, 5000);
                            system("cls");
                            break;
                        default:
                            break;
                        }
                        break;
                    case 6:
                        LD();
                        break;
                    case 7:
                        cout << "1 经验石R      100元    100经验" << endl;
                        cout << "2 经验石SR     200元    250经验" << endl;
                        cout << "3 经验石SSR    400元    500经验" << endl;
                        cout << "4 经验石SSS    1000元   1200经验" << endl;
                        cout << "5 经验石X      2000元   2500经验" << endl;
                        cout << "0 退出         0元      0经验" << endl;
                        int c;
                        cin >> c;
                        switch (c)
                        {
                        case 1:
                            buy(1, 10);
                            system("cls");
                            break;
                        case 2:
                            buy(2, 20);
                            system("cls");
                            break;
                        case 3:
                            buy(3, 55);
                            system("cls");
                            break;
                        case 4:
                            buy(4, 120);
                            system("cls");
                            break;
                        case 5:
                            buy(5, 365);
                            system("cls");
                            break;
                        default:
                            break;
                        }
                        break;
                    case 8:
                        cout << "1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能" << endl;
                        cin >> b;
                        if (b == 1) w();
                        else if (b == 2) p();
                        else if (b == 3) e();
                        else if (b == 4) s();
                        else {
                            cout << "请勿乱输" << endl;
                            Sleep(1000);
                        }
                        break;
                    case 9:
                        int material1, material2, mn1, mn2;
                        cout << "1,制作 2,查看材料";
                        cin >> material1;
                        if (material1 == 1) {
                            cout << "你要用什么杖芯?" << endl;
                            for (int ij = 0; ij < 9; ij++) cout << ij + 1 << "," << Material1name[ij] << " " << bag[ij + 24] << "个" << endl;
                            cin >> material1;
                            cout << "几个?" << endl;
                            cin >> mn1;
                            cout << "你要用什么木材?" << endl;
                            for (int ij = 0; ij < 10; ij++) cout << ij + 1 << "," << Material2name[ij] << " " << bag[ij + 33] << "个" << endl;
                            cin >> material2;
                            cout << "几个?" << endl;
                            cin >> mn2;
                            make(material1 + 23, material2 + 32, mn1, mn2);
                            break;
                        }
                        else if (material1 == 2) {
                            cout << "杖芯:" << endl;
                            for (int ij = 0; ij < 9; ij++) cout << ij + 1 << "," << Material1name[ij] << " " << bag[ij + 24] << "个" << endl;
                            cout << "木材:" << endl;
                            for (int ij = 0; ij < 10; ij++) cout << ij + 1 << "," << Material2name[ij] << " " << bag[ij + 33] << "个" << endl;
                            _getch();
                        }
                        else cout << "请勿乱输";
                        break;
                    case 10:
                        break;
                    case 11:
                        if (xy == 1) {
                            if (ane == 0) cout << "再闯 1 关副本";
                            else if (ane == 1) cout << "买两件商品";
                            else if (ane == 2) cout << "回血一次";
                            else if (ane == 3) cout << "杀死10个人";
                            cout << "(" << D_Of_C << "/" << OK << ")" << endl;
                            if (D_Of_C >= OK) {
                                cout << "任务完成!!"; maxhealth += 200; health += 200; defense += 20; xy = 0; bag[43]++;
                            }
                            Sleep(1000);
                        }
                        else {
                            ane = rand() % 4;
                            D_Of_C = 0;
                            xy = 1;
                            if (ane == 0) {
                                cout << "再闯 1 关副本"; OK = 1;
                            }
                            else if (ane == 1) {
                                cout << "买两件商品"; OK = 2;
                            }
                            else if (ane == 2) {
                                cout << "回血一次"; OK = 1;
                            }
                            else if (ane == 3) {
                                cout << "杀死10个人"; OK = 10;
                            }
                            Sleep(1000);
                        }
                        break;
                    case 12:
                        if (xy1 == 1) {
                            if (ane1 == 0) {
                                if (camp)  cout << "杀死1个邓布利多";
                                else cout << "杀死1个纳尼吉";
                            }
                            else if (ane1 == 1) cout << "消耗5000元";
                            else if (ane1 == 2) {
                                if (camp) cout << "杀死5个穆迪";
                                else cout << "杀死5个卢修斯·马尔福";
                            }
                            else if (ane1 == 3) cout << "杀死100个生物";
                            else if (ane1 == 4) cout << "再升10级";
                            cout << "(" << D_Of_C1 << "/" << OK1 << ")" << endl;
                            if (D_Of_C1 >= OK1) {
                                cout << "任务完成!!" << endl;
                                xy1 = 0;
                                cout << "增加500元 攻击力+10 防御力+10 生命+500" << endl;
                                money += 501; attack += 201; health += 1010; maxhealth += 1001; defense += 151; bag[43] += 6;
                            }
                            Sleep(1000);
                        }
                        else {
                            ane1 = rand() % 5;
                            D_Of_C1 = 0;
                            xy1 = 1;
                            if (ane1 == 0) {
                                if (camp) cout << "杀死1个邓布利多";
                                else cout << "杀死1个纳尼吉";
                                OK1 = 1;
                            }
                            else if (ane1 == 1) {
                                cout << "消耗5000元"; OK1 = 5000;
                            }
                            else if (ane1 == 2) {
                                if (camp) cout << "杀死5个穆迪";
                                else cout << "杀死5个卢修斯·马尔福";
                                OK1 = 5;
                            }
                            else if (ane1 == 3) {
                                cout << "杀死100个生物"; OK1 = 100;
                            }
                            else if (ane1 == 4) {
                                cout << "再升10级"; OK1 = 10;
                            }
                            Sleep(1000);
                        }
                        break;
                    case 13:
                        cout << "1 金钱副本" << LE1 << "级  2 经验副本" << LE2 << "级" << endl;
                        int y;
                        cin >> y;
                        if (y == 1) {
                            for (int i = 0; i < LE1 % 5; i++) {
                                if (rand() % 3 == 0) fight2("木人桩", 1500, 100, 10, 0, 1000);
                                else if (rand() % 3 == 1) fight2("沙包", 3000, 50, 20, 0, 1000);
                                else fight2("木板", 1000, 100, 10, 0, 1000);
                                if (dead) break;
                            }
                            for (int i = 0; i < (LE1 / 5) % 25; i++) {
                                if (dead) break;
                                if (rand() % 3 == 0) fight2("石人桩(这有吗)", 3000, 200, 20, 0, 2000);
                                else if (rand() % 3 == 1) fight2("石包(这有吗)", 6000, 100, 60, 0, 2000);
                                else fight2("石板", 3000, 300, 30, 0, 2000);
                            }
                            for (int i = 0; i < (LE1 / 25) % 125; i++) {
                                if (dead) break;
                                if (rand() % 3 == 0) fight2("铁人桩(这有吗)", 6000, 400, 40, 0, 4000);
                                else if (rand() % 3 == 1) fight2("铁包(这有吗)", 12000, 200, 120, 0, 4000);
                                else fight2("铁板", 6000, 400, 40, 0, 4000);
                            }
                            for (int i = 0; i < (LE1 / 125) % 625; i++) {
                                if (dead) break;
                                if (rand() % 3 == 0) fight2("金人桩(这有吗)", 12000, 800, 80, 0, 6500);
                                else if (rand() % 3 == 1) fight2("金包(这有吗)", 24000, 400, 240, 0, 6500);
                                else fight2("金板", 12000, 800, 80, 0, 6500);
                            }
                            if (!dead) {
                                LE1++;
                                if (ane == 0) D_Of_C++;
                            }
                        }
                        if (y == 2) {
                            for (int i = 0; i < LE2 % 5; i++) {
                                if (rand() % 3 == 0) fight1("木人桩", 1500, 100, 10, 0, 1000);
                                else if (rand() % 3 == 1) fight1("沙包", 3000, 50, 20, 0, 1000);
                                else fight1("木板", 1000, 100, 10, 0, 1000);
                                if (dead) break;
                            }
                            for (int i = 0; i < (LE2 / 5) % 25; i++) {
                                if (dead) break;
                                if (rand() % 3 == 0) fight1("石人桩(这有吗)", 3000, 200, 20, 0, 1000);
                                else if (rand() % 3 == 1) fight1("石包(这有吗)", 6000, 100, 60, 0, 1000);
                                else fight1("石板", 3000, 300, 30, 0, 1000);
                            }
                            for (int i = 0; i < (LE2 / 25) % 125; i++) {
                                if (dead) break;
                                if (rand() % 3 == 0) fight1("铁人桩(这有吗)", 6000, 400, 40, 0, 4000);
                                else if (rand() % 3 == 1) fight1("铁包(这有吗)", 12000, 200, 120, 0, 4000);
                                else fight1("铁板", 6000, 400, 40, 0, 4000);
                            }
                            for (int i = 0; i < (LE2 / 125) % 625; i++) {
                                if (dead) break;
                                if (rand() % 3 == 0) fight1("金人桩(这有吗)", 12000, 800, 80, 0, 6500);
                                else if (rand() % 3 == 1) fight1("金包(这有吗)", 24000, 400, 240, 0, 6500);
                                else fight1("金板", 12000, 800, 80, 0, 6500);
                            }
                            if (!dead) {
                                LE2++;
                                if (ane == 0) D_Of_C++;
                            }
                        }
                        break;
                    case 14:
                        save();
                        cout << "保存成功!";
                        Sleep(1000);
                        break;
                    case 15:
                        Hos();
                        Sleep(1000);
                        break;
                    case 16:
                        int pw;
                        cout << "密码:";
                        cin >> pw;
                        if (pw == 1212) {
                            cout << "0~42,改变背包 43,金币 44,等级 45,经验 46,生命 47,防御 48,攻击 49,最大生命 50,进入魔法部权力(0没有 0<有) 51,速度" << endl;
                            int num1, num2;
                            cout << "几号:";
                            cin >> num1;
                            cout << "改变成:";
                            cin >> num2;
                            if (num1 <= 42) bag[num1] = num2;
                            else {
                                switch (num1)
                                {
                                case 43:
                                    money = num2;
                                    break;
                                case 44:
                                    level = num2;
                                    break;
                                case 45:
                                    experience = num2;
                                    break;
                                case 46:
                                    health = num2;
                                    break;
                                case 47:
                                    defense = num2;
                                    break;
                                case 48:
                                    attack = num2;
                                    break;
                                case 49:
                                    maxhealth = num2;
                                    break;
                                case 50:
                                    amm = num2;
                                    break;
                                case 51:
                                    speed = num2;
                                    break;
                                default:
                                    break;
                                }
                            }
                            levelup();
                            cout << "改变成功";
                        }
                        else cout << "密码错误" << endl;
                        Sleep(1000);
                        break;
                    case 17:
                        cout << "1,关卡攻略 2,关卡功能" << endl;
                        int xd;
                        cin >> xd;
                        if (xd == 1) system("start https://paste.ubuntu.com/p/2YQBCmYvSb/");
                        if (xd == 2) {
                            cout << "我们先介绍一下图标" << endl;
                            cout << "╔═══╗  ╔═══╗  ╔═══╗  ╔═══╗" << endl;
                            cout << "║ @ ║  ║ I ║  ║ o ║  ║ # ║" << endl;
                            cout << "╚═══╝  ╚═══╝  ╚═══╝  ╚═══╝" << endl;
                            cout << "你自己   出口    入口    墙" << endl;
                            cout << "╔═══╗  ╔═══╗  ╔═══╗  ╔═══╗" << endl;
                            cout << "║ 1 ║  ║ 2 ║  ║ 3 ║  ║ 4 ║" << endl;
                            cout << "╚═══╝  ╚═══╝  ╚═══╝  ╚═══╝" << endl;
                            cout << "1级怪   2级怪   3级怪  4级怪" << endl;
                            cout << "命1000 命2000  命3000 命4000" << endl;
                            cout << "攻250  攻500   攻750  攻1000" << endl;
                            cout << "防10   防20    防30   防40" << endl;
                            cout << "速50   速100   速150  速200" << endl;
                            cout << "╔═══╗  ╔═══╗  ╔═══╗  ╔═══╗" << endl;
                            cout << "║ 5 ║  ║ 6 ║  ║ 7 ║  ║ 8 ║" << endl;
                            cout << "╚═══╝  ╚═══╝  ╚═══╝  ╚═══╝" << endl;
                            cout << "5级怪   6级怪   7级怪  8级怪" << endl;
                            cout << "命5000 命6000  命7000 命8000" << endl;
                            cout << "攻1250 攻1500  攻1750 攻2000" << endl;
                            cout << "防50   防60    防70   防80" << endl;
                            cout << "速250  速300   速350  速400" << endl;
                            cout << "╔═══╗  ╔═══╗  ╔═══╗  ╔═══╗" << endl;
                            cout << "║ 9 ║  ║ S ║  ║ B ║  ║ T ║" << endl;
                            cout << "╚═══╝  ╚═══╝  ╚═══╝  ╚═══╝" << endl;
                            cout << "9级怪  药水商店  书店   告示牌" << endl;
                            cout << "命9000" << endl;
                            cout << "攻2250" << endl;
                            cout << "防90" << endl;
                            cout << "速450" << endl;
                            cout << "╔═══╗" << endl;
                            cout << "║ X ║" << endl;
                            cout << "╚═══╝" << endl;
                            cout << "传送机" << endl;
                            cout << "输入图标了解详细,0退出" << endl;
                            string st;
                            cin >> st;
                            if (st == "@") system("start https://paste.ubuntu.com/p/cdJPnhXddT/");
                            else if (st == "I" || st == "i") system("start https://paste.ubuntu.com/p/h5npMzvDBX/");
                            else if (st == "o" || st == "O") system("start https://paste.ubuntu.com/p/By6Fdyq9wq/");
                            else if (st == "#") system("start https://paste.ubuntu.com/p/DswXYhVGFn/");
                            else if (st <= "9" && st >= "1") system("start https://paste.ubuntu.com/p/4vZDjY7fX4/");
                            else if (st == "S" || st == "s") system("start https://paste.ubuntu.com/p/SvSTDGrcD3/");
                            else if (st == "B" || st == "b") system("start https://paste.ubuntu.com/p/MMqwYn63N9/");
                            else if (st == "T" || st == "t") system("start https://paste.ubuntu.com/p/mXgfbyhGGJ/");
                            else if (st == "X" || st == "x") system("start https://paste.ubuntu.com/p/M6svDYryGt/");
                            else if (st == "0");
                            else cout << "请勿乱输" << endl;
                            Sleep(1000);
                        }
                        break;
                    case 18:
                        isbreak = true;
                    }
                    levelup();
                }
            }
        }
    }
    

    Copy

    我的世界(可能吧):

    //17.3
    //SetColorAndBackground(15,0);
    //"■""●"
    //0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 
    //4陷阱 5粘液块 6传送门 8寒冰
    //Qie-Er-Xi_SU
    //QuiFeng_zhiyin
    //light_of_Ink
    #include<bits/stdc++.h>
    #include<windows.h>
    #include<time.h>
    #include<unistd.h>
    #include<conio.h>
    using namespace std;
    int dt[30][200] = {0} , zx = 5 , zy = 10 , t = 0 , die , dong = 3 , s2 = 0 , jin = 1 , fly = 1 , dongz = 1 , cc = 15 , hc = 0 , yie = 1 , gengpage = 1 , light = 0 , guanpage = 1;
    string version = "17.3";
    typedef struct Frame
    {
    	COORD position[2];
    	int flag;
    }Frame;
    struct balloon
    {
    	int x , y , color;
    };
    void gamej();
    void geng();
    void lian();
    void za();
    void game(int guan);
    int suiji(int a , int b);
    void SetColorAndBackground(int ForgC , int BackC);
    void qing();
    void qiaofeng();
    void qiufeng();
    void inklight();
    void dtc();
    void ShowCursor(bool visible);
    void SetPos(COORD a);
    void setpos(int i , int j);
    void zhang(int g);
    char f(int a);
    void mai(int x);
    int ff(char a);
    void move(char f);
    void bj();
    void bang();
    void gu(int x);
    void gudifficult(int x);
    void g();
    void shang();
    void dongx(int g); 
    void gong();
    void drawballoon(balloon s);
    void xin();
    void drawflower(balloon x);
    void ball();
    void pifu();
    int main()
    {
    	SetColorAndBackground(15 , 0);
    	ShowCursor(false);
    	bj();
    	dong = 3;
    	s2 = 0;
    	jin = 1;
    	char p;
    	fly = 0;
    	while(1)
    	{
    		ShowCursor(false);
    		p = _getch();
    		if(p == 'o')
    		{
    			p = _getch();
    			if(p == 'p')
    			{
    				fly = 1;
    			}
    			if(p == 'i')
    			{
    				fly = 0;
    			}
    		}
    		if(p == 'k')
    		{
    			qing();
    			while(1)
    			{
    				setpos(2 , 2);
    				cout << "返回:r";
    				setpos(54 , 8);
    				cout << "选择模式:";
    				setpos(45 , 10);
    				cout << "普通:p";
    				setpos(65 , 10); 
    				cout << "极限:j";
    				p = _getch();
    				if(p == 'p')
    				{
    					g();
    					qing();
    				}
    				if(p == 'j')
    				{
    					gamej();
    					qing();
    				}
    				if(p == 'r')
    				{
    					break;
    				}
    			}
    			bj();
    		}
    		else if(p == 'b')
    		{
    			bang();
    			bj();
    		}
    		else if(p == 's')
    		{
    			shang();
    			bj();
    		}
    		else if(p == 'g')
    		{
    			gong();
    			bj();
    		}
    		else if(p == 'y')
    		{
    			yie =! yie;
    			bj();
    		}
    		else if(p == 'e')
    		{
    			break;
    		}
    	}
    	return 0;
    }
    void pifu()
    {
    	qing();
    	while(1)
    	{
    		setpos(2 , 2);
    		cout << "返回:r";
    		setpos(6 , 5);
    		cout << "预览";
    		setpos(8 , 7);
    		ball(); 
    		setpos(5 , 10);
    		cout << "请点击皮肤编号";
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << "  ";
    			SetColorAndBackground(i , 0);
    			cout << "■:";
    			cout << char(i + 'a' - 1);
    		}
    		SetColorAndBackground(15 , 0);
    		setpos(5 , 12);
    		cout << "请点击披风编号";
    		for(int i = 1 ; i <= 16 ; i++)
    		{
    			cout << "  ";
    			SetColorAndBackground(cc , i);
    			cout << "●";
    			SetColorAndBackground(15 , 0);
    			cout << ":" << char(i + 'A' - 1);
    		}
    		SetColorAndBackground(15 , 0);
    		setpos(100 , 5);
    		char p = _getch();
    		if(p == 'r')
    		{
    			qing(); 
    			return;
    		}
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			if(p == 'a' + i - 1)
    			{
    				cc = i;
    				setpos(8 , 7);
    				ball();
    				setpos(12 , 5);
    				cout << "更改成功!";
    				sleep(1);
    				setpos(12 , 5);
    				cout << "          ";
    			}
    		}
    		for(int i = 1 ; i <= 16 ; i++)
    		{
    			if(p == 'A' + i - 1)
    			{
    				hc = i;
    				setpos(8 , 7);
    				ball();
    				setpos(12 , 5);
    				cout << "更改成功!";
    				sleep(1);
    				setpos(12 , 5);
    				cout << "          ";
    			}
    		}
    	}
    }
    void ball()
    {
    	SetColorAndBackground(cc , hc);
    	cout << "●";
    	SetColorAndBackground(15 , 0);
    }
    void drawballoon(balloon s)
    {
    	SetColorAndBackground(15 , 0);
    	setpos(s.x , s.y);
    	cout << "_";
    	if(s.x + 1 < 30)
    	{
    		setpos(s.x + 1 , s.y);
    		cout << "_";
    	}
    	if(s.x + 2 < 30)
    	{
    		setpos(s.x + 2 , s.y);
    		cout << "_";
    	}
    	if(s.y + 1 < 30 && s.x - 1 >= 0)
    	{
    		setpos(s.x - 1 , s.y + 1);
    		cout << "(";
    	}
    	if(s.y + 1 < 30 && s.x + 3 < 120)
    	{
    		setpos(s.x + 3 , s.y + 1);
    		cout << ")";
    	}
    	if(s.y + 2 < 30)
    	{
    		setpos(s.x , s.y + 2);
    		cout << char(92);
    	}
    	if(s.y + 2 < 30 && s.x + 2 < 120)
    	{
    		setpos(s.x + 2 , s.y + 2);
    		cout << "/";
    	}
    	if(s.y + 3 < 30 && s.x + 1 < 120)
    	{
    		setpos(s.x + 1 , s.y + 3);
    		cout << "|";
    	}
    	if(s.y + 4 < 30 && s.x + 1 < 120)
    	{
    		setpos(s.x + 1 , s.y + 4);
    		cout << "!";
    	}
    	SetColorAndBackground(15 , s.color);
    	if(s.y + 1 < 30 && s.x < 120)
    	{
    		setpos(s.x , s.y + 1);
    		cout << " ";
    	}
    	if(s.y + 1 < 30 && s.x + 1 < 120)
    	{
    		setpos(s.x + 1 , s.y + 1);
    		cout << " ";
    	}
    	if(s.y + 1 < 30 && s.x + 2 < 120)
    	{
    		setpos(s.x + 2 , s.y + 1);
    		cout << " ";
    	}
    	if(s.y + 2 < 30 && s.x + 1 < 120)
    	{
    		setpos(s.x + 1 , s.y + 2);
    		cout << " ";
    	}
    	SetColorAndBackground(15 , 0);
    }
    void lian()
    {
    	qing();
    	while(1)
    	{
    		setpos(2 , 2);
    		cout << "返回: r";
    		setpos(6 , 5);
    		cout << "微信: yinlg_sf";
    		setpos(6 , 6);
    		cout << "洛谷: yinqf";
    		setpos(6 , 7);
    		cout << "QQ: 暂无";
    		setpos(6 , 8);
    		cout << "网易邮箱: yinsiyuan123mc";
    		setpos(6 , 9);
    		cout << "bilibili: 吹来一阵秋风";
    		setpos(6 , 11); 
    		cout << "欢迎设计地图(18*58)!";
    		setpos(6 , 12);
    		cout << "欢迎挑BUG!";
    		char p = _getch();
    		if(p == 'r')
    		{
    			return ;
    		}
    	}
    }
    void za()
    {
    	qing();
    	while(1)
    	{
    		setpos(2 , 2);
    		cout << "返回: r";
    		setpos(6 , 9);
    		cout << "yinqf超级帅!!!";
    		setpos(6 , 10);
    		cout << "Ink超级帅!!!";
    		setpos(6 , 11);
    		cout << "yinlg超级帅!!!";
    		setpos(6 , 13);
    		cout << "欢迎交流: https://note.ms/chuangguan";
    		setpos(6 , 14);
    		cout << "上线皮肤系统!!!";
    		char p = _getch();
    		if(p == 'r')
    		{
    			return;
    		}
    	}
    }
    void geng()
    {
    	qing();
    	while(1)
    	{
    		if(gengpage == 1) 
    		{
    			setpos(6,3);
    			cout <<"1.0版:最开始的版本,有帮助和开始两个选择,共6个方块                                                            ";
    			setpos(6,4);
    			cout <<"2.0版:第二版,在开始中新增死亡榜和暂停键,优化粘液块,新增3种提示                                              ";
    			setpos(6,5);
    			cout <<"3.0版:第三版,有选关界面(在开始中),在开始中新增一张新地图(挺难的,不过找到技巧1命过),可以连续闯关        ";
    			setpos(6,6);
    			cout <<"4.0版:第四版,在开始中又新增一张新地图(非常难的,作者用了2命),再次优化粘液块,让它变得很丝滑               	";
    			setpos(6,7);
    			cout <<"5.0版:第五版,在开始中又新增一张新地图(粘液块之旅),优化选卡界面,加入关卡名,增加过每关节面                 ";
    			setpos(6,8);
    			cout <<"6.0版:第六版,在开始中又新增一张新地图(无尽弹跳),修复了跳穿墙问题,修复粘液块穿墙(粘液块BUG真多!!!!!)";
    			setpos(6,9);
    			cout <<"7.0版:第七版,在开始中又新增一张新地图(北方的冬天),新增1个方块(寒冰)                                   	";
    			setpos(6,10);
    			cout <<"8.0版:第八版,在开始中又新增一张新地图(敏捷反应),修复寒冰bug                                              	";
    			setpos(6,11);
    			cout <<"9.0版:第九版,新增商店,目前有两个商品(12.3)。                                                             	";
    			setpos(6,12);
    			cout <<"10.0版:第十版,在开始中又新增一张新地图(地板好烫脚),优化粘液块起跳动画,更新下落系统         				";
    			setpos(6,13);
    			cout <<"10.1版:第十一版,上一版出现了大BUG,所以出了10.1版补丁,目前已修理完成10.0已报告的BUG          					";
    			setpos(6,14); 
    			cout <<"11.0版:第十二版,在开始中又新增一张新地图(飞度白车),加入了呼声最高的移动方块(此处应有掌声)				";
    			setpos(6,15);
    			cout <<"12.0-14.0版:略                                                                                                 ";
    			setpos(6,16); 
    			cout <<"15.0版:Ink正式接手本游戏的制作, 加入假方块和更多关卡                                           				";
    		}
    		else if(gengpage == 2)
    		{
    			setpos(6,3);
    			cout << "15.1版:增加关卡难度评级                                                                         				"; 
    			setpos(6,4);
    			cout << "15.2版:公告系统大改,增加公告分页和gengpage选项。                                                             ";
    			setpos(6,5);
    			cout << "15.3版:对15.2版进行小的改良,修复 “并不重要”的特性。                                                        ";
    			setpos(6,6); 
    			cout << "16.0版: 增加一张地图(暗黑迷宫),并加入对应BUG级别物品:Ink的矿灯,在不购买物品情况下,成功率接近0%           ";
    			setpos(6,7);
    			cout << "16.1版:更改了亿点点16.0版遗留的问题和并没有更新到的点,削弱了暗黑迷宫的难度。                                 ";
    			setpos(6,8);
    			cout << "16.2版:加入了初始界面的版本显示(version)。开启了对本游戏的O2优化。                                          ";
    			setpos(6,9);
    			cout << "16.3版:修复了暗黑迷宫购买矿灯后遇到重生点会卡死的问题。                                                       ";
    			setpos(6,10);
    			cout << "16.4版:优化输出问题,让游戏界面更加整齐美观(至少是看起来)。将除公告外大部分\":\"换成了\":\"。添加退出游戏功能。  ";
    			setpos(6,11);
    			cout << "16.5版:yinqf对翻页系统进行小的优化。                                                                          ";
    			setpos(6,12);
    			cout << "17.0版:暗黑系列大更新,增加长地图(多个关卡合并为一张图),码量破百K。                                        ";
    			setpos(6,13);
    			cout << "17.1版:微乎其微的调整,似乎有用又似乎没有用。                                                                 ";
    			setpos(6,14);
    			cout << "17.2版:更改眼见不为真中一个方块重叠的古老BUG(在此次改动之前叫做特性)                                        ";
    			setpos(6,15);
    			cout << "17.3版:更改代码格式,但是游戏过程并没有改变。                                                                 ";
    			setpos(6,16);
    			cout << "                                                                                                               ";
    			setpos(6,17);
    			cout << "                                                                                                               ";
    			setpos(6,18);
    			cout << "                                                                                                               ";
    
    		}
    		else
    		{
    			setpos(6,3);
    			cout << "                                                                                                               "; 
    			setpos(6,4);
    			cout << "                                                                                                               ";
    			setpos(6,5);
    			cout << "                                                                                                               ";
    			setpos(6,6); 
    			cout << "                                                                                                               ";
    			setpos(6,7);
    			cout << "                                                                                                               ";
    			setpos(6,8);
    			cout << "                                                                                                               ";
    			setpos(6,9);
    			cout << "                                                                                                               ";
    			setpos(6,10);
    			cout << "                                                                                                               ";
    			setpos(6,11);
    			cout << "                                                                                                               ";
    			setpos(6,12);
    			cout << "                                                                                                               ";
    			setpos(6,13);
    			cout << "                                                                                                               ";
    			setpos(6,14);
    			cout << "                                                                                                               ";
    			setpos(6,15);
    			cout << "                                                                                                               ";
    			setpos(6,16);
    			cout << "                                                                                                               ";
    			setpos(6,17);
    			cout << "                                                                                                               ";
    			setpos(6,18);
    			cout << "                                                                                                               ";
    			setpos(29,10);
    			cout << "页面错误" << endl;
    			sleep(1);
    			gengpage = 1;
    			break;
    		}
    		setpos(2 , 2);
    		cout << "返回: r";
    		setpos(20 , 18);
    		cout << "上一页:<        下一页:>"<< endl;
    		char p = _getch();
    		if(p == 'r')
    		{
    			return ;
    		}
    		if(p == '<')
    		{
    			gengpage--;
    		}
    		if(p == '>')
    		{
    			gengpage++;
    		}
    	}
    }
    void gong()
    {
    	qing();
    	while(1)
    	{
    		setpos(2 , 2);
    		cout << "返回: r";
    		setpos(20 , 5);
    		cout << "" << endl;
    		setpos(20 , 7);
    		cout << "更新日志: g" << endl;
    		setpos(20 , 9);
    		cout << "联系: l" << endl;
    		setpos(20 , 11);
    		cout << "杂事: z" << endl;
    		char p = _getch();
    		if(p == 'r')
    		{
    			return;
    		}
    		if(p == 'g')
    		{
    			geng();
    			qing();
    		}
    		if(p == 'l')
    		{
    			lian();
    			qing();
    		}
    		if(p == 'z')
    		{
    			za();
    			qing();
    		}
    	}
    }
    void dongx(int g)
    {
    	if(dongz%2==0&&g==9)
    	{
    		setpos(dongz % 40 - 2 + 18 , 12);
    		cout << "  ";
    		dt[12][dongz % 40 / 2 - 1 + 9] = 0;
    		setpos(dongz % 40 + 18 , 12);
    		cout << "  ";
    		dt[12][dongz % 40 / 2 + 9] = 0;
    		setpos(dongz % 40 + 2 + 18 , 12);
    		cout << "  ";
    		dt[12][dongz % 40 / 2 + 1 + 9] = 0;
    		setpos(dongz % 40 + 18 , 12);
    		cout << "■";
    		dt[12][(dongz) % 40 / 2 + 9] = 1;
    		setpos(dongz % 40 + 2 + 18 , 12);
    		cout << "■";
    		dt[12][(dongz) % 40 / 2 + 1 + 9] = 1;
    		setpos(dongz % 40 + 4 + 18 , 12);
    		cout << "■";
    		dt[12][(dongz) % 40 / 2 + 2 + 9] = 1;
    	}
    }
    void win()
    {
    	qing();
    	setpos(50 , 8);
    	cout << "YOU WIN!!!";
    	sleep(3);
    }
    void g()
    {
    	char x=0;//------------------------------------------------------------------------------------------------------------
    	while(1){
    		qing();
    		setpos(2 , 2);
    		cout << "返回: r";
    		setpos(54 , 4);
    		cout << "选关:";
    		setpos(43 , 18);
    		cout << "上一页:<        下一页:>"<< endl;
    		if(guanpage == 1) 
    		{
    			setpos(42,6);
    			cout << "入门挑战:1      普及挑战:2";
    			setpos(42,8);
    			cout << "提高挑战:3                 ";
    			setpos(42,10);
    			cout << "粘液块之旅:4    无尽弹跳:5";
    			setpos(42,12);
    			cout << "北方的冬天:6    敏捷反应:7";
    			setpos(42,14);
    			cout << "地板好烫脚:8    飞度白车:9";
    			setpos(42,16);
    			cout << "眼见不为真:a    Ink的迷宫:b";
    		}
    		else if(guanpage == 2)
    		{
    			setpos(42,6);
    			cout << "冰与火之歌:c    暗黑迷宫:d";
    			setpos(42,8);
    			cout << "暗黑之域:e                 ";
    			setpos(42,10);
    			cout << "                            ";
    			setpos(42,12);
    			cout << "                            ";
    			setpos(42,14);
    			cout << "                            ";
    			setpos(42,16);
    			cout << "                            ";
    
    		}
    		else
    		{
    			setpos(42,6);
    			cout << "                            ";
    			setpos(42,8);
    			cout << "                            ";
    			setpos(42,10);
    			cout << "                            ";
    			setpos(42,12);
    			cout << "                            ";
    			setpos(42,14);
    			cout << "                            ";
    			setpos(42,16);
    			cout << "                            ";
    			setpos(42,10);
    			cout << "页面错误" << endl;
    			sleep(1);
    			guanpage = 1;
    			break;
    		}
    		x = _getch();
    		if(x == '<')
    		{
    			guanpage--;
    		}
    		else if(x == '>')
    		{
    			guanpage++;
    		}
    		if(x == 'r')
    		{
    			return;
    		}
    		else if(x >= '1' && x <= '9')
    		{
    			game(x - 48);
    		}
    		else if(x >= 'a' && x <= 'e')
    		{
    			game(x - 'a' + 10);
    		}
    		else
    		{
    			x = _getch();
    		}
    	}
    }
    void shang() {
    	qing();
    	while(1)
    	{
    		setpos(2,2);
    		cout << "返回: r";
    		setpos(10,4);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(10 , i);
    			cout << '|';
    		}
    		setpos(10 , 10);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(14 + 10 , i);
    			cout << '|';
    		}
    		setpos(12,6);
    		cout <<"秋风熬的鸡汤";
    		setpos(12,7);
    		cout <<"  0.1 RMB";
    		setpos(12,8);
    		cout <<"  购买:q";
    		setpos(30,4);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(30 , i);
    			cout << '|';
    		}
    		setpos(30 , 10);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(34 + 10 , i);
    			cout <<'|';
    		}
    		setpos(32,6);
    		cout <<"桥峰的切尔西";
    		setpos(32,7);
    		cout <<"  0.1 RMB";
    		setpos(32,8);
    		cout <<"  购买:f";
    		setpos(50,4);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(50 , i);
    			cout << '|';
    		}
    		setpos(50 , 10);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(54 + 10 , i);
    			cout << '|';
    		}
    		setpos(52,6);
    		cout <<"皮肤更改器";
    		setpos(52,7);
    		cout <<"  0.0 RMB";
    		setpos(52,8);
    		cout <<"  使用: p";
    		setpos(70,4);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(70 , i);
    			cout << '|';
    		}
    		setpos(70 , 10);
    		for(int i = 1 ; i <= 15 ; i++)
    		{
    			cout << '-';
    		}
    		for(int i = 5 ; i <= 9 ; i++)
    		{
    			setpos(74 + 10 , i);
    			cout << '|';
    		}
    		setpos(72,6);
    		cout <<"Ink的矿灯";
    		setpos(72,7);
    		cout <<"  0.1 RMB";
    		setpos(74,8);
    		cout <<"购买: i";
    		char p = _getch();
    		if(p == 'r')
    		{
    			return;
    		}
    		if(p == 'q')
    		{
    			qiufeng();
    		}
    		if(p == 'f')
    		{
    			qiaofeng();
    		}
    		if(p == 'i')
    		{
    			inklight();
    		}
    		if(p == 'p')
    		{
    			pifu();
    		}
    	}
    }
    void qiaofeng()
    {
    	qing();
    	while(1)
    	{
    		setpos(2,2);
    		cout << "返回: r";
    		setpos(20,4);
    		cout << "桥峰的切尔西";
    		setpos(20,6);
    		cout << "简介:桥峰穿上了切尔西,速通了小花的游戏";
    		setpos(20,8);
    		cout << "效果:让移动速度变快";
    		setpos(20,10);
    		cout << "价格:0.1元(人民币)";
    		setpos(20,12);
    		cout << "购买:m";
    		char p = _getch();
    		if(p == 'r')
    		{
    			qing();
    			return ;
    		}
    		if(p == 'm')
    		{
    			mai(2);
    			qing();
    		}
    	}
    }
    void qiufeng()
    {
    	qing();
    	while(1)
    	{
    		setpos(2,2);
    		cout << "返回: r";
    		setpos(20,4);
    		cout << "秋风熬的鸡汤";
    		setpos(20,6);
    		cout << "简介:秋风刚学熬汤,熬了一碗热乎的鸡汤";
    		setpos(20,8);
    		cout << "效果:让你不怕寒冰方块";
    		setpos(20,10);
    		cout << "价格:0.1元(人民币)";
    		setpos(20,12);
    		cout << "购买:m";
    		char p = _getch();
    		if(p == 'r')
    		{
    			qing();
    			return ;
    		}
    		if(p == 'm')
    		{
    			mai(1);
    			qing();
    		}
    	}
    }
    void inklight()
    {
    	qing();
    	while(1)
    	{
    		setpos(2,2);
    		cout << "返回: r";
    		setpos(20,4);
    		cout << "Ink的矿灯";
    		setpos(20,6);
    		cout << "简介:Ink作为神秘的工具制作人,制作了一个矿灯,或许暗黑迷宫会用上";
    		setpos(20,8);
    		cout << "效果:让你看清暗黑迷宫";
    		setpos(20,10);
    		cout << "价格:0.1元(人民币)";
    		setpos(20,12);
    		cout << "购买:m";
    		char p = _getch();
    		if(p == 'r')
    		{
    			qing();
    			return ;
    		}
    		if(p == 'm')
    		{
    			mai(3);
    			qing();
    		}
    	}
    }
    void mai(int x)
    {
    	string s;
    	qing();
    	if(x==1)
    	{
    		setpos(20,8);
    		cout << "请输入兑换码:";
    		setpos(20,10);
    		ShowCursor(true);
    		cin >> s;
    		ShowCursor(false);
    		if(s=="QuiFeng_zhiyin")
    		{
    			setpos(20,12);
    			cout << "购买成功";
    			dong=114594;
    		}
    		else
    		{
    			setpos(20,12);
    			cout << "购买失败";
    			dong=3;
    		}
    		sleep(2);
    		return ;
    	}
    	if(x==2)
    	{
    		setpos(20,8);
    		cout << "请输入兑换码:";
    		setpos(20,10);
    		ShowCursor(true);
    		cin >> s;
    		ShowCursor(false);
    		if(s=="Qie-Er-Xi_SU")
    		{
    			setpos(20,12);
    			cout << "购买成功";
    			jin=2;
    		}
    		else
    		{
    			setpos(20,12);
    			cout << "购买失败";
    			jin=1;
    		}
    		sleep(2);
    		return ;
    	}
    	if(x==3)
    	{
    		setpos(20,8);
    		cout << "请输入兑换码:";
    		setpos(20,10);
    		ShowCursor(true);
    		cin >> s;
    		ShowCursor(false);
    		if(s=="light_of_Ink")
    		{
    			setpos(20,12);
    			cout << "购买成功";
    			light=1;
    		}
    		else
    		{
    			setpos(20,12);
    			cout << "购买失败";
    		}
    		sleep(2);
    		return ;
    	}
    }
    void gu(int x)
    {
    	switch(x)
    	{
    		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 << "Ink的迷宫";
    			break;
    		case 12:
    			cout << "冰与火之歌";
    			break;
    		case 13:
    			cout << "暗黑迷宫";
    			break;
    		case 14:
    			cout << "暗黑之域I";
    			break;
    		case 15:
    			cout << "暗黑之域II";
    			break;
    		case 16:
    			cout << "暗黑之域III";
    			break;
    		case 17:
    			cout << "暗黑之域IV";
    			break;
    		case 18:
    			cout << "暗黑之域V";
    			break;
    	}
    }
    void gudifficult(int x)
    {
    	switch(x)
    	{
    		case 1:
    			cout << "C";
    			break; 
    		case 2:
    			cout << "C";
    			break; 
    		case 3:
    			cout << "A";
    			break; 
    		case 4:
    			cout << "C";
    			break; 
    		case 5:
    			cout << "A";
    			break;
    		case 6:
    			cout << "B";
    			break; 
    		case 7:
    			cout << "B";
    			break; 
    		case 8:
    			cout << "A";
    			break; 
    		case 9:
    			cout << "A";
    			break;
    		case 10:
    			cout << "S";
    			break; 
    		case 11:
    			cout << "A";
    			break;
    		case 12:
    			cout << "SS";
    			break;
    		case 13:
    			cout << "A";
    			break;
    		case 14:
    			cout << "B";
    			break;
    		case 15:
    			cout << "A";
    			break;
    		case 16:
    			cout << "S";
    			break;
    		case 17:
    			cout << "SS";
    			break;
    		case 18:
    			cout << "SSS";
    			break;
    	}
    }
    void bang()
    {
    	qing();
    	setpos(2,2);
    	cout << "返回:r"; 
    	setpos(10,4);
    	cout << "w:跳(上移3格) a:左(左移1格) d:右(右移1格)";
    	setpos(10,6);
    	cout << "复活点:初始在(10,6)"; 
    	setpos(10,8);
    	ball(); 
    	cout << ":玩家(就是你操控的人)       ";
    	SetColorAndBackground(4,0);
    	cout <<"■";
    	SetColorAndBackground(15,0);
    	cout <<":岩浆(让你逝世,返回复活点)";
    	setpos(10,10);
    	SetColorAndBackground(2,0);
    	cout <<"■"; 
    	SetColorAndBackground(15,0);
    	cout <<":粘液块(直接升天,上移12格) ";
    	SetColorAndBackground(5,0);
    	cout <<"■";
    	SetColorAndBackground(15,0);
    	cout << ":传送门(让你来到下一关或让你胜利)";
    	SetColorAndBackground(15,0);
    	setpos(10,12);
    	cout <<"■:普通方块(让你落脚)         ";
    	SetColorAndBackground(9,0);
    	cout <<"■";
    	SetColorAndBackground(15,0);
    	cout << ":寒冰(让你不能动2秒,三次冻死)";
    	setpos(9,14);
    	cout <<"++:存档点(让你下一次在这重生,重置复活点)";
    	SetColorAndBackground(15,0);
    	setpos(10,16);
    	cout <<"■:暗黑迷雾(看起来和普通方块一样,但玩家可以穿行其中)";
    	char p;
    	while(1){
    		p = _getch();
    		if(p == 'r')
    		{
    			return;
    		}
    	}
    }
    void gamej()
    {
    	int qx=10,qy=3,q=0,tiao=0,die=0,guan=1,kd=1,d=0,ds=0,jd=0;
    	for(int i=2;i<=18;i++)
    	{
    		for(int j=1;j<=59;j++)
    		{
    			dt[i][j]=0;
    		}
    	}
    	qing();
    	zx = qx;
    	zy = qy;
    	setpos(zy*2,zx);
    	ball();
    	zhang(guan); 
    	while(1)
    	{
    		setpos(2,2);
    		cout << "返回:r 暂停:e";
    		setpos(2,3);
    		cout << "时间:" << die/10;
    		setpos(2,4);
    		cout << "关卡:";
    		gu(guan);
    		if(dt[zx][zy]==4)
    		{
    			setpos(zy*2,zx);
    			SetColorAndBackground(4,0);
    			cout << "■";
    			SetColorAndBackground(15,0);
    			setpos(50,2);
    			cout <<"YOU DIE!      ";
    			sleep(1);
    			char f;
    			while(_kbhit())
    			{
    				f=_getch();
    			}
    			cout <<"               ";
    			qing();
    			setpos(56,10);
    			cout << "战绩:";
    			setpos(50,12);
    			cout << "时间:" << die / 10 <<"   "<< "关卡:" << guan;
    			sleep(4);
    			return;
    			kd = 1;
    			ds = 0;
    			zx = qx;
    			zy = qy;
    			setpos(zy*2,zx);
    			ball();
    		}
    		if(dt[zx][zy]==6)
    		{
    			if(guan==18)
    			{
    				qing();
    				setpos(56,10);
    				cout << "YOU WIN!!!";
    				setpos(54,12);
    				cout << "时间:" << die/10 <<"  "<< "关卡:" << guan;
    				sleep(4);
    				char f;
    				while(_kbhit()){
    					f=_getch();
    				}
    				return ;
    			}
    			else
    			{
    				qing();
    				setpos(54,8);
    				cout << "通关了!!!";
    				setpos(52,10);
    				cout << "下一关是: ";
    				gu(++guan);
    				setpos(53,12);
    				cout << "难度: ";
    				gudifficult(guan); 
    				char f;
    				sleep(3);
    				while(_kbhit())
    				{
    					f=_getch();
    				}
    				qing();
    				for(int i = 2 ; i <= 18 ; i++)
    				{
    					for(int j = 1 ; j <= 59 ; j++)
    					{
    						dt[i][j] = 0;
    					}
    				}
    				qx = 10;
    				qy = 3;
    				q = 0;
    				zx = qx;
    				zy = qy;
    				kd = 1;
    				ds = 0;
    				setpos(qy*2,qx);
    				ball();
    			}
    		}
    		if(dt[zx+1][zy]==5)
    		{
    			setpos(zy*2,zx);
    			ball();
    			usleep(50000);
    			setpos(zy*2,zx);
    			cout << "  ";
    			tiao=5; 
    		}
    		if(tiao>=3)
    		{
    			if(tiao==3)
    			{
    				tiao--;
    			}
    			setpos(zy*2,zx);
    			cout << "  ";
    			for(int i=1;i<=tiao;i++)
    			{
    				if(dt[zx-1][zy]==0||dt[zx-1][zy]==6||dt[zx-1][zy]==4){
    					zx--;
    				}
    				else
    				{
    					break;
    				}
    			}
    			if(zx<2)
    			{
    				zx=2;
    			}
    			setpos(zy*2,zx);
    			ball();
    			usleep(60000);
    			tiao--;
    		}
    		if(dt[zx][zy]==7)
    		{
    			qx=zx;
    			qy=zy;
    			setpos(50,2);
    			cout <<"重生点已设置!";
    		}
    		if(kd == 0)
    		{
    			jd++;
    		}
    		if(jd >= 3000)
    		{
    			kd = 1;
    			jd = 0;
    			d = 0;
    		}
    		if(dt[zx+1][zy]==8&&kd==1&&dong!=114594)
    		{
    			ds++;
    			SetColorAndBackground(cc,9);
    			setpos(zy*2,zx);
    			cout <<"●";
    			SetColorAndBackground(15,0);
    			int time=0;
    			while(time<=20)
    			{
    				dongz++;
    				dongx(guan);
    				usleep(90000);
    				time++;
    				die++;
    			}
    			char f;
    			while(_kbhit())
    			{
    				f = _getch();
    			}
    			SetColorAndBackground(15,0);
    			setpos(zy*2,zx);
    			ball();
    			kd = 0;
    			d = 1;
    			if(ds == dong)
    			{
    				setpos(zy*2,zx);
    				cout <<"  "; 
    				die++;
    				setpos(50,2);
    				cout <<"YOU DIE!     ";
    				sleep(1);
    				char f;
    				while(_kbhit())
    				{
    					f=_getch();
    				}
    				cout <<"              ";
    				zx=qx;
    				zy=qy;
    				setpos(zy*2,zx);
    				ball();
    				ds=0;
    			}
    		}
    		if(q==15)
    		{
    			q=0;
    			setpos(50,2);
    			cout <<"              ";
    			d=0;
    		} 
    		if(_kbhit())
    		{
    			char f=_getch();
    			if(f=='r')
    			{
    				return ;
    			}
    			if(f=='e')
    			{
    				setpos(50,2);
    				cout <<"已暂停……    ";
    				f=_getch();
    				while(f!='e')
    				{
    					f=_getch();
    				}
    				setpos(50,2);
    				cout <<"              ";
    			}
    			move(f);
    		}
    		else{
    			t++;
    			usleep(100);
    			if(t==450)
    			{
    				dongz++;
    				dongx(guan);
    				zhang(guan);
    				if(dt[zx + 1][zy] != 1 && dt[zx + 1][zy] != 2 && dt[zx + 1][zy] != 3 && dt[zx + 1][zy] != 8 && fly == 0)
    				{
    					setpos(zy*2,zx);
    				    cout <<"  ";
    				    zx++;
    					setpos(zy*2,zx);
    					ball();
    				}
    				t = 0;
    				q++;
    				die++;
    			}
    		}
    	}
    }
    void game(int guan)
    {
    	int qx=10,qy=3,q=0,tiao=0,die=0,kd=1,d=0,ds=0,jd=0;
    	for(int i=2;i<=18;i++)
    	{
    		for(int j=1;j<=59;j++)
    		{
    			dt[i][j]=0;
    		}
    	}
    	if(guan==114514)
    	{
    		return;
    	}
    	qing();
    	zx=qx;
    	zy=qy;
    	setpos(zy*2,zx);
    	ball();
    	zhang(guan); 
    	while(1)
    	{
    		setpos(2,2);
    		cout << "返回:r 暂停:e";
    		setpos(2,3);
    		cout << "死亡次数:" << die;
    		setpos(2,4);
    		cout << "关卡:";
    		setpos(8,4);
    		gu(guan);
    		setpos(2,5);
    		cout << "难度:";
    		setpos(8,5);
    		gudifficult(guan);
    		if(dt[zx][zy]==4)
    		{
    			setpos(zy*2,zx);
    			SetColorAndBackground(4,0);
    			cout << "■";
    			SetColorAndBackground(15,0);
    			die++;
    			setpos(50,2);
    			cout <<"YOU DIE!      ";
    			sleep(1);
    			char f;
    			while(_kbhit())
    			{
    				f=_getch();
    			}
    			cout <<"               ";
    			kd=1;ds=0;
    			zx=qx;
    			zy=qy;
    			setpos(zy*2,zx);
    			ball();
    		}
    		if(dt[zx][zy]==6)
    		{
    			if(guan==18)
    			{
    				win();
    				char f;
    				while(_kbhit())
    				{
    					f=_getch();
    				}
    				return ;
    			}
    			else
    			{
    				qing();
    				setpos(54,8);
    				cout << "通关了!!!";
    				setpos(52,10);
    				cout << "下一关是: ";
    				gu(++guan);
    				setpos(53,12);
    				cout << "难度: ";
    				gudifficult(guan);
    				char f;
    				sleep(3);
    				while(_kbhit())
    				{
    					f=_getch();
    				}
    				qing();
    				for(int i = 2 ; i <= 18 ; i++)
    				{
    					for(int j = 1 ; j <= 59 ; j++)
    					{
    						dt[i][j]=0;
    					}
    				}
    				qx = 10;
    				qy = 3;
    				q = 0;
    				zx = qx;
    				zy = qy;
    				kd = 1;
    				ds = 0;
    				setpos(qy * 2 , qx);
    				ball();
    			}
    		}
    		if(dt[zx+1][zy]==5)
    		{
    			setpos(zy*2,zx);
    			ball();
    			usleep(50000);
    			setpos(zy*2,zx);
    			cout << "  ";
    			tiao=5; 
    		}
    		if(tiao>=3)
    		{
    			if(tiao==3)
    			{
    				tiao--;
    			}
    			setpos(zy*2,zx);
    			cout << "  ";
    			for(int i=1;i<=tiao;i++)
    			{
    				if(dt[zx - 1][zy] == 0 || dt[zx - 1][zy] == 6 || dt[zx - 1][zy] == 4)
    				{
    					zx--;
    				}
    				else
    				{
    					break;
    				}
    			}
    			if(zx<2)
    			{
    				zx=2;
    			}
    			setpos(zy*2,zx);
    			ball();
    			usleep(60000);
    			tiao--;
    		}
    		if(dt[zx][zy]==7)
    		{
    			qx=zx;
    			qy=zy;
    			setpos(50,2);
    			cout <<"重生点已设置!";
    		}
    		if(kd==0)
    		{
    			jd++;
    		} 
    		if(jd>=3000)
    		{
    			kd=1;
    			jd=0;
    			d=0;
    		}
    		if(dt[zx+1][zy]==8&&kd==1&&dong!=114594)
    		{
    			ds++;
    			SetColorAndBackground(cc,9);
    			setpos(zy*2,zx);
    			cout <<"●";
    			SetColorAndBackground(15,0);
    			int time=0;
    			while(time<=20){
    				dongz++;
    				dongx(guan);
    				usleep(90000);
    				time++;
    			} 
    			char f;
    			while(_kbhit())
    			{
    				f=_getch();
    			}
    			SetColorAndBackground(15,0);
    			setpos(zy*2,zx);
    			ball();
    			kd=0;
    			d=1;
    			if(ds==dong)
    			{
    				setpos(zy*2,zx);
    				cout <<"  "; 
    				die++;
    				setpos(50,2);
    				cout <<"YOU DIE!     ";
    				sleep(1);
    				char f;
    				while(_kbhit()){
    					f=_getch();
    				}
    				cout <<"              ";
    				zx=qx;
    				zy=qy;
    				setpos(zy*2,zx);
    				ball();
    				ds=0;
    			}
    		}
    		if(q==15)
    		{
    			q=0;
    			setpos(50,2);
    			cout <<"              ";
    			d=0;
    		} 
    		if(_kbhit())
    		{
    			char f=_getch();
    			if(f=='r')
    			{
    				return ;
    			}
    			if(f=='e')
    			{
    				setpos(50,2);
    				cout <<"已暂停……    ";
    				f=_getch();
    				while(f!='e')
    				{
    					f=_getch();
    				}
    				setpos(50,2);
    				cout <<"              ";
    			}
    			move(f);
    		}
    		else
    		{
    			t++;
    			usleep(100);
    			if(t==450)
    			{
    				dongz++;
    				dongx(guan);
    				zhang(guan);
    				if(dt[zx + 1][zy] != 1 && dt[zx + 1][zy] != 2 && dt[zx + 1][zy] != 3 && dt[zx + 1][zy] != 8 && fly == 0)
    				{
    					setpos(zy*2,zx);
    				    cout << "  ";
    				    zx++;
    					setpos(zy*2,zx);
    					ball();
    				}
    				t=0;
    				q++;
    			}
    		}
    	}
    }
    void zhang(int g)
    {
    	if(g==1)
    	{
    		for(int i=1;i<=5;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=16;i<=19;i++)
    		{
    			dt[15][i]=1;
    			setpos(i*2,15);
    			cout <<"■";
    		}
    		for(int i=2;i<=5;i++
    		){
    			dt[i][9]=1;
    			setpos(9*2,i);
    			cout <<"■";
    		}
    		for(int i=14;i<=18;i++)
    		{
    			dt[i][32]=1;
    			setpos(32*2,i);
    			cout <<"■";
    		}
    		for(int i=27;i<=34;i++)
    		{
    			dt[8][i]=1;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=2;i<=4;i++)
    		{
    			dt[i][45]=1;
    			setpos(45*2,i);
    			cout <<"■";
    		}
    		for(int i=53;i<=59;i++)
    		{
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=1;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=18;i<=26;i++)
    		{
    			dt[8][i]=4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=46;i<=56;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=2;i<=4;i++)
    		{
    			dt[i][35]=4;
    			setpos(35*2,i);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(2,0);
    		for(int i=43;i<=52;i++)
    		{
    			dt[16][i]=5;
    			setpos(i*2,16);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(60,7);
    		cout << "++";
    		dt[7][30]=7;
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g==2)
    	{
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=10;i<=15;i++)
    		{
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=53;i<=56;i++)
    		{
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=2;i<=4;i++)
    		{
    			dt[i][35]=1;
    			setpos(35*2,i);
    			cout <<"■";
    		}
    		for(int i=35;i<=38;i++)
    		{
    			dt[5][i]=1;
    			setpos(i*2,5);
    			cout <<"■";
    		}
    		for(int i=18;i<=26;i++)
    		{
    			dt[10][i]=1;
    			setpos(i*2,10);
    			cout <<"■";
    		}
    		for(int i=32;i<=37;i++)
    		{
    			dt[14][i]=1;
    			setpos(i*2,14);
    			cout <<"■";
    		}
    		for(int i=9;i<=24;i++)
    		{
    			dt[17][i]=1;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=1;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=45;i<=49;i++)
    		{
    			dt[6][i]=4;
    			setpos(i*2,6);
    			cout <<"■";
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[i][27]=4;
    			setpos(27*2,i);
    			cout <<"■";
    		}
    		for(int i=10;i<=18;i++)
    		{
    			dt[i][27]=4;
    			setpos(27*2,i);
    			cout <<"■";
    		}
    		for(int i=4;i<=6;i++)
    		{
    			dt[i][15]=4;
    			setpos(15*2,i);
    			cout <<"■";
    		}
    		for(int i=8;i<=13;i++)
    		{
    			dt[i][15]=4;
    			setpos(15*2,i);
    			cout <<"■";
    		}
    		for(int i=18;i<=20;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		for(int i=23;i<=25;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(2,0);
    		for(int i=43;i<=52;i++)
    		{
    			dt[16][i]=5;
    			setpos(i*2,16);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(44,9);
    		cout << "++";
    		dt[9][22]=7;
    		setpos(74,4);
    		cout << "++";
    		dt[4][37]=7;
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g==3)
    	{
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=10;i<=15;i++)
    		{
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=53;i<=56;i++)
    		{
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=35;i<=38;i++)
    		{
    			dt[2][i]=1;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=35;i<=38;i++)
    		{
    			dt[5][i]=1;
    			setpos(i*2,5);
    			cout <<"■";
    		}
    		for(int i=23;i<=26;i++)
    		{
    			dt[10][i]=1;
    			setpos(i*2,10);
    			cout <<"■";
    		}
    		for(int i=9;i<=24;i++)
    		{
    			dt[17][i]=1;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=3;i<=4;i++)
    		{
    			dt[i][35]=4;
    			setpos(35*2,i);
    			cout <<"■";
    		}
    		for(int i=20;i<=22;i++)
    		{
    			dt[10][i]=4;
    			setpos(i*2,10);
    			cout <<"■";
    		}
    		for(int i=12;i<=16;i++)
    		{
    			dt[i][9]=4;
    			setpos(9*2,i);
    			cout <<"■";
    		}
    		for(int i=2;i<=5;i++)
    		{
    			dt[6][i]=4;
    			setpos(i*2,6);
    			cout <<"■";
    		}
    		for(int i=1;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=29;i<=33;i++)
    		{
    			dt[6][i]=4;
    			setpos(i*2,6);
    			cout <<"■";
    		}
    		for(int i=41;i<=49;i++)
    		{
    			dt[6][i]=4;
    			setpos(i*2,6);
    			cout <<"■";
    		}
    		for(int i=36;i<=39;i++)
    		{
    			dt[13][i]=4;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[i][27]=4;
    			setpos(27*2,i);
    			cout <<"■";
    		}
    		for(int i=10;i<=18;i++)
    		{
    			dt[i][27]=4;
    			setpos(27*2,i);
    			cout <<"■";
    		}
    		for(int i=4;i<=6;i++)
    		{
    			dt[i][15]=4;
    			setpos(15*2,i);
    			cout <<"■";
    		}
    		for(int i=8;i<=13;i++)
    		{
    			dt[i][15]=4;
    			setpos(15*2,i);
    			cout <<"■";
    		}
    		for(int i=18;i<=20;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		for(int i=23;i<=25;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(2,0);
    		for(int i=30;i<=41;i++)
    		{
    			dt[16][i]=5;
    			setpos(i*2,16);
    			cout <<"■";
    		}
    		for(int i=45;i<=54;i++)
    		{
    			dt[16][i]=5;
    			setpos(i*2,16);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(50,9);
    		cout << "++";
    		dt[9][25]=7;
    		setpos(74,4);
    		cout << "++";
    		dt[4][37]=7;
    		setpos(zy*2,zx);
    		ball();
    	} 
    	else if(g==4)
    	{
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=56;i<=58;i++)
    		{
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=30;i<=34;i++)
    		{
    			dt[12][i]=1;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=1;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=7;i<=10;i++)
    		{
    			dt[i][15]=4;
    			setpos(15*2,i);
    			cout <<"■";
    		}
    		for(int i=6;i<=14;i++)
    		{
    			dt[7][i]=4;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=19;i<=36;i++)
    		{
    			dt[7][i]=4;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=42;i<=50;i++)
    		{
    			dt[7][i]=4;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[i][50]=4;
    			setpos(50*2,i);
    			cout <<"■";
    		}
    		for(int i=51;i<=58;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(2,0);
    		for(int i=5;i<=17;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=21;i<=28;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=30;i<=41;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=45;i<=54;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(64,11);
    		cout << "++";
    		dt[11][32]=7;
    		setpos(zy*2,zx);
    		ball();
    	}
    	if(g==5)
    	{
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=56;i<=58;i++)
    		{
    			dt[8][i]=1;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=30;i<=34;i++)
    		{
    			dt[12][i]=1;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=11;i<=16;i++)
    		{
    			dt[i][7]=4;
    			setpos(7*2,i);
    			cout <<"■";
    		}
    		for(int i=11;i<=13;i++)
    		{
    			dt[14][i]=4;
    			setpos(i*2,14);
    			cout <<"■";
    		}
    		for(int i=25;i<=28;i++)
    		{
    			dt[8][i]=4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=22;i<=30;i++)
    		{
    			dt[6][i]=4;
    			setpos(i*2,6);
    			cout <<"■";
    		}
    		for(int i=22;i<=30;i++)
    		{
    			dt[5][i]=4;
    			setpos(i*2,5);
    			cout <<"■";
    		}
    		for(int i=22;i<=30;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(2,0);
    		for(int i=7;i<=10;i++)
    		{
    			dt[i][15]=5;
    			setpos(15*2,i);
    			cout <<"■";
    		}
    		for(int i=6;i<=14;i++)
    		{
    			dt[7][i]=5;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=19;i<=36;i++)
    		{
    			dt[7][i]=5;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=42;i<=50;i++)
    		{
    			dt[7][i]=5;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[i][50]=5;
    			setpos(50*2,i);
    			cout <<"■";
    		}
    		for(int i=51;i<=56;i++)
    		{
    			dt[2][i]=5;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=5;i<=17;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=21;i<=28;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=30;i<=41;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=20;i<=25;i++)
    		{
    			dt[13][i]=5;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i=11;i<=17;i++)
    		{
    			dt[i][41]=5;
    			setpos(41*2,i);
    			cout <<"■";
    		}
    		for(int i=9;i<=17;i++)
    		{
    			dt[i][54]=5;
    			setpos(54*2,i);
    			cout <<"■";
    		}
    		for(int i=8;i<=14;i++)
    		{
    			dt[i][48]=5;
    			setpos(48*2,i);
    			cout <<"■";
    		}
    		for(int i=43;i<=45;i++)
    		{
    			dt[12][i]=5;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i=45;i<=54;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(64,11);
    		cout << "++";
    		dt[11][32]=7;
    		setpos(zy*2,zx);
    		ball();
    	} 
    	else if(g==6)
    	{
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=56;i<=58;i++)
    		{
    			dt[8][i]=1;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=30;i<=34;i++)
    		{
    			dt[12][i]=1;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=11;i<=16;i++)
    		{
    			dt[i][7]=4;
    			setpos(7*2,i);
    			cout <<"■";
    		}
    		for(int i=25;i<=28;i++)
    		{
    			dt[8][i]=4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(9,0);
    		for(int i=38;i<=40;i++)
    		{
    			dt[11][i]=8;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=14;i<=17;i++)
    		{
    			dt[i][25]=8;
    			setpos(25*2,i); 
    			cout <<"■";
    		}
    		for(int i=10;i<=12;i++)
    		{
    			dt[i][20]=8;
    			setpos(20*2,i); 
    			cout <<"■";
    		}
    		for(int i=11;i<=13;i++)
    		{
    			dt[14][i]=8;
    			setpos(i*2,14);
    			cout <<"■";
    		}
    		for(int i=7;i<=10;i++)
    		{
    			dt[i][15]=8;
    			setpos(15*2,i);
    			cout <<"■";
    		}
    		for(int i=6;i<=14;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=19;i<=36;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=42;i<=50;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[i][50]=8;
    			setpos(50*2,i);
    			cout <<"■";
    		}
    		for(int i=51;i<=56;i++)
    		{
    			dt[2][i]=8;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=5;i<=17;i++)
    		{
    			dt[17][i]=8;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=21;i<=28;i++)
    		{
    			dt[17][i]=8;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=30;i<=41;i++)
    		{
    			dt[17][i]=8;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=20;i<=25;i++)
    		{
    			dt[13][i]=8;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i=11;i<=17;i++)
    		{
    			dt[i][41]=8;
    			setpos(41*2,i);
    			cout <<"■";
    		}
    		for(int i=9;i<=17;i++)
    		{
    			dt[i][54]=8;
    			setpos(54*2,i);
    			cout <<"■";
    		}
    		for(int i=8;i<=14;i++)
    		{
    			dt[i][48]=8;
    			setpos(48*2,i);
    			cout <<"■";
    		}
    		for(int i=43;i<=45;i++)
    		{
    			dt[12][i]=8;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i=45;i<=54;i++)
    		{
    			dt[17][i]=8;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(64,11);
    		cout << "++";
    		dt[11][32]=7;
    		setpos(zy*2,zx);
    		ball();
    	} 
    	else if(g==7){
    		for(int i=11;i<=13;i++)
    		{
    			dt[16][i]=1;
    			setpos(i*2,16);
    			cout <<"■";
    		}
    		for(int i=18;i<=20;i++)
    		{
    			dt[13][i]=1;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i=56;i<=58;i++)
    		{
    			dt[8][i]=1;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		SetColorAndBackground(2,0);
    		for(int i=42;i<=44;i++)
    		{
    			dt[15][i]=5;
    			setpos(i*2,15);
    			cout <<"■";
    		}
    		for(int i=47;i<=52;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=16;i<=18;i++)
    		{
    			dt[i][32]=4;
    			setpos(32*2,i); 
    			cout <<"■";
    		}
    		for(int i=14;i<=18;i++)
    		{
    			dt[i][25]=4;
    			setpos(25*2,i); 
    			cout <<"■";
    		}
    		for(int i=29;i<=50;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		for(int i=51;i<=56;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=2;i<=3;i++)
    		{
    			dt[i][50]=4;
    			setpos(50*2,i);
    			cout <<"■";
    		}
    		for(int i=11;i<=16;i++)
    		{
    			dt[i][7]=4;
    			setpos(7*2,i);
    			cout <<"■";
    		}
    		for(int i=25;i<=28;i++)
    		{
    			dt[8][i]=4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4 ;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(9,0);
    		for(int i=53;i<=55;i++)
    		{
    			dt[8][i]=8;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=14;i<=17;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=8;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=30;i<=34;i++)
    		{
    			dt[12][i]=8;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i=38;i<=40;i++)
    		{
    			dt[11][i]=8;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(64,11);
    		cout << "++";
    		dt[11][32]=7;
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g==8)
    	{
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=56;i<=58;i++)
    		{
    			dt[8][i]=1;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=30;i<=34;i++)
    		{
    			dt[12][i]=1;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		SetColorAndBackground(2,0);
    		for(int i=42;i<=44;i++)
    		{
    			dt[15][i]=5;
    			setpos(i*2,15);
    			cout <<"■";
    		}
    		for(int i=47;i<=52;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=16;i<=18;i++)
    		{
    			dt[i][32]=4;
    			setpos(32*2,i); 
    			cout <<"■";
    		}
    		for(int i=14;i<=18;i++)
    		{
    			dt[i][25]=4;
    			setpos(25*2,i); 
    			cout <<"■";
    		}
    		for(int i=29;i<=50;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		for(int i=51;i<=56;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=2;i<=3;i++)
    		{
    			dt[i][50]=4;
    			setpos(50*2,i);
    			cout <<"■";
    		}
    		for(int i=11;i<=16;i++)
    		{
    			dt[i][7]=4;
    			setpos(7*2,i);
    			cout <<"■";
    		}
    		for(int i=25;i<=28;i++)
    		{
    			dt[8][i]=4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=11;i<=13;i++)
    		{
    			dt[16][i]=4;
    			setpos(i*2,16);
    			cout <<"■";
    		}
    		for(int i=18;i<=20;i++)
    		{
    			dt[13][i]=4;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i=12;i<=14;i++)
    		{
    			dt[12][i]=4;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i=11;i<=13;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=20;i<=23;i++)
    		{
    			dt[3][i]=4;
    			setpos(i*2,3);
    			cout <<"■";
    		}
    		for(int i=4;i<=6;i++)
    		{
    			dt[6][i]=4;
    			setpos(i*2,6);
    			cout <<"■";
    		}
    		for(int i=10;i<=11;i++)
    		{
    			dt[i][34]=4;
    			setpos(34*2,i);
    			cout <<"■";
    		}
    		for(int i=39;i<=42;i++)
    		{
    			dt[7][i]=4;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=37;i<=40;i++)
    		{
    			dt[13][i]=4;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i=45;i<=46;i++)
    		{
    			dt[11][i]=4;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=4;i<=8;i++)
    		{
    			dt[i][49]=4;
    			setpos(49*2,i);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(9,0);
    		for(int i=53;i<=55;i++)
    		{
    			dt[8][i]=8;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=14;i<=17;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(64,11);
    		cout << "++";
    		dt[11][32]=7;
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g==9){
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=56;i<=58;i++)
    		{
    			dt[8][i]=1;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=30;i<=34;i++)
    		{
    			dt[12][i]=1;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		SetColorAndBackground(2,0);
    		for(int i=47;i<=52;i++)
    		{
    			dt[17][i]=5;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=13;i<=30;i++)
    		{
    			dt[10][i]=4;
    			setpos(i*2,10);
    			cout <<"■";
    		}
    		for(int i=2;i<=9;i++)
    		{
    			dt[i][23]=4;
    			setpos(23*2,i);
    			cout <<"■";
    		}
    		for(int i=11;i<=16;i++)
    		{
    			dt[i][7]=4;
    			setpos(7*2,i);
    			cout <<"■";
    		}
    		for(int i=11;i<=18;i++)
    		{
    			dt[i][41]=4;
    			setpos(41*2,i);
    			cout <<"■";
    		}
    		for(int i=45;i<=53;i++)
    		{
    			dt[5][i]=4;
    			setpos(i*2,5);
    			cout <<"■";
    		}
    		for(int i=8;i<=34;i++)
    		{
    			dt[14][i]=4;
    			setpos(i*2,14);
    			cout <<"■";
    		}
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(9,0);
    		for(int i=14;i<=17;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(64,11);
    		cout << "++";
    		dt[11][32]=7;
    		setpos(zy*2,zx);
    		ball();
    	} 
    	else if(g==10){
    		for(int i=29;i<=50;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		for(int i=51;i<=56;i++)
    		{
    			dt[2][i]=5;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=2;i<=3;i++)
    		{
    			dt[i][50]=4;
    			setpos(50*2,i);
    			cout <<"■";
    		}
    		for(int i=25;i<=28;i++)
    		{
    			dt[8][i]=8;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=12;i<=14;i++)
    		{
    			dt[12][i]=4;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i=11;i<=13;i++)
    		{
    			dt[2][i]=5;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=4;i<=6;i++)
    		{
    			dt[6][i]=4;
    			setpos(i*2,6);
    			cout <<"■";
    		}
    		for(int i=10;i<=11;i++)
    		{
    			dt[i][34]=4;
    			setpos(34*2,i);
    			cout <<"■";
    		}
    		for(int i=39;i<=42;i++)
    		{
    			dt[7][i]=4;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=37;i<=40;i++)
    		{
    			dt[13][i]=5;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i=45;i<=46;i++)
    		{
    			dt[11][i]=4;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		SetColorAndBackground(2,0);
    		for(int i=42;i<=44;i++)
    		{
    			dt[15][i]=5;
    			setpos(i*2,15);
    			cout <<"■";
    		}
    		SetColorAndBackground(4,0);
    		for(int i=20;i<=23;i++)
    		{
    			dt[3][i]=8;
    			setpos(i*2,3);
    			cout <<"■";
    		}
    		for(int i=11;i<=13;i++)
    		{
    			dt[16][i]=4;
    			setpos(i*2,16);
    			cout <<"■";
    		}
    		for(int i=47;i<=52;i++)
    		{
    			dt[17][i]=1;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i=11;i<=16;i++)
    		{
    			dt[i][7]=1;
    			setpos(7*2,i);
    			cout <<"■";
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=56;i<=58;i++)
    		{
    			dt[8][i]=4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=30;i<=34;i++)
    		{
    			dt[12][i]=1;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i=2;i<=28;i++)
    		{
    			dt[19][i]=1;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=28;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=5;i<=8;i++)
    		{
    			dt[i][49]=4;
    			setpos(98,i);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		for(int i=14;i<=17;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=18;i<=20;i++)
    		{
    			dt[13][i]=4;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		SetColorAndBackground(9,0);
    		for(int i=53;i<=55;i++)
    		{
    			dt[8][i]=8;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);
    		setpos(64,11);
    		cout << "++";
    		dt[11][32]=7;
    		setpos(zy*2,zx);
    		ball();
    	}
    	//11guan----------------------------------0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	else if(g == 11)
    	{
    		SetColorAndBackground(15,0);//白 
            for(int i=2;i<=6;i++){
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i = 3 ; i < 54 ; i += 2)
    		{
    			dt[17][i]=1;
    			setpos(i*2,17);
    			cout <<"■";
    		}
    		for(int i = 10 ; i < 56 ; i += 2)
    		{
    			dt[12][i]=1;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i = 19 ; i < 60 ; i += 2)
    		{
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		} 
    		SetColorAndBackground(2,0);//绿
    		for(int i = 54 ; i < 60 ; i++)
    		{
    			dt[17][i] = 5;
    			setpos(i * 2 , 17);
    			cout << "■";
    		}
    		SetColorAndBackground(4,0);//红 
    		for(int i=10;i<=54;i++){
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i = 18 ; i < 60 ; i += 2)
    		{
    			dt[7][i]=4;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i = 2 ; i < 54 ; i += 2)
    		{
    			if(i == 32)
    			{
    				SetColorAndBackground(15,0);
    				dt[17][i]=1;
    				setpos(i*2,17);
    				cout <<"■";
    				SetColorAndBackground(4,0);
    			}
    			else
    			{
    				dt[17][i]=4;
    				setpos(i*2,17);
    				cout <<"■";
    			}
    		}
    		for(int i = 11 ; i < 54 ; i += 2)
    		{
    			if(i == 29)
    			{
    				SetColorAndBackground(15,0);
    				dt[2][i]=1;
    				setpos(i*2,12);
    				cout <<"■";
    				SetColorAndBackground(4,0);
    			}
    			else
    			{
    				dt[12][i]=4;
    				setpos(i*2,12);
    				cout <<"■";
    			}
    
    		}
    		for(int i=2;i<=12;i++){
    			dt[i][9]=4;
    			setpos(9*2,i);
    			cout <<"■";
    		}
    		for(int i=2;i<=58;i++){
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);//紫 
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(9,0);//蓝 
            for(int i=13;i<=17;i++)
    		{
    			dt[7][i]=8;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);//重生 
    		setpos(64,16);
    		cout << "++";
    		dt[16][32]=7;
    		setpos(zy*2,zx);
    		setpos(56,11);
    		cout << "++";
    		dt[11][28]=7;
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g == 12)//12guan--------------------------------------------------------------0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	{
    		SetColorAndBackground(15,0);//白 
            for(int i=2;i<=7;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i=23;i<=34;i++)
    		{
    			dt[10][i]=1;
    			setpos(i * 2,10);
    			cout <<"■";
    		}
    		for(int i=2;i<=7;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		dt[12][26]=1;
    		setpos(52,12);
    		cout <<"■";
    		dt[12][28]=1;
    		setpos(56,12);
    		cout <<"■";
    		dt[12][32]=1;
    		setpos(64,12);
    		cout <<"■";
    		dt[12][35]=1;
    		setpos(70,12);
    		cout <<"■";
    		dt[12][36]=1;
    		setpos(72,12);
    		cout <<"■";
    		dt[12][38]=1;
    		setpos(76,12);
    		cout <<"■";
    		dt[12][42]=1;
    		setpos(84,12);
    		cout <<"■";
    		for(int i = 24 ; i <= 51 ; i += 2)
    		{
    			dt[18][i]=1;
    			setpos(2 * i,18);
    			cout <<"■";
    		}
    		SetColorAndBackground(2,0);//绿
    		for(int i=18;i<=22;i++)
    		{
    			dt[18][i]=5;
    			setpos(i*2,18);
    			cout <<"■";
    		}
    		for(int i=35;i<=40;i++)
    		{
    			dt[4][i]=5;
    			setpos(i * 2,4);
    			cout <<"■";
    		}
    		for(int i=7;i<=15;i++)
    		{
    			if(i == 11)
    			{
    				continue;
    			}
    			dt[7][i]=1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=9;i<=4;i++)
    		{
    			dt[4][i]=5;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    
    		SetColorAndBackground(5,0);//紫 
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(9,0);//蓝 
    		for(int i=5;i<=10;i++)
    		{
    			dt[i][35]=1;
    			setpos(70,i);
    			cout <<"■";
    		}
    		for(int i=11;i<=18;i++)
    		{
    			dt[i][23]=4;
    			setpos(46,i);
    			cout <<"■";
    		}
    		for(int i = 25 ; i <= 50 ; i += 2)
    		{
    			dt[18][i]=8;
    			setpos(2 * i,18);
    			cout <<"■";
    		}
    		for(int i = 4 ; i < 16 ; i += 3)
    		{
    			if(i % 2 == 0)
    			{
    				for(int j = 50 ; j < 60 ; j += 2)
    				{
    					if(j % 4 == 0)
    					{
    						dt[i][j]=8;
    						setpos(2 * j,i);
    						cout <<"■";
    						continue;
    					}
    					SetColorAndBackground(2,0);
    					dt[i][j]=5;
    					setpos(2 * j,i);
    					cout <<"■";
    					SetColorAndBackground(9,0);
    				}
    				continue;
    			}
    			for(int j = 49 ; j < 59 ; j += 2)
    			{
    				if(j % 4 == 3)
    				{
    					dt[i][j]=8;
    					setpos(2 * j,i);
    					cout <<"■";
    					continue;
    				}
    				SetColorAndBackground(2,0);
    				dt[i][j]=5;
    				setpos(2 * j,i);
    				cout <<"■";
    				SetColorAndBackground(9,0);
    			}
    		}
    		//y
    		dt[12][25]=8;
    		setpos(50,12);
    		cout <<"■";
    		dt[13][25]=8;
    		setpos(50,13);
    		cout <<"■";
    		dt[12][27]=8;
    		setpos(54,12);
    		cout <<"■";
    		dt[13][27]=8;
    		setpos(54,13);
    		cout <<"■";
    		dt[14][26]=8;
    		setpos(52,14);
    		cout <<"■";
    		dt[15][26]=8;
    		setpos(52,15);
    		cout <<"■";
    		//i
    		dt[12][29]=8;
    		setpos(58,12);
    		cout <<"■";
    		dt[12][30]=8;
    		setpos(60,12);
    		cout <<"■";
    		dt[12][31]=8;
    		setpos(62,12);
    		cout <<"■";
    		dt[15][29]=8;
    		setpos(58,15);
    		cout <<"■";
    		dt[15][30]=8;
    		setpos(60,15);
    		cout <<"■";
    		dt[15][31]=8;
    		setpos(62,15);
    		cout <<"■";
    		dt[13][30]=8;
    		setpos(60,13);
    		cout <<"■";
    		dt[14][30]=8;
    		setpos(60,14);
    		cout <<"■";
    		//n
    		dt[12][33]=8;
    		setpos(66,12);
    		cout <<"■";
    		dt[13][33]=8;
    		setpos(66,13);
    		cout <<"■";
    		dt[14][33]=8;
    		setpos(66,14);
    		cout <<"■";
    		dt[15][33]=8;
    		setpos(66,15);
    		cout <<"■";
    		dt[12][37]=8;
    		setpos(74,12);
    		cout <<"■";
    		dt[13][37]=8;
    		setpos(74,13);
    		cout <<"■";
    		dt[14][37]=8;
    		setpos(74,14);
    		cout <<"■";
    		dt[15][37]=8;
    		setpos(74,15);
    		cout <<"■";
    		dt[12][34]=8;
    		setpos(68,12);
    		cout <<"■";
    		dt[15][36]=8;
    		setpos(72,15);
    		cout <<"■";
    		dt[13][35]=8;
    		setpos(70,13);
    		cout <<"■";
    		dt[14][35]=8;
    		setpos(70,14);
    		cout <<"■";
    		//q
    		for(int i = 12 ; i <= 14 ; i++)
    		{
    			for(int j = 39 ; j <= 41 ; j++)
    			{
    				if(i == 13 && j == 40)
    				{
    					dt[15][41]=8;
    					setpos(82,15);
    					cout <<"■";
    					continue;
    				}
    				dt[i][j]=8;
    				setpos(2 * j,i);
    				cout <<"■";
    			}
    		}
    		//f
    		for(int i = 12 ; i <= 14 ; i++)
    		{
    			for(int j = 43 ; j <= 45 ; j++)
    			{
    				if(i == 13 && j == 44)
    				{
    					j++;
    					dt[15][43]=8;
    					setpos(86,15);
    					cout <<"■";
    					continue;
    				}
    				dt[i][j]=8;
    				setpos(2 * j,i);
    				cout <<"■";
    			}
    		}
    		SetColorAndBackground(4,0);//红 
            for(int i=2;i<=58;i++){
            	if(i >= 9 && i <= 11)
            	{
            		SetColorAndBackground(9,0);
            		dt[19][i]=8;
    				setpos(i*2,19);
    				cout <<"■";
            		SetColorAndBackground(4,0);
    			}
    			else
    			{
    				dt[19][i]=4;
    				setpos(i*2,19);
    				cout <<"■";
    			}
    		}
    		for(int i=2;i<=6;i++)
    		{
    			dt[7][i]=4;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		for(int i=9;i<=17;i++)
    		{
    			dt[4][i]=4;
    			setpos(i*2,4);
    			cout <<"■";
    		}
    		for(int i=12;i<=18;i++)
    		{
    			dt[i][7]=4;
    			setpos(14,i);
    			cout <<"■";
    		}
    		for(int i=8;i<=17;i += 3)
    		{
    			dt[i][12]=4;
    			setpos(24,i);
    			cout <<"■";
    		}
    		for(int i=9;i<=18;i += 3)
    		{
    			dt[i][13]=4;
    			setpos(26,i);
    			cout <<"■";
    		}
    		for(int i=10;i<=19;i += 3)
    		{
    			dt[i][14]=4;
    			setpos(28,i);
    			cout <<"■";
    		}
    		for(int i=2;i<=15;i += 3)
    		{
    			dt[i][46]=4;
    			setpos(92,i);
    			cout <<"■";
    		}
    		for(int i=3;i<=15;i += 3)
    		{
    			dt[i][47]=4;
    			setpos(94,i);
    			cout <<"■";
    		}
    		for(int i=4;i<=16;i += 3)
    		{
    			dt[i][48]=4;
    			setpos(96,i);
    			cout <<"■";
    		}
    		for(int i=8;i<=16;i++)
    		{
    			dt[i][10]=4;
    			setpos(20,i);
    			cout <<"■";
    		}
    		for(int i=2;i<=8;i++)
    		{
    			dt[i][20]=4;
    			setpos(40,i);
    			cout <<"■";
    		}
    		for(int i = 6 ; i <= 9 ; i += 2)
    		{
    			for(int j = 36 ; j < 44 ; j++)
    			{
    				dt[i][j]=4;
    				setpos(2 * j,i);
    				cout <<"■";
    			}
    		}
    		dt[2][19]=4;
    		setpos(38,2);
    		cout <<"■";
    		dt[2][21]=4;
    		setpos(42,2);
    		cout <<"■";
    		dt[8][19]=4;
    		setpos(38,8);
    		cout <<"■";
    		dt[8][21]=4;
    		setpos(42,8);
    		cout <<"■";
    		for(int i=2;i<=8;i++)
    		{
    			dt[i][24]=4;
    			setpos(48,i);
    			cout <<"■";
    		}
    		dt[2][25]=4;
    		setpos(50,2);
    		cout <<"■";
    		dt[8][27]=4;
    		setpos(54,8);
    		cout <<"■";
    		for(int i=2;i<=8;i++)
    		{
    			if(i == 5)
    			{
    				dt[i][31]=4;
    				setpos(62,i);
    				cout <<"■";
    				continue;
    			}
    			dt[i][32]=4;
    			setpos(64,i);
    			cout <<"■";
    		}
    		for(int i=3;i<=7;i++)
    		{
    			dt[i][26]=4;
    			setpos(52,i);
    			cout <<"■";
    		}
    		for(int i=2;i<=8;i++)
    		{
    			dt[i][28]=4;
    			setpos(56,i);
    			cout <<"■";
    		}
    		for(int i=2;i<=8;i++)
    		{
    			dt[i][30]=4;
    			setpos(60,i);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);//重生 
    		dt[9][28]=7;
    		setpos(56,9);
    		cout <<"++";
    		dt[11][35]=7;
    		setpos(70,11);
    		cout <<"++";
    		dt[17][26]=7;
    		setpos(52,17);
    		cout <<"++";
    		dt[17][51]=7;
    		setpos(102,17);
    		cout <<"++";
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g == 13)//0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	{
    		SetColorAndBackground(1,0);
    		dt[2][56] = 8;
    		setpos(112 , 2);
    		cout << "■";
    		if(light == 1)
    		{
    			SetColorAndBackground(15,0);
    			for(int i=2;i<=6;i++){
    				dt[11][i]=1;
    				setpos(i*2,11);
    				cout <<"■";
    			}
    			for(int i = 4 ; i < 17 ; i += 2)
    			{
    				for(int j = 10 ; j < 55 ; j += 2)
    				{
    					dt[i][j] = 1;
    					setpos(j * 2 , i);
    					cout << "■";
    				}
    			}
    			for(int j = 10 ; j < 55 ; j += 2)
    			{
    				if(j%4 == 2)
    				{
    					for(int i = 7 ; i < 17 ; i += 8)
    					{
    						dt[i][j] = 1;
    						setpos(j * 2 , i);
    						cout << "■";
    					}
    				}
    				else
    				{
    					for(int i = 9 ; i < 17 ; i += 8)
    					{
    						dt[i][j] = 1;
    						setpos(j * 2 , i);
    						cout << "■";
    					}
    				}
    			}
    			SetColorAndBackground(4,0);
    			for(int i=2;i<=58;i++)
    			{
    				dt[19][i]=4;
    				setpos(i*2,19);
    				cout <<"■";
    			}
    			for(int i=9;i<=56;i++)
    			{
    				dt[3][i]=4;
    				setpos(i*2,3);
    				cout <<"■";
    			}
    			for(int i = 10 ; i < 54 ; i += 2)
    			{
    				if(i%4 == 0)
    				{
    					dt[17][i] = 4;
    					setpos(i*2,17);
    					cout <<"■";
    				}
    				else
    				{
    					dt[18][i] = 4;
    					setpos(i*2,18);
    					cout <<"■";
    				}
    			}
    			for(int i = 11 ; i < 55 ; i += 2)
    			{
    				dt[16][i] = 4;
    				setpos(i*2,16);
    				cout << "■";
    			}
    			for(int i = 5 ; i < 17 ; i+=2)
    			{
    				if(i%4==1)
    				{
    					for(int j = 10 ; j < 55 ; j += 4)
    					{
    						dt[i][j] = 4;
    						setpos(j * 2 , i);
    						cout << "■";
    					}
    				}
    				else
    				{
    					for(int j = 12 ; j < 55 ; j += 4)
    					{
    						dt[i][j] = 4;
    						setpos(j * 2 , i);
    						cout << "■";
    					}
    				}
    			}
    			SetColorAndBackground(5,0);
    			dt[2][58]=6;
    			dt[3][58]=6;
    			dt[2][57]=6;
    			dt[3][57]=6;
    			setpos(116,2);
    			cout <<"■";
    			setpos(116,3);
    			cout <<"■";
    			setpos(114,2);
    			cout <<"■";
    			setpos(114,3);
    			cout <<"■";
    			SetColorAndBackground(2,0);
    			for(int i = 54 ; i <= 58 ; i++)
    			{
    				dt[18][i] = 5;
    				setpos(i * 2 , 18);
    				cout << "■";
    			}
    			SetColorAndBackground(15,0);//重生 
    			for(int i = 11 ; i < 55 ; i += 2)
    			{
    				dt[14][i] = 7;
    				setpos(i * 2 , 14);
    				cout << "++";
    			}
    			setpos(zy*2,zx);
    			ball();
    		}
    		else
    		{
    			SetColorAndBackground(15,0);
    			for(int i=2;i<=6;i++)
    			{
    				dt[11][i]=1;
    				setpos(i*2,11);
    				cout <<"■";
    			}
    			for(int i = 4 ; i < 17 ; i += 2)
    			{
    				for(int j = 10 ; j < 55 ; j += 2)
    				{
    					dt[i][j] = 1;
    				}
    			}
    			for(int j = 10 ; j < 55 ; j += 2)
    			{
    				if(j%4 == 2)
    				{
    					for(int i = 7 ; i < 17 ; i += 8)
    					{
    						dt[i][j] = 1;
    					}
    				}
    				else
    				{
    					for(int i = 9 ; i < 17 ; i += 8)
    					{
    						dt[i][j] = 1;
    					}
    				}
    			}
    			SetColorAndBackground(4,0);
    			for(int i=2;i<=58;i++)
    			{
    				dt[19][i]=4;
    				setpos(i*2,19);
    				cout <<"■";
    			}
    			for(int i=9;i<=56;i++)
    			{
    				dt[3][i]=4;
    				setpos(i*2,3);
    				cout <<"■";
    			}
    			for(int i = 10 ; i < 54 ; i += 2)
    			{
    				if(i%4 == 0)
    				{
    					dt[17][i] = 4;
    					setpos(i*2,17);
    					cout <<"■";
    				}
    				else
    				{
    					dt[18][i] = 4;
    					setpos(i*2,18);
    					cout <<"■";
    				}
    			}
    			for(int i = 11 ; i < 55 ; i += 2)
    			{
    				dt[16][i] = 4;
    			}
    			for(int i = 5 ; i < 17 ; i+=2)
    			{
    				if(i%4==1)
    				{
    					for(int j = 10 ; j < 55 ; j += 4)
    					{
    						dt[i][j] = 4;
    					}
    				}
    				else
    				{
    					for(int j = 12 ; j < 55 ; j += 4)
    					{
    						dt[i][j] = 4;
    					}
    				}
    			}
    			SetColorAndBackground(5,0);
    			dt[2][58]=6;
    			dt[3][58]=6;
    			dt[2][57]=6;
    			dt[3][57]=6;
    			setpos(116,2);
    			cout <<"■";
    			setpos(116,3);
    			cout <<"■";
    			setpos(114,2);
    			cout <<"■";
    			setpos(114,3);
    			cout <<"■";
    			SetColorAndBackground(2,0);
    			for(int i = 54 ; i <= 58 ; i++)
    			{
    				dt[18][i] = 5;
    				setpos(i * 2 , 18);
    				cout << "■";
    			}
    			SetColorAndBackground(15,0);
    			for(int i = 4 ; i < 17 ; i++)
    			{
    				for(int j = 10 ; j < 55 ; j++)
    				{
    					if(i == 14 && j%2 == 1)
    					{
    						dt[i][j] = 7;
    						setpos(j * 2 , i);
    						cout << "++";
    					}
    					else
    					{
    						setpos(j * 2 , i);
    						cout << "■";
    					}
    				}
    			}
    			setpos(zy*2,zx);
    			ball();
    		}
    	}
    	else if(g == 14)//0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	{
    		SetColorAndBackground(15,0);//白 
            for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i = 27 ; i < 34 ; i++)
    		{
    			dt[7][i] = 1;
    			setpos(i*2,7);
    			cout <<"■";
    		}
    		SetColorAndBackground(2,0);//绿
    		for(int i = 54 ; i < 60 ; i++)
    		{
    			dt[17][i] = 5;
    			setpos(i * 2 , 17);
    			cout << "■";
    		}
    		dt[12][14] = 5;
    		setpos(28 , 12);
    		cout << "■";
    		dt[12][16] = 5;
    		setpos(32 , 12);
    		cout << "■";
    		for(int i = 12 ; i < 18 ; i++)
    		{
    			dt[17][i] = 5;
    			setpos(i * 2 , 17);
    			cout << "■";
    		}
    		SetColorAndBackground(4,0);//红 
    		for(int i=10;i<=54;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i = 12 ; i < 18 ; i++)
    		{
    			dt[13][i] = 4;
    			setpos(i*2,13);
    			cout <<"■";
    		}
    		for(int i = 6 ; i < 9 ; i++)
    		{
    			dt[i][17] = 4;
    			setpos(34,i);
    			cout <<"■";
    		}
    		for(int i = 14 ; i < 19 ; i++)
    		{
    			dt[9][i] = 4;
    			setpos(i*2,9);
    			cout <<"■";
    		}
    		for(int i = 19 ; i < 27 ; i++)
    		{
    			dt[12][i] = 4;
    			setpos(i*2,12);
    			cout <<"■";
    		}
    		for(int i = 28 ; i < 34 ; i++)
    		{
    			dt[8][i] = 4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i = 3 ; i < 16 ; i++)
    		{
    			if(i%2==0)
    			{
    				dt[i][27] = 4;
    				setpos(54,i);
    				cout <<"■";
    			}
    		}
    		for(int i = 26 ; i < 40 ; i++)
    		{
    			for(int j = 8 ; j < 20 ; j++)
    			{
    				if(i + j == 47)
    				{
    					dt[j][i] = 4;
    					setpos(i*2,j);
    					cout <<"■";
    				}
    			}
    		}
    		SetColorAndBackground(5,0);//紫 
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(15,0);//重生
    		dt[6][30]=7;
    		setpos(60,6);
    		cout <<"++";
    		if(light == 1)
    		{
    			for(int i = 42 ; i < 54 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i%4 == 1 && j % 4 == 2)
    					{
    						SetColorAndBackground(4,0);
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    					else if(i%4 ==3 && j%4 == 0)
    					{
    						SetColorAndBackground(15,0);
    						dt[j][i]=1;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    		}
    		else
    		{
    			for(int i = 42 ; i < 54 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i%4 == 1 && j % 4 == 2)
    					{
    						dt[j][i]=4;
    					}
    					else if(i%4 ==3 && j%4 == 0)
    					{
    						dt[j][i]=1;
    					}
    				}
    			}
    			SetColorAndBackground(15,0);
    			for(int i = 42 ; i < 54 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					setpos(i * 2  , j);
    					cout << "■";
    				}
    			}
    		}
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g == 15)//0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	{
    		SetColorAndBackground(15,0);//白 
            for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i = 9 ; i < 55 ; i++)
    		{
    			if(i%4 == 2)
    			{
    				dt[18][i] = 1;
    				setpos(i * 2 , 18);
    				cout <<"■";
    			}
    		}
    		for(int i = 56 ; i < 59 ; i++)
    		{
    			dt[18][i] = 1;
    			setpos(i * 2 , 18);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);//重生
    		for(int i = 10 ; i < 55 ; i++)
    		{
    			if(i%8 == 6)
    			{
    				dt[17][i]=7;
    				setpos(i*2,17);
    				cout <<"++";
    			}
    		}
    		dt[17][57]=7;
    		setpos(114,17);
    		cout <<"++";
    		SetColorAndBackground(9,0);
    		for(int i = 9 ; i < 57 ; i++)
    		{
    			if(i%2 == 1)
    			{
    				dt[18][i] = 8;
    				setpos(i * 2 , 18);
    				cout <<"■";
    			}
    		}
    		SetColorAndBackground(4,0);//红 
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=9;i<56;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);//紫 
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		SetColorAndBackground(4,0);
    		if(light == 1)
    		{
    			for(int i = 7 ; i < 55 ; i++)
    			{
    				if(i%4 == 0)
    				{
    					for(int j = 7 ; j < 19 ; j++)
    					{
    						dt[j][i] = 4;
    						setpos(i * 2 , j);
    						cout << "■";
    					}
    				}
    				if(i%4 == 2)
    				{
    					for(int j = 3 ; j < 15 ; j++)
    					{
    						dt[j][i] = 4;
    						setpos(i * 2 , j);
    						cout << "■";
    					}
    				}
    			}
    		}
    		else
    		{
    			for(int i = 7 ; i < 55 ; i++)
    			{
    				if(i%4 == 0)
    				{
    					for(int j = 7 ; j < 19 ; j++)
    					{
    						dt[j][i] = 4;
    					}
    					for(int j = 17 ; j < 19 ; j++)
    					{
    						setpos(i * 2 , j);
    						cout << "■";
    					}
    				}
    				if(i%4 == 2)
    				{
    					for(int j = 3 ; j < 15 ; j++)
    					{
    						dt[j][i] = 4;
    					}
    				}
    			}
    			SetColorAndBackground(15,0);
    			for(int i = 7 ; i < 55 ; i++)
    			{
    				for(int j = 3 ; j < 17 ; j++)
    				{
    					if((j != 4 || i != 7) && (j != 4 || i != 8))
    					{
    						setpos(i * 2 , j);
    						cout << "■";
    					}
    				}
    			}
    		}
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g == 16)//0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	{
    		if(light == 1)
    		{
    			SetColorAndBackground(4,0);
    			for(int i=11;i<=16;i++)
    			{
    				dt[i][7]=4;
    				setpos(7*2,i);
    				cout <<"■";
    			}
    			for(int i=11;i<=13;i++)
    			{
    				dt[14][i]=4;
    				setpos(i*2,14);
    				cout <<"■";
    			}
    			for(int i=25;i<=28;i++)
    			{
    				dt[8][i]=4;
    				setpos(i*2,8);
    				cout <<"■";
    			}
    			for(int i=22;i<=30;i++)
    			{
    				dt[6][i]=4;
    				setpos(i*2,6);
    				cout <<"■";
    			}
    			for(int i=22;i<=30;i++)
    			{
    				dt[5][i]=4;
    				setpos(i*2,5);
    				cout <<"■";
    			}
    			for(int i=22;i<=30;i++)
    			{
    				dt[4][i]=4;
    				setpos(i*2,4);
    				cout <<"■";
    			}
    			for(int i=7;i<=10;i++)
    			{
    				dt[i][15]=4;
    				setpos(15*2,i);
    				cout <<"■";
    			}
    			for(int i=6;i<=14;i++)
    			{
    				dt[7][i]=4;
    				setpos(i*2,7);
    				cout <<"■";
    			}
    			for(int i=19;i<=36;i++)
    			{
    				dt[7][i]=4;
    				setpos(i*2,7);
    				cout <<"■";
    			}
    			for(int i=42;i<=50;i++)
    			{
    				dt[7][i]=4;
    				setpos(i*2,7);
    				cout <<"■";
    			}
    			for(int i=2;i<=6;i++)
    			{
    				dt[i][50]=4;
    				setpos(50*2,i);
    				cout <<"■";
    			}
    			for(int i=51;i<=56;i++)
    			{
    				dt[2][i]=4;
    				setpos(i*2,2);
    				cout <<"■";
    			}
    			for(int i=5;i<=17;i++)
    			{
    				dt[17][i]=4;
    				setpos(i*2,17);
    				cout <<"■";
    			}
    			for(int i=21;i<=28;i++)
    			{
    				dt[17][i]=4;
    				setpos(i*2,17);
    				cout <<"■";
    			}
    			for(int i=30;i<=41;i++)
    			{
    				dt[17][i]=4;
    				setpos(i*2,17);
    				cout <<"■";
    			}
    			for(int i=20;i<=25;i++)
    			{
    				dt[13][i]=4;
    				setpos(i*2,13);
    				cout <<"■";
    			}
    			for(int i=11;i<=17;i++)
    			{
    				dt[i][41]=4;
    				setpos(41*2,i);
    				cout <<"■";
    			}
    			for(int i=9;i<=17;i++)
    			{
    				dt[i][54]=4;
    				setpos(54*2,i);
    				cout <<"■";
    			}
    			for(int i=8;i<=14;i++)
    			{
    				dt[i][48]=4;
    				setpos(48*2,i);
    				cout <<"■";
    			}
    			for(int i=45;i<=54;i++)
    			{
    				if(i == 48)
    				{
    					SetColorAndBackground(15,0);
    					dt[17][i]=1;
    					setpos(i * 2,17);
    					cout <<"■";
    				}
    				else if(i == 49)
    				{
    					dt[17][i]=1;
    					setpos(i * 2,17);
    					cout <<"■";
    					SetColorAndBackground(4,0);
    				}
    				else
    				{
    					dt[17][i]=4;
    					setpos(i*2,17);
    					cout <<"■";
    				}
    			}
    			SetColorAndBackground(15,0);
    			for(int i=43;i<=45;i++)
    			{
    				dt[12][i]=1;
    				setpos(i*2,12);
    				cout <<"■";
    			}
    		}
    		else
    		{
    			SetColorAndBackground(15,0);//白 
    			for(int i=43;i<=45;i++)
    			{
    				dt[12][i]=1;
    			}
    			for(int i = 9 ; i < 57 ; i++)
    			{
    				for(int j = 2 ; j < 18 ; j++)
    				{
    					if(i == 9 && j == 4)
    					{
    						continue;
    					}
    					if(i == 44 && j == 11)
    					{
    						continue;
    					}
    					setpos(i*2,j);
    					cout <<"■";
    				}
    			}
    			SetColorAndBackground(4,0);//红 
    			for(int i=11;i<=16;i++)
    			{
    				dt[i][7]=4;
    				setpos(14 , i);
    				cout <<"■";
    			}
    			for(int i=11;i<=13;i++)
    			{
    				dt[14][i]=4;
    			}
    			for(int i=25;i<=28;i++)
    			{
    				dt[8][i]=4;
    			}
    			for(int i=22;i<=30;i++)
    			{
    				dt[6][i]=4;
    			}
    			for(int i=22;i<=30;i++)
    			{
    				dt[5][i]=4;
    			}
    			for(int i=22;i<=30;i++)
    			{
    				dt[4][i]=4;
    			}
    			for(int i=7;i<=10;i++)
    			{
    				dt[i][15]=4;
    			}
    			for(int i=6;i<=14;i++)
    			{
    				dt[7][i]=4;
    				if(i < 9)
    				{
    					setpos(i * 2 , 7);
    					cout <<"■";
    				}
    			}
    			for(int i=19;i<=36;i++)
    			{
    				dt[7][i]=4;
    			}
    			for(int i=42;i<=50;i++)
    			{
    				dt[7][i]=4;
    			}
    			for(int i=2;i<=6;i++)
    			{
    				dt[i][50]=4;
    			}
    			for(int i=51;i<=56;i++)
    			{
    				dt[2][i]=4;
    			}
    			for(int i=5;i<=17;i++)
    			{
    				dt[17][i]=4;
    				if(i < 9)
    				{
    					setpos(i * 2 , 17);
    					cout <<"■";
    				}
    			}
    			for(int i=21;i<=28;i++)
    			{
    				dt[17][i]=4;
    			}
    			for(int i=30;i<=41;i++)
    			{
    				dt[17][i]=4;
    			}
    			for(int i=20;i<=25;i++)
    			{
    				dt[13][i]=4;
    			}
    			for(int i=11;i<=17;i++)
    			{
    				dt[i][41]=4;
    			}
    			for(int i=9;i<=17;i++)
    			{
    				dt[i][54]=4;
    			}
    			for(int i=8;i<=14;i++)
    			{
    				dt[i][48]=4;
    			}
    			for(int i=45;i<=54;i++)
    			{
    				if(i == 48)
    				{
    					dt[17][i]=1;
    				}
    				else if(i == 49)
    				{
    					dt[17][i]=1;
    				}
    				else
    				{
    					dt[17][i]=4;
    				}
    			}
    		}
    		SetColorAndBackground(15,0);//白 
            for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		SetColorAndBackground(15,0);//重生
    		dt[11][44]=7;
    		setpos(88,11);
    		cout <<"++";
    		SetColorAndBackground(4,0);//红 
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);//紫 
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g == 17)//0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	{
    		SetColorAndBackground(15,0);//白 
            for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		if(light == 1)
    		{
    			for(int i = 9 ; i < 56 ; i++)
    			{
    				dt[2][i] = 1;
    				setpos(i * 2 , 2);
    				cout <<"■";
    			}
    			for(int i = 9 ; i < 56 ; i++)
    			{
    				dt[17][i] = 1;
    				setpos(i * 2 , 17);
    				cout <<"■";
    			}
    			for(int i = 3 ; i < 17 ; i++)
    			{
    				if(i != 4)
    				{
    					dt[i][9] = 1;
    					setpos(18 , i);
    					cout <<"■";
    				}
    			}
    			for(int i = 3 ; i < 17 ; i++)
    			{
    				if(i != 15)
    				{
    					dt[i][55] = 1;
    					setpos(110 , i);
    					cout <<"■";
    				}
    			}
    	        dt[12][10] = 1;
    	        setpos(20 , 12);
    	        cout <<"■";
    	        dt[3][11] = 1;
    	        setpos(22 , 3);
    	        cout <<"■";
    	        dt[4][11] = 1;
    	        setpos(22 , 4);
    	        cout <<"■";
    	        dt[5][11] = 1;
    	        setpos(22 , 5);
    	        cout <<"■";
    	        dt[7][11] = 1;
    	        setpos(22 , 7);
    	        cout <<"■";
    	        dt[8][11] = 1;
    	        setpos(22 , 8);
    	        cout <<"■";
    	        dt[13][11] = 1;
    	        setpos(22 , 13);
    	        cout <<"■";
    	        dt[15][11] = 1;
    	        setpos(22 , 15);
    	        cout <<"■";
    	        dt[10][12] = 1;
    	        setpos(24 , 10);
    	        cout <<"■";
    	        dt[14][12] = 1;
    	        setpos(24 , 14);
    	        cout <<"■";
    	        dt[16][12] = 1;
    	        setpos(24 , 16);
    	        cout <<"■";
    	        dt[6][13] = 1;
    	        setpos(26 , 6);
    	        cout <<"■";
    	        dt[9][13] = 1;
    	        setpos(26 , 9);
    	        cout <<"■";
    	        dt[11][13] = 1;
    	        setpos(26 , 11);
    	        cout <<"■";
    	        dt[13][13] = 1;
    	        setpos(26 , 13);
    	        cout <<"■";
    	        dt[14][13] = 1;
    	        setpos(26 , 14);
    	        cout <<"■";
    	        dt[16][13] = 1;
    	        setpos(26 , 16);
    	        cout <<"■";
    	        dt[7][14] = 1;
    	        setpos(28 , 7);
    	        cout <<"■";
    	        dt[12][14] = 1;
    	        setpos(28 , 12);
    	        cout <<"■";
    	        dt[13][14] = 1;
    	        setpos(28 , 13);
    	        cout <<"■";
    	        dt[3][15] = 1;
    	        setpos(30 , 3);
    	        cout <<"■";
    	        dt[7][15] = 1;
    	        setpos(30 , 7);
    	        cout <<"■";
    	        dt[9][15] = 1;
    	        setpos(30 , 9);
    	        cout <<"■";
    	        dt[13][15] = 1;
    	        setpos(30 , 13);
    	        cout <<"■";
    	        dt[3][16] = 1;
    	        setpos(32 , 3);
    	        cout <<"■";
    	        dt[4][16] = 1;
    	        setpos(32 , 4);
    	        cout <<"■";
    	        dt[8][16] = 1;
    	        setpos(32 , 8);
    	        cout <<"■";
    	        dt[9][16] = 1;
    	        setpos(32 , 9);
    	        cout <<"■";
    	        dt[11][16] = 1;
    	        setpos(32 , 11);
    	        cout <<"■";
    	        dt[15][16] = 1;
    	        setpos(32 , 15);
    	        cout <<"■";
    	        dt[4][17] = 1;
    	        setpos(34 , 4);
    	        cout <<"■";
    	        dt[10][17] = 1;
    	        setpos(34 , 10);
    	        cout <<"■";
    	        dt[11][17] = 1;
    	        setpos(34 , 11);
    	        cout <<"■";
    	        dt[16][17] = 1;
    	        setpos(34 , 16);
    	        cout <<"■";
    	        dt[5][18] = 1;
    	        setpos(36 , 5);
    	        cout <<"■";
    	        dt[7][18] = 1;
    	        setpos(36 , 7);
    	        cout <<"■";
    	        dt[10][18] = 1;
    	        setpos(36 , 10);
    	        cout <<"■";
    	        dt[15][18] = 1;
    	        setpos(36 , 15);
    	        cout <<"■";
    	        dt[16][18] = 1;
    	        setpos(36 , 16);
    	        cout <<"■";
    	        dt[4][19] = 1;
    	        setpos(38 , 4);
    	        cout <<"■";
    	        dt[10][19] = 1;
    	        setpos(38 , 10);
    	        cout <<"■";
    	        dt[12][19] = 1;
    	        setpos(38 , 12);
    	        cout <<"■";
    	        dt[3][20] = 1;
    	        setpos(40 , 3);
    	        cout <<"■";
    	        dt[4][20] = 1;
    	        setpos(40 , 4);
    	        cout <<"■";
    	        dt[11][20] = 1;
    	        setpos(40 , 11);
    	        cout <<"■";
    	        dt[15][20] = 1;
    	        setpos(40 , 15);
    	        cout <<"■";
    	        dt[16][20] = 1;
    	        setpos(40 , 16);
    	        cout <<"■";
    	        dt[6][21] = 1;
    	        setpos(42 , 6);
    	        cout <<"■";
    	        dt[7][21] = 1;
    	        setpos(42 , 7);
    	        cout <<"■";
    	        dt[10][21] = 1;
    	        setpos(42 , 10);
    	        cout <<"■";
    	        dt[12][21] = 1;
    	        setpos(42 , 12);
    	        cout <<"■";
    	        dt[4][22] = 1;
    	        setpos(44 , 4);
    	        cout <<"■";
    	        dt[6][22] = 1;
    	        setpos(44 , 6);
    	        cout <<"■";
    	        dt[7][22] = 1;
    	        setpos(44 , 7);
    	        cout <<"■";
    	        dt[8][22] = 1;
    	        setpos(44 , 8);
    	        cout <<"■";
    	        dt[12][22] = 1;
    	        setpos(44 , 12);
    	        cout <<"■";
    	        dt[16][22] = 1;
    	        setpos(44 , 16);
    	        cout <<"■";
    	        dt[9][23] = 1;
    	        setpos(46 , 9);
    	        cout <<"■";
    	        dt[13][23] = 1;
    	        setpos(46 , 13);
    	        cout <<"■";
    	        dt[14][23] = 1;
    	        setpos(46 , 14);
    	        cout <<"■";
    	        dt[15][23] = 1;
    	        setpos(46 , 15);
    	        cout <<"■";
    	        dt[8][24] = 1;
    	        setpos(48 , 8);
    	        cout <<"■";
    	        dt[9][24] = 1;
    	        setpos(48 , 9);
    	        cout <<"■";
    	        dt[13][24] = 1;
    	        setpos(48 , 13);
    	        cout <<"■";
    	        dt[14][24] = 1;
    	        setpos(48 , 14);
    	        cout <<"■";
    	        dt[4][26] = 1;
    	        setpos(52 , 4);
    	        cout <<"■";
    	        dt[5][26] = 1;
    	        setpos(52 , 5);
    	        cout <<"■";
    	        dt[6][26] = 1;
    	        setpos(52 , 6);
    	        cout <<"■";
    	        dt[8][26] = 1;
    	        setpos(52 , 8);
    	        cout <<"■";
    	        dt[11][26] = 1;
    	        setpos(52 , 11);
    	        cout <<"■";
    	        dt[12][26] = 1;
    	        setpos(52 , 12);
    	        cout <<"■";
    	        dt[13][26] = 1;
    	        setpos(52 , 13);
    	        cout <<"■";
    	        dt[3][27] = 1;
    	        setpos(54 , 3);
    	        cout <<"■";
    	        dt[8][27] = 1;
    	        setpos(54 , 8);
    	        cout <<"■";
    	        dt[9][27] = 1;
    	        setpos(54 , 9);
    	        cout <<"■";
    	        dt[15][27] = 1;
    	        setpos(54 , 15);
    	        cout <<"■";
    	        dt[5][28] = 1;
    	        setpos(56 , 5);
    	        cout <<"■";
    	        dt[6][28] = 1;
    	        setpos(56 , 6);
    	        cout <<"■";
    	        dt[8][28] = 1;
    	        setpos(56 , 8);
    	        cout <<"■";
    	        dt[11][28] = 1;
    	        setpos(56 , 11);
    	        cout <<"■";
    	        dt[12][28] = 1;
    	        setpos(56 , 12);
    	        cout <<"■";
    	        dt[15][28] = 1;
    	        setpos(56 , 15);
    	        cout <<"■";
    	        dt[9][29] = 1;
    	        setpos(58 , 9);
    	        cout <<"■";
    	        dt[11][29] = 1;
    	        setpos(58 , 11);
    	        cout <<"■";
    	        dt[13][29] = 1;
    	        setpos(58 , 13);
    	        cout <<"■";
    	        dt[15][29] = 1;
    	        setpos(58 , 15);
    	        cout <<"■";
    	        dt[3][30] = 1;
    	        setpos(60 , 3);
    	        cout <<"■";
    	        dt[5][30] = 1;
    	        setpos(60 , 5);
    	        cout <<"■";
    	        dt[9][30] = 1;
    	        setpos(60 , 9);
    	        cout <<"■";
    	        dt[15][30] = 1;
    	        setpos(60 , 15);
    	        cout <<"■";
    	        dt[5][31] = 1;
    	        setpos(62 , 5);
    	        cout <<"■";
    	        dt[6][31] = 1;
    	        setpos(62 , 6);
    	        cout <<"■";
    	        dt[13][31] = 1;
    	        setpos(62 , 13);
    	        cout <<"■";
    	        dt[14][31] = 1;
    	        setpos(62 , 14);
    	        cout <<"■";
    	        dt[7][32] = 1;
    	        setpos(64 , 7);
    	        cout <<"■";
    	        dt[11][32] = 1;
    	        setpos(64 , 11);
    	        cout <<"■";
    	        dt[3][33] = 1;
    	        setpos(66 , 3);
    	        cout <<"■";
    	        dt[4][33] = 1;
    	        setpos(66 , 4);
    	        cout <<"■";
    	        dt[9][33] = 1;
    	        setpos(66 , 9);
    	        cout <<"■";
    	        dt[10][33] = 1;
    	        setpos(66 , 10);
    	        cout <<"■";
    	        dt[12][33] = 1;
    	        setpos(66 , 12);
    	        cout <<"■";
    	        dt[15][33] = 1;
    	        setpos(66 , 15);
    	        cout <<"■";
    	        dt[7][34] = 1;
    	        setpos(68 , 7);
    	        cout <<"■";
    	        dt[8][34] = 1;
    	        setpos(68 , 8);
    	        cout <<"■";
    	        dt[10][34] = 1;
    	        setpos(68 , 10);
    	        cout <<"■";
    	        dt[12][34] = 1;
    	        setpos(68 , 12);
    	        cout <<"■";
    	        dt[13][34] = 1;
    	        setpos(68 , 13);
    	        cout <<"■";
    	        dt[6][35] = 1;
    	        setpos(70 , 6);
    	        cout <<"■";
    	        dt[7][35] = 1;
    	        setpos(70 , 7);
    	        cout <<"■";
    	        dt[9][35] = 1;
    	        setpos(70 , 9);
    	        cout <<"■";
    	        dt[14][35] = 1;
    	        setpos(70 , 14);
    	        cout <<"■";
    	        dt[6][36] = 1;
    	        setpos(72 , 6);
    	        cout <<"■";
    	        dt[13][36] = 1;
    	        setpos(72 , 13);
    	        cout <<"■";
    	        dt[3][37] = 1;
    	        setpos(74 , 3);
    	        cout <<"■";
    	        dt[5][37] = 1;
    	        setpos(74 , 5);
    	        cout <<"■";
    	        dt[7][37] = 1;
    	        setpos(74 , 7);
    	        cout <<"■";
    	        dt[8][37] = 1;
    	        setpos(74 , 8);
    	        cout <<"■";
    	        dt[11][37] = 1;
    	        setpos(74 , 11);
    	        cout <<"■";
    	        dt[12][37] = 1;
    	        setpos(74 , 12);
    	        cout <<"■";
    	        dt[13][37] = 1;
    	        setpos(74 , 13);
    	        cout <<"■";
    	        dt[14][37] = 1;
    	        setpos(74 , 14);
    	        cout <<"■";
    	        dt[6][38] = 1;
    	        setpos(76 , 6);
    	        cout <<"■";
    	        dt[9][38] = 1;
    	        setpos(76 , 9);
    	        cout <<"■";
    	        dt[16][38] = 1;
    	        setpos(76 , 16);
    	        cout <<"■";
    	        dt[3][39] = 1;
    	        setpos(78 , 3);
    	        cout <<"■";
    	        dt[4][39] = 1;
    	        setpos(78 , 4);
    	        cout <<"■";
    	        dt[12][39] = 1;
    	        setpos(78 , 12);
    	        cout <<"■";
    	        dt[13][39] = 1;
    	        setpos(78 , 13);
    	        cout <<"■";
    	        dt[5][40] = 1;
    	        setpos(80 , 5);
    	        cout <<"■";
    	        dt[9][40] = 1;
    	        setpos(80 , 9);
    	        cout <<"■";
    	        dt[13][40] = 1;
    	        setpos(80 , 13);
    	        cout <<"■";
    	        dt[4][41] = 1;
    	        setpos(82 , 4);
    	        cout <<"■";
    	        dt[5][41] = 1;
    	        setpos(82 , 5);
    	        cout <<"■";
    	        dt[12][41] = 1;
    	        setpos(82 , 12);
    	        cout <<"■";
    	        dt[5][42] = 1;
    	        setpos(84 , 5);
    	        cout <<"■";
    	        dt[6][42] = 1;
    	        setpos(84 , 6);
    	        cout <<"■";
    	        dt[9][42] = 1;
    	        setpos(84 , 9);
    	        cout <<"■";
    	        dt[10][42] = 1;
    	        setpos(84 , 10);
    	        cout <<"■";
    	        dt[12][42] = 1;
    	        setpos(84 , 12);
    	        cout <<"■";
    	        dt[13][42] = 1;
    	        setpos(84 , 13);
    	        cout <<"■";
    	        dt[15][42] = 1;
    	        setpos(84 , 15);
    	        cout <<"■";
    	        dt[3][43] = 1;
    	        setpos(86 , 3);
    	        cout <<"■";
    	        dt[4][43] = 1;
    	        setpos(86 , 4);
    	        cout <<"■";
    	        dt[5][43] = 1;
    	        setpos(86 , 5);
    	        cout <<"■";
    	        dt[9][43] = 1;
    	        setpos(86 , 9);
    	        cout <<"■";
    	        dt[10][43] = 1;
    	        setpos(86 , 10);
    	        cout <<"■";
    	        dt[13][43] = 1;
    	        setpos(86 , 13);
    	        cout <<"■";
    	        dt[14][43] = 1;
    	        setpos(86 , 14);
    	        cout <<"■";
    	        dt[15][43] = 1;
    	        setpos(86 , 15);
    	        cout <<"■";
    	        dt[16][43] = 1;
    	        setpos(86 , 16);
    	        cout <<"■";
    	        dt[4][44] = 1;
    	        setpos(88 , 4);
    	        cout <<"■";
    	        dt[5][44] = 1;
    	        setpos(88 , 5);
    	        cout <<"■";
    	        dt[11][44] = 1;
    	        setpos(88 , 11);
    	        cout <<"■";
    	        dt[12][44] = 1;
    	        setpos(88 , 12);
    	        cout <<"■";
    	        dt[14][44] = 1;
    	        setpos(88 , 14);
    	        cout <<"■";
    	        dt[4][45] = 1;
    	        setpos(90 , 4);
    	        cout <<"■";
    	        dt[5][45] = 1;
    	        setpos(90 , 5);
    	        cout <<"■";
    	        dt[7][45] = 1;
    	        setpos(90 , 7);
    	        cout <<"■";
    	        dt[9][45] = 1;
    	        setpos(90 , 9);
    	        cout <<"■";
    	        dt[4][46] = 1;
    	        setpos(92 , 4);
    	        cout <<"■";
    	        dt[13][46] = 1;
    	        setpos(92 , 13);
    	        cout <<"■";
    	        dt[14][46] = 1;
    	        setpos(92 , 14);
    	        cout <<"■";
    	        dt[5][47] = 1;
    	        setpos(94 , 5);
    	        cout <<"■";
    	        dt[6][47] = 1;
    	        setpos(94 , 6);
    	        cout <<"■";
    	        dt[7][47] = 1;
    	        setpos(94 , 7);
    	        cout <<"■";
    	        dt[5][48] = 1;
    	        setpos(96 , 5);
    	        cout <<"■";
    	        dt[12][48] = 1;
    	        setpos(96 , 12);
    	        cout <<"■";
    	        dt[13][48] = 1;
    	        setpos(96 , 13);
    	        cout <<"■";
    	        dt[3][49] = 1;
    	        setpos(98 , 3);
    	        cout <<"■";
    	        dt[7][49] = 1;
    	        setpos(98 , 7);
    	        cout <<"■";
    	        dt[10][49] = 1;
    	        setpos(98 , 10);
    	        cout <<"■";
    	        dt[12][49] = 1;
    	        setpos(98 , 12);
    	        cout <<"■";
    	        dt[13][49] = 1;
    	        setpos(98 , 13);
    	        cout <<"■";
    	        dt[3][50] = 1;
    	        setpos(100 , 3);
    	        cout <<"■";
    	        dt[4][50] = 1;
    	        setpos(100 , 4);
    	        cout <<"■";
    	        dt[10][50] = 1;
    	        setpos(100 , 10);
    	        cout <<"■";
    	        dt[12][50] = 1;
    	        setpos(100 , 12);
    	        cout <<"■";
    	        dt[14][50] = 1;
    	        setpos(100 , 14);
    	        cout <<"■";
    	        dt[4][51] = 1;
    	        setpos(102 , 4);
    	        cout <<"■";
    	        dt[5][51] = 1;
    	        setpos(102 , 5);
    	        cout <<"■";
    	        dt[6][51] = 1;
    	        setpos(102 , 6);
    	        cout <<"■";
    	        dt[4][52] = 1;
    	        setpos(104 , 4);
    	        cout <<"■";
    	        dt[5][52] = 1;
    	        setpos(104 , 5);
    	        cout <<"■";
    	        dt[9][52] = 1;
    	        setpos(104 , 9);
    	        cout <<"■";
    	        dt[10][52] = 1;
    	        setpos(104 , 10);
    	        cout <<"■";
    	        dt[14][52] = 1;
    	        setpos(104 , 14);
    	        cout <<"■";
    	        dt[16][52] = 1;
    	        setpos(104 , 16);
    	        cout <<"■";
    	        dt[6][53] = 1;
    	        setpos(106 , 6);
    	        cout <<"■";
    	        dt[8][53] = 1;
    	        setpos(106 , 8);
    	        cout <<"■";
    	        dt[10][53] = 1;
    	        setpos(106 , 10);
    	        cout <<"■";
    	        dt[3][54] = 1;
    	        setpos(108 , 3);
    	        cout <<"■";
    	        dt[4][54] = 1;
    	        setpos(108 , 4);
    	        cout <<"■";
    	        dt[6][54] = 1;
    	        setpos(108 , 6);
    	        cout <<"■";
    	        dt[8][54] = 1;
    	        setpos(108 , 8);
    	        cout <<"■";
    	        dt[14][54] = 1;
    	        setpos(108 , 14);
    	        cout <<"■";
    	        dt[16][54] = 1;
    	        setpos(108 , 16);
    	        cout <<"■";
    		}
    		else
    		{
    			for(int i = 9 ; i < 56 ; i++)
    			{
    				dt[2][i] = 1;
    			}
    			for(int i = 9 ; i < 56 ; i++)
    			{
    				dt[17][i] = 1;
    			}
    			for(int i = 3 ; i < 17 ; i++)
    			{
    				if(i != 4)
    				{
    					dt[i][9] = 1;
    				}
    			}
    			for(int i = 3 ; i < 17 ; i++)
    			{
    				if(i != 15)
    				{
    					dt[i][55] = 1;
    				}
    			}
    			            dt[12][10] = 1;
                dt[3][11] = 1;
                dt[4][11] = 1;
                dt[5][11] = 1;
                dt[7][11] = 1;
                dt[8][11] = 1;
                dt[13][11] = 1;
                dt[15][11] = 1;
                dt[10][12] = 1;
                dt[14][12] = 1;
                dt[16][12] = 1;
                dt[6][13] = 1;
                dt[9][13] = 1;
                dt[11][13] = 1;
                dt[13][13] = 1;
                dt[14][13] = 1;
                dt[16][13] = 1;
                dt[7][14] = 1;
                dt[12][14] = 1;
                dt[13][14] = 1;
                dt[3][15] = 1;
                dt[7][15] = 1;
                dt[9][15] = 1;
                dt[13][15] = 1;
                dt[3][16] = 1;
                dt[4][16] = 1;
                dt[8][16] = 1;
                dt[9][16] = 1;
                dt[11][16] = 1;
                dt[15][16] = 1;
                dt[4][17] = 1;
                dt[10][17] = 1;
                dt[11][17] = 1;
                dt[16][17] = 1;
                dt[5][18] = 1;
                dt[7][18] = 1;
                dt[10][18] = 1;
                dt[15][18] = 1;
                dt[16][18] = 1;
                dt[4][19] = 1;
                dt[10][19] = 1;
                dt[12][19] = 1;
                dt[3][20] = 1;
                dt[4][20] = 1;
                dt[11][20] = 1;
                dt[15][20] = 1;
                dt[16][20] = 1;
                dt[6][21] = 1;
                dt[7][21] = 1;
                dt[10][21] = 1;
                dt[12][21] = 1;
                dt[4][22] = 1;
                dt[6][22] = 1;
                dt[7][22] = 1;
                dt[8][22] = 1;
                dt[12][22] = 1;
                dt[16][22] = 1;
                dt[9][23] = 1;
                dt[13][23] = 1;
                dt[14][23] = 1;
                dt[15][23] = 1;
                dt[8][24] = 1;
                dt[9][24] = 1;
                dt[13][24] = 1;
                dt[14][24] = 1;
                dt[4][26] = 1;
                dt[5][26] = 1;
                dt[6][26] = 1;
                dt[8][26] = 1;
                dt[11][26] = 1;
                dt[12][26] = 1;
                dt[13][26] = 1;
                dt[3][27] = 1;
                dt[8][27] = 1;
                dt[9][27] = 1;
                dt[15][27] = 1;
                dt[5][28] = 1;
                dt[6][28] = 1;
                dt[8][28] = 1;
                dt[11][28] = 1;
                dt[12][28] = 1;
                dt[15][28] = 1;
                dt[9][29] = 1;
                dt[11][29] = 1;
                dt[13][29] = 1;
                dt[15][29] = 1;
                dt[3][30] = 1;
                dt[5][30] = 1;
                dt[9][30] = 1;
                dt[15][30] = 1;
                dt[5][31] = 1;
                dt[6][31] = 1;
                dt[13][31] = 1;
                dt[14][31] = 1;
                dt[7][32] = 1;
                dt[11][32] = 1;
                dt[3][33] = 1;
                dt[4][33] = 1;
                dt[9][33] = 1;
                dt[10][33] = 1;
                dt[12][33] = 1;
                dt[15][33] = 1;
                dt[7][34] = 1;
                dt[8][34] = 1;
                dt[10][34] = 1;
                dt[12][34] = 1;
                dt[13][34] = 1;
                dt[6][35] = 1;
                dt[7][35] = 1;
                dt[9][35] = 1;
                dt[14][35] = 1;
                dt[6][36] = 1;
                dt[13][36] = 1;
                dt[3][37] = 1;
                dt[5][37] = 1;
                dt[7][37] = 1;
                dt[8][37] = 1;
                dt[11][37] = 1;
                dt[12][37] = 1;
                dt[13][37] = 1;
                dt[14][37] = 1;
                dt[6][38] = 1;
                dt[9][38] = 1;
                dt[16][38] = 1;
                dt[3][39] = 1;
                dt[4][39] = 1;
                dt[12][39] = 1;
                dt[13][39] = 1;
                dt[5][40] = 1;
                dt[9][40] = 1;
                dt[13][40] = 1;
                dt[4][41] = 1;
                dt[5][41] = 1;
                dt[12][41] = 1;
                dt[5][42] = 1;
                dt[6][42] = 1;
                dt[9][42] = 1;
                dt[10][42] = 1;
                dt[12][42] = 1;
                dt[13][42] = 1;
                dt[15][42] = 1;
                dt[3][43] = 1;
                dt[4][43] = 1;
                dt[5][43] = 1;
                dt[9][43] = 1;
                dt[10][43] = 1;
                dt[13][43] = 1;
                dt[14][43] = 1;
                dt[15][43] = 1;
                dt[16][43] = 1;
                dt[4][44] = 1;
                dt[5][44] = 1;
                dt[11][44] = 1;
                dt[12][44] = 1;
                dt[14][44] = 1;
                dt[4][45] = 1;
                dt[5][45] = 1;
                dt[7][45] = 1;
                dt[9][45] = 1;
                dt[4][46] = 1;
                dt[13][46] = 1;
                dt[14][46] = 1;
                dt[5][47] = 1;
                dt[6][47] = 1;
                dt[7][47] = 1;
                dt[5][48] = 1;
                dt[12][48] = 1;
                dt[13][48] = 1;
                dt[3][49] = 1;
                dt[7][49] = 1;
                dt[10][49] = 1;
                dt[12][49] = 1;
                dt[13][49] = 1;
                dt[3][50] = 1;
                dt[4][50] = 1;
                dt[10][50] = 1;
                dt[12][50] = 1;
                dt[14][50] = 1;
                dt[4][51] = 1;
                dt[5][51] = 1;
                dt[6][51] = 1;
                dt[4][52] = 1;
                dt[5][52] = 1;
                dt[9][52] = 1;
                dt[10][52] = 1;
                dt[14][52] = 1;
                dt[16][52] = 1;
                dt[6][53] = 1;
                dt[8][53] = 1;
                dt[10][53] = 1;
                dt[3][54] = 1;
                dt[4][54] = 1;
                dt[6][54] = 1;
                dt[8][54] = 1;
                dt[14][54] = 1;
                dt[16][54] = 1;
                for(int i = 9 ; i < 56 ; i++)
                {
                	for(int j = 2 ; j < 18 ; j++)
                	{
                		if(i == 9 && j == 4)
                		{
                			continue;
    					}
                		setpos(i * 2 , j);
                		cout << "■";
    				}
    			}
    		}
    		SetColorAndBackground(4,0);//红
    		for(int i = 4 ; i < 58 ; i++)
    		{
    			dt[19][i] = 4;
    			setpos(i * 2 , 19);
    			cout << "■";
    		}
    		SetColorAndBackground(5,0);//紫 
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(g == 18)//0黑 1蓝 2绿 4红 5紫 7奶白 15白 9蓝 4陷阱 5粘液块 6传送门 8寒冰
    	{
    		SetColorAndBackground(15,0);
    		for(int i=2;i<=6;i++)
    		{
    			dt[11][i]=1;
    			setpos(i*2,11);
    			cout <<"■";
    		}
    		for(int i = 51 ; i < 59 ; i++)
    		{
    			dt[18][i]=1;
    			setpos(i*2,18);
    			cout <<"■";
    		}
    		for(int i = 55 ; i <= 58 ; i++)
    		{
    			dt[8][i] = 1;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		dt[7][18] = 7;
    		setpos(36,7);
    		cout <<"++";
    		dt[7][40] = 7;
    		setpos(80,7);
    		cout <<"++";
    		dt[17][29] = 7;
    		setpos(58,17);
    		cout <<"++";
    		dt[17][54] = 7;
    		setpos(108,17);
    		cout <<"++";
    		SetColorAndBackground(4,0);//红 
    		for(int i=2;i<=58;i++)
    		{
    			dt[19][i]=4;
    			setpos(i*2,19);
    			cout <<"■";
    		}
    		for(int i=51;i<=54;i++)
    		{
    			dt[8][i]=4;
    			setpos(i*2,8);
    			cout <<"■";
    		}
    		for(int i=9;i<56;i++)
    		{
    			dt[2][i]=4;
    			setpos(i*2,2);
    			cout <<"■";
    		}
    		SetColorAndBackground(5,0);//紫 
    		dt[2][58]=6;
    		dt[3][58]=6;
    		dt[2][57]=6;
    		dt[3][57]=6;
    		setpos(116,2);
    		cout <<"■";
    		setpos(116,3);
    		cout <<"■";
    		setpos(114,2);
    		cout <<"■";
    		setpos(114,3);
    		cout <<"■";
    		if(light == 1)
    		{
    			SetColorAndBackground(15,0);//白 
    			dt[8][18] = 1;
    			setpos(36,8);
    			cout <<"■";
    			dt[8][40] = 1;
    			setpos(80,8);
    			cout <<"■";
    			dt[13][29] = 1;
    			setpos(58,13);
    			cout <<"■";
    			dt[18][29] = 1;
    			setpos(58,18);
    			cout <<"■";
    			SetColorAndBackground(4,0);//红 
    			for(int i = 8 ; i < 18 ; i++)
    			{
    				for(int j = 7 ; j < 19 ; j++)
    				{
    					if(i + j == 26)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    			for(int i = 8 ; i < 18 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i + j == 20)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    			for(int i = 17 ; i < 29 ; i++)
    			{
    				for(int j = 9 ; j < 19 ; j++)
    				{
    					if(i - j == 10)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    			for(int i = 17 ; i < 29 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i - j == 16)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    			for(int i = 30 ; i < 40 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i + j == 42)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    			for(int i = 30 ; i < 40 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i + j == 48)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    			for(int i = 41 ; i < 51 ; i++)
    			{
    				for(int j = 9 ; j < 19 ; j++)
    				{
    					if(i - j == 32)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    			for(int i = 41 ; i < 51 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i - j == 38)
    					{
    						dt[j][i]=4;
    						setpos(i*2,j);
    						cout <<"■";
    					}
    				}
    			}
    		}
    		else
    		{
    			SetColorAndBackground(15,0);//白 
    			dt[8][18] = 1;
    			dt[8][40] = 1;
    			dt[13][29] = 1;
    			dt[18][29] = 1;
    			SetColorAndBackground(4,0);//红 
    			for(int i = 8 ; i < 18 ; i++)
    			{
    				for(int j = 7 ; j < 19 ; j++)
    				{
    					if(i + j == 26)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			for(int i = 8 ; i < 18 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i + j == 20)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			for(int i = 17 ; i < 29 ; i++)
    			{
    				for(int j = 9 ; j < 19 ; j++)
    				{
    					if(i - j == 10)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			for(int i = 17 ; i < 29 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i - j == 16)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			for(int i = 30 ; i < 40 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i + j == 42)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			for(int i = 30 ; i < 40 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i + j == 48)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			for(int i = 41 ; i < 51 ; i++)
    			{
    				for(int j = 9 ; j < 19 ; j++)
    				{
    					if(i - j == 32)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			for(int i = 41 ; i < 51 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i - j == 38)
    					{
    						dt[j][i]=4;
    					}
    				}
    			}
    			SetColorAndBackground(15,0);//白 
    			for(int i = 7 ; i < 51 ; i++)
    			{
    				for(int j = 3 ; j < 19 ; j++)
    				{
    					if(i == 18 && j == 7)
    					{
    						continue;
    					}
    					if(i == 40 && j == 7)
    					{
    						continue;
    					}
    					if(i == 29 && j == 17)
    					{
    						continue;
    					}
    					if(i == 7 && j == 4)
    					{
    						continue;
    					}
    					if(i == 8 && j == 4)
    					{
    						continue;
    					}
    					setpos(i * 2 , j);
    					cout << "■";
    				}
    			}
    		}
    		setpos(zy*2,zx);
    		ball();
    	}
    	return ;
    }
    int suiji(int a,int b)
    {
    	int c = (rand() * rand() % (a - b)) + a;
    	return c;
    }
    void move(char f)
    {
    	if(f=='w')
    	{
    		setpos(zy*2,zx);
    	    cout <<"  "; 
    	    for(int i=1;i<=3;i++)
    		{
    	    	if((dt[zx - 1][zy] == 0 || dt[zx - 1][zy] == 6 || dt[zx - 1][zy] == 4)&&zx - 1 >= 2)
    			{
    	    		zx--;
    			}
    			else
    			{
    				break;
    			}
    		}
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(f=='a')
    	{
    		setpos(zy*2,zx);
    	    cout <<"  "; 
    	    for(int i=1;i<=jin;i++)
    		{
    			if(dt[zx][zy-1]==4)
    			{
    				zy--;
    				break;
    			}
    	    	if((dt[zx][zy - 1] == 0 || dt[zx][zy - 1] == 6 || dt[zx][zy - 1] == 7) && zy - 1 >= 2)
    			{
    	    		zy--;
    			}
    			else
    			{
    				break;
    			}
    
    			if(dt[zx][zy]==7)
    			{
    	    		break;
    			}
    		}
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(f=='d'){
    		setpos(zy*2,zx);
    	    cout <<"  ";
    		for(int i=1;i<=jin;i++)
    		{
    			if(dt[zx][zy+1]==4)
    			{
    				zy++;
    				break;
    			}
    	    	if((dt[zx][zy+1]==0||dt[zx][zy+1]==6||dt[zx][zy+1]==7)&&zy+1<=58)
    			{
    	    		zy++;
    			}
    			else
    			{
    				break;
    			}
    			if(dt[zx][zy]==7)
    			{
    	    		break;
    			}
    		}
    		setpos(zy*2,zx);
    		ball();
    	}
    	else if(f == 's' && zx <= 19 && (dt[zx + 1][zy] == 0 || dt[zx + 1][zy] == 6 || dt[zx + 1][zy] == 4 || dt[zx + 1][zy] == 7) && fly==1)
    	{
    		setpos(zy*2,zx);
    	    cout <<"  ";
    	    zx++;
    		setpos(zy*2,zx);
    		ball();
    	}
    } 
    void qing()
    { 
    	SetColorAndBackground(15,0);
    	for(int i = 2 ; i <= 19 ; i++)
    	{
    		for(int j = 2 ; j <= 118 ; j++)
    		{
    			setpos(j , i);
    			cout <<" ";
    		}
    	}
    }
    void dtc()
    {
    	for(int i = 1 ; i <= 20 ; i++)
    	{
    		dt[i][1]=2;
    		dt[i][120]=2;
    	}
    	for(int j = 1 ; j <= 120 ; j++)
    	{
    		dt[1][j]=1;
    		dt[20][j]=1;
    	}
    	for(int i = 2 ; i < 20 ; i++)
    	{
    		for(int j = 2 ; j < 120 ; j++)
    		{
    			dt[i][j]=0;
    		}
    	}
    }
    void ShowCursor(bool visible)
    {
        CONSOLE_CURSOR_INFO cursor_info = {20, visible};
        SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
    }
    void SetPos(COORD a)
    {
    	HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE);
    	SetConsoleCursorPosition(out,a);
    }
    void setpos(int i, int j)
    {
    	COORD pos={i,j};
    	SetPos(pos);
    }
    void SetColorAndBackground(int ForgC, int BackC)
    {
    	if(yie==0&&BackC==0)
    	{
    		BackC=15;
    	}
    	if(yie==0&&ForgC==15)
    	{
    		ForgC=0;
    	}
    	WORD wColor = ((BackC & 0x0F) << 4) + (ForgC & 0x0F);
    	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wColor);
    }
    char f(int a)
    {
    	char ans;
    	switch(a)
    	{
    		case 0:
    			ans = ' ';
    			break;
    		case 1:
    			ans = '-';
    			break;
    		case 2:
    			ans = '|';
    			break;
    		case 3:
    			ans = '=';
    			break;
    	}
    	return ans;
    }
    int ff(char a)
    {
    	int ans=0;
    	switch(a)
    	{
    		case ' ':
    			ans = 0;
    			break;
    		case '-':
    			ans = 1; 
    			break;
    		case '|':
    			ans = 2;
    			break;
    	}
    	return ans;
    }
    void drawflower(balloon x)
    {
    	SetColorAndBackground(x.color,0);
    	setpos(x.x-2,x.y);
    	cout << "■■■";
    	setpos(x.x-1,x.y-1);
    	cout << char(92);
    	cout << "■/";
    	setpos(x.x-1,x.y+1);
    	cout << "/■";
    	cout << char(92);
    }
    void bj()
    {
    	dtc();
    	SetColorAndBackground(15,0);
    	for(int i=1;i<=20;i++){
    		for(int j=1;j<=120;j++){
    			setpos(j-1,i);
    			cout << f(dt[i][j]);
    		}
    	}
    	if(yie)
    	{
    		setpos(2,2);
    		cout << "白天模式:y";
    	}
    	else
    	{
    		setpos(2,2);
    		cout << "夜间模式:y";
    	}
    	setpos(106,2);
    	cout << "退出游戏: e";
    	setpos(43,6);
    	cout << "闯关 by: 吹来一阵秋风 与 墨水Ink";
    	setpos(45,10);
    	cout << "开始:k";
    	setpos(65,10); 
    	cout << "帮助:b";
    	setpos(45,12);
    	cout << "商店:s";
    	setpos(65,12);
    	cout << "公告:g";
    	setpos(54,17);
    	cout << "版本: " << version;
    	//xin();
    }
    void xin()
    {
    	balloon t;
    	t.color=3;
    	t.x=7;
    	t.y=11;
    	drawballoon(t);
    	t.color=8;
    	t.x=3;
    	t.y=6;
    	drawballoon(t);
    	t.color=13;
    	t.x=18;
    	t.y=15;
    	drawballoon(t);
    	t.color=12;
    	t.x=103;
    	t.y=3;
    	drawballoon(t);
    	t.color=11;
    	t.x=91;
    	t.y=5;
    	drawballoon(t);
    	t.color=10;
    	t.x=109;
    	t.y=9;
    	drawballoon(t);
    	t.color=9;
    	t.x=102;
    	t.y=15;
    	drawballoon(t);
    	t.color=14;
    	t.x=16;
    	t.y=2;
    	drawballoon(t);
    	t.color=12;
    	t.x=32;
    	t.y=12;
    	drawflower(t);
    	t.color=5;
    	t.x=28;
    	t.y=9;
    	drawflower(t);
    	t.color=11;
    	t.x=78;
    	t.y=4;
    	drawflower(t);
    	t.color=10;
    	t.x=27;
    	t.y=16;
    	drawflower(t);
    	t.color=9;
    	t.x=82;
    	t.y=8;
    	drawflower(t);
    	t.color=6;
    	t.x=66;
    	t.y=17;
    	drawflower(t);
    	t.color=3;
    	t.x=73;
    	t.y=18;
    	drawflower(t);
    	SetColorAndBackground(10,0);
    	for(int i=7;i<=13;i++)
    	{
    		setpos(42,i);
    		cout <<"■";
    		setpos(74,i);
    		cout <<"■";
    	}
    	for(int j=42;j<=74;j++)
    	{
    		setpos(j,6);
    		cout <<"■";
    		setpos(j,14);
    		cout <<"■";
    	}
    	setpos(50,5);
    	cout << "--*节日特别版*--";
    	setpos(48,8);
    	cout << "闯关 by: 吹来一阵秋风";
    	setpos(45,10);
    	cout << "开始:k";
    	setpos(65,10); 
    	cout << "帮助:b";
    	setpos(45,12);
    	cout << "商店:s";
    	setpos(65,12);
    	cout << "公告:g";
    	SetColorAndBackground(15,0);
    }
    

    Copy

    水果胎神:

    #include<bits/stdc++.h>
    #include<windows.h>
    #include<stdio.h>
    #include<conio.h>
    #include<time.h>
    using namespace std;
    float X,Y;int Left=1,Right=30,Up=1,Down=20;bool Medal[22],Fr[6],Cheat=0;
    int Clocknum,T,Score,Combo,FruitNum,Jump_2,SS,FT[11],FC,FCT,FCF,FO,FFFt,FXia,FUp;
    int up,dn,lf,rt,sy;float Vx,Vy;int Walk,Jump,Rush;
    int Attention,Jumplock,AttTime,Dnlock,Lflock,Rtlock;
    int RushT1,RushT2,RushT3;float Rush_Vx,Rush_Vy,Rush_x0,Rush_y0,Rush_X,Rush_Y;
    const float G=0.038,t0=0.2,t00=0.8,t000=0.3;//时间参量 
    struct node
    {int Type;
        float X,Y,R,x0,y0,x1,y1;
        float Vx,Vy;
        int Life,color,brounce,half,Angle,AngleSpeed,t;
    }F[100001];int l,m;
    int N[100][45],M[100][45];
    
    float Sin(int a) {return sin(3.1416*a/180);}float Cos(int a) {return cos(3.1416*a/180);}
    void Color(int a){if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
    if(a==-10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==-11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==-12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_GREEN);if(a==-13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_BLUE);if(a==-14) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED);if(a==-15) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN);if(a==-16) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_BLUE);if(a==-17) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE);
    if(a==-1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE);if(a==-2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_GREEN);if(a==-3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_BLUE);if(a==-4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED);if(a==-5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_GREEN);if(a==-6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_BLUE);if(a==-7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE);
    }
    int To_int(float a){return int(a+0.5);}float Abs(float a){return (a>=0)?a:-a;}
    void Setpos(float x,float y){COORD pos;pos.X=To_int(x)*2+1,pos.Y=To_int(y)+3;SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);}
    void Put_Frame(){Color(0);int x=Right-Left+1,y=Down-Up+1;for(int i=0;i<=x+1;i++)for(int j=0;j<=y+1;j++){if(i==0||j==0||i==x+1||j==y+1) Setpos(i,j),printf("[]");}}
    void Clear(float x,float y){
    //	if(RushT3>0) Color(0);else 
    	Color(-Abs(N[To_int(x)*2][To_int(y)]));Setpos(x,y),printf("  ");
    	M[To_int(x*2)][To_int(y)]=-1;
    }void Medal_();
    void Put_Man(float x1,float y1){
    	int x=To_int(x1);int y=To_int(y1);
    	if(y<Up||x<Left||x>Right||y>Down) return;
    	if(Rush==1||AttTime>0||Attention>0) Color(5);
    	else Color(1);
    	Setpos(x1,y1),printf("●");
    }
    void Cir(float r,char a){//不要改 ,冲刺动画1 
    	int num=7,Angle=r*10;if(r<=2) num=4;
    	int next=360/num;
    	for(int i=Angle;i<360+Angle;i+=next)
    	{
    		float x,y;
    		x=X+Cos(i)*r;
    		y=Y+Sin(i)*r;
    		if(y<Up||x<Left||x>Right||y>Down) continue;
    		if(a==' '&&N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(0),printf(" ");
    		else if(N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(-14),printf(" ");
    	}
    }
    void Cir2(int k,float r,char a){//水果整圆 
    	int col=F[k].color;
    	float x0=F[k].X,y0=F[k].Y,R=F[k].R;
    	for(int i=y0-R;i<=y0+R;i++){float Ax=sqrt(R*R-(i-y0)*(i-y0));//cout<<i<<' '<<x0-Ax+0.5<<' '<<x0+Ax<<' ';
    	for(float k=x0-Ax+0.5;k<x0+Ax;k+=0.5)
    		if(a==' ') N[To_int(k*2)][i]=0; else N[To_int(k*2)][i]=col;
    	}
    	int num=24,Angle=0;if(r<=1) num=4;else if(r<=3) num=12;
    	int next=360/num;
    	for(int i=Angle;i<360+Angle;i+=next)
    	{
    		float x,y;
    		x=F[k].X+Cos(i)*r;
    		y=F[k].Y+Sin(i)*r;
    		if(y<Up||x<Left||x>Right||y>Down) continue;
    		else {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col+10;}
    	}for(int i=0;i<360;i+=90)
    	{
    		float x,y;
    		x=F[k].X+Cos(i)*r;
    		y=F[k].Y+Sin(i)*r;
    		if(y<Up||x<Left||x>Right||y>Down) continue;
    		else {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col+10;}
    	}
    }
    void Cir3(int xx,int yy,float r,char a){//不要改 冲刺动画2
    	r++;
    	int num=8,Angle=r*10-17;if(r<=2) num=4;
    	int next=360/num;
    	for(int i=Angle;i<360+Angle;i+=next)
    	{
    		float x,y;
    		x=xx+Cos(i)*r;
    		y=yy+Sin(i)*r;
    		if(y<Up||x<Left||x>Right||y>Down) continue;
    		if(a==' '&&N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(0),printf(" ");
    		else if(N[To_int(x*2)][To_int(y)]==0&&N[To_int(x*2)+1][To_int(y)]==0&&N[To_int(x*2)-1][To_int(y)]==0) Setpos(x,y),Color(-14),printf(" ");
    	}
    }
    void Cir4(int k,float r,char a){//半圆 
    	int col=F[k].color;
    	int num=24,Angle=F[k].Angle;if(r<=1) num=4;else if(r<=3) num=12;
    	int next=360/num;
    	for(int i=Angle;i<180+Angle;i+=next)
    	{
    		float x,y;
    		x=F[k].X+Cos(i)*r;
    		y=F[k].Y+Sin(i)*r;
    		if(y<Up||x<Left||x>Right||y>Down) continue;
    		else {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col;}
    	}bool left=0;
    	float x0=F[k].X+Cos(Angle)*r    ,y0=F[k].Y+Sin(Angle)*r;
    	float x1=F[k].X+Cos(Angle+180)*r,y1=F[k].Y+Sin(Angle+180)*r;
        float Ax=x1-x0,Ay=y1-y0,Dis=sqrt(Ax*Ax+Ay*Ay);
        if(Ay<0) swap(x1,x0),swap(y1,y0),Ax*=-1,Ay*=-1;
    	if(Ax<0) left=1;
        float ax=Ax/Dis*1.0,ay=Ay/Dis*1.0;
    	float i=x0,j=y0;
        while(j<=y1&&((i<=x1&&left==0)||(i>=x1&&left==1))){
    		if(j<Up||i<Left||i>Right||j>Down) int nil=0;
    		else {if(a==' ') N[To_int(i*2)][To_int(j)]=0; else N[To_int(i*2)][To_int(j)]=col;}
            i+=ax;j+=ay;
        }for(int i=0;i<360;i+=90)
    	{
    		if(i<Angle||i>Angle+180) continue; 
    		float x,y;
    		x=F[k].X+Cos(i)*r;
    		y=F[k].Y+Sin(i)*r;
    		if(y<Up||x<Left||x>Right||y>Down) continue;
    		else  {if(a==' ') N[To_int(x*2)][To_int(y)]=0; else N[To_int(x*2)][To_int(y)]=col;}
    	}
    }
    void Line(float x0,float y0,float x1,float y1,char a,int col){bool left=0;
    if(col==-5) m++,F[m].Type=-1,F[m].Life=1,F[m].t=0,F[m].x0=x0,F[m].y0=y0,F[m].x1=x1,F[m].y1=y1;
        float Ax=x1-x0,Ay=y1-y0,Dis=sqrt(Ax*Ax+Ay*Ay);
        if(Ay<0) swap(x1,x0),swap(y1,y0),Ax*=-1,Ay*=-1;
    	if(Ax<0) left=1;
        float ax=Ax/Dis*0.9,ay=Ay/Dis*0.9;
    	float i=x0,j=y0;
        while(j<=y1&&((i<=x1&&left==0)||(i>=x1&&left==1))){
    		if(j<Up||i<Left||i>Right||j>Down) int nil=0;
    		else Setpos(i,j),Color(col),printf("  ");
            i+=ax;j+=ay;
        }Color(0);
    }
    void Print_Fruit(int i,char a){
    	if(F[i].half==1) Cir4(i,F[i].R,a);
    	else Cir2(i,F[i].R,a);
    }
    void Go(){
    		if(Y<=Up) Y=Up,AttTime=0;
    		if(Y>=Down){FC=0;FCF=0;if(clock()-FCT>10000&&Medal[20]==0&&T>10000) Medal[20]=1,Medal_(); FCT=clock();
    			if(Jump>=1) Vy=0,Vx/=2,Y=Down,Jump=0,Walk=1;//触地 
    		}
    		if(X<=Left) X=Left,Vx=0;if(X>=Right) X=Right,Vx=0;
    
    	int Num=up+dn+lf+rt;
    
    	if(RushT3>0) RushT3--;
    	if(RushT2>0){
    		if(Rush==2&&RushT2<4) Cir3(Rush_X,Rush_Y,RushT2,' ');
    		RushT2--;
    		if(RushT2==0) {Rush=0,RushT3=3,Vx=(Vx+Rush_Vx*t00)/3.0,Vy=(Vy+Rush_Vy*t00)/3.0,Line(X,Y,Rush_x0,Rush_y0,' ',-5),Color(0);if(Y<=Up) RushT3=0,AttTime=0,Vy=max(0.1,(double)Vy);FC++;FO++;if(FC>=8&&Medal[16]==0) Medal[16]=1,Medal_();if(FO>=10&&Medal[18]==0) Medal[18]=1,Medal_();}
    		if(Rush==2) Cir3(Rush_X,Rush_Y,RushT2,'|');
    	}
    	if(AttTime>0){AttTime--;
    		if(Num!=0){
    			if(up==1&&Jumplock!=0) int nil=0;
    			else if(dn==1&&Dnlock!=0) int nil=0;
    			else if(Num==1&&lf==1&&Lflock!=0) int nil=0;
    			else if(Num==1&&rt==1&&Rtlock!=0) int nil=0;
    			else {Attention=0;AttTime=0;
    			if(RushT1==0&&Rush==0) RushT1=6;
    			}
    		}
    	}
    	if(RushT1!=0) {
    		if(RushT1<6) Cir(RushT1,' ');
    		RushT1--;
    		if(RushT1==0){//开始冲刺 
    			int non=0;//non很重要 
    			if(Num==1){
    				if(up==1&&Jumplock==0) Rush_Vx=0,Rush_Vy=-1.3,Jumplock=1;
    				else if(lf==1&&Lflock==0) Rush_Vx=-1.8,Rush_Vy=0,Lflock=1;
    				else if(rt==1&&Rtlock==0) Rush_Vx=1.8,Rush_Vy=0,Rtlock=1;
    				else if(dn==1&&Dnlock==0) Rush_Vx=0,Rush_Vy=3,Dnlock=1;
    				else non=1;
    			}
    			else if(Num==2){
    				if(up==1&&lf==1&&Jumplock==0) Rush_Vx=-1.5,Rush_Vy=-1.5,Jumplock=1;
    				else if(up==1&&rt==1&&Jumplock==0) Rush_Vx=1.5,Rush_Vy=-1.5,Jumplock=1;
    				else if(dn==1&&lf==1&&Dnlock==0) Rush_Vx=-1.5,Rush_Vy=1.5,Dnlock=1;
    				else if(dn==1&&rt==1&&Dnlock==0) Rush_Vx=1.5,Rush_Vy=1.5,Dnlock=1;
    				else non=1;
    			}
    			else non=1;
    			if(non==0) {Rush_x0=X,Rush_y0=Y,Rush=1,RushT2=4;}
    		}
    		else Cir(RushT1,'|');
    	}
    	if(Walk==1&&Jump==0){//正在触地 
    		FC=0;FCF=0;if(clock()-FCT>10000&&Medal[20]==0&&T>10000) Medal[20]=1,Medal_(); FCT=clock();
    		if(Abs(Vx)<1.95*t0) Attention=0;
    		if(Num==0) Vx*=0.6;//摩擦 
    		if(Num==1||(Num==2&&up==1)){
    			if(lf==1){
    				if(Vx<=2*t0&&Vx>-0.8*t0) Vx-=0.5*t0;
    				else if(Vx<=-0.8*t0&&Vx>-2*t0) Vx-=0.1*t0;
    				else if(Vx<=-2*t0){
    					Vx=-2*t0,Attention=1;
    					if(up==1) Rush_x0=X,Rush_y0=Y,Rush_X=X-1,Rush_Y=Y-2,Rush=2,RushT2=4,Rush_Vx=-1.5,Rush_Vy=-1.5,Jumplock=1; 
    				}
    			}
    			if(rt==1){
    				if(Vx<=0.8*t0&&Vx>-2*t0) Vx+=0.5*t0;
    				else if(Vx>=0.8*t0&&Vx<2*t0) Vx+=0.1*t0;
    				else if(Vx>=2*t0){
    					Vx=2*t0,Attention=1;
    					if(up==1) Rush_x0=X,Rush_y0=Y,Rush_X=X+1,Rush_Y=Y-2,Rush=2,RushT2=4,Rush_Vx=1.5,Rush_Vy=-1.5,Jumplock=1;
    				}
    			}
    			if(up==1){
    				Vy=-0.6;Walk=0;Jump=1;Jumplock=1;
    			}
    		}
    	}
    	if(Jump>=1&&Rush==0){//普通滞空 
    	int num=up+dn;
    		if(Abs(Vy)<=0.05) Attention=1,AttTime=7;else Attention=0;
    		if(num==1&&up==1&&Jump==1&&Attention==0&&AttTime==0&&Jumplock==0&&Jump_2==1){
    			if(Vy>-0.2) Vy=-0.4;
    			if(Vy<=-0.2) Vy-=0.2;
    			Jump=2;//二段跳 
    		}
    		if(num==1&&dn==1){
    			Vy+=0.1; 
    		}
    		Vy+=G;
    	}
    	Clear(X,Y);
    	if(RushT1>0) int nil=0;
    	else if(Rush==1) X+=Rush_Vx*t00,Y+=Rush_Vy*t00;
    	else X+=Vx,Y+=Vy;
    
    	if(Y<Up||X<Left||X>Right||Y>Down){
    		if(Rush>0||RushT3>0)
    		{
    			if((X<Left||X>Right)&&Rush_Vy==0) Vy=-0.2,Vx=0;
    		}
    	}
    	if(Y<=Up) Y=Up;if(X<=Left) X=Left;if(X>=Right) X=Right;if(Y>=Down) Y=Down;
    	Put_Man(X,Y);
    }
    void CreatF(){
    if(clock()-Clocknum>=25) return;
    if(FruitNum>=5) return;
    	m++;F[m].Life=2;F[m].brounce=1;F[m].half=0;F[m].t=0; 
    	int R=rand()%5+1;F[m].Type=R;
    	if(R==1) F[m].R=3.45,F[m].color=2;//="Watermelon";
    	if(R==2) F[m].R=1.85,F[m].color=4;//="Strawberry";
    	if(R==3) F[m].R=2.0,F[m].color=5;//="Orange    ";
    	if(R==4) F[m].R=2.45,F[m].color=3;//="Grapes    ";
    	if(R==5) F[m].R=1.85,F[m].color=6;//="Blueberry ";
    	int r=rand()%6+1;
    	if(r<=6) {//上下方 
    		F[m].X=Left+(rand()%100)*(Right-Left)/100.0;
    		F[m].Vx=1.0-(rand()%100)*2/100.0;
    		if(r>1) F[m].Y=Down-1,F[m].Vy=-1-(rand()%100)*1/100.0;
    		else F[m].Y=Up+1,F[m].Vy=(rand()%100)*1/100.0;
    		F[m].Angle=rand()%360,F[m].AngleSpeed=rand()%20+5;
    		if(r>1) F[m].Y+=F[m].R;else F[m].Y-=F[m].R;
    	}
    }
    void Move(int Stage){//移动的状态调整,准备移步至Go函数 
    	float x,y,r;FruitNum=0;
    	for(int i=l;i<=m;i++){
    
    		if(i==l&&F[i].Life==0){l++;if(l>m) l=1,m=0;continue;}
    		else if(F[i].Life==0) {continue;}
    		if(F[i].Type==-1){F[i].t++;
    			if(F[i].t==3) Line(F[i].x0+Rush_Vx,F[i].y0+Rush_Vy,F[i].x1+Rush_Vx,F[i].y1+Rush_Vy,' ',-1);
    			if(F[i].t>=4) Line(F[i].x0,F[i].y0,F[i].x1,F[i].y1,' ',0),Line(F[i].x0+Rush_Vx,F[i].y0+Rush_Vy,F[i].x1+Rush_Vx,F[i].y1+Rush_Vy,' ',0),F[i].Life=0;
    		continue;}
    		if(F[i].Life==2){F[i].t++;
    			if(F[i].t>10) {Color(0);x=F[i].X,y=(F[i].Y>=Down)?Down:Up;
    			 		M[To_int(x*2)][To_int(y)]=-1;
    				F[i].Life=1;}
    			else  Color((F[i].t%6<=2)?-4:-5),Setpos(F[i].X,(F[i].Y>=Down)?Down:Up),cout<<"!!";
    			Color(0);
    			continue;
    		}
    		Print_Fruit(i,' ');
    		if(F[i].half==1) F[i].R*=0.96;
    		if(F[i].half==1&&F[i].t>=20){F[i].Life=0;continue;}
    		if(F[i].Type>=1&&F[i].Type<=5) FruitNum++;
    
    		x=F[i].X,y=F[i].Y,r=F[i].R;
    		float D=sqrt((x-X)*(x-X)+(y-Y)*(y-Y)),D2=sqrt((Rush_x0-x)*(Rush_x0-x)+(Rush_y0-y)*(Rush_y0-y));
    		if((D<=r*1.0||D2<=r*1.0)&&(Rush!=0||RushT3!=0)&&F[i].half==0) {
    		Combo++,Score+=10*Combo;FO=0;
    		if(Medal[8]==0&&Rush_Vx==0&&Rush_Vy>0) FXia++;if(FXia>=30) Medal[8]=1,Medal_(); if(Medal[14]==0&&Rush_Vx==0&&Rush_Vy<0) FUp++;if(FUp>=40) Medal[14]=1,Medal_(); 
    		if(Medal[3]==0) Medal[3]=1,Medal_();if(Fr[F[i].Type]==0) {Fr[F[i].Type]=1;if(Fr[1]+Fr[2]+Fr[3]+Fr[4]+Fr[5]==5) Medal[4]=1,Medal_();}if(Combo>=15&&Medal[5]==0) Medal[5]=1,Medal_();if(Combo>=40&&Medal[17]==0) Medal[17]=1,Medal_();if(Score==520&&Medal[6]==0) Medal[6]=1,Medal_();
    		if(Score>=1000&&Medal[15]==0) Medal[15]=1,Medal_();if(Score>=10000&&Medal[19]==0) Medal[19]=1,Medal_();if(Score>=100000&&Medal[21]==0) Medal[21]=1,Medal_();
    		FCF++;if(FCF>=5&&Medal[9]==0) Medal[9]=1,Medal_();if(FCF>=10&&Medal[12]==0) Medal[12]=1,Medal_();
    			if(F[i].Y<=Up&&Medal[13]==0) Medal[13]=1,Medal_(); if(F[i].Y>=Down&&Medal[7]==0) Medal[7]=1,Medal_();if(Medal[10]==0) {FFFt++;if(FFFt>10) FFFt-=10;FT[FFFt]=clock();int Kkk=5000;for(int kk=1;kk<=10;kk++) Kkk=max(Kkk,(int)(clock()-FT[kk]));if(Kkk<5000) Medal[10]=1,Medal_();} 
    	
    			F[i].Life=0;
    			for(int tt=1;tt<=3;tt++){
    			if(tt==1) for(int t=1;t<=2;t++) m++,F[m].R=F[i].R-0.6+(rand()%10+10)/20.0,F[m].Life=1,F[m].Type=6,F[m].color=4,F[m].brounce=0,F[m].half=1,F[m].X=F[i].X,F[m].Y=F[i].Y,F[m].t=0;
    			if(tt==2) for(int t=1;t<=2;t++) m++,F[m].R=F[i].R-0.6+(rand()%10+10)/20.0,F[m].Life=1,F[m].Type=6,F[m].color=F[i].color,F[m].brounce=0,F[m].half=1,F[m].X=F[i].X,F[m].Y=F[i].Y,F[m].t=0;
    			if(tt==3) for(int t=1;t<=2;t++) m++,F[m].R=F[i].R-0.4,F[m].Life=1,F[m].Type=F[i].Type,F[m].color=F[i].color+10,F[m].brounce=0,F[m].half=1,F[m].X=F[i].X,F[m].Y=F[i].Y,F[m].t=0;
    			if(Rush_Vx!=0&&Rush_Vy==0){//横切 
    				int turn=(Rush_Vx>0)?1:-1;
    				F[m-1].Angle=180,F[m-1].AngleSpeed=turn*(5+rand()%10),F[m-1].Vx=F[i].Vx+turn*(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy-(rand()%10+10)*0.05-1;//上 
    				F[m].Angle=0,F[m].AngleSpeed=turn*(-5-rand()%10),F[m].Vx = F[i].Vx+turn*(rand()%10+10)*0.1,F[m].Vy = F[i].Vy+(rand()%10+10)*0.05;//下 
    			}else if(Rush_Vy!=0&&Rush_Vx==0){//竖切 
    				int turn=(Rush_Vy>0)?1:-1;
    				F[m-1].Angle=270,F[m-1].AngleSpeed=turn*(5+rand()%10),F[m-1].Vx=F[i].Vx+(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy+(rand()%10+10)*0.1*turn-0.5;//→ 
    				F[m].Angle=90,F[m].AngleSpeed=turn*(-5-rand()%10),F[m].Vx = F[i].Vx-(rand()%10+10)*0.1,F[m].Vy = F[i].Vy+(rand()%10+10)*0.1*turn-0.5;//左 
    			}else{
    				if(Rush_Vy*Rush_Vx<0){int turn=(Rush_X<0)?1:-1; //右上 
    					F[m-1].Angle=135,F[m-1].AngleSpeed=-turn*(5+rand()%10),F[m-1].Vx=F[i].Vx-(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy-(rand()%10+10)*0.04-1;//上 
    					F[m].Angle=315,F[m].AngleSpeed=turn*(5+rand()%10),F[m].Vx=F[i].Vx+(rand()%10+10)*0.1,F[m].Vy=F[i].Vy+(rand()%10+10)*0.04;//下 
    				} 
    				if(Rush_Vy*Rush_Vx>0){int turn=(Rush_X<0)?1:-1;//左上 
    					F[m-1].Angle=225,F[m-1].AngleSpeed=-turn*(5+rand()%10),F[m-1].Vx=F[i].Vx+(rand()%10+10)*0.1,F[m-1].Vy=F[i].Vy-(rand()%10+10)*0.04-1;//上 
    					F[m].Angle=45,F[m].AngleSpeed=turn*(5+rand()%10),F[m].Vx=F[i].Vx-(rand()%10+10)*0.1,F[m].Vy=F[i].Vy+(rand()%10+10)*0.04;//下 
    				}
    			}if(tt<=1) F[m-1].Vx*=1.2,F[m-1].Vy*=1.2,F[m].Vx*=1.2,F[m].Vy*=1.2;
    			}
    			continue;
    		}
    		F[i].t++;
    		F[i].Angle+=F[i].AngleSpeed;
    		if(F[i].Angle>=360) F[i].Angle-=360;
    		if(F[i].Angle<0) F[i].Angle+=360;
    
    		F[i].X+=F[i].Vx*t000;F[i].Y+=F[i].Vy*t000;
    		x=F[i].X,y=F[i].Y;
    
    		if(y+F[i].R<Up||y-F[i].R>Down){
    			if(F[i].t<=5) {F[i].Vy*=-1;
    			if(y+F[i].R<Up) F[i].Y=-F[i].R+Up;
    			if(y-F[i].R>Down) F[i].Y=F[i].R+Down;}
    
    		F[i].Life=0;continue;}
    		if(x<Left||x>Right){
    			if(F[i].brounce>0||F[i].t<=5){if(F[i].brounce>0) F[i].brounce--;F[i].Vx*=-1;
    				if(x<Left) F[i].X=Left;
    				if(x>Right) F[i].X=Right;
    			}
    			else {F[i].Life=0;continue;}
    		}
    		if(Stage==0||F[i].Type<=0||F[i].Type>=5) F[i].Vy+=G;
    
    		Print_Fruit(i,'*');
    	}
    }
    void Print(){
    	for(int i=Left*2;i<=Right*2;i++)
    	for(int j=Up;j<=Down;j++){
    		if(N[i][j]!=M[i][j]){
    			if(N[i][j]==0) Color(0),Setpos(i/2.0,j),printf("  ");
    			else Color(-Abs(N[i][j])),Setpos(i/2.0,j),printf("  ");
    		}
    		M[i][j]=N[i][j];
    	}memset(N,0,sizeof(N));Color(0);
    }
    void Slow(char *p) {while(1){if(*p!=0) printf("%c",*p++);else break;if(!kbhit()) Sleep(20);}}
    int speed;
    void Start(){Color(1);SS=1;
    	Setpos(2,2),cout<<"水果忍胎 0.9 ";
    	Setpos(10,3),cout<<"作者:胎神大大";
    	Setpos(2,6),cout<<"按 x 进入教学模式,按 y 直接开始游戏!";
    	Setpos(2,8),cout<<"除了封面其他的都做好了qwq,但是做封面好麻烦所以说不想做直接发布了   我这边用的 Win11 输出的字符画很流畅,不知道你们电脑会不会有什么黑点阿残影阿输出错误之类的,总之这个游戏玩起来确实蛮爽的!大家加油,看看哪个先点满成就哈(万一有 BUG 呢是吧,毕竟有些成就死活打不出来...另外因为有成就所以说顺便把存档也做了,大家放心打)";
    	Setpos(1,20),cout<<"你可根据电脑性能重新选择画面流畅度:默认为 均衡 流畅度,按 q 调为低流畅,按 w 调为中低流畅,按 e 调为极高流畅 (盲目调高流畅度会导致画面卡顿)";speed=4;
    	A:char e=_getch();if(e=='y') return;else if(e=='x') int nil=0;else if(e=='q') {speed=10;goto A;}else if(e=='w') {speed=4;goto A;}else if (e=='e') {speed=2;goto A;}else goto A;
    	int Stage=0,StageY=0,StageT=0;
    	system("cls");memset(N,0,sizeof(N));memset(M,0,sizeof(M));
    	Put_Frame();
    	T=0;Clocknum=0;X=2;Y=1;Vx=Vy=0;Jump=1;Put_Man(X,Y);//初始状态掉落 
    	memset(F,0,sizeof(F));l=m=0;Score=Combo=0;
        while(1) if(clock()-Clocknum>=25)
        {T++;
        	Clocknum=clock();
        	up=dn=lf=rt=0;
            if(GetAsyncKeyState(VK_UP)&0x8000) up=1;else Jumplock=0; 
            if(GetAsyncKeyState(VK_DOWN)&0x8000) dn=1;else Dnlock=0; 
            if(GetAsyncKeyState(VK_LEFT)&0x8000) lf=1;else Lflock=0; 
            if(GetAsyncKeyState(VK_RIGHT)&0x8000) rt=1;else Rtlock=0; 
            if(kbhit()) {char g=_getch();if(g==' ') Sleep(100),Setpos(16,3),sy++,Color(0),system("pause");if(g=='y'&&Stage>=1) StageY=1;if(g=='x'&&Stage==2) Jump_2=1,Setpos(26,26),Color(5),cout<<"开";}
            if(sy>=1) Setpos(16,3),cout<<"                           ",sy=0;
        
            if(Stage==0&&StageT==0){
            	Setpos(2,22),Color(0),Slow("欢迎来到 忍者神胎 教学关卡");Sleep(500);
            	Setpos(2,24),Color(0),Slow("本游戏只有↑↓→←四种按键操作,想必是十分简单的,但又有很大的发挥空间!");Sleep(500);
            	Setpos(2,26),Color(0),Slow("按下↑↓→←进行移动。注:空中按 ↓ 有加速下落的效果");
    			StageT=T;
    		}
    		if(Stage==0&&T-StageT>=100)//5s
    		{Stage++;
            	Setpos(2,22),Color(0),printf("                           ");
            	Setpos(2,24),Color(0),printf("                                                                        ");
            	Setpos(2,26),Color(0),printf("                                                                ");
            	m++,F[m].Angle=0,F[m].AngleSpeed=0,F[m].color=2,F[m].half=0,F[m].Life=1,F[m].R=3.45,F[m].t=0,F[m].Type=1,F[m].Vx=F[m].Vy=0,F[m].X=16,F[m].Y=13;Print();
            	Setpos(2,22),Color(0),Slow("按↑跳起后,立刻在空中重新  长按 方向键 可以进行挥砍!来试试刀法!");
            	Setpos(2,24),Color(0),Slow("按 y 开启下一阶段教学");
    		}
    		if(Stage==1&&F[1].Life==1) StageT=T;
    		if(Stage==1&&F[1].Life==0&&T-StageT>=20){
    			StageT=T;
            	l=0,m++,F[1].Angle=45,F[1].AngleSpeed=0,F[1].color=2,F[1].half=0,F[1].Life=1,F[1].R=3.45,F[1].t=0,F[1].Type=1,F[1].Vx=F[1].Vy=0,F[1].X=16,F[1].Y=13;
    		}
            if(StageY==1&&Stage==1){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
            	Setpos(2,22),Color(0);printf("                                                               ");
            	Setpos(2,24),Color(0);printf("                      "); 
            	l=0;for(int tt=1;tt<=3;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0,F[tt].X=16,F[tt].Y=19-tt*5;
            	Print();Setpos(2,22),Color(0),Slow("接下来练习连招!");
            	Setpos(2,24),Color(0),Slow("在空中可以连续按  ↑ 进行多段跳跃,如果你不习惯,可以按 x 开启二段跳能力(PS:连招的秘诀是把握节奏)");
            	Setpos(2,26),Color(0),Slow("按 y 开启下一阶段教学      ( 二段跳能力状态:       )");
            	Setpos(26,26),Color(5);cout<<"关";
    		}
    		if(Stage==2&&F[1].Life+F[2].Life+F[3].Life==3) StageT=T;
    		if(Stage==2&&F[1].Life+F[2].Life+F[3].Life<3&&T-StageT>=50){
    			StageT=T;
            	l=0;for(int tt=1;tt<=3;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0,F[tt].X=16,F[tt].Y=19-tt*5;
            }
            if(StageY==1&&Stage==2){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
            	Setpos(2,22),Color(0),printf("                 ");
            	Setpos(2,24),Color(0),printf("                                                                                                  ");
            	Setpos(2,26),Color(0),printf("                                                          ");
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=9,F[1].Y=15.5;F[2].X=17.3,F[2].Y=9.4;F[3].X=9.6,F[3].Y=3.5;F[4].X=17,F[4].Y=1;
    
            	Print();Setpos(2,22),Color(0);Slow("空中折线跳:先跳起,再在空中向上连续左右冲刺,是一种杀伤面积广,上升距离大的连招");
            	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学 (本关四个果子可一个连招砍完,试试精细操作!)"); 
    		}
    		if(Stage==3&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
    		if(Stage==3&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
    			StageT=T;
        
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=9,F[1].Y=15.5;F[2].X=17.3,F[2].Y=9.4;F[3].X=9.6,F[3].Y=3.5;F[4].X=17,F[4].Y=1;}
            if(StageY==1&&Stage==3){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
            	Setpos(2,22),Color(0),printf("                                                                                         ");
            	Setpos(2,24),Color(0),printf("                                                                            ");
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=15.4,F[1].Y=15.5;F[2].X=7.3,F[2].Y=9.5;F[3].X=15.4,F[3].Y=3.6;F[4].X=15.4,F[4].Y=8.5;
    
            	Print();Setpos(2,22),Color(0);Slow("三角围杀:先使用折线跳跳至目标上方,再向下瞄准,冲刺切除下方水果");
            	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学"); 
    		}
    		if(Stage==4&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
    		if(Stage==4&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
    			StageT=T;
        
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=15.4,F[1].Y=15.5;F[2].X=7.3,F[2].Y=9.5;F[3].X=15.4,F[3].Y=3.6;F[4].X=15.4,F[4].Y=8.5;}
            if(StageY==1&&Stage==4){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
            	Setpos(2,22),Color(0),printf("                                                                              ");
            	Setpos(2,24),Color(0),printf("                                                                            ");
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=4.7,F[1].Y=15.5;F[2].X=1,F[2].Y=15.5;F[3].X=1,F[3].Y=11;F[4].X=10,F[4].Y=5;
    
            	Print();Setpos(2,22),Color(0);Slow("撞墙跳:利用平扑撞墙会产生一个小向上速度的特性,将本应断掉的连招接续起来");
            	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学 (本关接连招砍绿果、紫果、红果)"); 
    		}
    		if(Stage==5&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
    		if(Stage==5&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
    			StageT=T;
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
            	F[1].X=4.7,F[1].Y=15.5;F[2].X=1,F[2].Y=15.5;F[3].X=1,F[3].Y=11;F[4].X=10,F[4].Y=5;}
            if(StageY==1&&Stage==5){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
            	Setpos(2,22),Color(0),printf("                                                                                ");
            	Setpos(2,24),Color(0),printf("                                                                            ");
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=18,F[1].Y=15;F[2].X=16,F[2].Y=17;F[3].X=24,F[3].Y=13;F[4].X=24,F[4].Y=8;
    
            	Print();Setpos(2,22),Color(0);Slow("平地起冲:长按 → 加速至变黄,立即再按下  ↑ 可直接起冲,接连招");
            	Setpos(2,24),Color(0);Slow("按 y 开启下一阶段教学 (本关接连招砍紫果、红果)"); 
    		}
    		if(Stage==6&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
    		if(Stage==6&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
    			StageT=T;
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
            	F[1].X=18,F[1].Y=15;F[2].X=16,F[2].Y=17;F[3].X=24,F[3].Y=13;F[4].X=24,F[4].Y=8;}
            if(StageY==1&&Stage==6){StageY=0;Stage++;memset(M,-1,sizeof(M));memset(N,0,sizeof(N));
            	Setpos(2,22),Color(0),printf("                                                                              ");
            	Setpos(2,24),Color(0),printf("                                                                            ");
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=5,F[1].Y=16;F[2].X=10,F[2].Y=19;F[3].X=12,F[3].Y=19;F[4].X=21,F[4].Y=15;
    
            	Print();Setpos(2,22),Color(0);Slow("凌波微步: 跳起在空中向右下冲击地面,不要松开 →以获得极大的速度,然后重新按下  ↑ ,紧接平地起冲!");
            	Setpos(2,24),Color(0);Slow("按 y 完成教学关卡 (本关蓝果下冲,紫果起跳,接连招砍红果)"); 
    		}
    		if(Stage==7&&F[1].Life+F[2].Life+F[3].Life+F[4].Life==4) StageT=T;
    		if(Stage==7&&F[1].Life+F[2].Life+F[3].Life+F[4].Life<4&&T-StageT>=50){
    			StageT=T;
            	l=0;for(int tt=1;tt<=4;tt++) m++,F[tt].Angle=0,F[tt].AngleSpeed=0,F[tt].color=tt,F[tt].half=0,F[tt].Life=1,F[tt].R=1.45,F[tt].t=0,F[tt].Type=1,F[tt].Vx=F[tt].Vy=0;
    			F[1].X=5,F[1].Y=16;F[2].X=10,F[2].Y=19;F[3].X=12,F[3].Y=19;F[4].X=21,F[4].Y=15;
            }
            if(StageY==1&&Stage==7) return;
        
    		if(RushT1==0) Move(1);
            Go();
    		if(RushT1==0&&T%speed==0) Print();
    }
    }
    void Read(){
        ifstream in("水果忍胎存档.in");int Xx=0,Yy;
        for(int i=0;i<=21;i++) in>>Medal[i],Xx+=345*(2*i+1)*Medal[i];
        in>>Yy>>Score>>Combo>>T>>FXia>>FUp;if(Yy!=Xx) Cheat=1;
        in.close();
    }
    void Save(){
        ofstream out("水果忍胎存档.in");int Xx=0;
        for(int i=0;i<=21;i++) out<<Medal[i]<<' ',Xx+=345*(2*i+1)*Medal[i];
        out<<Xx<<' '<<Score<<' '<<Combo<<' '<<T<<' '<<FXia<<' '<<FUp;
        out.close();
    }
    void Medal_(){if(SS==1) return;
    	if(Cheat==1) Setpos(33,0),Color(4),printf("检测到您更改过存档,你的存档已不可用。"),memset(Medal,0,sizeof(Medal));
    	Setpos(33,1),Color(0),printf("[成就系统]  (按 c 可以存档 d 读档)");int rr=0;
    	Setpos(34,3);if(Medal[3]==1) Color(5),rr++;else Color(7);printf("[出刀!]   完成一次切割");
    	Setpos(34,4);if(Medal[7]==1) Color(5),rr++;else Color(7);printf("[绝杀]     在底线处完成一次切割");
    	Setpos(34,5);if(Medal[4]==1) Color(5),rr++;else Color(7);printf("[全图鉴]   切割全部五种水果");
    	Setpos(34,6);if(Medal[5]==1) Color(5),rr++;else Color(7);printf("[闪光]     达到十五 COMBO");   
    	Setpos(34,7);if(Medal[6]==1) Color(5),rr++;else Color(7);printf("[回眸]     精准达到 520 分");  
    	Setpos(34,8);if(Medal[8]==1) Color(5),rr++;else Color(7);printf("[柴刀]     下劈劈裂水果三十次");
    	Setpos(34,9);if(Medal[9]==1) Color(5),rr++;else Color(7);printf("[连锁反应] 一次腾空中切割五个水果");
    	Setpos(34,10);if(Medal[10]==1) Color(5),rr++;else Color(7);printf("[霹雳]     五秒钟切割十个水果");
    	Setpos(34,11);if(Medal[11]==1) Color(5),rr++;else Color(7);printf("[征服者]   进行五分钟游戏");
    	Setpos(34,12);if(Medal[12]==1) Color(5),rr++;else Color(7);printf("[神来之笔] 一次腾空中切割十个水果");
    	Setpos(34,13);if(Medal[13]==1) Color(5),rr++;else Color(7);printf("[天封]     在最高线处完成一次切割");
    	Setpos(34,14);if(Medal[14]==1) Color(5),rr++;else Color(7);printf("[升龙]     上劈劈裂水果四十次");
    	Setpos(34,15);if(Medal[15]==1) Color(5),rr++;else Color(7);printf("[小忍者]   达到一千分");
    	Setpos(34,16);if(Medal[16]==1) Color(5),rr++;else Color(7);printf("[八连]     一次腾空中冲刺八次(有巧解)");   
    	Setpos(34,17);if(Medal[17]==1) Color(5),rr++;else Color(7);printf("[连诀]     达到四十 COMBO");   
    	Setpos(34,18);if(Medal[18]==1) Color(5),rr++;else Color(7);printf("[幸存者]   连续十次空刀(请勿点亮)");  
    	Setpos(34,19);if(Medal[19]==1) Color(5),rr++;else Color(7);printf("[水果杀手] 达到一万分");
    	Setpos(34,20);if(Medal[20]==1) Color(5),rr++;else Color(7);printf("[虎翅]     腾空十秒");   
    	Setpos(34,21);if(Medal[21]==1) Color(5),rr++;else Color(7);printf("[你疯了?!] 达到十万分");
    	Setpos(34,22);if(rr>=19) Medal[22]=1;if(Medal[22]==1) Color((T%4<=1)?-4:-5);else Color(7);printf("[传说]     达成全部成就");   
    }
    int main(){
        CONSOLE_CURSOR_INFO cursor_info={1,0};
        SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
        srand((unsigned)time(NULL));
        Start();
    	ST:SS=0;
    	system("cls");memset(N,0,sizeof(N));memset(M,0,sizeof(M));FC=FCF=FCT=FO=FFFt=FXia=FUp=0;memset(FT,0,sizeof(FT));memset(Medal,0,sizeof(Medal));
    	Put_Frame();Medal_();
    	T=0;Clocknum=0;X=2;Y=1;Vx=Vy=0;Jump=1;Put_Man(X,Y);//初始状态掉落 
    	memset(F,0,sizeof(F));l=m=0;Score=Combo=0;
        Setpos(2,-3),Color(1),cout<<"本游戏为休闲模式,没有目标分数,请尽情享受切水果的酣爽盛宴!(空格可以暂停)";Medal_();
        while(1) if(clock()-Clocknum>=25)
        {T++;if(T>11000&&Medal[11]==0) Medal[11]=1,Medal_();
        	Clocknum=clock();
        	up=dn=lf=rt=0;
            if(GetAsyncKeyState(VK_UP)&0x8000) up=1;else Jumplock=0; 
            if(GetAsyncKeyState(VK_DOWN)&0x8000) dn=1;else Dnlock=0; 
            if(GetAsyncKeyState(VK_LEFT)&0x8000) lf=1;else Lflock=0; 
            if(GetAsyncKeyState(VK_RIGHT)&0x8000) rt=1;else Rtlock=0; 
            if(kbhit()) {char g=_getch();if(g==' ') Sleep(100),Setpos(16,3),sy++,Color(0),system("pause");if(g=='c') Save(),system("color 6E"),Sleep(1000),system("color 0F");if(g=='d') Read(),system("color 6E"),Sleep(1000),system("color 0F"),Medal_();}
            if(sy>=1) Setpos(16,3),cout<<"                           ",sy=0;
        
    		if(RushT1==0) Move(0);
            Go();
    		if(RushT1==0&&T%speed==0) Print();
        
            if(clock()-Clocknum>=25) continue;
            if(T>=50&&T<=200&&T%15==5) CreatF();
    		if(T>=300&&T<2000&&T%80==5) CreatF();
    		else if(T>=2000&&T<3000&&T%70==5) CreatF();
    		else if(T>=3000&&T<4000&&T%50==5) CreatF();
    		else if(T>=4000&&T%30==5) CreatF();
    		if(T>=1500&&T%80==5) CreatF();
    		if(Combo>=10&&T%80==40) CreatF();
    	if((Combo<10&&T%140==0)||(Combo>=10&&Combo<20&&T%100==0)||(Combo>=20&&T%70==0)) Combo--;Combo=max(0,Combo);
        if(Rush==1||AttTime>0||Attention==1) Color(5);else Color(1);Setpos(2,-2),printf("积分:%-4d ",Score);
    	if(Combo>=15) Color((T%4<=1)?-4:-5); printf("  连击 %-3dCOMBO !!  ",Combo);
    	if(Rush==1||AttTime>0||Attention==1) Color(5);else Color(1);printf(" 用时:%d ",T);Color(0);
        }
        return 0;
    }
    

    Copy

    石头剪刀布:

    #include
    using namespace std;
    int pwin=0;
    int cwin=0;
    int draw=0;
    void player(int n){
    	switch(n){
    		case 1:cout<<"你出了剪刀"<<endl;break;
    		case 2:cout<<"你出了石头"<<endl;break;
    		case 3:cout<<"你出了布"<<endl;break; 
    	}
    }
    int computer(){
    	srand(time(0));
    	int n=rand()%3+1;
    	switch(n){
    		case 1:cout<<"电脑出剪刀"<<endl;break;
    		case 2:cout<<"电脑出石头"<<endl;break;
    		case 3:cout<<"电脑出布"<<endl;break;
    	}
    	return n;
    }
    void od(int a,int n){
    	if((a==1&&n==3)||(a==2&&n==1)||(a==3&&n==2)){
    		cout<<"你赢了"<<endl;
    		pwin++;
    	}
    	else{
    		if((n==1&&a==3)||(n==2&&a==1)||(n==3&&a==2)){
    			cout<<"你输了"<<endl;
    			cwin++;
    		}
    		else{
    			cout<<"平局"<<endl;
    			draw++;
    		}
    	}
    }
    int main(){
    	cout<<"=====石头剪刀布游戏====="<<endl;
    	cout<<"当前比分(玩家:电脑:平局):"<<pwin<<":"<<cwin<<":"<<draw<<endl;
    	while(1){
    		int a;
    		cout<<"\n请选择:1剪刀2石头3布(0退出)"<<endl;
    		cin>>a;
    		if(a==0)break;
    		if(a<1||a>3){
    			cout<<"错误,重新输入"<<endl;
    			continue; 
    		}
    		player(a);
    		int n=computer();
    		od(a,n);
    		cout<<"当前比分(玩家:电脑:平局):"<<pwin<<":"<<cwin<<":"<<draw<<endl;
    
    	}
    	cout<<"\n游戏结束,最终比分:"<<endl;
    	cout<<"玩家胜利:"<<pwin<<"次"<<endl; 
    	cout<<"电脑胜利:"<<cwin<<"次"<<endl; 
    	cout<<"平局:"<<draw<<"次"<<endl; 
    }
    

    Copy

    自己玩去吧

    (小小声)既然你看到这里了,就给你几个福利吧👁️点进来看看?

    福利一

    福利二

    福利三

    福利四

    福利五

    福利六

    福利七

    福利八

    福利九

    福利十

    福利十一

    福利十二

    福利十三

    福利十四

    福利持续更新中~~

    注:本文为搬运,如需原资料请找胡汀菡_137654 (Jevin)

  • 通过的题目

  • 最近活动

题目标签

入门
279
语法基础
154
基础
106
循环
84
基本运算
76
普及-
54
算法基础
53
分支
38
字符串
25
数学
22
排序
20
二维数组
20
递归
19
一维数组
16
进阶
15
STL容器
13
结构体
12
二分查找
12
普及
12
模拟算法
12