跳到正文

休闲·娱乐

地铁florr 1.0版

yanziwei88约 43 分钟
原文
文章信息与版本

文章信息

发布
2025年7月20日
收录
2025年12月12日
更新
2026年11月4日
篇幅
约 43 分钟

版本

  1. v1当前
C++
#include<bits/stdc++.h>
#include<windows.h>
#include<stdio.h>
#include<conio.h>
#include<time.h>
#include<bitset>
#define int long long
using namespace std;
int hp=100,coin;
int jy,jyxy=10,dj;
/*
A:回血
B:连击
C: 击晕
D:中毒
E:数量
*/
struct huabanzl{
	string pz,nm;
	int gj,sd;
	char tsxg;
};
huabanzl zhuangbei[109];
huabanzl cangku[1009];
int topck;
int top,lqsd=10;
void save(){
	ofstream out("地铁florr.in");
	out<<hp<<' '<<dj<<' '<<jy<<' '<<jyxy<<' '<<coin<<'\n';
	out<<top<<' '<<topck<<'\n';
	for(int i=1;i<=top;i++){
		out<<zhuangbei[i].pz<<'\n'<<zhuangbei[i].nm<<'\n'<<zhuangbei[i].gj<<' '<<zhuangbei[i].sd<<' '<<zhuangbei[i].tsxg<<'\n';
	}
	for(int i=1;i<=topck;i++){
		out<<cangku[i].pz<<'\n'<<cangku[i].nm<<'\n'<<cangku[i].gj<<' '<<cangku[i].sd<<' '<<cangku[i].tsxg<<'\n';
	}
	out.close();
}
void read() {
    ifstream in("地铁florr.in");
    if (!in.is_open()) {
        cout << "无法读取存档文件!" << endl;
        return;
    }
    in >> hp >> dj >> jy >> jyxy >> coin;
    in >> top >> topck;
    for (int i = 1; i <= top; i++) {
        in >> zhuangbei[i].pz;
        in >> zhuangbei[i].nm;
        in >> zhuangbei[i].gj >> zhuangbei[i].sd >> zhuangbei[i].tsxg;
    }
    for (int i = 1; i <= topck; i++) {
        in >> cangku[i].pz;
        in >> cangku[i].nm;
        in >> cangku[i].gj >> cangku[i].sd >> cangku[i].tsxg;
    }
    in.close();
}
huabanzl huaban[1009]={
{"普通","基本",10,25},
{"普通","轻",13,8} ,
{"普通","岩石",67,40},
{"普通","刺",100,100},
{"普通","玫瑰",8,50,'A'},
{"普通","鸢尾",70,40,'D'},
{"普通","翅膀",20,25},
{"普通","导弹",25,20},
{"普通","葡萄",17,20,'D'},
{"普通","快",5,25,'B'},
{"普通","米",4,1},
{"普通","沙子",4,15},
{"普通","爪子",55,35},
{"普通","豌豆",13,20},
{"普通","胡萝卜",15,15},
{"普通","骨头",18,25},
{"普通","玻璃",15,10},
{"普通","三角形",5,20,'E'},

{"罕见","轻",13*3,8,},
{"罕见","岩石",67*3,40},
{"罕见","刺",100*3,100},
{"罕见","玫瑰",8*3,50,'A'},
{"罕见","鸢尾",70*3,40,'D'},
{"罕见","翅膀",20*3,25},
{"罕见","导弹",25*3,20},
{"罕见","葡萄",17*3,20,'D'},
{"罕见","快",5*3,25,'B'},
{"罕见","米",4*3,1},
{"罕见","沙子",4*3,15},
{"罕见","爪子",55*3,35},
{"罕见","豌豆",13*3,20},
{"罕见","胡萝卜",15*3,15},
{"罕见","骨头",18*3,25},
{"罕见","玻璃",15*3,10},
{"罕见","三角形",5*3,20,'E'},
{"罕见","叶子",4,10,'A'},
{"罕见","橘子",21,35},

{"稀有","轻",13*9,8} ,
{"稀有","岩石",67*9,40},
{"稀有","刺",100*9,100},
{"稀有","玫瑰",8*9,50,'A'},
{"稀有","鸢尾",70*9,40,'D'},
{"稀有","翅膀",20*9,25},
{"稀有","导弹",25*9,20},
{"稀有","葡萄",17*9,20,'D'},
{"稀有","快",5*9,25,'B'},
{"稀有","米",4*9,1},
{"稀有","沙子",4*9,15},
{"稀有","爪子",55*9,35},
{"稀有","豌豆",13*9,20},
{"稀有","胡萝卜",15*9,15},
{"稀有","骨头",18*9,25},
{"稀有","玻璃",15*9,10},
{"稀有","三角形",5*9,20,'E'},
{"稀有","叶子",4*3,10,'A'},
{"稀有","橘子",21*3,35},

{"史诗","轻",13*27,8} ,
{"史诗","岩石",67*27,40},
{"史诗","刺",100*27,100},
{"史诗","玫瑰",8*27,50,'A'},
{"史诗","鸢尾",70*27,40,'D'},
{"史诗","翅膀",20*27,25},
{"史诗","导弹",25*27,20},
{"史诗","葡萄",17*27,20,'D'},
{"史诗","快",5*27,25,'B'},
{"史诗","米",4*27,1},
{"史诗","沙子",4*27,15},
{"史诗","爪子",55*27,35},
{"史诗","豌豆",13*27,20},
{"史诗","胡萝卜",15*27,15},
{"史诗","骨头",18*27,25},
{"史诗","玻璃",15*27,10},
{"史诗","三角形",5*27,20,'E'},
{"史诗","叶子",4*9,10,'A'},
{"史诗","橘子",21*9,35},

{"传奇","轻",13*81,8} ,
{"传奇","岩石",67*81,40},
{"传奇","刺",100*81,100},
{"传奇","玫瑰",8*81,50,'A'},
{"传奇","鸢尾",70*81,40,'D'},
{"传奇","翅膀",20*81,25},
{"传奇","导弹",25*81,20},
{"传奇","葡萄",17*81,20,'D'},
{"传奇","快",5*81,25,'B'},
{"传奇","米",4*81,1},
{"传奇","沙子",4*81,15},
{"传奇","爪子",55*81,35},
{"传奇","豌豆",13*81,20},
{"传奇","胡萝卜",15*81,15},
{"传奇","骨头",18*81,25},
{"传奇","玻璃",15*81,10},
{"传奇","三角形",5*81,20,'E'},
{"传奇","叶子",4*27,10,'A'},
{"传奇","橘子",21*27,35},

{"神话","轻",13*243,8} ,
{"神话","岩石",67*243,40},
{"神话","刺",100*243,100},
{"神话","玫瑰",8*243,50,'A'},
{"神话","鸢尾",70*243,40,'D'},
{"神话","翅膀",20*243,25},
{"神话","导弹",25*243,20},
{"神话","葡萄",17*243,20,'D'},
{"神话","快",5*243,25,'B'},
{"神话","米",4*243,1},
{"神话","沙子",4*243,15},
{"神话","爪子",55*243,35},
{"神话","豌豆",13*243,20},
{"神话","胡萝卜",15*243,15},
{"神话","骨头",18*243,25},
{"神话","玻璃",15*243,10},
{"神话","三角形",5*243,20,'E'},
{"神话","叶子",4*81,10,'A'},
{"神话","橘子",21*81,35},

{"究极","轻",13*729,8} ,
{"究极","岩石",67*729,40},
{"究极","刺",100*729,100},
{"究极","玫瑰",8*729,50,'A'},
{"究极","鸢尾",70*729,40,'D'},
{"究极","翅膀",20*729,25},
{"究极","导弹",25*729,20},
{"究极","葡萄",17*729,20,'D'},
{"究极","快",5*729,25,'B'},
{"究极","米",4*729,1},
{"究极","沙子",4*729,15},
{"究极","爪子",55*729,35},
{"究极","豌豆",13*729,20},
{"究极","胡萝卜",15*729,15},
{"究极","骨头",18*729,25},
{"究极","玻璃",15*729,10},
{"究极","三角形",5*729,20,'E'},
{"究极","叶子",4*243,10,'A'},
{"究极","橘子",21*243,35},

{"超级","轻",13*2187,8} ,
{"超级","岩石",67*2187,40},
{"超级","刺",100*2187,100},
{"超级","玫瑰",8*2187,50,'A'},
{"超级","鸢尾",70*2187,40,'D'},
{"超级","翅膀",20*2187,25},
{"超级","导弹",25*2187,20},
{"超级","葡萄",17*2187,20,'D'},
{"超级","快",5*2187,25,'B'},
{"超级","米",4*2187,1},
{"超级","沙子",4*2187,15},
{"超级","爪子",55*2187,35},
{"超级","豌豆",13*2187,20},
{"超级","胡萝卜",15*2187,15},
{"超级","骨头",18*2187,25},
{"超级","玻璃",15*2187,10},
{"超级","三角形",5*2187,20,'E'},
{"超级","叶子",4*729,10,'A'},
{"超级","橘子",21*729,35}


};
/*
0.基本
1.轻
2.岩石
3.刺
4.玫瑰
5.鸢尾
6.翅膀
7.导弹
8.葡萄
9.快
10.米
11.沙子
12.爪子
13.豌豆
14.胡萝卜
15.骨头
16.玻璃
17.三角形
18.叶子
19.橘子
*/
struct guaiwutujian{
	string pz,nm;
	int gj,xl,jb;
};
guaiwutujian guaiwu[1009]{
	{},
	{"普通","瓢虫",10,60,10},//1
	{"普通","蜜蜂",50,35,15},//2
	{"普通","石头",0,100,5},//3
	{"普通","幼蚁",0,25,4},//4
	{"普通","工蚁",10,60,10},//5
	{"普通","兵蚁",10,100,12},//6
	{"普通","蚁后",10,250,20},//7
	{"普通","黄蜂",50,35,15},//8
	{"普通","蜈蚣",10,25,8},//9
	{"普通","蜘蛛",15,60,12},//10

	{"罕见","瓢虫",10*3,60*3,10*3},//11
	{"罕见","蜜蜂",50*3,35*3,15*3},//12
	{"罕见","石头",0*3,100*3,5*3},//13
	{"罕见","幼蚁",0*3,25*3,4*3},//14
	{"罕见","工蚁",10*3,60*3,10*3},//15
	{"罕见","兵蚁",10*3,100*3,12*3},//16
	{"罕见","蚁后",10*3,250*3,20*3},//17
	{"罕见","黄蜂",50*3,35*3,15*3},//18
	{"罕见","蜈蚣",10*3,25*3,8*3},//19
	{"罕见","蜘蛛",15*3,60*3,12*3},//20

	{"稀有","瓢虫",10*9,60*13,10*10},//21
	{"稀有","蜜蜂",50*9,35*13,15*10},//22
	{"稀有","石头",0*9,100*13,5*10},//23
	{"稀有","幼蚁",0*9,25*13,4*10},//24
	{"稀有","工蚁",10*9,60*13,10*10},//25
	{"稀有","兵蚁",10*9,100*13,12*10},//26
	{"稀有","蚁后",10*9,250*13,20*10},//27
	{"稀有","黄蜂",50*9,35*13,15*10},//28
	{"稀有","蜈蚣",10*9,25*13,8*10},//29
	{"稀有","蜘蛛",15*9,60*13,12*10},//30

	{"史诗","瓢虫",10*27,60*54,10*50},//31
	{"史诗","蜜蜂",50*27,35*54,15*50},//32
	{"史诗","石头",0*27,100*54,5*50},//33
	{"史诗","幼蚁",0*27,25*54,4*50},//34
	{"史诗","工蚁",10*27,60*54,10*50},//35
	{"史诗","兵蚁",10*27,100*54,12*50},//36
	{"史诗","蚁后",10*27,250*54,20*50},//37
	{"史诗","黄蜂",50*27,35*54,15*50},//38
	{"史诗","蜈蚣",10*27,25*54,8*50},//39
	{"史诗","蜘蛛",15*27,60*54,12*50},//40

	{"传奇","瓢虫",10*81,60*324,10*500},//41
	{"传奇","蜜蜂",50*81,35*324,15*500},//42
	{"传奇","石头",0*81,100*324,5*500},//43
	{"传奇","幼蚁",0*81,25*324,4*500},//44
	{"传奇","工蚁",10*81,60*324,10*500},//45
	{"传奇","兵蚁",10*81,100*324,12*500},//46
	{"传奇","蚁后",10*81,250*324,20*500},//47
	{"传奇","黄蜂",50*81,35*324,15*500},//48
	{"传奇","蜈蚣",10*81,25*324,8*500},//49
	{"传奇","蜘蛛",15*81,60*324,12*500},//50

	{"神话","瓢虫",10*243,60*2430,10*2000},//51
	{"神话","蜜蜂",50*243,35*2430,15*2000},//52
	{"神话","石头",0*243,100*2430,5*2000},//53
	{"神话","幼蚁",0*243,25*2430,4*2000},//54
	{"神话","工蚁",10*243,60*2430,10*2000},//55
	{"神话","兵蚁",10*243,100*2430,12*2000},//56
	{"神话","蚁后",10*243,250*2430,20*2000},//57
	{"神话","黄蜂",50*243,35*2430,15*2000},//58
	{"神话","蜈蚣",10*243,25*2430,8*2000},//59
	{"神话","蜘蛛",15*243,60*2430,12*2000},//60

	{"究极","瓢虫",10*729,60*29160,10*10000},//61
	{"究极","蜜蜂",50*729,35*29160,15*10000},//62
	{"究极","石头",0*729,100*29160,5*10000},//63
	{"究极","幼蚁",0*729,25*29160,4*10000},//64
	{"究极","工蚁",10*729,60*29160,10*10000},//65
	{"究极","兵蚁",10*729,100*29160,12*10000},//66
	{"究极","蚁后",10*729,250*29160,20*10000},//67
	{"究极","黄蜂",50*729,35*29160,15*10000},//68
	{"究极","蜈蚣",10*729,25*29160,8*10000},//69
	{"究极","蜘蛛",15*729,60*29160,12*10000},//70

	{"超级","瓢虫",10*2187,60*1312200,10*100000},//71
	{"超级","蜜蜂",50*2187,35*1312200,15*100000},//72
	{"超级","石头",0*2187,100*1312200,5*100000},//73
	{"超级","幼蚁",0*2187,25*1312200,4*100000},//74
	{"超级","工蚁",10*2187,60*1312200,10*100000},//75
	{"超级","兵蚁",10*2187,100*1312200,12*100000},//76
	{"超级","蚁后",10*2187,250*1312200,20*100000},//77
	{"超级","黄蜂",50*2187,35*1312200,15*100000},//78
	{"超级","蜈蚣",10*2187,25*1312200,8*100000},//79
	{"超级","蜘蛛",15*2187,60*1312200,12*100000}//80
//	{"稀有","甲虫",30,100,200},//11
//	{"罕见","蝎子",15,100,150},//12
//	{"普通","海星",20,150,200},//13
//	{"普通","螃蟹",25,75,120},//14
//	{"普通","水母",25,75,120},//15

};
void color(int a){
	/*
	0:黑
	1:深蓝
	2:绿
	3:浅蓝
	4:红
	5:紫
	6:黄
	7:白
	8:灰
	9:蓝
	10:翠绿
	11:青
	12:粉
	13:浅紫
	14:浅黄
	15:米白
	*/
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void COUT(string s,int co){
	color(co);
	for(int i=0;i<s.size();i++){
		cout<<s[i];
		Sleep(20);
	}
	color(7);
}

bool coo(huabanzl x,huabanzl y){
	return x.sd<y.sd;
}
int hp1=100;
int lq[109];
void zhan(int x){
	srand(time(NULL));
	hp1=hp;
	huabanzl s[29];
	int dfhp=guaiwu[x].xl;
	int dfgj=guaiwu[x].gj;
	int jb=guaiwu[x].jb;
	for(int i=1;i<=top;i++){
		s[i]=zhuangbei[i];
		lq[i]=0;
	}
	while(1){
		system("cls");
		if(hp1<=0){
			color(7);
			COUT("你死了\n",4);
			Sleep(2000);
			system("cls");
			return ;
		}
		if(dfhp<=0){
			color(7);
			COUT("你赢了!!!\n",7);
			cout<<"获得"<<jb<<"枚coin"<<endl;
			cout<<"获得";
			if(guaiwu[x].pz=="普通"){
				cout<<5;
				jy+=5;
			}
			if(guaiwu[x].pz=="罕见"){
				cout<<10;
				jy+=10;
			}
			if(guaiwu[x].pz=="稀有"){
				cout<<25;
				jy+=25;
			}
			if(guaiwu[x].pz=="史诗"){
				cout<<50;
				jy+=50;
			}
			if(guaiwu[x].pz=="传奇"){
				cout<<100;
				jy+=100;
			}
			if(guaiwu[x].pz=="神话"){
				cout<<500;
				jy+=500;
			}
			if(guaiwu[x].pz=="究极"){
				cout<<4000;
				jy+=4000;
			}
			if(guaiwu[x].pz=="超级"){
				cout<<80000;
				jy+=80000;
			}
			cout<<"经验\n";
			while(jy>jyxy){
				jy-=jyxy;
				jyxy=jyxy*1.5;
				hp=hp*1.1;
				dj++;
				cout<<"升级了"<<endl;
				if(dj==5){
					zhuangbei[++top]=huaban[0];
				}
				if(dj==10){
					zhuangbei[++top]=huaban[0];
				}
				if(dj==15){
					zhuangbei[++top]=huaban[0];
				}
				if(dj==20){
					zhuangbei[++top]=huaban[0];
				}
				if(dj==25){
					zhuangbei[++top]=huaban[0];
				}
			}
			coin+=jb;
			save();
			Sleep(2000);
			system("cls");
			return ;
		}
		if(guaiwu[x].pz=="普通"){
			color(2);
		}
		if(guaiwu[x].pz=="罕见"){
			color(6);
		}
		if(guaiwu[x].pz=="稀有"){
			color(1);
		}
		if(guaiwu[x].pz=="史诗"){
			color(5);
		}
		if(guaiwu[x].pz=="传奇"){
			color(4);
		}
		if(guaiwu[x].pz=="神话"){
			color(11);
		}
		if(guaiwu[x].pz=="究极"){
			color(12);
		}
		if(guaiwu[x].pz=="超级"){
			color(10);
		}
		cout<<guaiwu[x].pz<<guaiwu[x].nm<<"血量:"<<dfhp<<"攻击:"<<dfgj<<endl;
		color(7);
		cout<<"你 血量:"<<hp1<<endl;
		cout<<"(1)攻击(2)逃跑"<<endl;
		int u;
		cin>>u;
		if(u==2){
			color(7);
			int uu=rand()%(7+8);
			if(u==9||u==1){
				cout<<"逃跑失败"<<endl;
			}else{
				cout<<"你逃跑了"<<endl;
				Sleep(2000);
				return ;
			}
		}
		for(int i=1;i<=top;i++){
			if(lq[i]>0)continue;
	/*
	0:黑
	1:深蓝
	2:绿
	3:浅蓝
	4:红
	5:紫
	6:黄
	7:白
	8:灰
	9:蓝
	10:翠绿
	11:青
	12:粉
	13:浅紫
	14:浅黄
	15:米白
	*/
			lq[i]=s[i].sd;
			color(7);
			if(s[i].pz=="普通"){
				color(2);
			}
			if(s[i].pz=="罕见"){
				color(6);
			}
			if(s[i].pz=="稀有"){
				color(1);
			}
			if(s[i].pz=="史诗"){
				color(5);
			}
			if(s[i].pz=="传奇"){
				color(4);
			}
			if(s[i].pz=="神话"){
				color(11);
			}
			if(s[i].pz=="究极"){
				color(12);
			}
			if(s[i].pz=="超级"){
				color(10);
			}
			if(s[i].tsxg=='A'){
				cout<<"你用";
				cout<<s[i].nm<<"回了"<<s[i].gj<<"滴血"<<endl;
				hp1+=s[i].gj;
			}else if(s[i].tsxg=='B'){
				int lj=rand()%5+1;
				for(int ggg=1;ggg<=lj;ggg++){
					cout<<"你用"<<s[i].nm<<"对"<<guaiwu[x].nm<<"造成了"<<s[i].gj<<"点伤害"<<endl;
					dfhp-=s[i].gj;
				}
			}else if(s[i].tsxg=='D'){
				cout<<"你用"<<s[i].nm<<"对"<<guaiwu[x].nm<<"造成了"<<s[i].gj<<"点中毒伤害"<<endl;
				dfhp-=s[i].gj;
			}else if(s[i].tsxg=='E'){
				int sum=s[i].gj;
				for(int j=1;j<=top;j++){
					if(i==j)continue;
					if(s[i].nm==s[j].nm){
						if(s[j].pz=="普通"){
							sum+=4;
						}
						if(s[j].pz=="罕见"){
							sum+=12;
						}
						if(s[j].pz=="稀有"){
							sum+=36;
						}
						if(s[j].pz=="史诗"){
							sum+=108;
						}
						if(s[j].pz=="传奇"){
							sum+=324;
						}
						if(s[j].pz=="神话"){
							sum+=972;
						}
						if(s[j].pz=="究极"){
							sum+=2916;
						}
						if(s[j].pz=="超级"){
							sum+=8748;
						}
					}
				}
				cout<<"你用"<<s[i].nm<<"对"<<guaiwu[x].nm<<"造成了"<<sum<<"点伤害"<<endl;
				dfhp-=sum;
			}else{
				cout<<"你用"<<s[i].nm<<"对"<<guaiwu[x].nm<<"造成了"<<s[i].gj<<"点伤害"<<endl;
				dfhp-=s[i].gj;
			}
			Sleep(200);
			if(dfhp<=0){
				color(7);
				COUT("你赢了!!!\n",7);
				cout<<"获得"<<jb<<"枚coin"<<endl;
				cout<<"获得";
				if(guaiwu[x].pz=="普通"){
					cout<<5;
					jy+=5;
				}
				if(guaiwu[x].pz=="罕见"){
					cout<<10;
					jy+=10;
				}
				if(guaiwu[x].pz=="稀有"){
					cout<<25;
					jy+=25;
				}
				if(guaiwu[x].pz=="史诗"){
					cout<<50;
					jy+=50;
				}
				if(guaiwu[x].pz=="传奇"){
					cout<<100;
					jy+=100;
				}
				if(guaiwu[x].pz=="神话"){
					cout<<500;
					jy+=500;
				}
				if(guaiwu[x].pz=="究极"){
					cout<<4000;
					jy+=4000;
				}
				if(guaiwu[x].pz=="超级"){
					cout<<80000;
					jy+=80000;
				}
				cout<<"经验\n";
				while(jy>jyxy){
					jy-=jyxy;
					jyxy=jyxy*1.5;
					hp=hp*1.1;
					dj++;
					cout<<"升级了"<<endl;
					if(dj==5){
						zhuangbei[++top]=huaban[0];
					}
					if(dj==10){
						zhuangbei[++top]=huaban[0];
					}
					if(dj==15){
						zhuangbei[++top]=huaban[0];
					}
					if(dj==20){
						zhuangbei[++top]=huaban[0];
					}
					if(dj==25){
						zhuangbei[++top]=huaban[0];
					}
				}
				coin+=jb;
				save();
				Sleep(2000);
				system("cls");
				return ;
			}
		}
		int xkw=rand()%10;
		if(xkw==7||xkw==8||xkw==9||xkw==1){
			cout<<"你闪避了他的攻击"<<endl;
			continue;
		}
		if(guaiwu[x].pz=="普通"){
			color(2);
		}
		if(guaiwu[x].pz=="罕见"){
			color(6);
		}
		if(guaiwu[x].pz=="稀有"){
			color(1);
		}
		if(guaiwu[x].pz=="史诗"){
			color(5);
		}
		if(guaiwu[x].pz=="传奇"){
			color(4);
		}
		if(guaiwu[x].pz=="神话"){
			color(11);
		}
		if(guaiwu[x].pz=="究极"){
			color(12);
		}
		if(guaiwu[x].pz=="超级"){
			color(10);
		}
		for(int i=1;i<=top;i++){
			lq[i]-=lqsd;
		}
		cout<<guaiwu[x].nm<<"对你造成了"<<dfgj<<"点伤害"<<endl;
		color(7);
		hp1-=dfgj;
		Sleep(1000);
	}
}
int mai[9]={0,50,100,300,1000,5000,50000,1000000,10000000};
int mia[9]={0,10,20,60,200,1000,10000,200000,10000000};
void heishi(){
	system("cls");
	cout<<"你的coin:"<<coin<<endl;
	cout<<"你要干什么?(1)买花瓣(2)卖花瓣(3)退出"<<endl;
	int u;
	cin>>u;
	if(u==3)return ;
	if(u==1){
		cout<<"你要买什么品质的花瓣?1~6(普通到神话)"<<endl;
		cin>>u;
		for(int i=1;i<=17;i++){
			cout<<'('<<i<<')'<<huaban[i].nm<<endl;
		}
		if(u!=1){
			cout<<"(18)叶子\n(19)橘子\n"<<endl;
		}
		int u1;
		cin>>u1;
		if(u1>19||u1<1||u==1&&u1>17){
			cout<<"滚!!!"<<endl;
			Sleep(500);
			return ;
		}
		cout<<"你要几份?"<<endl;
		int u2;
		cin>>u2;
		cout<<"一共要"<<u2*mai[u]<<"coin。你要买吗?(1)买(2)不买"<<endl;
		int u12;
		cin>>u12;
		if(u12!=1&&u12!=2){
			cout<<"滚!!!"<<endl;
			Sleep(500);
			return ;
		}
		if(u12==2)return ;
		if(u2*mai[u]>coin){
			cout<<"没钱滚蛋!!!"<<endl;
			Sleep(500);
			return ;
		}
		coin-=u2*mai[u];
		if(u!=1){
			u--;
			u1+=17;
		}
		for(int i=1;i<=u2;i++){
			cangku[++topck]=huaban[u1+(u-1)*19];
		}
	}else if(u==2){
		cout<<"你要卖什么品质的花瓣?1~6(普通到传奇)"<<endl;
		cin>>u;
		if(u==1){
			cout<<"(0)基本\n";
		}
		for(int i=1;i<=17;i++){
			cout<<'('<<i<<')'<<huaban[i].nm<<endl;
		}
		if(u!=1){
			cout<<"(18)叶子\n(19)橘子\n"<<endl;
		}
		int u1;
		cin>>u1;
		if(u==1&&u1==0){
			cout<<"卖多少?(1)一份(2)全卖(3)退出"<<endl;
			int u12;
			cin>>u12;
			if(u12==1){
				for(int i=1;i<=topck;i++){
					if(cangku[i].pz==huaban[0].pz&&cangku[i].nm==huaban[0].nm){
						cout<<"售卖成功"<<endl;
						coin+=10;
						cangku[i]=cangku[topck];
						topck--;
						Sleep(1000);
						return ;
					}
				}
			}else if(u12==2){
				for(int i=1;i<=topck;i++){
					if(cangku[i].pz==huaban[0].pz&&cangku[i].nm==huaban[0].nm){
						cout<<"售卖成功"<<endl;
						coin+=10;
						cangku[i]=cangku[topck];
						topck--;
						i=0;
						Sleep(1000);
					}
				}
				return ;
			}else{
				return ;
			}
		}
		if(u1>19||u1<1||u==1&&u1>17){
			cout<<"滚!!!"<<endl;
			Sleep(500);
			return ;
		}
		cout<<"卖多少?(1)一份(2)全卖(3)退出"<<endl;
			int u12;
			cin>>u12;
			int ans=u1;
			if(u!=1){
				ans+=17;
			}
			if(u!=1){
				ans+=(u-2)*19;
			}else{
				ans+=(u-1)*19;
			}
			if(u12==1){
				for(int i=1;i<=topck;i++){
					if(cangku[i].pz==huaban[ans].pz&&cangku[i].nm==huaban[ans].nm){
						cout<<"售卖成功"<<endl;
						coin+=mia[u];
						cangku[i]=cangku[topck];
						topck--;
						Sleep(1000);
						return ;
					}
				}
			}else if(u12==2){
				for(int i=1;i<=topck;i++){
					if(cangku[i].pz==huaban[ans].pz&&cangku[i].nm==huaban[ans].nm){
						cout<<"售卖成功"<<endl;
						coin+=mia[u];
						cangku[i]=cangku[topck];
						topck--;
						i=0;
						Sleep(1000);
					}
				}
			}else{
				return ;
			}
	}
}
void ccck(){
	system("cls");
	while(1){
		system("cls");
		cout<<"----仓库花瓣----\n";
		for(int i=1;i<=topck;i++){
			if(cangku[i].pz=="普通"){
				color(2);
			}
			if(cangku[i].pz=="罕见"){
				color(6);
			}
			if(cangku[i].pz=="稀有"){
				color(1);
			}
			if(cangku[i].pz=="史诗"){
				color(5);
			}
			if(cangku[i].pz=="传奇"){
				color(4);
			}
			if(cangku[i].pz=="神话"){
				color(11);
			}
			if(cangku[i].pz=="究极"){
				color(12);
			}
			if(cangku[i].pz=="超级"){
				color(10);
			}
			cout<<"("<<i<<")"<<cangku[i].nm<<' '<<cangku[i].pz<<endl;
		}
		color(7);
		cout<<"----装备花瓣----\n";
		for(int i=1;i<=top;i++){
			if(zhuangbei[i].pz=="普通"){
				color(2);
			}
			if(zhuangbei[i].pz=="罕见"){
				color(6);
			}
			if(zhuangbei[i].pz=="稀有"){
				color(1);
			}
			if(zhuangbei[i].pz=="史诗"){
				color(5);
			}
			if(zhuangbei[i].pz=="传奇"){
				color(4);
			}
			if(zhuangbei[i].pz=="神话"){
				color(11);
			}
			if(zhuangbei[i].pz=="究极"){
				color(12);
			}
			if(zhuangbei[i].pz=="超级"){
				color(10);
			}
			cout<<"("<<i<<")"<<zhuangbei[i].pz<<zhuangbei[i].nm<<endl;
		}
		color(7);
		cout<<"你要替换什么?按0 0退出"<<endl;
		int x,y;
		cin>>x>>y;
		if(x==0&&y==0)return ;
		if(x>top||y>topck){
			cout<<"你搞错了"<<endl;
			return ;
		}
		swap(zhuangbei[x],cangku[y]);
	}

}
void huayuanjc(){
	system("cls");
	srand(time(NULL));
	int wz=rand()%5+10;
	while(1){
		if(hp1<=0){
			return ;
		}
		if(wz==0){
			cout<<"撤离成功!!"<<endl;
			Sleep(100);
			return ;
		}
		if(wz==5){
			COUT("你正在危险区!!!\n",4);
		}
		cout<<"你距离撤离点还有"<<wz<<"米"<<endl;
		cout<<"(1)搜索 (2)向撤离点移动(3)打开仓库"<<endl;
		int u;
		cin>>u;
		if(u==1){
			if(wz!=5){
				int x=rand()%10+1;
				if(x<=2){
					cout<<"什么也没有"<<endl;
				}else if(x==3){
					int jb=rand()%78+1;
					cout<<"你捡到了"<<jb<<"枚coin"<<endl;
					coin+=jb;
				}else if(x>3&&x<=6){
					int gw=rand()%10+1;
					cout<<"你遇到了普通"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>6&&x<=8){
					int gw=rand()%10+11;
					cout<<"你遇到了罕见"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>8&&x<=10){
					int gw=rand()%10+21;
					cout<<"你遇到了稀有"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}
			}else{
				int x=rand()%10+1;
				if(x<=1){
					cout<<"什么也没有"<<endl;
				}else if(x==2){
					int jb=rand()%91+10;
					cout<<"你捡到了"<<jb<<"枚coin"<<endl;
					coin+=jb;
				}else if(x>2&&x<=5){
					int gw=rand()%10+11;
					cout<<"你遇到了罕见"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>5&&x<=7){
					int gw=rand()%10+21;
					cout<<"你遇到了稀有"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>7&&x<=10){
					int gw=rand()%10+31;
					cout<<"你遇到了史诗"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}
			}
			Sleep(500);
		}else if(u==2){
			wz--;
		}else if(u==3){
			ccck();
		}
		system("cls");
	}
	system("cls");
}
void huayuanjj(){
	system("cls");
	srand(time(NULL));
	int wz=rand()%5+10;
	while(1){
		if(hp1<=0){
			return ;
		}
		if(wz==0){
			cout<<"撤离成功!!"<<endl;
			Sleep(100);
			return ;
		}
		if(wz==5){
			COUT("你正在危险区!!!\n",4);
		}
		cout<<"你距离撤离点还有"<<wz<<"米"<<endl;
		cout<<"(1)搜索 (2)向撤离点移动(3)打开仓库"<<endl;
		int u;
		cin>>u;
		if(u==1){
			if(wz!=5){
				int x=rand()%10+1;
				if(x<=2){
					cout<<"什么也没有"<<endl;
				}else if(x==3){
					int jb=rand()%178+1;
					cout<<"你捡到了"<<jb<<"枚coin"<<endl;
					coin+=jb;
				}else if(x>3&&x<=6){
					int gw=rand()%10+21;
					cout<<"你遇到了稀有"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>6&&x<=8){
					int gw=rand()%10+31;
					cout<<"你遇到了史诗"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>8&&x<=10){
					int gw=rand()%10+41;
					cout<<"你遇到了传奇"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}
			}else{
				int x=rand()%10+1;
				if(x<=1){
					cout<<"什么也没有"<<endl;
				}else if(x==2){
					int jb=rand()%291+10;
					cout<<"你捡到了"<<jb<<"枚coin"<<endl;
					coin+=jb;
				}else if(x>2&&x<=5){
					int gw=rand()%10+31;
					cout<<"你遇到了史诗"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>5&&x<=7){
					int gw=rand()%10+41;
					cout<<"你遇到了传奇"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}else if(x>7&&x<=10){
					int gw=rand()%10+51;
					cout<<"你遇到了神话"<<guaiwu[gw].nm<<endl;
					Sleep(1000);
					zhan(gw);
				}
			}
			Sleep(500);
		}else if(u==2){
			wz--;
		}else if(u==3){
			ccck();
		}
		system("cls");
	}
	system("cls");
}
void ditu(){
	cout<<"请选择地图"<<endl;
	cout<<"(1)花园"<<endl;
	int u;
	cin>>u;
	if(u==1){
		cout<<"基础还是进阶?(1)基础(2)进阶"<<endl;
		cin>>u;
		if(u==1){
			huayuanjc();
		}else{
			huayuanjj();
		}
	}
}
signed main(){
	COUT("欢迎来到地铁florr\n",6);
	cout<<"是否读档(1)读档(2)不读档"<<endl;
	int o;
	cin>>o;
	if(o==1)read();
	else{
		zhuangbei[++top]=huaban[0];
		zhuangbei[++top]=huaban[0];
		zhuangbei[++top]=huaban[0];
		zhuangbei[++top]=huaban[0];
		zhuangbei[++top]=huaban[0];
	}
	system("cls");

	while(1){
		hp1=hp;
		system("cls");
		cout<<"你的coin:"<<coin<<endl;
		cout<<"(1)进入黑市(2)进入仓库(3)冒险"<<endl;
		save();
		int u;
		cin>>u;
		if(u==1){
			heishi();
		}else if(u==2){
			ccck();
		}else{
			ditu();
		}
	}
}
原文