game.cpp 49.4 KB
Newer Older
道标 · 年's avatar
道标 · 年 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
关于所有函数的解释
main12:主界面
main: 一开始进入的主界面
board: 一些选项
其它的可以百度一下,都是英文(有些是拼音)
有重要的变量
option:通用选择
游戏说明:
此游戏包含很多玩法
有迷宫,技能,等级制,战斗等等
可以自由去探索
*/

#include <bits/stdc++.h>
struct_cym's avatar
struct_cym 已提交
16
#include <iostream>
道标 · 年's avatar
道标 · 年 已提交
17 18 19 20 21 22 23
#include <cstdio>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
#include <conio.h>
struct_cym's avatar
struct_cym 已提交
24
using namespace std;
道标 · 年's avatar
道标 · 年 已提交
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109

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;
道标 · 年's avatar
道标 · 年 已提交
110
 	cout << "你出生在:" << year << endl;
道标 · 年's avatar
道标 · 年 已提交
111
 	int len = 2021 - year;
道标 · 年's avatar
道标 · 年 已提交
112
 	cout << "你现在:" << len << endl;
道标 · 年's avatar
道标 · 年 已提交
113 114 115 116 117 118 119 120 121 122 123 124 125 126
 	if(len < 18)
 	{
 		return 0;
	}
	return 1;
}
int main()
{
	cout << "为了反映国家号召, 本游开设未成年人反沉迷系统, 请输入身份证号码" << endl;
	cin >> shengfen;
	if(!fang(shengfen))
	{
		cout << "未成年人, 禁止进入" << endl; 
		return 0;
struct_cym's avatar
struct_cym 已提交
127
	}
道标 · 年's avatar
道标 · 年 已提交
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
	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;
道标 · 年's avatar
道标 · 年 已提交
172
	Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
	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;
道标 · 年's avatar
道标 · 年 已提交
221
	Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
	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();
	}
道标 · 年's avatar
道标 · 年 已提交
270
	else if(option == 9)
道标 · 年's avatar
道标 · 年 已提交
271 272 273 274 275 276 277 278 279 280 281 282
	{
		exits=1;
	}
}

void bag()  									//bug
{
	int sum=0;
	for(int i=0; i<=20; i++)
	{
		for(int j=0; j<5; j++)
		{
struct_cym's avatar
struct_cym 已提交
283 284 285
			if(!flag_bag[i]){
				cout<<bags[i].cnn<<":"<<bags[i].bag[j]<<" ";	
			} 
道标 · 年's avatar
道标 · 年 已提交
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
		}
		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)
	{
道标 · 年's avatar
道标 · 年 已提交
329
		Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
		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++;
	}
struct_cym's avatar
struct_cym 已提交
354
	while(jinyan>=experience[grade]&&grade<100)
道标 · 年's avatar
道标 · 年 已提交
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
	{
		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();
道标 · 年's avatar
道标 · 年 已提交
398 399
	}else{
		main12();
道标 · 年's avatar
道标 · 年 已提交
400 401 402 403 404 405
	}
}

void lingdong()
{
	cout<<"欢迎来到灵洞"<<endl;
道标 · 年's avatar
道标 · 年 已提交
406
	Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
407 408 409 410 411
	cout<<"1.刷级(等级高)   2.泡温泉";
	cin>>option;
	if(option==1)
	{
		cout<<"你遇见了——"<<endl;
道标 · 年's avatar
道标 · 年 已提交
412
		Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
		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;
					}
				}
struct_cym's avatar
struct_cym 已提交
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
				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;
					} 
				}
道标 · 年's avatar
道标 · 年 已提交
531 532 533 534 535 536 537
			}
			int sum=0;
			while(true)
			{
				int y1=boss_shanghai(x);
				tema-=y1+jianshang(defense[grade]);
				cout<<"碧水金睛兽打出了"<<y1<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
538
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
539
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
540
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
541 542 543 544 545 546 547 548
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				for(int i=1; i<=5; i++)
				{
struct_cym's avatar
struct_cym 已提交
549
					if(jineng[i]&&i==1)
道标 · 年's avatar
道标 · 年 已提交
550 551 552 553 554 555 556
					{
						cout<<"火神术--"<<endl;
						cout<<"焚毁!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
struct_cym's avatar
struct_cym 已提交
557 558
							cout<<"你赢了";
							int n=rand()%20+1;
道标 · 年's avatar
道标 · 年 已提交
559 560
							if(n==1)
							{
struct_cym's avatar
struct_cym 已提交
561
								cout<<",你获得了碧水金睛兽一只";
道标 · 年's avatar
道标 · 年 已提交
562 563 564
							}
							else
							{
struct_cym's avatar
struct_cym 已提交
565
								cout<<",你获得了碧水珠";
道标 · 年's avatar
道标 · 年 已提交
566 567 568 569 570
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
struct_cym's avatar
struct_cym 已提交
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655
					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;
						} 
					}
				} 
道标 · 年's avatar
道标 · 年 已提交
656 657 658 659
				int y2=shanghai(attack[grade]);
				temb-=y2;
				temb+=jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
660
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
661
				cout<<"碧水金睛兽还剩"<<temb<<"滴血";
道标 · 年's avatar
道标 · 年 已提交
662
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699
				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)
					{
struct_cym's avatar
struct_cym 已提交
700 701
						cout<<"你赢了";
						int n=rand()%20+1;
道标 · 年's avatar
道标 · 年 已提交
702 703
						if(n==1)
						{
struct_cym's avatar
struct_cym 已提交
704
							cout<<",你获得了碧水金睛兽一只";
道标 · 年's avatar
道标 · 年 已提交
705 706 707
						}
						else
						{
struct_cym's avatar
struct_cym 已提交
708
							cout<<",你获得了碧水珠";
道标 · 年's avatar
道标 · 年 已提交
709 710 711 712 713
						}
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
struct_cym's avatar
struct_cym 已提交
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798
				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;
					} 
				}
			} 
道标 · 年's avatar
道标 · 年 已提交
799 800 801 802 803 804
			int sum=0;
			while(true)
			{
				int y1=boss_shanghai(x);
				tema-=y1+jianshang((int)defense[grade]);
				cout<<"太古龙象打出了"<<y1<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
805
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
806
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
807
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
808 809 810 811 812 813 814 815 816
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				cout<<endl;
				for(int i=1; i<=5; i++)
				{
struct_cym's avatar
struct_cym 已提交
817
					if(jineng[i]&&i==1)
道标 · 年's avatar
道标 · 年 已提交
818 819 820 821 822 823 824
					{
						cout<<"火神术--"<<endl;
						cout<<"焚毁!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
struct_cym's avatar
struct_cym 已提交
825 826
							cout<<"你赢了";
							int n=rand()%20+1;
道标 · 年's avatar
道标 · 年 已提交
827 828
							if(n==1)
							{
struct_cym's avatar
struct_cym 已提交
829
								cout<<",你获得了碧水金睛兽一只";
道标 · 年's avatar
道标 · 年 已提交
830 831 832
							}
							else
							{
struct_cym's avatar
struct_cym 已提交
833
								cout<<",你获得了碧水珠";
道标 · 年's avatar
道标 · 年 已提交
834 835 836 837 838
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
struct_cym's avatar
struct_cym 已提交
839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923
					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;
						} 
					}
				} 
道标 · 年's avatar
道标 · 年 已提交
924 925 926
				int y2=shanghai((int)attack[grade]);
				temb-=y2+jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
927
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
928
				cout<<"太古龙象还剩"<<temb<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
929
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957
				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<<" ";
struct_cym's avatar
struct_cym 已提交
958
//			Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
959 960 961
			jinyan++;
		}
		cout << "你加了" <<times<<"点经验";
struct_cym's avatar
struct_cym 已提交
962
//		Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041
	}
	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<<"开始释放技能";
道标 · 年's avatar
道标 · 年 已提交
1042
			Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
			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)
					{
struct_cym's avatar
struct_cym 已提交
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
						}
道标 · 年's avatar
道标 · 年 已提交
1063 1064 1065 1066
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
struct_cym's avatar
struct_cym 已提交
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151
				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;
					} 
				}
			} 
道标 · 年's avatar
道标 · 年 已提交
1152 1153 1154 1155 1156 1157
			int sum=0;
			while(true)
			{
				int y1=shanghai(x);
				tema-=y1+jianshang((int)defense[grade]);
				cout<<"熔岩虫打出了"<<y1<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1158
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1159
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1160
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1161 1162 1163 1164 1165 1166 1167 1168 1169
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				cout<<endl;
				for(int i=1; i<=5; i++)
				{
struct_cym's avatar
struct_cym 已提交
1170 1171 1172 1173 1174 1175 1176
					if(jineng[i]&&i==1)
				{
					cout<<"火神术--"<<endl;
					cout<<"焚毁!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
道标 · 年's avatar
道标 · 年 已提交
1177
					{
struct_cym's avatar
struct_cym 已提交
1178 1179 1180
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
道标 · 年's avatar
道标 · 年 已提交
1181
						{
struct_cym's avatar
struct_cym 已提交
1182 1183 1184 1185 1186
							cout<<",你获得了熔岩虫一只";
						}
						else
						{
							cout<<",你获得了熔岩宝石";
道标 · 年's avatar
道标 · 年 已提交
1187
						}
struct_cym's avatar
struct_cym 已提交
1188 1189
						jinyan+=(double)experience[(int)x]/10;
						return;
道标 · 年's avatar
道标 · 年 已提交
1190 1191
					}
				}
struct_cym's avatar
struct_cym 已提交
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276
				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;
					} 
				}
				} 
道标 · 年's avatar
道标 · 年 已提交
1277 1278 1279
				int y2=shanghai((int)attack[grade]);
				temb-=y2+jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1280
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1281
				cout<<"熔岩虫还剩"<<temb<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1282
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315
				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)
						{
struct_cym's avatar
struct_cym 已提交
1316 1317
							cout<<"你赢了";
							int n=rand()%20+1;
道标 · 年's avatar
道标 · 年 已提交
1318 1319
							if(n==1)
							{
struct_cym's avatar
struct_cym 已提交
1320
								cout<<",你获得了熔岩地龙一只";
道标 · 年's avatar
道标 · 年 已提交
1321 1322 1323
							}
							else
							{
struct_cym's avatar
struct_cym 已提交
1324
								cout<<",你获得了熔岩宝石";
道标 · 年's avatar
道标 · 年 已提交
1325 1326 1327 1328 1329
							}
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
struct_cym's avatar
struct_cym 已提交
1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414
					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;
						} 
					}
				} 
道标 · 年's avatar
道标 · 年 已提交
1415 1416 1417 1418 1419 1420
				while(true)
				{
					int sum=0;
					int y1=shanghai(x);
					tema-=y1+jianshang((int)defense[grade]);
					cout<<"熔岩地龙打出了"<<y1<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1421
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1422
					cout<<name<<"还剩"<<tema<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1423
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434
					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++)
					{
struct_cym's avatar
struct_cym 已提交
1435
						if(jineng[i]&&i==1)
道标 · 年's avatar
道标 · 年 已提交
1436 1437 1438 1439 1440 1441 1442
						{
							cout<<"火神术--"<<endl;
							cout<<"焚毁!"<<endl;
							temb-=5*10+attack[grade];
							cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
							if(temb<=0)
							{
struct_cym's avatar
struct_cym 已提交
1443 1444
								cout<<"你赢了";
								int n=rand()%20+1;
道标 · 年's avatar
道标 · 年 已提交
1445 1446
								if(n==1)
								{
struct_cym's avatar
struct_cym 已提交
1447
									cout<<",你获得了碧水金睛兽一只";
道标 · 年's avatar
道标 · 年 已提交
1448 1449 1450
								}
								else
								{
struct_cym's avatar
struct_cym 已提交
1451
									cout<<",你获得了碧水珠";
道标 · 年's avatar
道标 · 年 已提交
1452 1453 1454 1455 1456
								}
								jinyan+=(double)experience[(int)x]/10;
								return;
							}
						}
struct_cym's avatar
struct_cym 已提交
1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541
						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;
							} 
						}
					} 
道标 · 年's avatar
道标 · 年 已提交
1542
					cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1543
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1544
					cout<<"熔岩地龙还剩"<<temb<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1545
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618
					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;
道标 · 年's avatar
道标 · 年 已提交
1619
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1620
				cout<<"他想让你干掉恶魔"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1621
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1622
				cout<<"他需要你"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1623
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1624 1625 1626
				if(attribute[4]==2)
				{
					cout<<"因为你是木系"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1627
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1628
					cout << "所以你获得了树神的传承 千手顶上化佛"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1629
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1630 1631 1632 1633 1634
					jineng[2]=1;
				}
				else
				{
					cout<<"但是因为你不是木系"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1635
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1636 1637
				}
				cout<<"所以树神命令你干掉恶魔"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1638
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1639
				cout<<"(你将要遇到的树魔是最高等级的boss)"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1640
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1641
				cout<<"你是否要逃跑"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1642
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1643
				cout<<"1.逃跑 2.加把油,干掉他"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1644
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1645 1646 1647 1648
				cin>>option;
				if(option==1)
				{
					cout<<"你成功逃跑"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1649
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1650
					cout<<"但是树神很生气"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1651
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1652 1653 1654 1655 1656 1657
					shushen=1;
					main12();
				}
				else
				{
					cout<<"树神开心的笑了"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1658
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1659
					cout<<"它很赞赏你的勇气"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1660
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1661
					cout<<"你遇到了---"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1662
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1663
					cout<<"树魔神"<<" "<<"等级:"<<"神阶满级"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1664
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1665 1666
					cout<<endl<<endl;
					cout<<"树神面色剧变"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1667
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1668
					cout<<"它已经决定让你成为继承人了 它不能让你死"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1669
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1670
					cout<<"树神"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1671
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1672
					cout<<"开始释放技能"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1673
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1674
					cout<<"神阶·千手顶上化佛"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1675
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1676
					cout<<"树魔神已被击败"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1677
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1678
					cout<<"可是树神已经奄奄一息 它已早不是神阶 这个技能耗费掉了它所有的生命"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1679
					Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1680 1681 1682
					if(attribute[2]!=1)
					{
						cout<<"树神:我的余力已经不足以培养你了"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1683
						Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1684
						cout<<"我余下的力量可赋予你的就只有这些了"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1685
						Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1686
						cout<<"恭喜你的属性变为双属性"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1687
						Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1688
						cout<<"恭喜你获得技能"<<" "<<"千手顶上化佛"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1689
						Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720
						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<<"开始释放技能";
道标 · 年's avatar
道标 · 年 已提交
1721
			Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1722 1723 1724 1725
			for(int i=1; i<=5; i++)
			{
				if(jineng[i]&&i==1)
				{
struct_cym's avatar
struct_cym 已提交
1726
					cout<<"火神术--"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1727 1728 1729 1730 1731
					cout<<"焚毁!"<<endl;
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
struct_cym's avatar
struct_cym 已提交
1732 1733 1734 1735 1736 1737 1738 1739 1740 1741
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
道标 · 年's avatar
道标 · 年 已提交
1742 1743 1744 1745
						jinyan+=(double)experience[(int)x]/10;
						return;
					}
				}
struct_cym's avatar
struct_cym 已提交
1746 1747 1748
				if(jineng[i]&&i==2){
					cout<<"木神术--"<<endl;
					cout<<"千手顶上化佛!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1749 1750 1751 1752
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
struct_cym's avatar
struct_cym 已提交
1753 1754 1755 1756 1757 1758 1759 1760 1761 1762
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
道标 · 年's avatar
道标 · 年 已提交
1763 1764
						jinyan+=(double)experience[(int)x]/10;
						return;
struct_cym's avatar
struct_cym 已提交
1765
					} 
道标 · 年's avatar
道标 · 年 已提交
1766
				}
struct_cym's avatar
struct_cym 已提交
1767 1768 1769
				if(jineng[i]&&i==3){
					cout<<"水神术--"<<endl;
					cout<<"水乱波!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1770 1771 1772 1773
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
struct_cym's avatar
struct_cym 已提交
1774 1775 1776 1777 1778 1779 1780 1781 1782 1783
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
道标 · 年's avatar
道标 · 年 已提交
1784 1785
						jinyan+=(double)experience[(int)x]/10;
						return;
struct_cym's avatar
struct_cym 已提交
1786
					} 
道标 · 年's avatar
道标 · 年 已提交
1787
				}
struct_cym's avatar
struct_cym 已提交
1788 1789 1790
				if(jineng[i]&&i==4){
					cout<<"土神术--"<<endl;
					cout<<"土淹!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1791 1792 1793 1794
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
struct_cym's avatar
struct_cym 已提交
1795 1796 1797 1798 1799 1800 1801 1802 1803 1804
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
道标 · 年's avatar
道标 · 年 已提交
1805 1806
						jinyan+=(double)experience[(int)x]/10;
						return;
struct_cym's avatar
struct_cym 已提交
1807
					} 
道标 · 年's avatar
道标 · 年 已提交
1808
				}
struct_cym's avatar
struct_cym 已提交
1809 1810 1811
				if(jineng[i]&&i==5){
					cout<<"金神术--"<<endl;
					cout<<"金光剑!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1812 1813 1814 1815
					temb-=5*10+attack[grade];
					cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
					if(temb<=0)
					{
struct_cym's avatar
struct_cym 已提交
1816 1817 1818 1819 1820 1821 1822 1823 1824 1825
						cout<<"你赢了";
						int n=rand()%20+1;
						if(n==1)
						{
							cout<<",你获得了碧水金睛兽一只";
						}
						else
						{
							cout<<",你获得了碧水珠";
						}
道标 · 年's avatar
道标 · 年 已提交
1826 1827
						jinyan+=(double)experience[(int)x]/10;
						return;
struct_cym's avatar
struct_cym 已提交
1828
					} 
道标 · 年's avatar
道标 · 年 已提交
1829
				}
struct_cym's avatar
struct_cym 已提交
1830
			} 
道标 · 年's avatar
道标 · 年 已提交
1831 1832 1833 1834 1835 1836
			int sum=0;
			while(true)
			{
				int y1=shanghai(x);
				tema-=y1+jianshang((int)defense[grade]);
				cout<<"树魔打出了"<<y1<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1837
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1838
				cout<<name<<"还剩"<<tema<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1839
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1840 1841 1842 1843 1844 1845 1846
				if(tema<=0)
				{
					cout<<"你落败了,等级-1"<<endl;
					grade--;
					return;
				}
				cout<<endl;
struct_cym's avatar
struct_cym 已提交
1847
				for(int i=1; i<=5; i++)
道标 · 年's avatar
道标 · 年 已提交
1848
				{
struct_cym's avatar
struct_cym 已提交
1849
					if(jineng[i]&&i==1)
道标 · 年's avatar
道标 · 年 已提交
1850
					{
struct_cym's avatar
struct_cym 已提交
1851
						cout<<"火神术--"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1852 1853 1854 1855 1856
						cout<<"焚毁!"<<endl;
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
struct_cym's avatar
struct_cym 已提交
1857 1858 1859 1860 1861 1862 1863 1864 1865 1866
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
道标 · 年's avatar
道标 · 年 已提交
1867 1868 1869 1870
							jinyan+=(double)experience[(int)x]/10;
							return;
						}
					}
struct_cym's avatar
struct_cym 已提交
1871 1872 1873
					if(jineng[i]&&i==2){
						cout<<"木神术--"<<endl;
						cout<<"千手顶上化佛!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1874 1875 1876 1877
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
struct_cym's avatar
struct_cym 已提交
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
道标 · 年's avatar
道标 · 年 已提交
1888 1889
							jinyan+=(double)experience[(int)x]/10;
							return;
struct_cym's avatar
struct_cym 已提交
1890
						} 
道标 · 年's avatar
道标 · 年 已提交
1891
					}
struct_cym's avatar
struct_cym 已提交
1892 1893 1894
					if(jineng[i]&&i==3){
						cout<<"水神术--"<<endl;
						cout<<"水乱波!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1895 1896 1897 1898
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
struct_cym's avatar
struct_cym 已提交
1899 1900 1901 1902 1903 1904 1905 1906 1907 1908
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
道标 · 年's avatar
道标 · 年 已提交
1909 1910
							jinyan+=(double)experience[(int)x]/10;
							return;
struct_cym's avatar
struct_cym 已提交
1911
						} 
道标 · 年's avatar
道标 · 年 已提交
1912
					}
struct_cym's avatar
struct_cym 已提交
1913 1914 1915
					if(jineng[i]&&i==4){
						cout<<"土神术--"<<endl;
						cout<<"土淹!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1916 1917 1918 1919
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
struct_cym's avatar
struct_cym 已提交
1920 1921 1922 1923 1924 1925 1926 1927 1928 1929
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
道标 · 年's avatar
道标 · 年 已提交
1930 1931
							jinyan+=(double)experience[(int)x]/10;
							return;
struct_cym's avatar
struct_cym 已提交
1932
						} 
道标 · 年's avatar
道标 · 年 已提交
1933
					}
struct_cym's avatar
struct_cym 已提交
1934 1935 1936
					if(jineng[i]&&i==5){
						cout<<"金神术--"<<endl;
						cout<<"金光剑!"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1937 1938 1939 1940
						temb-=5*10+attack[grade];
						cout<<name<<"打出了"<<5*10+attack[grade]<<"点伤害"<<endl;
						if(temb<=0)
						{
struct_cym's avatar
struct_cym 已提交
1941 1942 1943 1944 1945 1946 1947 1948 1949 1950
							cout<<"你赢了";
							int n=rand()%20+1;
							if(n==1)
							{
								cout<<",你获得了碧水金睛兽一只";
							}
							else
							{
								cout<<",你获得了碧水珠";
							}
道标 · 年's avatar
道标 · 年 已提交
1951 1952
							jinyan+=(double)experience[(int)x]/10;
							return;
struct_cym's avatar
struct_cym 已提交
1953
						} 
道标 · 年's avatar
道标 · 年 已提交
1954
					}
struct_cym's avatar
struct_cym 已提交
1955
				} 
道标 · 年's avatar
道标 · 年 已提交
1956 1957 1958
				int y2=shanghai((int)attack[grade]);
				temb-=y2+jianshang(temf);
				cout<<name<<"打出了"<<y2<<"点伤害"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1959
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1960
				cout<<"树魔还剩"<<temb<<"滴血"<<endl;
道标 · 年's avatar
道标 · 年 已提交
1961
				Sleep(1);
道标 · 年's avatar
道标 · 年 已提交
1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422
				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();
	}
struct_cym's avatar
struct_cym 已提交
2423
}
道标 · 年's avatar
道标 · 年 已提交
2424