c++小游戏之文字版MC

话不多说,直接上代码!

#include<bits/stdc++.h>
#include<unistd.h>
#include<time.h>
#include<conio.h>
#include<Windows.h>
using namespace std;
string pd,zhilin,name,gname,wqm="手",hjm="空";
long long mz=0,shui=0,yanjiang=0,hys=0/*黑曜石*/,xjhj = 0,mdzy=0,yugan=0,pingguo=0,zsj[5]={0,0,0,0,0},tg,zs=0,tk=0,jk=0,lbs=0,dyt=0,hjnx=-1,hjz=0,jingpingguo=0,xxx=0,pg=0,s=20,ssx,csg=1,yu=0,wq=0,gjz=csg+wq,t,z=0,l=0,x=0,y=60,u,sy=2,dy=1,fms=0,jez=20,kfl=5,wjl=1,mb=0,mt=0,mg=0,zhongzi[4]={0,0,0,0},st=0,td=0,jd=0,wqnj=0,nj,jy=0,dj,jyzy=10,gtdj=0,gtnj=0,ftnj,tks=0,jks=0,mty=0,ysy[7]={0,0,0,0,0,0,0},yq=20,hsd=0,zk=1,mm,hb=0,hjj[8]={0,0,0,0,0,0,0,0},hjnj=0,wqq;
bool fmr=0,cldt=0,bydt=0,cly=0,tp=1,gk=0,zlld=0,zlsd=0;//附魔室开关
char k,a,c;
char dg;
int sb;
void js();//僵尸
void xb();//小白
void klp();//苦力怕
void xh();//小黑
void jszr();//僵尸猪人
void py();//平原
void mx();//冒险
int kk();//挖矿
void dd();//等待
int wk();// 挖矿2
void xl();//血量判断
void myl();//末影龙
void dl();//凋零
void dgw(string names,int b,int g,int j,int jyyy);//打怪
void zy();//字幕
void sh();//钓鱼
void sd();//商店
void bb();//背包
void jh();//交换
void cl();
void cd();//菜单
void wqgj();//武器工具
void wqy();//武器
void gzt();//工作台
void qt();//其它
void sjy();//升级
void home();//回家
void gjy();//工具
void rly();//熔炉
void czy();//村庄
void ldfd();
void xsjc();
void by();
void xhy();
void xby();
void hjy();
void tf();
void xj();

void js()
{
	gname="僵尸";
	dgw(gname,20,2,6,10);
}
void jszr()
{
	gname="僵尸猪人";
	dgw(gname,25,3,7,13);
}
void xb()
{
	gname="小白";
	dgw(gname,20,4,10,20);
}
void klp()
{
	gname="苦力怕";
	dgw(gname,20,0,30,30);
}
void xh()
{
	gname="小黑";
	dgw(gname,30,5,35,35);
}
void myl()
{
	gname="末影龙";
	dgw(gname,200,15,1,1);
}
void myl2()
{
	gname="末影龙(满状态)";
	dgw(gname,300,20,100,1);
}
void myl3()
{
	gname="末影龙(半虚弱)";
	dgw(gname,250,18,50,1);
}
void dl()
{
	gname="凋零";
	dgw(gname,300,50,1000,1);
}
void mysj()
{
	gname="末影水晶";
	dgw(gname,5,10,1,1000);
}
void qyb()
{
	gname="潜影贝";
	dgw(gname,30,12,10,10);
}
void swz()
{
	gname="海底守卫者";
	dgw(gname,20,10,70,10);
}
void ygswz()
{
	gname="远古守卫者";
	dgw(gname,80,12,100,5);
}
void tf()
{
	while(1)
	{
		cout<<"屠夫:你好,你要购买什么?"<<endl<<"0.离开 1.皮革 (1煤炭) 2.1绿宝石 (1条鱼)";
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			if(mt>=1)
			{
				mt--;
				pg++;
				cout<<"购买成功\n";
				system("pause");
			}
			else
			{
				cout<<"煤炭不够了\n";
				system("pause");
			}
		}
	}
}
void hjy()
{
	while(1)
	{
		system("cls");
		cout<<"你要合成什么护甲?(护甲需要到背包自行装备)(材料*24)\n0.离开 1.皮革套装 2.铁套装 3.金套装 4.钻石套装 5.下界合金套装\n";
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			if(pg>=24)
			{
				hjj[0]++;
				pg-=24;
				cout<<"合成成功\n";
				system("pause");
			}
			else
			{
				cout<<"合成失败\n";
				system("pause");
			}
		}
		else
		if(a=='2')
		{
			if(td>=24)
			{
				hjj[1]++;
				td-=24;
				cout<<"合成成功\n";
				system("pause");
			}
			else
			{
				cout<<"合成失败\n";
				system("pause");
			}
		}
		else
		if(a=='3')
		{
			if(jd>=24)
			{
				hjj[2]++;
				jd-=24;
				cout<<"合成成功\n";
				system("pause");
			}
			else
			{
				cout<<"合成失败\n";
				system("pause");
			}
		}
		else
		if(a=='4')
		{
			if(z>=24)
			{
				hjj[3]++;
				z-=24;
				cout<<"合成成功\n";
				system("pause");
			}
			else
			{
				cout<<"合成失败\n";
				system("pause");
			}
		}
		else
		if(a=='5')
		{
			if(xjhj>=24)
			{
				hjj[8]++;
				xjhj-=24;
				cout<<"合成成功\n";
				system("pause");
			}
			else
			{
				cout<<"合成失败\n";
				system("pause");
			}
		}
	}
}
void xby()
{
	while(1)
	{
		system("cls");
		cout<<"是否继续探宝?\n0.退出 1.继续(火把*1)\n";
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			if(hb>0)
			{
				hb-1;
				int j=rand()%6;
				if(j==0)
				{
					int p=rand()%60;
					mty+=p;
					cout<<"获得煤炭"<<p<<"颗"<<endl;
					Sleep(500);
				}
				if(j==1)
				{
					int p=rand()%150;
					st+=p;
					cout<<"获得石头"<<p<<"个"<<endl;
					Sleep(500);
				}
				if(j==2)
				{
					int p=rand()%90;
					jd+=p;
					cout<<"获得金矿"<<p<<"个"<<endl;
					Sleep(500);
				}
				if(j==3)
				{
					int p=rand()%60;
					td+=p;
					cout<<"获得铁矿"<<p<<"个"<<endl;
					Sleep(500);
				}
				if(j==4)
				{
					int p=rand()%45;
					z+=p;
					cout<<"获得钻石"<<p<<"颗"<<endl;
					Sleep(500);
				}
				if(j==5)
				{
					int p=rand()%60;
					l+=j;
					cout<<"获得绿宝石"<<p<<"颗"<<endl;
					Sleep(500);
				}
			}
			else
			{
				cout<<"你的火把不够了。\n";

			}
		}
	}
}
void  ts()
{
	while(1)
	{
		cout<<"是否继续? 1.是 2.否"<<endl;
		a=getchar();
		if(a=='1')
		{
			system("cls");
			int x=rand()%4;
			if(x==0)
			{
				system("cls");
				cout<<"恭喜你,找到了"<<x*9<<"块金锭"<<endl;
				jd+=27;
				Sleep(500);
			}
			else
			{
				int v=rand()%2;
				if(v==0)
				{
					system("cls");
					cout<<"你找到了"<<2*x<<"块石头"<<endl;
					st+=2*x;
					Sleep(500);
				}
				else
				{
					system("cls");
					cout<<"你找到了"<<x<<"个木板"<<endl;
					mb+=x;
					Sleep(500);
				}
			}
		}
		else if(a=='2')
		{
			system("cls");
			break;
		}
	}
}
void hdsd()
{
	cout<<"发现海底神庙,是否进入?(有丰厚的奖励!) 1.是 2.否\n";
	a=getchar();
	if(a=='1')
	{
		system("cls");
		cout<<"温馨提示:在海底神殿里有很多怪物,请确认做好准备再进入!(占领即可使用)\n1.进入\n2.离开";
		a=getch();
		if(a=='1')
		{
			if(zlsd==0)
			{
			system("cls");
			cout<<"你来到了神殿口,一群海底守卫者冲了上来。\n";
			Sleep(1000);
			system("cls");
			swz();
			swz();
			swz();
			swz();
			swz();
			cout<<"你进入了中心,有一群远古守卫者来了。\n";
			Sleep(1000);
			system("cls");
			ygswz();
			ygswz();
			ygswz();
			cout<<"你已经占领了海底神殿。\n";
			zlsd=1;
			system("pause");
			}
			else
			{
				while(1)
				{
					system("cls");
					cout<<"欢迎来到海底神殿,你要干什么?\n1.挂机(刷经验) 2.探索海洋\n 3.离开";
					a=getch();
					if(a=='1')
					{
					time_t c_start, t_start, c_end, t_end;
					c_start = clock();
					t_start = time(NULL);
					cout << "正在挂机按下任意键停止" << endl;
					_getch();
					c_end = clock();
					t_end = time(NULL);
					cout << "你获得" << (int)difftime(c_end, c_start) / 10 << "经验" << endl;
					jy+= (int)difftime(c_end, c_start) / 10;
					sjy();
					system("pause");
					}
					if(a=='2')
					{
						ts();
					}
					if(a=='3')
					{
					break;
					}
				}
			}
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void xhy()
{
	yq=10;
	hsd=0;
	while(1)
	{
		system("cls");
		cout<<"潜水中,请注意氧气剩余量:"<<yq<<" 潜水深度:"<<hsd<<endl<<"0.离开 1.下潜 2.上浮 3.水肺药水 加5氧气(剩余:"<<ysy[6]<<") 3.建造补给站 200木板,50铁锭,氧气2 (当深度达到这里时,氧气加满)\n";
		for(int i=0;i<yq;i++)
		{
			cout<<".";
		}
		cout<<endl;
		a=getch();
		if(a=='0')
		{
			if(hsd==0)
			{
				break;
			}
			else
			{
				cout<<"请先浮出水面。\n";
				system("pause");
			}
		 }
		 else
		 if(a=='1')
		 {
		 	hsd++;
		 	t=rand()%20;
		 	if(t==0)
		 	{
		 		hdsd();
			}
		 }
		 else
		 if(a=='2')
		 {
		 	hsd--;
		 	if(hsd<0) hsd = 0;
		 	t=rand()%20;
		 	if(t==0)
		 	{
		 		hdsd();
			}
		 }
		 yq--;
		 if(hsd>=1)
		 {
		 	cout<<"你呛水了,还剩"<<s<<"滴血。\n";
		 	yq=0;
		 	s--;
		 	xl();
		 	system("pause");
		 }
	}
}
void by()
{

	if(bydt==1)
	{
		while(1)
		{
			system("cls");
			cout<<"欢迎来到冰原!你要去干什么?\n0.离开 1.下海 2.出海 ";
			if(gk==0)
			{

			}
				cout<<"3搭建钓鱼台 4.钓鱼\n";
			a=getch();
			if(a=='0')
			{
				system("cls");
				break;
			}
			else
			if(a=='1')
			{
				system("cls");
				xhy();
			}
			else
			if(a=='2')
			{
				int ch=rand();
				for(int i=0;i<1;i++)
				{
					cout<<"寻宝中......";
					usleep(900000);
					if(ch%2==0)
					{
						jd+=1;
						cout<<"你找到了1个金锭"<<endl;
						cout<<endl;
						cout<<endl;
						Sleep(1000);
						system("cls");
					}
					if(ch%3==0)
					{
						td+=2;
						cout<<"你找到了2个铁锭"<<endl;
						cout<<endl;
						cout<<endl;
						Sleep(1000);
						system("cls");
					}
					if(ch%11==0)
					{
						zs=rand()%6;
						z+=zs;
						tk=rand()%6;
						td+=tk;
						jk=rand()%6;
						jd+=jk;
						lbs=rand()%13;
						l+=lbs;
						jingpingguo+=2;
						cout<<"你找到了宝藏:钻石"<<zs<<"个,铁锭"<<tk<<"个,金锭"<<jk<<"个,绿宝石"<<lbs<<"个,金苹果2个!"<<endl;
						cout<<endl;
						cout<<endl;
						Sleep(1000);
						system("cls");
					}
					if(ch%5==0)
					{
						z++;
						cout<<"你找到了1个钻石"<<endl;
						cout<<endl;
						cout<<endl;
						Sleep(1000);
						system("cls");
					}
					else
					{
						cout<<"你什么也没找到"<<endl;
						cout<<endl;
						cout<<endl;
						Sleep(1000);
						system("cls");
					}
				}
			}
			else
			if(a=='3')
			{
				cout<<"是否花费10铁,50木板搭建钓鱼台? 1.是 2.否";
				a=getch();
				if(a=='1')
				{
					if(td>=10&&mb>=50)
					{
						dyt==1;
						td-=10;
						mb-=50;
						cout<<"购买成功!";
						Sleep(1000);
						system("cls");
					}
				}
			}
			else
			if(a=='4')
			{
				if(dyt=1)
				{
					if(ftnj>0)
					{
						ftnj--;
					}
					else
					{
						kfl=5;
					}
					time_t c_start, t_start, c_end, t_end;
					c_start = clock();
					t_start = time(NULL);
					cout << "正在钓鱼,按下任意键停止" << endl;
					_getch();
					c_end = clock();
					t_end = time(NULL);
					cout << "你获得" << (int)difftime(c_end, c_start) / (1000*kfl) << "鱼" << endl;
					yu+= (int)difftime(c_end, c_start) / (1000*kfl);
					Sleep(1000);
				}
			}
		}
	}else
	{
		cout<<"请先在村庄购买通往冰原的地图\n";
		system ("pause");
	}
}
void xsjc()
{
	while(1)
	{
		system("cls");
		cout<<"请问你要查看什么方面的教程?\n0.退出 1.工具 2.挖矿 3.砍树 4.战斗 5.交易 6.耐久 7.背包 8.作者\n";
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			cout<<"武器:增加一定的攻击值。\n镐子:等级越高,能采集的矿物种类就越多。\n斧子:加快砍树的速度。\n";
			system("pause");
		}
		else
		if(a=='2')
		{
			cout<<"挖矿需要使用镐子,否则就没有掉落物。在挖矿时有几率遇见怪物。\n";
			system("pause");
		}
		else
		if(a=='3')
		{
			cout<<"砍树时间越长,获得木头越多。\n";
			system("pause");
		}
		else
		if(a=='4')
		{
			cout<<"如果遇见怪物就会进入战斗。在战斗中可以攻击,逃跑和药水。在被动遇见怪物时无法逃跑,药水需要在村庄牧师处购买。\n";
			system("pause");
		}
		else
		if(a=='5')
		{
			cout<<"交易可以在村庄进行。村庄偶尔会遭到劫掠,如果打败劫掠就会得到村民的丰厚回报。\n";
			system("pause");
		}
		else
		if(a=='6')
		{
			cout<<"在游戏中,武器、镐子、斧子和护甲都是有耐久的,当耐久为0时效果消失。\n";
			system("pause");
		}
		else
		if(a=='7')
		{
			cout<<"在大多数的界面都是可以打开背包界面的,按e即可开启背包界面。\n";
			system("pause");
		}
		else
		if(a=='8')
		{
			cout<<"作者:你坤gie,一本通账号ptsxlzyroot(小号)(如有转载请告知) QQ:3580538807(欢迎骚扰) 微信:没有……\n";
			system("pause");
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void ldfd()
{
	system("cls");
	cout<<"温馨提示:在林地府邸里有很多怪物,请确认做好准备再进入!(占领即可使用)\n1.进入\n2.离开";
	a=getch();
	if(a=='1')
	{
		if(zlld==0)
		{
			system("cls");
			cout<<"你来到了大门口,一群卫道士冲了上来。\n";
			Sleep(1000);
			system("cls");
			dgw("卫道士",20,8,10,20);
			dgw("卫道士",20,8,10,20);
			dgw("卫道士",20,8,10,20);
			dgw("卫道士",20,8,10,20);
			system("cls");
			cout<<"你进入了大厅,有一群唤魔者来了。\n";
			Sleep(1000);
			system("cls");
			dgw("唤魔者",30,7,10,20);
			dgw("唤魔者",30,7,10,20);
			dgw("唤魔者",30,7,10,20);
			dgw("唤魔者",30,7,10,20);
			cout<<"又有一群怪物来了。\n";
			Sleep(1000);
			system("cls");
			js();
			js();
			xb();
			xb();
			klp();
			klp();
			xh();
			xh();
			cout<<"你已经占领了林地府邸。\n";
			zlld=1;
			system("pause");
		}
		else
		{
			while(1)
			{
				system("cls");
				cout<<"欢迎来到林地府邸,你要干什么?\n1.挂机(刷经验) 2.寻宝/n 3.离开";
				a=getch();
				if(a=='1')
				{
					time_t c_start, t_start, c_end, t_end;
					c_start = clock();
					t_start = time(NULL);
					cout << "正在挂机按下任意键停止" << endl;
					_getch();
					c_end = clock();
					t_end = time(NULL);
					cout << "你获得" << (int)difftime(c_end, c_start) / 10 << "经验" << endl;
					jy+= (int)difftime(c_end, c_start) / 10;
					sjy();
					system("pause");
				}
				else
				if(a=='2')
				{
					xby();
				}
				else
				if(a=='3')
				{
					return;
				}
			}
		}
	}
	else
	if(a=='e')
	{
		bb();
	}
}
void czy()
{
	int tttt=rand()%10;
	if(tttt==0)
	{
		cout<<"这个村庄正在遭到劫掠,你是否出手相助?\n1.相助\n2.离开";
		a=getch();
		if(a=='1')
		{
			dgw("劫掠者",20,6,100,50);
			dgw("劫掠者",20,6,100,50);
			dgw("劫掠者",20,6,100,50);
			dgw("劫掠者",20,6,100,50);
			dgw("劫掠兽",100,10,100,50);
			cout<<"村民们都很感谢你,给你了很多绿宝石\n";
			l+=100;
			system ("pause");
		}
		else
		{
			cout<<"你悄悄地回了家";
			cd();
			system ("pause");
		}
	}
	while(1)
	{
		system("cls");
		cout<<"你要去找谁?\n0.离开\n1.制图师\n2.牧师\n3.屠夫";
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			while(1)
			{
				system("cls");
				if(name!="Nouth"&&name!="LRZ")
				cout<<"制图师:你好,请问你要买什么?\n0.离开\n1.通往从林的地图 100绿宝石\n2.通往冰原的地图 100绿宝石\n";
				else
				cout<<"制图师:"<<name<<"大人,你好。\n0.离开\n1.通往从林的地图 50绿宝石\n2.通往冰原的地图 50绿宝石\n";
				a=getch();
				if(a=='0')
				{
					break;
				}
				else
				if(a=='1')
				{
					if(cldt==1)
					{
						cout<<"你已经买过这件物品了\n";
						system ("pause");
					}
					else
					if(l<100)
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
					else
					{
						cout<<"购买成功\n";
						l-=100;
						cldt=1;
						system ("pause");
					}
				}
				else
				if(a=='2')
				{
					if(bydt==1)
					{
						cout<<"你已经买过这件物品了\n";
						system ("pause");
					}
					else
					if(l<100)
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
					else
					{
						cout<<"购买成功\n";
						l-=100;
						bydt=1;
						system ("pause");
					}
				}
			}
		}
		else
		if(a=='2')
		{
			while(1)
			{
				system("cls");
				if(zk==1)
				cout<<"牧师:你好,请问你要买什么?\n0.离开\n1.治疗药水I:血量加5 20绿宝石\n2.治疗药水II:血量加10 30绿宝石\n3.治疗药水III:血量加15 40绿宝石\n4.伤害药水I:敌人血量减5 10绿宝石\n5.伤害药水II:敌人血量减10 15绿宝石\n6.伤害药水III:敌人血量减15 20绿宝石\n7.水肺药水:恢复5氧气 5绿宝石\n8.水 10绿宝石\n9.岩浆 20绿宝石\n";
				else
				cout<<"牧师:你好Nouth大人,请问你要买什么?\n0.离开\n1.治疗药水I:血量加5 10绿宝石\n2.治疗药水II:血量加10 15绿宝石\n3.治疗药水III:血量加15 20绿宝石\n4.伤害药水I:敌人血量减5 5绿宝石\n5.伤害药水II:敌人血量减10 7绿宝石\n6.伤害药水III:敌人血量减15 10绿宝石\n7.水肺药水:恢复5氧气 3绿宝石\n";
				a=getch();
				if(a=='0')
				{
					break;
				}
				else
				if(a=='1')
				{
					if(l>=20)
					{
						cout<<"购买成功\n";
						l-=20/zk;
						ysy[0]++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='2')
				{
					if(l>=30)
					{
						cout<<"购买成功\n";
						l-=30/zk;
						ysy[1]++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='3')
				{
					if(l>=40)
					{
						cout<<"购买成功\n";
						l-=40/zk;
						ysy[2]++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='4')
				{
					if(l>=10)
					{
						cout<<"购买成功\n";
						l-=10/zk;
						ysy[3]++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='5')
				{
					if(l>=15)
					{
						cout<<"购买成功\n";
						l-=15/zk;
						ysy[4]++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='6')
				{
					if(l>=20)
					{
						cout<<"购买成功\n";
						l-=20/zk;
						ysy[5]++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='7')
				{
					if(l>=5)
					{
						cout<<"购买成功\n";
						l-=5/zk;
						ysy[6]++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='8')
				{
					if(l>=10)
					{
						cout<<"购买成功\n";
						l-=10/zk;
						shui++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
				else
				if(a=='9')
				{
					if(l>=20)
					{
						cout<<"购买成功\n";
						l-=20/zk;
						yanjiang++;
						system ("pause");
					}
					else
					{
						cout<<"绿宝石不够了\n";
						system ("pause");
					}
				}
			}
		}
		else
		if(a=='3')
		{
			tf();
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void rly()
{
	while(1)
	{
		system("cls");
		cout<<"煤炭:"<<mty<<endl<<"你要炼造什么?\n0.离开\n1.铁矿石(剩余"<<tks<<")\n2.金矿石(剩余"<<jks<<"个)\n";
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			cout<<"已经为你炼造了最多\n";
			if(mty<tks)
			{
				td+=mty;
				tks-=mty;
				mty=0;
			}
			else
			{
				td+=tks;
				mty-=tks;
				tks=0;
			}
			system ("pause");
		}
		else
		if(a=='2')
		{
			cout<<"已经为你炼造了最多\n";
			if(mty<jks)
			{
				jd+=mty;
				jks-=mty;
				mty=0;
			}
			else
			{
				jd+=jks;
				mty-=jks;
				jks=0;
			}
			system ("pause");
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void gjy()
{
	while(1)
	{
		system("cls");
		cout<<"0.退出 1.木镐 2.石镐 3.铁镐 4.金镐 5.钻石镐 6.木斧 7.石斧 8.铁斧 9.金斧 a.钻石斧 b.下界合金镐 c.下界合金斧"<<endl;
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			if(gtdj>1)
			{
				cout<<"你已经拥有更好的镐子了";
				system ("pause");
				gjy();
			}
			if(mb>=3&&mg>=2)
			{
				gtdj=1;
				gtnj=60;
				mb-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='2')
		{
			if(gtdj>2)
			{
				cout<<"你已经拥有更好的镐子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&st>=3)
			{
				gtdj=2;
				gtnj=132;
				st-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='3')
		{
			if(gtdj>3)
			{
				cout<<"你已经拥有更好的镐子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&td>=3)
			{
				gtdj=3;
				gtnj=251;
				td-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='4')
		{
			if(gtdj>1)
			{
				cout<<"你已经拥有更好的镐子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&jd>=3)
			{
				gtdj=1;
				gtnj=44;
				jd-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='5')
		{
			if(gtdj>4)
			{
				cout<<"你已经拥有更好的镐子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&z>=3)
			{
				gtdj=4;
				gtnj=1562;
				z-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='6')
		{
			if(kfl<4)
			{
				cout<<"你已经拥有更好的斧子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&mb>=3)
			{
				kfl=4;
				ftnj=60;
				mb-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='7')
		{
			if(kfl<3)
			{
				cout<<"你已经拥有更好的斧子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&st>=3)
			{
				kfl=3;
				ftnj=132;
				st-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='8')
		{
			if(kfl<2)
			{
				cout<<"你已经拥有更好的斧子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&td>=3)
			{
				kfl=2;
				ftnj=251;
				td-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='9')
		{
			if(kfl<4)
			{
				cout<<"你已经拥有更好的斧子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&jd>=3)
			{
				kfl=4;
				ftnj=44;
				jd-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='a')
		{
			if(kfl<1)
			{
				cout<<"你已经拥有更好的斧子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&z>=3)
			{
				kfl=1;
				ftnj=1562;
				z-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='b')
		{
			if(gtdj>7)
			{
				cout<<"你已经拥有更好的镐子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&xjhj>=3)
			{
				gtdj=7;
				gtnj=1782;
				xjhj-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='c')
		{
			if(kfl<-3)
			{
				cout<<"你已经拥有更好的斧子了";
				system ("pause");
				gjy();
			}
			if(mg>=2&&xjhj>=3)
			{
				kfl=-3;
				ftnj=1562;
				xjhj-=3;
				mg-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void home()
{
	cout<<"回家了!"<<endl;
	Sleep(500);
	s=ssx;
	cout<<"已经为你加满血了"<<endl;
	if(mz==1){
		cout<<"是否重置物品(是1 否2)\n";
		cin>>pd;
		if(pd=="1"){
			cldt=1;
			bydt=1;
			jy=999999999999999;
			dj=999999999999999;
			ssx=999999999999999;
			s=999999999999999;
			wq=9999999999;
			mt=999999999999999;
			mb=999999999999999;
			mg=999999999999999;
			mty=999999999999999;
			st=999999999999999;
			td=999999999999999;
			tks=999999999999999;
			jd=999999999999999;
			jks=999999999999999;
			z=999999999999999;
			l=999999999999999;
			xjhj=999999999999999;
			pingguo=999999999999999;
			jingpingguo=999999999999999;
			shui=999999999999999;
			yanjiang=999999999999999;
			hys=999999999999999;
			mdzy=999999999999999;
			wqm="LRZ剑";
			wqnj=999999999999999;
			gtdj=999999999999999;
			gtnj=999999999999999;
			kfl=99999;
			ftnj=999999999999999;
			ysy[0]=999999999999999;
			ysy[1]=999999999999999;
			ysy[2]=999999999999999;
			ysy[3]=999999999999999;
			ysy[4]=999999999999999;
			ysy[5]=999999999999999;
			ysy[6]=999999999999999;
			hjj[0]=999999999999999;
			hjj[1]=999999999999999;
			hjj[2]=999999999999999;
			hjj[3]=999999999999999;
			hjj[4]=999999999999999;
			hjj[5]=999999999999999;
			hjj[6]=999999999999999;
			hjj[7]=999999999999999;
			hjj[8]=999999999999999;
			hjm="LRZ甲";
			hjnx=999999999999999;
			hjz=999999999999999;
			hjnj=999999999999999;
			cout<<"重置成功\n";
		}
	}
	else if(mz==2){
		cout<<"是否重置物品(是1 否2)\n";
		cin>>pd;
		if(pd=="1"){
			cldt=1;
			bydt=1;
			jy=100;
			dj=100;
			ssx=100;
			s=100;
			wq=100;
			mt=100;
			mb=100;
			mg=100;
			mty=100;
			st=100;
			td=100;
			tks=100;
			jd=100;
			jks=100;
			z=100;
			l=100;
			xjhj=100;
			pingguo=100;
			jingpingguo=100;
			shui=100;
			yanjiang=100;
			hys=100;
			mdzy=100;
			wqnj=100;
			gtdj=100;
			gtnj=100;
			ftnj=100;
			ysy[0]=100;
			ysy[100]=100;
			ysy[2]=100;
			ysy[3]=100;
			ysy[4]=100;
			ysy[5]=100;
			ysy[6]=100;
			hjj[0]=100;
			hjj[100]=100;
			hjj[2]=100;
			hjj[3]=100;
			hjj[4]=100;
			hjj[5]=100;
			hjj[6]=100;
			hjj[7]=100;
			hjj[8]=100;
			hjnx=100;
			hjz=100;
			hjnj=100;
			cout<<"重置成功\n";
		}
	}
	system ("pause");
}
void sjy()
{
	while(jy>=jyzy)
	{
		dj++;
		jy-=jyzy;
		jyzy*=2;
		cout<<"你升级了,现等级为"<<dj<<",攻击加2,生命上限加10"<<endl;
		wq+=1,ssx+=10,s=ssx;
		Sleep(500);
	}
}
void qt()
{
	while(1)
	{
		system("cls");
		cout<<"0.退出 1.木板 2.木棍 3.火把 4.金苹果 5.黑曜石"<<endl;
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			if(mt>=1)
			{
				mb+=4;
				mt--;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='2')
		{
			if(mb>=2)
			{
				mg+=4;
				mb-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='3')
		{
			if(mg>=1&&mt>=1)
			{
				hb+=4;
				mg-=1;
				mt-=1;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='4')
		{
			if(jd>=8&&pg>=1)
			{
				jd-=8;
				pg-=1;
				jingpingguo+=1;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='5')
		{
			if(shui>=1&&yanjiang>=1)
			{
				shui--;
				yanjiang--;
				hys++;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void gj()
{
}
void wqy()
{
	while(1)
	{
		system("cls");
		cout<<"0.退出 1.木剑 2.石剑 3.铁剑 4.金剑 5.钻石剑 6.下界合金剑"<<endl;
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			if(wq>4)
			{
				cout<<"你已经拥有更好的武器了";
				system ("pause");
				wqgj();
			}
			if(mb>=2&&mg>=1)
			{
				wq=4;
				wqnj=60;
				wqm="木剑";
				mg--;
				mb-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='2')
		{
			if(wq>5)
			{
				cout<<"你已经拥有更好的武器了";
				system ("pause");
				wqgj();
			}
			if(mg>=1&&st>=2)
			{
				wq=5;
				wqnj=126;
				mg--;
				st-=2;
				wqm="石剑";
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='3')
		{
			if(wq>6)
			{
				cout<<"你已经拥有更好的武器了";
				system ("pause");
				wqgj();
			}
			if(mg>=1&&td>=2)
			{
				wq=6;
				wqnj=251;
				mg--;
				td-=2;
				wqm="铁剑";
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='4')
		{
			if(wq>4)
			{
				cout<<"你已经拥有更好的武器了";
				system ("pause");
				wqgj();
			}
			if(mg>=1&&jd>=2)
			{
				wq=4;
				wqnj=44;
				mg--;
				jd-=2;
				wqm="金剑";
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='5')
		{
			if(mg>=1&&z>=2)
			{
				if(wq>7)
				{
					cout<<"你已经有更好的武器了";
					system ("pause");
					wqgj();
				}
				wq=7;
				wqnj=1562;
				wqm="钻石剑";
				mg--;
				z-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='6')
		{
			if(mg>=1&&xjhj>=2)
			{
				if(wq>20)
				{
					cout<<"你已经有更好的武器了";
					system ("pause");
					wqgj();
				}
				wq=20;
				wqnj=1782;
				wqm="下界合金剑";
				mg--;
				xjhj-=2;
				cout<<"合成成功"<<endl;
				system ("pause");
			}
			else
			{
				cout<<"合成失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='e')
		{
			bb();
		}
		if(wq>11)
		{
			cout<<"你已经有更好的武器了";
			system ("pause");
			mx();
		}
		else
		if(zsj[0]>=1)
		{
			wq=11;
			wqnj=1562;
			wqm="锋1钻石剑";
		}
		if(wq>13)
		{
			cout<<"你已经有更好的武器了";
			system ("pause");
			mx();
		}
		else
		if(zsj[1]>=1)
		{
			wq=13;
			wqnj=1562;
			wqm="锋2钻石剑";
		}
		if(wq>15)
		{
			cout<<"你已经有更好的武器了";
			system ("pause");
			mx();
		}
		else
		if(zsj[2]>=1)
		{
			wq=15;
			wqnj=1562;
			wqm="锋3钻石剑";
		}
		if(wq>17)
		{
			cout<<"你已经有更好的武器了";
			system ("pause");
			mx();
		}
		else
		if(zsj[3]>=1)
		{
			wq=17;
			wqnj=1562;
			wqm="锋4钻石剑";
		}
		if(wq>19)
		{
			cout<<"你已经有更好的武器了";
			system ("pause");
			mx();
		}
		else
		if(zsj[5]>=1)
		{
			wq=19;
			wqnj=1562;
			wqm="锋5钻石剑";
		}
	}
}
void wqgj()
{
	while(1)
	{
		system("cls");
		cout<<"请问你要合成什么?"<<endl<<"0.退出 1.武器 2.盔甲 3.工具"<<endl;
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			wqy();
		}
		else
		if(a=='2')
		{
			hjy();
		}
		else
		if(a=='3')
		{
			gjy();
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void gzt()
{
	while(1)
	{
		system("cls");
		cout<<"请问你要合成什么类型的物品:"<<endl<<"0.退出 1.武器工具 2.家具 3.建筑 4.其它"<<endl;
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			wqgj();
		}
		else
		if(a=='2')
		{

		}
		else
		if(a=='3')
		{

		}
		else
		if(a=='4')
		{
			qt();
		}
		else
		if(a=='e')
		{
			bb();
		}
	}
}
void cl()
{
	if(cldt==0)
	{
		cout<<"请先在村庄购买通往丛林的地图\n";
		system ("pause");
		cd();
	}
	else
	{
		cly=1;
		while(1)
		{
			system("cls");
			cout<<"欢迎来到丛林!(友情提示:在这里你可以得到一些平原无法得到的东西)\n0.离开 1.挖矿 2.砍树 3.寻找林地府邸\n";
			a=getch();
			if(a=='0')
			{
				cly=0;
				break;
			}
			else
			if(a=='1')
			{
				system("cls");
				cout<<"正在搜索矿洞"<<endl;
				Sleep(2000);
				wk();
			}
			else
			if(a=='2')
			{
				system("cls");
				if(ftnj>0)
				{
					ftnj--;
				}
				else
				{
					kfl=5;
				}
				time_t c_start, t_start, c_end, t_end;
				c_start = clock();
				t_start = time(NULL);
				cout << "正在砍树,按下任意键停止" << endl;
				_getch();
				c_end = clock();
				t_end = time(NULL);
				cout << "你获得" << (int)difftime(c_end, c_start) * kfl << "木头" << endl;
				mt+= (int)difftime(c_end, c_start) * kfl;
				pingguo+=mt/5;
				system("pause");
			}
			else
			if(a=='3')
			{
				ldfd();
			}
			else
			if(a=='e')
			{
				bb();
			}
		}
	}
}
void bh3z()
{

}
void py()
{
	while(1)
	{
		tp=1;
		system("cls");
		cout<<"欢迎来到平原!你可以:"<<endl<<"0.离开 1.搜寻小麦种子(暂时没用) 2.砍树 3.刷怪 4.挖矿"<<endl;
		char pyy=getch();
		if(pyy=='0')
		{
			break;
		}
		else
		if(pyy=='1')
		{
			while(1)
			{
				system("cls");
				Sleep(1000);
				t=rand()%10;
				cout<<"获得小麦种子"<<t<<"个"<<endl;
				zhongzi[0]+=t;
				cout<<"你要退出吗?(按0)"<<endl;
				pyy=getch();
				if(pyy=='0')
				{
					break;

				}
				else
				{
					continue;
				}
			}
		}
		else
		if(pyy=='2')
		{
			system("cls");
			if(ftnj>0)
			{
				ftnj--;
			}
			else
			{
				kfl=5;
			}
			time_t c_start, t_start, c_end, t_end;
			c_start = clock();
			t_start = time(NULL);
			cout << "正在砍树,按下任意键停止" << endl;
			_getch();
			c_end = clock();
			t_end = time(NULL);
			cout << "你获得" << (int)difftime(c_end, c_start) * kfl << "木头" << endl;
			mt+= (int)difftime(c_end, c_start) * kfl;
			pingguo+=mt/5;
			if(rand()%2==0)
			{
				pg+=5;
				cout << "你获得" << 5 << "个苹果" << endl;
			}
			system("pause");
		}
		else
		if(pyy=='3')
		{
			while(1)
			{
				system("cls");
				cout<<"是否继续刷怪?\n0.退出 1.继续\n";
				a=getch();
				if(a=='0')
				{
					break;
				}
				else
				if(a=='1')
				{
					tp=0;
					int sj=rand()%4;
					if(sj==0)
					{
						js();
					}
					else
					if(sj==1)
					{
						xb();
					}
					else
					if(sj==2)
					{
						klp();
					}
					else
					{
						xh();
					}
				}
			}
		}
		else
		if(pyy=='4')
		{
			system("cls");
			cout<<"正在搜索矿洞"<<endl;
			Sleep(1000);
			wk();
		}
		if(pyy=='e')
		{
			bb();
		}
	}
}
void modi()
{
	if(mdzy<12&&name!="LRZ")
	{
		cout << "末地之眼不足";
		system("pause");
		return;
	}
	cout<<"你进入了末地,是否搭到岛上? 1.是(消耗32个木板) 2.否"<<endl;
	a=getch();
	if(a=='1')
	{
		if(mb>=32)
		{
			cout<<"你的行为惹怒了一群末影人"<<endl;
			Sleep(1000);
			system("cls");
			xh();xh();xh();xh();
			xh();xh();xh();xh();
			Sleep(1000);
			system("cls");
			mysj();
			mysj();

			cout<<"末影龙朝你吐了口水,是继续攻击水晶还是打末影龙?1.水晶 2.末影龙";
			s-=4;
			a=getch();
			if(a=='2')
			{
				myl2();
			}
			else
			{

				system("cls");
				mysj();mysj();mysj();
				mysj();mysj();mysj();

				cout<<"末影龙将你撞飞了,是继续攻击水晶还是打末影龙?1.水晶 2.末影龙";
				s-=11;
				a=getch();
				if(a=='2')
				{
					myl3();
				}
				else
				{
					Sleep(1000);
					system("cls");
					mysj();mysj();mysj();
					mysj();mysj();mysj();

					cout<<"末影龙发怒了";
					myl();
					Sleep(1000);
					system("cls");
				}
			}
			cout<<"恭喜通关!等级已提升至"<<dj+50<<"级!解锁末地城!";
			Sleep(1000);
			system("cls");
			dj+=50;
			tg=1;
		}
	}
	else
	if(a=='2')
	{
		mx();
	}
}
int kk()
{
	k=getch();
	if(k=='1')
	{
		x-=1;
	}
	else
	if(k=='2')
	{
		x+=1;
	}
	else
	if(k=='3')
	{
		y-=1;
	}
	else
	if(k=='4')
	{
		return 1;
	}
	else
	if(a=='e')
	{
		bb();
	}
	int gw=rand()%10;
	if(gw==0&&k!='e')
	{
		js();
	}
	else
	if(gw==1&&k!='e')
	{
		xb();
	}
	if(gtnj>0)
	gtnj--;
	if(gtnj==0)
	{
		gtdj=0;
	}
	if(y<=30&&y>10&&gtdj>=3&&cly==1)
	{
		int j=rand()%sy;
		l+=j;
		if(j!=0)
		cout<<"获得绿宝石"<<j<<"颗"<<endl;
		else
		cout<<"什么都没有!"<<endl;
		Sleep(300);
	}
	if(y<=10&&gtdj>=3)
	{
		int j=rand()%sy;
		z+=j;
		if(j!=0)
		cout<<"获得钻石"<<j<<"颗"<<endl;
		else
		cout<<"什么都没有!"<<endl;
		Sleep(300);
	}
	if(y>=10&&gtdj>=2)
	{
		int j=rand()%sy;
		tks+=j;
		if(j!=0)
		cout<<"获得铁矿石"<<j<<"个"<<endl;
		else
		cout<<"什么都没有!"<<endl;
		Sleep(300);
	}
	if(y<=30&&gtdj>=3&&cly==1)
	{
		int j=rand()%sy;
		jks+=j;
		if(j!=0)
		cout<<"获得金矿石"<<j<<"个"<<endl;
		else
		cout<<"什么都没有!"<<endl;
		Sleep(300);
	}
	if(gtdj>=1)
	{
		int j=rand()%sy;
		st+=j;
		if(j!=0)
		cout<<"获得石头"<<j<<"个"<<endl;
		else
		cout<<"什么都没有!"<<endl;
		Sleep(300);
	}
	if(y<=55&&y>10&&gtdj>=1)
	{
		int j=rand()%sy;
		mty+=j;
		if(j!=0)
		cout<<"获得煤炭"<<j<<"颗"<<endl;
		else
		cout<<"什么都没有!"<<endl;
		Sleep(300);
	}
	return 0;
}
int wk()
{
	while(1)
	{
		system("cls");
		cout<<"1.向左挖 2.向右挖 3.向下挖 4.离开"<<endl<<"x坐标:"<<x<<","<<"y坐标:"<<y<<"."<<endl;
		if(kk()==1)
		{
			return 0;
		}
	}
}
void xl()
{
	if(s<=0)
	{
		cout<<"你失败了"<<endl;
		Sleep(1000);
		s=20;
		cd();
	}
}
void dgw(string names,int b,int g,int j,int jyyy)
{
	system("cls");
	cout<<"一只"<<names<<"来袭"<<endl;
	Sleep(1000);
	while(1)
	{
		system("cls");
		cout<<"你要干什么?"<<endl<<"1.攻击 2.逃跑 3.药水 4.吃金苹果\n";
		a=getch();
		if(a=='4')
		{
			if(jingpingguo>=1)
			{
				jingpingguo-=1;
				s+=6;
				cout<<"使用成功\n";
				system ("pause");

				for(int i=5;i>0;i--)
				{
					if(s<26)
					s+=1;
					Sleep(1000);
				}
			}
			else
			{
				cout<<"使用失败\n";
				system ("pause");
			}
		}

		if(a=='3')
		{
			system("cls");
			cout<<"你要使用什么药水?\n1.治疗药水I:血量加5*"<<ysy[0]<<"\n2.治疗药水II:血量加10*"<<ysy[1]<<"\n3.治疗药水III:血量加15*"<<ysy[2]<<"\n4.伤害药水I:敌人血量减5*"<<ysy[3]<<"\n5.伤害药水II:敌人血量减10*"<<ysy[4]<<"\n6.伤害药水III:敌人血量减15*"<<ysy[5]<<"\n";
			a=getch();
			if(a=='1')
			{
				if(ysy[0]>0)
				{
					s+=5;
					ysy[0]--;
					cout<<"使用成功\n";
					system ("pause");
				}
				else
				{
					cout<<"使用失败\n";
					system ("pause");
				}
			}
			else
			if(a=='2')
			{
				if(ysy[1]>0)
				{
					s+=10;
					ysy[1]--;
					cout<<"使用成功\n";
					system ("pause");
				}
				else
				{
					cout<<"使用失败\n";
					system ("pause");
				}
			}
			else
			if(a=='3')
			{
				if(ysy[2]>0)
				{
					s+=15;
					ysy[2]--;
					cout<<"使用成功\n";
					system ("pause");
				}
				else
				{
					cout<<"使用失败\n";
					system ("pause");
				}
			}
			else
			if(a=='4')
			{
				if(ysy[3]>0)
				{
					b-=5;
					ysy[3]--;
					cout<<"使用成功\n";
					system ("pause");
				}
				else
				{
					cout<<"使用失败\n";
					system ("pause");
				}
			}
			else
			if(a=='5')
			{
				if(ysy[4]>0)
				{
					b-=10;
					ysy[4]--;
					cout<<"使用成功\n";
					system ("pause");
				}
				else
				{
					cout<<"使用失败\n";
					system ("pause");
				}
			}
			else
			if(a=='6')
			{
				if(ysy[5]>0)
				{
					b-=15;
					ysy[5]--;
					cout<<"使用成功\n";
					system ("pause");
				}
				else
				{
					cout<<"使用失败\n";
					system ("pause");
				}
			}
		}
		else
		if(a=='2')
		{
			if(tp==0)
			{
				cout<<"逃跑成功"<<endl;
				system ("pause");
				break;
			}
			else
			{
				cout<<"逃跑失败"<<endl;
				system ("pause");
			}
		}
		else
		if(a=='1')
		{
			cout<<"你对"<<names<<"造成了"<<gjz<<"点伤害\n";
			b-=gjz;
			if(wqnj==0)
			{
				wqm="手";
				wq=0;
			}
			else
			{
				wqnj--;
			}
		}
		if(s>ssx)
		{
			s=ssx;
		}
		if(b<0)
		{
			b=0;
		}
		cout<<names<<"还有"<<b<<"滴血\n";
		if(b<=0)
		{
			cout<<"你还有"<<s<<"滴血\n";
			int jl=rand()%j;
			if(jl!=0)
			{
				cout<<"获得绿宝石"<<jl<<"颗\n";
				l+=jl;
			}
			else
			{
				cout<<names<<"太穷了,什么也没掉落\n";
			}
			jy+=jyyy;
			sjy();
			system ("pause");
			break;
		}
		if(hjnj>0)
		{
			hjnj--;
			if(hjnj==0)
			{
				hjz=0;
				hjj[hjnx]--;
			}
		}
		if(g>=hjz)
		{
			cout<<names<<"对你"<<"造成了"<<g-hjz<<"点伤害\n";
			s-=g-hjz;
		}
		else
		{
			cout<<names<<"对你"<<"造成了"<<0<<"点伤害\n";
		}
		cout<<"你还有"<<s<<"滴血\n";
		system ("pause");
		xl();
	}
}
int op=0;
void zy()
{
	gjz=csg+wq;
	y=60;x=0;
	string hh="请问你要去干什么?";
	system("cls");
	cout<<"欢迎回来:"<<name<<endl;
	if(op==0)
	{
		cout<<"M";Sleep(100);cout<<"C";Sleep(100);cout<<"1";Sleep(100);cout<<".";Sleep(100);cout<<"4";Sleep(100);cout<<".";Sleep(100);cout<<"3";Sleep(100);cout<<endl;
	}
	else
	{
		cout<<"MC1.2.3";
	}
	if(op==0)
	for(int i=0;i<hh.size();i++)
	{
		cout<<hh[i];
		Sleep(100);
	}
	else
	cout<<endl<<hh;
	op=1;
	cout<<endl<<"1.冒险 2.工具 3.回家 4.熔炉 5.提示 6.保存"<<endl<<"其它按照传统MC"<<endl;
	a=0;
	system("color 0");
	a=getch();
	op=1;
}
void bb()
{
	while(1)
	{
		system("cls");
		cout<<"请问你要看什么?\n0.离开 1.矿物 2.工具 3.药水 4.属性 5.其他 6.护甲\n";
		a=getch();
		if(a=='0')
		{
			break;
		}
		else
		if(a=='1')
		{
			system("cls");
			cout<<"石头"<<st<<"个\n"<<"铁"<<td<<"个\n"<<"金"<<jd<<"个\n"<<"绿宝石"<<l<<"个\n"<<"钻石"<<z<<"个\n"<<"铁矿石"<<tks<<"个\n"<<"金矿石"<<jks<<"个\n煤炭"<<mty<<"个\n下界合金"<<xjhj<<"个\n";
			system ("pause");
		}
		else
		if(a=='2')
		{
			system("cls");
			cout<<"武器:"<<wqm<<"\n耐久:"<<wqnj<<"\n镐子等级"<<gtdj<<"\n耐久:"<<gtnj<<"\n砍伐力"<<kfl<<endl;
			system ("pause");
		}
		else
		if(a=='3')
		{
			system("cls");
			cout<<"治疗药水I "<<ysy[0]<<"\n治疗药水II "<<ysy[1]<<"\n治疗药水III "<<ysy[2]<<"\n伤害药水I "<<ysy[3]<<"\n伤害药水II"<<ysy[4]<<"\n伤害药水III "<<ysy[5]<<endl;
			system ("pause");
		}
		if(a=='4')
		{
			system("cls");
			cout<<"生命值"<<s<<endl;
			system ("pause");
		}
		else
		if(a=='5')
		{
			system("cls");
			cout<<"木头"<<mt<<"个\n"<<"木板"<<mb<<"个\n"<<"木棍"<<mg<<"个\n苹果"<<pingguo<<"个\n金苹果"<<jingpingguo<<"个\n水"<<shui<<"桶\n岩浆"<<yanjiang<<"桶\n";
			system ("pause");
		}
		else
		if(a=='6')
		{
			while(1)
			{
				system("cls");
				cout<<"现装备护甲:"<<hjm<<endl<<"库存护甲:\n1.皮革护甲:"<<hjj[0]<<endl<<"2.铁护甲:"<<hjj[1]<<endl<<"3.金护甲:"<<hjj[2]<<endl<<"4.钻石护甲:"<<hjj[3]<<endl<<"5.保1钻石护甲:"<<hjj[4]<<endl<<"6.保2钻石护甲:"<<hjj[5]<<endl<<"7.保3钻石护甲:"<<hjj[6]<<endl<<"8.保4钻石护甲:"<<hjj[7]<<endl<<"9.保5钻石护甲:"<<hjj[8]<<endl<<"10.下界合金套装:"<<hjj[9]<<endl<<"0.退出 1.卸下当前护甲 2.装备护甲\n";
				a=getch();
				if(a=='0')
				{
					break;
				}
				else
				if(a=='1')
				{
					cout<<"卸下成功\n";
					hjm="空";
					hjz=0;
					hjnj=0;
					system("pause");
				}
				else
				if(a=='2')
				{
					if(hjm!="空")
					{
						cout<<"请先卸下当前护甲\n";
						system("pause");
					}
					else
					{
						cout<<"请输入护甲前面的编码。\n";
						a=getch();
						if(a=='1')
						{
							if(hjj[0]>0)
							{
								hjm="皮革护甲";
								hjnx=0;
								cout<<"装备成功\n";
								hjz=2;
								hjnj=60;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						else
						if(a=='2')
						{
							if(hjj[1]>0)
							{
								hjm="铁护甲";
								hjnx=1;
								cout<<"装备成功\n";
								hjz=4;
								hjnj=256;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						else
						if(a=='3')
						{
								hjm="金护甲";
							if(hjj[2]>0)
							{
								hjnx=2;
								cout<<"装备成功\n";
								hjz=2;
								hjnj=40;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						if(a=='4')
						{
							if(hjj[3]>0)
							{
								hjm="钻石护甲";
								hjnx=3;
								cout<<"装备成功\n";
								hjz=7;
								hjnj=1562;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						if(a=='5')
						{
							if(hjj[4]>0)
							{
								hjm="保1钻石护甲";
								hjnx=4;
								cout<<"装备成功\n";
								hjz=10;
								hjnj=1562;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						if(a=='6')
						{
							if(hjj[5]>0)
							{
								hjm="保2钻石护甲";
								hjnx=5;
								cout<<"装备成功\n";
								hjz=11;
								hjnj=1562;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						if(a=='7')
						{
							if(hjj[6]>0)
							{
								hjm="保3钻石护甲";
								hjnx=6;
								cout<<"装备成功\n";
								hjz=13;
								hjnj=1562;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						if(a=='8')
						{
							if(hjj[7]>0)
							{
								hjm="保4钻石护甲";
								hjnx=7;
								cout<<"装备成功\n";
								hjz=15;
								hjnj=1562;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						if(a=='9')
						{
							if(hjj[8]>0)
							{
								hjm="保5钻石护甲";
								hjnx=8;
								cout<<"装备成功\n";
								hjz=17;
								hjnj=1562;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
						if(a=='10')
						{
							if(hjj[9]>0)
							{
								hjm="下界合金护甲";
								hjnx=10;
								cout<<"装备成功\n";
								hjz=17;
								hjnj=1782;
								system("pause");
							}
							else
							{
								cout<<"物品不足\n";
								system("pause");
							}
						}
					}
				}
			}
		}
	}
}
void mdc()
{
	if(mdzy<12&&name!="LRZ")
	{
		cout << "末地之眼不足";
		system("pause");
		return;
	}
	else
	{
		int js=rand();
		if(js%5==0)
		{
			cout<<"你找到了大末地船";
			Sleep(1000);
			system("cls");
			qyb();qyb();qyb();qyb();qyb();
			qyb();qyb();qyb();qyb();qyb();
			qyb();qyb();qyb();qyb();qyb();
			cout<<"宝箱";
			Sleep(500);
			cout<<"你获得了保护4钻石套和锋利5钻石剑!";
			Sleep(1000);
			hjj[7]++;
			zsj[5]++;
		}
		else
		if(js%4==0)
		{
			cout<<"你找到了小末地船";
			Sleep(1000);
			system("cls");
			qyb();qyb();qyb();qyb();qyb();
			qyb();qyb();qyb();qyb();qyb();
			qyb();qyb();qyb();qyb();qyb();
			cout<<"宝箱";
			Sleep(500);
			cout<<"你获得了保护3钻石套和锋利4钻石剑!";
			Sleep(1000);
			hjj[6]++;
			zsj[4]++;
		}
		else
		if(js%3==0)
		{
			cout<<"你找到了大末地城";
			Sleep(1000);
			system("cls");
			qyb();qyb();qyb();qyb();qyb();
			qyb();qyb();qyb();qyb();qyb();
			qyb();qyb();qyb();qyb();qyb();
			cout<<"宝箱";
			Sleep(500);
			cout<<"你获得了保护2钻石套和锋利3钻石剑!";
			Sleep(1000);
			hjj[5]++;
			zsj[3]++;
		}
		else
		if(js%2==0)
		{
			cout<<"你找到了中末地城";
			Sleep(1000);
			system("cls");
			qyb();qyb();qyb();qyb();qyb();
			qyb();qyb();qyb();qyb();qyb();
			cout<<"宝箱";
			Sleep(500);
			cout<<"你获得了保护1钻石套和锋利2钻石剑!";
			Sleep(1000);
			hjj[4]++;
			zsj[2]++;
		}
		else
		if(js%1==0)
		{
			cout<<"你找到了小末地城";
			Sleep(1000);
			system("cls");
			qyb();qyb();qyb();qyb();qyb();
			cout<<"宝箱";
			Sleep(500);
			cout<<"你获得了钻石套和锋利1钻石剑!";
			Sleep(1000);
			hjj[3]++;
			zsj[1]++;
		}
	}
}
void xj()
{
	if(hys<10&&name!="Nouth"&&name!="Herobrine"&&name!="LRZ")
	{
		cout << "你的黑曜石不够!\n";
		system ("pause");
	}
	else
	{
		while(1)
		{
			int js=rand();
			if(js%3==0){
				cout << "你找到了下界堡垒";
				Sleep(1000);
				cout << "宝箱";
				cout << "你获得了200个绿宝石和100个钻石和5个下界合金";
				l+=200,z+=100,xjhj+=5;
				Sleep(500);
			}
			if(js%2==0)
			{
				while(1){
					cout << "你遇到了猪灵\n";
					Sleep(1000);
					cout << "1.下界合金1组 65金锭\n2.钻石1组 30金锭\n3.绿宝石1组 20金锭\n4.铁1组 10金锭\n5.煤炭1组 5金锭\n6.末地之眼12个 20金锭\n其他任意键返回\n";
					cin >> a;
					if(a=='1'){
						if(jd<65&&name!="LRZ"){
							cout << "交易失败";
							continue;
						}
						else
						{
							cout << "交易成功";
							xjhj+=64,jd-=65;
						}
					}
					else
					if(a=='2'){
						if(jd<30&&name!="LRZ"){
							cout << "交易失败";
							continue;
						}
						else
						{
							cout << "交易成功";
							z+=64,jd-=30;
						}
					}
					else
					if(a=='3'){
						if(jd<20&&name!="LRZ"){
							cout << "交易失败";
							continue;
						}
						else
						{
							cout << "交易成功";
							l+=64,jd-=20;
						}
					}
					else
					if(a=='4'){
						if(jd<10&&name!="LRZ"){
							cout << "交易失败";
							continue;
						}
						else
						{
							cout << "交易成功";
							td+=64,jd-=10;
						}
					}
					else
					if(a=='5'){
						if(jd<5&&name!="LRZ"){
							cout << "交易失败";
							continue;
						}
						else
						{
							cout << "交易成功";
							mty+=64,jd-=5;
						}
					}
					else
					if(a=='6'){
						if(jd<20&&name!="LRZ"){
							cout << "交易失败";
							continue;
						}
						else
						{
							cout << "交易成功";
							mdzy+=12,jd-=20;
						}
					}
					else
					{
						break;
					}
					Sleep(500);
					system ("pause");
				}
			}
			if(js%1==0)
			{
				cout << "你遇到了一群僵尸猪人";
				Sleep(1000);
				jszr();jszr();jszr();jszr();
				jszr();jszr();jszr();jszr();
				if(js%5==0)
				{
					cout << "运气爆棚!爆出了100个金锭!";
					jd+=100;
				}
				Sleep(500);
			}
			return;
		}
	}
}

void mx()
{
	while(1)
	{
		system("cls");
		cout<<"你要去哪里?"<<endl<<"0.返回 1.平原 2.丛林 3.冰原 4.村庄 5.下界 6.末地";
		if(tg==1)
		{
			cout<<" 7.末地城";
		}
		cout<<endl;
		char mxy=getch();
		if(mxy=='0')
		{
			break;
		}
		else
		if(mxy=='1')
		{
			py();
		}
		else
		if(mxy=='2')
		{
			cl();
		}
		else
		if(mxy=='3')
		{
			by();
		}
		else
		if(mxy=='4')
		{
			czy();
		}
		else
		if(mxy=='5')
		{
			xj();
		}
		else
		if(mxy=='6')
		{
			modi();
		}
		if(mxy=='7')
		{
			mdc();
		}

		else
		if(mxy=='e')
		{
			bb();
		}
	}

}
void jh()
{
	char jh;
			long long kw;
			system("cls");
			cout<<"请问你要交换什么矿物?"<<endl<<"1.绿宝石->钻石" <<endl;
			jh=getch();
			if(jh=='1')
			{
				cout<<"4颗绿宝石换1颗钻石。"<<endl<<"你有绿宝石"<<l<<"颗"<<endl<<"请问你要换几颗钻石?"<<endl;
				cin>>kw;
				if(l>=4*kw)
				{
					z+=kw;
					l-=4*kw;
					cout<<"交换成功"<<endl;
					system ("pause");
				}
				else
				{
					cout<<"交换失败"<<endl;
					system ("pause");
				}
			}
}
void sg()
{
	while(1)
	{
		system("cls");
		char xgq;
		cout<<"这是来自作者爸爸的爱\n你要修改什么?\n0.退出 1.血量 2.绿宝石 3.钻石 4.铁 5.金 6.血量上限 7.伤害 8.游戏名 9.木板 a.下界合金\n";
		xgq=getch();
		if(xgq=='0')
		{
			break;
		}
		if(xgq=='1')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>s;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='2')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>l;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='3')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>z;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='4')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>td;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='5')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>jd;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='6')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>ssx;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='7')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>wq;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='8')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>name;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='9')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>mb;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
		if(xgq=='a')
		{
			cout<<"请输入修改值"<<endl;;
			cin>>xjhj;
			cout<<"修改成功"<<endl;
			system ("pause");
		}
	}
}
void cd()
{
	while(1)
	{
		zy();
		gjz=1+wq;
		if(a=='1')
		{
			mx();
		}
		else
		if(a=='2')
		{
			gzt();
		}
		else
		if(a=='3')
		{
			home();
		}
		else
		if(a=='4')
		{
			rly();
		}
		else
		if(a=='5')
		{
			xsjc();
		}
		else
		if(a=='6')
		{
			mm=(z+l)%1000000;
			ofstream ofile;
			ofile.open("mc.Minecraft");
			ofile<<cldt<<" "<<bydt<<" "<<dj<<" "<<ssx<<" "<<s<<" "<<wq<<" "<<mt<<" "<<mb<<" "<<mg<<" "<<mty<<" "<<st<<" "<<td<<" "<<tks<<" "<<jd<<" "<<jks<<" "<<z<<" "<<l<<" "<<xjhj<<" "<<pingguo<<" "<<jingpingguo<<" "<<shui<<" "<<yanjiang<<" "<<hys<<" "<<mdzy<<" "<<wqm<<" "<<wqnj<<" "<<gtdj<<" "<<gtnj<<" "<<kfl<<" "<<ftnj<<" "<<ysy[0]<<" "<<ysy[1]<<" "<<ysy[2]<<" "<<ysy[3]<<" "<<ysy[4]<<" "<<ysy[5]<<" "<<ysy[6]<<" "<<hjj[0]<<" "<<hjj[1]<<" "<<hjj[2]<<" "<<hjj[3]<<" "<<hjj[4]<<" "<<hjj[5]<<" "<<hjj[6]<<" "<<hjj[7]<<" "<<hjj[8]<<" "<<hjm<<" "<<hjnx<<" "<<hjz<<" "<<hjnj;
			ofile.close();
			cout<<"存档成功"<<endl;
			system ("pause");
		}
		else
		if(a=='l')
		{
			if(name=="LRZ"){
				sg();
			}
		}
		if(a=='e')
		{
			bb();
		}
		if(a=='m'){
			cout << "你居然知道礼包码?!?!?!?!\n好吧那我就送你一点东西\n恭喜获得100个绿宝石和100个钻石和10个金锭\n";
			l+=100;
			z+=100;
			jd+=10;
			system ("pause");
		}
		if(a=='t'){
			cout << "请输入礼包码\n";
			cin>>zhilin;
			if(zhilin=="/lrzyyds"){
				mz=1;
				cldt=1;
				bydt=1;
				jy=999999999999999;
				dj=999999999999999;
				ssx=999999999999999;
				s=999999999999999;
				wq=9999999999;
				mt=999999999999999;
				mb=999999999999999;
				mg=999999999999999;
				mty=999999999999999;
				st=999999999999999;
				td=999999999999999;
				tks=999999999999999;
				jd=999999999999999;
				jks=999999999999999;
				z=999999999999999;
				l=999999999999999;
				xjhj=999999999999999;
				pingguo=999999999999999;
				jingpingguo=999999999999999;
				shui=999999999999999;
				yanjiang=999999999999999;
				hys=999999999999999;
				mdzy=999999999999999;
				wqm="LRZ剑";
				wqnj=999999999999999;
				gtdj=999999999999999;
				gtnj=999999999999999;
				kfl=99999;
				ftnj=999999999999999;
				ysy[0]=999999999999999;
				ysy[1]=999999999999999;
				ysy[2]=999999999999999;
				ysy[3]=999999999999999;
				ysy[4]=999999999999999;
				ysy[5]=999999999999999;
				ysy[6]=999999999999999;
				hjj[0]=999999999999999;
				hjj[1]=999999999999999;
				hjj[2]=999999999999999;
				hjj[3]=999999999999999;
				hjj[4]=999999999999999;
				hjj[5]=999999999999999;
				hjj[6]=999999999999999;
				hjj[7]=999999999999999;
				hjj[8]=999999999999999;
				hjm="LRZ甲";
				hjnx=999999999999999;
				hjz=999999999999999;
				hjnj=999999999999999;
				cout<<"兑换成功\n";
			}
			else if(zhilin=="/lzyyyds"){
				mz=2;
				cldt=1;
				bydt=1;
				jy+=100;
				dj+=100;
				ssx+=100;
				s+=100;
				wq+=100;
				mt+=100;
				mb+=100;
				mg+=100;
				mty+=100;
				st+=100;
				td+=100;
				tks+=100;
				jd+=100;
				jks+=100;
				z+=100;
				l+=100;
				xjhj+=100;
				pingguo+=100;
				jingpingguo+=100;
				shui+=100;
				yanjiang+=100;
				hys+=100;
				mdzy+=100;
				wqnj+=100;
				gtdj+=100;
				gtnj+=100;
				ftnj+=100;
				ysy[0]+=100;
				ysy[1]+=100;
				ysy[2]+=100;
				ysy[3]+=100;
				ysy[4]+=100;
				ysy[5]+=100;
				ysy[6]+=100;
				hjj[0]+=100;
				hjj[1]+=100;
				hjj[2]+=100;
				hjj[3]+=100;
				hjj[4]+=100;
				hjj[5]+=100;
				hjj[6]+=100;
				hjj[7]+=100;
				hjj[8]+=100;
				hjnx+=100;
				hjz+=100;
				hjnj+=100;
				cout<<"兑换成功\n";
			}
			else if(zhilin=="/sbyyds"){
				jy-=100;
				dj-=100;
				ssx-=100;
				s-=100;
				wq-=100;
				mt-=100;
				mb-=100;
				mg-=100;
				mty-=100;
				st-=100;
				td-=100;
				tks-=100;
				jd-=100;
				jks-=100;
				z-=100;
				l-=100;
				xjhj-=100;
				pingguo-=100;
				jingpingguo-=100;
				shui-=100;
				yanjiang-=100;
				hys-=100;
				mdzy-=100;
				wqnj-=100;
				gtdj-=100;
				gtnj-=100;
				ftnj-=100;
				ysy[0]-=100;
				ysy[1]-=100;
				ysy[2]-=100;
				ysy[3]-=100;
				ysy[4]-=100;
				ysy[5]-=100;
				ysy[6]-=100;
				hjj[0]-=100;
				hjj[1]-=100;
				hjj[2]-=100;
				hjj[3]-=100;
				hjj[4]-=100;
				hjj[5]-=100;
				hjj[6]-=100;
				hjj[7]-=100;
				hjj[8]-=100;
				hjnx-=100;
				hjz-=100;
				hjnj-=100;
				cout<<"兑换成功\n";
			}
			else
				cout<<"未知礼包码\n";
			system ("pause");
		}
 	}
}
int main(){
	int hhh;
	cout<<"欢迎来到我的世界文字版1.4.3。(增加下界,游戏帮助提升)"<<endl;
	cout<<"请问你要打开什么模式?"<<endl<<"1.新建世界"<<endl<<"2.加载存档"<<endl;
	tg=1;
	c=getch();
	ssx=20;
	if(c=='1')
	{
		cout<<"请输入你的名字"<<endl;
		cin>>name;
		if(name=="晨皓."||name=="chverx")
		{
			gtdj=99;
			gtnj=999999999;
			kfl=-9999;
			l=99999;
			z=99999;
			wq=999999;
			wqm="无极神剑";
			wqnj=999999999;
			s=9999;
			ssx=9999;
		}
		else
		if(name=="Nouth")
		{
			zk=2;
			l=10000;
			z=10000;
			wq=100;
			wqm="创始者之剑";
			wqnj=100000000;
			s=1000;
			ssx=1000;
		}
		else
		if(name=="Herobrine")
		{
			wq=10000;
			wqm="黑曜石";
			wqnj=-1;
			s=100;
			ssx=100;
		}
		else
		if(name=="LRZ")
		{
			mz=1;
			cldt=1;
			bydt=1;
			jy=999999999999999;
			dj=999999999999999;
			ssx=999999999999999;
			s=999999999999999;
			wq=9999999999;
			mt=999999999999999;
			mb=999999999999999;
			mg=999999999999999;
			mty=999999999999999;
			st=999999999999999;
			td=999999999999999;
			tks=999999999999999;
			jd=999999999999999;
			jks=999999999999999;
			z=999999999999999;
			l=999999999999999;
			xjhj=999999999999999;
			pingguo=999999999999999;
			jingpingguo=999999999999999;
			shui=999999999999999;
			yanjiang=999999999999999;
			hys=999999999999999;
			mdzy=999999999999999;
			wqm="LRZ剑";
			wqnj=999999999999999;
			gtdj=999999999999999;
			gtnj=999999999999999;
			kfl=99999;
			ftnj=999999999999999;
			ysy[0]=999999999999999;
			ysy[1]=999999999999999;
			ysy[2]=999999999999999;
			ysy[3]=999999999999999;
			ysy[4]=999999999999999;
			ysy[5]=999999999999999;
			ysy[6]=999999999999999;
			hjj[0]=999999999999999;
			hjj[1]=999999999999999;
			hjj[2]=999999999999999;
			hjj[3]=999999999999999;
			hjj[4]=999999999999999;
			hjj[5]=999999999999999;
			hjj[6]=999999999999999;
			hjj[7]=999999999999999;
			hjj[8]=999999999999999;
			hjm="LRZ甲";
			hjnx=999999999999999;
			hjz=999999999999999;
			hjnj=999999999999999;
			cout<<"测试版,请普通玩家不要进入。\n1.开启 2. 不开启\n";
			a=getch();
			if(a=='2')
			{
				cd();
			}
		}
		else
		if(name=="YYH")
		{
			cout<<"测试版,请普通玩家不要进入。\n1.开启 2. 不开启\n";
			a=getch();
			if(a=='2')
			{
				cd();
			}
		}
		cd();
	}
	else
	if(c=='2')
	{
		ifstream ifile;
		ifile.open("mc.Minecraft");
		ifile>>cldt>>bydt>>dj>>ssx>>s>>wq>>mt>>mb>>mg>>mty>>st>>td>>tks>>jd>>jks>>z>>l>>xjhj>>pingguo>>jingpingguo>>shui>>yanjiang>>hys>>mdzy>>wqm>>wqnj>>gtdj>>gtnj>>kfl>>ftnj>>ysy[0]>>ysy[1]>>ysy[2]>>ysy[3]>>ysy[4]>>ysy[5]>>ysy[6]>>hjj[0]>>hjj[1]>>hjj[2]>>hjj[3]>>hjj[4]>>hjj[5]>>hjj[6]>>hjj[7]>>hjj[8]>>hjm>>hjnx>>hjz>>hjnj;
		cout<<"你上次的名字是?\n";
		cin>>name;
		if(name!="LRZ"&&name!="lrz"){
			if(mm!=(z+l)%1000000)
			{
				cout<<"作者很反感作弊,帮你把存档删了。(诚信为本)\n";
				ofstream ofile;
				ofile.open("mc.Minecraft");
				ofile.close();
				return 0;
			}
		}
		cd();
	}
	return 0;
}
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值