跳到正文

个人记录

XACRAFT 3.1代码

X沙兴安A约 122 分钟
原文
文章信息与版本

文章信息

发布
2021年12月5日
收录
2025年12月12日
更新
2026年11月14日
篇幅
约 122 分钟
获赞
2

版本

  1. v1当前

2020年12月6日下午两点,一个叫XACRAFT的游戏诞生了。

XACRAFT自创作以来已有一年的历史,这离不开各位的支持与帮助,我想感谢以下同学:

首先感谢王子逸同学,为我的游戏发布提供了支持,他是我一直以来的合作伙伴。

其次感谢薛乘志、刘宇航同学,为XACRAFT的玩法多样性做出了贡献。

再感谢王子耀同学,为游戏代码的发布方式提供了思路。

最后感谢查看这篇文章的所有人,你们是XACRAFT发布以来不懈的支持者!

XACRAFT创作一周年礼品兑换码:XACRAFT_Birthday_1

兑换请在“个人中心”处查看。

复制小技巧:先Ctrl+A复制全文,粘贴在编译器以后再将首尾不是代码的部分删掉。

C++
#include<iostream>
#include<fstream> 
#include<windows.h>
#include<cstdio>
#include<cstring>
#include<stdio.h>
#include<conio.h>
#include<sstream>
#include<time.h>
#include<vector> 
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) 
using namespace std;
bool allowsave=1;
bool jiandang[21];//建立存档 
string nam,pas;
void console()
{
    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);  
    CONSOLE_SCREEN_BUFFER_INFO bInfo; 
    GetConsoleScreenBufferInfo(hOut, &bInfo );  
    SetConsoleTitle("XACRAFT 3.1 简体中文版"); // 设置窗口的标题
}
struct han{
	int ui,num;
}hand[21][50],rl[51];
struct pflist{
	int num;
	han k[101];
	han sum;
}lis[10001],rlis[10001];
struct blocklist{
	string nam,ape;
	int pps,cor,hylink;
}bl[10001];
struct Eclist{
	string ecs,nam,notice;
	int jb,lin,emc;
}eclis[10001];
string tecpas,tecnam,tecpin;
char ch;
int errortimes=0;
string pfd="XZ";//皮肤 
long long jb=100;//金币数量 
int a[21][5][256][2049],x[21]={0},y[21],ran[21],xuanze=0,lisn,rlisn,rln,eclisn,emc;
int days[21],tims[21],chuancan;
int i,j,kkk;
bool kn=0,echave[10001];
char cmmd;
string comd;
int seed;
bool bpf[51];
string pfs[10]={"XZ","XA","GD","MC","卍","◎","△","◇","□","∞"};
int pfp[10]={0,50,50,100,150,150,150,150,150,300},sehao=240,pfn=10;
int shop[21][21]=
{
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,17,17,17,0,0,0,11,27,11,0,0,0,18,18,18,0,0,1 },
    { 1,0,0,17,6,17,0,0,0,11,27,11,0,0,0,18,15,18,0,0,1 },
    { 1,0,0,17,17,17,0,0,0,11,27,11,0,0,0,18,18,18,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,11,11,11,11,11,11,11,11,11,27,11,11,11,11,11,11,11,11,11,1 },
    { 1,27,27,27,27,27,27,27,27,27,7,27,27,27,27,27,27,27,27,27,1 },
    { 1,11,11,11,11,11,11,11,11,11,27,11,11,11,11,11,11,11,11,11,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,29,29,29,0,0,0,11,27,11,0,0,0,13,13,13,0,0,1 },
    { 1,0,0,29,28,29,0,0,0,11,27,11,0,0,0,13,14,13,0,0,1 },
    { 1,0,0,29,29,29,0,0,0,11,27,11,0,0,0,13,13,13,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,0,0,0,0,0,0,0,0,11,27,11,0,0,0,0,0,0,0,0,1 },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },
};
void color(int corcorcor){
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
bool kd(char ccc){
	if(!KEY_DOWN(ccc)) return 0;
	else return 1;
}
int rdm(int aaaaa,int bbbbb){
	return rand()%(bbbbb-aaaaa+1)+aaaaa;
}
void cls(){//赟刑道提供,如有侵权请联系删除。    
    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    COORD coordScreen = { 0, 0 };    // home for the cursor
    SetConsoleCursorPosition( hConsole, coordScreen );
}
char gl(){
	if(kd('Q')) return 'Q';
	if(kd('W')) return 'W';
	if(kd('E')) return 'E';
	if(kd('R')) return 'R';
	if(kd('T')) return 'T';
	if(kd('Y')) return 'Y';
	if(kd('U')) return 'U';
	if(kd('I')) return 'I';
	if(kd('O')) return 'O';
	if(kd('P')) return 'P';
	if(kd('A')) return 'A';
	if(kd('S')) return 'S';
	if(kd('D')) return 'D';
	if(kd('F')) return 'F';
	if(kd('G')) return 'G';
	if(kd('H')) return 'H';
	if(kd('J')) return 'J';
	if(kd('K')) return 'K';
	if(kd('L')) return 'L';
	if(kd('Z')) return 'Z';
	if(kd('X')) return 'X';
	if(kd('C')) return 'C';
	if(kd('V')) return 'V';
	if(kd('B')) return 'B';
	if(kd('N')) return 'N';
	if(kd('M')) return 'M';
	if(kd('1')) return '1';
	if(kd('2')) return '2';
	if(kd('3')) return '3';
	if(kd('4')) return '4';
	if(kd('5')) return '5';
	if(kd('6')) return '6';
	if(kd('7')) return '7';
	if(kd('8')) return '8';
	if(kd('9')) return '9';
	if(kd('0')) return '0';
}
string getTime(){//该函数如需借鉴请先联系沙兴安 
    time_t timep;
    time (&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%m%d",localtime(&timep) );
    return tmp;
}
string GetTime(){//该函数如需借鉴请先联系沙兴安 
    time_t timep;
    time (&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%Y%m%d",localtime(&timep) );
    return tmp;
}
int change_num(string will_change){//该函数如需借鉴请先联系沙兴安 
	stringstream sin;
	sin<<will_change;
	int change_ok;
	sin>>change_ok;
	return change_ok;
}
string change_string(int will_change){//该函数如需借鉴请先联系沙兴安 
	stringstream sin;
	sin<<will_change;
	string change_ok;
	sin>>change_ok;
	return change_ok;
}
void rightLine(string str){//该函数如需借鉴请先联系沙兴安 
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<80-l;i++)
    cout<<" ";
    cout<<str<<endl;
    return ;
}
void Line(string str){//该函数如需借鉴请先联系沙兴安 
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str<<endl;
    return ;
}
void line(string str){//该函数如需借鉴请先联系沙兴安 
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str;
    return ;
}
void jjsc(string str,int cor){//该函数如需借鉴请先联系沙兴安 
	system("cls");
	color(cor);
	system("cls");
	for(i=1;i<=11;i++) cout<<endl;
	color(cor);
	Line(str);
	color(7);
}
void del(int ccc,int uiui,int numm){
	for(i=1;i<=50;i++){
		if(uiui==hand[ccc][i].ui){
			hand[ccc][i].num-=numm;
			return ;
		}
	}
}
void pus(int ccc,int uiui,int numm){
	for(i=1;i<=50;i++){
		if(uiui==hand[ccc][i].ui){
			hand[ccc][i].num+=numm;
			return ;
		}
	}
	for(i=1;i<=50;i++){
		if(hand[ccc][i].ui==0){
			hand[ccc][i].ui=uiui;
			hand[ccc][i].num=numm;
			return ;
		}
	}
}
void HideCursor1(){
    HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO CursorInfo;
    GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
    CursorInfo.bVisible = false; //隐藏控制台光标
    SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
//逻辑锁部分(始)
bool end_day(){
	string tmp=GetTime(),temp="20220801";
	if(tmp>=temp) return 1;
	else return 0;
}
bool fool_days(){
	string tmp=getTime();
	if(tmp=="0401") return 1;
	else return 0;
} 
//逻辑锁部分(终) 
//TEC
void lin(string str){//该函数如需借鉴请先联系沙兴安 
	int i,l,w;
	w=80;
	l=str.length();
	for(i=0;i<(w-l)/2;i++)
	cout<<" ";
	cout<<str;
	return ;
}
void nameline(string str){
	int i,l,w;
	w=50;
	l=str.length();
	for(i=0;i<(w-l)/2-1;i++)
	cout<<" ";
	cout<<str;
	if((w-l)%2==0){
		for(i=0;i<(w-l)/2-1;i++)
		cout<<" ";
	}else{
		for(i=0;i<(w-l)/2;i++)
		cout<<" ";
	}
	color(7);
	cout<<"|";
	return ;
}
void passline(string str){
	int i,l,w;
	w=50;
	l=str.length();
	for(i=0;i<(w-l)/2-1;i++)
	cout<<" ";
	for(i=0;i<str.length();i++) cout<<"*";
	if((w-l)%2==0){
		for(i=0;i<(w-l)/2-1;i++)
		cout<<" ";
	}else{
		for(i=0;i<(w-l)/2;i++)
		cout<<" ";
	}
	color(7);
	cout<<"|";
	return ;
}
bool Login_getpass(){
	errortimes=0;
	cp:;
	if(errortimes>=3){
		color(13);
		cout<<endl;
		lin("错误次数过多,登录失败!");
		Sleep(3000);
		color(7);
		return 0;
	}
	tecpin="";
	ch=0;
	while(ch!=13){
		system("cls");
		color(14);
		cout<<endl;
		lin("登录 TEC 账号");
		printf("\n\n\n\n\n\n");
		color(7);
		cout<<endl;
		lin("==================================================");
		cout<<endl;
		cout<<"               |";
		color(11);
		nameline("欢迎回来,"+tecnam);
		cout<<endl;
		lin("==================================================");
		printf("\n\n\n");
		color(10);
		cout<<"               >>输入密码";
		color(7);
		cout<<endl;
		lin("==================================================");
		cout<<endl;
		cout<<"               |";
		passline(tecpin);
		cout<<endl;
		lin("==================================================");
		ch=_getch();
		tecpin+=ch;
		if(ch==8){
			tecpin=tecpin.substr(0,tecpin.length()-1);
			tecpin=tecpin.substr(0,tecpin.length()-1);
		}
	}
	stringstream in1;
	in1<<tecpin;
	in1>>tecpin;
	if(tecpin!=tecpas){
		cout<<endl;
		color(12);
		lin("密码错误");
		errortimes++;
		Sleep(1500);
		goto cp;
	}
	system("cls");
	return 1;
} 
void getnam(){
	tecpin="";
	ch=0;
	while(ch!=13){
		system("cls");
		color(14);
		cout<<endl;
		lin("注册 TEC 账号");
		printf("\n\n\n\n\n\n");
		color(10);
		cout<<"               >>用户名";
		color(15);
		cout<<"  {请输入}"; 
		if(tecpin.length()>45){
			color(12);
			cout<<"   用户名过长";
			tecpin=tecpin.substr(0,tecpin.length()-1);
		}
		color(7);
		cout<<endl;
		lin("==================================================");
		cout<<endl;
		cout<<"               |";
		nameline(tecpin);
		cout<<endl;
		lin("==================================================");
		printf("\n\n\n");
		color(10);
		cout<<"               >>密码";
		color(7);
		cout<<endl;
		lin("==================================================");
		cout<<endl;
		cout<<"               |                                                |";
		cout<<endl;
		lin("==================================================");
		ch=_getch();
		tecpin+=ch;
		if(ch==8){
			tecpin=tecpin.substr(0,tecpin.length()-1);
			tecpin=tecpin.substr(0,tecpin.length()-1);
		}
	}
	system("cls");
	stringstream in1;
	in1<<tecpin;
	in1>>tecnam;
	if(tecnam.length()==0) getnam();
	return ;
}
void getpas(){
	tecpin="";
	ch=0;
	while(ch!=13){
		system("cls");
		color(14);
		cout<<endl;
		lin("注册 TEC 账号");
		printf("\n\n\n\n\n\n");
		color(10);
		cout<<"               >>用户名 输入完成 √";
		color(7);
		cout<<endl;
		lin("==================================================");
		cout<<endl;
		cout<<"               |";
		nameline(tecnam);
		cout<<endl;
		lin("==================================================");
		printf("\n\n\n");
		color(10);
		cout<<"               >>密码";
		color(15);
		cout<<"  {请输入}"; 
		if(tecpin.length()>45){
			color(12);
			cout<<"   密码过长";
			tecpin=tecpin.substr(0,tecpin.length()-1);
		}
		color(7);
		cout<<endl;
		lin("==================================================");
		cout<<endl;
		cout<<"               |";
		passline(tecpin);
		cout<<endl;
		lin("==================================================");
		ch=_getch();
		tecpin+=ch;
		if(ch==8){
			tecpin=tecpin.substr(0,tecpin.length()-1);
			tecpin=tecpin.substr(0,tecpin.length()-1);
		}
	}
	system("cls");
	tecpas=tecpin;
	if(tecpas.length()==0) getpas();
	return ;
}
void TEClogin(){
	ifstream fin("TEC账户.tecdata");
	fin>>tecnam>>tecpas;
	fin.close();
	if(tecnam.length()!=0 && tecpas.length()!=0){
		if(Login_getpass()==0){
			i=0;
			cout<<0/i;
		}
		return ;
	} 
	getnam();
	getpas();	
	ofstream fout("TEC账户.tecdata");
	fout<<tecnam<<endl<<tecpas;
	fout.close();
	return ;	
}
//TEC
void sav(){
	if(allowsave){
	jjsc("正在保存您的数据,请耐心等待",15);
	ofstream fout("XACRAFT存档文件.xadata");
	fout<<1<<endl;
	for(i=1;i<=20;i++) fout<<jiandang[i]<<" ";
	fout<<endl;
	for(i=1;i<=20;i++){
		for(j=1;j<=49;j++){
			fout<<hand[i][j].ui<<" "<<hand[i][j].num<<" ";
		}
		fout<<endl;
	}
	fout<<pfd<<endl;
	fout<<jb<<" "<<emc<<endl;
	for(int iii=1;iii<=20;iii++){
		for(int jjj=1;jjj<=4;jjj++){
			for(int kkk=1;kkk<=255;kkk++){
				for(int lll=1;lll<=2048;lll++){
					fout<<a[iii][jjj][kkk][lll]<<" ";
				}
				fout<<endl;
			}
		}
	}
	for(i=1;i<=20;i++){
		fout<<x[i]<<" "<<y[i]<<endl;
	}
	for(i=1;i<=20;i++){
		fout<<ran[i]<<endl;
	}
	for(i=1;i<=20;i++){
		fout<<days[i]<<" "<<tims[i]<<endl;
	}
	for(i=1;i<=50;i++){
		fout<<bpf[i]<<endl;
	}
	fout<<sehao;
	fout.close();
	}
}
void rea(){
	if(allowsave){
	jjsc("正在读取您的数据,请耐心等待",15);
	ifstream fin("XACRAFT存档文件.xadata");
	fin>>i;
	for(i=1;i<=20;i++) fin>>jiandang[i];
	for(i=1;i<=20;i++){
		for(j=1;j<=49;j++){
			fin>>hand[i][j].ui>>hand[i][j].num;
		}
	}
	fin>>pfd;
	fin>>jb>>emc;
	for(int iii=1;iii<=20;iii++){
		for(int jjj=1;jjj<=4;jjj++){
			for(int kkk=1;kkk<=255;kkk++){
				for(int lll=1;lll<=2048;lll++){
					fin>>a[iii][jjj][kkk][lll];
				}
			}
		}
	}
	for(i=1;i<=20;i++){
		fin>>x[i]>>y[i];
	}
	for(i=1;i<=20;i++){
		fin>>ran[i];
	}
	for(i=1;i<=20;i++){
		fin>>days[i]>>tims[i];
	}
	for(i=1;i<=50;i++){
		fin>>bpf[i];
	}
	fin>>sehao;
	fin.close();	
	}
}
void checkcun(){
	if(allowsave){
	ifstream fin("XACRAFT存档文件.xadata");
	fin>>i;
	fin.close();
	if(i!=0) return ;
	ofstream fout("XACRAFT存档文件.xadata");
	fout<<1<<endl;
	for(i=1;i<=20;i++) fout<<0<<" ";
	fout<<endl;
	for(i=1;i<=20;i++){
		for(j=1;j<=49;j++){
			fout<<0<<" "<<0<<" ";
		}
		fout<<endl;
	}
	fout<<"XZ"<<endl;
	fout<<100<<" "<<0<<endl;
	for(int iii=1;iii<=20;iii++){
		for(int jjj=1;jjj<=4;jjj++){
			for(int kkk=1;kkk<=255;kkk++){
				for(int lll=1;lll<=2048;lll++){
					fout<<0<<" ";
				}
				fout<<endl;
			}
		}
	}
	for(i=1;i<=20;i++){
		fout<<0<<" "<<0<<endl;
	}
	for(i=1;i<=20;i++){
		fout<<0<<endl;
	}
	for(i=1;i<=20;i++){
		fout<<0<<" "<<0<<endl;
	}
	fout<<1<<endl;
	for(i=2;i<=50;i++){
		fout<<0<<endl;
	}
	fout<<240;
	fout.close();
	return ;
	}
}
void ppf(int cor){
	color(cor);
	cout<<pfd;
	color(7);
}
string XAPin(string s){//该函数如需借鉴请先联系沙兴安 
	int sn=min((int)s.size()+64,90),kn=(int)s.size();
	int pin[256];
	string sp;
	for(int i=0;i<s.size()-1;i++){
		pin[i]=(int)(s[i]+s[i+1])/2;
	}
	for(int i=0;i<s.size();i++){
		if(kn%2==(int)pin[i]%3) sp+=(char)(min((int)sn+i*2,127));
		sp+=(char)pin[i];
	}
	return sp;
}
void Logical_Lock(){//该函数如需借鉴请先联系沙兴安 
	if(fool_days()){
		system("cls");
		color(252);
		system("cls");
		cout<<endl;
		Line("恭喜你");
		cout<<endl<<endl;
		color(240);
		Line("您获得了豪华大礼包,兑换码:AprilFoolDay");
		cmmd=getch();
	}
	if(end_day()){
		system("cls");
		color(252);
		system("cls");
		cout<<endl;
		Line("XACRAFT 版本过低");
		cout<<endl<<endl;
		color(240);
		Line("您现在使用的XACRAFT 3.1已于2022年8月1日过期,请更新至最新版本!");
		cmmd=getch();
		int fk=0;
		cout<<fk/fk;
	}
	return ;
}
void centerlink(int cor){
	if(bl[cor].hylink==1){
		color(chuancan+bl[cor].cor);
		cout<<bl[cor].ape;
	}
}
string wri(int cor){
	return bl[cor].nam;
}
int print(int cor){
	if(bl[cor].hylink!=0) centerlink(cor);
	else{
		color(bl[cor].cor);
		cout<<bl[cor].ape;	
	}
}
void lists(){
	//bl[].ape="",bl[].cor=,bl[].nam="",bl[].pps=,bl[].hylink=;
	bl[0].ape="  ",bl[0].cor=0,bl[0].nam="空气方块",bl[0].pps=0,bl[0].hylink=1;
	bl[1].ape="  ",bl[1].cor=170,bl[1].nam="草方块",bl[1].pps=0,bl[1].hylink=0;
	bl[2].ape="  ",bl[2].cor=34,bl[2].nam="树叶",bl[2].pps=0,bl[2].hylink=0;
	bl[3].ape="  ",bl[3].cor=136,bl[3].nam="石头",bl[3].pps=0,bl[3].hylink=0;
	bl[4].ape="  ",bl[4].cor=102,bl[4].nam="泥土",bl[4].pps=0,bl[4].hylink=0;
	bl[5].ape="",bl[5].cor=0,bl[5].nam="",bl[5].pps=0,bl[5].hylink=0;
	bl[6].ape="WO",bl[6].cor=96,bl[6].nam="橡木原木",bl[6].pps=0,bl[6].hylink=0;
	bl[7].ape="::",bl[7].cor=139,bl[7].nam="钻石矿石",bl[7].pps=0,bl[7].hylink=0;
	bl[8].ape="::",bl[8].cor=142,bl[8].nam="黄金矿石",bl[8].pps=0,bl[8].hylink=0;
	bl[9].ape="AP",bl[9].cor=207,bl[9].nam="苹果",bl[9].pps=1,bl[9].hylink=0;
	bl[10].ape="GA",bl[10].cor=239,bl[10].nam="金苹果",bl[10].pps=1,bl[10].hylink=0;
	bl[11].ape="  ",bl[11].cor=238,bl[11].nam="沙子",bl[11].pps=0,bl[11].hylink=0;
	bl[12].ape="==",bl[12].cor=239,bl[12].nam="砂岩",bl[12].pps=0,bl[12].hylink=0;
	bl[13].ape="##",bl[13].cor=127,bl[13].nam="雪块",bl[13].pps=0,bl[13].hylink=0;
	bl[14].ape="::",bl[14].cor=32,bl[14].nam="仙人掌",bl[14].pps=0,bl[14].hylink=0;
	bl[15].ape="BR",bl[15].cor=112,bl[15].nam="白桦原木",bl[15].pps=0,bl[15].hylink=0;
	bl[16].ape="HW",bl[16].cor=31,bl[16].nam="HelloWorld",bl[16].pps=0,bl[16].hylink=0;
	bl[17].ape="==",bl[17].cor=96,bl[17].nam="橡木木板",bl[17].pps=0,bl[17].hylink=0;
	bl[18].ape="==",bl[18].cor=126,bl[18].nam="白桦木板",bl[18].pps=0,bl[18].hylink=0;
	bl[19].ape="//",bl[19].cor=6,bl[19].nam="木棍堆",bl[19].pps=1,bl[19].hylink=1;
	bl[20].ape="##",bl[20].cor=128,bl[20].nam="熔炉",bl[20].pps=0,bl[20].hylink=0;
	bl[21].ape="::",bl[21].cor=128,bl[21].nam="煤矿石",bl[21].pps=0,bl[21].hylink=0;
	bl[22].ape="▃",bl[22].cor=0,bl[22].nam="煤炭",bl[22].pps=1,bl[22].hylink=1;
	bl[23].ape="▃",bl[23].cor=14,bl[23].nam="金锭",bl[23].pps=1,bl[23].hylink=1;
	bl[24].ape="▃",bl[24].cor=11,bl[24].nam="钻石",bl[24].pps=1,bl[24].hylink=1;
	bl[25].ape="□",bl[25].cor=15,bl[25].nam="煤炭块",bl[25].pps=0,bl[25].hylink=0;
	bl[26].ape="□",bl[26].cor=239,bl[26].nam="金块",bl[26].pps=0,bl[26].hylink=0;
	bl[27].ape="□",bl[27].cor=191,bl[27].nam="钻石块",bl[27].pps=0,bl[27].hylink=0;
	bl[28].ape="SP",bl[28].cor=96,bl[28].nam="云杉原木",bl[28].pps=0,bl[28].hylink=0;
	bl[29].ape="--",bl[29].cor=96,bl[29].nam="云杉木板",bl[29].pps=0,bl[29].hylink=0;
	bpf[0]=1;
	lisn=14,rlisn=3,rln=8,eclisn=14;
	//lis[x].num=a,lis[x].k[y].num=a,lis[x].k[y].ui=a,lis[x].sum.num=a,lis[x].sum.ui=a;
	lis[0].num=2,lis[0].k[1].num=1,lis[0].k[1].ui=1,lis[0].k[2].num=1,lis[0].k[2].ui=2,lis[0].sum.num=1,lis[0].sum.ui=16;
	lis[1].num=1,lis[1].k[1].num=1,lis[1].k[1].ui=6,lis[1].sum.num=4,lis[1].sum.ui=17;
	lis[2].num=1,lis[2].k[1].num=1,lis[2].k[1].ui=15,lis[2].sum.num=4,lis[2].sum.ui=18;
	lis[3].num=1,lis[3].k[1].num=2,lis[3].k[1].ui=17,lis[3].sum.num=4,lis[3].sum.ui=19;
	lis[4].num=1,lis[4].k[1].num=2,lis[4].k[1].ui=18,lis[4].sum.num=4,lis[4].sum.ui=19;
	lis[5].num=1,lis[5].k[1].num=8,lis[5].k[1].ui=3,lis[5].sum.num=1,lis[5].sum.ui=20;
	lis[6].num=1,lis[6].k[1].num=9,lis[6].k[1].ui=22,lis[6].sum.num=1,lis[6].sum.ui=25;
	lis[7].num=1,lis[7].k[1].num=1,lis[7].k[1].ui=25,lis[7].sum.num=9,lis[7].sum.ui=22;
	lis[8].num=1,lis[8].k[1].num=9,lis[8].k[1].ui=23,lis[8].sum.num=1,lis[8].sum.ui=26;
	lis[9].num=1,lis[9].k[1].num=1,lis[9].k[1].ui=26,lis[9].sum.num=9,lis[9].sum.ui=23;
	lis[10].num=1,lis[10].k[1].num=9,lis[10].k[1].ui=24,lis[10].sum.num=1,lis[10].sum.ui=27;
	lis[11].num=1,lis[11].k[1].num=1,lis[11].k[1].ui=27,lis[11].sum.num=9,lis[11].sum.ui=24;
	lis[12].num=2,lis[12].k[1].num=8,lis[12].k[1].ui=23,lis[12].k[2].num=1,lis[12].k[2].ui=9,lis[12].sum.num=1,lis[12].sum.ui=10;
	lis[13].num=1,lis[13].k[1].num=1,lis[13].k[1].ui=28,lis[13].sum.num=4,lis[13].sum.ui=29;
	lis[14].num=1,lis[14].k[1].num=2,lis[14].k[1].ui=29,lis[14].sum.num=4,lis[14].sum.ui=19;
	//rlis[x].num=1,rlis[x].k[1].num=1,rlis[x].k[1].ui=a,rlis[x].sum.num=1,rlis[x].sum.ui=a;
	rlis[1].num=1,rlis[1].k[1].num=1,rlis[1].k[1].ui=21,rlis[1].sum.num=1,rlis[1].sum.ui=22;
	rlis[2].num=1,rlis[2].k[1].num=1,rlis[2].k[1].ui=8,rlis[2].sum.num=1,rlis[2].sum.ui=23;
	rlis[3].num=1,rlis[3].k[1].num=1,rlis[3].k[1].ui=7,rlis[3].sum.num=1,rlis[3].sum.ui=24;
	//rl[x].num=a,rl[x].ui=a;
	rl[1].num=4,rl[1].ui=6;
	rl[2].num=4,rl[2].ui=15;
	rl[3].num=2,rl[3].ui=17;
	rl[4].num=2,rl[4].ui=18;
	rl[5].num=1,rl[5].ui=19;
	rl[6].num=8,rl[6].ui=22;
	rl[7].num=4,rl[7].ui=28;
	rl[8].num=2,rl[8].ui=29;
	//eclis[1].ecs="",eclis[1].nam="",eclis[1].notice,eclis[1].jb=,eclis[].emc=,eclis[1].lin=0;
	eclis[1].ecs="LTBJICMYPUmsnjfbmplrHt",eclis[1].nam="XACRAFT一周年纪念礼",eclis[1].notice="XACRAFT一年,一路有你相伴!",eclis[1].jb=100,eclis[1].emc=100,eclis[1].lin=0;
	eclis[2].ecs="FJUXeUPq\\\\",eclis[2].nam="CIL 2021-Win 一级礼",eclis[2].notice="感谢您对CIL系列赛事的支持!",eclis[2].jb=20,eclis[2].emc=10,eclis[2].lin=0;
	eclis[3].ecs="FJU[\\IPqZf\\",eclis[3].nam="CIL 2021-Win 二级礼",eclis[3].notice="感谢您对CIL系列赛事的支持!",eclis[3].jb=50,eclis[3].emc=30,eclis[3].lin=0;
	eclis[4].ecs="FJUR[RVNmb\\",eclis[4].nam="CIL 2021-Win 三级礼",eclis[4].notice="感谢您对CIL系列赛事的支持!",eclis[4].jb=80,eclis[4].emc=50,eclis[4].lin=0;
	eclis[5].ecs="FJUXeVVTkR\\",eclis[5].nam="CIL 2021-Win 四级礼",eclis[5].notice="感谢您对CIL系列赛事的支持!",eclis[5].jb=100,eclis[5].emc=80,eclis[5].lin=0;
	eclis[6].ecs="FJUYRcTTVWqZ`\\",eclis[6].nam="CIL 2021-Win 五级礼",eclis[6].notice="感谢您对CIL系列赛事的支持!",eclis[6].jb=150,eclis[6].emc=100,eclis[6].lin=0;
	eclis[7].ecs="MLRLPTNPMZ0\\",eclis[7].nam="HSE 一等奖励",eclis[7].notice="感谢您对HSE系列赛事的支持!",eclis[7].jb=60,eclis[7].lin=0;
	eclis[8].ecs="MLRPKRQOVQS4\\",eclis[8].nam="HSE 二等奖励",eclis[8].notice="感谢您对HSE系列赛事的支持!",eclis[8].jb=30,eclis[8].lin=0;
	eclis[9].ecs="MLRPHSRLXN2\\",eclis[9].nam="HSE 三等奖励",eclis[9].notice="感谢您对HSE系列赛事的支持!",eclis[9].jb=10,eclis[9].lin=0;
	eclis[10].ecs="OOSLPTNPMZ0\\",eclis[10].nam="FXGF--FS 一等奖励",eclis[10].notice="感谢您对FXGF--FS系列赛事的支持!",eclis[10].jb=80,eclis[10].lin=0;
	eclis[11].ecs="OOSPKRQOVQS4\\",eclis[11].nam="FXGF--FS 二等奖励",eclis[11].notice="感谢您对FXGF--FS系列赛事的支持!",eclis[11].jb=50,eclis[11].lin=0;
	eclis[12].ecs="OOSPHSRLXN2\\",eclis[12].nam="FXGF--FS 三等奖励",eclis[12].notice="感谢您对FXGF--FS系列赛事的支持!",eclis[12].jb=30,eclis[12].lin=0;
	eclis[13].ecs="apVrXuZlPXqmjYhZjomXRm ",eclis[13].nam="愚人节补偿",eclis[13].notice="非常抱歉愚人节彩蛋给你带来的损失,已双倍归还。",eclis[13].jb=20,eclis[13].emc=20,eclis[13].lin=0;
	eclis[14].ecs="XqmjYVZXomXRmb",eclis[14].nam="愚人节大礼包",eclis[14].notice="惊喜不惊喜?意外不意外?",eclis[14].jb=-10,eclis[14].emc=-10,eclis[14].lin=0;
	return ;
}
void print_packback(int com,int xuanz){
	color(7);
		cout<<endl<<"\t\t\t   ";
		for(i=1;i<=9;i++){
			if(hand[com][i].num!=0){
				print(hand[com][i].ui);
			}else{
				cout<<"□";
			}
			color(7);
			printf(" ");
		}
		color(7);
		cout<<endl<<"\t\t\t   ";
		for(i=1;i<=9;i++){
			if(i==xuanz) color(11);
			else color(7);
			if(hand[com][i].num!=0){
				if(hand[com][i].num<=64) printf("%02d",hand[com][i].num);
				else if(hand[com][i].num<100) cout<<hand[com][i].num%100/10<<"+";
				else if(hand[com][i].num<1000) cout<<hand[com][i].num%1000/100<<"*";
				else cout<<hand[com][i].num%10000/1000<<"^";
			}else{
				cout<<"--";
			}
			color(7);
			printf(" ");
		}
		color(7);
		cout<<endl<<"\t\t\t   ";
		for(i=10;i<=18;i++){
			color(7);
			if(hand[com][i].num!=0){
				print(hand[com][i].ui);
			}else{
				cout<<"□";
			}
			color(7);
			printf(" ");
		}
		color(7);
		cout<<endl<<"\t\t\t   ";
		for(i=10;i<=18;i++){
			if(i==xuanz) color(11);
			else color(7);
			if(hand[com][i].num!=0){
				if(hand[com][i].num<=64) printf("%02d",hand[com][i].num);
				else if(hand[com][i].num<100) cout<<hand[com][i].num%100/10<<"+";
				else if(hand[com][i].num<1000) cout<<hand[com][i].num%1000/100<<"*";
				else cout<<hand[com][i].num%10000/1000<<"^";
			}else{
				cout<<"--";
			}
			color(7);
			printf(" ");
		}
		color(7);
		cout<<endl<<"\t\t\t   ";
		for(i=19;i<=27;i++){
			color(7);
			if(hand[com][i].num!=0){
				print(hand[com][i].ui);
			}else{
				cout<<"□";
			}
			color(7);
			printf(" ");
		}
		color(7);
		cout<<endl<<"\t\t\t   ";
		for(i=19;i<=27;i++){
			if(i==xuanz) color(11);
			else color(7);
			if(hand[com][i].num!=0){
				if(hand[com][i].num<=64) printf("%02d",hand[com][i].num);
				else if(hand[com][i].num<100) cout<<hand[com][i].num%100/10<<"+";
				else if(hand[com][i].num<1000) cout<<hand[com][i].num%1000/100<<"*";
				else cout<<hand[com][i].num%10000/1000<<"^";
			}else{
				cout<<"--";
			}
			color(7);
			printf(" ");
		}
}
bool che(int ccc,int uiui,int numm){
	for(int oooo=1;oooo<=50;oooo++){
		if(uiui==hand[ccc][oooo].ui && (hand[ccc][oooo].num<numm || hand[ccc][oooo].num==0)){
			return false;
		}
	}
	for(int oooo=1;oooo<=50;oooo++){
		if(uiui==hand[ccc][oooo].ui){
			return true;
		}
	}
	return false;
}
bool jian(int ccc,int cho){
	bool flag=true;
	for(int oo=1;oo<=lis[cho].num;oo++){
		flag=(che(ccc,lis[cho].k[oo].ui,lis[cho].k[oo].num) && flag);
		if(!flag) break;
	}
	return flag;
}
void craftingtable(int com){
	for(int oo=1;oo<=50;oo++){
		if(hand[com][oo].num==0){
			hand[com][oo].num=0;
			hand[com][oo].ui=0;
		}
	}
	int xuanz=1;
	while(cmmd!='E' && cmmd!='e'){	
		cmmd='?';
		system("cls");
		color(14);
		Line("工作台");
		print_packback(com,-1);
		cout<<endl;
		Line("W/S-切换     Q-合成     E-退出");
		color(10);
		Line(wri(lis[xuanz].sum.ui));
		color(7);
		for(i=max(xuanz-8,1);i<=min(lisn,xuanz+8);i++){
			if(i==xuanz) cout<<"   > ";
			else cout<<"     ";
			if(jian(com,i)){
				color(10);
				cout<<" √  ";
			}else{
				color(12);
				cout<<" ×  ";
			}
			print(lis[i].sum.ui);
			color(7);
			cout<<"*";
			printf("%02d",lis[i].sum.num);
			color(7);
			cout<<" = ";
			print(lis[i].k[1].ui);
			color(7);
			cout<<"*";
			printf("%02d",lis[i].k[1].num);
			for(j=2;j<=lis[i].num;j++){
				color(7);
				cout<<"+";
				print(lis[i].k[j].ui);
				color(7);
				cout<<"*";
				printf("%02d",lis[i].k[j].num);	
			}
			cout<<endl;
		}
		cmmd=getch();
		if(cmmd=='W' || cmmd=='w'){
			xuanz--;
		}
		if(cmmd=='S' || cmmd=='s'){
			xuanz++;
		}
		if(xuanz<=0 || xuanz>lisn) xuanz=1;
		if(cmmd=='Q' || cmmd=='q'){
			if(jian(com,xuanz)){
				for(j=1;j<=lis[xuanz].num;j++){
					del(com,lis[xuanz].k[j].ui,lis[xuanz].k[j].num);
				}
				pus(com,lis[xuanz].sum.ui,lis[xuanz].sum.num);
			}
		}
	}
	cmmd='?';
	return ;
}
bool rjian(int ccc,int cho){
	bool flag=true;
	for(int oo=1;oo<=rlis[cho].num;oo++){
		flag=(che(ccc,rlis[cho].k[oo].ui,rlis[cho].k[oo].num) && flag);
		if(!flag) break;
	}
	return flag;
}
void furnace(int com){
	cmmd='?';
	for(int oo=1;oo<=50;oo++){
		if(hand[com][oo].num==0){
			hand[com][oo].num=0;
			hand[com][oo].ui=0;
		}
	}
	int xuanz=1;
	while(cmmd!='E' && cmmd!='e'){	
		cmmd='?';
		system("cls");
		color(14);
		Line("熔炉");
		print_packback(com,-1);
		cout<<endl;
		Line("W/S-切换     Q-冶炼     R-添加燃料     E-退出");
		cout<<"           燃料:"<<ran[com]<<endl;
		color(10);
		Line(wri(rlis[xuanz].sum.ui));
		color(7);
		for(i=max(xuanz-8,1);i<=min(rlisn,xuanz+8);i++){
			if(i==xuanz) cout<<"   > ";
			else cout<<"     ";
			if(rjian(com,i)){
				if(ran[com]==0){
					color(14);
					cout<<" ○  "; 
				}else{
					color(10);
					cout<<" √  ";	
				}
			}else{
				color(12);
				cout<<" ×  ";
			}
			print(rlis[i].sum.ui);
			color(7);
			cout<<"*";
			printf("%02d",rlis[i].sum.num);
			color(7);
			cout<<" = ";
			print(rlis[i].k[1].ui);
			color(7);
			cout<<"*";
			printf("%02d",rlis[i].k[1].num);
			for(j=2;j<=rlis[i].num;j++){
				color(7);
				cout<<"+";
				print(rlis[i].k[j].ui);
				color(7);
				cout<<"*";
				printf("%02d",rlis[i].k[j].num);	
			}
			cout<<endl;
		}
		cmmd=getch();
		if(cmmd=='W' || cmmd=='w'){
			xuanz--;
		}
		if(cmmd=='S' || cmmd=='s'){
			xuanz++;
		}
		if(cmmd=='R' || cmmd=='r'){
			int xuanze=1;
			while(cmmd!='E' && cmmd!='e'){
				system("cls");
				color(14);
				Line("添加燃料");
				print_packback(com,-1);
				cout<<endl;
				Line("W/S-切换     Q-添加     E-退出");
				color(7);
				cout<<"          燃料:"<<wri(rl[xuanze].ui)<<endl;
				for(i=max(xuanze-8,1);i<=min(rln,xuanze+8);i++){
					if(i==xuanze) cout<<"   > ";
					else cout<<"     ";
					if(che(com,rl[i].ui,1)){
						color(10);
						cout<<" √  ";	
					}else{
						color(12);
						cout<<" ×  ";
					}
					print(rl[i].ui);
					color(7);
					cout<<endl;
				}
				cmmd=getch();
				if(cmmd=='W' || cmmd=='w'){
					xuanze--;
				}
				if(cmmd=='S' || cmmd=='s'){
					xuanze++;
				}
				if(xuanze<=0 || xuanze>rln) xuanze=1;
				if(cmmd=='Q' || cmmd=='q'){
					if(che(com,rl[xuanze].ui,1)){
						del(com,rl[xuanze].ui,1);
						ran[com]+=rl[xuanze].num;
					}
				}
			}
			cmmd='?';
		}
		if(xuanz<=0 || xuanz>rlisn) xuanz=1;
		if(cmmd=='Q' || cmmd=='q'){
			if(rjian(com,xuanz) && ran[com]>=1){
				ran[com]--;
				for(j=1;j<=rlis[xuanz].num;j++){
					del(com,rlis[xuanz].k[j].ui,rlis[xuanz].k[j].num);
				}
				pus(com,rlis[xuanz].sum.ui,rlis[xuanz].sum.num);
			}
		}
	}
	cmmd='?';
	return ;
}
void packback(int com){
	while(kd('E')){
	}
	cmmd='?';
	while(cmmd!='E' && cmmd!='e'){
		cmmd=getch();
	}
	int xuanz=xuanze;
	cmmd='?';
	while(cmmd!='E' && cmmd!='e'){	
		cmmd='?';
		system("cls");
		color(14);
		Line("背包");
		print_packback(com,xuanz);
		cout<<endl;
		Line(" G-交换   H-合成   E-退出");
		cmmd=getch();
		if(cmmd=='W' || cmmd=='w'){
			if(xuanz<=9) xuanz+=18;
			else xuanz-=9;
		}
		if(cmmd=='A' || cmmd=='a'){
			if(xuanz%9==1) xuanz+=8;
			else xuanz-=1;
		}
		if(cmmd=='S' || cmmd=='s'){
			if(xuanz>=19) xuanz-=18;
			else xuanz+=9;
		}
		if(cmmd=='D' || cmmd=='d'){
			if(xuanz%9==0) xuanz-=8;
			else xuanz+=1;
		}
		if(cmmd=='G' || cmmd=='g'){
			int xuz1=1,xuz2=1;
			while(cmmd!='P' && cmmd!='p'){	
				system("cls");
				color(14);
				Line("选择您需要交换的物品1 (Q-确认  P-退出)");
				print_packback(com,xuz1);
				cmmd=getch();
				if(cmmd=='W' || cmmd=='w'){
					if(xuz1<=9) xuz1+=18;
					else xuz1-=9;
				}
				if(cmmd=='A' || cmmd=='a'){
					if(xuz1%9==1) xuz1+=8;
					else xuz1-=1;
				}
				if(cmmd=='S' || cmmd=='s'){
					if(xuz1>=19) xuz1-=18;
					else xuz1+=9;
				}
				if(cmmd=='D' || cmmd=='d'){
					if(xuz1%9==0) xuz1-=8;
					else xuz1+=1;
				}
				if(cmmd=='Q' || cmmd=='q') break;
			}
			while(cmmd!='P' && cmmd!='p'){	
				system("cls");
				color(14);
				Line("选择您需要交换的物品2 (Q-确认  P-退出)");
				print_packback(com,xuz2);
				cmmd=getch();
				if(cmmd=='W' || cmmd=='w'){
					if(xuz2<=9) xuz2+=18;
					else xuz2-=9;
				}
				if(cmmd=='A' || cmmd=='a'){
					if(xuz2%9==1) xuz2+=8;
					else xuz2-=1;
				}
				if(cmmd=='S' || cmmd=='s'){
					if(xuz2>=19) xuz2-=18;
					else xuz2+=9;
				}
				if(cmmd=='D' || cmmd=='d'){
					if(xuz2%9==0) xuz2-=8;
					else xuz2+=1;
				}
				if(cmmd=='Q' || cmmd=='q') break;
			}
			if(cmmd!='P' && cmmd!='p'){
				int aaa=hand[com][xuz1].num,bbb=hand[com][xuz1].ui;
				hand[com][xuz1].num=hand[com][xuz2].num;
				hand[com][xuz1].ui=hand[com][xuz2].ui;
				hand[com][xuz2].num=aaa;
				hand[com][xuz2].ui=bbb;
			}
		}
		if(cmmd=='H' || cmmd=='h') craftingtable(com);
		//if(cmmd=='J' || cmmd=='j') furnace(com);
	}
	cmmd='?';
	for(int oo=1;oo<=50;oo++){
		if(hand[com][oo].num==0){
			hand[com][oo].num=0;
			hand[com][oo].ui=0;
		}
	}
	return ;
}
void pt(int ccc,int jjj,int xxx,int yyy,bool dq){
	if(!dq){//na
		if(a[ccc][jjj][xxx][yyy]!=0){
			for(i=1;i<=50;i++){
				if(a[ccc][jjj][xxx][yyy]==hand[ccc][i].ui){
					hand[ccc][i].num++;
					a[ccc][jjj][xxx][yyy]=0;
					return ;
				}
			}
			for(i=1;i<=50;i++){
				if(hand[ccc][i].ui==0){
					hand[ccc][i].ui=a[ccc][jjj][xxx][yyy];
					hand[ccc][i].num++;
					a[ccc][jjj][xxx][yyy]=0;
					return ;
				}
			}
		}
		return ;
	}else if(dq){//fang
		if(a[ccc][jjj][xxx][yyy]==0 && hand[ccc][xuanze].num!=0){
			a[ccc][jjj][xxx][yyy]=hand[ccc][xuanze].ui;
			hand[ccc][xuanze].num--;
			if(hand[ccc][xuanze].num==0){
				hand[ccc][xuanze].ui=0;
			}
		}
		if(a[ccc][jjj][xxx][yyy]==20) furnace(ccc);
		return ;
	}
	dq='2';
}
void LoginXZ(){
	char c;
	Log:
	system("cls");
	color(14);
	Line("登录XZ账号 --- Login XZ");
	cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
	color(7);
	Line("L-登录     M-退出");
	cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
	color(10); 
	Line("没有账号? R-注册");
	color(7);
	c=getch();
	system("cls");
	if(c=='L' || c=='l'){
		ifstream fin("XZ账户.xzdata");
		fin>>nam>>pas;
		fin.close();
		color(14);
		Line("输入密码");
		color(12);
		Line("用户名:"+nam);
		color(7);
		string pass1;
		int i=0;
		char ch;
		while ((ch=_getch())!=13)
		{
			pass1+=ch;
			cout<<"*";
		}
		if(pass1!=pas){
			system("cls");
			Line("抱歉!输入密码错误!请重新登录!(三秒钟后返回)");
			goto Log;
		}
		return ;
	}
	else if(c=='R' || c=='r'){
		color(14);
		Line("注册XZ账号 --- Register XZ");
		cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
		color(7);
		Line("G-注册一个XZ账号   H-读取王子逸的行走账号");
		cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
		color(10); 
		Line("已有账号? M-登录");
		color(7);
		c=getch();
		if(c=='M' || c=='m'){
			goto Log;
		}
		else if(c=='H' || c=='h'){
			system("cls");
			color(14);
			Line("读取XZ账号 --- Read XZ");
			color(7);
			Line("使用提示:请将行走建立的“存档.txt”文件复制到您保存的文件根目录下"); 
			cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
			Line("G-读取存档");
			cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
			color(10); 
			Line("已有账号? M-登录");
			color(7);
			c=getch();
			if(c=='M' || c=='m'){
				goto Log;
			}else if(c=='G' || c=='g'){
				ifstream fin("存档.txt");
				int lllll;
        		fin>>lllll;
         		fin>>lllll;
     		    fin>>nam;
        		fin>>lllll;
        		fin>>nam;
    			fin.close();
				string s1,s2;
    			system("cls");
				color(14);
				Line("设置密码");
				color(7);
				cin>>s1;
				system("cls");
				color(14);
				Line("再输入一次密码");
				color(7);
				cin>>s2;
				if(s1!=s2){
					system("cls");
					Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
					goto Log;
				}
				pas=s1;
    			return ;
			}else goto Log;
		} 
		else if(c=='G' || c=='g'){
			system("cls");
			color(14);
			Line("设置用户名");
			color(7);
			cin>>nam;
			string s1,s2;
			system("cls");
			color(14);
			Line("设置密码");
			color(7);
			cin>>s1;
			system("cls");
			color(14);
			Line("再输入一次密码");
			color(7);
			cin>>s2;
			if(s1!=s2){
				system("cls");
				Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
				goto Log;
			}
			pas=s1;
   			return ;
		}
		else goto Log;
	}else if(c=='M' || c=='m'){
		goto Logok;
	}
	else goto Log;
	Logok:;
}
void XZLogin(){
	color(7);
	LoginXZ();
	ofstream fout("XZ账户.xzdata");
	fout<<nam<<endl<<pas;
	fout.close();
	return ;
}
void buybf(){
	int xuanz=0;
	while(cmmd!='M' && cmmd!='m'){
		system("cls");
		color(12);
		Line("购买皮肤");
		color(7);
		cout<<"                  您有金币:"<<jb<<"个"<<endl;
		for(int i=0;i<pfn;i++){
			cout<<"                  ";
			if(bpf[i]){
				color(10);
				cout<<"已拥有";
			}else{
				color(12);
				cout<<"未拥有";
			}
			color(7);
			if(xuanz==i) cout<<"    > ";
			else cout<<"      ";
			cout<<pfs[i]<<" : "<<pfp[i];
			cout<<endl;
		}
		Line("W/S-切换   E-选择   M-退出");
		cmmd=getch();
		if(cmmd=='W' || cmmd=='w') xuanz--;
		if(cmmd=='S' || cmmd=='s') xuanz++;
		if(cmmd=='E' || cmmd=='e'){
			if(bpf[xuanz]==1) pfd=pfs[xuanz];
			else if(jb>=pfp[xuanz]){
				jb=jb-pfp[xuanz];
				bpf[xuanz]=1;
				pfd=pfs[xuanz];
			}
		}
		if(xuanz>=pfn) xuanz=0;
	}
}
void buycor(){
	int xuanz=0;
	while(cmmd!='M' && cmmd!='m'){
		system("cls");
		color(12);
		Line("切换颜色");
		color(7);
		for(int i=max(0,xuanz-10);i<=min(255,xuanz+10);i++){
			cout<<"                                 ";
			color(7);
			if(xuanz==i) cout<<"    > ";
			else cout<<"      ";
			ppf(i);
			cout<<endl;
		}
		color(7); 
		Line("W/S-切换   E-选择   M-退出");
		cmmd=getch();
		if(cmmd=='W' || cmmd=='w') xuanz--;
		if(cmmd=='S' || cmmd=='s') xuanz++;
		if(cmmd=='E' || cmmd=='e'){
			sehao=xuanz;
		}
		if(xuanz>=256) xuanz=0;
	}
}
void shang(){//本市最繁华的商城 
	system("cls");
	color(7);
	system("cls");
	chuancan=0;
	int xxx=10,yyy=10;
	while(!(xxx==16 && yyy==16)){
		system("cls");
		for(i=0;i<21;i++){
			cout<<"                   ";
			color(7);
			for(j=0;j<21;j++){
				if(i==xxx && j==yyy){
					ppf(sehao);
				}else print(shop[i][j]);
			}
			color(7);
			cout<<endl;
		}
		cout<<"   您有金币:"<<jb<<"个"<<"     "<<"WASD-移动  站在图例格子上即可触发功能";
		cout<<endl<<"                 ";
		print(6);
		color(7);
		cout<<" - 切换皮肤";
		cout<<"                     ";
		print(15);
		color(7);
		cout<<" - 切换颜色";
		cout<<endl<<"                 ";
		print(28);
		color(7);
		cout<<" - 客服服务(需要洛谷账号)";
		cout<<"       ";
		print(14);
		color(7);
		cout<<" - 退出商城";
		cmmd=getch();
		if(cmmd=='W' || cmmd=='w') xxx--;
		if(cmmd=='A' || cmmd=='a') yyy--;
		if(cmmd=='S' || cmmd=='s') xxx++;
		if(cmmd=='D' || cmmd=='d') yyy++;
		if(xxx<=0) xxx=1;
		if(xxx>=20) xxx=19;
		if(yyy<=0) yyy=1;
		if(yyy>=20) yyy=19;
		if(xxx==4 && yyy==4){
			buybf();
			xxx=10;
			yyy=10;
		}
		if(xxx==4 && yyy==16){
			buycor();
			xxx=10;
			yyy=10;
		}
		if(xxx==16 && yyy==4){
			xxx=10;
			yyy=10;
			system("start https://www.luogu.com.cn/chat?uid=541826");
		}
	}
	sav();
}
bool checks(string s1,string s2){
	int num=0;
	for(int p=0;p<s2.size();p++){
		if(s1[p]!=s2[p]) num++;
	}
	if(num<=1 && s2.size()>1) return 1;
	return 0;
}
void Exchange_code(){
	system("cls");
	color(240);
	system("cls");
	Line("兑换码");
	cout<<endl<<endl<<endl<<endl<<endl;
	Line("请输入你的兑换码");
	cout<<endl<<"           ";
	cin>>comd;
	int tot=0;
	for(i=1;i<=eclisn;i++){
		if(checks(eclis[i].ecs,XAPin(comd))){
			tot=i;
			if(echave[i]==1) tot=-2;
			echave[i]=1;
			break;
		}else if(checks(eclis[i].ecs,comd)){
			tot=-1;
			break;
		}
	}
	system("cls");
	color(240);
	system("cls");
	if(tot>0){
		Line("兑换成功");
		cout<<endl<<endl<<endl<<endl<<endl<<endl;
		Line("您兑换到的是"+eclis[tot].nam);
		cout<<endl;
		Line("您获得了"+change_string(eclis[tot].jb)+"金币");
		cout<<endl;
		if(eclis[tot].emc!=0){
			Line("您获得了"+change_string(eclis[tot].emc)+"经验");
			cout<<endl;
		}
		color(252);
		Line(eclis[tot].notice);
		cout<<endl;
		color(240);
		jb+=eclis[tot].jb;
		emc+=eclis[tot].emc;
	}else if(tot==-1){
		Line("兑换失败");
		cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
		color(252);
		Line("    XACRAFT检测到您尝试查看代码以获取兑换码,希望您在日常的游戏生活中能够规范自己的游戏行为,诚信游戏!");
		cout<<endl<<endl<<endl;
		color(240);
	}else if(tot==-2){
		Line("兑换失败");
		cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
		color(252);
		Line("该兑换码已被兑换过");
		cout<<endl<<endl<<endl;
		color(240);
	}else{
		Line("兑换失败");
		cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
		color(252);
		Line("未查找到兑换码");
		cout<<endl<<endl<<endl;
		color(240);
	}
	Line("[按任意键退出]");
	cmmd=getch();
	cmmd='?';
	return ;
}
void mycenter(){
	while(!(cmmd=='e' || cmmd=='E')){
		system("cls");
		color(240);
		system("cls");
		Line("个人中心");
		cout<<endl<<endl<<endl<<endl;
		color(240);
		if(tecnam.empty()) Line("TEC账号:未登录");
		else Line("TEC账号:已登录("+tecnam+")");
		cout<<endl;
		Line("经验值:"+change_string(emc));
		Line("等级:Lv."+change_string((emc/50)+1));
		cout<<endl;
		Line("G-中心商城");
		cout<<endl;
		Line("H-兑 换 码");
		cout<<endl;
		Line("E-退出个人中心");
		cmmd=getch();
		if(cmmd=='G' || cmmd=='g') shang();
		if(cmmd=='H' || cmmd=='h') Exchange_code();
	}
	cmmd='?';
}
int nw(int com){
	jiandang[com]=true; 
	//1 定型 
	for(i=0;i<=2047;i++){
		for(j=1;j<=255;j++){
			a[com][1][j][i]=0;
		}
	}
	for(i=1;i<=50;i++){
		hand[com][i].ui=0;
		hand[com][i].num=0;
	} 
	int ke=0;
	system("cls");
	color(252);
	system("cls");
	Line("我的存档");
	color(240);
	Line("新的世界"); 
	cout<<endl<<endl;
	line("输入种子: ");
	color(7);
	cin>>comd;
	seed=change_num(comd);
	comd="?";
	srand((unsigned)seed);
	y[com]=1024;
	int top=0,tot=rdm(40,60); 
	for(i=0;i<2048;i++){
		if(i==1024){
			x[com]=tot; 
			do{
				++x[com];
			}while(a[com][1][x[com]][top]!=0);
			x[com]+=20;
		}
				a[com][1][tot+1][top]=3;
				a[com][1][tot+1][top-3]=3;
				a[com][1][tot+1][top-2]=3;
				a[com][1][tot+1][top-1]=3;
				a[com][1][tot+1][top+1]=3;
				a[com][1][tot+1][top+2]=3;
				a[com][1][tot+1][top+3]=3;
				a[com][1][tot+2][top-3]=3;
				a[com][1][tot+2][top-2]=3;
				a[com][1][tot+2][top]=3;
				a[com][1][tot+2][top-1]=3;
				a[com][1][tot+2][top+1]=3;
				a[com][1][tot+2][top+2]=3;
				a[com][1][tot+2][top+3]=3;
				a[com][1][tot+3][top-2]=3;
				a[com][1][tot+3][top]=3;
				a[com][1][tot+3][top-1]=3;
				a[com][1][tot+3][top+1]=3;
				a[com][1][tot+3][top+2]=3;
				a[com][1][tot+4][top]=3;
				a[com][1][tot+4][top-1]=3;
				a[com][1][tot+4][top+1]=3;
		for(j=tot;j>=0;j--){
			a[com][1][j][top]=3;
		}
		top++;
		int u=rdm(0,10);
		if(u>=9) tot++;
		if(u<=1) tot--;
		if(tot>=256)tot=255;
		if(tot<10) tot=10;
		int uu=rdm(0,8);
	/*	if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && ke+1<top && seed!=1234567890)||(seed==123456789)){
			ke=top;
			a[com][1][tot+1][top]=6;
			a[com][1][tot+2][top]=6;
			a[com][1][tot+3][top]=6;
			int uuu=rdm(0,3);
			if(uuu==1){
				a[com][1][tot+4][top]=6;
				a[com][1][tot+4][top-3]=2;
				a[com][1][tot+4][top-2]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+4][top+2]=2;
				a[com][1][tot+4][top+3]=2;
				a[com][1][tot+5][top-3]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+5][top+3]=2;
				a[com][1][tot+6][top-2]=2;
				a[com][1][tot+6][top]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
				a[com][1][tot+6][top+2]=2;
				a[com][1][tot+7][top]=2;
				a[com][1][tot+7][top-1]=2;
				a[com][1][tot+7][top+1]=2;
			}else{
				a[com][1][tot+3][top-3]=2;
				a[com][1][tot+3][top-2]=2;
				a[com][1][tot+3][top-1]=2;
				a[com][1][tot+3][top+1]=2;
				a[com][1][tot+3][top+2]=2;
				a[com][1][tot+3][top+3]=2;
				a[com][1][tot+4][top-3]=2;
				a[com][1][tot+4][top-2]=2;
				a[com][1][tot+4][top]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+4][top+2]=2;
				a[com][1][tot+4][top+3]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+6][top]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
			}
		}*/
	}
	//2  定系
	int u=rdm(1,100),pl=0;
	for(i=1;i<=2048;i++){
		int tot;
		for(j=256;j>=0;j--){
			if(a[com][1][j][i]==3){
				tot=j;
				break;
			}
		}
		if(u<=30){
			a[com][1][tot][i]=1;
			a[com][1][tot-1][i]=4;
			a[com][1][tot-2][i]=4;
			a[com][1][tot-3][i]=4;
			int uu=rdm(0,8);
			if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
				top=i;
				pl=i+1;
			a[com][1][tot+1][top]=6;
			a[com][1][tot+2][top]=6;
			a[com][1][tot+3][top]=6;
			int uuu=rdm(0,3);
			if(uuu==1){
				a[com][1][tot+4][top]=6;
				a[com][1][tot+4][top-3]=2;
				a[com][1][tot+4][top-2]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+4][top+2]=2;
				a[com][1][tot+4][top+3]=2;
				a[com][1][tot+5][top-3]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+5][top+3]=2;
				a[com][1][tot+6][top-2]=2;
				a[com][1][tot+6][top]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
				a[com][1][tot+6][top+2]=2;
				a[com][1][tot+7][top]=2;
				a[com][1][tot+7][top-1]=2;
				a[com][1][tot+7][top+1]=2;
			}else{
				a[com][1][tot+3][top-3]=2;
				a[com][1][tot+3][top-2]=2;
				a[com][1][tot+3][top-1]=2;
				a[com][1][tot+3][top+1]=2;
				a[com][1][tot+3][top+2]=2;
				a[com][1][tot+3][top+3]=2;
				a[com][1][tot+4][top-3]=2;
				a[com][1][tot+4][top-2]=2;
				a[com][1][tot+4][top]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+4][top+2]=2;
				a[com][1][tot+4][top+3]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+6][top]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
			}
		}
		}
		else if(u<=50){
			a[com][1][tot][i]=11;
			a[com][1][tot-1][i]=11;
			a[com][1][tot-2][i]=11;
			a[com][1][tot-3][i]=12;
			int uu=rdm(0,8);
			if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
				top=i;
				pl=i+1;
				int uuu=rdm(0,3);
				if(uuu==1){
					a[com][1][tot+1][top]=14;
					a[com][1][tot+2][top]=14;
					a[com][1][tot+3][top]=14;
					a[com][1][tot+4][top]=14;
				}else{
					a[com][1][tot+1][top]=14;
					a[com][1][tot+2][top]=14;
					a[com][1][tot+3][top]=14;
				}
			}
		}else if(u<=80){
			a[com][1][tot][i]=1;
			a[com][1][tot-1][i]=4;
			a[com][1][tot-2][i]=4;
			a[com][1][tot-3][i]=4;
			int uu=rdm(0,8);
			if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
				top=i;
				pl=i+1;
			a[com][1][tot+1][top]=15;
			a[com][1][tot+2][top]=15;
			a[com][1][tot+3][top]=15;
			int uuu=rdm(0,3);
			if(uuu==1){
				a[com][1][tot+4][top]=15;
				a[com][1][tot+4][top-3]=2;
				a[com][1][tot+4][top-2]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+4][top+2]=2;
				a[com][1][tot+4][top+3]=2;
				a[com][1][tot+5][top-3]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+5][top+3]=2;
				a[com][1][tot+6][top-2]=2;
				a[com][1][tot+6][top]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
				a[com][1][tot+6][top+2]=2;
				a[com][1][tot+7][top]=2;
				a[com][1][tot+7][top-1]=2;
				a[com][1][tot+7][top+1]=2;
			}else{
				a[com][1][tot+3][top-3]=2;
				a[com][1][tot+3][top-2]=2;
				a[com][1][tot+3][top-1]=2;
				a[com][1][tot+3][top+1]=2;
				a[com][1][tot+3][top+2]=2;
				a[com][1][tot+3][top+3]=2;
				a[com][1][tot+4][top-3]=2;
				a[com][1][tot+4][top-2]=2;
				a[com][1][tot+4][top]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+4][top+2]=2;
				a[com][1][tot+4][top+3]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+6][top]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
			}
		}
		}else{
			a[com][1][tot][i]=13;
			a[com][1][tot-1][i]=4;
			a[com][1][tot-2][i]=4;
			a[com][1][tot-3][i]=4;
			int uu=rdm(0,15);
			if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
				top=i;
				pl=i+1;
			a[com][1][tot+1][top]=28;
			a[com][1][tot+2][top]=28;
			a[com][1][tot+3][top]=28;
			int uuu=rdm(0,3);
			if(uuu==1){
				a[com][1][tot+4][top]=28;
				a[com][1][tot+5][top]=28;
				a[com][1][tot+6][top]=28;
				a[com][1][tot+7][top]=28;
				a[com][1][tot+3][top-3]=2;
				a[com][1][tot+3][top-2]=2;
				a[com][1][tot+3][top-1]=2;
				a[com][1][tot+3][top+3]=2;
				a[com][1][tot+3][top+2]=2;
				a[com][1][tot+3][top+1]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
				a[com][1][tot+8][top]=28;
				a[com][1][tot+8][top-1]=2;
				a[com][1][tot+8][top+1]=2;
				a[com][1][tot+9][top]=2;
			}else{
				a[com][1][tot+4][top]=28;
				a[com][1][tot+5][top]=28;
				a[com][1][tot+6][top]=2;
				a[com][1][tot+3][top-3]=2;
				a[com][1][tot+3][top-2]=2;
				a[com][1][tot+3][top-1]=2;
				a[com][1][tot+3][top+3]=2;
				a[com][1][tot+3][top+2]=2;
				a[com][1][tot+3][top+1]=2;
				a[com][1][tot+4][top-1]=2;
				a[com][1][tot+4][top+1]=2;
				a[com][1][tot+5][top-2]=2;
				a[com][1][tot+5][top-1]=2;
				a[com][1][tot+5][top+2]=2;
				a[com][1][tot+5][top+1]=2;
				a[com][1][tot+6][top-1]=2;
				a[com][1][tot+6][top+1]=2;
				a[com][1][tot+7][top]=2;
			}
			}
		}
		if(i%128==0 && i!=1024) u=rdm(1,100);
	} 
	//
	for(i=1;i<=2048;i++){
		for(j=1;j<=16;j++){
			if(a[com][1][j][i]==3){
				int uuu=rdm(1,1000);
				if(uuu<=1){
					a[com][1][j][i]=7;
				}
			}
		}
		for(j=4;j<=32;j++){
			if(a[com][1][j][i]==3){
				int uuu=rdm(1,1000);
				if(uuu<=5){
					a[com][1][j][i]=8;
				}
			}
		}
		for(j=1;j<=64;j++){
			if(a[com][1][j][i]==3){
				int uuu=rdm(1,1000);
				if(uuu<=8){
					a[com][1][j][i]=21;
				}
			}
		}
		for(j=1;j<=256;j++){
			if(a[com][1][j][i]==2){
				int uuu=rdm(1,1000);
				if(uuu<=5){
					int uuuu=rdm(1,1000);
					if(uuuu>200) a[com][1][j][i]=9;
					else a[com][1][j][i]=10;
				}
			}
		}
	} 
}
int cun(int com)
{
	while(kd(char(13))){
	}
	xuanze=1;
	color(255);
	//for(i=1;i<=1000;i++) cout<<" ";
	cls();
	while(!kd('P')){
		cls();
		tims[com]+=1;
		if(tims[com]>=10000){
			days[com]++;
			tims[com]=0;
		}
		if(tims[com]<=5500) chuancan=240;
		else if(tims[com]<=6000) chuancan=224;
		else if(tims[com]<=9500) chuancan=0;
		else chuancan=224;
		if(tims[com]%100==0){
			jb+=(1+days[com]);
			emc+=1;
		}
		for(i=x[com]+10;i>=x[com]-10;i--){
			for(j=y[com]-19;j<=y[com]+19;j++){
				if(i==-1 || j<0 || j>2048){
					color(15);
					printf("▓");
				}
				/*else if(a[com][1][i-1][j]!=0 && a[com][1][i+1][j]!=0 && a[com][1][i][j+1]!=0 && a[com][1][i][j-1]!=0){
					color(7);
					cout<<"  ";
				}*/else if(i!=x[com] || j!=y[com]){
					print(a[com][1][i][j]);
				}else{
					ppf(sehao);
				}
			}
			cout<<endl;
		}
		if(x[com]<=1){
			x[com]=1;
		}
		if(x[com]>256){
			x[com]=256;
		}
		if(y[com]<0){
			y[com]=0;
		}
		if(y[com]>2048){
			y[com]=2048;
		}
		color(15);
		printf(">>状态栏 坐标: x:%d y:%d ",x[com],y[com]);
		cout<<"后位方块:";
		print(a[com][1][x[com]][y[com]]);
		color(15);
		cout<<" 当前:";
		if(kn){
			color(12);
			cout<<"破坏"; 
		}else{
			color(10);
			cout<<"建造";
		} 
		color(15);
		cout<<"模式(J切换) P-保存并退出 ";
		cout<<endl;
		color(7);
		Line("                               "+wri(hand[com][xuanze].ui)+"                               ");
		color(7);
		cout<<"\t\t\t       ";
		for(i=1;i<=9;i++){
			color(7);
			if(hand[com][i].num!=0){
				print(hand[com][i].ui);
			}else{
				cout<<"□";
			}
		}
		color(7);
		cout<<"                             ";
		cout<<endl<<"\t\t\t       ";
		for(i=1;i<=9;i++){
			if(i==xuanze) color(11);
			else color(7);
			if(hand[com][i].num!=0){
				if(hand[com][i].num<=64) printf("%02d",hand[com][i].num);
				else if(hand[com][i].num<100) cout<<hand[com][i].num%100/10<<"+";
				else if(hand[com][i].num<1000) cout<<hand[com][i].num%1000/100<<"*";
				else cout<<hand[com][i].num%10000/1000<<"^";
			}else{
				cout<<"--";
			}
		}
		cout<<"                             ";
		//Sleep(100);
		if(cmmd=='/'){
			cls();
			color(12);
			Line("命令");
			bool flag=0;
			while(comd!="esc"){	
				color(7);
				cout<<"/";
				cin>>comd;
				if(comd=="tp"){
					cout<<"/tp @s ";
					cin>>i>>j;
					flag=1;
					x[com]=i;
					y[com]=j;
					comd="esc";
				}
				if(!flag){
					color(12);
					cout<<">>语法错误"<<endl;
					color(7);
				}
			}
			comd="?";
		}
		if(kd('E')){
			while(kd('E')){	
			}
			packback(com);
			Sleep(100);
		}
		if(kd('W')&& a[com][1][x[com]-1][y[com]]!=0){
			if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]==0) && (a[com][1][x[com]+3][y[com]]==0)){
				x[com]+=4;
			}
			else if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]==0) && (a[com][1][x[com]+3][y[com]]!=0)){
				x[com]+=3;
			}
			else if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]!=0)){
				x[com]+=2;
			}
		}
		//if(cmmd=='S' || cmmd=='s') x[com]--;
		if(a[com][1][x[com]-1][y[com]]==0){
			Sleep(20);
			x[com]--;
		}
		if(kd('A')){
			if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]==0){
				x[com]--;
				y[com]--;
			}
			else if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]!=0){
				y[com]--;
			}
			else if(a[com][1][x[com]][y[com]-1]!=0 && a[com][1][x[com]+1][y[com]-1]==0 && a[com][1][x[com]+1][y[com]]==0){
				x[com]++;
				y[com]--;
			}
		} //y[com]--;
		if(kd('D')){
			if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]==0){
				x[com]--;
				y[com]++;
			}
			else if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]!=0){
				y[com]++;
			}
			else if(a[com][1][x[com]][y[com]+1]!=0 && a[com][1][x[com]+1][y[com]+1]==0 && a[com][1][x[com]+1][y[com]]==0){
				x[com]++;
				y[com]++;
			}
		} //y[com]++;
		if(kd('J')){
			kn=!kn;
			while(kd('J')){
			}
		} 
		if(kd('1')) xuanze=1;
		if(kd('2')) xuanze=2;
		if(kd('3')) xuanze=3;
		if(kd('4')) xuanze=4;
		if(kd('5')) xuanze=5;
		if(kd('6')) xuanze=6;
		if(kd('7')) xuanze=7;
		if(kd('8')) xuanze=8;
		if(kd('9')) xuanze=9;
		if(kd('Q') && a[com][1][x[com]+1][y[com]]==0 && /*a[com][1][x[com]-1][y[com]]!=0 &&*/ hand[com][xuanze].num!=0){
			x[com]++;
			pt(com,1,x[com]-1,y[com],true);
		}
		if(kn){
			if(kd('Y')){
				//hand[com][a[com][1][x[com]+1][y[com]-1]]++;
				//a[com][1][x[com]+1][y[com]-1]=0;
				pt(com,1,x[com]+1,y[com]-1,false);
			}
			if(kd('U')){
				//hand[com][a[com][1][x[com]+1][y[com]]]++;
				//a[com][1][x[com]+1][y[com]]=0;
				pt(com,1,x[com]+1,y[com],false);
			} 
			if(kd('I')){
				//hand[com][a[com][1][x[com]+1][y[com]+1]]++;
				//a[com][1][x[com]+1][y[com]+1]=0;
				pt(com,1,x[com]+1,y[com]+1,false);
			}
			if(kd('H')){
				//hand[com][a[com][1][x[com]][y[com]-1]]++;
				//a[com][1][x[com]][y[com]-1]=0;
				pt(com,1,x[com],y[com]-1,false);
			}
			if(kd('K')){
				//hand[com][a[com][1][x[com]][y[com]+1]]++;
				//a[com][1][x[com]][y[com]+1]=0;
				pt(com,1,x[com],y[com]+1,false);
			}
			if(kd('B')){
				//hand[com][a[com][1][x[com]-1][y[com]-1]]++;
				//a[com][1][x[com]-1][y[com]-1]=0;
				pt(com,1,x[com]-1,y[com]-1,false);
			}
			if(kd('N')){
				//hand[com][a[com][1][x[com]-1][y[com]]]++;
				//a[com][1][x[com]-1][y[com]]=0;
				pt(com,1,x[com]-1,y[com],false);
			}
			if(kd('M')){
				//hand[com][a[com][1][x[com]-1][y[com]+1]]++;
				//a[com][1][x[com]-1][y[com]+1]=0;
				pt(com,1,x[com]-1,y[com]+1,false);
			}
		}
		if(!kn){
			if(kd('Y')){
				//hand[com][a[com][1][x[com]+1][y[com]-1]]++;
				//a[com][1][x[com]+1][y[com]-1]=0;
				pt(com,1,x[com]+1,y[com]-1,true);
			}
			if(kd('U')){
				//hand[com][a[com][1][x[com]+1][y[com]]]++;
				//a[com][1][x[com]+1][y[com]]=0;
				pt(com,1,x[com]+1,y[com],true);
			} 
			if(kd('I')){
				//hand[com][a[com][1][x[com]+1][y[com]+1]]++;
				//a[com][1][x[com]+1][y[com]+1]=0;
				pt(com,1,x[com]+1,y[com]+1,true);
			}
			if(kd('H')){
				//hand[com][a[com][1][x[com]][y[com]-1]]++;
				//a[com][1][x[com]][y[com]-1]=0;
				pt(com,1,x[com],y[com]-1,true);
			}
			if(kd('K')){
				//hand[com][a[com][1][x[com]][y[com]+1]]++;
				//a[com][1][x[com]][y[com]+1]=0;
				pt(com,1,x[com],y[com]+1,true);
			}
			if(kd('B')){
				//hand[com][a[com][1][x[com]-1][y[com]-1]]++;
				//a[com][1][x[com]-1][y[com]-1]=0;
				pt(com,1,x[com]-1,y[com]-1,true);
			}
			if(kd('N')){
				//hand[com][a[com][1][x[com]-1][y[com]]]++;
				//a[com][1][x[com]-1][y[com]]=0;
				pt(com,1,x[com]-1,y[com],true);
			}
			if(kd('M')){
				//hand[com][a[com][1][x[com]-1][y[com]+1]]++;
				//a[com][1][x[com]-1][y[com]+1]=0;
				pt(com,1,x[com]-1,y[com]+1,true);
			}
		}
		color(7);
	}
	while(kd('P')){
	}
	cmmd='?';
	while(cmmd!='P' && cmmd!='p'){
		cmmd=getch();
	}
	cmmd='?';
    return 0;
}
void fm(){
	while(cmmd!='G' && cmmd!='g'){
		system("cls");
		color(240);
		system("cls");
		cout<<endl;
		Line("XACRAFT 3.1");
		cout<<endl<<endl;
		color(249);
		Line(" 开发组团队\n"); 
		color(240);
		Line("创意/营销/策划    王子逸");
		Line("核心程序/外观设计 沙宸安");
		cout<<endl;
		color(249);
		Line(" 特别鸣谢名单\n"); 
		color(240);
		Line(" 注:以上排名不分先后\n");
		cout<<endl;
		Line("吴庞茂旭  武 建 豪  刘 英 杰  杜 文 博  侯 平 仄");
		Line("欧阳语聪  张    帆  赵 逸 凡  赵 奕 帆  陈    曦");
		Line("许 金 夫  江 齐 悦  孔 小 川  宣 海 宁  王 子 耀");
		Line("陈 喆 鹏  包 涵 宇  潘 孝 宇  曹 灿 阳  朱 优 扬");
		Line("郑 泓 毅  陈 家 傲  李 玥 仑  赵 泰 来  薛 乘 志");
		color(252);
		cout<<endl;
		Line("注:所有在鸣谢名单上的人可以申请移出,达到光能级别及以上的人可以申请加入。");
		color(240);
		Line("[1/2]");
		Line("G-切换下一页");
		cmmd=getch();
	}
	while(cmmd!='S' && cmmd!='s'){
		system("cls");
		color(240);
		system("cls");
		cout<<endl;
		Line("XACRAFT 3.1");
		cout<<endl<<endl;
		color(249);
		Line(" 本版本更新内容\n"); 
		color(240);
		Line("这是XACRAFT的第5个版本");
		Line("本版本更新内容如下:");
		cout<<endl;
		Line("运动算法优化");
		Line("个人中心更新");
		Line("部分不稳定算法修复");
		cout<<endl;
		color(252);
		Line(" XACRAFT开发组团队预祝您游玩愉快!\n");
		color(249);
		Line(" 版权声明\n"); 
		color(240);
		Line("本游戏由兴安科技与极昼游戏工坊联合制作");
		Line("版权所有 未经授权严禁转载 保留所有权利");
		Line("Copyright XAscience & JizhouGameWorkshop All Rights Reserved"); 
		cout<<endl; 
		color(240);
		Line("[2/2]");
		Line("S-开始游戏");
		cmmd=getch();
	}
	while(cmmd!='O' && cmmd!='o'){
		system("cls");
		color(240);
		system("cls");
		if(tecnam.empty()) rightLine("未登录TEC账号  L-登录");
		else rightLine(tecnam+",欢迎您!");
		color(240);
		cout<<"                ▇  ▇   ▇   ▇▇▇ ▇▇▇   ▇   ▇▇▇ ▇▇▇               "<<endl;
		cout<<"                ▇  ▇ ▇  ▇ ▇     ▇  ▇ ▇  ▇ ▇       ▇                 "<<endl;
		cout<<"                  ▇   ▇▇▇ ▇     ▇▇▇ ▇▇▇ ▇▇▇   ▇                 "<<endl;
		cout<<"                ▇  ▇ ▇  ▇ ▇     ▇▇   ▇  ▇ ▇       ▇                 "<<endl;
		cout<<"                ▇  ▇ ▇  ▇ ▇▇▇ ▇  ▇ ▇  ▇ ▇       ▇                 "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                           ";
		color(143);
		cout<<"       F-单人游戏       ";
		color(240);
		cout<<"                            "<<endl; 
		cout<<"                                                                               "<<endl;
		cout<<"                           ";
		color(143);
		cout<<"  G-XACRAFT  Community  ";
		color(240);
		cout<<"                            "<<endl; 
		cout<<"                                                                               "<<endl;
		cout<<"                           ";
		color(143);
		cout<<"       H-个人中心       ";
		color(240);
		cout<<"                            "<<endl; 
		cout<<"                                                                               "<<endl;
		cout<<"                           ";
		color(143);
		cout<<"  J-教程  ";
		color(240);
		cout<<"    "; 
		color(143);
		cout<<"  O-退出  ";
		color(240);
		cout<<"                            "<<endl; 
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<"                                                                               "<<endl;
		cout<<" XACRAFT 3.1        Copyright XAscience & JizhouGameWorkshop Do not distribute!";
		cmmd=getch();
		if(cmmd=='F' || cmmd=='f'){
			while(cmmd!='P' && cmmd!='p'){
				system("cls");
				color(252);
				system("cls");
				Line("我的存档");
				color(240);
				Line("______________________________________________________________________________");
				j=0;
				for(i=1;i<=20;i++){
					if(jiandang[i]){
						cout<<" "<<i<<" - XACRAFT存档"<<i<<endl;
						j++;
					}
				}
				for(i=1;i<=20-j;i++) cout<<endl;
				Line("______________________________________________________________________________");
				Line("F-新建存档  G-读取存档  H-删除存档  P-退出");
				cmmd=getch();
				if(cmmd=='F' || cmmd=='f'){
					for(i=1;i<=20;i++){
						if(!jiandang[i]){
							nw(i);
							jiandang[i]=1;
							sav();
							break;
						}
					}
				}
				if(cmmd=='G' || cmmd=='g'){
					system("cls");
					color(252);
					system("cls");
					Line("我的存档");
					color(240);
					Line("读取存档"); 
					cout<<endl<<endl;
					line("存档编号(输入负数退出): ");
					color(7);
					cin>>comd;
					kkk=change_num(comd);
					comd="?";
					if(kkk>=0 && jiandang[kkk]){
						cun(kkk);
						sav();
						system("cls");/*
						color(12);
						Line("XACRAFT存档异常退出");
						color(7);
						cout<<endl<<"    如您跳转到此界面,可能是因为您在使用XACRAFT存档的过程中未进行字符读入(或字符读入已执行但被清除),请输入任意内容,然后按Enter键即可退出XACRAFT存档";
						cin>>comd;
						system("cls");*/
					}
				}
				if(cmmd=='H' || cmmd=='h'){
					system("cls");
					color(252);
					system("cls");
					Line("我的存档");
					color(240);
					Line("删除存档"); 
					cout<<endl<<endl;
					line("存档编号(输入负数退出): ");
					color(7);
					cin>>comd;
					kkk=change_num(comd);
					comd="?";
					if(kkk>=0) jiandang[kkk]=0;
					sav();
				}
				/*
				if(jiandang){
					color(7);
					cun(1);
					cmmd='?';
				}else{
					system("cls");
					color(252);
					system("cls");
					Line("我的存档");
					color(240);
					Line("新的世界"); 
					cout<<endl<<endl;
					line("输入种子: ");
					color(7);
					nw(1);
					cun(1);
					cmmd='?';
					jiandang=1;
				}
				*/
			}	
			cmmd='?';
		}
		if(cmmd=='G' || cmmd=='g'){
			system("cls");
			color(252);
			system("cls");
			Line("XACRAFT Community");
			cout<<endl;
			color(240);
			Line("请保证您连接了互联网,否则将无法进入XACRAFT Community。"); 
			system("start https://www.luogu.com.cn/team/35439");
			cout<<endl<<endl<<endl<<endl;
			Line("[按任意键退出]");
			cmmd=getch();
			cmmd='?';
		}
		if(cmmd=='H' || cmmd=='h') mycenter();
		if(cmmd=='L' || cmmd=='l') TEClogin();
		if(cmmd=='J' || cmmd=='j'){
			system("cls");
			color(240);
			system("cls");
			Line("新手教程");
			cout<<endl;
			color(240);
			Line(" 注:以下键位操作大小写皆可\n");
			Line(" W-跳  跃   A-左  走   D-右  走  Q-在脚下放置方块\n");
			Line(" J-建造模式/破坏模式\n");
			Line(" YUIHKBNM依次为:放置/破坏{左上角,上方,右上角,左边,右边,左下角,下方,右下角}的方块\n");
			Line(" 游戏区域的正下方为物品栏\n");
			Line(" 更多教程请按K键\n");
			cout<<endl<<endl<<endl;
			Line("[按其他键退出]");
			cmmd=getch();
			if(cmmd=='K' || cmmd=='k') system("start https://docs.qq.com/doc/DWGtxU0RzeFF1UFFn");
			cmmd='?';
		}
		if(cmmd=='#'){
			system("cls");
			color(12);
			system("cls");
			Line("除错模式");
			cout<<endl;
			color(7);
			Line("注:本模式仅供XACRAFT内部人员使用,如果您不是XACRAFT技术人员,在使用XACRAFT除错模式后因操作不当出现问题,兴安科技和极昼工坊将不承担任何责任。");
			cout<<endl<<endl;
			cout<<"方块外观:";
			for(i=1;i<=35;i++){
				print(i);
				color(7);
			}
			color(7);
			cout<<endl<<"方块UI值:";
			for(i=1;i<=35;i++){
				if(i%2==1) color(9);
				printf("%02d",i);
				color(7);
			}
			cout<<endl<<endl<<endl;
			Line("[按任意键退出]");
			cmmd=getch();
			cmmd='?';
		}
	}
	Sleep(1000);
	return ;
}
void XACRAFT_MAIN(){
	console();
	HideCursor1();
	Logical_Lock();
	lists();
	checkcun();
	rea();
	fm();
	sav();
} 
int main(){
	XACRAFT_MAIN();
	return 0;
}
原文
存档评论2 条抓取于