四十五中大冒险 1.0版本 c++小游戏

鄙人第一次做游戏,现在主线剧情未开启,但一些副本已经写好啦,可以稍微玩一玩,因为1.0仍在制作,所以一些作弊已经开开了

作弊:
1.温泉刷经验速度最快
2.第一个技能已经给与

合作制作:道标·愚公
顺便做个推广:我们自己做的社区

代码(可以在任意c++编译器上编译):

注意:如果遇到些沙雕的东西,那就是道标愚公做的哦

/*
关于所有函数的解释
main12:主界面
main: 一开始进入的主界面
board: 一些选项
其它的可以百度一下,都是英文(有些是拼音)
有重要的变量
option:通用选择
游戏说明:
此游戏包含很多玩法
有迷宫,技能,等级制,战斗等等
可以自由去探索
*/

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;

int main12();
void start();
void board();
void maps();
void bag();//bug 可以先看一下,不知道出了什么问题
void equips();//装备   未完成
void skill_board();//技能板   未完成
void lingdong();
void zhanchang();//未完成
void shenming();
void huo();
void bin();//未完成
void jin();//未完成
void shu();//未完成
void lu();//未完成
void equip_bag();//未完成
int shanghai(double gong);
int jianshang(double fang);
int boss_shanghai(double gong);
void pretreatment();
void ten();
void eleven();
void twelve();
void thirteen();
void fourteen();
void fifteen();
const int N=1e3+10;

int zhuangbei[N];
/*
最高级 神的庇护
第二级:
荆棘护甲  熔岩拳套   流水灵甲    重金宝剑   土流盾
第三级:
木藤鞭  熔岩枪  水灵环  金剑
*/



struct op
{
	string name;
	string lei;
	string fangyu;
	string gongji;
} equip_attributes[N];

struct xh
{
	int cnn;
	string bag;
} bags[N];

struct xu
{
	int cnn;
	string boxx;
} boxs[N];

bool jineng[100]= {0,1,0,0,0,0,0};	//
int grade=1;
int blood[101]= {0,100};
int experience[101];
string name;
int option,attribute[5],attributes,flag_box[N],flag_bag[N],exits,savage,times,attack[N],defense[N];
int jinyan;
int baoji=5;
int sum_level[101]= {};
bool ops[N];
string head,body,trousers,shoes;
int shushen;
string shengfen;
int fang(string shengfen)
{
	if(shengfen[0] == '#')
	{
		return 1;
	}
	int year = 0;
 	int a1 = (shengfen[6] - '0') * 1000;
 	int a2 = (shengfen[7] - '0') * 100;
 	int a3 = (shengfen[8] - '0') * 10;
 	int s4 = (shengfen[9] - '0') * 1;
 	year = a1 + a2 + a3 + s4;
 	cout << "你出生在:" << year << endl;
 	int len = 2021 - year;
 	cout << "你现在:" << len << endl;
 	if(len < 18)
 	{
 		return 0;
	}
	return 1;
}
int main()
{
	cout << "为了反映国家号召, 本游开设未成年人反沉迷系统, 请输入身份证号码" << endl;
	cin >> shengfen;
	if(!fang(shengfen))
	{
		cout << "未成年人, 禁止进入" << endl; 
		return 0;
	}
	start();
	pretreatment();
	cout<<endl<<"请输入你所要的属性"<<endl;
	cout<<"1.金   2.木   3.水   4.火   5.土"<<endl;
	cin>>attributes;
	attribute[attributes]=1;
	board();
	cin>>option;
	if(option==1)
	{
		maps();
		if(exits==1)
		{
			return 0;
		}
		main12();
	}
	else if(option==2)
	{
		bag();
		main12();
	}
	else if(option==3)
	{
		cout<<"已删除" <<endl;
		main12();
	}
	else if(option==4)
	{
		equips();
		main12();
	}
	else if(option==5)
	{
		skill_board();
		main12();
	}
}

void start()
{
	cout<<"Welcome to AXX";
	cout<<endl;
	cout<<"Please wait a moment"<<endl;
	Sleep(1);
	cout<<"请输入你的名字"<<endl;
	cin>>name;
}

void pretreatment()
{
	int num=1;
	for(int i=100; i<=10000; i+=100)
	{
		blood[num]=i;
		experience[num]=i;
		attack[num]=5+(i/100)*2;
		defense[num]+=i/100;
		num++;
	}
}

void board()
{
	cout<<endl<<endl<<endl;
	cout<<"姓名:"<<name<<endl;
	cout<<"境界"<<endl;	//暂不开放
	cout<<"等级:"<<grade<<endl;
	cout<<"血量:"<<blood[grade]<<endl;
	cout<<"属性:";
	if(attribute[1]==1)
	{
		cout<<"金"<<" ";
	}
	if(attribute[2]==1)
	{
		cout<<"木"<<" ";
	}
	if(attribute[3]==1)
	{
		cout<<"水"<<" ";
	}
	if(attribute[4]==1)
	{
		cout<<"火"<<" ";
	}
	if(attribute[5]==1)
	{
		cout<<"土"<<" ";
	}
	cout<<endl;
	cout<<"攻击:"<<attack[grade]<<endl;
	cout<<"防御:"<<defense[grade]<<endl;
	Sleep(1);
	cout<<"1.地图   "<<"2.背包   "<<"3.精灵箱(已删除)   "<<"4.合成台   "<<"5.技能板   "<<endl;
}

void maps()
{
	cout<<"1.灵洞(难度高)   "<<"2.战场(难度高)   "<<"3.生命之树   "<<"4.流火之地   "<<"5.深海之地   "<<endl;
	cout<<"6.铁金山   "<<"7.恶魔树林   "<<"8.阿努比斯的大陆沙漠   "<<"9.退出";
	cin>>option;
	if(option==1)
	{
		lingdong();
		main12();
	}
	else if(option==2)
	{
		zhanchang();
		main12();
	}
	else if(option==3)
	{
		shenming();
		main12();
	}
	else if(option==4)
	{
		huo();
		main12();
	}
	else if(option==5)
	{
		bin();
		main12();
	}
	else if(option==6)
	{
		jin();
		main12();
	}
	else if(option==7)
	{
		shu();
		main12();
	}
	else if(option==8)
	{
		lu();
		main12();
	}
	else if(option == 9)
	{
		exits=1;
	}
}

void bag()  									//bug
{
	int sum=0;
	for(int i=0; i<=20; i++)
	{
		for(int j=0; j<5; j++)
		{
			if(!flag_bag[i]){
				cout<<bags[i].cnn<<":"<<bags[i].bag[j]<<" ";	
			} 
		}
		cout<<endl;
	}
	cout<<endl;
	cout<<"1.丢弃";
	cin>>option;
	if(option==1)
	{
		cout<<"请输入丢弃的序号";
		cin>>option;
		for(int i=0; i<100; i++)
		{
			if(option==bags[i].cnn)
			{
				flag_bag[i]=1;
				for(int j=i+1; j<100; j++)
				{
					bags[j].cnn--;
				}
				cout<<"丢弃成功";
				return;
			}
		}
	}
}

void box()
{
	int sum=0;
	for(int i=0; i<20; i++)
	{
		for(int j=0; j<5; j++)
		{
			if(!flag_box[i])
				cout<<boxs[i].cnn<<":"<<boxs[i].boxx[j]<<" ";
		}
		cout<<endl;
	}
	cout<<endl;
	cout<<"1.丢弃";
	cin>>option;
	if(option==1)
	{
		Sleep(1);
		cout<<"请输入丢弃的序号";
		cin>>option;
		for(int i=0; i<100; i++)
		{
			if(option==bags[i].cnn)
			{
				flag_box[i]=1;
				for(int j=i+1; j<100; j++)
				{
					bags[j].cnn--;
				}
				cout<<"丢弃成功";
				return;
			}
		}
	}
}

int main12()
{
	if(grade==0)
	{
		grade++;
	}
	while(jinyan>=experience[grade]&&grade<100)
	{
		grade++;
		jinyan-=experience[grade-1];
	}
	if(exits==1)
	{
		return 0;
	}
	board();
	cin>>option;
	if(option==1)
	{
		maps();
		system("cls");
		if(exits==1)
		{
			return 0;
		}
		main12();
	}
	else if(option==2)
	{
		bag();
		system("cls");
		main12();
	}
	else if(option==3)
	{
		box();
		system("cls");
		main12();
	}
	else if(option==4)
	{
		equips();
		system("cls");
		main12();
	}
	else if(option==5)
	{
		skill_board();
		system("cls");
		main12();
	}else{
		main12();
	}
}

void lingdong()
{
	cout<<"欢迎来到灵洞"<<endl;
	Sleep(1);
	cout<<"1.刷级(等级高)   2.泡温泉";
	cin>>option;
	if(option==1)
	{
		cout<<"你遇见了——"<<endl;
		Sleep(1);
		savage=rand()%2;
		if(savage==0)
		{
			double x=rand()%(100-80+1)+80;
			cout<<"碧水金睛兽"<<" "<<"等级:"<<x<<endl;
			int tema=blood[grade];
			int temb=blood[(int)x];
			double temg=attack[grade]*1.5;
			double temf=defense[grade]*1.5;
			cout<<name<<"开始释放技能";
			for(int i=1; i<=5; i++)
			{
				if(jineng[i]&&i==1)
				{
					cout<<"火神术--"<<endl;
					cout<<"焚毁!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
				if(jineng[i]&&i==2){
					cout<<"木神术--"<<endl;
					cout<<"千手顶上化佛!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==3){
					cout<<"水神术--"<<endl;
					cout<<"水乱波!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==4){
					cout<<"土神术--"<<endl;
					cout<<"土淹!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==5){
					cout<<"金神术--"<<endl;
					cout<<"金光剑!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
			}
			int sum=0;
			while(true)
			{
				int y1=boss_shanghai(x);
				tema-=y1+jianshang(defense[grade]);
				cout<<"碧水金睛兽打出了"<<y1<<"点伤害"<<endl;
				Sleep(1);
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
				Sleep(1);
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				for(int i=1; i<=5; i++)
				{
					if(jineng[i]&&i==1)
					{
						cout<<"火神术--"<<endl;
						cout<<"焚毁!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
					if(jineng[i]&&i==2){
						cout<<"木神术--"<<endl;
						cout<<"千手顶上化佛!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==3){
						cout<<"水神术--"<<endl;
						cout<<"水乱波!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==4){
						cout<<"土神术--"<<endl;
						cout<<"土淹!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==5){
						cout<<"金神术--"<<endl;
						cout<<"金光剑!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
				} 
				int y2=shanghai(attack[grade]);
				temb-=y2;
				temb+=jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
				Sleep(1);
				cout<<"碧水金睛兽还剩"<<temb<<"滴血";
				Sleep(1);
				sum++;
				if(temb<=0)
				{
					cout<<"你赢了";
					int n=rand()%20+1;
					if(n==1)
					{
						cout<<",你获得了碧水金睛兽一只";
					}
					else
					{
						cout<<",你获得了碧水珠";
					}
					jinyan+=(double)experience[(int)x]/10;
					return;
				}
			}
		}
		else if(savage==1)
		{
			double x=rand()%(100-80+1)+80;
			cout<<"太古龙象"<<" "<<"等级:"<<x<<endl;
			int tema=blood[grade];
			int temb=blood[(int)x];
			double temg=attack[grade]*1.5;
			double temf=defense[grade]*1.5;
			cout<<name<<"开始释放技能";
			for(int i=1; i<=5; i++)
			{
				if(jineng[i]&&i==1)
				{
					cout<<"火神术--"<<endl;
					cout<<"焚毁!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了太古龙象一只";
						}
						else
						{
							cout<<",你获得了 龙象牙";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
				if(jineng[i]&&i==2){
					cout<<"木神术--"<<endl;
					cout<<"千手顶上化佛!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了太古龙象一只";
						}
						else
						{
							cout<<",你获得了 龙象牙";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==3){
					cout<<"水神术--"<<endl;
					cout<<"水乱波!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了太古龙象一只";
						}
						else
						{
							cout<<",你获得了 龙象牙";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==4){
					cout<<"土神术--"<<endl;
					cout<<"土淹!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了太古龙象一只";
						}
						else
						{
							cout<<",你获得了 龙象牙";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==5){
					cout<<"金神术--"<<endl;
					cout<<"金光剑!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了太古龙象一只";
						}
						else
						{
							cout<<",你获得了 龙象牙";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
			} 
			int sum=0;
			while(true)
			{
				int y1=boss_shanghai(x);
				tema-=y1+jianshang((int)defense[grade]);
				cout<<"太古龙象打出了"<<y1<<"点伤害"<<endl;
				Sleep(1);
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
				Sleep(1);
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				cout<<endl;
				for(int i=1; i<=5; i++)
				{
					if(jineng[i]&&i==1)
					{
						cout<<"火神术--"<<endl;
						cout<<"焚毁!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了太古龙象一只";
							}
							else
							{
								cout<<",你获得了 龙象牙";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
					if(jineng[i]&&i==2){
						cout<<"木神术--"<<endl;
						cout<<"千手顶上化佛!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了太古龙象一只";
							}
							else
							{
								cout<<",你获得了 龙象牙";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==3){
						cout<<"水神术--"<<endl;
						cout<<"水乱波!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了太古龙象一只";
							}
							else
							{
								cout<<",你获得了 龙象牙";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==4){
						cout<<"土神术--"<<endl;
						cout<<"土淹!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了太古龙象一只";
							}
							else
							{
								cout<<",你获得了 龙象牙";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==5){
						cout<<"金神术--"<<endl;
						cout<<"金光剑!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了太古龙象一只";
							}
							else
							{
								cout<<",你获得了 龙象牙";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
				} 
				int y2=shanghai((int)attack[grade]);
				temb-=y2+jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
				Sleep(1);
				cout<<"太古龙象还剩"<<temb<<"滴血"<<endl;
				Sleep(1);
				if(temb<=0)
				{
					cout<<"你赢了"<<endl;
					int n=rand()%10+1;
					if(n==1)
					{
						cout<<",你获得了太古龙象一只"<<endl;
						//加坐骑的属性
					}
					else
					{
						cout<<",你获得了 龙象牙"<<endl;
					}
					jinyan+=(double)experience[(int)x]/10;
					return;
				}
				cout<<endl;
				sum++;
			}
		}
	}
	else if(option==2)
	{
		cout<<"请输入要泡的时间";
		cin>>times;
		for(int i=1; i<=times; i++)
		{
			cout<<i<<" ";
//			Sleep(1);
			jinyan++;
		}
		cout << "你加了" <<times<<"点经验";
//		Sleep(1);
	}
	else
	{
		return;
	}
}

void equips()
{
	cout<<" 请问你要合成以下哪些装备呢? "<<endl;
}

void equip_bag()
{
	cout<<" 暂时为空 ";
}

void skill_board()
{
	cout<<" 暂时为空 ";
}

void zhanchang()
{
	cout<<" 删除 ";
}

void huo()
{
	cout<<"流火之地"<<endl;
	cout<<"这里是火神祝融坐化的地方"<<endl;
	cout<<"1.下矿  2.探险";
	cin>>option;
	int exits1=0;
	if(option==1)
	{
		while(!exits1)
		{
			cout<<"挖矿中..."<<endl;
			Sleep(3000);
			int y=rand()%3+1;
			if(y==1)
			{
				cout<<"恭喜你获得了 炎溶石  "<<endl;

			}
			y=rand()%50+1;
			if(y==5)
			{
				cout<<"恭喜你找到了 火神传承  "<<endl;
				grade++;
				if(attribute[4]==4)
				{
					cout<<"火神真迹 技能:焚毁"<<endl;
					jineng[1]=1;
				}
			}
			cout<<"恭喜你获得了 岩溶石  "<<endl;
			cout<<"1.继续 2.离开"<<endl;
			cin>>option;
			if(option==2)
			{
				exits1=1;
			}
		}
	}
	else
	{
		cout<<"你遇到了---"<<endl;
		int n=rand()%1;
		if(n==0)
		{
			double x=rand()%10;
			cout<<"熔岩虫"<<" "<<"等级:"<<x<<endl;
			int tema=blood[grade];
			int temb=blood[(int)x];
			double temg=5;
			double temf=0;
			cout<<name<<"开始释放技能";
			Sleep(1);
			for(int i=1; i<=5; i++)
			{
				if(jineng[i]&&i==1)
				{
					cout<<"火神术--"<<endl;
					cout<<"焚毁!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
				if(jineng[i]&&i==2){
					cout<<"木神术--"<<endl;
					cout<<"千手顶上化佛!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==3){
					cout<<"水神术--"<<endl;
					cout<<"水乱波!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==4){
					cout<<"土神术--"<<endl;
					cout<<"土淹!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==5){
					cout<<"金神术--"<<endl;
					cout<<"金光剑!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
			} 
			int sum=0;
			while(true)
			{
				int y1=shanghai(x);
				tema-=y1+jianshang((int)defense[grade]);
				cout<<"熔岩虫打出了"<<y1<<"点伤害"<<endl;
				Sleep(1);
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
				Sleep(1);
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				cout<<endl;
				for(int i=1; i<=5; i++)
				{
					if(jineng[i]&&i==1)
				{
					cout<<"火神术--"<<endl;
					cout<<"焚毁!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
				if(jineng[i]&&i==2){
					cout<<"木神术--"<<endl;
					cout<<"千手顶上化佛!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==3){
					cout<<"水神术--"<<endl;
					cout<<"水乱波!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==4){
					cout<<"土神术--"<<endl;
					cout<<"土淹!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==5){
					cout<<"金神术--"<<endl;
					cout<<"金光剑!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				} 
				int y2=shanghai((int)attack[grade]);
				temb-=y2+jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
				Sleep(1);
				cout<<"熔岩虫还剩"<<temb<<"滴血"<<endl;
				Sleep(1);
				sum++;
				if(temb<=0)
				{
					cout<<"你赢了"<<endl;
					cout<<"你获得了 熔岩宝石";
					jinyan+=(double)experience[(int)x]/10;
					return;
				}
				cout<<endl;
			}
		}
		else if(n==1)
		{
			int op2=rand()%3;
			if(op2==0||op2==1)
			{
				double x=rand()%60+30;
				cout<<"熔岩地龙"<<" "<<"等级:"<<x<<endl;
				int tema=blood[grade];
				int temb=blood[(int)x];
				double temg=5;
				double temf=1;
				cout<<name<<"开始释放技能";
				for(int i=1; i<=5; i++)
				{
					if(jineng[i]&&i==1)
					{
						cout<<"火神术--"<<endl;
						cout<<"焚毁!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了熔岩地龙一只";
							}
							else
							{
								cout<<",你获得了熔岩宝石";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
					if(jineng[i]&&i==2){
						cout<<"木神术--"<<endl;
						cout<<"千手顶上化佛!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了熔岩地龙一只";
							}
							else
							{
								cout<<",你获得了熔岩宝石";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==3){
						cout<<"水神术--"<<endl;
						cout<<"水乱波!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了熔岩地龙一只";
							}
							else
							{
								cout<<",你获得了熔岩宝石";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==4){
						cout<<"土神术--"<<endl;
						cout<<"土淹!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了一只";
							}
							else
							{
								cout<<",你获得了熔岩宝石";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==5){
						cout<<"金神术--"<<endl;
						cout<<"金光剑!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了熔岩地龙一只";
							}
							else
							{
								cout<<",你获得了熔岩宝石";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
				} 
				while(true)
				{
					int sum=0;
					int y1=shanghai(x);
					tema-=y1+jianshang((int)defense[grade]);
					cout<<"熔岩地龙打出了"<<y1<<"点伤害"<<endl;
					Sleep(1);
					cout<<name<<"还剩"<<tema<<"滴血"<<endl;
					Sleep(1);
					if(tema<=0)
					{
						cout<<"你落败了,等级-1"<<endl;
						grade--;
						return;
					}
					cout<<endl;
					int y2=shanghai((int)attack[grade]);
					temb-=y2+jianshang(temf);
					for(int i=1; i<=5; i++)
					{
						if(jineng[i]&&i==1)
						{
							cout<<"火神术--"<<endl;
							cout<<"焚毁!"<<endl;
							temb-=5*10+attack[grade];
							cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
							if(temb<=0)
							{
								cout<<"你赢了";
								int n=rand()%20+1;
								if(n==1)
								{
									cout<<",你获得了熔岩地龙一只";
								}
								else
								{
									cout<<",你获得了熔岩宝石";
								}
								jinyan+=(double)experience[(int)x]/10;
								return;
							}
						}
						if(jineng[i]&&i==2){
							cout<<"木神术--"<<endl;
							cout<<"千手顶上化佛!"<<endl;
							temb-=5*10+attack[grade];
							cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
							if(temb<=0)
							{
								cout<<"你赢了";
								int n=rand()%20+1;
								if(n==1)
								{
									cout<<",你获得了熔岩地龙一只";
								}
								else
								{
									cout<<",你获得了熔岩宝石";
								}
								jinyan+=(double)experience[(int)x]/10;
								return;
							} 
						}
						if(jineng[i]&&i==3){
							cout<<"水神术--"<<endl;
							cout<<"水乱波!"<<endl;
							temb-=5*10+attack[grade];
							cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
							if(temb<=0)
							{
								cout<<"你赢了";
								int n=rand()%20+1;
								if(n==1)
								{
									cout<<",你获得了熔岩地龙一只";
								}
								else
								{
									cout<<",你获得了熔岩宝石";
								}
								jinyan+=(double)experience[(int)x]/10;
								return;
							} 
						}
						if(jineng[i]&&i==4){
							cout<<"土神术--"<<endl;
							cout<<"土淹!"<<endl;
							temb-=5*10+attack[grade];
							cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
							if(temb<=0)
							{
								cout<<"你赢了";
								int n=rand()%20+1;
								if(n==1)
								{
									cout<<",你获得了熔岩地龙一只";
								}
								else
								{
									cout<<",你获得了熔岩宝石";
								}
								jinyan+=(double)experience[(int)x]/10;
								return;
							} 
						}
						if(jineng[i]&&i==5){
							cout<<"金神术--"<<endl;
							cout<<"金光剑!"<<endl;
							temb-=5*10+attack[grade];
							cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
							if(temb<=0)
							{
								cout<<"你赢了";
								int n=rand()%20+1;
								if(n==1)
								{
									cout<<",你获得了熔岩地龙一只";
								}
								else
								{
									cout<<",你获得了熔岩宝石";
								}
								jinyan+=(double)experience[(int)x]/10;
								return;
							} 
						}
					} 
					cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
					Sleep(1);
					cout<<"熔岩地龙还剩"<<temb<<"滴血"<<endl;
					Sleep(1);
					sum++;
					if(temb<=0)
					{
						cout<<"你赢了"<<endl;
						int n=rand()%10+1;
						if(n==1)
						{
							cout<<",你获得了 地龙之心 "<<endl;
							//加坐骑的属性
						}
						else
						{
							cout<<",你获得了 熔炎宝石"<<endl;
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
			}
		}
	}
}


void bin()
{
	cout<<"";
}

void jin()
{
	cout<<"删除";
}

void shu()
{
	cout<<"恶魔树林"<<endl;
	cout<<"这里是恶魔居住的地方"<<endl;
	if(shushen==1)
	{
		cout<<"树神:你竟然还敢回来?!"<<endl;
		cout<<"你被迫降了3级"<<endl;
		if(grade>3)
		{
			grade-=3;
		}
		else
		{
			grade=1;
		}
		shushen=0;
	}
	cout<<"1.撸树  2.闲逛(与恶魔干架)";
	cin>>option;
	int exits1=0;
	if(option==1)
	{
		while(!exits1)
		{
			cout<<"撸树中..."<<endl;
			Sleep(3000);
			int y=rand()%5+1;
			if(y==1)
			{
				cout<<"恭喜你获得了 藤条"<<endl;

			}
			y=rand()%10+1;
			if(y==5)
			{
				cout<<"恭喜你惹怒了 树神  "<<endl;
				grade++;
				cout<<"但是树神早已被这里隐藏的恶魔折磨的虚弱不堪"<<endl;
				Sleep(1);
				cout<<"他想让你干掉恶魔"<<endl;
				Sleep(1);
				cout<<"他需要你"<<endl;
				Sleep(1);
				if(attribute[4]==2)
				{
					cout<<"因为你是木系"<<endl;
					Sleep(1);
					cout << "所以你获得了树神的传承 千手顶上化佛"<<endl;
					Sleep(1);
					jineng[2]=1;
				}
				else
				{
					cout<<"但是因为你不是木系"<<endl;
					Sleep(1);
				}
				cout<<"所以树神命令你干掉恶魔"<<endl;
				Sleep(1);
				cout<<"(你将要遇到的树魔是最高等级的boss)"<<endl;
				Sleep(1);
				cout<<"你是否要逃跑"<<endl;
				Sleep(1);
				cout<<"1.逃跑 2.加把油,干掉他"<<endl;
				Sleep(1);
				cin>>option;
				if(option==1)
				{
					cout<<"你成功逃跑"<<endl;
					Sleep(1);
					cout<<"但是树神很生气"<<endl;
					Sleep(1);
					shushen=1;
					main12();
				}
				else
				{
					cout<<"树神开心的笑了"<<endl;
					Sleep(1);
					cout<<"它很赞赏你的勇气"<<endl;
					Sleep(1);
					cout<<"你遇到了---"<<endl;
					Sleep(1);
					cout<<"树魔神"<<" "<<"等级:"<<"神阶满级"<<endl;
					Sleep(1);
					cout<<endl<<endl;
					cout<<"树神面色剧变"<<endl;
					Sleep(1);
					cout<<"它已经决定让你成为继承人了 它不能让你死"<<endl;
					Sleep(1);
					cout<<"树神"<<endl;
					Sleep(1);
					cout<<"开始释放技能"<<endl;
					Sleep(1);
					cout<<"神阶·千手顶上化佛"<<endl;
					Sleep(1);
					cout<<"树魔神已被击败"<<endl;
					Sleep(1);
					cout<<"可是树神已经奄奄一息 它已早不是神阶 这个技能耗费掉了它所有的生命"<<endl;
					Sleep(1);
					if(attribute[2]!=1)
					{
						cout<<"树神:我的余力已经不足以培养你了"<<endl;
						Sleep(1);
						cout<<"我余下的力量可赋予你的就只有这些了"<<endl;
						Sleep(1);
						cout<<"恭喜你的属性变为双属性"<<endl;
						Sleep(1);
						cout<<"恭喜你获得技能"<<" "<<"千手顶上化佛"<<endl;
						Sleep(1);
						grade++;
						attribute[2]=1;
						jineng[2]=1;
					}

					main12();
				}

			}
			cout<<"恭喜你获得了  木头  "<<endl;
			cout<<"1.继续 2.离开"<<endl;
			cin>>option;
			if(option==2)
			{
				exits1=1;
			}
		}
	}
	else
	{
		cout<<"你遇到了---"<<endl;
		int n=rand()%1;
		if(n==0)
		{
			double x=rand()%10;
			cout<<"树魔"<<" "<<"等级:"<<x<<endl;
			int tema=blood[grade];
			int temb=blood[(int)x];
			double temg=5;
			double temf=0;
			cout<<name<<"开始释放技能";
			Sleep(1);
			for(int i=1; i<=5; i++)
			{
				if(jineng[i]&&i==1)
				{
					cout<<"火神术--"<<endl;
					cout<<"焚毁!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了树魔一只";
						}
						else
						{
							cout<<",你获得了树心";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
				if(jineng[i]&&i==2){
					cout<<"木神术--"<<endl;
					cout<<"千手顶上化佛!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了树魔一只";
						}
						else
						{
							cout<<",你获得了树心";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==3){
					cout<<"水神术--"<<endl;
					cout<<"水乱波!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了树魔一只";
						}
						else
						{
							cout<<",你获得了树心";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==4){
					cout<<"土神术--"<<endl;
					cout<<"土淹!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了树魔一只";
						}
						else
						{
							cout<<",你获得了树心";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
				if(jineng[i]&&i==5){
					cout<<"金神术--"<<endl;
					cout<<"金光剑!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了树魔一只";
						}
						else
						{
							cout<<",你获得了树心";
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					} 
				}
			} 
			int sum=0;
			while(true)
			{
				int y1=shanghai(x);
				tema-=y1+jianshang((int)defense[grade]);
				cout<<"树魔打出了"<<y1<<"点伤害"<<endl;
				Sleep(1);
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
				Sleep(1);
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				cout<<endl;
				for(int i=1; i<=5; i++)
				{
					if(jineng[i]&&i==1)
					{
						cout<<"火神术--"<<endl;
						cout<<"焚毁!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了树魔一只";
							}
							else
							{
								cout<<",你获得了树心";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
					if(jineng[i]&&i==2){
						cout<<"木神术--"<<endl;
						cout<<"千手顶上化佛!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了树魔一只";
							}
							else
							{
								cout<<",你获得了树心";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==3){
						cout<<"水神术--"<<endl;
						cout<<"水乱波!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了树魔一只";
							}
							else
							{
								cout<<",你获得了树心";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==4){
						cout<<"土神术--"<<endl;
						cout<<"土淹!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了树魔一只";
							}
							else
							{
								cout<<",你获得了树心";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
					if(jineng[i]&&i==5){
						cout<<"金神术--"<<endl;
						cout<<"金光剑!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了树魔一只";
							}
							else
							{
								cout<<",你获得了树心";
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						} 
					}
				} 
				int y2=shanghai((int)attack[grade]);
				temb-=y2+jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
				Sleep(1);
				cout<<"树魔还剩"<<temb<<"滴血"<<endl;
				Sleep(1);
				sum++;
				if(temb<=0)
				{
					cout<<"你赢了"<<endl;
					cout<<"你获得了 树魔心";
					jinyan+=(double)experience[(int)x]/10;
					return;
				}
				cout<<endl;
			}
		}
	}
}

void lu()
{
	cout<<"删除";
}


int shanghai(double gong)
{
	int bao=0;
	int n=ceil(10*((double)gong/100));
	int op=rand()%100+1;
	for(int i=1; i<=baoji; i++)
	{
		ops[i]=1;
	}
	if(ops[op])
	{
		return n*(rand()%3+1);
		bao=1;
	}
	else
	{
		return n;
	}
}

int jianshang(double fang)
{
	return (double)fang/10;
}

int boss_shanghai(double gong)
{
	int bao=0;
	int n=ceil(10*((double)gong/100));
	int op=rand()%100+1;
	for(int i=1; i<=baoji; i++)
	{
		ops[i]=1;
	}
	if(ops[op])
	{
		return n*(rand()%2+1);
		bao=1;
	}
	else
	{
		return n;
	}
}

void ten()
{
	cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
	char a[10][10] =
	{
		{'#','#','#','#','#','#','#','#','#','#'},
		{'#',' ',' ','#','#',' ','#','#',' ','@'},
		{'#',' ','#',' ',' ',' ',' ','#',' ','#'},
		{'#',' ',' ',' ','#','#',' ','#',' ','#'},
		{'#','O',' ','#','#',' ',' ','#',' ','#'},
		{'#',' ','#',' ',' ','#',' ',' ',' ','#'},
		{'#',' ','#',' ',' ','#',' ','#',' ','#'},
		{'#',' ',' ','#','#',' ',' ',' ',' ','#'},
		{'#','#',' ',' ',' ',' ','#','#',' ','#'},
		{'#','#','#','#','#','#','#','#','#','#'},
	};
	for(int i = 0; i < 10; i++)
	{
		for(int j = 0; j < 10; j++)
		{
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
	char ch;
	int x = 4, y = 1;
	int q = 1, p = 9;
	while(ch = getch())
	{
		system("cls");
		cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;

		if(ch == 'w' && a[x - 1][y] != '#')
		{
			a[x][y] = ' ';
			x--;
			a[x][y] = 'O';
		}
		else if(ch == 's' && a[x + 1][y] != '#')
		{
			a[x][y] = ' ';
			x++;
			a[x][y] = 'O';
		}
		else if(ch == 'a' && a[x][y - 1] != '#')
		{
			a[x][y] = ' ';
			y--;
			a[x][y] = 'O';
		}
		else if(ch == 'd' && a[x][y + 1] != '#')
		{
			a[x][y] = ' ';
			y++;
			a[x][y] = 'O';
		}
		for(int i = 0; i < 10; i++)
		{
			for(int j = 0; j < 10; j++)
			{
				cout << a[i][j] << " ";
			}
			cout << endl;
		}
		if(x == q && y == p)
		{
			cout << "win"<<endl;
			cout<<"你将获得10点经验"<<endl;
			jinyan+=10;
			break;
		}
	}
}
void eleven()
{
	cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
	char a[11][11] =
	{
		{'#','#','#','#','#','#','#','#','#','#','#'},
		{'#','O','#','#','#',' ','#','#','#','#','#'},
		{'#',' ','#',' ','#','#','#','#',' ',' ',' '},
		{'#',' ','#',' ','#',' ','#','#',' ','#',' '},
		{'#',' ','#',' ',' ',' ','#','#',' ','#',' '},
		{'#',' ',' ',' ','#',' ','#','#',' ','#',' '},
		{'#',' ','#','#','#',' ','#',' ',' ','#','@'},
		{'#',' ','#','#','#',' ','#','#',' ','#',' '},
		{'#',' ',' ',' ','#',' ','#','#',' ','#','#'},
		{'#','#','#',' ',' ',' ',' ',' ',' ','#','#'},
		{'#','#','#','#','#','#','#','#','#','#','#'},
	};
	for(int i = 0; i < 11; i++)
	{
		for(int j = 0; j < 11; j++)
		{
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
	char ch;
	int x = 1, y = 1;
	int q = 6, p = 10;
	while(ch = getch())
	{
		system("cls");
		cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
		if(ch == 'w' && a[x - 1][y] != '#')
		{
			a[x][y] = ' ';
			x--;
			a[x][y] = 'O';
		}
		else if(ch == 's' && a[x + 1][y] != '#')
		{
			a[x][y] = ' ';
			x++;
			a[x][y] = 'O';
		}
		else if(ch == 'a' && a[x][y - 1] != '#')
		{
			a[x][y] = ' ';
			y--;
			a[x][y] = 'O';
		}
		else if(ch == 'd' && a[x][y + 1] != '#')
		{
			a[x][y] = ' ';
			y++;
			a[x][y] = 'O';
		}
		for(int i = 0; i < 11; i++)
		{
			for(int j = 0; j < 11; j++)
			{
				cout << a[i][j] << " ";
			}
			cout << endl;
		}
		if(x == q && y == p)
		{
			cout << "win"<<endl;
			cout<<"你将获得11点经验"<<endl;
			jinyan+=11;
			break;
		}
	}
}
void twelve()
{
	cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
	char a[12][12] =
	{
		{'#','#','#','#','#','#','#','#','#','#','#','#'},
		{'#',' ',' ',' ',' ','#','#','#','#','#','#','#'},
		{'#','O','#','#',' ','#','#',' ','#','#',' ',' '},
		{'#',' ',' ','#',' ',' ',' ',' ','#',' ',' ','#'},
		{'#','#',' ','#','#','#','#',' ','#',' ','#',' '},
		{'#',' ',' ','#','#',' ','#',' ',' ',' ','#','@'},
		{'#','#',' ',' ','#',' ','#','#','#','#','#',' '},
		{'#','#','#',' ','#','#','#','#',' ',' ',' ',' '},
		{'#',' ','#',' ',' ',' ','#','#',' ','#',' ',' '},
		{'#',' ','#','#','#',' ',' ',' ',' ','#','#','#'},
		{'#','#','#','#','#','#','#','#','#','#','#','#'},
	};
	for(int i = 0; i < 12; i++)
	{
		for(int j = 0; j < 12; j++)
		{
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
	char ch;
	int x = 2, y = 1;
	int q = 5, p = 11;
	while(ch = getch())
	{
		system("cls");
		cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
		if(ch == 'w' && a[x - 1][y] != '#')
		{
			a[x][y] = ' ';
			x--;
			a[x][y] = 'O';
		}
		else if(ch == 's' && a[x + 1][y] != '#')
		{
			a[x][y] = ' ';
			x++;
			a[x][y] = 'O';
		}
		else if(ch == 'a' && a[x][y - 1] != '#')
		{
			a[x][y] = ' ';
			y--;
			a[x][y] = 'O';
		}
		else if(ch == 'd' && a[x][y + 1] != '#')
		{
			a[x][y] = ' ';
			y++;
			a[x][y] = 'O';
		}
		for(int i = 0; i < 12; i++)
		{
			for(int j = 0; j < 12; j++)
			{
				cout << a[i][j] << " ";
			}
			cout << endl;
		}
		if(x == q && y == p)
		{
			cout << "win"<<endl;
			cout<<"你将获得12点经验"<<endl;
			jinyan+=12;
			break;
		}
	}
}
void thirteen()
{
	cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
	char a[13][13] =
	{
		{'#','#','#','#','#','#','#','#','#','#','#','#','#'},
		{'#',' ','#',' ',' ',' ',' ',' ',' ',' ','#','#','#'},
		{'#','O','#','#','#','#','#','#','#','#','#','#','#'},
		{'#',' ','#','#','#','#','#',' ',' ',' ','#','#','#'},
		{'#',' ','#','#',' ',' ',' ','#','#',' ',' ','#','#'},
		{'#',' ',' ',' ',' ','#',' ','#','#',' ',' ','#','#'},
		{'#',' ','#','#',' ','#',' ','#','#','#',' ',' ',' '},
		{'#',' ','#','#','#',' ',' ',' ',' ','#','#','#','@'},
		{'#',' ','#','#','#',' ','#','#',' ','#',' ',' ',' '},
		{'#',' ',' ',' ',' ',' ','#','#',' ',' ',' ','#','#'},
		{'#',' ','#','#','#','#','#','#','#',' ',' ','#','#'},
		{'#',' ',' ',' ',' ',' ','#',' ',' ','#','#','#','#'},
		{'#','#','#','#','#','#','#','#','#','#','#','#','#'},
	};
	for(int i = 0; i < 13; i++)
	{
		for(int j = 0; j < 13; j++)
		{
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
	char ch;
	int x = 2, y = 1;
	int q = 7, p = 12;
	while(ch = getch())
	{
		system("cls");
		cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
		if(ch == 'w' && a[x - 1][y] != '#')
		{
			a[x][y] = ' ';
			x--;
			a[x][y] = 'O';
		}
		else if(ch == 's' && a[x + 1][y] != '#')
		{
			a[x][y] = ' ';
			x++;
			a[x][y] = 'O';
		}
		else if(ch == 'a' && a[x][y - 1] != '#')
		{
			a[x][y] = ' ';
			y--;
			a[x][y] = 'O';
		}
		else if(ch == 'd' && a[x][y + 1] != '#')
		{
			a[x][y] = ' ';
			y++;
			a[x][y] = 'O';
		}
		for(int i = 0; i < 13; i++)
		{
			for(int j = 0; j < 13; j++)
			{
				cout << a[i][j] << " ";
			}
			cout << endl;
		}
		if(x == q && y == p)
		{
			cout << "win"<<endl;
			cout<<"你将获得13点经验"<<endl;
			jinyan+=13;
			break;
		}
	}
}
void forteen()
{
	cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
	char a[14][14] =
	{
		{'#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
		{'#','#','#','#',' ',' ','#',' ',' ','#','#','#','#','#'},
		{'#','O','#','#',' ','#','#','#','#','#',' ','#','#','#'},
		{'#',' ',' ',' ',' ','#',' ','#','#','#',' ','#','#','#'},
		{'#','#',' ','#',' ','#',' ',' ','#','#',' ',' ',' ','@'},
		{'#','#',' ','#',' ',' ','#',' ',' ','#','#','#',' ','#'},
		{'#','#',' ',' ',' ','#','#','#',' ',' ',' ','#',' ','#'},
		{'#','#','#',' ',' ',' ',' ','#',' ','#',' ','#',' ','#'},
		{'#',' ','#','#',' ','#',' ','#',' ','#',' ','#',' ','#'},
		{'#',' ','#','#','#','#',' ','#',' ','#',' ',' ',' ','#'},
		{'#',' ','#','#','#','#',' ','#',' ','#',' ','#',' ','#'},
		{'#',' ',' ',' ',' ',' ',' ','#',' ','#','#','#','#','#'},
		{'#','#','#','#','#','#',' ',' ',' ','#','#','#','#','#'},
		{'#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
	};
	for(int i = 0; i < 14; i++)
	{
		for(int j = 0; j < 14; j++)
		{
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
	char ch;
	int x = 2, y = 1;
	int q = 4, p = 13;
	while(ch = getch())
	{
		system("cls");
		cout << "wsad = 上下左右, @ 为终点 ,O 为你的位置" << endl;
		if(ch == 'w' && a[x - 1][y] != '#')
		{
			a[x][y] = ' ';
			x--;
			a[x][y] = 'O';
		}
		else if(ch == 's' && a[x + 1][y] != '#')
		{
			a[x][y] = ' ';
			x++;
			a[x][y] = 'O';
		}
		else if(ch == 'a' && a[x][y - 1] != '#')
		{
			a[x][y] = ' ';
			y--;
			a[x][y] = 'O';
		}
		else if(ch == 'd' && a[x][y + 1] != '#')
		{
			a[x][y] = ' ';
			y++;
			a[x][y] = 'O';
		}
		for(int i = 0; i < 14; i++)
		{
			for(int j = 0; j < 14; j++)
			{
				cout << a[i][j] << " ";
			}
			cout << endl;
		}
		if(x == q && y == p)
		{
			cout << "win"<<endl;
			cout<<"你将获得14点经验"<<endl;
			jinyan+=14;
			break;
		}
	}
}

void shenming()
{
	int n;
	cout << "请输入你想要的级别 1 ~ 5" << endl;
	cin >> n;
	if(n == 1)
	{
		ten();
	}
	else if(n == 2)
	{
		eleven();
	}
	else if(n == 3)
	{
		twelve();
	}
	else if(n == 4)
	{
		thirteen();
	}
	else if(n == 5)
	{
		forteen();
	}
}


/*
关于所有函数的解释
main12:主界面
main: 一开始进入的主界面
board: 一些选项
其它的可以百度一下,都是英文(有些是拼音)
有重要的变量
option:通用选择
游戏说明:
此游戏包含很多玩法
有迷宫,技能,等级制,战斗等等
可以自由去探索
*/

#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;

int main12();
void start();
void board();
void maps();
void bag();//bug 可以先看一下,不知道出了什么问题
void equips();//装备 未完成
void skill_board();//技能板 未完成
void lingdong();
void zhanchang();//未完成
void shenming();
void huo();
void bin();//未完成
void jin();//未完成
void shu();//未完成
void lu();//未完成
void equip_bag();//未完成
int shanghai(double gong);
int jianshang(double fang);
int boss_shanghai(double gong);
void pretreatment();
void ten();
void eleven();
void twelve();
void thirteen();
void fourteen();
void fifteen();
const int N=1e3+10;

int zhuangbei[N];
/*
最高级 神的庇护
第二级:
荆棘护甲 熔岩拳套 流水灵甲 重金宝剑 土流盾
第三级:
木藤鞭 熔岩枪 水灵环 金剑
*/

struct op
{
string name;
string lei;
string fangyu;
string gongji;
} equip_attributes[N];

struct xh
{
int cnn;
string bag;
} bags[N];

struct xu
{
int cnn;
string boxx;
} boxs[N];

bool jineng[100]= {0,1,0,0,0,0,0}; //
int grade=1;
int blood[101]= {0,100};
int experience[101];
string name;
int option,attribute[5],attributes,flag_box[N],flag_bag[N],exits,savage,times,attack[N],defense[N];
int jinyan;
int baoji=5;
int sum_level[101]= {};
bool ops[N];
string head,body,trousers,shoes;
int shushen;
string shengfen;
int fang(string shengfen)
{
if(shengfen[0] == ‘#’)
{
return 1;
}
int year = 0;
int a1 = (shengfen[6] - ‘0’) * 1000;
int a2 = (shengfen[7] - ‘0’) * 100;
int a3 = (shengfen[8] - ‘0’) * 10;
int s4 = (shengfen[9] - ‘0’) * 1;
year = a1 + a2 + a3 + s4;
cout << “你出生在:” << year << endl;
int len = 2021 - year;
cout << “你现在:” << len << endl;
if(len < 18)
{
return 0;
}
return 1;
}
int main()
{
cout << “为了反映国家号召, 本游开设未成年人反沉迷系统, 请输入身份证号码” << endl;
cin >> shengfen;
if(!fang(shengfen))
{
cout << “未成年人, 禁止进入” << endl;
return 0;
}
start();
pretreatment();
cout< cout<<“1.金 2.木 3.水 4.火 5.土”< cin>>attributes;
attribute[attributes]=1;
board();
cin>>option;
if(option1)
{
maps();
if(exits
1)
{
return 0;
}
main12();
}
else if(option2)
{
bag();
main12();
}
else if(option
3)
{
cout<<“已删除” < main12();
}
else if(option4)
{
equips();
main12();
}
else if(option
5)
{
skill_board();
main12();
}
}

void start()
{
cout<<“Welcome to AXX”;
cout< cout<<“Please wait a moment”< Sleep(1);
cout<<“请输入你的名字”< cin>>name;
}

void pretreatment()
{
int num=1;
for(int i=100; i<=10000; i+=100)
{
blood[num]=i;
experience[num]=i;
attack[num]=5+(i/100)*2;
defense[num]+=i/100;
num++;
}
}

void board()
{
cout< cout<<“姓名:”< cout<<“境界”< cout<<“等级:”< cout<<“血量:”< cout<<“属性:”;
if(attribute[1]==1)
{
cout<<“金”<<" “;
}
if(attribute[2]==1)
{
cout<<“木”<<” “;
}
if(attribute[3]==1)
{
cout<<“水”<<” “;
}
if(attribute[4]==1)
{
cout<<“火”<<” “;
}
if(attribute[5]==1)
{
cout<<“土”<<” ";
}
cout< cout<<“攻击:”< cout<<“防御:”< Sleep(1);
cout<<"1.地图 "<<"2.背包 "<<"3.精灵箱(已删除) "<<"4.合成台 "<<"5.技能板 "< }

void maps()
{
cout<<"1.灵洞(难度高) "<<"2.战场(难度高) "<<"3.生命之树 "<<"4.流火之地 "<<"5.深海之地 "< cout<<"6.铁金山 "<<"7.恶魔树林 "<<"8.阿努比斯的大陆沙漠 "<<“9.退出”;
cin>>option;
if(option1)
{
lingdong();
main12();
}
else if(option
2)
{
zhanchang();
main12();
}
else if(option3)
{
shenming();
main12();
}
else if(option
4)
{
huo();
main12();
}
else if(option5)
{
bin();
main12();
}
else if(option
6)
{
jin();
main12();
}
else if(option7)
{
shu();
main12();
}
else if(option
8)
{
lu();
main12();
}
else if(option == 9)
{
exits=1;
}
}

void bag() //bug
{
int sum=0;
for(int i=0; i<=20; i++)
{
for(int j=0; j<5; j++)
{
if(!flag_bag[i]){
cout< }
}
cout< }
cout< cout<<“1.丢弃”;
cin>>option;
if(option1)
{
cout<<“请输入丢弃的序号”;
cin>>option;
for(int i=0; i<100; i++)
{
if(option
bags[i].cnn)
{
flag_bag[i]=1;
for(int j=i+1; j<100; j++)
{
bags[j].cnn–;
}
cout<<“丢弃成功”;
return;
}
}
}
}

void box()
{
int sum=0;
for(int i=0; i<20; i++)
{
for(int j=0; j<5; j++)
{
if(!flag_box[i])
cout< }
cout< }
cout< cout<<“1.丢弃”;
cin>>option;
if(option1)
{
Sleep(1);
cout<<“请输入丢弃的序号”;
cin>>option;
for(int i=0; i<100; i++)
{
if(option
bags[i].cnn)
{
flag_box[i]=1;
for(int j=i+1; j<100; j++)
{
bags[j].cnn–;
}
cout<<“丢弃成功”;
return;
}
}
}
}

int main12()
{
if(grade0)
{
grade++;
}
while(jinyan>=experience[grade]&&grade<100)
{
grade++;
jinyan-=experience[grade-1];
}
if(exits
1)
{
return 0;
}
board();
cin>>option;
if(option1)
{
maps();
system(“cls”);
if(exits
1)
{
return 0;
}
main12();
}
else if(option2)
{
bag();
system(“cls”);
main12();
}
else if(option
3)
{
box();
system(“cls”);
main12();
}
else if(option4)
{
equips();
system(“cls”);
main12();
}
else if(option
5)
{
skill_board();
system(“cls”);
main12();
}else{
main12();
}
}

void lingdong()
{
cout<<“欢迎来到灵洞”< Sleep(1);
cout<<“1.刷级(等级高) 2.泡温泉”;
cin>>option;
if(option1)
{
cout<<“你遇见了——”< Sleep(1);
savage=rand()%2;
if(savage
0)
{
double x=rand()%(100-80+1)+80;
cout<<“碧水金睛兽”<<" “<<“等级:”< int tema=blood[grade];
int temb=blood[(int)x];
double temg=attack[grade]1.5;
double temf=defense[grade]1.5;
cout< for(int i=1; i<=5; i++)
{
if(jineng[i]&&i==1)
{
cout<<“火神术–”< cout<<“焚毁!”< temb-=5
10+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
2){
cout<<“木神术–”< cout<<“千手顶上化佛!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
3){
cout<<“水神术–”< cout<<“水乱波!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
4){
cout<<“土神术–”< cout<<“土淹!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
5){
cout<<“金神术–”< cout<<“金光剑!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
int sum=0;
while(true)
{
int y1=boss_shanghai(x);
tema-=y1+jianshang(defense[grade]);
cout<<“碧水金睛兽打出了”< Sleep(1);
cout< Sleep(1);
if(tema<=0)
{
cout<<“你落败了,等级-1”< grade–;
return;
}
for(int i=1; i<=5; i++)
{
if(jineng[i]&&i
1)
{
cout<<“火神术–”< cout<<“焚毁!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
2){
cout<<“木神术–”< cout<<“千手顶上化佛!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
3){
cout<<“水神术–”< cout<<“水乱波!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
4){
cout<<“土神术–”< cout<<“土淹!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
5){
cout<<“金神术–”< cout<<“金光剑!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
int y2=shanghai(attack[grade]);
temb-=y2;
temb+=jianshang(temf);
cout< Sleep(1);
cout<<“碧水金睛兽还剩”< Sleep(1);
sum++;
if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n
1)
{
cout<<”,你获得了碧水金睛兽一只";
}
else
{
cout<<",你获得了碧水珠";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
else if(savage1)
{
double x=rand()%(100-80+1)+80;
cout<<“太古龙象”<<" "<<“等级:”< int tema=blood[grade];
int temb=blood[(int)x];
double temg=attack[grade]*1.5;
double temf=defense[grade]*1.5;
cout< for(int i=1; i<=5; i++)
{
if(jineng[i]&&i
1)
{
cout<<“火神术–”< cout<<“焚毁!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
2){
cout<<“木神术–”< cout<<“千手顶上化佛!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
3){
cout<<“水神术–”< cout<<“水乱波!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
4){
cout<<“土神术–”< cout<<“土淹!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
5){
cout<<“金神术–”< cout<<“金光剑!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
int sum=0;
while(true)
{
int y1=boss_shanghai(x);
tema-=y1+jianshang((int)defense[grade]);
cout<<“太古龙象打出了”< Sleep(1);
cout< Sleep(1);
if(tema<=0)
{
cout<<“你落败了,等级-1”< grade–;
return;
}
cout< for(int i=1; i<=5; i++)
{
if(jineng[i]&&i
1)
{
cout<<“火神术–”< cout<<“焚毁!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
2){
cout<<“木神术–”< cout<<“千手顶上化佛!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
3){
cout<<“水神术–”< cout<<“水乱波!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
4){
cout<<“土神术–”< cout<<“土淹!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
if(jineng[i]&&i
5){
cout<<“金神术–”< cout<<“金光剑!”< temb-=510+attack[grade];
cout<10+attack[grade]<<“点伤害”< if(temb<=0)
{
cout<<“你赢了”;
int n=rand()%20+1;
if(n1)
{
cout<<",你获得了太古龙象一只";
}
else
{
cout<<",你获得了 龙象牙";
}
jinyan+=(double)experience[(int)x]/10;
return;
}
}
}
int y2=shanghai((int)attack[grade]);
temb-=y2+jianshang(temf);
cout< Sleep(1);
cout<<“太古龙象还剩”< Sleep(1);
if(temb<=0)
{
cout<<“你赢了”< int n=rand()%10+1;
if(n
1)
{
cout<<",你获得了太古龙象一只"< //加坐骑的属性
}
else
{
cout<<",你获得了 龙象牙"< }
jinyan+=(double)experience[(int)x]/10;
return;
}
cout< sum++;
}
}
}
else if(option==2)
{
cout<<“请输入要泡的时间”;
cin>>times;
for(int i=1; i<=times; i++)
{
cout< // Sleep(1);
jinyan++;
}
cout << “你加了” < // Sleep(1);
}
else
{
return;
}
}

void equips()
{
cout<<" 请问你要合成以下哪些装备呢? "< }

void equip_bag()
{
cout<<" 暂时为空 ";
}

void skill_board()
{
cout<<" 暂时为空 ";
}

void zhanchang()
{
cout<<" 删除 ";
}

void huo()
{
cout<<“流火之地”< cout<<“这里是火神祝融坐化的地方”< cout<<“1.下矿 2.探险”;
cin>>option;
int exits1=0;
if(option1)
{
while(!exits1)
{
cout<<“挖矿中…”< Sleep(3000);
int y=rand()%3+1;
if(y
1)
{
cout<<"恭喜你获得了 炎溶石 "<

		}
		y=rand()%50+1;
		if(y==5)
		{
			cout<<"恭喜你找到了 火神传承  "<>option;
		if(option==2)
		{
			exits1=1;
		}
	}
}
else
{
	cout<<"你遇到了---"<

}

void bin()
{
cout<<"";
}

void jin()
{
cout<<“删除”;
}

void shu()
{
cout<<“恶魔树林”< cout<<“这里是恶魔居住的地方”< if(shushen1)
{
cout<<“树神:你竟然还敢回来?!”< cout<<“你被迫降了3级”< if(grade>3)
{
grade-=3;
}
else
{
grade=1;
}
shushen=0;
}
cout<<“1.撸树 2.闲逛(与恶魔干架)”;
cin>>option;
int exits1=0;
if(option
1)
{
while(!exits1)
{
cout<<“撸树中…”< Sleep(3000);
int y=rand()%5+1;
if(y==1)
{
cout<<“恭喜你获得了 藤条”<

		}
		y=rand()%10+1;
		if(y==5)
		{
			cout<<"恭喜你惹怒了 树神  "<>option;
			if(option==1)
			{
				cout<<"你成功逃跑"<>option;
		if(option==2)
		{
			exits1=1;
		}
	}
}
else
{
	cout<<"你遇到了---"<

}

void lu()
{
cout<<“删除”;
}

int shanghai(double gong)
{
int bao=0;
int n=ceil(10*((double)gong/100));
int op=rand()%100+1;
for(int i=1; i<=baoji; i++)
{
ops[i]=1;
}
if(ops[op])
{
return n*(rand()%3+1);
bao=1;
}
else
{
return n;
}
}

int jianshang(double fang)
{
return (double)fang/10;
}

int boss_shanghai(double gong)
{
int bao=0;
int n=ceil(10*((double)gong/100));
int op=rand()%100+1;
for(int i=1; i<=baoji; i++)
{
ops[i]=1;
}
if(ops[op])
{
return n*(rand()%2+1);
bao=1;
}
else
{
return n;
}
}

void ten()
{
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
char a[10][10] =
{
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
{’#’,’ ‘,’ ‘,’#’,’#’,’ ‘,’#’,’#’,’ ‘,’@’},
{’#’,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’},
{’#’,’ ‘,’ ‘,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘,’#’},
{’#’,‘O’,’ ‘,’#’,’#’,’ ‘,’ ‘,’#’,’ ‘,’#’},
{’#’,’ ‘,’#’,’ ‘,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’#’},
{’#’,’ ‘,’#’,’ ‘,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’},
{’#’,’ ‘,’ ‘,’#’,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’},
{’#’,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’#’,’ ‘,’#’},
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
};
for(int i = 0; i < 10; i++)
{
for(int j = 0; j < 10; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
char ch;
int x = 4, y = 1;
int q = 1, p = 9;
while(ch = getch())
{
system(“cls”);
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;

	if(ch == 'w' && a[x - 1][y] != '#')
	{
		a[x][y] = ' ';
		x--;
		a[x][y] = 'O';
	}
	else if(ch == 's' && a[x + 1][y] != '#')
	{
		a[x][y] = ' ';
		x++;
		a[x][y] = 'O';
	}
	else if(ch == 'a' && a[x][y - 1] != '#')
	{
		a[x][y] = ' ';
		y--;
		a[x][y] = 'O';
	}
	else if(ch == 'd' && a[x][y + 1] != '#')
	{
		a[x][y] = ' ';
		y++;
		a[x][y] = 'O';
	}
	for(int i = 0; i < 10; i++)
	{
		for(int j = 0; j < 10; j++)
		{
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
	if(x == q && y == p)
	{
		cout << "win"<

}
void eleven()
{
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
char a[11][11] =
{
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
{’#’,‘O’,’#’,’#’,’#’,’ ‘,’#’,’#’,’#’,’#’,’#’},
{’#’,’ ‘,’#’,’ ‘,’#’,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘},
{’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘},
{’#’,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘},
{’#’,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘},
{’#’,’ ‘,’#’,’#’,’#’,’ ‘,’#’,’ ‘,’ ‘,’#’,’@’},
{’#’,’ ‘,’#’,’#’,’#’,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘},
{’#’,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’,’#’,’ ‘,’#’,’#’},
{’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’#’},
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
};
for(int i = 0; i < 11; i++)
{
for(int j = 0; j < 11; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
char ch;
int x = 1, y = 1;
int q = 6, p = 10;
while(ch = getch())
{
system(“cls”);
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
if(ch == ‘w’ && a[x - 1][y] != ‘#’)
{
a[x][y] = ’ ‘;
x–;
a[x][y] = ‘O’;
}
else if(ch == ‘s’ && a[x + 1][y] != ‘#’)
{
a[x][y] = ’ ‘;
x++;
a[x][y] = ‘O’;
}
else if(ch == ‘a’ && a[x][y - 1] != ‘#’)
{
a[x][y] = ’ ‘;
y–;
a[x][y] = ‘O’;
}
else if(ch == ‘d’ && a[x][y + 1] != ‘#’)
{
a[x][y] = ’ ‘;
y++;
a[x][y] = ‘O’;
}
for(int i = 0; i < 11; i++)
{
for(int j = 0; j < 11; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
if(x == q && y == p)
{
cout << “win”< cout<<“你将获得11点经验”< jinyan+=11;
break;
}
}
}
void twelve()
{
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
char a[12][12] =
{
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
{’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
{’#’,‘O’,’#’,’#’,’ ‘,’#’,’#’,’ ‘,’#’,’#’,’ ‘,’ ‘},
{’#’,’ ‘,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’ ‘,’#’},
{’#’,’#’,’ ‘,’#’,’#’,’#’,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘},
{’#’,’ ‘,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’#’,’@’},
{’#’,’#’,’ ‘,’ ‘,’#’,’ ‘,’#’,’#’,’#’,’#’,’#’,’ ‘},
{’#’,’#’,’#’,’ ‘,’#’,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’ ‘},
{’#’,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘,’ ‘},
{’#’,’ ‘,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’#’,’#’},
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
};
for(int i = 0; i < 12; i++)
{
for(int j = 0; j < 12; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
char ch;
int x = 2, y = 1;
int q = 5, p = 11;
while(ch = getch())
{
system(“cls”);
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
if(ch == ‘w’ && a[x - 1][y] != ‘#’)
{
a[x][y] = ’ ‘;
x–;
a[x][y] = ‘O’;
}
else if(ch == ‘s’ && a[x + 1][y] != ‘#’)
{
a[x][y] = ’ ‘;
x++;
a[x][y] = ‘O’;
}
else if(ch == ‘a’ && a[x][y - 1] != ‘#’)
{
a[x][y] = ’ ‘;
y–;
a[x][y] = ‘O’;
}
else if(ch == ‘d’ && a[x][y + 1] != ‘#’)
{
a[x][y] = ’ ‘;
y++;
a[x][y] = ‘O’;
}
for(int i = 0; i < 12; i++)
{
for(int j = 0; j < 12; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
if(x == q && y == p)
{
cout << “win”< cout<<“你将获得12点经验”< jinyan+=12;
break;
}
}
}
void thirteen()
{
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
char a[13][13] =
{
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
{’#’,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’#’,’#’},
{’#’,‘O’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
{’#’,’ ‘,’#’,’#’,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’#’,’#’,’#’},
{’#’,’ ‘,’#’,’#’,’ ‘,’ ‘,’ ‘,’#’,’#’,’ ‘,’ ‘,’#’,’#’},
{’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’,’#’,’ ‘,’ ‘,’#’,’#’},
{’#’,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘},
{’#’,’ ‘,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’#’,’#’,’@’},
{’#’,’ ‘,’#’,’#’,’#’,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘,’ ‘,’ ‘},
{’#’,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’#’,’ ‘,’ ‘,’ ‘,’#’,’#’},
{’#’,’ ‘,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’ ‘,’ ‘,’#’,’#’},
{’#’,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’ ‘,’#’,’#’,’#’,’#’},
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
};
for(int i = 0; i < 13; i++)
{
for(int j = 0; j < 13; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
char ch;
int x = 2, y = 1;
int q = 7, p = 12;
while(ch = getch())
{
system(“cls”);
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
if(ch == ‘w’ && a[x - 1][y] != ‘#’)
{
a[x][y] = ’ ‘;
x–;
a[x][y] = ‘O’;
}
else if(ch == ‘s’ && a[x + 1][y] != ‘#’)
{
a[x][y] = ’ ‘;
x++;
a[x][y] = ‘O’;
}
else if(ch == ‘a’ && a[x][y - 1] != ‘#’)
{
a[x][y] = ’ ‘;
y–;
a[x][y] = ‘O’;
}
else if(ch == ‘d’ && a[x][y + 1] != ‘#’)
{
a[x][y] = ’ ‘;
y++;
a[x][y] = ‘O’;
}
for(int i = 0; i < 13; i++)
{
for(int j = 0; j < 13; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
if(x == q && y == p)
{
cout << “win”< cout<<“你将获得13点经验”< jinyan+=13;
break;
}
}
}
void forteen()
{
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
char a[14][14] =
{
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
{’#’,’#’,’#’,’#’,’ ‘,’ ‘,’#’,’ ‘,’ ‘,’#’,’#’,’#’,’#’,’#’},
{’#’,‘O’,’#’,’#’,’ ‘,’#’,’#’,’#’,’#’,’#’,’ ‘,’#’,’#’,’#’},
{’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’,’#’,’#’,’ ‘,’#’,’#’,’#’},
{’#’,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’ ‘,’#’,’#’,’ ‘,’ ‘,’ ‘,’@’},
{’#’,’#’,’ ‘,’#’,’ ‘,’ ‘,’#’,’ ‘,’ ‘,’#’,’#’,’#’,’ ‘,’#’},
{’#’,’#’,’ ‘,’ ‘,’ ‘,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’},
{’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’},
{’#’,’ ‘,’#’,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’},
{’#’,’ ‘,’#’,’#’,’#’,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’ ‘,’ ‘,’#’},
{’#’,’ ‘,’#’,’#’,’#’,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’,’ ‘,’#’},
{’#’,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’ ‘,’#’,’ ‘,’#’,’#’,’#’,’#’,’#’},
{’#’,’#’,’#’,’#’,’#’,’#’,’ ‘,’ ‘,’ ‘,’#’,’#’,’#’,’#’,’#’},
{’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’,’#’},
};
for(int i = 0; i < 14; i++)
{
for(int j = 0; j < 14; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
char ch;
int x = 2, y = 1;
int q = 4, p = 13;
while(ch = getch())
{
system(“cls”);
cout << “wsad = 上下左右, @ 为终点 ,O 为你的位置” << endl;
if(ch == ‘w’ && a[x - 1][y] != ‘#’)
{
a[x][y] = ’ ';
x–;
a[x][y] = ‘O’;
}
else if(ch == ‘s’ && a[x + 1][y] != ‘#’)
{
a[x][y] = ’ ';
x++;
a[x][y] = ‘O’;
}
else if(ch == ‘a’ && a[x][y - 1] != ‘#’)
{
a[x][y] = ’ ';
y–;
a[x][y] = ‘O’;
}
else if(ch == ‘d’ && a[x][y + 1] != ‘#’)
{
a[x][y] = ’ ';
y++;
a[x][y] = ‘O’;
}
for(int i = 0; i < 14; i++)
{
for(int j = 0; j < 14; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
if(x == q && y == p)
{
cout << “win”< cout<<“你将获得14点经验”< jinyan+=14;
break;
}
}
}

void shenming()
{
int n;
cout << “请输入你想要的级别 1 ~ 5” << endl;
cin >> n;
if(n == 1)
{
ten();
}
else if(n == 2)
{
eleven();
}
else if(n == 3)
{
twelve();
}
else if(n == 4)
{
thirteen();
}
else if(n == 5)
{
forteen();
}
}

你可能感兴趣的:(游戏,游戏,c++)