- BC20270051's blog
txz游戏(没有存档容易出bug慎重选择)
- 2025-2-21 9:23:45 @
#include<bits/stdc++.h> #include<windows.h> #include<conio.h> #include #include<stdio.h> #include<time.h> using namespace std; #define int long long string RED="\033[31m"; string RESET="\033[30m"; string GREEN="\033[32m"; string GOLD="\033[33m"; string PURPLE="\033[35m"; string BLUE="\033[36m"; string GREY="\033[38;5;241m"; string ORANGE="\033[38;5;202m"; string CYAN="\033[38;5;42m"; string BROWN="\033[38;5;52m"; string DARK_GREY="\033[38;5;237m"; string BROWN2="\033[38;5;124m"; string LIGHT_GREY="\033[38;5;247m"; string YELLOW="\033[38;5;208m"; string LIGHT_BLUE="\033[38;5;75m"; string GUHONG="\033[38;5;196m"; string LIGHT_YELLOW="\033[38;5;100m"; string BROWN3="\033[38;5;88m"; string PURPINK="\033[38;5;199m"; inline void slowout(string s,int x) { for(int i=0;i<(int)s.size();i++) {Sleep(x);cout<<s[i];} } inline void jieshao() { slowout("不要改代码!!!后果自负\n",5); slowout("在这个文字放置游戏中,你会建造一个属于自己的文明\n",5); slowout("你的人民是小猫,他们每秒都需要4个猫薄荷\n",5); slowout("食物在前期十分紧缺,建议每人对应7个猫薄荷田\n",5); slowout("寒冬非常可怕,它会夺走你90%的食物产出\n",5); slowout("科学特别重要,工坊看似无用,后期特别厉害\n",5); slowout("建议在第一年秋天前解锁农业\n",5); slowout("资源都有上限,会溢出,禁止挂机\n",10); cout<<RED; slowout("所需资源超过上限的建筑会呈红色\n",5); cout<<GREY; slowout("所需资源尚未达到的建筑会呈灰色\n",5); cout<<RESET; slowout("人口过多会影响幸福度,请慎重,后期有了剧场再考虑\n",15); slowout("怎么办,是不是感觉好难?别担心,前五年已经把你们产量提高了15%(不可能有人5年还发展不出农业吧)\n",30); slowout("熔炉特别有用,不要看见负数就不想开,你们会吃亏的\n",5); system("pause"); system("cls"); return ; } struct node{ double price; int u; }; struct drg{ string s,c; bool f; int r=1,t; double p=1.15; node y[5]; }; struct DRG{ string s; bool f; double t; double v=0; double lmt; }; struct scs{ string s,c; int f; double price,manuscript,summary,blueprint; }; struct up{ string s; int f; }; struct gf{ string s,c; bool f; double t; int r=1; node y[5]; }; struct zy{ string s; bool f; int t; }; struct Page{ string s; bool f; }; struct zj{ string s,c; int t,f,g; double price,gold,pt; }; struct Exchange{ string s;
}; drg a[1005]; DRG b[1055]; scs c[125]; up d[1005]; gf e[25]; zy g[15]; Page page[15]; zj I[20]; double fur,ivory,unicorn; int r,sky,rock,skysc,skymn,co,u,year,upp,wd=100,scc,ct=400; double fishh,woodd,eff=1,ty_add; int hunnt,pg=1; vectorh[1005]; inline char fuhao(double x) { if(x>=0)return '+'; else return '-'; } double zyc; string season; int rl,hunt,bb; double happy=1; bool kfz=0; inline bool ironn() { return b[2].t>0.5rl&&b[5].t>0.2rl; } inline bool __up(int upp) { if(upp1) { if(b[2].t>=100&&b[4].t>=50) { return 1; } } if(upp2) { if(b[5].t>=275&&b[4].t>=100) { return 1; } } if(upp3) { if(b[6].t>=25&&b[4].t>=200) { return 1; } } if(upp4) { if(b[1].t>=5000) { return 1; } } if(upp5) { if(b[4].t>=250) { return 1; } } if(upp6) { if(b[2].t>=100&&b[4].t>=70) { return 1; } } if(upp7) { if(b[5].t>=500&&b[4].t>=100) { return 1; } } if(upp8) { if(b[6].t>=50&&b[4].t>=200) { return 1; } } if(upp9) { if(b[5].t>=250&&b[2].t>=50&&b[4].t>=1000) { return 1; } } if(upp10) { if(b[6].t>=750&&b[4].t>=2000) { return 1; } } return 0; } inline void funcup() { if(upp1) { b[2].t-=100;b[4].t-=50; fishh+=0.2; } if(upp2) { b[5].t-=275;b[4].t-=100; fishh+=0.5; } if(upp3) { b[6].t-=25;b[4].t-=200; fishh+=0.3; } if(upp4) { b[1].t-=5000; wd=50;e[0].y[1].price=50; } if(upp5) { b[4].t-=250; scc=1; } if(upp6) { b[2].t-=100;b[4].t-=70; woodd+=0.3; } if(upp7) { b[5].t-=500;b[4].t-=100; woodd+=0.7; } if(upp8) { b[6].t-=50;b[4].t-=200; woodd+=0.5; } if(upp9) { b[5].t-=250;b[2].t-=50;b[4].t-=1000; hunnt++; } if(upp10) { b[6].t-=750;b[4].t-=2000; hunnt+=2; } d[upp].f=2; return ; } inline void cl(int i) { bool red=0,canbuy=1; for(int j=1;j<=a[i].r;j++) { if(b[a[i].y[j].u].t<a[i].y[j].price) { canbuy=0; } if(a[i].y[j].u<=500&&a[i].y[j].price>b[a[i].y[j].u].lmt)red=1; } if(red) cout<<RED<<a[i].s<<RESET; else if(!canbuy)cout<<GREY<<a[i].s<<RESET; else cout<<a[i].s; } inline void RES() { for(int i=1;i<=1000;i++) b[i].s=b[i].s+string(RESET); } signed main() { system("color f0"); srand(time(0)); a[1].s="猫薄荷田";a[1].y[1]={4,1};a[1].f=1;a[1].p=1.12;a[1].c="产出食物0.63/s"; a[2].s="小屋";a[2].y[1]={5,2};a[2].p=2.5;a[2].c="增加人口"; a[3].s="图书馆";a[3].y[1]={25,2};a[3].c="解锁科学和天文事件"; a[4].s="矿井";a[4].y[1]={100,2};a[4].c="解锁矿物"; a[5].s="工坊";a[5].r=2;a[5].y[1]={400,5};a[5].y[2]={100,2};a[5].p=1.15;a[5].c="解锁工坊内工艺制作和升级,非常重要,工艺制作效率+6%"; a[6].s="牧场";a[6].r=2;a[6].y[1]={15,2};a[6].y[2]={100,1};a[6].p=1.15;a[6].c="对食物需求-0.5%"; a[7].s="熔炉";a[7].y[1]={100,5};a[7].c="每秒消耗木和矿物产出铁"; a[8].s="水渠";a[8].y[1]={75,5};a[8].p=1.12;a[8].c="对食物产出加成3%"; a[9].s="粮仓";a[9].y[1]={50,2};a[9].p=1.75;a[9].c="为各种资源提供更高上限"; a[10].s="研究院";a[10].r=3;a[10].y[1]={50,2};a[10].y[2]={70,5};a[10].y[3]={100,4};a[10].c="更大加成科学"; a[11].s="剧场";a[11].r=3;a[11].y[1]={200,2};a[11].y[2]={1200,5};a[11].y[3]={3,1004};a[11].c="产出极其少量文化,但特有用"; a[12].s="仓库";a[12].r=2;a[12].y[1]={1.5,1001};a[12].y[2]={2,1002};a[12].c="另一种存储资源方式"; a[13].s="神殿";a[13].r=4;a[13].y[1]={25,1002};a[13].y[2]={15,1003};a[13].y[3]={50,7};a[13].y[4]={10,1005};a[13].c="产出剧场20倍文化,此后文化再也不是稀缺品"; a[14].s="木材厂";a[14].r=3;a[14].y[1]={100,2};a[14].y[2]={50,6};a[14].y[3]={250,5};a[14].c="加工木材效率+10%"; a[15].s="港口";a[15].r=3;a[15].y[1]={5,1011};a[15].y[2]={50,1002};a[15].y[3]={75,1003};a[15].p=1.15; a[16].s="天文台";a[16].r=4;a[16].y[1]={50,1011};a[16].y[2]={35,1002};a[16].y[3]={750,6};a[16].y[4]={1000,4};a[16].p=1.1; b[1].s=CYAN+"猫薄荷";b[1].f=1;b[1].t=12000;b[1].lmt=12000; b[2].s=BROWN+"木材";b[2].f=1;b[2].lmt=5000; b[3].s=YELLOW+"猫口";b[3].lmt=0; b[4].s=BLUE+"科学";b[4].lmt=1500; b[5].s="矿物";b[5].lmt=2000; b[6].s=GREY+"铁";b[6].lmt=600; b[7].s=GOLD+"黄金";b[7].lmt=50; b[8].s=YELLOW+"喵力";b[8].lmt=250; b[9].s=PURPLE+"文化";b[9].lmt=100; b[10].s="煤";b[10].lmt=75; b[11].s=GREY+"钛";b[11].lmt=10; b[12].s=GOLD+"信仰";b[12].lmt=100; b[13].s="石油";b[13].lmt=1500; b[14].s=GREEN+"铀";b[14].lmt=250; b[15].s="难得素";b[15].lmt=150; b[501].s="虔诚"; b[502].s="顿悟"; b[503].s=PURPLE+"星图"; b[996].s=BROWN2+"毛皮";b[996].f=1; b[997].s=LIGHT_GREY+"象牙";b[997].f=1; b[998].s=ORANGE+"独角兽"; page[1].s="营火";page[1].f=1; page[2].s="村庄"; page[3].s="科学"; page[4].s="工坊"; page[5].s="贸易"; page[6].s="宗教"; page[7].s="空间"; page[8].s="时间"; page[9].s="统计"; RES(); for(int i=1;i<=7;i++) { h[i].push_back(i+1); } h[7].push_back(9); h[8].push_back(10); h[10].push_back(11); h[11].push_back(12); h[11].push_back(13); h[11].push_back(14); h[14].push_back(15); h[15].push_back(16); h[16].push_back(17); h[16].push_back(18); h[16].push_back(21); h[17].push_back(20); h[18].push_back(19); c[1].s="历法";c[1].price=30;c[1].c="今天是周几啦?";c[1].f=1; c[2].s="农业";c[2].price=100;c[2].c="再也不用担心食物啦"; c[3].s="畜牧业";c[3].price=300;c[3].c="来一杯牛奶,先生!"; c[4].s="采矿";c[4].price=500;c[4].c="比木材坚硬多了"; c[5].s="金属冶炼";c[5].price=900;c[5].c="掌握金属加工,是文明的基础"; c[6].s="建筑";c[6].price=1300;c[6].c="通向大型建筑的必经之路"; c[7].s="数学";c[7].price=1000;c[7].c="数学是所有科学的基础"; c[8].s="货币";c[8].price=2200;c[8].c="金本位制"; c[9].s="工程";c[9].price=1500;c[9].c="能够建设大型工程是国家的根本"; c[10].s="写作";c[10].price=3600;c[10].c="文学开启了文明的大门"; c[11].s="哲学";c[11].price=9500; c[12].s="钢";c[12].price=12000; c[13].s="机械";c[13].price=15000; c[14].s="神学";c[14].price=20000;c[14].manuscript=35; c[15].s="天文学";c[15].price=28000;c[15].manuscript=65; c[16].s="导航学";c[16].price=35000;c[16].manuscript=100; c[17].s="建筑学";c[17].price=42000;c[17].summary=10; c[18].s="物理学";c[18].price=50000;c[18].summary=35; c[19].s="化学";c[19].price=60000;c[19].summary=50; c[20].s="声学";c[20].price=60000;c[20].summary=60; c[21].s="地质学";c[21].price=65000;c[21].summary=65; d[1].s="木锄(对fish产出加成20%)100wood,50science"; d[2].s="矿石锄(对fish产出加成50%)275mineral,100science"; d[3].s="生铁锄(对fish产出加成30%)25iron,200science"; d[4].s="浓缩(木的价格变为50)5000catnip"; d[5].s="天体力学(对罕见天文现象有加成)250science"; d[6].s="木斧(对wood产出加成30%)100wood,70science"; d[7].s="矿石斧(对wood产出加成70%)500mineral,200science"; d[8].s="生铁斧(对wood产出加成50%)50iron,200science"; d[9].s="投石索(狩猎增益+100%)250mineral,50wood,1000science"; d[10].s="狩猎盔甲(狩猎增益+200%)750iron,2000science"; d[11].s="复合弓(改进后的弓,喵力产出获得50%的永久加成)500science,100iron,200wood"; d[12].s="弩(进一步改良的弓,喵力产出获得25%的永久加成)1500iron,12Kscience"; d[13].s="精钢斧(对wood产出加成50%)"; d[14].s="自动狩猎 15Kscience,10齿轮"; d[15].s="工坊自动化"; e[0].s=b[2].s+RESET;e[0].f=1;e[0].y[1]={100,1}; e[1].s=BROWN+"木梁"+RESET;e[1].f=1;e[1].y[1]={175,2}; e[2].s=GREY+"石板"+RESET;e[2].f=1;e[2].y[1]={250,5}; e[3].s=LIGHT_YELLOW+"金属板"+RESET;e[3].f=1;e[3].y[1]={125,6}; e[4].s=BROWN3+"羊皮纸"+RESET;e[4].f=1;e[4].y[1]={175,996}; e[5].s=LIGHT_BLUE+"手稿"+RESET;e[5].r=2;e[5].y[1]={25,1004};e[5].y[2]={400,9}; e[6].s=DARK_GREY+"钢"+RESET;e[6].r=2;e[6].y[1]={100,6};e[6].y[2]={100,10}; e[7].s=GREY+"齿轮"+RESET;e[7].y[1]={15,1006}; e[8].s=GREY+"混凝土"+RESET;e[8].r=2;e[8].y[1]={2500,1002};e[8].y[2]={25,1006}; e[9].s=GOLD+"合金"+RESET;e[9].r=2;e[9].y[1]={75,1006};e[9].y[2]={10,11}; e[10].s=GREY+"E合金"+RESET; e[11].s=BROWN+"脚手架"+RESET;e[11].y[1]={50,1001}; e[12].s="贸易船";e[12].r=3;e[12].y[1]={100,1011};e[12].y[2]={150,1003};e[12].y[3]={25,503}; e[13].s="概要";e[13].r=2;e[13].y[1]={50,1005};e[13].y[2]={10000,4}; e[14].s=BLUE+"蓝图"+RESET;e[14].r=2;e[14].y[1]={25,1013};e[14].y[2]={25000,4}; e[15].s="钍";e[15].y[1]={250,14}; e[16].s="煤油";e[16].y[1]={7500,13}; e[17].s="巨石"; g[1].s="伐木工";g[1].f=1; g[2].s="农民"; g[3].s="科学家"; g[4].s="矿工"; g[5].s="牧师"; g[6].s="地质学家"; I[1].s="阳光赞歌";I[1].price=100;I[1].pt=150;I[1].c="信仰产出增加10%"; I[2].s="经院哲学";I[2].price=250;I[2].pt=300;I[2].c="神殿提供科学上限"; I[3].s="黄金塔尖";I[3].price=350;I[3].gold=150;I[3].pt=500;I[3].c="神殿信仰储存上限提高50%"; I[4].s="太阳祭坛";I[4].price=500;I[4].gold=250;I[4].pt=750;I[4].c="每个神殿使幸福度提高0.5%"; I[5].s="彩色玻璃";I[5].price=500;I[5].gold=250;I[5].pt=750;I[5].c="神殿产出两倍的文化点"; I[6].s="太阳革命";I[6].price=750;I[6].gold=500;I[6].pt=1000;I[6].g=1;I[6].c="积累的信仰将轻微推动资源生产效率"; I[7].s="大教堂";I[7].price=1250;I[7].gold=750;I[7].pt=10000;I[7].c="神殿产出更多的文化点,提高文化储存上限"; I[8].s="圣殿骑士";I[8].price=3500;I[8].gold=3000;I[8].pt=75000;I[8].c="神殿少量提升喵力上限"; I[9].s="新约外传";I[9].price=5000;I[9].gold=5000;I[9].pt=100000;I[9].g=1;I[9].c="赋予虔诚转化为顿悟的能力,从而提升赞美太阳的效率。"; I[10].s="超越";I[10].price=7500;I[10].gold=7500;I[10].pt=125000;I[10].g=1;I[10].c="解锁额外的宗教升级";I[10].f=0; slowout("WELCOME TO CAT CITY BUILDER\n",10); slowout("YOU ARE A LITTLE CAT IN THE CATNIP FOREST\n",10); slowout("是否需要介绍和攻略,是则按↑键,否则按Enter\n",10); while(1) { if(GetAsyncKeyState(VK_RETURN)&0x8000)break ; if(GetAsyncKeyState(VK_UP)&0x8000) { jieshao();break ; } } for(int i=1;i<=20;i++) {b[1000+i].s=e[i].s;} while(1) { system("cls"); if(I[6].f) { ty_add=1+(sqrt(1+b[501].t/125)-1)/200; }else ty_add=1; for(int i=1;i<=20;i++) {b[1000+i].t=e[i].t;} if(b[1].t<0)break; if(b[3].t>=5) { happy=1-(b[3].t-5)0.02pow(0.952,a[11].t); } else happy=1; if(happy<0.2)happy=0.2; if(b[996].t>0.1)happy+=0.1; if(b[997].t>0.1)happy+=0.1; if(b[998].t>0.1)happy+=0.1; if(I[4].t)happy+=(0.005+0.001*(I[4].t-1))a[13].t; co=co%400+1; int ut=rand()%3; if(co1) { year++; if(ut0) zyc=1.65; if(ut1) zyc=1.5; if(ut2) zyc=1.35; if(ut0) season="春(温暖)"; if(ut1) season="春"; if(ut2) season="春(寒冷)"; season=string(GREEN)+season; } if(co101) { if(ut0) zyc=1.15; if(ut1) zyc=1; if(ut2) zyc=0.85; if(ut0) season="夏(温暖)"; if(ut1) season="夏"; if(ut2) season="夏(寒冷)"; season=string(YELLOW)+season; } if(co201) { if(ut0) zyc=1.15; if(ut1) zyc=1; if(ut2) zyc=0.85; if(ut0) season="秋(温暖)"; if(ut1) season="秋"; if(ut2) season="秋(寒冷)"; season=string(GUHONG)+season; } if(co301) { if(ut0) zyc=0.4; if(ut1) zyc=0.25; if(ut2) zyc=0.1; if(ut0) season="冬(温暖)"; if(ut1) season="冬"; if(ut2) season="冬(寒冷)"; season=string(LIGHT_BLUE)+season; } if(c[1].f2)cout<<"第"<<year<<"年\n"; cout<<season<<RESET<<"\n"; if(c[1].f2)cout<<"第"<<(co-1)%100+1<<"天\n"; if(c[2].f2)g[2].f=1; if(c[14].f2){g[5].f=1;b[12].f=b[501].f=1;} if(a[3].t) { if(rand()%400==0) { sky=25;skysc=60(1+scc0.3)+rand()%70; b[4].t+=skysc; } if(rand()%1000==0) { skysc=50(1+(upp>5))+rand()%40,skymn=50*(1+(upp>5))+rand()%60;rock=25; b[4].t+=skysc; b[5].f=1;b[5].t+=skymn; } } if(sky) { cout<<"天空中出现了一种罕见的天文现象\n";sky--; cout<<"科学+"<<skysc<<"!\n"; } if(rock) { cout<<"一颗陨石坠落在村庄附近,科学+"<<skysc<<",矿物+"<<skymn<<"!\n";rock--; } if(bb) { cout<<"你的小猫回来了\n"; cout<<fur<<b[996].s<<RESET<<" "; cout<<ivory<<b[997].s<<RESET<<" "; if(unicorn){cout<<unicorn<<b[998].s<<"\n";b[998].f=1;} else cout<<"\n"; bb--; } cout<<PURPINK<<"幸福度"<<RESET<<":"<<happy100<<"%\n"; if(c[14].f==2)cout<<GOLD<<"太阳革命加成"<<RESET<<":"<<(ty_add-1)100<<"%\n"; //cout<<DARK_GREY<<"污染"<<RESET<<":"; if(r)r=(r+1)%6; b[1].v=a[1].t0.63zyc*(1+a[8].t0.03+(c[2].f==2)0.2)-b[3].t4pow(0.995,a[6].t)+5g[2].t(1+fishh); b[1].v*=ty_add; b[1].t+=b[1].v; b[2].v=g[1].t0.2(1+woodd+0.1a[14].t)happy-ironn()0.5rl; b[2].v=ty_add; b[2].t+=b[2].v; b[4].v=g[3].t0.2*(1+0.1a[3].t+0.2a[10].t)happy; b[4].v=ty_add; b[4].t+=b[4].v; b[5].v=g[4].t0.3(1+a[4].t0.2)happy-ironn()0.2rl; b[5].v=ty_add; b[5].t+=b[5].v; b[6].v=ironn()rl0.1; b[6].v=ty_add; b[6].t+=b[6].v; b[8].v=0.75b[3].thappy; b[8].v*=ty_add; b[8].t+=b[8].v; b[9].v=(0.025a[11].t+a[13].t(0.5+0.5I[5].t+((I[7].t)?(1+0.25(I[7].t-1)):0))); b[9].v*=ty_add; b[9].t+=b[9].v; b[12].v=0.0075g[5].thappy*(1+0.1I[1].t); b[12].v=ty_add; b[12].t+=b[12].v; b[996].v=-0.05b[3].t; b[996].t+=b[996].v; b[996].t=max(b[996].t,0.00); b[997].v=-0.02b[3].t; b[997].t+=b[997].v; b[997].t=max(b[997].t,0.00); if(b[7].f) { b[7].v=ironn()rl0.025; b[7].v*=ty_add; b[7].t+=b[7].v; } if(b[14].f) { b[14].v=a[13].t0.175; b[14].v=ty_add; b[14].t+=b[14].v; } cout<<"输入p以及页码以切换页面\n"; for(int i=1;i<=10;i++) { if(page[i].f) { cout<<"|"<<i; if(ipg)cout<<RED; cout<<page[i].s<<RESET; } } cout<<"|\n--------------------\n"; if(pg3) { cout<<b[4].s<<"\n"; cout<<"press s to buy science,then cin the number\n"; for(int i=1;i<=115;i++) { if(c[i].f0||c[i].f2)continue ; int se=c[i].price; cout<<i<<":["<<((se>b[4].lmt)?RED:((b[4].t>=se&&e[5].t>=c[i].manuscript)?RESET:GREY))<<c[i].s<<RESET<<"] price:"<<se<<" "; if(c[i].manuscript)cout<<c[i].manuscript<<e[5].s<<" "; cout<<c[i].c<<"\n"; } } if(pg4) { cout<<"工坊\n"; if(d[1].f0&&c[2].f2)d[1].f=1; if(d[2].f0&&c[4].f2)d[2].f=1; if(d[3].f0&&c[5].f2)d[3].f=1; if(d[4].f0&&c[2].f2)d[4].f=1; if(d[5].f0&&c[7].f2)d[5].f=1; if(d[6].f0&&c[3].f2)d[6].f=1; if(d[7].f0&&c[6].f2)d[7].f=1; if(d[8].f0&&c[6].f2)d[8].f=1; if(d[9].f0&&c[4].f2)d[9].f=1; if(d[10].f0&&c[5].f2)d[10].f=1; cout<<"升级\n"; cout<<"press u to buy upp,then cin the number\n"; for(int i=1;i<=1000;i++) { if(d[i].f1) { if(!__up(i))cout<<GREY; cout<<i<<" "<<d[i].s<<"\n"; cout<<RESET; } } cout<<"------------------------\n"; cout<<"工艺制作效率:"<<eff100<<"%\n"; for(int i=0;i<=17;i++) { cout<<char('a'+i)<<":"<<e[i].s<<"("; for(int j=1;j<=e[i].r;j++) { cout<<e[i].y[j].price<<b[e[i].y[j].u].s; if(j<e[i].r) cout<<","; } cout<<"):"<<e[i].t<<"\n"; } } if(pg6) { cout<<RED<<"进行操作前先输入z\n"<<RESET; cout<<"0:赞美太阳(将所有信仰转化为虔诚)\n"; for(int i=1;i<=10;i++) { if(I[10].t0&&I[i].t) continue ; if(b[501].t>=I[i].pt)I[i].f=1; if(!I[i].f) continue ; cout<<i<<":"; if(I[i].price>b[12].lmt||I[i].gold>b[7].lmt) cout<<RED; else if(I[i].price<=b[12].t&&I[i].gold<=b[7].t) cout<<RESET; else cout<<GREY; cout<<I[i].s<<RESET; cout<<"("<<I[i].t<<") "<<I[i].price<<b[12].s; if(I[i].gold) { cout<<" "<<I[i].gold<<b[7].s; } cout<<" "<<I[i].c<<"\n"; } } if(pg1) { for(int i=1;i<=20;i++) { if(a[i].f) { if(i<=9)cout<<i; else cout<<char('A'+i-10); cout<<":"; cl(i);cout<<"("<<a[i].t<<") price:"; for(int j=1;j<=a[i].r;j++) { cout<<a[i].y[j].price<<b[a[i].y[j].u].s<<" "; } cout<<" "<<a[i].c<<"\n"; } } } if(pg5) { // } cout<<"--------------------\n"; cout<<"a:精炼猫薄荷(100)\n"; for(int i=1;i<=1000;i++) { if(b[i].t>b[i].lmt&&i<=500&&kfz0) {b[i].t=b[i].lmt;} if(b[i].f) { if(i<=500) { cout<<b[i].s<<RESET; cout<<":"<<b[i].t<<"/"<<b[i].lmt<<" "<<fuhao(b[i].v)<<fabs(b[i].v)<<"/s\n"; } else { cout<<b[i].s<<":"<<b[i].t<<" "<<fuhao(b[i].v)<<fabs(b[i].v)<<"/s\n"; } } } if(a[7].t) { cout<<"目前熔炉开启数量:"<<rl<<"\n"; cout<<"+:开启一个熔炉\n"; cout<<"-:关闭一个熔炉\n"; } if(b[8].f&&b[8].t>=100) { cout<<"h:打猎"<<((int)b[8].t)/100<<"次\n"; } if(b[3].t) { cout<<"r:替换职业\n"; cout<<"输入正整数x,y,k,表示从x职业调换k个人到y职业\n"; cout<<"记得输入r\n"; for(int i=1;i<=14;i++) { if(g[i].f) { cout<<i<<" "<<g[i].s<<":"<<g[i].t<<"\n"; } } } char u; cin>>u; if(u'Z') { slowout("进入开发者模式!\n",5);kfz=1; int w; while(cin>>w) { if(!w)break; if(w>500) { b[w].t+=1e6; if(w>1000)e[w-1000].t+=1e6; } else b[w].t+=b[w].lmt10; } } if(u=='r') { int X,Y,K; cin>>X>>Y>>K; if(g[X].f&&g[Y].f&&g[X].t>=K) { g[X].t-=K;g[Y].t+=K; } } if(u=='+') { if(rl<a[7].t) rl++; } if(u=='-') { if(rl>0) rl--; } if(u=='s') { int sc; cin>>sc; if(b[4].t>=c[sc].price&&e[5].t>=c[sc].manuscript) { b[4].t-=c[sc].price; e[5].t-=c[sc].manuscript; c[sc].f=2; for(int i=0;i<(int)h[sc].size();i++) { c[h[sc][i]].f=1; } } } if(u=='h') { hunt=((int)b[8].t)/100; b[8].t-=(double)hunt100; fur=0,ivory=0,unicorn=0;bb=10; for(int i=1;i<=hunt;i++) { fur+=750(1+hunnt)+rand()%400; ivory+=450*(1+hunnt)+rand()%250; if(rand()%201) unicorn++; } b[996].t+=fur; b[997].t+=ivory; b[998].t+=unicorn; } if(u'z') { int w;cin>>w; if(!w) { b[501].t+=b[12].t;b[12].t=0; }else { bool canbuy=0; if(I[w].t&&I[10].f0)continue ; if(I[w].g&&I[w].t)continue ; if(b[12].t>=I[w].price&&b[7].t>=I[w].gold) { canbuy=1; I[w].f=1; I[w].t++; b[12].t-=I[w].price; b[7].t-=I[w].gold; I[w].price*=2.5; I[w].gold*=2.5; } if(!canbuy)continue ; if(w2) { if(I[w].t1) { b[4].lmt+=a[13].t500; }else { b[4].lmt+=a[13].t100; } } if(w3) { if(I[w].t1) { b[12].lmt+=a[13].t50; }else { b[12].lmt+=a[13].t10; } } if(w7) { if(I[w].t1) { b[9].lmt+=a[13].t125; }else { b[9].lmt+=a[13].t50; } } if(w8) { if(I[w].t1) { b[8].lmt+=a[13].t75; }else { b[8].lmt+=a[13].t25; } } } } int gy; if(u>='a'&&u<='y'&&u!='s'&&u!='h'&&u!='r'&&u!='u'&&u!='p') { cout<<"请输入需要制作多少次"<<e[u-'a'].s<<"工艺(最多可制作"; int AB=1e9+7; int k=u-'a'; for(int j=1;j<=e[k].r;j++) { AB=min(AB,((int)b[e[k].y[j].u].t)/((int)e[k].y[j].price)); } cout<<AB<<"次):"; cin>>gy; if(gy>AB)continue ; for(int j=1;j<=e[k].r;j++) { b[e[k].y[j].u].t-=gye[k].y[j].price; } for(int i=1;i<=20;i++) { e[i].t=b[i+1000].t; } e[k].t+=gyeff; b[k+1000].t=e[k].t; if(!k)b[2].t=e[0].t; } if(u'u') { cin>>upp; if(!d[upp].f)continue ; if(__up(upp))funcup(); } if(u=='p') { cin>>pg; } if(c[14].f2)page[6].f=1; if(a[1].f0&&b[1].t>=3)a[1].f=1; if(a[2].f0&&b[2].t>=5)a[2].f=1; if(a[3].f0&&b[2].t>=15)a[3].f=1; if(a[4].f0&&b[2].t>=75)a[4].f=1; if(a[5].f0&&b[5].t>=75&&c[4].f2)a[5].f=1; if(a[6].f0&&c[3].f2)a[6].f=1; if(a[7].f0&&c[5].f2){a[7].f=1;b[6].f=1;} if(a[7].t&&c[8].f2)b[7].f=1; if(a[8].f0&&c[9].f2)a[8].f=1; if(a[9].f0&&c[2].f2)a[9].f=1; if(a[10].f0&&c[7].f2)a[10].f=1; if(a[11].f0&&c[10].f2) {a[11].f=1;b[9].f=1;e[5].f=1;} if(a[12].f0&&c[6].f2) {a[12].f=1;} if(a[13].f0&&c[10].f2) {a[13].f=1;} if(a[14].f0&&c[6].f2) {a[14].f=1;} if(u=='0') {b[1].t++;} bool canbuy=1; if((u>='1'&&u<='9')||(u>='A'&&u<='Y')) { int k; if(u>='1'&&u<='9') k=u-'0'; else k=u-'A'+10; for(int i=1;i<=a[k].r;i++) { if(b[a[k].y[i].u].t<a[k].y[i].price) { canbuy=0; } } if(canbuy) { a[k].t++; for(int i=1;i<=a[k].r;i++) { b[a[k].y[i].u].t-=a[k].y[i].price; a[k].y[i].price*=a[k].p; } } for(int i=1;i<=20;i++) {e[i].t=b[1000+i].t;} e[0].t=b[2].t; } if(!canbuy)continue ; if(u=='2') { page[2].f=1; if(g[3].f)g[3].t+=2; else g[1].t+=2; b[3].f=b[4].f=b[8].f=1; r=1; b[3].lmt+=2; b[8].lmt+=200; b[3].t+=2; } if(u=='3') { page[3].f=1; g[3].f=1; b[4].lmt+=250; b[9].lmt+=10; } if(u=='4') { g[4].f=1; b[5].f=1; } if(u=='5') { page[4].f=1; eff+=0.06; } if(u=='9') { b[1].lmt+=5000; b[2].lmt+=200; b[5].lmt+=250; b[6].lmt+=50; b[7].lmt+=10; b[10].lmt+=60; b[11].lmt+=2; } if(u=='A') { b[4].lmt+=500; b[9].lmt+=25; } if(u=='B') { b[9].lmt+=50; } if(u=='C') { b[2].lmt+=150; b[5].lmt+=200; b[6].lmt+=25; b[7].lmt+=5; b[10].lmt+=30; b[11].lmt+=10; } if(u=='D') { b[12].lmt+=100; if(I[2].t) { b[4].lmt+=(500+(I[2].t-1)*100); } if(I[7].t) { b[9].lmt+=(125+(I[7].t-1)*50); } if(I[8].t) { b[8].lmt+=(75+(I[8].t-1)*25); } } Sleep(7); } cout<<"游戏结束\n"; system("pause"); return 0; }