32
已解决
沙宸安
高级启示者
高级启示者
好久不见!时隔两个月,XACRAFT 3.0更新啦!
本版本,我们已经将一些XACRAFT的基本功能进行完善,这将为未来的版本奠定了基础,可谓是:一生二,二生三,三生万物
同时,您可以加入XACRAFT社区。在这里,您可以交流XACRAFT的游戏技巧,分享XACRAFT的游玩心得,讨论XACRAFT的更新计划,享受您所喜爱的组件与补包。
#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 jiandang[21];//建立存档
string nam,pas;
void console()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut, &bInfo );
SetConsoleTitle("XACRAFT 3.0 简体中文版"); // 设置窗口的标题
}
struct han{
int ui,num;
}hand[21][50],rl[51];
struct pflist{
int num;
han k[101];
han sum;
}lis[10001],rlis[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;
int days[21],tims[21],chuancan;
int i,j,kkk;
bool kn=0;
char cmmd;
string comd;
int seed;
bool bpf[6];
string pfs[6]={"XZ","XA","GD","MC","卍","∞"};
int pfp[6]={0,50,50,100,150,300},sehao=240;
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;
}
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="20220601";
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(){
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<<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;
}
fout<<sehao;
fout.close();
}
void rea(){
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;
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];
}
fin>>sehao;
fin.close();
}
void checkcun(){
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<<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<<240;
fout.close();
return ;
}
void ppf(int cor){
color(cor);
cout<<pfd;
color(7);
}
void Logical_Lock(){//该函数如需借鉴请先联系沙兴安
if(fool_days()){
system("cls");
color(252);
system("cls");
cout<<endl;
Line("抱 歉");
cout<<endl<<endl;
color(240);
Line("出于特殊原因,XACRAFT已停止更新,非常抱歉。");
cmmd=getch();
int fk=0;
cout<<fk/fk;
}
if(end_day()){
system("cls");
color(252);
system("cls");
cout<<endl;
Line("XACRAFT 版本过低");
cout<<endl<<endl;
color(240);
Line("您现在使用的XACRAFT 3.0已于2022年6月1日过期,请更新至最新版本!");
cmmd=getch();
int fk=0;
cout<<fk/fk;
}
return ;
}
string wri(int cor){
/* if(cor==){
return "";
}else*/
if(cor==1){
return "草方块";
}else if(cor==2){
return "树叶";
}else if(cor==3){
return "石头";
}else if(cor==4){
return "泥土";
}else if(cor==6){
return "橡木原木";
}else if(cor==7){
return "钻石矿石";
}else if(cor==8){
return "黄金矿石";
}else if(cor==9){
return "苹果";
}else if(cor==10){
return "金苹果";
}else if(cor==11){
return "沙子";
}else if(cor==12){
return "砂岩";
}else if(cor==13){
return "雪块";
}else if(cor==14){
return "仙人掌";
}else if(cor==15){
return "白桦原木";
}else if(cor==16){
return "HelloWorld";
}else if(cor==17){
return "橡木木板";
}else if(cor==18){
return "白桦木板";
}else if(cor==19){
return "木棍堆";
}else if(cor==20){
return "熔炉";
}else if(cor==21){
return "煤矿石";
}else if(cor==22){
return "煤炭";
}else if(cor==23){
return "金锭";
}else if(cor==24){
return "钻石";
}else if(cor==25){
return "煤炭块";
}else if(cor==26){
return "金块";
}else if(cor==27){
return "钻石块";
}else if(cor==28){
return "云杉原木";
}else if(cor==29){
return "云杉木板";
}else{
return "空气方块";
}
}
int print(int cor){
/* if(cor==){//
color();
cout<<"";
}else*/
if(cor==1){
color(170);//草方块
printf(" ");
}else if(cor==2){
color(34);//树叶
printf(" ");
}else if(cor==3){
color(136);//石头
printf(" ");
}else if(cor==4){
color(102);//泥土
printf(" ");
}else if(cor==6){
color(96);//橡木
printf("WO");
}else if(cor==7){
color(139);//钻石矿石
printf("::");
}else if(cor==8){
color(142);//黄金矿石
printf("::");
}else if(cor==9){
color(207);//苹果
printf("AP");
}else if(cor==10){
color(239);//金苹果
printf("GA");
}else if(cor==11){
color(238);//沙子
printf(" ");
}else if(cor==12){
color(239);//砂岩
printf("==");
}else if(cor==13){
color(127);//雪块
printf("##");
}else if(cor==14){
color(32);//仙人掌
printf("::");
}else if(cor==15){
color(112);//白桦木
printf("BR");
}else if(cor==16){
color(31);
cout<<"HW";
}else if(cor==17){//橡木木板
color(96);
cout<<"==";
}else if(cor==18){//白桦木板
color(126);
cout<<"==";
}else if(cor==19){//木棍堆
color(chuancan+6);
cout<<"//";
}else if(cor==20){//熔炉
color(128);
cout<<"##";
}else if(cor==21){//煤矿石
color(128);
cout<<"::";
}else if(cor==22){//煤炭
color(chuancan);
cout<<"▃";
}else if(cor==23){//金锭
color(chuancan+14);
cout<<"▃";
}else if(cor==24){//钻石
color(chuancan+11);
cout<<"▃";
}else if(cor==25){//煤炭块
color(15);
cout<<"□";
}else if(cor==26){//金块
color(239);
cout<<"□";
}else if(cor==27){//钻石块
color(191);
cout<<"□";
}else if(cor==28){//云杉原木
color(96);
cout<<"SP";
}else if(cor==29){//云杉木板
color(96);
cout<<"--";
}else{
color(chuancan);//空气
cout<<" ";
}
}
void lists(){
bpf[0]=1;
lisn=14,rlisn=3,rln=8;
//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;
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<6;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>=6) 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();
}
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+=5;
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<<" ";
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]--;
}
if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]!=0){
y[com]--;
}
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]++;
}
if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]!=0){
y[com]++;
}
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.0");
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.0");
cout<<endl<<endl;
color(249);
Line(" 本版本更新内容\n");
color(240);
Line("这是XACRAFT的第3个版本");
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.0 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') shang();
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 ;
}
int main(){
console();
HideCursor1();
Logical_Lock();
lists();
checkcun();
rea();
fm();
sav();
return 0;
}
0
0
0
0
0
0
0
0
许孟星
新手光能
新手光能
试试这个↓
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
bool jiandang,kn,sh,vip;
string nam,pas,pfd="XZ",comd,ckpf[10001];
int a[20][5][256][2049],hand[20][50],x[20]={0},y[20],i,j,seed,ckpfs=1,sum,op;
double hj;
char cmmd;
void console(){
HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut,&bInfo);
SetConsoleTitle("XACRAFT 1.5 简体中文版");
return;
}
void color(int corcorcor){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
return;
}
bool kd(char ccc){
if(!KEY_DOWN(ccc)) return 0;
else return 1;
}
int rdm(int aa,int bb){
return rand()%(bb-aa+1)+aa;
}
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;
}
string Gettime(){
time_t timep;
time(&timep);
char tmp[64];
strftime(tmp,sizeof(tmp),"%Y年%m月%d日",localtime(&timep));
return tmp;
}
void rightLinE(string str){
int i,l=str.length(),w=80;
for(i=0;i<w-l;i++) cout<<" ";
cout<<str;
return;
}
void rightLine(string str){
rightLinE(str);
cout<<endl;
return;
}
void LinE(string str){
int i,l=str.length(),w=80;
for(i=0;i<(w-l)/2;i++) cout<<" ";
cout<<str;
return;
}
void Line(string str){
LinE(str);
cout<<endl;
return;
}
void Color_Line(string str,int Color_Number){
color(Color_Number);
Line(str);
return;
}
bool end_day(){
string tmp=GetTime(),temp="20210801";
if(tmp>=temp) return 1;
else return 0;
}
bool fool_days(){
string tmp=getTime();
if(tmp=="0401") return 1;
else return 0;
}
void Logical_Lock(){
if(fool_days()){
color(252);
system("cls");
cout<<endl;
Line("抱 歉");
cout<<endl<<endl;
Color_Line("出于特殊原因,XACRAFT已停止更新,非常抱歉。",240);
Sleep(2500);
}
else if(end_day()){
color(252);
system("cls");
cout<<endl;
Line("XACRAFT 版本过低");
cout<<endl<<endl;
Color_Line("您现在使用的XACRAFT 1.0已于2021年8月1日过期,请更新至最新版本!",240);
Sleep(2500);
}
return;
}
int print(int cor){
if(cor==1){
color(170);
printf("▇");
}
if(cor==2){
color(34);
printf("▇");
}
if(cor==3){
color(136);
printf("▇");
}
if(cor==4){
color(102);
printf("▇");
}
if(cor==6){
color(96);
printf("WO");
}
if(cor==7){
color(139);
printf("∷");
}
if(cor==8){
color(142);
printf("∷");
}
if(cor==9){
color(207);
printf("AP");
}
if(cor==10){
color(239);
printf("GA");
}else{
color(255);
cout<<" ";
}
}
void LoginXZ(){
char c,ch;
Log:
color(252);
system("cls");
Color_Line("登录XZ账号 --- Login XZ",507);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("L-登录 M-退出",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("没有账号? R-注册",242);
c=getch();
system("cls");
if(c=='L'||c=='l'){
color(240);
system("cls");
ifstream fin("XZ账户.xzdata");
fin>>nam>>pas;
fin.close();
Color_Line("输入密码(不可修改)",507);
cout<<endl;
Color_Line("用户名:"+nam,252);
cout<<endl;
string pass;
while(ch=_getch()!=13){
pass+=ch;
cout<<"*";
}
if(pass!=pas){
system("cls");
cout<<endl;
Line("抱歉!输入密码错误!请重新登录!(三秒钟后返回)");
Sleep(3000);
goto Log;
}
sh=1;
return;
}
if(c=='R'||c=='r'){
color(240);
system("cls");
Color_Line("注册XZ账号 --- Register XZ",507);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("G-注册一个XZ账号 H-读取你的XZ账号",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("已有账号? D-登录",242);
c=getch();
if(c=='D'||c=='d') goto Log;
if(c=='H'||c=='h'){
color(240);
system("cls");
Color_Line("读取XZ账号 --- Read XZ",507);
cout<<endl<<endl;
Color_Line("使用提示:请将XZ建立的“存档.xzdata”文件复制到您保存的文件根目录下:",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("G-读取存档",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("已有账号? D-登录",242);
c=getch();
if(c=='G'||c=='g'){
ifstream fin("存档.txt");
int ll;
fin>>ll;
fin>>ll;
fin>>nam;
fin>>ll;
fin>>nam;
fin.close();
string t,q;
color(240);
system("cls");
Color_Line("设置密码",507);
cout<<endl;
color(252);
cin>>t;
system("cls");
Color_Line("再输入一次密码",507);
cout<<endl;
color(252);
cin>>q;
if(t!=q){
system("cls");
Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
Sleep(3000);
goto Log;
}
else pas=t;
return;
}
}if(c=='D'||c=='d') goto Log;
if(c=='G'||c=='g'){
color(240);
system("cls");
Color_Line("设置用户名",507);
cout<<endl;
color(252);
cin>>nam;
string t,q;
system("cls");
Color_Line("设置密码",507);
cout<<endl;
color(252);
cin>>t;
system("cls");
Color_Line("再输入一次密码",507);
cout<<endl;
color(252);
cin>>q;
if(t!=q){
system("cls");
Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
Sleep(3000);
goto Log;
}else pas=t;
return;
}
}
if(c=='M'||c=='m') goto Logok;
else goto Log;
Logok:;
return;
}
void XZLogin(){
LoginXZ();
ofstream fout("XZ账户.xzdata");
fout<<nam<<endl<<pas;
fout.close();
return;
}
int nw(int com){
sum+=2;
for(i=0;i<2048;i++) for(j=1;j<256;j++) a[com][1][j][i]=0;
for(i=1;i<51;i++) hand[com][i]=0;
int ke=0;
cin>>seed;
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+1;
a[com][1][tot][top]=1;
a[com][1][tot-1][top]=4;
a[com][1][tot-2][top]=4;
a[com][1][tot-3][top]=4;
for(j=tot-4;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){
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;
}
}
}
for(i=1;i<2049;i++){
for(j=1;j<17;j++){
if(a[com][1][j][i]==3){
int uuu=rdm(1,1000);
if(uuu<=5) a[com][1][j][i]=7;
}
}
for(j=4;j<33;j++){
if(a[com][1][j][i]==3){
int uuu=rdm(1,1000);
if(uuu<=10) a[com][1][j][i]=8;
}
}
for(j=1;j<257;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){
sum+=5;
hj+=0.5;
color(7);
while(cmmd!='P'&&cmmd!='p'){
system("cls");
for(i=min(256,x[com]+10);i>=max(0,x[com]-10);i--){
for(j=max(y[com]-19,0);j<=min(y[com]+19,2048);j++){
if(i!=x[com]||j!=y[com]) print(a[com][1][i][j]);
else{
color(240);
cout<<pfd;
}
}
cout<<endl;
}
color(7);
printf("状态栏 >> 坐标: x:%d y:%d ",x[com],y[com]);
cout<<"后位方块:";
print(a[com][1][x[com]][y[com]]);
color(7);
cout<<" **模式:";
if(kn) cout<<"开启";
else cout<<"关闭";
cout<<" P-退出至标题画面"<<" **时间:"<<Gettime()<<endl;
cout<<" ";
for(i=1;i<51;i++) if(hand[com][i]>0) print(i);
color(7);
cout<<endl<<" ";
for(i=1;i<51;i++) if(hand[com][i]>0) printf("%02d",hand[com][i]);
cmmd=getch();
if(cmmd=='/'){
color(240);
system("cls");
bool flag=0;
Color_Line("命令(输入esc退出)",249);
while(comd!="esc"){
cout<<"/";
cin>>comd;
if(comd=="tp"){
cout<<"/tp @s ";
cin>>i>>j;
flag=1;
x[com]=i;
y[com]=j;
comd="esc";
}
if(!flag) cout<<"语法错误!"<<endl;
}
comd="?";
}
if(cmmd=='W'||cmmd=='w') x[com]++;
if(cmmd=='S'||cmmd=='s') x[com]--;
if(cmmd=='A'||cmmd=='a') y[com]--;
if(cmmd=='D'||cmmd=='d') y[com]++;
if(cmmd=='J'||cmmd=='j') kn=!kn;
if(kn){
if(cmmd=='Y'||cmmd=='y'){
hand[com][a[com][1][x[com]+1][y[com]-1]]++;
a[com][1][x[com]+1][y[com]-1]=0;
}
if(cmmd=='U'||cmmd=='u'){
hand[com][a[com][1][x[com]+1][y[com]]]++;
a[com][1][x[com]+1][y[com]]=0;
}
if(cmmd=='I'||cmmd=='i'){
hand[com][a[com][1][x[com]+1][y[com]+1]]++;
a[com][1][x[com]+1][y[com]+1]=0;
}
if(cmmd=='H'||cmmd=='h'){
hand[com][a[com][1][x[com]][y[com]-1]]++;
a[com][1][x[com]][y[com]-1]=0;
}
if(cmmd=='K'||cmmd=='k'){
hand[com][a[com][1][x[com]][y[com]+1]]++;
a[com][1][x[com]][y[com]+1]=0;
}
if(cmmd=='B'||cmmd=='b'){
hand[com][a[com][1][x[com]-1][y[com]-1]]++;
a[com][1][x[com]-1][y[com]-1]=0;
}
if(cmmd=='N'||cmmd=='n'){
hand[com][a[com][1][x[com]-1][y[com]]]++;
a[com][1][x[com]-1][y[com]]=0;
}
if(cmmd=='M'||cmmd=='m'){
hand[com][a[com][1][x[com]-1][y[com]+1]]++;
a[com][1][x[com]-1][y[com]+1]=0;
}
}
}
return 0;
}
void denglu(){
while(cmmd!='G'&&cmmd!='g'){
color(240);
system("cls");
cout<<endl;
Line("XACRAFT 行走 1.5");
cout<<endl<<endl;
Color_Line(" **组团队",249);
cout<<endl;
color(240);
Line("创意/营销/策划 王子逸");
Line("核心程序/外观设计 沙宸安");
Line("小部分思路 冮 欢");
cout<<endl;
Color_Line("特别鸣谢名单",249);
cout<<endl;
color(240);
Line(" 注:以下排名不分先后");
cout<<endl;
Line("吴庞茂旭 武 建 豪 刘 英 杰 杜 文 博 侯 平 仄");
Line("欧阳语聪 张 帆 赵 逸 凡 赵 奕 帆 陈 曦");
Line("许 金 夫 江 齐 悦 王 文 博 宣 海 宁 王 子 耀");
Line("陈 喆 鹏 包 涵 宇 潘 孝 宇");
cout<<endl;
Color_Line("注:所有在鸣谢名单上的人可以申请移出,达到光能级别及以上的人可以申请加入。",252);
cout<<endl;
color(240);
Line("[1/2]");
Line("G-切换到下页");
cmmd=getch();
}
while(cmmd!='S'&&cmmd!='s'){
color(240);
system("cls");
cout<<endl;
Line("XACRAFT 行走 1.5");
cout<<endl<<endl;
color(249);
Line(" 本版本更新内容");
cout<<endl;
color(240);
Line("这是XACRAFT的第1个版本");
Line("本版本更新内容如下:");
cout<<endl;
Line("随机地形生成");
Line("**方块统计");
Line("存档登录");
Line("等级");
Line("VIP");
cout<<endl;
Color_Line("XACRAFT**组团队预祝您游玩愉快!",252);
cout<<endl;
color(249);
Line("版权声明");
cout<<endl;
color(240);
Line("本游戏由兴安科技与极昼游戏工坊联合制作");
Line("版权所有 未经授权严禁转载 保留所有权利");
Line("Copyright XAscience & JizhouGameWorkshop All Rights Reserved");
cout<<endl;
color(240);
Line("[2/2]");
Line("S-开始游戏");
cmmd=getch();
}
while(cmmd!='P'&&cmmd!='p'){
color(240);
system("cls");
rightLine("**时间:"+Gettime());
cout<<endl<<endl;
if(!sh) rightLine("未登录XZ L-登录");
else rightLine(nam+",欢迎您!");
color(249);
Line(" 首页");
cout<<endl<<endl<<endl;
LinE(" 等级:");
if(vip==1&&hj>=1){
while(hj>0){
sum*=2.5;
sum=(int)sum+0.5;
hj--;
}
}
if(sum==0) op=1;
if(sum>0&&sum<=10) op=2;
if(sum>10&&sum<=20) op=3;
if(sum>20&&sum<=100) op=4;
if(sum>100&&sum<=150) op=5;
if(sum>150&&sum<=1000) op=6;
if(sum>1000) op=7;
if(op==1||op==2){
color(252);
cout<<"Lv"<<op;
}
if(op==3||op==4){
color(246);
cout<<"Lv"<<op;
}
if(op==5||op==6||op==7){
color(249);
cout<<"Lv"<<op;
}
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" F-单人游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" G-多人游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" O-小游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<"Q-等级规则";
color(240);
cout<<" ";
color(143);
cout<<" X-设置 ";
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<<" P-退出 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
color(246);
if(vip==0) Line("100等级积分兑VIP会员 得积分3倍 K-兑换");
else Line("已是VIP会员");
color(240);
cout<<" "<<endl<<endl;
cout<<" XACRAFT 行走 1.5 Copyright XAScience & JizhouGameWorkshop Don't distribute!"<<endl<<endl;
if(!vip){
cout<<" __________________________________________________________________"<<endl;
cout<<" | VIP关闭此广告|"<<endl;
cout<<" | |"<<endl;
cout<<" | YOUKU 优酷VIP 15th |"<<endl;
cout<<" | |"<<endl;
cout<<" | 你的热爱正在热播 |"<<endl;
cout<<" | 广告|"<<endl;
cout<<" -------------------------------------------------------------------";
}
cmmd=getch();
if(cmmd=='X'||cmmd=='x'){
}
if(vip==0){
if(cmmd=='K'||cmmd=='k'){
color(240);
system("cls");
if(sum>=100){
Color_Line("VIP兑换成功!",246);
sum-=100;
vip=1;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}else{
if(sh){
Color_Line("余额不足!",252);
cout<<endl<<endl;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}
if(!sh){
color(252);
Line("未登录!");
cout<<endl<<endl<<" V-登录XZ"<<endl<<endl;
Color_Line("[按其他任意键退出]",249);
cmmd=getch();
if(cmmd=='V'||cmmd=='v') XZLogin();
cmmd='?';
}
}
}
}
if(cmmd=='H'||cmmd=='h'){
color(240);
system("cls");
hj+=0.1;
color(246);
if(vip){
LinE(nam+",V");
cout<<op<<"会员:"<<endl;
if(op==1){
cout<<" __________________________________________"<<endl;
cout<<" |////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==2){
cout<<" __________________________________________"<<endl;
cout<<" |//////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==3){
cout<<" __________________________________________"<<endl;
cout<<" |////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==4){
cout<<" __________________________________________"<<endl;
cout<<" |//////////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==5){
cout<<" __________________________________________"<<endl;
cout<<" |////////////////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==6){
cout<<" __________________________________________"<<endl;
cout<<" |//////////////////////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==7){
cout<<" __________________________________________"<<endl;
cout<<" |//////////////////////////////////////////|"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
cout<<endl<<endl;
if(nam.empty()) rightLine(nam+",已是VIP会员");
}else{
cout<<endl;
if(!nam.empty()) rightLine(nam+",还不是VIP会员");
}
cout<<endl<<endl;
Line("VIP权益");
cout<<endl<<endl;
cout<<" ______ ______ ______"<<endl;
cout<<" | +| | - | | |"<<endl;
cout<<" | 积分 | | AD | |···|"<<endl;
cout<<" | | | | | |"<<endl;
cout<<" -------- -------- --------"<<endl;
cout<<" 积分翻倍 跳过广告 敬请期待"<<endl;
cout<<endl<<endl<<endl<<endl;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}
if(cmmd=='O'||cmmd=='o'){
long long minn,maxn;
double n;
color(240);
system("cls");
Color_Line("输入随机数的最小值、最大值:",252);
for(;;){
cin>>minn>>maxn;
if(maxn!=0) break;
}
system("cls");
Color_Line("随机数",252);
Sleep(1000);
for(i=1;i<150;i++){
srand((int)time(NULL));
long long ans=minn+rand()%(maxn-minn+1);
color(249);
cout<<"随机数:"<<ans<<endl<<"程序已执行"<<i<<"/150次"<<endl<<"等待时间:(单位:秒)";
cin>>n;
Sleep(n*1000);
}
srand((int)time(NULL));
long long ans=minn+rand()%(maxn-minn+1);
color(249);
cout<<"随机数:"<<ans<<endl<<"程序已执行150/150次";
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='T'||cmmd=='t'){
system("cls");
Color_Line("编程网站",249);
cout<<endl<<endl<<endl;
Color_Line("请保证您连接了互联网,否则将无法进入编程网站",249);
Sleep(1500);
cout<<endl<<endl;
color(252);
int temp_browser;
Line("1-问答 2-网站 3-编程平台 其他键退出");
cout<<endl<<endl;
temp_browser=getch();
if(temp_browser==1) system("start https://wenda.codingtang.com");
if(temp_browser==2) system("start https://newcourse.codingtang.com/#/login");
if(temp_browser==3) system("start https://kuding1024.com/#/login");
else{
cout<<endl<<endl<<endl<<endl;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}
}
if(cmmd=='Q'||cmmd=='q'){
system("cls");
color(249);
Line("等级规则");
cout<<endl<<endl<<endl<<endl;
LinE("当前等级积分:"+sum);
cout<<endl<<endl;
Line("Lv1:等级积分等于0");
cout<<endl;
Line("Lv2:等级积分大于0,小于等于10");
cout<<endl;
Line("Lv3:等级积分大于10,小于等于20");
cout<<endl;
Line("Lv4:等级积分大于20,小于等于100");
cout<<endl;
Line("Lv5:等级积分大于100,小于等于150");
cout<<endl;
Line("Lv6:等级积分大于150,小于等于1000");
cout<<endl;
Line("Lv7:等级积分大于1000");
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='F'||cmmd=='f'){
if(jiandang){
color(7);
cun(1);
cmmd='?';
}else{
system("cls");
color(252);
system("cls");
Line("我的存档");
cout<<endl;
Color_Line("新的世界",240);
cout<<endl<<endl;
color(240);
LinE("输入种子:");
nw(1);
cun(1);
cmmd='?';
jiandang=1;
}
}
if(cmmd=='G'||cmmd=='g'){
color(240);
system("cls");
sum++;
hj+=0.3;
color(249);
Line("非常抱歉");
cout<<endl;
cout<<" 因为XACRAFT**组未能掌握联机游戏的技术,所以暂时不能体验多人游戏,给 "<<endl;
cout<<" 您带来不便,敬请谅解!";
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(sh==0) if(cmmd=='L'||cmmd=='l') XZLogin();
if(cmmd=='J'||cmmd=='j'){
color(240);
system("cls");
color(249);
Line("新手教程");
cout<<endl;
Line(" 注:以下键位操作大小写皆可");
cout<<endl;
Line(" W-上移一格 A-左移一格 S-下移一格 D-右移一格");
cout<<endl;
Line(" J-打开/关闭**模式");
cout<<endl;
Line(" YUIHKBNM 依次为:**左上角,上方,右上角,左边,右边,左下角,下方,右下角的方块");
cout<<endl;
Line(" 游戏区域的正下方会统计您**的方块");
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='#'){
color(240);
system("cls");
Line("除错模式");
cout<<endl;
color(252);
Line(" 注:本模式仅供XACRAFT内部人员使用,如果您不是XACRAFT技术人员,在使用XACRAFT");
cout<<"除错模式后因操作不当出现问题,兴安科技和极昼工坊将不承担任何责任。"<<endl;
cout<<"方块外观:";
for(i=1;i<36;i++) print(i);
color(252);
cout<<endl<<"方块UI值:";
for(i=1;i<36;i++) printf("%02d",i);
cout<<endl<<endl;
color(249);
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
}
Sleep(1000);
return;
}
int main(){
console();
Logical_Lock();
denglu();
return 0;
}
0
许孟星
新手光能
新手光能
试试这个↓
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
bool jiandang,kn,sh,vip;
string nam,pas,pfd="XZ",comd,ckpf[10001];
int a[20][5][256][2049],hand[20][50],x[20]={0},y[20],i,j,seed,ckpfs=1,sum,op;
double hj;
char cmmd;
void console(){
HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut,&bInfo);
SetConsoleTitle("XACRAFT 1.5 简体中文版");
return;
}
void color(int corcorcor){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
return;
}
bool kd(char ccc){
if(!KEY_DOWN(ccc)) return 0;
else return 1;
}
int rdm(int aa,int bb){
return rand()%(bb-aa+1)+aa;
}
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;
}
string Gettime(){
time_t timep;
time(&timep);
char tmp[64];
strftime(tmp,sizeof(tmp),"%Y年%m月%d日",localtime(&timep));
return tmp;
}
void rightLinE(string str){
int i,l=str.length(),w=80;
for(i=0;i<w-l;i++) cout<<" ";
cout<<str;
return;
}
void rightLine(string str){
rightLinE(str);
cout<<endl;
return;
}
void LinE(string str){
int i,l=str.length(),w=80;
for(i=0;i<(w-l)/2;i++) cout<<" ";
cout<<str;
return;
}
void Line(string str){
LinE(str);
cout<<endl;
return;
}
void Color_Line(string str,int Color_Number){
color(Color_Number);
Line(str);
return;
}
bool end_day(){
string tmp=GetTime(),temp="20210801";
if(tmp>=temp) return 1;
else return 0;
}
bool fool_days(){
string tmp=getTime();
if(tmp=="0401") return 1;
else return 0;
}
void Logical_Lock(){
if(fool_days()){
color(252);
system("cls");
cout<<endl;
Line("抱 歉");
cout<<endl<<endl;
Color_Line("出于特殊原因,XACRAFT已停止更新,非常抱歉。",240);
Sleep(2500);
}
else if(end_day()){
color(252);
system("cls");
cout<<endl;
Line("XACRAFT 版本过低");
cout<<endl<<endl;
Color_Line("您现在使用的XACRAFT 1.0已于2021年8月1日过期,请更新至最新版本!",240);
Sleep(2500);
}
return;
}
int print(int cor){
if(cor==1){
color(170);
printf("▇");
}
if(cor==2){
color(34);
printf("▇");
}
if(cor==3){
color(136);
printf("▇");
}
if(cor==4){
color(102);
printf("▇");
}
if(cor==6){
color(96);
printf("WO");
}
if(cor==7){
color(139);
printf("∷");
}
if(cor==8){
color(142);
printf("∷");
}
if(cor==9){
color(207);
printf("AP");
}
if(cor==10){
color(239);
printf("GA");
}else{
color(255);
cout<<" ";
}
}
void LoginXZ(){
char c,ch;
Log:
color(252);
system("cls");
Color_Line("登录XZ账号 --- Login XZ",507);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("L-登录 M-退出",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("没有账号? R-注册",242);
c=getch();
system("cls");
if(c=='L'||c=='l'){
color(240);
system("cls");
ifstream fin("XZ账户.xzdata");
fin>>nam>>pas;
fin.close();
Color_Line("输入密码(不可修改)",507);
cout<<endl;
Color_Line("用户名:"+nam,252);
cout<<endl;
string pass;
while(ch=_getch()!=13){
pass+=ch;
cout<<"*";
}
if(pass!=pas){
system("cls");
cout<<endl;
Line("抱歉!输入密码错误!请重新登录!(三秒钟后返回)");
Sleep(3000);
goto Log;
}
sh=1;
return;
}
if(c=='R'||c=='r'){
color(240);
system("cls");
Color_Line("注册XZ账号 --- Register XZ",507);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("G-注册一个XZ账号 H-读取你的XZ账号",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("已有账号? D-登录",242);
c=getch();
if(c=='D'||c=='d') goto Log;
if(c=='H'||c=='h'){
color(240);
system("cls");
Color_Line("读取XZ账号 --- Read XZ",507);
cout<<endl<<endl;
Color_Line("使用提示:请将XZ建立的“存档.xzdata”文件复制到您保存的文件根目录下:",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("G-读取存档",249);
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
Color_Line("已有账号? D-登录",242);
c=getch();
if(c=='G'||c=='g'){
ifstream fin("存档.txt");
int ll;
fin>>ll;
fin>>ll;
fin>>nam;
fin>>ll;
fin>>nam;
fin.close();
string t,q;
color(240);
system("cls");
Color_Line("设置密码",507);
cout<<endl;
color(252);
cin>>t;
system("cls");
Color_Line("再输入一次密码",507);
cout<<endl;
color(252);
cin>>q;
if(t!=q){
system("cls");
Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
Sleep(3000);
goto Log;
}
else pas=t;
return;
}
}if(c=='D'||c=='d') goto Log;
if(c=='G'||c=='g'){
color(240);
system("cls");
Color_Line("设置用户名",507);
cout<<endl;
color(252);
cin>>nam;
string t,q;
system("cls");
Color_Line("设置密码",507);
cout<<endl;
color(252);
cin>>t;
system("cls");
Color_Line("再输入一次密码",507);
cout<<endl;
color(252);
cin>>q;
if(t!=q){
system("cls");
Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
Sleep(3000);
goto Log;
}else pas=t;
return;
}
}
if(c=='M'||c=='m') goto Logok;
else goto Log;
Logok:;
return;
}
void XZLogin(){
LoginXZ();
ofstream fout("XZ账户.xzdata");
fout<<nam<<endl<<pas;
fout.close();
return;
}
int nw(int com){
sum+=2;
for(i=0;i<2048;i++) for(j=1;j<256;j++) a[com][1][j][i]=0;
for(i=1;i<51;i++) hand[com][i]=0;
int ke=0;
cin>>seed;
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+1;
a[com][1][tot][top]=1;
a[com][1][tot-1][top]=4;
a[com][1][tot-2][top]=4;
a[com][1][tot-3][top]=4;
for(j=tot-4;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){
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;
}
}
}
for(i=1;i<2049;i++){
for(j=1;j<17;j++){
if(a[com][1][j][i]==3){
int uuu=rdm(1,1000);
if(uuu<=5) a[com][1][j][i]=7;
}
}
for(j=4;j<33;j++){
if(a[com][1][j][i]==3){
int uuu=rdm(1,1000);
if(uuu<=10) a[com][1][j][i]=8;
}
}
for(j=1;j<257;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){
sum+=5;
hj+=0.5;
color(7);
while(cmmd!='P'&&cmmd!='p'){
system("cls");
for(i=min(256,x[com]+10);i>=max(0,x[com]-10);i--){
for(j=max(y[com]-19,0);j<=min(y[com]+19,2048);j++){
if(i!=x[com]||j!=y[com]) print(a[com][1][i][j]);
else{
color(240);
cout<<pfd;
}
}
cout<<endl;
}
color(7);
printf("状态栏 >> 坐标: x:%d y:%d ",x[com],y[com]);
cout<<"后位方块:";
print(a[com][1][x[com]][y[com]]);
color(7);
cout<<" **模式:";
if(kn) cout<<"开启";
else cout<<"关闭";
cout<<" P-退出至标题画面"<<" **时间:"<<Gettime()<<endl;
cout<<" ";
for(i=1;i<51;i++) if(hand[com][i]>0) print(i);
color(7);
cout<<endl<<" ";
for(i=1;i<51;i++) if(hand[com][i]>0) printf("%02d",hand[com][i]);
cmmd=getch();
if(cmmd=='/'){
color(240);
system("cls");
bool flag=0;
Color_Line("命令(输入esc退出)",249);
while(comd!="esc"){
cout<<"/";
cin>>comd;
if(comd=="tp"){
cout<<"/tp @s ";
cin>>i>>j;
flag=1;
x[com]=i;
y[com]=j;
comd="esc";
}
if(!flag) cout<<"语法错误!"<<endl;
}
comd="?";
}
if(cmmd=='W'||cmmd=='w') x[com]++;
if(cmmd=='S'||cmmd=='s') x[com]--;
if(cmmd=='A'||cmmd=='a') y[com]--;
if(cmmd=='D'||cmmd=='d') y[com]++;
if(cmmd=='J'||cmmd=='j') kn=!kn;
if(kn){
if(cmmd=='Y'||cmmd=='y'){
hand[com][a[com][1][x[com]+1][y[com]-1]]++;
a[com][1][x[com]+1][y[com]-1]=0;
}
if(cmmd=='U'||cmmd=='u'){
hand[com][a[com][1][x[com]+1][y[com]]]++;
a[com][1][x[com]+1][y[com]]=0;
}
if(cmmd=='I'||cmmd=='i'){
hand[com][a[com][1][x[com]+1][y[com]+1]]++;
a[com][1][x[com]+1][y[com]+1]=0;
}
if(cmmd=='H'||cmmd=='h'){
hand[com][a[com][1][x[com]][y[com]-1]]++;
a[com][1][x[com]][y[com]-1]=0;
}
if(cmmd=='K'||cmmd=='k'){
hand[com][a[com][1][x[com]][y[com]+1]]++;
a[com][1][x[com]][y[com]+1]=0;
}
if(cmmd=='B'||cmmd=='b'){
hand[com][a[com][1][x[com]-1][y[com]-1]]++;
a[com][1][x[com]-1][y[com]-1]=0;
}
if(cmmd=='N'||cmmd=='n'){
hand[com][a[com][1][x[com]-1][y[com]]]++;
a[com][1][x[com]-1][y[com]]=0;
}
if(cmmd=='M'||cmmd=='m'){
hand[com][a[com][1][x[com]-1][y[com]+1]]++;
a[com][1][x[com]-1][y[com]+1]=0;
}
}
}
return 0;
}
void denglu(){
while(cmmd!='G'&&cmmd!='g'){
color(240);
system("cls");
cout<<endl;
Line("XACRAFT 行走 1.5");
cout<<endl<<endl;
Color_Line(" **组团队",249);
cout<<endl;
color(240);
Line("创意/营销/策划 王子逸");
Line("核心程序/外观设计 沙宸安");
Line("小部分思路 冮 欢");
cout<<endl;
Color_Line("特别鸣谢名单",249);
cout<<endl;
color(240);
Line(" 注:以下排名不分先后");
cout<<endl;
Line("吴庞茂旭 武 建 豪 刘 英 杰 杜 文 博 侯 平 仄");
Line("欧阳语聪 张 帆 赵 逸 凡 赵 奕 帆 陈 曦");
Line("许 金 夫 江 齐 悦 王 文 博 宣 海 宁 王 子 耀");
Line("陈 喆 鹏 包 涵 宇 潘 孝 宇");
cout<<endl;
Color_Line("注:所有在鸣谢名单上的人可以申请移出,达到光能级别及以上的人可以申请加入。",252);
cout<<endl;
color(240);
Line("[1/2]");
Line("G-切换到下页");
cmmd=getch();
}
while(cmmd!='S'&&cmmd!='s'){
color(240);
system("cls");
cout<<endl;
Line("XACRAFT 行走 1.5");
cout<<endl<<endl;
color(249);
Line(" 本版本更新内容");
cout<<endl;
color(240);
Line("这是XACRAFT的第1个版本");
Line("本版本更新内容如下:");
cout<<endl;
Line("随机地形生成");
Line("**方块统计");
Line("存档登录");
Line("等级");
Line("VIP");
cout<<endl;
Color_Line("XACRAFT**组团队预祝您游玩愉快!",252);
cout<<endl;
color(249);
Line("版权声明");
cout<<endl;
color(240);
Line("本游戏由兴安科技与极昼游戏工坊联合制作");
Line("版权所有 未经授权严禁转载 保留所有权利");
Line("Copyright XAscience & JizhouGameWorkshop All Rights Reserved");
cout<<endl;
color(240);
Line("[2/2]");
Line("S-开始游戏");
cmmd=getch();
}
while(cmmd!='P'&&cmmd!='p'){
color(240);
system("cls");
rightLine("**时间:"+Gettime());
cout<<endl<<endl;
if(!sh) rightLine("未登录XZ L-登录");
else rightLine(nam+",欢迎您!");
color(249);
Line(" 首页");
cout<<endl<<endl<<endl;
LinE(" 等级:");
if(vip==1&&hj>=1){
while(hj>0){
sum*=2.5;
sum=(int)sum+0.5;
hj--;
}
}
if(sum==0) op=1;
if(sum>0&&sum<=10) op=2;
if(sum>10&&sum<=20) op=3;
if(sum>20&&sum<=100) op=4;
if(sum>100&&sum<=150) op=5;
if(sum>150&&sum<=1000) op=6;
if(sum>1000) op=7;
if(op==1||op==2){
color(252);
cout<<"Lv"<<op;
}
if(op==3||op==4){
color(246);
cout<<"Lv"<<op;
}
if(op==5||op==6||op==7){
color(249);
cout<<"Lv"<<op;
}
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" F-单人游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" G-多人游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<" O-小游戏 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" ";
color(143);
cout<<"Q-等级规则";
color(240);
cout<<" ";
color(143);
cout<<" X-设置 ";
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<<" P-退出 ";
color(240);
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
color(246);
if(vip==0) Line("100等级积分兑VIP会员 得积分3倍 K-兑换");
else Line("已是VIP会员");
color(240);
cout<<" "<<endl<<endl;
cout<<" XACRAFT 行走 1.5 Copyright XAScience & JizhouGameWorkshop Don't distribute!"<<endl<<endl;
if(!vip){
cout<<" __________________________________________________________________"<<endl;
cout<<" | VIP关闭此广告|"<<endl;
cout<<" | |"<<endl;
cout<<" | YOUKU 优酷VIP 15th |"<<endl;
cout<<" | |"<<endl;
cout<<" | 你的热爱正在热播 |"<<endl;
cout<<" | 广告|"<<endl;
cout<<" -------------------------------------------------------------------";
}
cmmd=getch();
if(cmmd=='X'||cmmd=='x'){
}
if(vip==0){
if(cmmd=='K'||cmmd=='k'){
color(240);
system("cls");
if(sum>=100){
Color_Line("VIP兑换成功!",246);
sum-=100;
vip=1;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}else{
if(sh){
Color_Line("余额不足!",252);
cout<<endl<<endl;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}
if(!sh){
color(252);
Line("未登录!");
cout<<endl<<endl<<" V-登录XZ"<<endl<<endl;
Color_Line("[按其他任意键退出]",249);
cmmd=getch();
if(cmmd=='V'||cmmd=='v') XZLogin();
cmmd='?';
}
}
}
}
if(cmmd=='H'||cmmd=='h'){
color(240);
system("cls");
hj+=0.1;
color(246);
if(vip){
LinE(nam+",V");
cout<<op<<"会员:"<<endl;
if(op==1){
cout<<" __________________________________________"<<endl;
cout<<" |////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==2){
cout<<" __________________________________________"<<endl;
cout<<" |//////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==3){
cout<<" __________________________________________"<<endl;
cout<<" |////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==4){
cout<<" __________________________________________"<<endl;
cout<<" |//////////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==5){
cout<<" __________________________________________"<<endl;
cout<<" |////////////////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==6){
cout<<" __________________________________________"<<endl;
cout<<" |//////////////////////////////////// |"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
if(op==7){
cout<<" __________________________________________"<<endl;
cout<<" |//////////////////////////////////////////|"<<endl;
cout<<" ------------------------------------------"<<endl;
cout<<" V 1 2 3 4 5 6 7";
}
cout<<endl<<endl;
if(nam.empty()) rightLine(nam+",已是VIP会员");
}else{
cout<<endl;
if(!nam.empty()) rightLine(nam+",还不是VIP会员");
}
cout<<endl<<endl;
Line("VIP权益");
cout<<endl<<endl;
cout<<" ______ ______ ______"<<endl;
cout<<" | +| | - | | |"<<endl;
cout<<" | 积分 | | AD | |···|"<<endl;
cout<<" | | | | | |"<<endl;
cout<<" -------- -------- --------"<<endl;
cout<<" 积分翻倍 跳过广告 敬请期待"<<endl;
cout<<endl<<endl<<endl<<endl;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}
if(cmmd=='O'||cmmd=='o'){
long long minn,maxn;
double n;
color(240);
system("cls");
Color_Line("输入随机数的最小值、最大值:",252);
for(;;){
cin>>minn>>maxn;
if(maxn!=0) break;
}
system("cls");
Color_Line("随机数",252);
Sleep(1000);
for(i=1;i<150;i++){
srand((int)time(NULL));
long long ans=minn+rand()%(maxn-minn+1);
color(249);
cout<<"随机数:"<<ans<<endl<<"程序已执行"<<i<<"/150次"<<endl<<"等待时间:(单位:秒)";
cin>>n;
Sleep(n*1000);
}
srand((int)time(NULL));
long long ans=minn+rand()%(maxn-minn+1);
color(249);
cout<<"随机数:"<<ans<<endl<<"程序已执行150/150次";
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='T'||cmmd=='t'){
system("cls");
Color_Line("编程网站",249);
cout<<endl<<endl<<endl;
Color_Line("请保证您连接了互联网,否则将无法进入编程网站",249);
Sleep(1500);
cout<<endl<<endl;
color(252);
int temp_browser;
Line("1-问答 2-网站 3-编程平台 其他键退出");
cout<<endl<<endl;
temp_browser=getch();
if(temp_browser==1) system("start https://wenda.codingtang.com");
if(temp_browser==2) system("start https://newcourse.codingtang.com/#/login");
if(temp_browser==3) system("start https://kuding1024.com/#/login");
else{
cout<<endl<<endl<<endl<<endl;
Color_Line("[按任意键退出]",249);
cmmd=getch();
cmmd='?';
}
}
if(cmmd=='Q'||cmmd=='q'){
system("cls");
color(249);
Line("等级规则");
cout<<endl<<endl<<endl<<endl;
LinE("当前等级积分:"+sum);
cout<<endl<<endl;
Line("Lv1:等级积分等于0");
cout<<endl;
Line("Lv2:等级积分大于0,小于等于10");
cout<<endl;
Line("Lv3:等级积分大于10,小于等于20");
cout<<endl;
Line("Lv4:等级积分大于20,小于等于100");
cout<<endl;
Line("Lv5:等级积分大于100,小于等于150");
cout<<endl;
Line("Lv6:等级积分大于150,小于等于1000");
cout<<endl;
Line("Lv7:等级积分大于1000");
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='F'||cmmd=='f'){
if(jiandang){
color(7);
cun(1);
cmmd='?';
}else{
system("cls");
color(252);
system("cls");
Line("我的存档");
cout<<endl;
Color_Line("新的世界",240);
cout<<endl<<endl;
color(240);
LinE("输入种子:");
nw(1);
cun(1);
cmmd='?';
jiandang=1;
}
}
if(cmmd=='G'||cmmd=='g'){
color(240);
system("cls");
sum++;
hj+=0.3;
color(249);
Line("非常抱歉");
cout<<endl;
cout<<" 因为XACRAFT**组未能掌握联机游戏的技术,所以暂时不能体验多人游戏,给 "<<endl;
cout<<" 您带来不便,敬请谅解!";
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(sh==0) if(cmmd=='L'||cmmd=='l') XZLogin();
if(cmmd=='J'||cmmd=='j'){
color(240);
system("cls");
color(249);
Line("新手教程");
cout<<endl;
Line(" 注:以下键位操作大小写皆可");
cout<<endl;
Line(" W-上移一格 A-左移一格 S-下移一格 D-右移一格");
cout<<endl;
Line(" J-打开/关闭**模式");
cout<<endl;
Line(" YUIHKBNM 依次为:**左上角,上方,右上角,左边,右边,左下角,下方,右下角的方块");
cout<<endl;
Line(" 游戏区域的正下方会统计您**的方块");
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='#'){
color(240);
system("cls");
Line("除错模式");
cout<<endl;
color(252);
Line(" 注:本模式仅供XACRAFT内部人员使用,如果您不是XACRAFT技术人员,在使用XACRAFT");
cout<<"除错模式后因操作不当出现问题,兴安科技和极昼工坊将不承担任何责任。"<<endl;
cout<<"方块外观:";
for(i=1;i<36;i++) print(i);
color(252);
cout<<endl<<"方块UI值:";
for(i=1;i<36;i++) printf("%02d",i);
cout<<endl<<endl;
color(249);
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
}
Sleep(1000);
return;
}
int main(){
console();
Logical_Lock();
denglu();
return 0;
}
0
0
0
0
0
0
0
0
0
0
0
李宜和
高级启示者
高级启示者
@王文博
试试这个
#include<iostream>
#include<fstream>
#include<windows.h>
#include<**tdio>
#include<**t**ng>
#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 name** std;
bool jiandang[21];//建立存档
st**ng nam,pas;
void console()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut, &bInfo );
SetConsoleTitle("XACRAFT 3.0 简体中文版"); // 设置窗口的标题
}
struct han{
int ui,num;
}hand[21][50],rl[51];
struct pflist{
int num;
han k[101];
han sum;
}lis[10001],rlis[10001];
st**ng tecpas,tecnam,tecpin;
char ch;
int er**rtimes=0;
st**ng pfd="XZ";//皮肤
long long **=100;//金币数量
int a[21][5][256][2049],x[21]={0},y[21],ran[21],xuanze=0,lisn,rlisn,rln;
int days[21],tims[21],chuancan;
int i,j,kkk;
bool kn=0;
char cmmd;
st**ng comd;
int seed;
bool bpf[6];
st**ng pfs[6]={"XZ","XA","GD","MC","卍","∞"};
int pfp[6]={0,50,50,100,150,300},sehao=240;
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){
SetConsoleTextAtt**bute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
bool kd(char ccc){
if(!KEY_DOWN(ccc)) ret**n 0;
else ret**n 1;
}
int rdm(int aaaaa,int bbbbb){
ret**n rand()%(bbbbb-aaaaa+1)+aaaaa;
}
void cls(){//赟刑道提供,如有侵权请联系删除。
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coordScreen = { 0, 0 }; // home for the c**sor
SetConsoleC**sorPosition( hConsole, coordScreen );
}
char gl(){
if(kd('Q')) ret**n 'Q';
if(kd('W')) ret**n 'W';
if(kd('E')) ret**n 'E';
if(kd('R')) ret**n 'R';
if(kd('T')) ret**n 'T';
if(kd('Y')) ret**n 'Y';
if(kd('U')) ret**n 'U';
if(kd('I')) ret**n 'I';
if(kd('O')) ret**n 'O';
if(kd('P')) ret**n 'P';
if(kd('A')) ret**n 'A';
if(kd('S')) ret**n 'S';
if(kd('D')) ret**n 'D';
if(kd('F')) ret**n 'F';
if(kd('G')) ret**n 'G';
if(kd('H')) ret**n 'H';
if(kd('J')) ret**n 'J';
if(kd('K')) ret**n 'K';
if(kd('L')) ret**n 'L';
if(kd('Z')) ret**n 'Z';
if(kd('X')) ret**n 'X';
if(kd('C')) ret**n 'C';
if(kd('V')) ret**n 'V';
if(kd('B')) ret**n 'B';
if(kd('N')) ret**n 'N';
if(kd('M')) ret**n 'M';
if(kd('1')) ret**n '1';
if(kd('2')) ret**n '2';
if(kd('3')) ret**n '3';
if(kd('4')) ret**n '4';
if(kd('5')) ret**n '5';
if(kd('6')) ret**n '6';
if(kd('7')) ret**n '7';
if(kd('8')) ret**n '8';
if(kd('9')) ret**n '9';
if(kd('0')) ret**n '0';
}
st**ng getTime(){//该函数如需借鉴请先联系沙兴安
time_t timep;
time (&timep);
char tmp[**];
strftime(tmp, sizeof(tmp), "%m%d",localtime(&timep) );
ret**n tmp;
}
st**ng GetTime(){//该函数如需借鉴请先联系沙兴安
time_t timep;
time (&timep);
char tmp[**];
strftime(tmp, sizeof(tmp), "%Y%m%d",localtime(&timep) );
ret**n tmp;
}
int change_num(st**ng will_change){//该函数如需借鉴请先联系沙兴安
st**ngstream sin;
sin<<will_change;
int change_ok;
sin>>change_ok;
ret**n change_ok;
}
void **ghtLine(st**ng str){//该函数如需借鉴请先联系沙兴安
int i,l,w;
w=80;
l=str.len**();
for(i=0;i<80-l;i++)
cout<<" ";
cout<<str<<endl;
ret**n ;
}
void Line(st**ng str){//该函数如需借鉴请先联系沙兴安
int i,l,w;
w=80;
l=str.len**();
for(i=0;i<(w-l)/2;i++)
cout<<" ";
cout<<str<<endl;
ret**n ;
}
void line(st**ng str){//该函数如需借鉴请先联系沙兴安
int i,l,w;
w=80;
l=str.len**();
for(i=0;i<(w-l)/2;i++)
cout<<" ";
cout<<str;
ret**n ;
}
void jjsc(st**ng str,int cor){//该函数如需借鉴请先联系沙兴安
**("cls");
color(cor);
**("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;
ret**n ;
}
}
}
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;
ret**n ;
}
}
for(i=1;i<=50;i++){
if(hand[ccc][i].ui==0){
hand[ccc][i].ui=uiui;
hand[ccc][i].num=numm;
ret**n ;
}
}
}
void HideC**sor1(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_C**SOR_INFO C**sorInfo;
GetConsoleC**sorInfo(handle, &C**sorInfo);//获取控制台光标**
C**sorInfo.bVisible = false; //隐藏控制台光标
SetConsoleC**sorInfo(handle, &C**sorInfo);//设置控制台光标状态
}
//逻辑锁部分(始)
bool end_day(){
st**ng tmp=GetTime(),temp="20220601";
if(tmp>=temp) ret**n 1;
else ret**n 0;
}
bool fool_days(){
st**ng tmp=getTime();
if(tmp=="0401") ret**n 1;
else ret**n 0;
}
//逻辑锁部分(终)
//TEC
void lin(st**ng str){//该函数如需借鉴请先联系沙兴安
int i,l,w;
w=80;
l=str.len**();
for(i=0;i<(w-l)/2;i++)
cout<<" ";
cout<<str;
ret**n ;
}
void nameline(st**ng str){
int i,l,w;
w=50;
l=str.len**();
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<<"|";
ret**n ;
}
void passline(st**ng str){
int i,l,w;
w=50;
l=str.len**();
for(i=0;i<(w-l)/2-1;i++)
cout<<" ";
for(i=0;i<str.len**();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<<"|";
ret**n ;
}
bool Login_getpass(){
er**rtimes=0;
cp:;
if(er**rtimes>=3){
color(13);
cout<<endl;
lin("错误次数过多,登录失败!");
Sleep(3000);
color(7);
ret**n 0;
}
tecpin="";
ch=0;
while(ch!=13){
**("cls");
color(14);
cout<<endl;
lin("登录 TEC 账号");
p**ntf("\n\n\n\n\n\n");
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
color(11);
nameline("欢迎回来,"+tecnam);
cout<<endl;
lin("==================================================");
p**ntf("\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.len**()-1);
tecpin=tecpin.substr(0,tecpin.len**()-1);
}
}
st**ngstream in1;
in1<<tecpin;
in1>>tecpin;
if(tecpin!=tecpas){
cout<<endl;
color(12);
lin("密码错误");
er**rtimes++;
Sleep(1500);
goto cp;
}
**("cls");
ret**n 1;
}
void getnam(){
tecpin="";
ch=0;
while(ch!=13){
**("cls");
color(14);
cout<<endl;
lin("注册 TEC 账号");
p**ntf("\n\n\n\n\n\n");
color(10);
cout<<" >>用户名";
color(15);
cout<<" {请输入}";
if(tecpin.len**()>45){
color(12);
cout<<" 用户名过长";
tecpin=tecpin.substr(0,tecpin.len**()-1);
}
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
nameline(tecpin);
cout<<endl;
lin("==================================================");
p**ntf("\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.len**()-1);
tecpin=tecpin.substr(0,tecpin.len**()-1);
}
}
**("cls");
st**ngstream in1;
in1<<tecpin;
in1>>tecnam;
if(tecnam.len**()==0) getnam();
ret**n ;
}
void getpas(){
tecpin="";
ch=0;
while(ch!=13){
**("cls");
color(14);
cout<<endl;
lin("注册 TEC 账号");
p**ntf("\n\n\n\n\n\n");
color(10);
cout<<" >>用户名 输入完成 √";
color(7);
cout<<endl;
lin("==================================================");
cout<<endl;
cout<<" |";
nameline(tecnam);
cout<<endl;
lin("==================================================");
p**ntf("\n\n\n");
color(10);
cout<<" >>密码";
color(15);
cout<<" {请输入}";
if(tecpin.len**()>45){
color(12);
cout<<" 密码过长";
tecpin=tecpin.substr(0,tecpin.len**()-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.len**()-1);
tecpin=tecpin.substr(0,tecpin.len**()-1);
}
}
**("cls");
tecpas=tecpin;
if(tecpas.len**()==0) getpas();
ret**n ;
}
void TEClogin(){
ifstream fin("TEC账户.tecdata");
fin>>tecnam>>tecpas;
fin.close();
if(tecnam.len**()!=0 && tecpas.len**()!=0){
if(Login_getpass()==0){
i=0;
cout<<0/i;
}
ret**n ;
}
getnam();
getpas();
ofstream fout("TEC账户.tecdata");
fout<<tecnam<<endl<<tecpas;
fout.close();
ret**n ;
}
//TEC
void sav(){
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<<**<<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;
}
fout<<sehao;
fout.close();
}
void rea(){
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>>**;
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];
}
fin>>sehao;
fin.close();
}
void checkcun(){
ifstream fin("XACRAFT存档文件.xadata");
fin>>i;
fin.close();
if(i!=0) ret**n ;
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<<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<<240;
fout.close();
ret**n ;
}
void ppf(int cor){
color(cor);
cout<<pfd;
color(7);
}
void Logical_Lock(){//该函数如需借鉴请先联系沙兴安
if(fool_days()){
**("cls");
color(252);
**("cls");
cout<<endl;
Line("抱 歉");
cout<<endl<<endl;
color(240);
Line("出于特殊原因,XACRAFT已停止更新,非常抱歉。");
cmmd=getch();
int fk=0;
cout<<fk/fk;
}
if(end_day()){
**("cls");
color(252);
**("cls");
cout<<endl;
Line("XACRAFT 版本过低");
cout<<endl<<endl;
color(240);
Line("您现在使用的XACRAFT 3.0已于2022年6月1日过期,请更新至最新版本!");
cmmd=getch();
int fk=0;
cout<<fk/fk;
}
ret**n ;
}
st**ng w**(int cor){
/* if(cor==){
ret**n "";
}else*/
if(cor==2){
ret**n "**";
}else if(cor==1){
ret**n "叶";
}else if(cor==9){
ret**n "头";
}else if(cor==8){
ret**n "土";
}else if(cor==7){
ret**n "橡木";
}else if(cor==6){
ret**n "矿石";
}else if(cor==5){
ret**n "矿石";
}else if(cor==4){
ret**n "坏苹果";
}else if(cor==3){
ret**n "好苹果";
}else if(cor==2){
ret**n "沙";
}else if(cor==10){
ret**n "岩";
}else if(cor==11){
ret**n "雪";
}else if(cor==12){
ret**n "仙";
}else if(cor==13){
ret**n "白桦";
}else if(cor==14){
ret**n "HelloWorld";
}else if(cor==15){
ret**n "木板";
}else if(cor==16){
ret**n "木板";
}else if(cor==17){
ret**n "木棍";
}else if(cor==18){
ret**n "岩浆";
}else if(cor==29){
ret**n "矿石";
}else if(cor==20){
ret**n "煤";
}else if(cor==21){
ret**n "锭";
}else if(cor==24){
ret**n "钻石块";
}else if(cor==25){
ret**n "煤炭";
}else if(cor==26){
ret**n "金搞头";
}else if(cor==27){
ret**n "钻头";
}else if(cor==28){
ret**n "幸运方块";
}else if(cor==29){
ret**n "你猜";
}else{
ret**n "欧力给方块";
}
}
int p**nt(int cor){
/* if(cor==){//
color();
cout<<"";
}else*/
if(cor==1){
color(170);//**方块
p**ntf(" ");
}else if(cor==2){
color(**);//树叶
p**ntf(" ");
}else if(cor==3){
color(**);//石头
p**ntf(" ");
}else if(cor==4){
color(191);//泥土
p**ntf(" ");
}else if(cor==6){
color(139);//橡木
p**ntf(" ");
}else if(cor==7){
color(15);//钻石矿石
p**ntf(" ");
}else if(cor==8){
color(128);//黄金矿石
p**ntf(" ");
}else if(cor==9){
color(126);//苹果
p**ntf(" ");
}else if(cor==10){
color(**);//金苹果
p**ntf(" ");
}else if(cor==11){
color(31);//沙子
p**ntf(" ");
}else if(cor==12){
color(112);//砂岩
p**ntf(" ");
}else if(cor==13){
color(32);//雪块
p**ntf(" ");
}else if(cor==14){
color(127);//仙人掌
p**ntf(" ");
}else if(cor==15){
color(239);//白桦木
p**ntf(" ");
}else if(cor==16){
color(238);
cout<<" ";
}else if(cor==17){//橡木木板
color(239);
cout<<" ";
}else if(cor==18){//白桦木板
color(207);
cout<<" ";
}else if(cor==19){//木棍堆
color(chuancan+6);
cout<<" ";
}else if(cor==20){//熔炉
color(142);
cout<<" ";
}else if(cor==21){//煤矿石
color(139);
cout<<" ";
}else if(cor==22){//煤炭
color(chuancan);
cout<<" ";
}else if(cor==23){//金锭
color(chuancan+14);
cout<<"▃";
}else if(cor==24){//钻石
color(chuancan+11);
cout<<"▃";
}else if(cor==25){//煤炭块
color(**);
cout<<"□";
}else if(cor==26){//金块
color(102);
cout<<"□";
}else if(cor==27){//钻石块
color(136);
cout<<"□";
}else if(cor==28){//云杉原木
color(34);
cout<<" ";
}else if(cor==29){//云杉木板
color(170);
cout<<" ";
}else{
color(chuancan);//空气
cout<<" ";
}
}
void lists(){
bpf[0]=1;
lisn=14,rlisn=3,rln=8;
//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;
ret**n ;
}
void p**nt_packback(int com,int xuanz){
color(7);
cout<<endl<<"\t\t\t ";
for(i=1;i<=9;i++){
if(hand[com][i].num!=0){
p**nt(hand[com][i].ui);
}else{
cout<<"□";
}
color(7);
p**ntf(" ");
}
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<=**) p**ntf("%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);
p**ntf(" ");
}
color(7);
cout<<endl<<"\t\t\t ";
for(i=10;i<=18;i++){
color(7);
if(hand[com][i].num!=0){
p**nt(hand[com][i].ui);
}else{
cout<<"□";
}
color(7);
p**ntf(" ");
}
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<=**) p**ntf("%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);
p**ntf(" ");
}
color(7);
cout<<endl<<"\t\t\t ";
for(i=19;i<=27;i++){
color(7);
if(hand[com][i].num!=0){
p**nt(hand[com][i].ui);
}else{
cout<<"□";
}
color(7);
p**ntf(" ");
}
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<=**) p**ntf("%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);
p**ntf(" ");
}
}
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)){
ret**n false;
}
}
for(int oooo=1;oooo<=50;oooo++){
if(uiui==hand[ccc][oooo].ui){
ret**n true;
}
}
ret**n 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;
}
ret**n 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='?';
**("cls");
color(14);
Line("工作台");
p**nt_packback(com,-1);
cout<<endl;
Line("W/S-切换 Q-合成 E-退出");
color(10);
Line(w**(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<<" × ";
}
p**nt(lis[i].sum.ui);
color(7);
cout<<"*";
p**ntf("%02d",lis[i].sum.num);
color(7);
cout<<" = ";
p**nt(lis[i].k[1].ui);
color(7);
cout<<"*";
p**ntf("%02d",lis[i].k[1].num);
for(j=2;j<=lis[i].num;j++){
color(7);
cout<<"+";
p**nt(lis[i].k[j].ui);
color(7);
cout<<"*";
p**ntf("%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='?';
ret**n ;
}
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;
}
ret**n flag;
}
void f**nace(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='?';
**("cls");
color(14);
Line("熔炉");
p**nt_packback(com,-1);
cout<<endl;
Line("W/S-切换 Q-冶炼 R-添加燃料 E-退出");
cout<<" 燃料:"<<ran[com]<<endl;
color(10);
Line(w**(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<<" × ";
}
p**nt(rlis[i].sum.ui);
color(7);
cout<<"*";
p**ntf("%02d",rlis[i].sum.num);
color(7);
cout<<" = ";
p**nt(rlis[i].k[1].ui);
color(7);
cout<<"*";
p**ntf("%02d",rlis[i].k[1].num);
for(j=2;j<=rlis[i].num;j++){
color(7);
cout<<"+";
p**nt(rlis[i].k[j].ui);
color(7);
cout<<"*";
p**ntf("%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'){
**("cls");
color(14);
Line("添加燃料");
p**nt_packback(com,-1);
cout<<endl;
Line("W/S-切换 Q-添加 E-退出");
color(7);
cout<<" 燃料:"<<w**(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<<" × ";
}
p**nt(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='?';
ret**n ;
}
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='?';
**("cls");
color(14);
Line("背包");
p**nt_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'){
**("cls");
color(14);
Line("选择您需要交换的物品1 (Q-确认 P-退出)");
p**nt_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'){
**("cls");
color(14);
Line("选择您需要交换的物品2 (Q-确认 P-退出)");
p**nt_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') f**nace(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;
}
}
ret**n ;
}
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;
ret**n ;
}
}
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;
ret**n ;
}
}
}
ret**n ;
}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) f**nace(ccc);
ret**n ;
}
dq='2';
}
void LoginXZ(){
char c;
Log:
**("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();
**("cls");
if(c=='L' || c=='l'){
ifstream fin("XZ账户.xzdata");
fin>>nam>>pas;
fin.close();
color(14);
Line("输入密码");
color(12);
Line("用户名:"+nam);
color(7);
st**ng pass1;
int i=0;
char ch;
while ((ch=_getch())!=13)
{
pass1+=ch;
cout<<"*";
}
if(pass1!=pas){
**("cls");
Line("抱歉!输入密码错误!请重新登录!(三秒钟后返回)");
goto Log;
}
ret**n ;
}
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'){
**("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();
st**ng s1,s2;
**("cls");
color(14);
Line("设置密码");
color(7);
cin>>s1;
**("cls");
color(14);
Line("再输入一次密码");
color(7);
cin>>s2;
if(s1!=s2){
**("cls");
Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
goto Log;
}
pas=s1;
ret**n ;
}else goto Log;
}
else if(c=='G' || c=='g'){
**("cls");
color(14);
Line("设置用户名");
color(7);
cin>>nam;
st**ng s1,s2;
**("cls");
color(14);
Line("设置密码");
color(7);
cin>>s1;
**("cls");
color(14);
Line("再输入一次密码");
color(7);
cin>>s2;
if(s1!=s2){
**("cls");
Line("抱歉!输入密码错误!请重新注册!(三秒钟后返回)");
goto Log;
}
pas=s1;
ret**n ;
}
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();
ret**n ;
}
void buybf(){
int xuanz=0;
while(cmmd!='M' && cmmd!='m'){
**("cls");
color(12);
Line("购买皮肤");
color(7);
cout<<" 您有金币:"<<**<<"个"<<endl;
for(int i=0;i<6;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(**>=pfp[xuanz]){
**=**-pfp[xuanz];
bpf[xuanz]=1;
pfd=pfs[xuanz];
}
}
if(xuanz>=6) xuanz=0;
}
}
void buycor(){
int xuanz=0;
while(cmmd!='M' && cmmd!='m'){
**("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()//本市最繁华的商城
{
**("cls");
color(7);
**("cls");
chuancan=0;
int xxx=10,yyy=10;
while(!(xxx==16 && yyy==16)){
**("cls");
for(i=0;i<21;i++){
cout<<" ";
color(7);
for(j=0;j<21;j++){
if(i==xxx && j==yyy){
ppf(sehao);
}else p**nt(shop[i][j]);
}
color(7);
cout<<endl;
}
cout<<" 您有金币:"<<**<<"个"<<" "<<"WASD-移动 站在图例格子上即可触发功能";
cout<<endl<<" ";
p**nt(6);
color(7);
cout<<" - 切换皮肤";
cout<<" ";
p**nt(15);
color(7);
cout<<" - 切换颜色";
cout<<endl<<" ";
p**nt(28);
color(7);
cout<<" - 客服服务(需要洛谷账号)";
cout<<" ";
p**nt(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;
**("start https://www.luogu.com.cn/chat?uid=541826");
}
}
sav();
}
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;
**("cls");
color(252);
**("cls");
Line("我的存档");
color(240);
Line("新的世界");
cout<<endl<<endl;
line("输入种子: ");
color(7);
cin>>comd;
seed=change_num(comd);
comd="?";
srand((unsi**ed)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<=**;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) **+=5;
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);
p**ntf("▓");
}
/*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]){
p**nt(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);
p**ntf(">>状态栏 坐标: x:%d y:%d ",x[com],y[com]);
cout<<"后位方块:";
p**nt(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(" "+w**(hand[com][xuanze].ui)+" ");
color(7);
cout<<"\t\t\t ";
for(i=1;i<=9;i++){
color(7);
if(hand[com][i].num!=0){
p**nt(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<=**) p**ntf("%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<<" ";
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]--;
}
if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]!=0){
y[com]--;
}
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]++;
}
if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]!=0){
y[com]++;
}
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='?';
ret**n 0;
}
void fm(){
while(cmmd!='G' && cmmd!='g'){
**("cls");
color(240);
**("cls");
cout<<endl;
Line("XACRAFT 3.0");
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'){
**("cls");
color(240);
**("cls");
cout<<endl;
Line("XACRAFT 3.0");
cout<<endl<<endl;
color(249);
Line(" 本版本更新内容\n");
color(240);
Line("这是XACRAFT的第3个版本");
Line("本版本更新内容如下:");
cout<<endl;
Line("昼夜**更新");
Line("物品栏更新");
Line("工作台、熔炉更新");
cout<<endl;
color(252);
Line(" XACRAFT**组团队预祝您游玩愉快!\n");
color(249);
Line(" 版权声明\n");
color(240);
Line("本游戏由兴安科技与极昼游戏工坊联合制作");
Line("版权所有 未经授权严禁转载 保留所有权利");
Line("Copy**ght XAscience & JizhouGameWorkshop All Rights Reserved");
cout<<endl;
color(240);
Line("[2/2]");
Line("S-开始游戏");
cmmd=getch();
}
while(cmmd!='O' && cmmd!='o'){
**("cls");
color(240);
**("cls");
if(tecnam.empty()) **ghtLine("未登录TEC账号 L-登录");
else **ghtLine(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.0 Copy**ght XAscience & JizhouGameWorkshop Do not dist**bute!";
cmmd=getch();
if(cmmd=='F' || cmmd=='f'){
while(cmmd!='P' && cmmd!='p'){
**("cls");
color(252);
**("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'){
**("cls");
color(252);
**("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();
**("cls");/*
color(12);
Line("XACRAFT存档异常退出");
color(7);
cout<<endl<<" 如您跳转到此界面,可能是因为您在使用XACRAFT存档的过程中未进行字符读入(或字符读入已执行但被清除),请输入任意内容,**按Enter键即可退出XACRAFT存档";
cin>>comd;
**("cls");*/
}
}
if(cmmd=='H' || cmmd=='h'){
**("cls");
color(252);
**("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{
**("cls");
color(252);
**("cls");
Line("我的存档");
color(240);
Line("新的世界");
cout<<endl<<endl;
line("输入种子: ");
color(7);
nw(1);
cun(1);
cmmd='?';
jiandang=1;
}
*/
}
cmmd='?';
}
if(cmmd=='G' || cmmd=='g'){
**("cls");
color(252);
**("cls");
Line("XACRAFT Community");
cout<<endl;
color(240);
Line("请保证您连接了互联网,否则将无法进入XACRAFT Community。");
**("start https://www.luogu.com.cn/team/35439");
cout<<endl<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
if(cmmd=='H' || cmmd=='h') shang();
if(cmmd=='L' || cmmd=='l') TEClogin();
if(cmmd=='J' || cmmd=='j'){
**("cls");
color(240);
**("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') **("start https://do**.qq.com/doc/D**txU0RzeFF1UFFn");
cmmd='?';
}
if(cmmd=='#'){
**("cls");
color(12);
**("cls");
Line("除错模式");
cout<<endl;
color(7);
Line("注:本模式仅供XACRAFT内部人员使用,如果您不是XACRAFT技术人员,在使用XACRAFT除错模式后因**作不当出现问题,兴安科技和极昼工坊将不承担任何责任。");
cout<<endl<<endl;
cout<<"方块外观:";
for(i=1;i<=35;i++){
p**nt(i);
color(7);
}
color(7);
cout<<endl<<"方块UI值:";
for(i=1;i<=35;i++){
if(i%2==1) color(9);
p**ntf("%02d",i);
color(7);
}
cout<<endl<<endl<<endl;
Line("[按任意键退出]");
cmmd=getch();
cmmd='?';
}
}
Sleep(1000);
ret**n ;
}
int main(){
console();
HideC**sor1();
Logical_Lock();
lists();
checkcun();
rea();
fm();
sav();
ret**n 0;
}
0
0
0
0
曹灿阳
初级天翼
初级天翼
游戏体验很好,解决了XAcraft2.0里面很多问题(不是bug,例如无法采摘苹果,看到一个金苹果只能干着急)
曹灿阳在2021-08-02 09:45:49追加了内容
发现bug:打开熔炉,完成熔炼以后,退出熔炉时,就动不了了!此时只能点右上角的"X",这样无法存档!
另:HW(Hello World)是什么方块?我还没见过!
@沙宸安
曹灿阳在2021-08-02 09:48:06追加了内容
你说的新生物群戏是什么?
@沙宸安 @兴安科技开发组官方
0
0