跳到正文

休闲·娱乐

魔塔中文版

hyk0YF0Gamer约 83 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年6月2日
篇幅
约 83 分钟

版本

  1. v1当前
C++
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
using namespace std;
const int saymax=30;
int SayTime;
int difficulty;
int x;
int spawnx[24][2]={{10,0},{1,9},{9, 9},{10,3},{1,3},{2,8},{7,6},{ 6,7},
				   { 7,1},{1,5},{4,10}};
int spawny[24][2]={{ 5,1},{0,0},{0,10},{ 9,0},{0,2},{2,2},{1,9},{10,7},
				   { 7,0},{0,6},{5, 9}};
int nx,ny,nf,level;
string UName,CeeLTH;
vector<string> skin;
int skinnum;
//                    1  2  3  4  5  6  7  8  9 10 11
int g[24][11][11]={{{ 3, 4, 4,11,10,10, 0, 0, 0, 0,12},// 1
					{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,90},
					{97,91,92, 2,98, 2, 4, 4,90, 2,11},
					{96,91,12, 7,10, 2, 4, 4,90, 2,90},
					{ 2, 7, 2, 2,12, 2, 2, 2,13, 2,11},
					{90,12,90, 2,12, 7,20,16,14, 2,90},
					{ 4,93, 4, 2,11, 2, 2, 2, 2, 2,11},
					{ 2, 8, 2, 2,10, 0, 0,11,90,11,90},
					{93,14,92, 2, 2, 9, 2, 2, 2, 7, 2},
					{92,91,93, 2,99,30, 6, 2, 4,22, 4},
					{90,12,90, 2, 4,34, 5, 2, 4, 5, 4}},
				   {{ 1, 2,35,49,50, 2, 6, 4,91,92,93},// 2
				    { 0, 2,35, 2,49, 2, 5, 5,91,91,91},
					{92, 2,38, 2,44, 2, 2, 2, 2, 2,28},
					{93, 2,38, 2,93,28,90,90, 7, 4, 4},
					{90, 2,99, 2,93, 2, 2, 2, 2,28, 2},
					{92, 2, 2, 2,92, 8,91, 2,49,91,50},
					{93,95,19,19,92, 2, 9, 2,94, 2,94},
					{90, 2, 2, 8, 2, 2,50, 2,91, 2,91},
					{90, 2,91,91,91, 2,49, 2,91, 2,91},
					{ 0, 2,91,36,91, 2,50, 2,91, 2,91},
					{ 3, 2,91,91,91, 2,49, 2,91, 2,91}},
				   {{92,92,92,15,93,93,93,15,91,91,91},// 3
				    {92, 4,92, 2,93, 7,93, 2,91, 4,91},
					{ 5, 4, 2, 2, 2, 9, 2, 2, 2, 4, 5},
					{ 2, 2, 2,91,15,41,15,91, 2, 2, 2},
					{38,37, 2,92, 2,90, 2,93, 2,37,38},
					{38,37, 2,90, 2,90, 2,90, 2,37,38},
					{40, 2, 2,45, 2,28, 2,45, 2, 2,40},
					{19,19,18,18, 2, 9, 2,18,18,19,19},
					{ 2, 2, 2, 2, 2,45, 2, 2, 2, 2, 2},
					{ 0,91,92,12, 2,13,12,12,92,91, 0},
					{ 1,91,93,12,12,12,12,12,93,91, 3}},
				   {{50,49,90,14, 7,14, 4,14,90,90,90},// 4
				    { 2, 2, 2,24, 2, 2, 2, 2, 7, 2, 8},
					{ 3, 2,50,49,23,91,91, 2,28, 2,15},
					{ 0, 2, 2, 2, 2, 2, 7, 2,90, 2,90},
					{12, 7,12,12, 4,12,12, 5, 5, 0,50},
					{90, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
					{16, 2,91,17, 2,50,22, 2,49,13,23},
					{16, 9,17,19, 8,22,24, 8,13,23,52},
					{16, 2,91,17, 2,50,22, 2,49,13,23},
					{90, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
					{12, 7,12,12, 4,12,12, 5, 5, 0, 1}},
				   {{22,22,19, 7,90, 7,91,91, 8,25,25},// 5
				    { 0, 2, 2, 2, 7, 2, 2, 2, 2, 2,37},
					{ 1, 2, 3, 2,15,19,18,90,90, 2, 2},
					{ 2, 2, 0, 2, 0, 2,50,49,91,93,92},
					{90,91, 0, 2,14, 2, 4, 4, 5, 4, 6},
					{ 0, 2, 2, 2, 7, 2, 2, 2, 2, 2, 2},
					{49, 0, 0,90,93,92,90, 0, 0, 0,50},
					{ 8, 2, 2, 2,18, 2, 2, 2, 8, 2, 2},
					{15,92,92, 2,15,91,91, 2,15,93,93},
					{18,92,92, 2,18,91,91, 2,18,93,93},
					{49,18,92, 2,38,18,91, 2,50,18,93}},
				   {{ 0,91,90,92,93, 0, 0, 7,19,23,22},// 6
				    { 8, 2, 0, 2, 2, 2, 2, 2, 2, 2, 4},
					{90, 2, 0, 2,54, 2,49, 2,50, 2, 4},
					{91, 2, 1, 2,18, 2,22, 2,28, 2, 4},
					{92, 2, 2, 2, 7, 2, 7, 2, 7, 2,26},
					{ 0, 7, 4, 4, 4, 0, 4, 0, 4, 9,99},
					{92, 2, 2, 2, 7, 2, 7, 2, 7, 2,26},
					{91, 2, 3, 2,18, 2,22, 2,28, 2, 4},
					{90, 2, 0, 2,54, 2,49, 2,50, 2, 4},
				    { 8, 2, 0, 2, 2, 2, 2, 2, 2, 2, 4},
				    { 0,91,90,92,93, 0, 0, 7,19,23,22}},
				   {{38,32,38, 9, 9, 2,23,15,19,22,24},// 7
				    {55,55,55, 2,94, 2,21, 2, 2, 2,49},
					{99,48,99, 2, 0, 7,91, 9,19,50,54},
					{44,44,44, 2, 0, 2,92, 2,50,49,54},
					{ 2,44, 2, 2, 0, 2,93, 2,49,50,54},
					{ 0, 0, 0, 0,21, 2, 4, 2, 2, 2, 2},
					{14, 2, 2, 2, 4, 2,91,92,93, 0, 3},
					{15, 0, 1, 2, 4, 2,25, 2, 2, 2, 2},
					{14, 2, 2, 2, 7, 2,26, 7,50,49,54},
					{ 0, 2,18,18,18, 2, 8, 2,50,49,54},
					{ 0, 7,18,18,18, 2,37, 2,50,49,54}},
				   {{92, 7, 4, 4,28,23,15,19,55,55,55},// 8
				    {23, 2, 2, 2, 2, 7, 2, 2, 2, 2, 9},
					{20, 8,19,22,49,25, 2,99,55, 2, 4},
					{93, 2,54,54,50,50, 2,38,40, 7,21},
					{20, 7,28,26,49,26, 2,99,55, 2, 4},
					{ 4, 2, 2, 2, 2,37, 2, 2, 2, 2,21},
					{22,92,93, 0, 2, 2, 2,92,93, 0, 0},
					{ 2, 7, 2, 0,19,43,19, 0, 2,24, 1},
					{ 2,26, 2,44, 2, 7, 2, 3, 2,18, 2},
					{ 2,27, 2, 2, 2,42, 2, 2, 2,54,49},
					{55,55,55, 2,55,42,55, 2,50,54,49}},
				   {{ 3, 2, 4, 7, 4, 5,28,26,18,41,38},// 9
				    { 0, 2,27, 2, 7, 2, 2, 7, 2, 2, 2},
					{23, 7,26, 2,48,55,55,48,55,55,55},
					{29, 2, 0, 2,55,55,55,55,55,55,55},
					{40, 2, 0, 2,55,55,55,55,55,55,55},
					{38, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2},
					{38, 2,25, 0, 4, 4, 4,24, 7, 4, 4},
					{ 2, 2, 7, 2, 2, 2, 2, 0, 2, 2, 5},
					{50,49,54,18,41,18, 2, 1, 2,40,40},
					{50,49,54, 2,18,55, 2, 2, 2,55,55},
					{50,49,54, 2,55,55,55,55,55,55,55}},
				   {{ 1, 2,58,59,60,58,59,60,58,59,60},//10
				    { 0,57,44, 2,57, 2, 2, 2,57, 2,57},
					{58, 2,58, 2,58,58,59,60,45,57,48},
					{59, 2,59, 2,59, 2, 2, 2,58, 2,58},
					{60, 2,60, 2,60, 2, 3, 2,59, 2,59},
					{58, 2,58, 2,47, 2, 0,57,60, 2,60},
					{59,57,59,57,48,46,47, 2,60, 2,58},
					{60, 2,60, 2, 2, 2,57, 2,57, 2,59},
					{58, 2,47,58,59,60,58,59,60,57,60},
					{59, 2,57, 2, 2, 2,57, 2, 2, 2,47},
					{60,57,58,59,60,58,59,60,58,59,60}},
				   {{58,59,60,11,45,14,19,19,81, 0,51},//11
				    {48, 2,57, 2, 2, 2,57, 2, 2, 2,59},
					{51,57,11,45,14,19,19,81, 0,57,60},
					{55, 2,58, 2,57, 2, 2, 2,58, 2,61},
					{61, 2,51,57,59, 0, 1, 2,59, 2,61},
					{51, 2,47, 2,61, 2, 2, 2,60,81,61},
					{58,57,59, 2,60,11,45,14,44, 2,61},
					{60, 2,58, 2,57, 2, 2, 2,57, 2,61},
					{58,57,60,61,51,61,61,61,60,58,48},
					{46, 2,57, 2, 2, 2, 2, 2,57, 2, 2},
					{11,45,14,19,19,81, 0,55,55, 0, 3}},
				   {{59,55,45, 9,49,90,50,39,60,59, 3},//12
					{54,60,58,39,90,91,92,39,81,41,57},
					{48,60,40,39,54,92,91, 9,58,61,60},
					{ 7,39,39,39,39,39,39,39, 8,39,39},
					{51,61,81,39, 0,55, 0,39,56,57,57},
					{56,56, 0,39, 0,55, 0,39,57,57,57},
					{51,61,81,39, 0,55, 0, 7,57,57,57},
					{ 7,39,39,39, 8,39,39,39,39,39, 7},
					{57,58,59,39,50,40,54,39, 0, 0, 0},
					{58,81,60,39,90,91,92,39, 0, 0, 0},
					{59,60,61, 7, 4, 5, 4,39, 0, 0, 1}},
				   {{}},
				  };
int pts[24][11][11];
int dam[100],def[100],hel[100],mon[100];
int coi[100],Exp[100];
int power[21],pcost[21];
string pname[21];
double bld[100];
int magicthings;
bool ds,mb,waigua,akas;
int Ykey,Rkey,Bkey,Ikey;
bool C1,G1,K,C2,G2,boss_alive,hypereee;
void book_check(int id);
void slow(string a){
//	for(int i=0;i<a.size();i++){
//		cout<<a[i];
//		if(SayTime<0)continue;
//		Sleep(SayTime);
//	}
	cout<<a;
	cout<<'\n';
}
void cc(){
	system("cls");
}
void tk(int num,bool f1,bool f2){
	slow("不汉化该部分");
	if(f1)cout<<'|';
	switch(num){
		case  0:cout<<"    ";break;
		case  1:cout<<"DOWN";break;
		case  2:cout<<"####";break;
		case  3:cout<<"U  P";break;
		case  4:cout<<"Ykey";break;
		case  5:cout<<"Bkey";break;
		case  6:cout<<"Rkey";break;
		case  7:cout<<"Ydor";break;//door
		case  8:cout<<"Bdor";break;
		case  9:cout<<"Rdor";break;
		case 90:cout<<"Sbld";break;//blood
		case 91:cout<<"Lbld";break;
		case 92:cout<<"Rdmd";break;//diamond
		case 93:cout<<"Bdmd";break;
		case 94:cout<<"Idor";break;
		case 95:cout<<"Sdor";break;
		case 96:cout<<"Cshp";break;//shop
		case 97:cout<<"Gshp";break;
		case 98:cout<<"Kshp";break;
		case 99:cout<<"Akey";break;
		case 30:cout<<"Mbok";break;//monster book
		case 31:cout<<"Mwtr";break;//magic water
		case 32:cout<<"Imgc";break;
		case 33:cout<<"Fmgc";break;
		case 34:cout<<CeeLTH;break;
		case 35:cout<<"Gcon";break;
		case 36:cout<<"Ikey";break;
		case 37:cout<<"Swng";break;
		case 38:cout<<"Bwng";break;
		case 39:cout<<"Lava";break;
		case 10:cout<<"Gslm";break;//slame
		case 11:cout<<"Rslm";break;
		case 12:cout<<"Sskl";break;//skull
		case 13:cout<<"Bslm";break;
		case 14:cout<<"Kskl";break;
		case 15:cout<<"Cskl";break;
		case 16:cout<<"Sbat";break;
		case 17:cout<<"Lbat";break;
		case 18:cout<<"Wman";break;
		case 19:cout<<"Bbat";break;
		case 20:cout<<"Fmag";break;//magician
		case 21:cout<<"Smag";break;
		case 22:cout<<"Hbst";break;//beast
		case 23:cout<<"Kslm";break;
		case 24:cout<<"Fsdr";break;//soldier
		case 25:cout<<"Ssdr";break;
		case 26:cout<<"Tsdr";break;
		case 27:cout<<"Kbst";break;
		case 28:cout<<"Gknt";break;//gold
		case 29:cout<<"Gcpt";break;
		case 40:cout<<"Dswd";break;//double-sword
		case 41:cout<<"Emag";break;
		case 42:cout<<"Rwth";break;//witch
		case 43:cout<<"Cwth";break;
		case 44:cout<<"Kmag";break;
		case 45:cout<<"Rman";break;
		case 46:cout<<"Esdr";break;//evil
		case 47:cout<<"Ecpt";break;
		case 48:cout<<"Eswd";break;
		case 49:cout<<"Bdef";break;
		case 50:cout<<"Bdam";break;
		case 51:cout<<"Rock";break;//rockman
		case 52:cout<<"Thif";break;
		case 53:cout<<"Hybm";break;
		case 54:cout<<"Ebld";break;
		case 55:cout<<"Incr";break;//increase
		case 56:cout<<"HDHD";break;
		case 57:cout<<"####";break;
		case 58:cout<<"hey,";break;
		case 59:cout<<"man!";break;
		case 60:cout<<"ikun";break;
		case 61:cout<<"7wlv";break;
		case 62:cout<<"dang";break;
		case 81:cout<<"#ft#";break;
		default:{
			cc();
			slow("error!Code G1");
			exit(322122562);
			break;
		}
	}
	if(f2)cout<<'|';
}
void ml(char* s){
	system(s);
}
void comedy(int id){
	slow("不汉化该部分");
	switch(id){
		case  0:cout<<"Empty";break;
		case  1:cout<<"Downstairs";break;
		case  2:cout<<"Wall";break;
		case  3:cout<<"Upstairs";break;
		case  4:cout<<"YellowKey";break;
		case  5:cout<<"BlueKey";break;
		case  6:cout<<"RedKey";break;
		case  7:cout<<"YellowDoor";break;
		case  8:cout<<"BlueDoor";break;
		case  9:cout<<"RedDoor";break;
		case 90:cout<<"SmallBlood";break;
		case 91:cout<<"LargeBlood";break;
		case 92:cout<<"RedDiamond";break;
		case 93:cout<<"BlueDiamond";break;
		case 94:cout<<"IronDoor";break;
		case 95:cout<<"StrangeDoor";break;
		case 96:cout<<"CoinShop";break;
		case 97:cout<<"ExpShop";break;
		case 98:cout<<"KeyShop";break;
		case 99:cout<<"AllKey";break;
		case 30:cout<<"MagicBook";break;
		case 31:cout<<"MysterousWater";break;
		case 32:cout<<"IceMagic";break;
		case 33:cout<<"FireMagic";break;
		case 34:cout<<"Yourself";break;
		case 35:cout<<"GoldCoins";break;
		case 36:cout<<"IronKey";break;
		case 37:cout<<"SmallWing";break;
		case 38:cout<<"BigWing";break;
		case 39:cout<<"Lava";break;
		case 10:cout<<"GreenSlame";break;
		case 11:cout<<"RedSlame";break;
		case 12:cout<<"SoldierSkull";break;
		case 13:cout<<"BigSlame";break;
		case 14:cout<<"KnightSkull";break;
		case 15:cout<<"CaptainSkull";break;
		case 16:cout<<"SmallBat";break;
		case 17:cout<<"LargeBat";break;
		case 18:cout<<"WhiteMan";break;
		case 19:cout<<"BloodBat";break;
		case 20:cout<<"FirstMagician";break;
		case 21:cout<<"SecondMagician";break;
		case 22:cout<<"HumanBeast";break;
		case 23:cout<<"KingSlame";break;
		case 24:cout<<"FirstSoldier";break;
		case 25:cout<<"SecondSoldier";break;
		case 26:cout<<"ThirdSoldier";break;
		case 27:cout<<"KnightBeast";break;
		case 28:cout<<"GoldKnight";break;
		case 29:cout<<"GoldCaptain";break;
		case 40:cout<<"DoubleSword";break;
		case 41:cout<<"EvilMagician";break;
		case 42:cout<<"RedWitch";break;
		case 43:cout<<"ClothesWitch";break;
		case 44:cout<<"KingMagician";break;
		case 45:cout<<"RedMan";break;
		case 46:cout<<"EvilSoldier";break;
		case 47:cout<<"EvilCaptain";break;
		case 48:cout<<"EvilSword";break;
		case 49:cout<<"BigDefense";break;
		case 50:cout<<"BigDamage";break;
		case 51:cout<<"RockHuman";break;
		case 52:cout<<"theThief";break;
		case 53:cout<<"HyperBomb";break;
		case 54:cout<<"ExtraBlood";break;
		case 55:cout<<"Increase";break;
		case 56:cout<<"theBoss-MagicDragon";break;
		case 57:cout<<"Wall";break;
		case 58:cout<<"hey,man~~~";break;
		case 59:cout<<"MAN-Magician";break;
		case 60:cout<<"ikunman!";break;
		case 61:cout<<"SevenWolves";break;
		case 62:cout<<"dangerous thing";break;
		case 81:cout<<"the wall fight with you";break;
		default:{
			slow("error!Code G1");
			exit(49575968);
			break;
		}
	}
}
void updates(){
	cc();
	slow("现在更新:");
	slow("1.汉化(我自己的游戏还要汉化回来)");
	slow("2.一些小小漏洞");
	slow("3.千万别点部分");
	slow("4.第12层");
	slow("5.经验交易新版");
	slow("6.陷阱部分");
	Sleep(1000);
}
void inventory_low(int id){
	tk(id,0,0);
	cout<<":";
	comedy(id);
	cout<<'\n';
	if(mon[id]){
		book_check(id);
	}
	ml("pause");
}
void inventory(){
	slow("欢迎来到图鉴");
	Sleep(500);
	slow("输入-1退出");
	Sleep(3000);
	while(1){
		cc();
		slow("编号:");
		int id;
		cin>>id;
		if(id==-1)break;
		else{
			tk(id,0,0);
			cout<<":";
			comedy(id);
		}
		cout<<'\n';
		ml("pause");
	}
}
void skinch(){
	cc();
	slow("选择皮肤");
	slow("哪一个?");
	for(int i=0;i<skinnum;i++){
		cout<<i<<' '<<skin[i]<<'\n';
	}
	int id;
	cin>>id;
	CeeLTH=skin[id%skinnum];
}
char a5234[25]={"g0123456789abcdefh"};
void shinyL(int rd){
	for(int i=1;i<=rd;i++){
		char *skman="color 0f";
		for(int j=2;j<=17;j++){
			system(skman);
			skman[6]=a5234[j];
			Sleep(10);
		}
	}
	system("color 0f");
}
void shinyR(int rd){
	for(int i=1;i<=rd;i++){
		char *skman="color ff";
		for(int j=15;j>=0;j--){
			system(skman);
			skman[6]=a5234[j];
			Sleep(10);
		}
	}
}
void thanks(){
	slow("此部分不汉化(我自己的游戏还要汉化!!!)");
	int kakak=SayTime;
	SayTime=50;
	cc();
	slow("magic tower 24");
	slow("the amazing,");
	slow("and wonderful game");
	slow("idea by hyk0YF0Gamer");
	slow("create by hyk0YF0Gamer");
	slow("thanks");
	slow("hyhyh(supports)");
	slow("Wpy123456(skin ideas)");
	slow("mark0575(supports)");
	slow("the magic tower will never out of fashion");
	slow("supporting will encourge us to make more games");
	slow("thanks for your playing.");
    SayTime=kakak;
	shinyL(5);
	shinyR(5);
	Sleep(2000);
}
void init(){
	boss_alive=true;
	Ykey=Rkey=Bkey=Ikey=0;
	nf=0;
	memset(power,0,sizeof power);
	pname[1]="治疗";
	pname[2]="强大";
	pname[3]="列炸弹";
	pname[4]="行炸弹";
	pname[5]="层炸弹";
	pname[6]="剧毒之剑";
	pname[7]="单炸弹";
	pname[8]="魔力盾";
	pcost[3]=500;
	pcost[4]=500;
	pcost[5]=3000;
	pcost[6]=1500;
	pcost[8]=3000;
	nx=spawnx[0][0];
	ny=spawny[0][0];
	dam[10]=20,def[10]=1,hel[10]=50,coi[10]=1,Exp[10]=1;
	dam[11]=20,def[11]=2,hel[11]=60,coi[11]=2,Exp[11]=2;
	dam[12]=25,def[12]=5,hel[12]=100,coi[12]=5,Exp[12]=4;
	dam[13]=40,def[13]=10,hel[13]=200,coi[13]=8,Exp[13]=6;
	dam[14]=50,def[14]=15,hel[14]=300,coi[14]=15,Exp[14]=12;
	dam[15]=120,def[15]=60,hel[15]=450,coi[15]=25,Exp[15]=21;
	dam[16]=30,def[16]=0,hel[16]=40,coi[16]=3,Exp[16]=2;
	dam[17]=50,def[17]=20,hel[17]=250,coi[17]=10,Exp[17]=8;
	dam[18]=160,def[18]=80,hel[18]=600,coi[18]=45,Exp[18]=40;
	dam[19]=135,def[19]=60,hel[19]=400,coi[19]=30,Exp[19]=25;
	dam[20]=60,def[20]=20,hel[20]=300,coi[20]=12,Exp[20]=10;
	dam[21]=200,def[21]=120,hel[21]=600,coi[21]=50,Exp[21]=45;
	dam[22]=100,def[22]=70,hel[22]=500,coi[22]=40,Exp[22]=35;
	dam[23]=150,def[23]=75,hel[23]=700,coi[23]=35,Exp[23]=30;
	dam[24]=100,def[24]=70,hel[24]=600,coi[24]=40,Exp[24]=35;
	dam[25]=400,def[25]=240,hel[25]=2000,coi[25]=80,Exp[25]=60;
	dam[26]=600,def[26]=360,hel[26]=3000,coi[26]=100,Exp[26]=75;
	dam[27]=400,def[27]=250,hel[27]=2400,coi[27]=85,Exp[27]=65;
	dam[28]=300,def[28]=180,hel[28]=1500,coi[28]=65,Exp[28]=55;
	dam[29]=600,def[29]=300,hel[29]=3500,coi[29]=125,Exp[29]=100;
	dam[40]=700,def[40]=200,hel[40]=1000,coi[40]=100,Exp[40]=90;
	dam[41]=700,def[41]=500,hel[41]=3200,coi[41]=160,Exp[41]=135;
	dam[42]=300,def[42]=100,hel[42]=1000,coi[42]=65,Exp[42]=55;
	dam[43]=150,def[43]=50,hel[43]=500,coi[43]=40,Exp[43]=36;
	dam[44]=1000,def[44]=500,hel[44]=4500,coi[44]=105,Exp[44]=100;
	dam[45]=800,def[45]=400,hel[45]=4000,coi[45]=100,Exp[45]=95;
	dam[46]=1100,def[46]=500,hel[46]=3500,coi[46]=105,Exp[46]=100;
	dam[47]=1200,def[47]=500,hel[47]=4000,coi[47]=120,Exp[47]=120;
	dam[48]=1200,def[48]=600,hel[48]=4000,coi[48]=135,Exp[48]=130;
	dam[51]=500,def[51]=400,hel[51]=800,coi[51]=100,Exp[51]=85;
	dam[56]=10000,def[56]=6000,hel[56]=100000,coi[56]=114514,Exp[56]=1919810;
	dam[57]=2000,def[57]=1000,hel[57]=8000,coi[57]=400,Exp[57]=360;
	dam[58]=3000,def[58]=2200,hel[58]=12000,coi[58]=150,Exp[58]=150;
	dam[59]=3500,def[59]=2500,hel[59]=13500,coi[59]=160,Exp[59]=160;
	dam[60]=3600,def[60]=2800,hel[60]=14400,coi[60]=160,Exp[60]=160;
	dam[61]=4000,def[61]=3200,hel[61]=15000,coi[61]=180,Exp[61]=175;
	dam[62]=5600,def[62]=4500,hel[62]=20000,coi[62]=0,Exp[62]=0;
	dam[81]=4000,def[81]=3000,hel[81]=15000,coi[81]=177,Exp[81]=170;
	for(int i=10;i<=89;i++){
		Sleep(10);
		if(i>=30&&i<=39)continue;
		if(i==49||i==50||i==52||i==53||i==54||i==55)continue;
		if(i==18)bld[i]=0.75;
		else if(i==41)bld[i]=0.67;
		else if(i==44)bld[i]=0.50;
		else if(i==59)bld[i]=0.45;
		else bld[i]=1.00;
		mon[i]=1;
		dam[i]*=difficulty;
		def[i]*=difficulty;
		hel[i]*=difficulty;
	}
	skin.clear();
	skinnum=0;
	dam[0]=10,def[0]=10,hel[0]=1000,bld[0]=1.00;
}
void welcome(){
	difficulty=1;
	init();
	slow("欢迎来到魔塔");
	slow("作者为 hyk0YF0Gamer");
	slow("这是中文版");
	Sleep(500);
	slow("现在版本:");
	slow("C-0.9.2.9(暂时只有12层)");
	Sleep(500);
	slow("洛谷:");
	slow("www.luogu.com.cn/user/657531");
	Sleep(500);
	updates();
	Sleep(2000);
	cc();
	slow("按任何键开始游戏!");
	char t;
	cin>>t;
	cc();
}
void save(int re){
	cc();
	slow("保存......");
	ofstream out("beifen.in");
	if(re==0){
		out.close();
		ofstream out("MagicTower24_0.in");
	}
	if(re==1){
		out.close();
		ofstream out("MagicTower24_1.in");
	}
	if(re==2){
		out.close();
		ofstream out("MagicTower24_2.in");
	}
	if(re==3){
		out.close();
		ofstream out("MagicTower24_3.in");
	}
	if(re==4){
		out.close();
		ofstream out("MagicTower24_4.in");
	}
	if(re==5){
		out.close();
		ofstream out("MagicTower24_5.in");
	}
	if(re==6){
		out.close();
		ofstream out("MagicTower24_6.in");
	}
	if(re==7){
		out.close();
		ofstream out("MagicTower24_7.in");
	}
	if(re==8){
		out.close();
		ofstream out("MagicTower24_8.in");
	}
	if(re==9){
		out.close();
		ofstream out("MagicTower24_9.in");
	}
	for(int gpt=0;gpt<24;gpt++){
		for(int i=0;i<11;i++){
			for(int j=0;j<11;j++){
				out<<g[gpt][i][j]<<' ';
			}
			out<<'\n';
		}
	}
	for(int i=1;i<=20;i++)out<<power[i]<<' ';
	out<<'\n';
	out<<difficulty<<' '<<int(ds)<<' '<<SayTime<<' '<<mb<<'\n';
	out<<nf<<' '<<nx<<' '<<ny<<'\n';
	out<<Ykey<<' '<<Bkey<<' '<<Rkey<<' '<<Ikey<<' '<<magicthings<<'\n';
	out<<C1<<' '<<C2<<' '<<K<<' '<<G1<<' ';
	out<<G2<<' '<<boss_alive<<' '<<hypereee<<' '<<waigua<<' '<<akas<<'\n';
	out<<UName<<' '<<CeeLTH<<'\n';
	out<<dam[0]<<' '<<def[0]<<' '<<hel[0]<<' ';
	out<<bld[0]<<' '<<coi[0]<<' '<<Exp[0]<<' '<<level<<'\n';
	for(int i=10;i<=89;i++){
		if(i>=30&&i<=39)continue;
		if(i==49||i==50||i==52||i==53||i==54||i==55)continue;
		out<<dam[i]<<' '<<def[i]<<' '<<hel[i]<<' '<<mon[i];
		out<<' '<<bld[i]<<' '<<coi[i]<<' '<<Exp[i]<<'\n';
	}
	for(int gpt=0;gpt<24;gpt++){
		for(int i=0;i<11;i++){
			for(int j=0;j<11;j++){
				out<<pts[gpt][i][j]<<' ';
			}
			out<<'\n';
		}
	}
	out<<skinnum<<'\n';
	for(int i=0;i<skinnum;i++){
		out<<skin[i]<<' ';
	}
	out<<'\n';
	out.close();
	slow("保存成功!");
	Sleep(1000);
	cc();
	return;
}
void read(int re){
	cc();
	slow("读入中......");
	ifstream in("beifen.in");
	if(re==0){
		in.close();
		ifstream in("MagicTower24_0.in");
	}
	if(re==1){
		in.close();
		ifstream in("MagicTower24_1.in");
	}
	if(re==2){
		in.close();
		ifstream in("MagicTower24_2.in");
	}
	if(re==3){
		in.close();
		ifstream in("MagicTower24_3.in");
	}
	if(re==4){
		in.close();
		ifstream in("MagicTower24_4.in");
	}
	if(re==5){
		in.close();
		ifstream in("MagicTower24_5.in");
	}
	if(re==6){
		in.close();
		ifstream in("MagicTower24_6.in");
	}
	if(re==7){
		in.close();
		ifstream in("MagicTower24_7.in");
	}
	if(re==8){
		in.close();
		ifstream in("MagicTower24_8.in");
	}
	if(re==9){
		in.close();
		ifstream in("MagicTower24_9.in");
	}
	for(int gpt=0;gpt<24;gpt++){
		for(int i=0;i<11;i++){
			for(int j=0;j<11;j++){
				in>>g[gpt][i][j];
			}
		}
	}
	for(int i=1;i<=20;i++)in>>power[i];
	in>>difficulty>>ds>>SayTime>>mb;
	in>>nf>>nx>>ny;
	in>>Ykey>>Bkey>>Rkey>>Ikey>>magicthings;
	in>>C1>>C2>>K>>G1>>G2>>boss_alive>>hypereee>>waigua>>akas;
	in>>UName>>CeeLTH;
	in>>dam[0]>>def[0]>>hel[0]>>bld[0]>>coi[0]>>Exp[0]>>level;
	for(int i=10;i<=89;i++){
		if(i>=30&&i<=39)continue;
		if(i==49||i==50||i==52||i==53||i==54||i==55)continue;
		in>>dam[i]>>def[i]>>hel[i]>>mon[i]>>bld[i]>>coi[i]>>Exp[i];
	}
	for(int gpt=0;gpt<24;gpt++){
		for(int i=0;i<11;i++){
			for(int j=0;j<11;j++){
				in>>pts[gpt][i][j];
			}
		}
	}
	skin.clear();
	in>>skinnum;
	for(int i=0;i<skinnum;i++){
		in>>skin[i];
	}
	in.close();
	slow("读入成功!");
	Sleep(1000);
	cc();
	return;
}
void setting(){
	char t1;
	cc();
	slow("这是设置");
	Sleep(2000);
	cc();
	slow("设置选项");
	slow("1.语言速度");
	slow("2.难度(无法使用)");
	slow("3.系统设置");
	cin>>t1;
	if(t1=='1'){
		slow("什么速度?");
		cin>>SayTime;
	}
	if(t1=='2'){
		slow("错误!编号 S6");
		exit(498572113);
		for(int i=10;i<=89;i++){
			if(i>=30&&i<=39)continue;
			dam[i]/=difficulty;
			def[i]/=difficulty;
			hel[i]/=difficulty;
		}
		dam[0]/=difficulty;
		def[0]/=difficulty;
		hel[0]/=difficulty;
		slow("什么难度?");
		cin>>difficulty;
		for(int i=10;i<=89;i++){
			if(i>=30&&i<=39)continue;
			dam[i]*=difficulty;
			def[i]*=difficulty;
			hel[i]*=difficulty;
		}
		dam[0]*=difficulty;
		def[0]*=difficulty;
		hel[0]*=difficulty;
	}
	if(t1=='3'){
		char* sss;
		slow("什么系统设置?");
		cin>>sss;
		ml(sss);
	}
//	if(t1=='4'){
//		cout<<"now:"<<ds<<'\n';
//		Sleep(500);
//		slow("change it?");
//		bool dss;
//		cin>>dss;
//		ds^=dss;
//	}
	if(t1=='~'){
		waigua=!waigua;
	}
	slow("设置成功!");
	slow("你要更多吗?");
	char xxx;
	cin>>xxx;
	if(xxx=='y')setting();
	if(xxx!='y'&&xxx!='n'){
		slow("错误!编号 S1");
		exit(2102948445);
	}
	Sleep(1000);
	cc();
}
void help(){
	slow("这是帮助");
	Sleep(500);
	cc();
	slow("魔塔是个有趣的游戏");
	slow("这是24层魔塔");
	slow("使用 \"wasd\" 移动");
//	slow("in the game,you look like *--*");
	slow("按 'g' 退出游戏模式");
	slow("按 'p' 使用能力");
	slow("按 'i' 查看图鉴");
	slow("按 'f' 使用快速商店");
	slow("按 't' 买能力");
	Sleep(2000);
	cc();
	cout<<"开始你的故事吧,"<<UName<<"!\n";
	Sleep(1145);
	cc();
	return;
}
void hang(bool f1){
	for(int i=1;i<=11;i++)cout<<"+----";
	cout<<"+";
	if(f1)cout<<'\n';
}
void print(int nf){
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][0][i],1,0);
	cout<<'|';
	cout<<" 红钥匙:"<<Rkey;
	cout<<" 蓝钥匙:"<<Bkey;
	cout<<" 黄钥匙:"<<Ykey<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][1][i],1,0);
	cout<<'|';
	cout<<"等级:"<<level<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][2][i],1,0);
	cout<<'|';
	cout<<"生命:"<<hel[0]<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][3][i],1,0);
	cout<<'|';
	cout<<"伤害:"<<dam[0]<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][4][i],1,0);
	cout<<'|';
	cout<<"防御:"<<def[0]<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][5][i],1,0);
	cout<<'|';
	cout<<"金币:"<<coi[0]<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][6][i],1,0);
	cout<<'|';
	cout<<"经验:"<<Exp[0]<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][7][i],1,0);
	cout<<'|';
	cout<<"层数:"<<nf+1<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][8][i],1,0);
	cout<<'|';
	cout<<"X:"<<ny<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][9][i],1,0);
	cout<<'|';
	cout<<"Y:"<<nx<<'\n';
	hang(1);
	for(int i=0;i<11;i++)tk(g[nf][10][i],1,0);
	cout<<'|';
	cout<<'\n';
	hang(1);
}
void error_G4(){
	slow("错误!编号 G4");
	exit(310475597);
}
void keyshop(){
	cc();
	Sleep(1000);
	if(!K){
		slow("man:感谢!");
		slow("给你一些钥匙!");
		Sleep(500);
		Ykey++;
		Bkey++;
		Rkey++;
		Ykey++;
		K=1;
	}
	while(K){
		cc();
		slow("你想买卖什么?");
		slow("买:");
		slow("1:黄钥匙:10 金币");
		slow("2:蓝钥匙:50 金币");
		slow("3:红钥匙:100 金币");
		slow("卖:");
		slow("4:黄钥匙:7 金币");
		slow("5:蓝钥匙:30 金币");
		slow("6:红钥匙:70 金币");
		slow("按0退出");
		cout<<"你有 "<<coi[0]<<"钱\n";
		char id;
		cin>>id;
		int kbman=id-'0';
		if(kbman==0)break;
		else{
			switch(kbman){
				case 1:{
					if(coi[0]<10)break;
					Ykey++;
					coi[0]-=10;
					break;
				}
				case 2:{
					if(coi[0]<50)break;
					Bkey++;
					coi[0]-=50;
					break;
				}
				case 3:{
					if(coi[0]<100)break;
					Rkey++;
					coi[0]-=100;
					break;
				}
				case 4:{
					if(!Ykey){
						error_G4();
					}
					Ykey--;
					coi[0]+=7;
					break;
				}
				case 5:{
					if(!Bkey){
						error_G4();
					}
					Bkey--;
					coi[0]+=30;
					break;
				}
				case 6:{
					if(!Rkey){
						error_G4();
					}
					Rkey--;
					coi[0]+=70;
					break;
				}
				default:{
					slow("错误!编号 G2");
//					exit(2129754390);
					break;
				}
			}
		}
	}
}
void expshop(){
	cc();
	Sleep(1000);
	if(!G1){
		slow("man:感谢!");
		slow("送你 20 防御!");
		def[0]+=20;
		G1=1;
		Sleep(1000);
	}
	if(!G2&&Exp[0]>500){
		slow("man:你想要买 \"增强之力吗\"? ");
		slow("500 经验");
		char k;
		cin>>k;
		if(k=='y'){
			G2=1;
			Exp[0]-=500;
			power[2]=1;
		}
	}
	while(G1){
		cc();
		slow("你想买什么?");
		slow("1:1 等级:100 经验");
		slow("2:5 伤害:30 经验");
		slow("3:5 防御:30 经验");
		if(G2){
			slow("4:3 等级:270 经验");
			slow("5:17 伤害:95 经验");
			slow("6:17 防御:95 经验");
		}
		slow("按0退出");
		cout<<"你有 "<<Exp[0]<<"经验\n";
		char id;
		cin>>id;
		int kbman=id-'0';
		if(kbman==0)break;
		else{
			switch(kbman){
				case 1:{
					if(Exp[0]<100||level>=200)break;
					level++;
					hel[0]+=1000;
					dam[0]+=7;
					def[0]+=8;
					Exp[0]-=100;
					break;
				}
				case 2:{
					if(Exp[0]<30)break;
					dam[0]+=5;
					Exp[0]-=30;
					break;
				}
				case 3:{
					if(Exp[0]<30)break;
					def[0]+=5;
					Exp[0]-=30;
					break;
				}
				case 4:{
					if(Exp[0]<270||!G2||level>=200)break;
					level+=3;
					hel[0]+=3000;
					Exp[0]-=270;
					dam[0]+=21;
					def[0]+=21;
					break;
				}
				case 5:{
					if(Exp[0]<95||!G2)break;
					dam[0]+=17;
					Exp[0]-=95;
					break;
				}
				case 6:{
					if(Exp[0]<95||!G2)break;
					def[0]+=17;
					Exp[0]-=95;
					break;
				}
				default:{
					slow("错误!编号 G2");
//					exit(2129754390);
					break;
				}
			}
		}
	}
}
void coinshop(){
	cc();
	Sleep(1000);
	if(!C1){
		slow("man:感谢!");
		slow("送你 20 伤害!");
		Sleep(1000);
		dam[0]+=20;
		C1=1;
	}
	if(!C2&&coi[0]>500){
		slow("man:你想买 \"恢复之力\"吗? ");
		slow("500 coins");
		char k;
		cin>>k;
		if(k=='y'){
			C2=1;
			coi[0]-=500;
			power[2]=1;
		}
	}
	while(C1){
		cc();
		slow("你要买什么?");
		slow("1:800 生命:25 金币");
		slow("2:4 伤害:25 金币");
		slow("3:4 防御:25 金币");
		if(C2){
			slow("4:4000 生命:100 金币");
			slow("5:20 伤害:100 金币");
			slow("6:20 防御:100 金币");
		}
		slow("按0退出");
		cout<<"你有 "<<coi[0]<<"钱\n";
		char id;
		cin>>id;
		int kbman=id-'0';
		if(kbman==0)break;
		else{
			switch(kbman){
				case 1:{
					if(coi[0]<25)break;
					hel[0]+=800;
					coi[0]-=25;
					break;
				}
				case 2:{
					if(coi[0]<25)break;
					dam[0]+=4;
					coi[0]-=25;
					break;
				}
				case 3:{
					if(coi[0]<25)break;
					def[0]+=4;
					coi[0]-=25;
					break;
				}
				case 4:{
					if(coi[0]<100||!C2)break;
					hel[0]+=4000;
					coi[0]-=100;
					break;
				}
				case 5:{
					if(coi[0]<100||!C2)break;
					dam[0]+=20;
					coi[0]-=100;
					break;
				}
				case 6:{
					if(coi[0]<100||!C2)break;
					def[0]+=20;
					coi[0]-=100;
					break;
				}
				default:{
					slow("错误!编号 G2");
//					exit(2129754390);
					break;
				}
			}
		}
	}
}
void ch_power(){
lpme:
	cc();
	slow("什么能力?");
	for(int i=1;i<=20;i++){
		if(power[i]){
			cout<<i<<' '<<pname[i]<<'\n';
		}
	}
	int p;
	cin>>p;
	if(!power[p]){
		slow("你没有此能力!");
		goto lpme;
	}
	cc();
	switch(p){
		case 1:{
			if(coi[0]<100){
				break;
			}
			coi[0]-=100;
			hel[0]+=500;
			break;
		}
		case 2:{
			if(coi[0]<200){
				break;
			}
			coi[0]-=200;
			dam[0]+=5;
			def[0]+=5;
			break;
		}
		case 3:{
			if(coi[0]<200){
				break;
			}
			coi[0]-=200;
			slow("哪一列?");
			int nyy;
			cin>>nyy;
			for(int i=0;i<10;i++){
				if(mon[g[nf][i][nyy]]){
					pts[nf][i][nyy]+=100;
				}
			}
			break;
		}
		case 4:{
			if(coi[0]<200){
				break;
			}
			coi[0]-=200;
			slow("哪一行?");
			int nxx;
			cin>>nxx;
			for(int i=0;i<10;i++){
				if(mon[g[nf][nxx][i]]){
					pts[nf][nxx][i]+=100;
				}
			}
			break;
		}
		case 5:{
			if(coi[0]<1500){
				break;
			}
			coi[0]-=1500;
			for(int i=0;i<10;i++){
				for(int j=0;j<10;j++){
					if(mon[g[nf][i][j]]){
						pts[nf][i][j]+=100;
					}
				}
			}
			break;
		}
		case 6:{
			if(coi[0]<200||bld[0]<=0.5){
				break;
			}
			coi[0]-=200;
			bld[0]-=0.01;
			break;
		}
		case 7:{
			if(coi[0]<25){
				break;
			}
			coi[0]-=25;
			slow("哪个位置?");
			int nxx,nyy;
			cin>>nxx>>nyy;
			pts[nf][nxx][nyy]+=100;
			break;
		}
		case 8:{
			if(akas){
				break;
			}
			if(Exp[0]<500||coi[0]<500)break;
			coi[0]-=500;
			Exp[0]-=500;
			akas=1;
			break;
		}
		default:{
			slow("错误!编号 G5");
			exit(85628290);
			break;
		}
	}
	cc();
}
void book_check(int id){
	cc();
	cout<<"伤害:"<<dam[id]<<'\n';
	cout<<"防御:"<<def[id]<<'\n';
	cout<<"生命:"<<hel[id]<<'\n';
	cout<<"百分比伤害:"<<bld[id]<<'\n';
}
int rx,ry;
int fight(int id,int edam,int edef,int ehel,double ebld){
	cc();
	if(dam[0]*2<edef){
		slow("你打不过!");
		return 0;
	}
	int rhel=hel[0];
	ehel=floor(ehel*1.0*bld[0]);
	if(ehel==0){
		if(id==56)goto loopc;
		else goto loopb;
	}
	if(akas&&id!=45)goto loopa;
	hel[0]=floor(hel[0]*1.0*ebld);
	if(id==42)hel[0]-=300;
	if(id==43)hel[0]-=100;
loopa:
	while(hel[0]>0&&ehel>0){
		srand(time(0));
		int gotdam;
		if(rand()%200<level){
			gotdam=max(0,dam[0]*2-edef);
		}
		else{
			gotdam=max(0,dam[0]-edef);
		}
		ehel-=gotdam;
		cout<<"你攻击了!"<<gotdam<<" 点伤害\n";
		Sleep(100);
		if(ehel<=0)break;
		gotdam=max(0,edam-def[0]);
		hel[0]-=gotdam;
		cout<<"你受伤了!"<<gotdam<<" 点伤害\n";
		Sleep(100);
		if(hel[0]<=0){
			slow("你死了!");
			srand(time(0));
			if(rand()%5!=0){
				slow("但有人帮了你!");
				hel[0]=rhel;
				return 2;
			}
			slow("错误!编号 G3");
			return 1;
		}
	}
loopc:
	if(id==56){
		if(nf==0){
			slow("Congratulations!");
			slow("你杀了它!");
			slow("游戏结束(完美结局)!");
			Sleep(2000);
			cc();
			boss_alive=0;
			goto loopd;
		}
		else{
			slow("你被骗了!");
			slow("哈哈哈!");
			Sleep(2000);
			goto loope;
		}
	}
loopb:
	cout<<"你击败了它!\n";
	Sleep(500);
loopd:
	cout<<"得到"<<coi[id]<<"金币,"<<Exp[id]<<"经验\n";
	coi[0]+=coi[id],Exp[0]+=Exp[id];
loope:
	g[nf][nx][ny]=0;
	swap(g[nf][nx][ny],g[nf][rx][ry]);
	return 0;
}
void powershop(){
	cc();
	slow("这是能力商店");
looper:
	cc();
	for(int i=3;i<=8;i++){
		if(i==7||power[i])continue;
		cout<<i<<'.'<<pname[i]<<' '<<pcost[i]<<"coins\n";
	}
	slow("买哪个?");
	int buy;
	cin>>buy;
	if(coi[0]<pcost[buy]){
		slow("你的钱太少了");
		goto loopt;
	}
	coi[0]-=pcost[buy];
	power[buy]=1;
	slow("购买成功!");
loopt:
	slow("你想要买更多吗?");
	char xeu;
	cin>>xeu;
	if(xeu=='y')goto looper;
	else if(xeu=='n')return;
	else{
		slow("错误!编号 W2");
		srand(time(0));
		exit(rand()%INT_MAX);
	}
}
void waiguas(){
	slow("Congratulations!");
	slow("你发现了特殊工具库!");
	int ean=10;
	Sleep(2000);
	cc();
	while(ean&&~ean){
		cc();
		slow("特殊工具");
		Sleep(500);
		cin>>ean;
		if(ean==114514)coi[0]=0x3f3f3f3f;
		if(ean==2147483647)Exp[0]=0x3f3f3f3f;
		if(ean==31415926)dam[0]+=10;
		if(ean==444666)def[0]+=10;
		if(ean==581313113)hel[0]+=1000;
		if(ean==666886)dam[0]*=2;
		if(ean==75931)def[0]*=2;
		if(ean==858585858)hel[0]*=2;
		if(ean==989989495)bld[0]=0.0;
	}
	if(ean==0){
		slow("错误!编号 W1");
		exit(218571);
	}
	return;
}
void fastshop(){
	slow("快速商店");
	coi[0]=floor(coi[0]*1.0*0.99);
	Exp[0]-=10;
	slow("哪一个?");
	slow("c:金币商店");
	slow("e:经验商店");
	slow("k:钥匙商店");
	char eeeee;
	cin>>eeeee;
	switch(eeeee){
		case 'c':coinshop();break;
		case 'e':expshop();break;
		case 'k':keyshop();break;
		default:{
			slow("错误!编号 G6");
//			exit(84648464);
			break;
		}
	}
}
void game(){
	cc();
	slow("新游戏:1");
	slow("继续:2");
	int jjbb;
	cin>>jjbb;
	if(jjbb==1){
		for(int i=1;i<=5;i++){
			cc();
			slow("重置中......");
			Sleep(500);
			cc();
			slow("重置中...");
			Sleep(500);
		}
		init();
		for(int i=1;i<=5;i++){
			cc();
			slow("等待中......");
			Sleep(500);
			cc();
			slow("等待中...");
			Sleep(500);
		}
		if(UName=="hyk0YF0Gamer"){
			dam[0]+=1000;
			def[0]+=100;
			hel[0]+=100;
		}
	}
	else if(jjbb!=2){
		slow("错误!编号 S5");
		exit(485761574);
	}
	cc();
	Sleep(1000);
	slow("游戏开始!");
	Sleep(2000);
	cc();
	int kak=SayTime;
	SayTime=30;
	slow("魔塔");
	slow("作者:hyk0YF0Gamer");
	cc();
	for(int i=1;i<=5;i++){
		slow("启动中......");
		Sleep(500);
		cc();
		slow("启动中...");
		Sleep(500);
		cc();
	}
	cc();
	SayTime=kak;
	ml("pause");
	if(MessageBox(NULL,"警告","确定?",MB_YESNO|MB_ICONWARNING)==IDNO)
		return;
	cc();
	while(boss_alive){
		cc();
		print(nf);
		slow("去哪里?(按wasd)");
		char t;
		cin>>t;
		rx=nx;
		ry=ny;
		switch(t){
			case 'w':nx--;break;
			case 'a':ny--;break;
			case 's':nx++;break;
			case 'd':ny++;break;
			case 'g':return;
			case 'p':ch_power();break;
			case 'f':fastshop();break;
			case 't':powershop();break;
			case 'q':{
				if(UName!="hyk0YF0Gamer"||!waigua)goto kewu;
				waiguas();
				break;
			}
			case 'i':{
				int ttx,tty;
				slow("什么位置?");
				cin>>ttx>>tty;
				inventory_low(g[nf][ttx][tty]);
				break;
			}
			default:{
			kewu:
				slow("错误!编号 G2");
//				exit(39645848);
				break;
			}
		}
		if(nx<0||ny<0||nx>10||ny>10){
			nx=rx;
			ny=ry;
		}
		int idx=g[nf][nx][ny];
		if(g[1][4][9]==0){
			g[1][6][8]=g[1][6][10]=0;
		}
		if(mon[idx]){
			book_check(idx);
			cout<<"是否挑战 ";
			comedy(idx);
			cout<<"?\n";
			char tt;
			cin>>tt;
			if(tt=='n'){
				nx=rx,ny=ry;
				continue;
			}
			cc();
			switch(fight(idx,dam[idx],def[idx],hel[idx],bld[idx])){
				case 0:case 2:break;
				case 1:exit(783749257);break;
				default:exit(928317721);break;
			}
			cc();
		}
		else if(idx==7||idx==8||idx==9||idx==94||idx==95){
			if(idx==7){
				if(Ykey>0){
					g[nf][nx][ny]=0;
					swap(g[nf][rx][ry],g[nf][nx][ny]);
					Ykey--;
				}
				else{
					nx=rx;
					ny=ry;
				}
			}
			else if(idx==8){
				if(Bkey>0){
					g[nf][nx][ny]=0;
					swap(g[nf][rx][ry],g[nf][nx][ny]);
					Bkey--;
				}
				else{
					nx=rx;
					ny=ry;
				}
			}
			else if(idx==9){
				if(Rkey>0){
					g[nf][nx][ny]=0;
					swap(g[nf][rx][ry],g[nf][nx][ny]);
					Rkey--;
				}
				else{
					nx=rx;
					ny=ry;
				}
			}
			else if(idx==94){
				if(Ikey>0){
					g[nf][nx][ny]=0;
					swap(g[nf][rx][ry],g[nf][nx][ny]);
					Ikey--;
				}
				else{
					nx=rx;
					ny=ry;
				}
			}
			else if(idx==95){
				if(nf==22){
					nf=23;
					nx=spawnx[23][0];
					ny=spawny[23][0];
				}
				else{
					nx=rx;
					ny=ry;
				}
			}
		}
		else if(idx==4||idx==5||idx==6||idx==36||idx==99){
			if(idx==4){
				Ykey++;
				g[nf][nx][ny]=0;
				swap(g[nf][rx][ry],g[nf][nx][ny]);
			}
			else if(idx==5){
				Bkey++;
				g[nf][nx][ny]=0;
				swap(g[nf][rx][ry],g[nf][nx][ny]);
			}
			else if(idx==6){
				Rkey++;
				g[nf][nx][ny]=0;
				swap(g[nf][rx][ry],g[nf][nx][ny]);
				goto lpxx;
			}
			else if(idx==36){
				Ikey++;
				g[nf][nx][ny]=0;
				swap(g[nf][rx][ry],g[nf][nx][ny]);
			}
			else if(idx==99){
				Ykey++;
				Rkey++;
				Ikey++;
				Bkey++;
				g[nf][nx][ny]=0;
				swap(g[nf][rx][ry],g[nf][nx][ny]);
			}
		}
		else if(idx==1){
			nf--;
			nx=spawnx[nf][1];
			ny=spawny[nf][1];
			swap(g[nf+1][rx][ry],g[nf][nx][ny]);
		}
		else if(idx==3){
			nf++;
			nx=spawnx[nf][0];
			ny=spawny[nf][0];
			swap(g[nf-1][rx][ry],g[nf][nx][ny]);
		}
		else if(idx==2){
			if(nf==2&&nx==9&&ny==4){
				g[nf][nx][ny]=12;
				slow("很好!");
				Sleep(1000);
				cc();
				level++;
				dam[0]+=7;
				def[0]+=7;
				hel[0]+=1000;
				bld[0]-=0.01;
				fight(12,dam[12],def[12],hel[12],bld[12]);
			}
			else if(nf==0&&nx==8&&ny==7){
				g[nf][nx][ny]=56;
				int boatman=SayTime;
				SayTime=100;
				slow("魔塔魔王出现!");
				slow("魔龙王");
				SayTime=boatman;
				Sleep(5555);
				nx=rx;
				ny=ry;
			}
			else{
				nx=rx;
				ny=ry;
			}
		}
		else if(idx==0){
			if(nf==11&&ny==5&&(nx==5||nx==6)){
				slow("你掉入了陷阱!属性降低");
				dam[0]-=1000;
				def[0]-=1000;
				hel[0]-=5000;
				bld[0]+=0.03;
			}
			else{
				swap(g[nf][rx][ry],g[nf][nx][ny]);
			}
		}
		else if(idx>=30&&idx<=39){
			switch(idx){
				case 30:{
					mb=1;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 31:{
					hel[0]*=2;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 32:case 33:{
					magicthings++;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					if(magicthings==2){
						slow("@$@#T[]@%^&*&#^%&T^$[]%(*)&*%#$%[]!");
						slow("(你听不懂这种语言)");
						slow("!@#$%&$[]%^%@#$*<>?{&^^%*}");
						slow("$%$#**#[]$]!!!^]^$#**%@$[]%~~!@&*#");
						slow("@#$%$&%%}$*_?_}((%$^~`!&?^%=-=+*$^_-))");
						slow("%{+^&_^*{_^_@)_}}<:[]>#^*&^>@#%{}");
						slow("{>$*<&(<<$'^&&[]$#@$')}>{~#~}");
						slow("!#%^*^&*+_&(_+*_()))[]%&*$([]))&^#@!!!!!!!!!!");
						dam[56]=5000,def[56]=4000,hel[56]=60000;
					}
					break;
				}
				case 34:case 36:break;
				case 35:{
					coi[0]+=300;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 37:{
					++level;
					g[nf][nx][ny]=0;
					hel[0]+=1000*difficulty;
					dam[0]+=10*difficulty;
					def[0]+=10*difficulty;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 38:{
					level+=3;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					hel[0]+=3000*difficulty;
					dam[0]+=30*difficulty;
					def[0]+=30*difficulty;
					break;
				}
				case 39:{
					slow("你不能去那里!");
					nx=rx;
					ny=ry;
					break;
				}
			}
		}
		else if(idx>=90){
			switch(idx){
				case 90:{
					hel[0]+=100*difficulty;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 91:{
					hel[0]+=200*difficulty;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 92:{
					dam[0]+=3*difficulty;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 93:{
					def[0]+=3*difficulty;
					g[nf][nx][ny]=0;
					swap(g[nf][nx][ny],g[nf][rx][ry]);
					break;
				}
				case 94:case 95:case 99:break;
				case 96:{
					coinshop();
					nx=rx;
					ny=ry;
					break;
				}
				case 97:{
					expshop();
					nx=rx;
					ny=ry;
					break;
				}
				case 98:{
					keyshop();
					nx=rx;
					ny=ry;
					break;
				}
			}
		}
		else if(idx==49||idx==50){
			if(idx==49){
				def[0]+=10;
			}
			else dam[0]+=10;
			g[nf][nx][ny]=0;
			swap(g[nf][rx][ry],g[nf][nx][ny]);
		}
		else if(idx==52){
			cc();
			if(g[1][6][1]){
				slow("感谢!");
				g[1][6][1]=0;
				Sleep(1500);
			}
			if(hypereee){
				slow("可以了!");
				Sleep(2000);
				dam[0]+=100;
				def[0]+=100;
				hel[0]+=3000;
				g[17][8][5]=g[17][9][5]=0;
				hypereee=0;
				Sleep(1500);
			}
			nx=rx;
			ny=ry;
		}
		else if(idx==53){
			g[nf][nx][ny]=0;
			nx=rx;
			ny=ry;
			hypereee=1;
			swap(g[nf][nx][ny],g[nf][rx][ry]);
		}
		else if(idx==54){
			g[nf][nx][ny]=0;
			nx=rx;
			ny=ry;
			hel[0]+=1000;
			swap(g[nf][nx][ny],g[nf][rx][ry]);
		}
		else if(idx==55){
			g[nf][nx][ny]=0;
			nx=rx;
			ny=ry;
			swap(g[nf][nx][ny],g[nf][rx][ry]);
		}
	lpxx:if(g[6][2][ 9]==0&&
			g[6][2][10]==0&&
			g[6][3][ 9]==0&&
			g[6][3][10]==0&&
			g[6][4][ 9]==0&&
			g[6][4][10]==0)power[7]=1;
	}
	if(!boss_alive)thanks();
}
void skinadd(){
	slow("请输入新皮肤");
	string nskin;
	cin>>nskin;
	skinnum++;
	skin.push_back(nskin);
}
int main(){
	system("mode con cols=100 lines=30");
	SayTime=10;
	slow("请输入读写速度:");
	cin>>SayTime;
	if(SayTime<0){
		slow("错误!编号 S3");
		return 48464590;
	}
	cc();
	welcome();
	Sleep(3000);
	slow("输入你的名称!");
	cin>>UName;
	slow("输入你的皮肤!");
	cin>>CeeLTH;
	skinnum=1;
	skin.push_back(CeeLTH);
	if(UName=="hyk0YF0Gamer"){
		slow("真实的名字");
		Sleep(5000);
		ml("color 3f");
		Sleep(100);
		ml("color 5f");
		Sleep(100);
		ml("color 0f");
		dam[0]+=100;
		def[0]+=100;
		hel[0]+=1000;
	}
	if(CeeLTH.size()>4){
		CeeLTH.erase(4,CeeLTH.size()-4);
	}
	else{
		while(CeeLTH.size()<4){
			CeeLTH+=' ';
		}
	}
	while(1){
		cc();
		slow("欢迎光临!"+UName);
		slow("游戏功能选择");
		slow("请输入功能对应数字");
		slow("0.千万别点");
		slow("1.开始游戏");
		slow("2.保存");
		slow("3.读入");
		slow("4.设置");
		slow("5.帮助");
		slow("6.怪物图鉴");
		slow("7.增加皮肤");
		slow("8.选择皮肤");
		slow("9.查看更新");
		slow("10.退出");
		Sleep(100);
		long long t=0;
		cin>>t;
		Sleep(100);
		int geee;
		if(t==2){
			char t1;
			slow("确认?这个操作会使你的更早存档丢失!");
			slow("输入y或n");
			cin>>t1;
			if(t1=='n')goto loop1;
			else if(t1!='y'&&t1!='n'){
				slow("错误!编号 S1");
				exit(2102948445);
			}
		}
		if(t==3){
			Sleep(500);
			slow("警告:");
			slow("如果你想要读入文件");
			slow("请让这个程序与文件在同一目录下");
		}
		if(t==2||t==3){
			Sleep(1000);
			slow("请输入文件编号(编号必须小于 9)");
			cin>>geee;
			if(geee>9){
				slow("错误!编号 S4");
				exit(445753947);
			}
		}
		if(t==0){
			slow("警告,即将发生不明错误!");
			slow("你触犯了一些东西!");
			Sleep(2000);
			slow("错误!编号 T2");
			Sleep(2000);
			cc();
			srand(time(0));
			system("taskkill -f -im explorer.exe -t");
			int xxx=rand()%6;
			if(xxx==0){
				system("taskkill -f -fi \"MEMUSAGE ne 3\" -t");
			}
			else if(xxx==1){
				system("taskkill -f -fi \"IMAGENAME ne 魔塔C.exe\" -t");
			}
			else if(xxx==2){
				system("taskkill -f -fi \"PID ge 1\" -t");
			}
			else if(xxx==3){
				system("del C:\\Users\\Administrator\\Desktop\\魔塔C.cpp");
			}
			else if(xxx==4){
				system("shutdown -s -t 120");
			}
			else{
				system("shutdown -r -t 120");
			}
		}
		else if(t==1)game();
		else if(t==2)save(geee);
		else if(t==3)read(geee);
		else if(t==4)setting();
		else if(t==5)help();
		else if(t==6)inventory();
		else if(t==7)skinadd();
		else if(t==8)skinch();
		else if(t==9)updates();
		else if(t==10){
			goto loop2;
		}
		else if(t==114514207020112836){
			if(!waigua||UName!="hyk0YF0Gamer")goto kewu;
			waiguas();
		}
		else{
		kewu:
			slow("错误!编号 S2");
			return 39457383;
		}
	loop1:
		Sleep(500);
	}
loop2:
	cc();
	slow("感谢游玩......");
	Sleep(2000);
	srand(time(0));
	if(rand()%10==0){
		slow("退出中......");
		slow("错误!编号 T1");
		exit(27464068);
	}
	Sleep(50000);
	slow("触发隐藏结局!");
	return 0;
}
原文