人生之路1.20代码 第五部分

代码不止这一段,不止这一段,不止这一段!!!

点击可查看完整代码

							  	printf("失败!%s死亡",a.name.c_str());
							  	dead(me.gang,us);//死后需清除其数据 
							  	if (a.name==name)
							  	  Die();
							  	int lost=random(359932,5083921);
							  	printf("损失%d元",lost);
							  	things[7]-=lost;
							  }
							if (b.hp<=0)
							  {
							  	if (gang[me.gang].peo[us].name==name)
							  	  things[306]++;
							  	if (things[306]>=50)
							  	  hdcj(62);
							  	gangth+=gang[me.gang].peo[us].name+"在帮派战役中杀死了"+gang[j].name+"的"+gang[j].peo[enemy].name+"/";
							  	int got=random(187903,3829183);
							  	printf("胜利!获得%d元",got);
							  	things[7]+=got,gotmoney+=got;
								dead(j,enemy);
							  }
							gs();
							if (gang[me.gang].pnum==0)
							  {
							  	gangth+=gang[me.gang].name+"在帮派战役中被"+gang[j].name+"灭了/";
							  	Sout("你的帮派被灭掉了!\n");
							  	Sleep(1000);
								Sout("你损失了所有钱财!");
								things[7]=0; 
								me.gang=0;
							  }
							if (gang[j].pnum==0)
							  {
							  	gangth+=gang[me.gang].name+"在帮派战役中被灭掉了"+gang[j].name+"/";
							  	Sout(gang[j].name);
							  	Sout("从此覆灭...");
							  	Sleep(1000);
							  	Sout("你获得大量金钱!\n");
							  	int got=random(509835,8898372);
							  	things[7]+=got,gotmoney+=got;
							  	break;
							  }
						  }
						break;
					}
				case '6':
					{
						if (things[200]==0)
						  {
						  	printf("还未收到申请呢...");
						  	gs();
						  }
						int i,j;
						people ask[31];//上限30
						things[200]=min(int(things[200]),30); 
						for(i=1;i<=things[200];i++)
						  ask[i]=born(me.gang);
						printf("Num\t\tName\t\t Hp \t\tAtk\t\tDfc\n");
						for(i=1;i<=things[200];i++)
						  printf("%3d\t\t%s\t\t%4d\t\t%3d\t\t%3d\n",i,ask[i].name.c_str(),ask[i].hp,ask[i].attack,ask[i].defence);
						printf("输入序号即可,以-1结束\n");
						do
						  {
						  	cin>>j;
						  	gangth+=ask[j].name+"加入了帮派/";
						  	if (j>=1&&j<=things[200])
						  	  join(me.gang,1,ask[j]);
						  }
						while(j!=-1&&gang[me.gang].pnum<50);
						things[200]=0;
						break;
					}
				case '7':return;
		  }
		  }
	  }
}
void City()
{
	use(69);
	cls();
	const string where[]={"竞技场","书店","银行","宠物店","离开","帮派"};
	int i,j,k,n,m;
	char l;
	while(1)
	  {
	  	cls();
	  	char l;
	  	for(i=0;i<1000;i++)
	  	  if (kbhit())
	  	    l=getch();//垃圾收集器 
	  	printf("你想去哪里,按下序号\n");
	  	for(i=0;i<6;i++)
	  	  printf("%d.%s\n",i,where[i].c_str());
	  	l=_getch();
	  	switch(l)
	  	  {
	  	  	case '0':Jingji();break;
	  	  	case '1':Bookstore();break;
	  	  	case '2':Bank();break; 
	  	  	case '3':PetShop();break;
	  	  	case '4':return;
	  	  	case '5':fac();break;
		  }
	  }
}
void Soc()
{
	const string where[]={"家","赌场(“财源滚滚”)","人力市场(打工,找工作,挂机收益等等)","游乐场(休闲娱乐+赚点小钱)","小森林(阴森诡异)","超市(购物)","背包","公园(公告什么的)","存档并退出","市中心(建设中)"};
	int i,j,k,n,m;
	while(1)
	  {
	  	cls();
	  	char l;
	  	for(i=0;i<1000;i++)
	  	  if (kbhit())
	  	    l=getch();//垃圾收集器 
	  	cout<<" Day "<<things[16]+((things[10]-6)*30)<<'\n';
	  	printf("你想去哪里,按下序号\n");
	  	for(i=0;i<10;i++)
	  	  printf("%d.%s\n",i,where[i].c_str());
	  	if (things[188]==1)
	      l=choose(7)+'0';
	    else
	  	  l=_getch();
	  	switch(l)
	  	  {
	  	  	case '0':home();break;
	  	  	case '1':Duchang();break;
	  	  	case '2':market();break;
	  	  	case '3':carnie();break;
	  	  	case '4':forest();break;
	  	  	case '5':shop();break;
	  	  	case '6':
	  	  		{cls();
				
	    	  const string w[]={"棒棒糖","面包","矿泉水","小瓶子","玩具枪"};
	    	  for(i=11;i<16;i++)
	    	    printf("%d.%s*%d\n",i,w[i-11].c_str(),things[i]);
	    	  printf("u.使用\n");
	    	  printf("e.出售\n");
	    	  printf("x.退出\n");
	    	  char m;
	    	  m=_getch();
	    	if (m=='u')
	    	  {
	    	  	printf("用哪个?");
	    	  	cin>>j;
	    	  	printf("用几个?");
	    	  	cin>>k;
	    	  	if (things[j]>=k)
	    	  	  {
	    	  	  	things[j]-=k;
	    	  	  	for(int jj=1;jj<=k;jj++)
	    	  	  	for(int ii=0;ii<10;ii++)
	    	  	  	  things[ii]+=xiaoguo[j][ii];
					}
				break;
			  }
			if (m=='x')
			  break;
			printf("你想卖掉哪个?输入序号和数量");
			int ll,ss;
			cin>>ll>>ss;
			if (things[ll]>=ss)
			  ll-=ss,things[7]+=much[ss],gotmoney+=much[ss];
			else
			  cout<<"不存在的";
			break;}
			case '7':park();break;
			case '8':Write_File();me.play+=clock(),exit(0);
			case '9':City();break;
			case 'r':if (things[0]==7) return;break;
			}
			if (things[0]>5)
			  return;
			gs();
	  }
}
void War()
{
	use(70);
	happened+=(name+"在某地和MCYH决斗/");
	hdcj(33);
	//2,5,6
	int hp,attack,run;
	int H,A,R;
	hp=things[9]*random(46,67);
	attack=things[9]*random(11,18);
	run=things[9]*random(4,6);
	H=hp,A=attack,R=run;
	cout<<"你的信息:你拾取了MCYH给你的量子剑\n";
	cout<<"血量:"<<things[2]<<"\t攻击:"<<things[5]<<"\t防御:"<<things[6]<<'\n';
	cout<<"技能:量子充能:对敌人造成自身最大生命40%伤害。增强:并恢复伤害的80%\n\n\n";
	cout<<"敌人:创世之神·MCYH\n";
	cout<<"职业:程序员 主要职责:编写代码\n";
	cout<<"血量:"<<hp<<"\t攻击:"<<attack<<"\t防御:"<<run;
	cout<<"\n";
	cout<<"技能:\n";
	cout<<"纳米剑蓄力:MCYH挥动纳米剑对敌人造成450%攻击的伤害,如果敌人生命值低于50%则伤害提高5倍\n";
	cout<<"时间裂隙:MCYH消耗敌人最大生命值的25%生命(如果使用后生命值低于1则将血量恢复至1点),开启时间裂隙。在时间裂隙中每秒恢复最大生命值生命的15%持续3秒,从裂隙出来时会伏击敌人造成200%攻击伤害\n";
	cout<<"嗜血魔剑:挥动魔剑造成敌人最大生命15%的伤害,该次攻击带有300%吸血效果\n";
	cout<<"强互作用引力盾:开场时用强互作用引力剑召唤一个持续70秒的护盾,此护盾不能抵挡伤害,但是护盾存在期间不会受到附魔以及除了量子剑以外所有武器的伤害\n" ;
	cout<<"速战速决:当战斗时间超过15秒时发动,用纳米细丝将敌人切碎,无视免疫和闪避。\n";
	cout<<"欺诈盟约:攻击时有15%概率触发,用自身10%当前生命治疗敌人,然后偷取敌人15%攻击\n";
	cout<<"轮回:当自身死亡时使用,将时间回溯至一伀倀儀刀匀吀唀嘀圀堀夀娀嬀尀崀嬀帀开怀堀愀戀挀搀攀昀最栀椀樀欀氀洀?渀(此处为字迹不清的资料)\n";
	cout<<"组合双剑:被动的,战斗中MCYH只会使用嗜血魔剑,每次攻击造成120%~180%攻击力伤害,纳米剑以及强互作用引力之剑在空中飞行,纳米剑会找机会对敌人造成23%已损失生命,强互作用引力之剑会找准机会挡下你的攻击\n";
	cout<<"被动:被动的,吸血+80%,荆棘30%\n";
	cout<<"按下任意键开始决斗!\n";
	gs();
	int a=things[2],b=things[5],c=things[6];
	int x,y,x1,y1;
	x=15,y=27;
	x1=15,y1=40;
	int energy=1,time1=1,time3=1,time4=1;
	long long last;
	time_t t12;
	time(&t12);
	last=t12;
	while(a>0&&hp>0)
	  {
	  	time_t t13;
	  	time(&t13);
	  	if (t13!=last)
	  	  {
	  	  	time1++,time3++,time4++,energy++;
	  	  	hp+=H*0.02;
		  }
		last=t13;
	  	gotoxy(0,0);
	  	cout<<"YOUR_HP:"<<a<<"\t\t\t"<<"MCYH_HP:"<<hp<<'\n';
	  	cout<<"操作提示:WASD移动,空格攻击,按Q使用技能(还差"<<10-energy<<"点能量就可以释放了!)\n";
	  	char l='.';
	  	int n,m,i,j,k;
	  	n=random(1,4);
	  	if (x<5)
	  	  x=5;
	  	if (y<5)
	  	  y=5;
	  	if (x>35)
	  	  x=35;
	  	if (y>60)
	  	  y=60;
	  	if (x1<5)
	  	  x1=5;
	  	if (y1<5)
	  	  y1=5;
	  	if (x1>35)
	  	  x1=35;
	  	if (y1>60)
	  	  y1=60;
	  	gotoxy(x,y);
	 // 	color(6);
	  	cout<<"♀";
	  	gotoxy(x1,y1);
	  //	color(7);
	  	cout<<"♀";
	  //	color(0);
	  	if (kbhit())
		   l=_getch();
		if (rand()%13==7)//纳米之剑攻击
		  {
		  	int hurt=(A-a)*0.23;
			gotoxy(x-2,y);
			cout<<'-'<<hurt;
			a-=hurt; 
		   } 
		 //判断我方
		switch(l)
		  {
		  	case 'w':x--;break;
		  	case 'a':y--;break;
		  	case 'd':y++;break;
		  	case 's':x++;break;
		  	case ' ':if (x-x1<=5&&x1-x<=5&&y1-y<=5&&y-y1<=5&&rand()%9!=5){hp-=(b-run);gotoxy(x1-1,y1);cout<<"-"<<b-run;energy++;a-=(b-run)*0.4;}break;
		  	case 'q':gotoxy(40,35);cout<<"量子充能!";if (x-x1<=10&&x1-x<=10&&y1-y<=10&&y-y1<=10){hp-=(things[2]*0.4-run);gotoxy(x1-1,y1);cout<<"-"<<(things[2]*0.4-run);a+=(things[2]*0.4-run)*0.8;energy=0;}break;
		  }
		//判断敌方
		switch(n)
		  {
		  	case 1:x1--;break;
		  	case 2:y1--;break;
		  	case 3:y1++;break;
		  	case 4:x1++;break;
		   } 
		if (rand()%2)
		  {
		  	if (x-x1<=5&&x1-x<=5&&y1-y<=5&&y-y1<=5)
		  	  {
		  	  	int hurt=(attack-c)*(random(120,180)/100.0);
		  	  	a-=hurt;
		  	  	hp+=hurt*0.8;
		  	  	gotoxy(x-1,y);
				cout<<"-"<<hurt;
				time1++,time3++,time4++;
				if (rand()%6==3)
				  attack+=b*0.15,b*=0.85,a+=hp*0.1,hp*=0.9; 
				//  10    11      7
			  }
		  }
		//敌方技能 
		if (time1>=10)
		  {
		  	gotoxy(40,35);
		  	cout<<"纳米剑蓄力";
		  	n=attack*4.5-c;
		  	if (a<=things[2]*0.5)
		  	  n*=5;
		  	gotoxy(x-1,y);
		  	cout<<"-"<<n;
		  	if (a<=things[2]*0.5)
		  	  cout<<" 终结!";
		  	a-=n;
		  	time1=0;
		  }
		if (time3>=11)
		  {
		  	a-=H*0.25;
		  	if (a<1)
		  	  a=1;
		  	for(i=1;i<=3;i++)
		  	  {
		  	  	gotoxy(x1-1,y1);
		  	  	cout<<"+"<<H*0.15;
		  	  	hp+=H*0.15;
		  	  	Sleep(1000);
			  }
			gotoxy(x-1,y);
			cout<<"-"<<attack*2-c;
			a-=attack*2-c;
			time3=0;
		  }
		if (time4>=9)
		  {
		  	gotoxy(40,35);
			  cout<<"嗜血魔剑"; 
		  	n=A*0.15;
		  	a-=n;
		  	gotoxy(x-1,y);
		  	cout<<'-'<<n;
		  	n*=3;
		  	hp+=n;
		  	gotoxy(x1-1,y1);
		  	cout<<"+"<<n;
		  	time4=0;
		  }
		if (hp<=0)
		  {
		  	gotoxy(40,35);
		  	cout<<"轮回";
		  	Sleep(2000);
		  	cls();
		  	hdcj(34);
		  	Sout("MCYH:仔细看过资料了吧。");
		  	gs();
		  	Sout("MCYH:【轮回】那一栏是字迹不清的。");
		  	gs();
		  	Sout("MCYH:给你重新看看完整的:");
		  	gs();
		  	Sout("MCYH:轮回:当自身死亡时使用,将时间回溯至游戏刚开始时的状态。");
		  	gs();
		  	Sout("MCYH:那么,再见啦~");
		  	poem();
			things[10]=6;
			if (things[34+99]&&things[35+99])
			  hdcj(43);
	  		happened+=(name+"击败了创世神/");
	  		happened+=(name+"被MCYH传送回了6岁那年/");
	  		things[202]=1;
	  		return;
		  }
		if (a<=0)
		  {
		  	Sout("MCYH:你不行啊。。。回去多练练再来。。。");
		  	gs();
		  	War();
		  	happened+=(name+"MCYH获得1杀/");
		  	things[0]--;
		  	Soc();
		  }
		cls();
	  }
}
string pellect[80]=
{
//占位符 
"",
//    206          207		  	  208				209			210				211				212
"丹药(普通)","丹药(精良)","仙丹(稀有)","仙丹(罕见)","神丹(传说)","神丹(神话)","神丹(神话+)",
//	213				214				215					216					217					218					219
"紫金丹(普通)","紫金丹(精良)","紫金仙丹(稀有)","紫金仙丹(罕见)","紫金神丹(传说)","紫金神丹(神话)","紫金神丹(神话+)",//红+蓝=紫,常识。吃完成仙 
// 220					221						222					223						224						225					226
"黑暗紫金丹(普通)","黑暗紫金丹(精良)","黑暗紫金仙丹(稀有)","黑暗紫金仙丹(罕见)","黑暗紫金神丹(传说)","黑暗紫金神丹(神话)","黑暗紫金神丹(神话+)",//黑+紫=暗紫,常识。吃完成魔 
"","","","","","","","","","","","","","","","","","","",
//246		247		248		249
"红水晶      ","紫水晶      ","蓝水晶      ","黑水晶      ",
//250		251		252		253			254		255		256
"仙丹石      ","奥玄石      ","白虎石","朱雀石","青龙石","玄武石","麒麟内丹",
//257		258		259		260    261
"麒麟石","彩陶石","元神","","" 
};
//                 0  1     2    3     4      5       6       7          8     9     10   11     12       13          14     15   16     17     18     19        20     21                                                                                                                                                                                                                                                                                                                                                                       
const int addxp[]={0,2500,8000,50000,300000,1500000,10200000,105000000,8000,50000,348790,883739,5599883,45938212,327683920,8000,50000,483922,1293821,7839200,47382990,319382995};
int maketb[30][3][3]=//-205 (41)
{
	{//占位符 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//普通丹 
		45,45,45,
		45,45,45,
		45,45,45,
	},
	{//二级丹 
		45,1,45,
		1,1,1,
		45,1,45,
	},
	{//三级丹 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//四级丹 
		3,1,2,
		1,1,2,
		3,1,2, 
	},
	{//五级丹 
		4,2,3,
		2,2,3,
		4,2,3,
	},
	{//六级丹 
		5,3,4,
		3,3,4,
		5,3,4,
	},
	{//七级丹 
		6,4,5,
		4,46,5,
		6,4,5,
	},
	{//一级仙丹 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//二级仙丹 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//三级仙丹 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//四级仙丹 
		8,41,7,
		42,41,42,
		8,41,7,
	},
	{//五级仙丹 
		9,42,8,
		41,42,41,
		9,41,8,
	},
	{//六级仙丹 
		10,41,9,
		 42,46,41,
		10,42,9,
	},
	{//七级仙丹 
		46,41,10,
		 42,41,42,
		11,42,46,
	},
	{//一级魔丹 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//二级魔丹 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//三级魔丹 
		-2,-2,-2,
		-2,-2,-2,
		-2,-2,-2,
	},
	{//四级魔丹 
		17,44,16,
		43,43,43,
		17,44,16,
	},
	{//五级魔丹
		18,44,17,
		46,43,46,
		18,44,17, 
	},
	{//六级魔丹 
		19,43,18,
		46,44,46,
		19,44,18,
	},
	{//七级魔丹
		20,43,19,
		45,46,44,
		20,46,19, 
	},
};
void make_pills()
{
	int a,b,c,d;
	for(a=1;a<=21;a++)
	  for(b=0;b<3;b++)
	    for(c=0;c<3;c++)
	      if (maketb[a][b][c]>=1&&maketb[a][b][c]<=30)
	        maketb[a][b][c]+=205;
	if (things[270]==0)
	  {
	  	printf("没有炼丹炉!\n");
	  	printf("是否合成一个?\n");
	  	printf("合成方式:\n");
	  	printf("铁块  空  铁块\n");
	  	printf("铁块  空  铁块\n");
	  	printf("铁块 铁块 铁块\n");
	  	if (_getch()!='N'&&_getch()!='n')
		  if (fost[24]>=7)
		    things[270]=1,fost[24]-=7;
		  else
		    printf("铁块不足!");
		else
		  return; 
	  }
	if (things[270]>=1)
	  {
	  	bool breAk=1;
	  	while(breAk)
	  	  {
	  	  	printf("1.查看合成表 2.炼丹 3.使用丹药 4.离开\n");
	  	  	char l;
	  	  	l=_getch();
	  	  	switch(l)
	  	  	  {
	  	  	  	case '1':
	  	  	  		{
	  	  	  			int i,j=1,k=1;
	  	  	  			char g;
	  	  	  			while(j)
	  	  	  			  {system("cls");
	  	  	  			  	printf("a,d切换 q退出\n");
	  	  	  			  	printf("%s\n",pellect[k].c_str());
	  	  	  			  	if (maketb[k][0][0]==-2)
	  	  	  			  	  printf("不可合成");
	  	  	  			  	else
	  	  	  			  	  printf(" %s \t %s \t %s\n %s \t %s \t %s\n %s \t %s \t %s\n",pellect[maketb[k][0][0]].c_str(),pellect[maketb[k][0][1]].c_str(),pellect[maketb[k][0][2]].c_str(),pellect[maketb[k][1][0]].c_str(),pellect[maketb[k][1][1]].c_str(),pellect[maketb[k][1][2]].c_str(),pellect[maketb[k][2][0]].c_str(),pellect[maketb[k][2][1]].c_str(),pellect[maketb[k][2][2]].c_str());
						    g=_getch();
						    switch(g)
						      {
						      	case 'a':if (k>1)k--;break;
						      	case 'd':if (k<21)k++;break;
						      	case 'q':j=0;break;
							  }
						  }
						break;
					}
				case '2':
					{
						for(i=1;i<=47;i++)
						  if (things[i+205]>0)
						    printf("%d.%s*%d\n",i,pellect[i].c_str(),things[i+205]);
						printf("输入合成表(3*3)\n");
						int i,j,k,flag=1;
						int making[3][3];
						for(i=0;i<3;i++)
						  for(j=0;j<3;j++)
						    scanf("%d",&making[i][j]);
						for(i=1;i<=21;i++)
						  {
						  for(j=0;j<3;j++)
						    for(k=0;k<3;k++)
						      if (making[j][k]!=maketb[i][j][k])
						        {
						        	flag=0;break;
								}
							if (j>2&&k>2)
							  break;
							}
						if (i>21)
						  {
						  	printf("找不到此合成表");
						  	gs();
						  	break;
						  }
					int n=i;
					cout<<"做几个 "<<pellect[n]<<" ?";
					int l1;
					cin>>l1;
					int get[2001];
					memset(get,0,sizeof(get));
					for(i=0;i<2000;i++)//仿制森林工作台,不过数据开多了点... 
					  get[i]=things[i]; 
					bool can=true;
					for(i=0;i<3;i++)
					  for(j=0;j<3;j++)
					    if (maketb[n][i][j]>=0)
					    if (get[maketb[n][i][j]]<l1)
					      {
					      	can=false;
					      	break;
						  }
						else
						  get[maketb[n][i][j]]-=l1;
					if (can==0)
					  {
					  	cout<<"材料不足!,缺少"<<i<<','<<j<<'\n';
					  	gs();
						break; 
					  }
					  for(i=0;i<3;i++)
					    for(j=0;j<3;j++)
					      {
					      	if (maketb[n][i][j]!=-1)
					      	{
					      	  things[maketb[n][i][j]]-=l1;
					        }
						  }
						things[n+205]+=l1;
						break;
					}
				case '3':
					{
						int i,j,k;
						for(i=206;i<=226;i++)
						  if (things[i]>0)
						    printf("%d.%s*%d\n",i-205,pellect[i-205].c_str(),things[i]);
						printf("Enter what do you want to use?\n");
						scanf("%d",&j);
						printf("Enter how much do you want to use?\n");
						scanf("%d",&k);
						if (things[304]==0)
						  {
						    if (j>=8&&j<=14)
						      {
						        printf("吃完紫金丹后,你变成了神...");
						        gs();
								things[270]=2;
						      }
						    if (j>=15&&j<=22)
						      {
						      	printf("吃完黑暗紫金丹后,你变成了魔...");
						      	gs();
						      	things[270]=1;
							  }
						  }
						if (things[304]==1&&j>=8&&j<=14)
						  {
						  	printf("你是魔,不能吃神的东西...");
						  	gs();
						  	break;
						  }
						if (things[304]==2&&j>=15&&j<=21)
						  {
						  	printf("你是神,不能吃魔的东西...");
						  	gs();
						  	break;
						  }
						if (things[j+205]>=k)
						  {
						  	if (rand()%15==7)
						  	  {
						  	  	Sout("You feel disgust after you eat it... hp-50 xp-3000");
						  	  	things[1]-=3000,things[2]-=50;
						  	  	if (things[2]<=0)
						  	  	  Die();
						  	  	break;
							  }
						  	printf("Successful use!  ");
							printf("XP+%lld\n",addxp[j]*(things[9]/100+(things[9]%100/10)*5)+things[9]%10*5000*k*1000);
						  	things[j+205]-=k;
						  	//经验=提供经验*(等级百位+等级十位*5)+个位*5000
							things[1]+=addxp[j]*(things[9]/100+(things[9]%100/10)*5)+things[9]%10*5000*k*1000;
							sheng(); 
						  } 
						else
						  printf("The data is not enough.");
						gs();
						break;
					}
				case '4':breAk=0;break;
			  }
		  }
	  }
}
const string ques[]=
//				1								2						3									4
{"","你好啊,小伙子。是来找我谈opra的事的吧","不谈就走开!","你知道oprat世界是哪个scientist发现的吗?","不是吧,你没看过公告吗?是Copra啊。不过后来他被一种viru感染了,因为他不是opration",
//		5															6											7
"不错,你对oprat的历史还是挺了解的,那你肯定知道MCYH吧","那是创世神啊,怎么会是human的scientist呢?","不用担心,你已经150级了,算是个弱X的opration了,不会感染的,MCYH会保护你的",
// 8														9						10
"既然谈到MCYH了,那你知道吗,曾经有个人击败过他呢!","是吗?那你用的什么武器?","敢骗我?就那种破剑怎么破得了他的盾?快出去!",
//		11															12										13
"你看就知道你在骗我,opration的记忆力没这么差,快出去!","哇,那你一定是那位转世重修者吧!(欣喜若狂)","我还没见过MCYH呢,他长什么样啊?",
// 14
"...(外面轰隆一声,你的魂魄被震出了肉体,元神大损,MCYH操纵了对你施展了九重雷劫,你的修行不够,魂魄分裂了。有一小部分重新转世了)",
// 15														16										17
"是吗?果然如传言所说啊。你可能会成为新的创世神呢!","那肯定啊,MCYH打个响指(口误)...都能干掉你","你还是可能成为新创世神的,毕竟MCYH很快要去另一个平行世界了",
// 18																			19											20
"不会了。MCYH在每个世界都会安排一个创世神,你就是他从另一个世界带来的。","如果你当创世神,就不用继续轮回下去了。","只要你修行足够,MCYH会来找你的",
//21																			22						23
"好了,我们讨论一下修仙的事吧。你知道你是谁,从哪来,到哪去了吗?", "不错,你已经开始悟到了你的本源道","你的修行还不够呢,这只是肤浅的理解而已",
//24								25
"当你升到200级的时候会理解的","据说,要成为创世神,需要历经本源大劫、九重雷劫及五行之中任意一劫。需要极高的修行,否则可能要重新轮回转世重修(很麻烦)",
//26				27												28			29															  
"你炼过仙丹吗?","炼丹是一件神圣庄严的事情,你一定要庄严对待","你会炼丹吗?","我们寺庙的后院可以烧香,只要心诚,则可心想事成,还能获得大量XP",
//30																31								32
"所谓炼丹,不仅仅是XP的获取,还有对道的领悟,对Heart的修养。","你平时可以来后院买点香纸","那太好了(又可以赚钱了),我们随时欢迎你",
//33								34								  	35
"能不能好好说话啊。。。","既然施主如此吝啬,那我只好扣除一些XP了","你是想修雷电大法、五行之术还是本源大道呢?",
//36
"好啊,学了这个你可以轻松度过九重雷劫,可以互相抵消,而且杀伤力也极高,一直是MCYH攻击的主要招式,当年的恶魔领主就是被此术击碎的",
//37
"好啊,学了这个你可以轻松控制世间万物,并轻松度过五行之劫,比雷电大法更加实用(和平年代用不着雷电大法)",
//38
"好啊,悟道本源大道之后,你可以知生死、预测未来,是成为上神的必修课程",
//39													40
"好啊,既然你这么好学,成为创世神有希望了(哈哈)", "好了,今日陪你叙述到此,下次有缘再谈。",
};
const string answ[]=
//	 	   1	2		3		4		5		6  		  7					8			9			10					11
{"别选我","是","不是","Ropca","Pocra","Copra","MCYH","我会感染那种viru吗?","继续吧","就是我啊","是吗,我不认识那人哦","开玩笑",
// 12        13		14		 15	    	16		17			18						19				 20
 "英雄剑","虚空剑","量子剑","忘了","没错就是我","帅爆了","丑爆了(轮回警告)","他戴了个面具,没看清","哪里,MCYH根本没认真和我打",
//21			22		23				24		25					26					27						28
  "可能会呢","那必须的","我可没那么弱","确实","他还回来吗?","我明白了,继续吧","那我要怎样才能成为创世神呢?","继续吧",
//29		30		31		32		33			34			35		36			37		   38	  39
 "P H D","E D C","G E F","P A C","请老师傅赐教","当然炼过","没有","一定一定","我才不要","当然会","不会",
//40			41			42		43		44			45
"下次一定","下次丕定","雷电大法","五行之术","本源大道","我全都要",
};
const int choosen[][13]=//0表示选项的数量 1~4表示选项对应答案编号,5~8为1~4答案的经验数量 9~12为1~4答案通向的下一个问题 0为无 
{
	0, 0,0,0,0, 0,0,0,0, 0,0,0,0,//0			//0占位符 
	2, 1,2,0,0, 1500,-1000,0,0, 3,2,0,0,//1			//表示2个选项,问完问题后,如果选择“是”则通往问题2,否则返回 
	1, -1,0,0,0, 0,0,0,0, -1,0,0,0,//2
	4, 3,4,5,6, 200,200,80000,40000, 4,4,5,6,//3
	1, 7,0,0,0, 500,0,0,0, 7,0,0,0,//4
	1, 8,0,0,0, 80000,0,0,0, 8,0,0,0,//5
	1, 8,0,0,0, 4000,0,0,0, 8,0,0,0,//6
	1, 8,0,0,0, 5000,0,0,0, 8,0,0,0,//7
	3, 9,10,11,0, 100000,200000,5000,0, 9,16,16,0,//8
	4, 12,13,14,15, -100000,-100000,5000000,-2000, 10,10,12,11, //9
	1, -1,0,0,0, -10000,0,0,0, -1,0,0,0,//10
	1, -1,0,0,0, -10000,0,0,0, -1,0,0,0,//11
	1, 16,0,0,0, 80000000,0,0,0, 13,0,0,0,//12
	3, 17,18,19,0, 666666666,-666666666,50000000,0, 15,14,15,0,//13
	0, 0,0,0,0, 0,0,0,0, 0,0,0,0,//14 		写什么都无所谓啦 
	3, 20,21,22,0, 10000000,5000000,8000000,0, 16,17,17,0,//15
	2, 23,24,0,0, 50000000,50000000,0,0, 17,18,0,0,//16
	1, 25,0,0,0, 100,0,0,0, 18,0,0,0,//17
	1, 26,0,0,0, 100,0,0,0, 19,0,0,0,//18
	1, 27,0,0,0, 100,0,0,0, 20,0,0,0,//19
	1, 28,0,0,0, 1000,0,0,0, 21,0,0,0,//20
	4, 29,30,31,32, 800000000,5,5,5, 22,23,23,23,//21
	1, 28,0,0,0, 1000,0,0,0, 25,0,0,0,//22
	1, 33,0,0,0, 100,0,0,0,  24,0,0,0,//23
	1, 28,0,0,0, 100,0,0,0,  25,0,0,0,//24
	1, 28,0,0,0, 1000,0,0,0, 26,0,0,0,//25
	2, 34,35,0,0, 10000000,1000000,0,0, 27,28,0,0,//26
	2, 36,37,0,0, 250000000,-100000000,0,0, 29,27,0,0,//27 (选项2就无限循环了) 
	2, 38,39,0,0, 320000000,130000000,0,0, 30,30,0,0,//28  懒得写那么多了
	3, 40,41,37,0, 560000000,-320000000,-800000000,0, 32,33,34,0,//29
	1, 26,0,0,0, 10000,0,0,0, 31,0,0,0,  //30
	1, 28,0,0,0, 1,0,0,0, 29,0,0,0,  //31 
	1, 28,0,0,0, 0,0,0,0, 35,0,0,0, //32
	1, 28,0,0,0, 0,0,0,0, 35,0,0,0, //33
	1, 28,0,0,0, 0,0,0,0, 35,0,0,0, //34
	4, 42,43,44,45, 50000000,80000000,150000000,100000000, 36,37,38,39,  //35
	1, 28,0,0,0, 1,0,0,0, 40,0,0,0,//36
	1, 28,0,0,0, 1,0,0,0, 40,0,0,0,//37
	1, 28,0,0,0, 1,0,0,0, 40,0,0,0,//38
	1, 28,0,0,0, 1,0,0,0, 40,0,0,0,//39
	1, -1,0,0,0, 0,0,0,0, -1,0,0,0,//40
	
};
void talk(int x,long long &gxp)//问题,gxp为getxp的缩写,表示获取的经验数量 
{
	if (x==27)
	  things[305]++;
	if (things[305]>4)
	  hdcj(61);
	int i,j,k;
	printf("获得XP:%lld\n",gxp);
	Sout("主侍:"+ques[x]+'\n');
	if (x==14)
	  {//是不是很眼熟(初始化代码) 
	  	things[7]=800;
		things[2]=100;
		things[3]=50;
		things[4]=50;
		things[5]=30;
		things[6]=5;
		things[8]=100;
		things[9]=1;
		things[10]=6;
		things[18]=1;
		things[30]=720;
		things[34]=11901;
		for(int i=1;i<30;i++)
	 	  {
	  		gang[i].pnum=random(2,40);
	  		gang[i].name=randstr(5,21);
	  		for(int j=1;j<=gang[i].pnum;j++)
	  	  	  {
	  	  		gang[i].peo[j]=born(i);
		  	  }
			gang[i].leader=random(1,gang[i].pnum);
	  	  }
		time_t dl;
		time(&dl);
		start=dl; 
		things[0]=1;
		memset(renwu,0,sizeof(renwu));
		Write_File(); //想杜绝存档回复,及时存档很重要 
	    show();
	  }
	for(i=1;i<=choosen[x][0];i++)
	  if (choosen[x][i]==-1)
	    printf("%d.离开\t");
	  else
	    printf("%d.%s\t",i,answ[choosen[x][i]].c_str());
	char l=_getch();
	j=l-'0';
	gxp+=choosen[x][j+4];
	if (choosen[x][j+8]==-1||choosen[x][j]==-1)
	  return;
	talk(choosen[x][j+8],gxp);
} 
void fane()
{
	int i,j,k;
	char l;
	const string place[]={"主侍(Level>=150)","Secret Room(Level>=250)","烧香(money-50000)","后山(魔不能来)","离开"};
	while(1)
	  {
	  	for(i=0;i<5;i++)
	  	  printf("%d.%s\n",i,place[i].c_str());
	  	l=_getch();
	  	switch(l)
	  	  {
	  	  	case '0':
				{
				  if (things[9]<150) 
				    {
				      Sout("主侍:你的修行还不够呢,等升到150级再来找我吧。");
					  break;
					}
				  cls();
				  long long gxp=1000;
				  things[305]=0;
				  talk(1,gxp);
				  gxp*=(things[9]/100+(things[9]%100/10)*5)+things[9]%10*5000;
				  float c=random(80,650);
				  c/=100.0;
				  cls();
				  printf("翻倍:%d%%\n",int(c*100));
				  gxp*=c;
				  printf("XP+%lld",gxp);
				  things[1]+=gxp;
				  if (gxp>100000000)
				    if (rand()%15==6)
				      things[260]++;//默默赠送 
				  sheng();
				  gs();
				  break;
				}
			case '1':
				{
					time_t t1;
					time(&t1); 
					if (t1<things[301]+7200)
					  {
					  	printf("请在%d秒后再来。",things[271]+7200-t1);
					  	gs();
					  	break;
					  }
					if (things[9]<250) 
				      {
				      Sout("你的修行还不够呢,等升到250级再进来吧。");
					  break;
					  }
					cls();
					Sout("嘎吱——(开门声)");
					Sout("吼...吼...\n");
					Sout("你顺着叫声往里面走去\n");
					Sout("砰的一声,门关上了...\n");
					Sout("怪声:嘿嘿");
					if (things[304]==0)
					  {
					    Sout(",原来是个普通的opration啊,嘿嘿...\n");
					    Sout("逃跑");
					    int m=gongji(1000);
					    if (m>1000)
					      {
					      	Sout("逃跑成功!\n");
					      	break;
						  }
						else
						  {
						  	Sout("你受到了重伤!元神大损\n");
						  	int x,y;
						  	x=random(5000,20000),y=random(200000000,500000000);
						  	printf("hp-%d xp-%d",x,y);
						  	things[2]-=x,things[1]-=y;
						  }
					  }
					if (things[304]==1)
					  {
					  	time(&t1);
					  	things[301]=t1;
					  	Sout(",原来你是个小鬼啊...嘿嘿...\n");
					  	Sout("你是来要黑暗金丹的吧,诺,这是赏你的... 获得黑暗紫金丹(罕见)*1");
					  	things[223]++;
					  	break;
					  }
					if (things[304]==2)
					  {
					  	Sout(",原来是个神啊,嘿嘿\n");
					  	Sout("限你三秒出去,不然,嘿嘿嘿...(按任意键离开)\n");
					  	int i=clock();
					  	while(!kbhit())
					  	  printf("%d.%d",clock()/1000,clock()%1000);
					  	if (clock()-i>3000)
					  	  {
					  	  	Sout("你被一重木劫打中了。");
					  	  	int x,y;
					  	  	x=random(550,88880),y=random(77800000,1500000000);
					  	  	printf("hp-%d xp-%d");
					  	  	things[2]-=x,things[1]-=y;
					  	  	if (things[2]<=0)
					  	  	  Die();
						  }
						break;
					  }
					break;
				}
			case '2':
				{
					cls();
					if (things[7]<50000)
					  {
					  	printf("钱不够!");
					  	break;
					  }
					things[7]-=50000;
					Sout("南无喝啰怛那哆啰夜耶南无阿唎耶婆卢羯帝烁钵啰耶菩提萨埵婆耶摩诃萨埵婆耶摩诃迦卢尼迦耶唵萨皤啰罚曳数怛那怛写南无悉吉利埵伊蒙阿唎耶婆卢吉帝室佛啰楞驮婆南无那啰谨墀醯唎摩诃皤哆沙咩萨婆阿他豆输朋阿逝孕......\n");
					Sout("你的XP增加了");
					hdcj(28);
					things[1]+=random(100000000,2000000000);
					break; 
				}
			case '3':
				{
					time_t t1;
					time(&t1); 
					if (t1<things[302]+7200)
					  {
					  	printf("请在%d秒后再来。",things[272]+7200-t1);
					  	gs();
					  	break;
					  }
					cls();
					if (things[304]==1)
					  {
					  	Sout("Oprations:啊——有个Demon啊!\n");
					  	Sout("Gods:赶出去,赶出去!\n");
					  	Sout("你被赶走了,还好没有受伤\n");
					  	break;
					  }
					time(&t1);
					things[302]=t1;
					int a,b,c,d,e,f;
					a=random(255,262);
					b=random(255,262);
					c=random(255,262);
					d=random(1,3);
					e=random(1,3);
					f=random(1,3);
					if (a==255&&b==255&&c==255)
					  a=random(255,262);
					printf("获得:");
					if (a>255)
					  {
					    printf("%s*%d、",pellect[a-205].c_str(),d);
					    things[a]+=d;
					  }
					if (b>255)
					  {
					    printf("%s*%d、",pellect[b-205].c_str(),e);
					    things[b]+=e;
					  }
					if (c>255)
					  {
					    printf("%s*%d",pellect[c-205].c_str(),f);
					    things[c]+=f;
					  }
					break;
				}
			case '4':return;
		  }
	  }
}
//                            1     2    3      4     5       6     7        8        9     10     11         12     13     14    15       16       17         18     19         20     21       22       23       24        25      26        27       28        29        30       31        32          33      34          35        36       37       38          39       40                   BOSS41                                                                                                                                             
const long long  hper[]={0,80000,150000,200000,300000,500000,800000,1300000,1800000,2500000,3400000,4500000,5800000,7000000,8500000,10500000,13000000,14800000,17500000,20000000,25000000,32000000,43000000,52000000,59000000,70000000,85000000,102000000,110000000,123000000,135810000,148590000,173840000,201930000,248570000,290000000,350000000,480099332,710000000,890000000,1000000000,50000000000000};
const long long atker[]={0,10000,50000,100000,120000,200000,350000,500000,700000,1200000,1500000,2200000,2900000,3400000,4000000,4500000,5000000,5600000,6500000,7200000,9000000,11200000,15000000,21000000,25000000,32000000,35000000,410000000,45000000,49000000,56000000,63000000,71000000,79000000,86000000,98000000,120000000,170000000,230000000,410000000,500000000,       	   		 800000000000};
const long long dfcer[]={0,4500,22000,35000,45000,80000,120000,200000,300000,500000,600000,1000000,1300000,1500000,1600000,1800000,2300000,2600000,2900000,3400000,4000000,5500000,5600000,6300000,7300000,15000000,17200000,19000000,21000000,23000000,26000000,31000000,34000000,38000000,42000000,45000000,53000000,68000000,80000000,120000000,200000000,230000000  ,         			 200000000000};
const int         get[]={0,246,246,247,247,248,248,249,249,250,250,251,252,253,254,255,256,257,258,259,206,213,220,207,214,221,208,215,222,209,216,223,210,217,224,211,218,225,212,219,226,259};
void trainning()
{
	if (things[303]<1)
	  things[303]=1;
	cls();
	printf("1.闯关模式(可选择1~%d关)\n",min(things[303],41));
	printf("2.自定义模式(自定义敌人,只掉落经验)\n掉落物:\n"); 
	int i,j,k;
	char l;
	l=_getch();
	switch(l)
	  {
	  	case '1':
	  		{
	  			while(1)
				  {
			  	cls();
	  			printf("请选择关卡(1~%d,0退出)\n",min(things[303],41));
	  			for(i=1;i<=40;i++)
	  			  printf("第%d关:%s\n",i,pellect[get[i]-205].c_str());
	  			scanf("%d",&k);
	  			if (k==0)
	  			  break;
	  			if (k>min(things[303],41))
	  			  break;
	  			cls();
	  			long long hp=things[2],atk=things[5],dfc=things[6];
	  			long long ehp=hper[k],eak=atker[k],edc=dfcer[k];
	  			int Round=0;
	  			while(hp>0&&ehp>0)
	  			  {
	  			  	cls();
	  			  	long long hurt;
	  			  	printf("Round %d\n",++Round);
	  			  	printf("Your hp:%lld  Enemy's hp:%lld\n",hp,ehp);
	  			  	printf("Your atk:%lld Enemy's atk:%lld\n",atk,eak);
	  			  	printf("Your dfc:%lld Enemy's dfc:%lld\n",dfc,edc);
	  			  	hurt=llgongji(atk)-edc;
	  			  	printf("You attacked! Your enemy took %lld damage.\n",hurt);
	  			  	ehp-=hurt;
	  			  	hurt=eak*(random(8,12)/10.0)-dfc;
	  			  	printf("Enemy attacked! You took %lld damage.\n",hurt);
	  			  	hp-=hurt;
	  			  	printf("----------------------------------\n");
	  			  	if (Round>=15)
	  			  	  break;
				  }
				if (hp<=0||Round>=15)
				  {
				  	printf("You lose!");
				  	gs();
				  	break;
				  }
				else
				  {
				  	int num=random(1,10);
				  	if (rand()%40==6)
				  	  num=random(15,50);
				  	if (get[k]==259)
				  	  num=1;
				  	printf("You win! Got:XP*%lld %s*%d",(hper[k]*200+eak*300+edc*500)*things[9]*100,pellect[get[k]-205].c_str(),num);
				  	things[get[k]]+=num;
				  	things[1]+=(hper[k]*200+eak*300+edc*500)*things[9]*100;
				  	if (things[303]==k)
				  	  things[303]++;
				  	gs();
				  	break;
				  }
				  }
				break;
			}
		case '2':
			{
				long long a,b,c,d,e,f;
				cls();
				printf("Enemy's hp? (x~y) Enter x and y:");
				scanf("%d%d",&a,&b);
				printf("Enemy's atk? (x~y) Enter x and y:");
				scanf("%d%d",&c,&d);
				printf("Enemy's dfc? (x~y) Enter x and y:");
				scanf("%d%d",&e,&f);
				long long hp=things[2],atk=things[5],dfc=things[6];
	  			long long ehp=random(a,b),eak=random(c,d),edc=random(e,f),Hp=ehp;
	  			int Round=0;
	  			while(hp>0&&ehp>0)
	  			  {
	  			  	cls();
	  			  	long long hurt;
	  			  	printf("Round %d\n",++Round);
	  			  	printf("Your hp:%lld  Enemy's hp:%lld\n",hp,ehp);
	  			  	printf("Your atk:%lld Enemy's atk:%lld\n",atk,eak);
	  			  	printf("Your dfc:%lld Enemy's dfc:%lld\n",dfc,edc);
	  			  	hurt=llgongji(atk)-edc;
	  			  	printf("You attacked! Your enemy took %lld damage.\n",hurt);
	  			  	ehp-=hurt;
	  			  	hurt=eak*(random(8,12)/10.0)-dfc;
	  			  	hp-=hurt;
	  			  	printf("Enemy attacked! You took %lld damage.\n",hurt);
	  			  	printf("----------------------------------\n");
	  			  	if (Round>=15)
	  			  	  break;
				  }
				if (hp<=0||Round>=15)
				  {
				  	printf("You lose!");
				  	gs();
				  	break;
				  }
				else
				  {
				  	printf("You win! Got:XP*%lld",(Hp*200+eak*300+edc*500)*things[9]*100);//还不是为了让你们快点升级 
				  	things[1]+=(Hp*20+eak*30+edc*50)*things[9]*100;
				  	gs();
				  	break;
				  }
			}
	  }
}
void secretman()
{
	if (things[9]<200)
	  {
	  	Sout("Secretman:不错嘛小伙子,居然能看见我...啧啧,你的修行还不够呢,升到200级再来找我吧!\n");
	  	return;
	  }
	printf("只要给我元神,我就帮你打造奇珍异宝!\n");
	printf("     朱雀盔      白虎甲      青龙腕      玄武靴      麒麟扇\n");
	printf("hp    1e+8        5e+12       3e+8          4e+8      5e+12\n");
	printf("atk   5e+7        3e+7        1e+7          0         8e+10\n");
	printf("dfc   2e+7        3e+7        4e+6          8e+6      4e+9\n");
	printf("Need\n");
	printf("   朱雀石*50   白虎石*80    青龙石*70   玄武石*40    麒麟石*100\n");
	printf("   彩陶石*50   彩陶石*80    彩陶石*70   彩陶石*40    麒麟内丹*120\n");
	printf("   元神*5       元神*5       元神*5      元神*5       元神*5\n");
	printf("1.朱雀盔 2.白虎甲 3.青龙腕 4.玄武靴 5.麒麟扇 6.离开\n");
	for(i=47;i<=54;i++)
	  printf("%s*%d\t",pellect[i].c_str(),things[i+205]);
	printf("\n");
	int k;
	cin>>k;
/*	206~245各种丹药数量 246红水晶 247紫水晶 248蓝水晶 249黑水晶 250仙丹石
251奥玄石 252白虎石 253朱雀石 254青龙石 255玄武石 256麒麟内丹
257麒麟石 258彩陶石 259元神 270炼丹炉*/
	switch(k)
	  {
	  	case 1:if (things[253]>=50&&things[258]>=50&&things[259]>=5)
	  			{
	  				printf("制作成功!\n");
	  				things[253]-=50,things[258]-=50,things[259]-=5;
	  				things[2]+=100000000,things[5]+=50000000,things[6]+=20000000;
				}
			   else
			   	printf("材料不够!\n");
			   	gs();
				break;
		case 2:if (things[252]>=80&&things[258]>=80&&things[259]>=5)
	  			{
	  				printf("制作成功!\n");
	  				things[252]-=80,things[258]-=80,things[259]-=5;
	  				things[2]+=500000000000,things[5]+=3000000,things[6]+=3000000;
				}
			   else
			   	printf("材料不够!\n");
			   	gs();
				break;
		case 3:if (things[254]>=70&&things[258]>=70&&things[259]>=5)
	  			{
	  				printf("制作成功!\n");
	  				things[254]-=70,things[258]-=70,things[259]-=5;
	  				things[2]+=30000000,things[5]+=1000000,things[6]+=400000;
				}
			   else
			   	printf("材料不够!\n");
			   	gs();
				break;
		case 4:if (things[255]>=40&&things[258]>=40&&things[259]>=5)
	  			{
	  				printf("制作成功!\n");
	  				things[253]-=40,things[258]-=40,things[259]-=5;
	  				things[2]+=40000000,things[6]+=800000;
				}
			   else
			   	printf("材料不够!\n");
			   	gs();
				break;
		case 5:if (things[256]>=120&&things[257]>=100&&things[259]>=5)
	  			{
	  				printf("制作成功!\n");
	  				things[256]-=120,things[257]-=100,things[259]-=5;
	  				things[2]+=500000000000,things[5]+=8000000000,things[6]+=400000000;
				}
			   else
			   	printf("材料不够!\n");
			   	gs();
				break;
	  }
	
} 
bool hijacking()
{
	long long hurt,xp;
	cls();
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第一重雷劫落下\n");
	hurt=random(100000000,500000000)*10;
	xp=random(100000000,500000000)*10;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第二重雷劫落下。\n");
	hurt=random(100000000,500000000)*100;
	xp=random(100000000,500000000)*100;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%d xp-%d\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第三重雷劫落下。\n");
	hurt=random(100000000,500000000)*1000;
	xp=random(100000000,500000000)*1000;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第四重雷劫落下。\n");
	hurt=random(100000000,500000000)*10000;
	xp=random(100000000,500000000)*10000;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第五重雷劫落下。\n");
	hurt=random(100000000,500000000)*100000;
	xp=random(100000000,500000000)*100000;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第六重雷劫落下。\n");
	hurt=random(100000000,500000000)*1000000;
	xp=random(100000000,500000000)*1000;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第七重雷劫落下。\n");
	hurt=random(100000000,500000000)*10000000;
	xp=random(100000000,500000000)*100000;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第八重雷劫落下。\n");
	hurt=random(100000000,500000000)*100000000;
	xp=random(100000000,500000000)*1000000;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	printf("hp:%lld xp:%lld\n",things[2],things[1]);
	Sout("第九重雷劫落下。\n");
	hurt=random(100000000,500000000)*1000000000;
	xp=random(100000000,500000000)*100000000;
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	printf("hp-%lld xp-%lld\n",hurt,xp);
	things[2]-=hurt,things[1]-=xp;
	if (things[2]<=0||things[1]<0)
	  return 0;
	Sout("雷劫结束,五行劫开始\n");
	string je[6]={"","金","木","水","火","土"};
	int nm=random(1,5);
	Sout(je[nm]+"劫落下。\n");
	hurt=random(10000000,50000000),xp=random(100000000,500000000);
	hurt-=things[6];
	xp-=things[6];
	hurt=max(1,hurt);
	xp=max(1,xp);
	if (things[2]<=0||things[1]<0)
	  return 0;
	Sout("本源劫落下。\n");//算了不落了 
	return 1;
}
void xiux()
{
	const string place[]={"炼丹房(炼丹)","寺院(可能有一些世外高人)","仙居(住的地方)","修行之地(修行)","神秘人(???)","小森林","下凡(主页面按q返回)","保存并退出","背包"};
	int i,j,k;
	char l;
	string level[3]={"OPRATION","DEMON","GOD"};//0 opration 1魔 2神 
	while(1)
	  {
	  	cls();
	  	if (things[9]>=384&&things[303]>=42)
	  	  {
	  	  	Sout("你渡劫的时候到了...\n");
	  	  	if (hijacking()==0)
				{
					Sout("你渡劫失败了,你的一部分灵魂重新转世了。\n");
	  				things[7]=800;
					things[2]=100;
					things[3]=50;
					things[4]=50;
					things[5]=30;
					things[6]=5;
					things[8]=100;
					things[9]=1;
					things[10]=6;
					things[18]=1;
					things[30]=720;
					things[34]=11901;
					for(int i=1;i<30;i++)
	 				  {
	  					gang[i].pnum=random(2,40);
	  					gang[i].name=randstr(5,21);
	  					for(int j=1;j<=gang[i].pnum;j++)
	  	  				  {
	  	  					gang[i].peo[j]=born(i);
		  	 			 }
						gang[i].leader=random(1,gang[i].pnum);
	  	  			}
					time_t dl;
					time(&dl);
					start=dl; 
					things[0]=1;
					memset(renwu,0,sizeof(renwu));
					Write_File();
	  			 	 show();
				}
	  	  	things[0]=8;
	  	  	return;
		  }
	  	for(i=0;i<1000;i++)
	  	  if (kbhit())
	  	    l=getch();//垃圾收集器 
	  	printf("%s Lv.%lld (%lld/%lld)\n",name.c_str(),things[9],things[1],sj[things[9]+1]);
	  	printf("%s\n",level[things[304]].c_str());
	  	printf("Day %d\n",things[16]);
	  	for(i=0;i<8;i++)
	  	  printf("%d.%s\n",i,place[i].c_str());
	  	l=_getch();
	  	switch(l)
	  	  {
	  	  	case '0':make_pills();break;
	  	  	case '1':fane();break;
	  	  	case '2':home();break;
	  	  	case '3':trainning();break; 
	  	  	case '4':secretman();break;
	  	  	case '5':forest();break;
	  	  	case '6':Soc();break;
	  	  	case '7':Write_File();exit(0);
	  	  	case '8':
	  	  		{
	  	  			for(i=1;i<=55;i++)
					  if (things[i+205]>0)
					    printf("%d.%s*%d\n",i,pellect[i].c_str(),things[i+205]);
					gs();
					break;
				}
		  }
	  }
}
void mainmenu()
{
	Time now=gottime();
	if (now.year==2022&&now.month==2&&now.day==6&&things[308]!=20220206)
	  {
	  	Sout("今天是MCYH的生日,你有什么想对他说的吗?\n");
	  	Sout("1.生日快乐 2.天天开心 3.平安幸福 4.All Of The Options\n");
	  	char a;
	  	a=_getch();
		switch(a)
	  	  {
	  	  	case '1':
	  	  	case '2':
	  	  	case '3':Sout("MCYH:谢谢祝福,新的一年我会继续努力。");printf("获得:XP*%lld money*%lld 春节礼炮*1 英雄战甲*1",50000*things[9],500000*things[9]);things[1]+=50000*things[9],things[7]+=500000*things[9],fost[22]++,fost[40]++;break;
	  	  	case '4':Sout("MCYH:感谢三连,新的一年我会继续努力。");printf("获得:XP*%lld money*%lld 春节礼炮*1 英雄礼包(内含:英雄头盔、英雄战甲、英雄护腿、英雄战靴、英雄剑、英雄斧、英雄镐)*1",500000*things[9],5000000*things[9]);things[1]+=500000*things[9],things[7]+=5000000*things[9],fost[22]++,fost[39]++,fost[40]++,fost[41]++,fost[42]++,fost[43]++,fost[44]++,fost[45]++;break;//送礼物当然得一件件送 
		  }
		things[308]=20220206;
		cls(); 
	  } 
	things[26]=0;
	if (things[0]==1)
	{
		if (things[26]==0)
		{
		sudu=300;
		gotoxy(30,70);
		Sout("第\t一\t章");
		gotoxy(32,70);
		Sout("我\t的\t童\t年");
		gotoxy(31,70);
		Sout("Episode 1\n");
		gotoxy(33,70);
		Sout("My Childhood");
		sudu=5;
		Sout("剧情:\n");
		Sout("人生之中最快乐最幸福的时光大概就是童年了,同时,童年的生活也是非常短暂的。\n");
		Sout("在学校里,你是想做一个学霸,还是一个默默无闻的学渣?\n");
		Sout("你是想做一个老师的好帮手,还是一个打架的刺儿头?\n");
		Sout("在本章里尽可揭晓!");
		things[26]=1;
		gs();
		}
	game();
	things[26]=0;
	}
	
	if (things[0]==2){
	Sout("时间过得真快呀,你已经12岁了,准备上初中了。");
	gs();
	Sout("只是不知,你能否顺利通过升学考试呢?");
	gs();
	gotoxy(40,60);
	sudu=300;
	Sout("第二章\n");
	gotoxy(42,60);
	Sout("入学考试\n");
	gotoxy(41,60);
	Sout("Episode 2\n");
	gotoxy(43,60);
	Sout("entrance examination\n");
	gs();
	sudu=5;
	if (things[26]==0)
	{
	Sout("剧情\n");
	Sout("我说的没错吧,很快,你的童年生活(小学时代)结束了,你面临着\n");
	Sout("人生中的第一道坎:小升初,也不知你能否如愿考上你心中最好的初\n");
	Sout("中呢?我们一起看看吧!");
	things[26]=1;
	Write_File();
	}	
	int fen=quest();
	gs();
	if (fen>=90)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被蓝天中学录取!\n");
	  	Sout("Ftr:考得不错!蓝天中学可是这里最好的中学呢!");
	   }
	if (fen>=75&&fen<90)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被蓝天中学录取!\n");
	  	Sout("Ftr:emmmmm...还行吧,蓝天中学也不错。");
	  }
	if (fen>=50&&fen<75)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被蓝天中学录取!\n");
	  	Sout("Ftr:emmmmm...啊这,怎么考这么差?平时成绩不是挺好的嘛?蓝天中学是我们这儿比较差的中学哦\n"); 
	  }
	if (fen>=25&&fen<50)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被蓝天中学录取!\n");
	  	Sout("Ftr:欠打?考成这样还敢回家?!\n");
	  	Sout("mtr:别打,再怎么也是个中学。。。\n");
	  }
	if (fen<25)
	  {
	  	Sout("Ftr:怎么考成这样,居然还敢回家?!\n");
	  	Sout("mtr:只能让你去上民办中学了,不过学费你自己出。\n");
	  	int school=30000;
	  	if (school>things[7])
	  	  school=things[7];
	  	Sout("Ftr:诶。。。学费需要");
	  	cout<<school;
	  	Sout("块钱诶,你正好付得起。");
	  	things[7]-=school;
	  	Write_File();
	  	gs();
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被蓝天中学录取!\n");
	  	gs(); 
	  }
	  things[0]++;
	  things[26]=0; 
	Write_File();}
	if (things[0]==3)
	{
		if (things[26]==0)
	  {
		sudu=400;
		gotoxy(40,60);
	  Sout("第三章\n");
	  gotoxy(42,60);
	  Sout("中学时光\n");
	  gotoxy(41,60);
	  Sout("Episode 3\n");
	  gotoxy(43,60);
	  Sout("High school time");
	  gs();
	  sudu=5;
	  Sout("时光匆匆而去,转眼你已是一个12岁的初中生了。\n");
	  Sout("你能否抵挡住赌场的诱惑,专心致志地学习,成\n");
	  Sout("为老师和同学们心目中的好学生呢?\n");
	  Sout("幸运的是,你的小学同学都和你分到了同一个班(现实中不可能的),\n");
	  Sout("一切尽在本章揭晓!");
	  things[26]=1;
	}
	  Mid_School();
	  things[26]=0;
	   }
	if (things[0]==4)
	  {
	  	if (things[26]==0)
	  	{
	  	sudu=400;
	  	cls();
	  	gotoxy(40,60);
	  	Sout("第四章");
	  	gotoxy(42,60);
	  	Sout("高考");
	  	gotoxy(41,60);
	  	Sout("Episode 4");
	  	sudu=100;
	  	gotoxy(43,60);
	  	Sout("National College Entrance Examination");
	  	gs();
	  	sudu=5;
	  	things[26]=1;
	  	}
	  	things[26]=0;
		int fen=Exa();
		gs();
	if (fen>=640)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被白云大学录取!\n");
	  	Sout("Ftr:考得不错!白云大学可是这里最好的大学呢!");
	  	things[28]=4;
	   }
	if (fen>=545&&fen<640)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被白云大学录取!\n");
	  	Sout("Ftr:emmmmm...还行吧,白云大学也不错。");
	  	things[28]=3;
	  }
	if (fen>=435&&fen<545)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被白云大学录取!\n");
	  	Sout("Ftr:emmmmm...啊这,怎么考这么差?平时成绩不是挺好的嘛?白云大学是我们这儿比较差的大学哦\n"); 
	  	things[28]=2;
	  }
	if (fen>=380&&fen<435)
	  {
	  	printf("	录	取	通	知	书\n");
	  	Sout("    恭喜你被白云大学录取!\n");
	  	Sout("Ftr:欠打?考成这样还敢回家?!\n");
	  	Sout("mtr:别打,再怎么也是个大学。。。\n");
	  	things[28]=1;
	  }
	if (fen<380)
	  {
	  	Sout("Ftr:怎么考成这样,居然还敢回家?!\n");
	  	Sout("mtr:上不了大学咯~\n");
	  	gs(); 
	  }
	  things[26]=0,things[0]++;
	  }
	  if (things[0]==5)
	  {
	  	if (things[26]==0)
	  	{
	  	sudu=5;
	  	Sout("很快,四年过去了。\n");
	  	Sout("你开始小心翼翼地进入这个充满竞争的社会\n");
	  	Sout("异世界的社会不仅充满竞争,还充满怪物\n");
	  	Sout("这已经不是普通的生活了,这叫生存!");
	  	gs();
	  	things[26]=1;
	  	}
	  	things[10]+=4;
	  	sudu=400;
	  	gotoxy(40,60);
	  	Sout("第五章");
	  	gotoxy(42,60);
	  	Sout("进入社会");
	  	gotoxy(41,60);
	  	Sout("Episode 5");
	  	gotoxy(43,60);
	  	sudu=200;
	  	Sout("Step into the society");
	  	sudu=5;
	  	things[26]=1;
	  	Soc();
	  	gs();
	  	things[26]=0;
	  	}
	  	if (things[0]==6&&things[26]==0)
	  	  {
	  		sudu=400;
	  		gotoxy(40,60);
	  		Sout("第六章");
	  		gotoxy(42,60);
	  		Sout("决战");
	  		gotoxy(41,60);
	  		Sout("Episode 6");
	  		gotoxy(43,60);
	  		sudu=200;
	  		Sout("Decisive battle");
	  		sudu=5;
	  		Write_File();
	  		gs();
	  		War();
	  		things[16]=1;
	  		gs();
	  		Write_File(); 
	  		gotoxy(15,50);
	  		cout<<"_____\n";
	  		gotoxy(16,50);
	  		cout<<" \\|/\n";
	  		gotoxy(17,50);
	  		cout<<" /|\\\n";
	  		gotoxy(18,50);
	  		cout<<"-----\n";
	  		Sleep(3000);
	  		gs();
	  		Sout("你(睁开眼):怎么了?发生甚魔事了?\n");
	  		Sout("Ftr:孩子,你醒了!今天是你6岁生日!\n");
	  		Sout("你(用手抓抓脑壳):???我才6岁?我不是已经长大成人了吗?我还打败了创世神MCYH!\n");
	  		Sout("Ftr(想给你一巴掌):别乱说话!能打败MCYH的人还没出生呢!MCYH,孩子不懂事,瞎说!千万不要天降神罚啊!\n");
	  		Sout("你:我还记得。。。记得。。。我用量子剑打败的他!\n");
	  		Sout("mtr:你是不是生病了?量子剑需要不少稀有材料合成,你是不是去偷隔壁WYQ的东西了?\n");
	  		Sout("你(吓了一跳):没有没有,可能只是个梦罢了。。。\n");
	  		Sout("MCYH:过去的事情已成为过去,新的生活终将开始!");
	  		hdcj(35);
	  		gs();
	  		things[0]=1;
	  		mainmenu();
	  	  }
	  	if (things[0]==7)
	  	  {
	  	  	sudu=400;
	  		gotoxy(40,60);
	  		Sout("第\t七\t章");
	  		gotoxy(42,60);
	  		Sout("修\t仙\t之\t路");
	  		gotoxy(41,60);
	  		Sout("Episode 7");
	  		gotoxy(43,60);
	  		sudu=200;
	  		Sout("The Road Of XiuXian");//不是本人英语不行,是真的没这个词 
	  		sudu=5;
	  		Sout("剧情\n");
	  		Sout("    你早已厌倦了人间的生活,当你年满期颐、击败了创世神、闯过神殿之后,你\n");
	  		Sout("打开了当年在天空之境买的Secret Case...\n");
	  		Sout("    Case中装的是一本仙法秘籍、几件破布衣和一张地图...\n");
	  		Sout("    你顺着地图,走到了你要去的地方。从此以后,你离开了人世间,来到了神界修\n");
	  		Sout("炼。一心想着修成仙法、度过九重天劫,成为上仙...\n");
	  		Sout("    当然,这一切都被MCYH看在眼里...\n");
	  		gs(); 
	  		xiux();
		  }
		if (things[0]==8)
		  {
		  	cls();
		  	Sout("时间过得真快,你已经384级了,也通过了修炼,度过劫,MCYH即将启程前往新的平行世界了...\n");
		  	string level[3]={"仙""神","魔"};
		  	Sout("你是一个"+level[things[304]]+",可以成为新的创世神,MCYH决定让你来接替他做这个世界的创世神了...\n");
		  	Sout(name+",你愿意做创世神吗?(Y/N)选择不愿意可以重新轮回转世成为凡人。");
		  	char l=_getch();
		  	cls();
		  	if (l=='n'||l=='N')
		  	{
		  	gotoxy(15,50);
	  		cout<<"_____\n";
	  		gotoxy(16,50);
	  		cout<<" \\|/\n";
	  		gotoxy(17,50);
	  		cout<<" /|\\\n";
	  		gotoxy(18,50);
	  		cout<<"-----\n";
	  		Sleep(3000);
	  		gs();
	  		Sout("你(睁开眼):怎么了?发生甚魔事了?\n");
	  		Sout("Ftr:孩子,你醒了!今天是你6岁生日!\n");
	  		Sout("你(用手抓抓脑壳):???我才6岁?我不是已经长大成人了吗?我还打败了创世神MCYH!我还差点成为创世神呢!\n");
	  		Sout("Ftr(想给你一巴掌):别乱说话!能打败MCYH的人还没出生呢!MCYH,孩子不懂事,瞎说!千万不要天降神罚啊!\n");
	  		Sout("你:我还记得。。。记得。。。我度过了九重雷劫,悟得本源大道,才...\n");
	  		Sout("mtr:你是不是生病了?看样子精神出了问题\n");
	  		Sout("你(吓了一跳):没有没有,可能只是个梦罢了。。。\n");
	  		Sout("MCYH:过去的事情已成为过去,新的生活终将开始!");
	  		hdcj(35);
	  		gs();
	  		things[0]=1,things[10]=6;
	  		mainmenu();
	  		}
	  		else
	  		{
	  			Sout("你成为了新的创世神,你作为人的一生结束了。\n");
	  			Sout("请等待MCYH的人生之路1.21创世之神 \n");
	  			Sout("终");
	  			gs();
	  			things[22]=150;//眼熟吧,看看学校那一章 
	  			Write_File();
	  			exit(0);
			}
		  }
}
/*
  the end
*/ 

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值