小镇物语正式版 V1.7.2 [可存档!!!]
作者:互联网
小镇物语 1.7.2更新内容
1,究极炸药,可以高效炸矿啦!
2,性能提升,更快的运行速度
3,更丰富的订单
上代码!
#include<iostream>
#include<windows.h>
#include<conio.h>
#include<unistd.h>
#include<cstdlib>
#include<time.h>
#include<cmath>
#include<fstream>
#include<bits/stdc++.h>
#include<cstdio>
#include<cmath>
#define cls system("cls");
#define color(p) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),p);
using namespace std;
int qian=600,weiwang=50,shimin=10,page=1,guidingshimin=30,dengji=1,guidingcaidi=10,sousuoleida=2,yue=1;
bool baoliudingdan_1=true,baoliudingdan_2=true,baoliudingdan_3=true;
int namicailiao,shengtie,jingtie,tiekuang,zuanshi;
int ronglu,lianyaochang,namikejigongchang,xiaozhenmeili,shoufengqing,xiaoxinjuminlou,jianzhusuipian,huishouzhan,jingjishouru;
int tongkuang,xianquan,jijiazhizaotai;//页码
int kuanggong,fashetuijingqi,shengming,kuangjing,pinfang,xiaomaicaidi,xiaomai,yumicaidi,yumi,shouhuo,shouhuo_2,nongmin,peigenjidan;
int tax,shizhangdiaosu,name_2,tanbao_go,dingdan_go,mianbao,yumimianbao,jingyan,jidan,niunai,yangmao,peigen,saijisuipian;
int go,shop_go,hudong_go,kuang_go,hecheng_go,hecheng_go_1,xiaozhenguanli_go,xiaozhenguanli_go_2,shengchan_go,shengchan_go_2;
int gang,hengwentuliao,hangtianqiwaike,tai,dadou,niu,mianyang,ji,zhu,taihejin,yinhuagang,fengqinbieshu,dadoucaidi,jijiaX,hangkong_go,shibing,name_1,kekeguo,kekecaidi,qiaokelidangao,gougoujinianbei,caidi;
bool niunaizhige,jidandaheng,peigenwang,yangmaowangzi,weishi,mitangguan,chawang;//
int tiaozhanzhehaohuojian,fashetuijinqi,yuequliaojedu,nengliangjingkuai,chaodaoxianquan,nenglianghexin;
int xinpianB,xinpianA,xinpianS,sheshicaozuo_go_2,sheshicaozuo_go_3,huojiandan,shouhuo_3;
int xue,gong,qingshuiwandasha,tian,nailao,ganzhe,ganzhecaidi,hongtang,siliao,fangzhichang,mianbu,maoyi,jijiaY,jijiaZ,weijin,edu;
int huolongxinzangshenjin,dianjiyaoshui,lvseliquan,lanseliquan,ziseliquan,jinseliquan,daxiang,hema,eyu;
int lajiao,lajiaocaidi,muban,luodin,shengchan_go_3;
int zhayao,huoyanyaoshui,gancaodui,liyu,mifeng,fengmi,yaomiji,jiujizhayao;
int jinmatitie,yinmatitie,tongmatitie,changeyihao,tiantianquan,shouhuoshijian;
int qiuyinyuer,xiangyiyuer,feimeiyuer,yangzhi_go,caimi,guidingfengfang,fengfang,fengtang,yuerji,zhiziMhaohuojian;
bool chunvzuoxinyun;
int xiaomao,xiaogou,goupai,qingmizhi,chongwuliang,xiaochouyu,huangyou,jiaolonghao,shimin_nv,shimin_nan,xiangjiaocaidi,xiangjiao;
int saiche,ranliao,qichechang,hongsehaimian,huangsehaimian,kesong;
int yusai,huxiyaoshui,chekujia_B,chekujia_A,chekujia_S,futeyingqin,futeGT,jichuhuosai,shazi,boli;
int meiguiyuan,meigui,choujuyuan,chouju,meiguinaicha,hongchacong,hongchaye,naichafang,zidongcundang;
int jiayuandengji,jiayuanfangyu,jiayuanfangyu_shangxian;
int tieciweilan,dianwang,qiandianchi,lidianchi,qiankuang,likuang,gaofenzituceng,mada,jingongmada,wurenji_shenlan,wurenji_molv,wurenji_liehuo;
int jichudaohangyi,zhongjidaohangyi,gaojidaohangyi,wurenji_shenlan_nengliang,wurenji_molv_nengliang,wurenji_liehuo_nengliang;
int dingdan_zz,dingdan_wt;
int c[4000];
//上次行数:2408 2488 3155 3482
void show();
struct WEATHER
{
int tianqi;
}weather;
void caidimianjipanduan()
{
if((ganzhecaidi+xiaomaicaidi+yumicaidi+dadoucaidi+lajiaocaidi+kekecaidi+xiangjiaocaidi)>guidingcaidi)caidi=false;
else caidi=true;
}
void chenggonghecheng()
{
cout<<"成功合成"<<endl;
Sleep(1000);
}
void say(const string a,int suduu)
{
size_t len=a.size();
for(int i=0;i<a.size();i++)
{
cout<<a[i];
Sleep(suduu);
}
}
void dqcd()//读档
{
ifstream infile;
ofstream outfile;
int i=1;
infile.open("存档信息.dll");
while (!infile.eof()&&i<=200)
{
infile >> c[i];
i++;
}
qian=c[1];
namicailiao=c[2];
shengtie=c[3];
jingtie=c[4];
kuanggong=c[5];
kuangjing=c[6];
tiekuang=c[7];
zuanshi=c[8];
weiwang=c[9];
ronglu=c[10];
lianyaochang=c[11];
name_2=c[12];
namikejigongchang=c[13];
shimin=c[14];
pinfang=c[15];
xiaozhenmeili=c[16];
guidingshimin=c[17];
shoufengqing=c[18];
xiaoxinjuminlou=c[19];
tongkuang=c[20];
xianquan=c[21];
jingjishouru=c[22];
jianzhusuipian=c[23];
xiaomaicaidi=c[24];
xiaomai=c[25];
yumicaidi=c[26];
yumi=c[27];
nongmin=c[28];
shizhangdiaosu=c[29];
mianbao=c[30];
yumimianbao=c[31];
gang=c[32];
hengwentuliao=c[33];
hangtianqiwaike=c[34];
tai=c[35];
dadou=c[36];
niu=c[37];
mianyang=c[38];
ji=c[39];
zhu=c[40];
taihejin=c[41];
yinhuagang=c[42];
fengqinbieshu=c[43];
jingyan=c[44];
dengji=c[45];
dadoucaidi=c[46];
jidan=c[47];
niunai=c[48];
yangmao=c[49];
peigen=c[50];
peigenjidan=c[51];
jijiaX=c[52];
niunaizhige=c[53];
jidandaheng=c[54];
peigenwang=c[55];
kekecaidi=c[56];
kekeguo=c[57];
qiaokelidangao=c[58];
huishouzhan=c[59];
gougoujinianbei=c[60];
fashetuijingqi=c[61];
yuequliaojedu=c[62];
nengliangjingkuai=c[63];
xinpianB=c[64];
xinpianA=c[65];
xinpianS=c[66];
chaodaoxianquan=c[67];
jijiazhizaotai=c[68];
nenglianghexin=c[69];
sousuoleida=c[70];
shibing=c[71];
huojiandan=c[72];
nailao=c[73];
ganzhe=c[74];
ganzhecaidi=c[75];
hongtang=c[76];
siliao=c[77];
fangzhichang=c[78];
mianbu=c[79];
maoyi=c[80];
jijiaY=c[81];
jijiaZ=c[82];
weijin=c[83];
edu=c[84];
shengming=c[85];
qingshuiwandasha=c[86];
huolongxinzangshenjin=c[87];
dianjiyaoshui=c[88];
yangmaowangzi=c[89];
lvseliquan=c[90];
lanseliquan=c[91];
ziseliquan=c[92];
jinseliquan=c[93];
daxiang=c[94];
hema=c[95];
eyu=c[96];
zhayao=c[97];
guidingcaidi=c[98];
muban=c[99];
luodin=c[100];
lajiao=c[101];
lajiaocaidi=c[102];
tian=c[103];
yue=c[104];
mifeng=c[105];
fengmi=c[106];
yaomiji=c[107];
huoyanyaoshui=c[108];
jinmatitie=c[109];
yinmatitie=c[110];
tongmatitie=c[111];
changeyihao=c[112];
tiantianquan=c[113];
shouhuoshijian=c[114];
qiuyinyuer=c[115];
xiangyiyuer=c[116];
feimeiyuer=c[117];
gancaodui=c[118];
liyu=c[119];
guidingfengfang=c[120];
fengfang=c[121];
fengtang=c[122];
yuerji=c[123];
mitangguan=c[124];
xiaomao=c[125];
xiaogou=c[126];
qingmizhi=c[127];
goupai=c[128];
chongwuliang=c[129];
zhiziMhaohuojian=c[130];
chunvzuoxinyun=c[131];
shimin_nv=c[132];
shimin_nan=c[133];
xiaochouyu=c[134];
huangyou=c[135];
saiche=c[134];
ranliao=c[135];
qichechang=c[136];
jiaolonghao=c[137];
hongsehaimian=c[138];
huangsehaimian=c[139];
yusai=c[140];
huxiyaoshui=c[141];
kesong=c[142];
saijisuipian=c[143];
chekujia_B=c[144];
chekujia_A=c[145];
chekujia_S=c[146];
futeyingqin=c[147];
futeGT=c[148];
jichuhuosai=c[149];
shazi=c[150];
boli=c[151];
xiangjiaocaidi=c[152];
xiangjiao=c[153];
meiguiyuan=c[154];
meigui=c[155];
choujuyuan=c[156];
chouju=c[157];
meiguinaicha=c[158];
hongchacong=c[159];
hongchaye=c[160];
naichafang=c[161];
chawang=c[162];
zidongcundang=c[163];
jiayuandengji=c[164];
jiayuanfangyu=c[165];
jiayuanfangyu_shangxian=c[166];
tieciweilan=c[167];
dianwang=c[168];
qiandianchi=c[169];
lidianchi=c[170];
qiankuang=c[171];
likuang=c[172];
gaofenzituceng=c[173];
mada=c[174];
jingongmada=c[175];
wurenji_shenlan=c[176];
wurenji_molv=c[177];
wurenji_liehuo=c[178];
jichudaohangyi=c[179];
zhongjidaohangyi=c[180];
gaojidaohangyi=c[181];
wurenji_shenlan_nengliang=c[182];
wurenji_molv_nengliang=c[183];
wurenji_liehuo_nengliang=c[184];
jiujizhayao=c[185];
}
void swcd()//存档
{
ofstream outfile[3];
c[1]=qian;
c[2]=namicailiao;
c[3]=shengtie;
c[4]=jingtie;
c[5]=kuanggong;
c[6]=kuangjing;
c[7]=tiekuang;
c[8]=zuanshi;
c[9]=weiwang;
c[10]=ronglu;
c[11]=lianyaochang;
c[12]=name_2;
c[13]=namikejigongchang;
c[14]=shimin;
c[15]=pinfang;
c[16]=xiaozhenmeili;
c[17]=guidingshimin;
c[18]=shoufengqing;
c[19]=xiaoxinjuminlou;
c[20]=tongkuang;
c[21]=xianquan;
c[22]=jingjishouru;
c[23]=jianzhusuipian;
c[24]=xiaomaicaidi;
c[25]=xiaomai;
c[26]=yumicaidi;
c[27]=yumi;
c[28]=nongmin;
c[29]=shizhangdiaosu;
c[30]=mianbao;
c[31]=yumimianbao;
c[32]=gang;
c[33]=hengwentuliao;
c[34]=hangtianqiwaike;
c[35]=tai;
c[36]=dadou;
c[37]=niu;
c[38]=mianyang;
c[39]=ji;
c[40]=zhu;
c[41]=taihejin;
c[42]=yinhuagang;
c[43]=fengqinbieshu;
c[44]=jingyan;
c[45]=dengji;
c[46]=dadoucaidi;
c[47]=jidan;
c[48]=niunai;
c[49]=yangmao;
c[50]=peigen;
c[51]=peigenjidan;
c[52]=jijiaX;
c[53]=niunaizhige;
c[54]=jidandaheng;
c[55]=peigenwang;
c[56]=kekecaidi;
c[57]=kekeguo;
c[58]=qiaokelidangao;
c[59]=huishouzhan;
c[60]=gougoujinianbei;
c[61]=fashetuijingqi;
c[62]=yuequliaojedu;
c[63]=nengliangjingkuai;
c[64]=xinpianB;
c[65]=xinpianA;
c[66]=xinpianS;
c[67]=chaodaoxianquan;
c[68]=jijiazhizaotai;
c[69]=nenglianghexin;
c[70]=sousuoleida;
c[71]=shibing;
c[72]=huojiandan;
c[73]=nailao;
c[74]=ganzhe;
c[75]=ganzhecaidi;
c[76]=hongtang;
c[77]=siliao;
c[78]=fangzhichang;
c[79]=mianbu;
c[80]=maoyi;
c[81]=jijiaY;
c[82]=jijiaZ;
c[83]=weijin;
c[84]=edu;
c[85]=shengming;
c[86]=qingshuiwandasha;
c[87]=huolongxinzangshenjin;
c[88]=dianjiyaoshui;
c[89]=yangmaowangzi;
c[90]=lvseliquan;
c[91]=lanseliquan;
c[92]=ziseliquan;
c[93]=jinseliquan;
c[94]=daxiang;
c[95]=hema;
c[96]=eyu;
c[97]=zhayao;
c[98]=guidingcaidi;
c[99]=muban;
c[100]=luodin;
c[101]=lajiao;
c[102]=lajiaocaidi;
c[103]=tian;
c[104]=yue;
c[105]=mifeng;
c[106]=fengmi;
c[107]=yaomiji;
c[108]=huoyanyaoshui;
c[109]=jinmatitie;
c[110]=yinmatitie;
c[111]=tongmatitie;
c[112]=changeyihao;
c[113]=tiantianquan;
c[114]=shouhuoshijian;
c[115]=qiuyinyuer;
c[116]=xiangyiyuer;
c[117]=feimeiyuer;
c[118]=gancaodui;
c[119]=liyu;
c[120]=guidingfengfang;
c[121]=fengfang;
c[122]=fengtang;
c[123]=yuerji;
c[124]=mitangguan;
c[125]=xiaomao;
c[126]=xiaogou;
c[127]=qingmizhi;
c[128]=goupai;
c[129]=chongwuliang;
c[130]=zhiziMhaohuojian;
c[131]=chunvzuoxinyun;
c[132]=shimin_nv;
c[133]=shimin_nan;
c[134]=xiaochouyu;
c[135]=huangyou;
c[134]=saiche;
c[135]=ranliao;
c[136]=qichechang;
c[137]=jiaolonghao;
c[138]=hongsehaimian;
c[139]=huangsehaimian;
c[140]=yusai;
c[141]=huxiyaoshui;
c[142]=kesong;
c[143]=saijisuipian;
c[144]=chekujia_B;
c[145]=chekujia_A;
c[146]=chekujia_S;
c[147]=futeyingqin;
c[148]=futeGT;
c[149]=jichuhuosai;
c[150]=shazi;
c[151]=boli;
c[152]=xiangjiaocaidi;
c[153]=xiangjiao;
c[154]=meiguiyuan;
c[155]=meigui;
c[156]=choujuyuan;
c[157]=chouju;
c[158]=meiguinaicha;
c[159]=hongchacong;
c[160]=hongchaye;
c[161]=naichafang;
c[162]=chawang;
c[163]=zidongcundang;
c[164]=jiayuandengji;
c[165]=jiayuanfangyu;
c[166]=jiayuanfangyu_shangxian;
c[167]=tieciweilan;
c[168]=dianwang;
c[169]=qiandianchi;
c[170]=lidianchi;
c[171]=qiankuang;
c[172]=likuang;
c[173]=gaofenzituceng;
c[174]=mada;
c[175]=jingongmada;
c[176]=wurenji_shenlan;
c[177]=wurenji_molv;
c[178]=wurenji_liehuo;
c[179]=jichudaohangyi;
c[180]=zhongjidaohangyi;
c[181]=gaojidaohangyi;
c[182]=wurenji_shenlan_nengliang;
c[183]=wurenji_molv_nengliang;
c[184]=wurenji_liehuo_nengliang;
c[185]=jiujizhayao;
outfile[0].open("存档信息.dll");
for(int i=1;i<=200;i++)
outfile[0]<<c[i]<<endl;
}
void name_3()
{
if(name_2==0)cout<<"光明小镇";
if(name_2==1)cout<<"健康小镇";
if(name_2==2)cout<<"欢乐小镇";
if(name_2==3)cout<<"无敌小镇";
if(name_2==4)cout<<"温馨小镇";
if(name_2==5)cout<<"开心小镇";
if(name_2==6)cout<<"牛逼小镇";
if(name_2==7)cout<<"阳光小镇";
if(name_2==8)cout<<"温暖小镇";
if(name_2==9)cout<<"建材小镇";
if(name_2==10)cout<<"猪头小镇";
if(name_2==11)cout<<"天堂小镇";
if(name_2==12)cout<<"无限小镇";
if(name_2==13)cout<<"传奇小镇";
if(name_2==14)cout<<"乡村小镇";
if(name_2==15)cout<<"小黑孩小镇";
if(name_2==16)cout<<"甜蜜小镇";
if(name_2==17)cout<<"阿尔法小镇";
if(name_2==18)cout<<"计算机小镇";
if(name_2==19)cout<<"未来小镇";
if(name_2==20)cout<<"科幻小镇";
if(name_2==21)cout<<"营养小镇";
if(name_2==22)cout<<"美味小镇";
if(name_2==23)cout<<"狂欢小镇";
if(name_2==24)cout<<"代码小镇";
if(name_2==25)cout<<"黑客小镇";
if(name_2==26)cout<<"自由小镇";
if(name_2==27)cout<<"悠闲小镇";
if(name_2==28)cout<<"乡间小镇";
if(name_2==29)cout<<"豪华小镇";
if(name_2==30)cout<<"奢侈小镇";
say("<<",10);
}
void xiaozhenzhoubian()
{
int jiayuan_go;
while(1)
{
system("cls");
printf("按0返回\n");
printf("家园情况:\n");
printf("家园等级:%d\n",jiayuandengji);
printf("家园防御值:%d/%d\n",jiayuanfangyu,jiayuanfangyu_shangxian);
printf("按1-->家园升级\n");
printf("按2-->抄家\n");
jiayuan_go=getch();
if(jiayuanfangyu>jiayuanfangyu_shangxian)jiayuanfangyu=jiayuanfangyu_shangxian;
if(jiayuan_go=='0')break;
if(jiayuan_go=='1')
{
if(jiayuandengji==1)
{
printf("家园等级 1级>>>>>2级\n");
printf("++++条件:\n");
if(luodin>=10)color(10)
else color(12);
printf("螺钉*10 实际拥有[%d]\n",luodin);
color(15);
printf("按1升级");
int jiayuan_go_2=getch();
if(jiayuan_go_2=='1'&&luodin>=10)
{
luodin-=10;
printf("升级成功!\n");Sleep(200);printf("1");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf("2");
printf("\n家园防御限制+20");
jiayuanfangyu_shangxian+=20;
Sleep(3000);
}
}
if(jiayuandengji==2)
{
printf("家园等级 2级>>>>>3级\n");
printf("++++条件:\n");
if(shengtie>=10)color(10)
else color(12);
printf("生铁*10 实际拥有[%d]\n",shengtie);
color(15);
printf("按1升级");
int jiayuan_go_2=getch();
if(jiayuan_go_2=='1'&&shengtie>=10)
{
shengtie-=10;
printf("升级成功!\n");Sleep(200);printf("2");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf("3");
printf("\n家园防御限制+20");
jiayuanfangyu_shangxian+=20;
Sleep(3000);
}
}
if(jiayuandengji==3)
{
printf("家园等级 3级>>>>>4级\n");
printf("++++条件:\n");
if(shengtie>=10)color(10)
else color(12);
printf("线圈*5 木板*10 精铁*5 实际拥有[%d,%d,%d]\n",xianquan,muban,jingtie);
color(15);
printf("按1升级");
int jiayuan_go_2=getch();
if(jiayuan_go_2=='1'&&jingtie>=5&&muban>=10&&xianquan>=5)
{
jingtie-=5;
muban-=10;
xianquan-=5;
printf("升级成功!\n");Sleep(200);printf("3");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf(">");Sleep(200);printf("4");
printf("\n小镇魅力+40");
xiaozhenmeili+=40;
Sleep(3000);
}
}
}
if(jiayuan_go=='2')
{
}
}
}
void hudong()
{
system("cls");
cout<<"1,收税[耗费10威望]"<<endl;
cout<<"2,招工"<<endl;
cout<<"3,邀请市民加入"<<endl;
cout<<"4,抽奖"<<endl;
hudong_go=getch();
if(hudong_go=='1')
{
if(weiwang>=10)
{
weiwang-=10;
if(tax>30)tax=30;
if(hudong_go=='1'&&qian<=1000)cout<<"收到税款$"<<((weiwang+jingjishouru)*tax*shimin)/300<<endl,cout<<"补充血量:"<<((weiwang+jingjishouru)*tax*shimin)/600<<endl,Sleep(1000),shengming+=((weiwang+jingjishouru)*tax*shimin)/500,qian+=((weiwang+jingjishouru)*tax*shimin)/300,tax=0;
if(hudong_go=='1'&&qian>1000&&qian<=5000)cout<<"收到税款$"<<((weiwang+jingjishouru)*tax*shimin)/500<<endl,cout<<"补充血量:"<<((weiwang+jingjishouru)*tax*shimin)/800<<endl,Sleep(1000),shengming+=((weiwang+jingjishouru)*tax*shimin)/700,qian+=((weiwang+jingjishouru)*tax*shimin)/500,tax=0;
if(hudong_go=='1'&&qian>5000&&qian<=100000)cout<<"收到税款$"<<((weiwang+jingjishouru)*tax*shimin)/800<<endl,cout<<"补充血量:"<<((weiwang+jingjishouru)*tax*shimin)/900<<endl,Sleep(1000),shengming+=((weiwang+jingjishouru)*tax*shimin)/900,qian+=((weiwang+jingjishouru)*tax*shimin)/800,tax=0;
if(hudong_go=='1'&&qian>=100000&&qian<=10000000)cout<<"收到税款$"<<((weiwang+jingjishouru)*tax*shimin)/1000<<endl,cout<<"补充血量:"<<((weiwang+jingjishouru)*tax*shimin)/1000<<endl,Sleep(1000),shengming+=((weiwang+jingjishouru)*tax*shimin)/1000,qian+=((weiwang+jingjishouru)*tax*shimin)/1000,tax=0;
if(hudong_go=='1'&&qian>=10000000)cout<<"无法收税"<<endl,Sleep(1000);
}
}
if(hudong_go=='2')
{
system("cls");
if(weiwang<=80)
{
cout<<"当前威望过低"<<endl;
Sleep(1000);
}
else
{
cout<<" 员工 价格"<<endl;
cout<<"1,矿工 4威望"<<endl;//10金钱=1威望
cout<<"2,农民 3威望"<<endl;
cout<<"3,士兵 10威望"<<endl;
int hudong_go_2=getch();
if(hudong_go_2=='1'&&weiwang>=4)cout<<"招工成功"<<endl,Sleep(680),kuanggong++,weiwang-=4;
if(hudong_go_2=='2'&&weiwang>=3)cout<<"招工成功"<<endl,Sleep(680),nongmin++,weiwang-=3;
if(hudong_go_2=='3'&&weiwang>=10)cout<<"招工成功"<<endl,Sleep(680),shibing++,weiwang-=10;
}
}
if(hudong_go=='3')
{
system("cls");
cout<<"市民接待所"<<endl;
cout<<"小镇魅力:"<<xiaozhenmeili<<endl;
cout<<"威望:"<<weiwang<<endl;
cout<<"招待中..."<<endl;
Sleep(1200);
int i=rand()%4;
if(i==0)
{
cout<<"有"<<ceil((xiaozhenmeili+weiwang)/20)<<"位女性市民加入"<<endl;
shimin_nv+=ceil((xiaozhenmeili+weiwang)/20);
Sleep(1000);
}
if(i==1)
{
cout<<"有"<<ceil((xiaozhenmeili+weiwang)/20)<<"位男性市民加入"<<endl;
shimin_nan+=ceil((xiaozhenmeili+weiwang)/20);
Sleep(1000);
}
if(i==3)
{
cout<<"有"<<ceil((xiaozhenmeili+weiwang)/20)<<"位女性市民加入"<<endl;
shimin_nv+=ceil((xiaozhenmeili+weiwang)/20);
Sleep(1000);
}
if(i==2)
{
if(weiwang<=50)
{
cout<<"没有市民加入"<<endl;
Sleep(1000);
}
else
{
cout<<"有"<<ceil((xiaozhenmeili+weiwang)/20)<<"位女性市民加入"<<endl;
shimin_nv+=ceil((xiaozhenmeili+weiwang)/20);
Sleep(1000);
}
}
}
if(hudong_go=='4')
{
cout<<"开始按1[耗费2威望]"<<endl;
getch();
if(weiwang>=2)
{
weiwang-=2;
int i=rand()%5;
if(i==0)cout<<"获得小平房*1"<<endl,pinfang+=1,Sleep(880);
if(i==1)cout<<"获得精铁*3"<<endl,jingtie+=3,Sleep(880);
if(i==2)cout<<"获得钻石*1"<<endl,zuanshi+=1,Sleep(880);
if(i==3)cout<<"获得纳米材料*1"<<endl,namicailiao+=3,Sleep(880);
if(i==4)cout<<"获得螺钉*1"<<endl,luodin+=1,Sleep(880);
}
}
}
void hecheng()
{
hecheng_go_1='a';
while(hecheng_go_1!='0')
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"按0返回"<<endl;
cout<<"1,工业合成"<<endl;
cout<<"2,建筑合成"<<endl;
cout<<"3,建材/家具合成"<<endl;
cout<<"4,食品合成"<<endl;
cout<<"5,战斗合成"<<endl;
cout<<"6,魔法合成"<<endl;
cout<<"7,生活用品合成"<<endl;
hecheng_go_1=getch();
if(hecheng_go_1=='1')
{
hecheng_go='q';
while(hecheng_go!='0')
{
if(page==1)
{
system("cls");
cout<<" 物品 配方 需求"<<endl;
if(tiekuang>=2&&ronglu>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,生铁 铁矿*2 熔炉"<<endl;
if(shengtie>=2&&ronglu>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,精铁 生铁*2 熔炉"<<endl;
if(shengtie>=5)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,钢 生铁*5 无 "<<endl;
if(jingtie>=2&&tai>=3)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,钛合金 精铁*2 钛*3 无 "<<endl;
if(gang>=1&&taihejin>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,硬化钢 钢*1 钛合金*1 无 "<<endl;
if(tiekuang>=20&&ronglu>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6,生铁*10 铁矿*20 熔炉"<<endl;
if(yinhuagang>=2&&hengwentuliao>=1&&namicailiao>=4&&namikejigongchang>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7,航天器外壳 硬化钢*2 恒温涂料*1 纳米材料*4 纳米科技工厂"<<endl;
if(gang>=5&&hengwentuliao>=1&&namicailiao>=5&&namikejigongchang>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8,发射推进器 钢*5 恒温涂料*1 纳米材料*5 纳米科技工厂"<<endl;
if(tai>=5&&namicailiao>=20&&namikejigongchang>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"9,B级芯片 钛*5 纳米材料*20 纳米科技工厂"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"按空格翻页 页码:"<<page<<"/3"<<endl;
hecheng_go=getch();
if(hecheng_go=='1'&&tiekuang>=2&&ronglu>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),shengtie++,tiekuang-=2;
if(hecheng_go=='2'&&shengtie>=2&&ronglu>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),jingtie++,shengtie-=2;
if(hecheng_go=='3'&&shengtie>=5)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),gang++,shengtie-=5;
if(hecheng_go=='4'&&jingtie>=2&&tai>=3)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),taihejin+=2,jingtie-=2,tai-=3;
if(hecheng_go=='5'&&gang>=1&&taihejin>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),taihejin-=1,gang-=1,yinhuagang+=1;
if(hecheng_go=='6'&&tiekuang>=20&&ronglu>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),shengtie+=10,tiekuang-=20;
if(hecheng_go=='7'&&yinhuagang>=2&&hengwentuliao>=1&&namicailiao>=4&&namikejigongchang>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),yinhuagang-=2,hengwentuliao-=1,namicailiao-=4,hangtianqiwaike+=1;
if(hecheng_go=='8'&&gang>=5&&hengwentuliao>=1&&namicailiao>=5&&namikejigongchang>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),gang-=5,hengwentuliao-=1,namicailiao-=5,fashetuijingqi+=1;
if(hecheng_go=='9'&&tai>=5&&namicailiao>=20&&namikejigongchang>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),tai-=5,namicailiao-=20,xinpianB+=1;
if(hecheng_go==' ')page++;
if(page==4)page=1;
}
if(page==2)
{
system("cls");
cout<<" 物品 配方 需求"<<endl;
if(xinpianB>=1&&namicailiao>=5&&chaodaoxianquan>=3&&namikejigongchang>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,A级芯片 B级芯片*1 纳米材料*5 超导线圈*3 纳米科技工厂"<<endl;
if(nengliangjingkuai>=1&&yinhuagang>=1&&chaodaoxianquan>=4)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,能量核心 能量晶块*1 超导线圈*4 硬化钢*1 无"<<endl;
if(tongkuang>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,线圈*4 铜矿*1 无"<<endl;
if(taihejin>=1&&yinhuagang>=2)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,恒温涂料*1 钛合金*1 硬化钢*2 无"<<endl;
if(xianquan>=3&&zuanshi>=2&&taihejin>=2)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,超导线圈*1 线圈*3 钛合金*2 钻石*2 无"<<endl;
if(xianquan>=10&&taihejin>=5&&jichuhuosai>=6)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6,福特引擎*1 基础活塞*6 钛合金*5 线圈*10 无"<<endl;
if(boli>=5&&taihejin>=4)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7,基础活塞*1 玻璃*5 钛合金*4 无 "<<endl;
if(shazi>=5&&ronglu>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8,玻璃*1 沙子*5 熔炉"<<endl;
if(shengtie>=5)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"9,铁刺围栏*1 生铁*5 无"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"按空格翻页 页码:"<<page<<"/3"<<endl;
hecheng_go=getch();
if(hecheng_go=='1'&&xinpianB>=1&&namicailiao>=5&&chaodaoxianquan>=3&&namikejigongchang>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),namicailiao-=5,xinpianB-=1,chaodaoxianquan-=3,xinpianA+=1;
if(hecheng_go=='2'&&nengliangjingkuai>=1&&yinhuagang>=1&&chaodaoxianquan>=4)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),yinhuagang-=1,nengliangjingkuai-=2,chaodaoxianquan-=4,nenglianghexin+=1;
if(hecheng_go=='3'&&tongkuang>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),tongkuang-=1,xianquan+=4;
if(hecheng_go=='4'&&taihejin>=1&&yinhuagang>=2)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),taihejin-=1,yinhuagang-=2,hengwentuliao+=1;
if(hecheng_go=='5'&&xianquan>=3&&zuanshi>=2&&taihejin>=2)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),taihejin-=2,zuanshi-=2,xianquan-=3,chaodaoxianquan+=1;
if(hecheng_go=='6'&&xianquan>=10&&taihejin>=5&&jichuhuosai>=6)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),taihejin-=5,jichuhuosai-=6,xianquan-=10,futeyingqin+=1;
if(hecheng_go=='7'&&boli>=5&&taihejin>=4)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),boli-=5,taihejin-=4,jichuhuosai+=1;
if(hecheng_go=='8'&&shazi>=5&&ronglu>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),shazi-=5,boli+=1;
if(hecheng_go=='9'&&shengtie>=5)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),shengtie-=5,tieciweilan+=1;
if(hecheng_go==' ')page++;
if(page==4)page=1;
}
if(page==3)
{
system("cls");
cout<<" 物品 配方 需求"<<endl;
if(namicailiao>=10&&zuanshi>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,高分子涂层*1 纳米材料*10 钻石*1 纳米科技工厂"<<endl;
if(xianquan>=3&&qiankuang>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,马达 线圈*3 铅矿*1 无"<<endl;
if(chaodaoxianquan>=2&&qiankuang>=5)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,精工马达 超导线圈*2 铅矿*5 无"<<endl;
if(xianquan>=5&&mada>=4&&jichudaohangyi>=1&&xinpianB>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,无人机-深蓝 线圈*5 马达*4 基础导航仪*1 B级芯片*1 无"<<endl;
if(shengtie>=10&&tai>=10&&tongkuang>=10)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,基础导航仪 生铁*10 钛*10 铜矿*10 无"<<endl;
if(xianquan>=10&&taihejin>=5&&jichuhuosai>=6)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6, "<<endl;
if(boli>=5&&taihejin>=4)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7, "<<endl;
if(shazi>=5&&ronglu>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8, "<<endl;
if(shengtie>=5)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"9, "<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"按空格翻页 页码:"<<page<<"/3"<<endl;
hecheng_go=getch();
if(hecheng_go=='1'&&namicailiao>=10&&zuanshi>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),namicailiao-=10,zuanshi-=1,gaofenzituceng+=1;
if(hecheng_go=='2'&&xianquan>=3&&qiankuang>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),xianquan-=3,qiankuang-=1,mada+=1;
if(hecheng_go=='3'&&chaodaoxianquan>=2&&qiankuang>=5)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),chaodaoxianquan-=2,qiankuang-=5,jingongmada+=1;
if(hecheng_go=='4'&&xianquan>=5&&mada>=4&&jichudaohangyi>=1&&xinpianB>=1)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),xianquan-=5,mada-=4,jichudaohangyi-=1,xinpianB-=1,wurenji_shenlan+=1,wurenji_shenlan_nengliang=200;
if(hecheng_go=='5'&&shengtie>=10&&tai>=10&&tongkuang>=10)jingyan++,cout<<"成功合成"<<endl,Sleep(1000),shengtie-=10,tai-=10,tongkuang-=10,jichudaohangyi+=1;
if(hecheng_go==' ')page++;
if(page==4)page=1;
}
}
}
if(hecheng_go_1=='2')
{
system("cls");
cout<<" 建筑 配方 需求"<<endl;
if(jingtie>=3)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,熔炉 精铁*3 无"<<endl;//huishouzhan
if(xianquan>=12&&yinhuagang>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,回收站 硬化钢*1 线圈*12 无"<<endl;
if(xinpianB>=1&&taihejin>=3)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,机甲制造台 钛合金*3 B级芯片*1 无"<<endl;
hecheng_go=getch();
if(hecheng_go=='1'&&jingtie>=3)jingyan++,chenggonghecheng(),jingtie-=3,ronglu++;
if(hecheng_go=='2'&&xianquan>=12&&yinhuagang>=1)jingyan++,chenggonghecheng(),yinhuagang-=1,xianquan-=12,huishouzhan++;
if(hecheng_go=='3'&&xinpianB>=1&&taihejin>=3)jingyan++,chenggonghecheng(),xinpianB-=1,taihejin-=3,jijiazhizaotai++;
}
if(hecheng_go_1=='3')
{
while(1)
{
system("cls");
color(15);
printf("按0返回\n");
cout<<" 建筑 配方 需求"<<endl;
if(shengtie>=5)color(10)
else color(12);
cout<<"1,螺钉*1 生铁*5 无"<<endl;
color(15);
hecheng_go=getch();
if(hecheng_go=='1'&&shengtie>=5)jingyan++,chenggonghecheng(),shengtie-=5,luodin+=1;
if(hecheng_go=='0')break;
}
}
if(hecheng_go_1=='4')
{
hecheng_go='p';
while(hecheng_go!='0')
{
if(page==1)
{
system("cls");
cout<<" 食品 配方 需求"<<endl;
if(xiaomai>=2)color(10)
else color(12);
cout<<"1,面包 小麦*2 无"<<endl;
if(xiaomai>=1&&yumi>=2)color(10)
else color(12);
cout<<"2,玉米面包 小麦*1 玉米*2 无"<<endl;
if(peigen>=2&&jidan>=2)color(10)
else color(12);
cout<<"3,培根煎蛋 培根*2 鸡蛋*2 无"<<endl;
if(kekeguo>=2&&jidan>=2&&niunai>=4)color(10)
else color(12);
cout<<"4,巧克力蛋糕 可可果*2 鸡蛋*2 牛奶*4 无"<<endl;
if(niunai>=6)color(10)
else color(12);
cout<<"5,奶酪 牛奶*6 无"<<endl;
if(ganzhe>=6)color(10)
else color(12);
cout<<"6,红糖 甘蔗*6 无"<<endl;
if(xiaomai>=4&&jidan>=3&&hongtang>=1)color(10)
else color(12);
cout<<"7,甜甜圈 小麦*4 红糖*1 鸡蛋*3 无"<<endl;
if(yaomiji>=1&&fengmi>=5)color(10)
else color(12);
cout<<"8,蜂糖 蜂蜜*5 摇蜜机"<<endl;
if(niunai>=4&&hongtang>=1)color(10)
else color(12);
cout<<"9,黄油 牛奶*4 红糖*1 无"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"按空格翻页 页码:"<<page<<"/2"<<endl;
hecheng_go=getch();
if(hecheng_go=='1'&&xiaomai>=2)jingyan++,chenggonghecheng(),xiaomai-=2,mianbao+=1;
if(hecheng_go=='2'&&xiaomai>=1&&yumi>=2)jingyan++,chenggonghecheng(),xiaomai-=1,yumi-=2,yumimianbao+=1;
if(hecheng_go=='3'&&peigen>=2&&jidan>=2)jingyan++,chenggonghecheng(),peigen-=2,jidan-=2,peigenjidan+=1;
if(hecheng_go=='4'&&kekeguo>=2&&jidan>=2&&niunai>=4)jingyan++,chenggonghecheng(),niunai-=4,jidan-=2,kekeguo-=2,qiaokelidangao+=1;
if(hecheng_go=='5'&&niunai>=6)jingyan++,chenggonghecheng(),niunai-=6,nailao+=1;
if(hecheng_go=='6'&&ganzhe>=6)jingyan++,chenggonghecheng(),ganzhe-=6,hongtang+=1;
if(hecheng_go=='7'&&xiaomai>=4&&jidan>=3&&hongtang>=1)jingyan++,chenggonghecheng(),xiaomai-=4,jidan-=3,hongtang-=1,tiantianquan+=1;
if(hecheng_go=='8'&&yaomiji>=1&&fengmi>=5)jingyan++,chenggonghecheng(),fengmi-=5,fengtang+=1;
if(hecheng_go=='9'&&niunai>=4&&hongtang>=1)jingyan++,chenggonghecheng(),niunai-=4,hongtang+=1,huangyou+=1;
if(hecheng_go==' ')page++;
if(page==3)page=1;
if(page==0)page=2;
}
if(page==2)
{
system("cls");
cout<<" 食品 配方 需求"<<endl;
if(xiaomai>=3&&huangyou>=1&&jidan>=2)color(10)
else color(12);
cout<<"1,可颂 黄油*1 小麦*3 鸡蛋*2 无 "<<endl;
cout<<"2,玫瑰奶茶 玫瑰*3 牛奶*3 红茶叶*5 奶茶坊"<<endl;
cout<<"3, "<<endl;
cout<<"4, "<<endl;
cout<<"5, "<<endl;
cout<<"6, "<<endl;
cout<<"7, "<<endl;
cout<<"8, "<<endl;
cout<<"9, "<<endl;
color(15);
cout<<"按空格翻页 页码:"<<page<<"/2"<<endl;
hecheng_go=getch();
if(hecheng_go=='1'&&xiaomai>=3&&huangyou>=1&&jidan>=2)chenggonghecheng(),xiaomai-=3,huangyou-=1,jidan-=2,kesong+=1;
if(hecheng_go=='2'&&naichafang>=1&&meigui>=3&&niunai>=3&&hongchaye>=5)chenggonghecheng(),meigui-=3,niunai-=3,hongchaye-=5,meiguinaicha+=1;
if(hecheng_go==' ')page++;
if(page==3)page=1;
if(page==0)page=2;
}
}
}
if(hecheng_go_1=='5')//huojiandan
{
system("cls");
cout<<" 武器 配方 需求"<<endl;
if(yinhuagang>=1&&jingtie>=2)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,火箭弹 硬化钢*1 精铁*2 无 "<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
hecheng_go=getch();
if(hecheng_go=='1'&&yinhuagang>=1&&jingtie>=2)chenggonghecheng(),Sleep(1000),jingtie-=2,yinhuagang-=1,huojiandan+=1;
}
if(hecheng_go_1=='6')
{
system("cls");
cout<<" 物品 配方 需求"<<endl;
if(huolongxinzangshenjin>=1&&lianyaochang>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,火焰药水*3 火龙心脏神经*1 炼药厂"<<endl;
if(yusai>=5)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,呼吸药水*3 鱼鳃*5 炼药厂"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
hecheng_go=getch();
if(hecheng_go=='1'&&huolongxinzangshenjin>=1&&lianyaochang>=1)chenggonghecheng(),huolongxinzangshenjin-=1,huoyanyaoshui+=3;
if(hecheng_go=='2'&&yusai>=5)chenggonghecheng(),yusai-=5,huxiyaoshui+=3;
}
if(hecheng_go_1=='7')
{
system("cls");
cout<<" 物品 配方 需求"<<endl;
if(yangmao>=5&&fangzhichang>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,毛衣 羊毛*5 纺织厂"<<endl;
if(yangmao>=6&&fangzhichang>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,围巾 羊毛*6 纺织厂"<<endl;
hecheng_go=getch();
if(hecheng_go=='1'&&yangmao>=5&&fangzhichang>=1)chenggonghecheng(),yangmao-=5,maoyi+=1;
if(hecheng_go=='2'&&yangmao>=6&&fangzhichang>=1)chenggonghecheng(),Sleep(1000),yangmao-=6,weijin+=1;
}
}
}
void SW(int x,int y,int daishu)
{
COORD pos;
pos.X=x;
pos.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
cout<<daishu<<endl;
}
void wupinglan()
{
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),8);
cout<<"钛: 钢: 精铁:"<<endl;
SW(3,0,tai);
SW(16,0,gang);
SW(31,0,jingtie);
cout<<"铁矿: 生铁: 钻石:"<<endl;
SW(5,1,tiekuang);
SW(16,1,shengtie);
SW(31,1,zuanshi);
cout<<"铜矿: 线圈: 木板:"<<endl;
SW(5,2,tongkuang);
SW(16,2,xianquan);
SW(31,2,muban);
printf("螺钉:%d 硬化钢:%d",luodin,yinhuagang);
cout<<"钛合金:"<<taihejin<<" B级芯片:"<<xinpianB<<endl;
cout<<"A级芯片:"<<xinpianA<<" S级芯片:"<<xinpianS<<endl;
cout<<"恒温涂料:"<<hengwentuliao<<" 能量晶块:"<<nengliangjingkuai<<endl;
cout<<"纳米材料:"<<namicailiao<<" 建筑碎片:"<<jianzhusuipian<<endl;
cout<<"超导线圈:"<<chaodaoxianquan<<" 航天器外壳:"<<hangtianqiwaike<<endl;
cout<<"发射推进器:"<<fashetuijingqi<<endl;
printf("铅矿:%d 锂矿%d\n",qiankuang,likuang);
printf("高分子涂层:%d\n",gaofenzituceng);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"火箭弹:"<<huojiandan<<endl;
cout<<"火焰药水:"<<huoyanyaoshui<<endl;
cout<<"火龙心脏神经:"<<huolongxinzangshenjin<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),3);
cout<<"毛衣:"<<maoyi<<endl;
cout<<"棉布:"<<mianbu<<endl;
cout<<"围巾:"<<weijin<<endl;
cout<<"金马蹄铁:"<<jinmatitie<<endl;
cout<<"银马蹄铁:"<<yinmatitie<<endl;
cout<<"铜马蹄铁:"<<tongmatitie<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6);
cout<<"小麦:"<<xiaomai<<" 玉米:"<<yumi<<" 大豆:"<<dadou<<" 甘蔗:"<<ganzhe<<endl;
cout<<"鸡蛋:"<<jidan<<" 牛奶:"<<niunai<<" 羊毛:"<<yangmao<<" 培根:"<<peigen<<endl;
cout<<"面包:"<<mianbao<<" 奶酪:"<<nailao<<endl;
cout<<"红糖:"<<hongtang<<" 蜂蜜:"<<fengmi<<endl;
cout<<"蜂糖:"<<fengtang<<" 可颂:"<<kesong<<endl;
cout<<"黄油:"<<huangyou<<" 饲料:"<<siliao<<endl;
cout<<"可可果:"<<kekeguo<<" 甜甜圈:"<<tiantianquan<<endl;
cout<<"玉米面包:"<<yumimianbao<<" 培根煎蛋:"<<peigenjidan<<endl;
cout<<"巧克力蛋糕:"<<qiaokelidangao<<" 红茶叶:"<<hongchaye<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),1);
cout<<"矿工:"<<kuanggong<<endl;
cout<<"农民:"<<nongmin<<endl;
cout<<"士兵:"<<shibing<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13);
cout<<"熔炉:"<<ronglu<<" 小平房:"<<pinfang<<endl;
cout<<"回收站:"<<huishouzhan<<endl;
cout<<"纺织厂:"<<fangzhichang<<endl;
cout<<"摇蜜机:"<<yaomiji<<endl;
cout<<"干草堆:"<<gancaodui<<endl;
cout<<"鱼饵机:"<<yuerji<<endl;
cout<<"风情别墅:"<<fengqinbieshu<<endl;
cout<<"清水湾大厦:"<<qingshuiwandasha<<endl;
cout<<"小型居民楼:"<<xiaoxinjuminlou<<endl;
cout<<"纳米科技工厂:"<<namikejigongchang<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
cout<<"手风琴:"<<shoufengqing<<endl;
cout<<"市长雕塑:"<<shizhangdiaosu<<endl;
cout<<"狗狗纪念碑:"<<gougoujinianbei<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
getch();
}
void shengchan()
{
system("cls");
cout<<"按1-->挖矿"<<endl;
cout<<"按2-->种田"<<endl;
cout<<"按3-->养殖"<<endl;
cout<<"按4-->蜂房"<<endl;
printf("按5-->鱼塘\n");
shengchan_go=getch();
if(shengchan_go=='1')
{
shengchan_go_2='9';
if(kuangjing<=0)
{
cout<<"您还没有矿井,快去购买吧!"<<endl;
Sleep(1000);
}
if(kuangjing!=0)
{
while(shengchan_go_2!='0')
{
system("cls");
cout<<"挖矿 按0退出"<<endl;
if(zhayao>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"按1->炸矿 需要1*炸药"<<endl;
if(jiujizhayao>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"按2->大规模炸矿 需要1*究极炸药"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
shengchan_go_2=getch();
if(shengchan_go_2=='1'&&zhayao>=1)
{
zhayao-=1;
cout<<"轰!"<<endl;
system("color 8E");
Sleep(50);
system("color 0F");
system("cls");
int i=rand()%5;
if(i==0)cout<<"获得铁矿*10"<<endl,tiekuang+=10,Sleep(800);
if(i==1)cout<<"获得铁矿*5 钛*5"<<endl,tiekuang+=5,tai+=5,Sleep(800);
if(i==2)cout<<"获得钻石*3 钛*5"<<endl,zuanshi+=3,tai+=5,Sleep(800);
if(i==3)cout<<"获得铜矿*5 铁矿*4"<<endl,tongkuang+=5,tiekuang+=4,Sleep(800);
if(i==4)cout<<"获得铅矿*8 锂矿*3"<<endl,qiankuang+=8,likuang+=3,Sleep(800);
}
if(shengchan_go_2=='2'&&jiujizhayao>=1)
{
jiujizhayao-=1;
cout<<"轰!"<<endl;
system("color 8E");
Sleep(50);
system("color 0F");
system("cls");
int i=rand()%5;
if(i==0)cout<<"获得铁矿*24"<<endl,tiekuang+=24,Sleep(800);
if(i==1)cout<<"获得铁矿*5 钛*11"<<endl,tiekuang+=5,tai+=11,Sleep(800);
if(i==2)cout<<"获得钻石*12 钛*5"<<endl,zuanshi+=12,tai+=5,Sleep(800);
if(i==3)cout<<"获得铜矿*10 铁矿*4"<<endl,tongkuang+=10,tiekuang+=4,Sleep(800);
if(i==4)cout<<"获得铅矿*20 锂矿*8"<<endl,qiankuang+=20,likuang+=8,Sleep(800);
}
}
}
}
if(shengchan_go=='2')
{
shengchan_go_2='9';
if(nongmin<=0)
{
cout<<"你还没有农民,快去购买吧!"<<endl;
Sleep(1000);
}
while(shengchan_go_2!='0')
{
caidimianjipanduan();
system("cls");
cout<<"按0返回"<<endl;
cout<<"菜地面积:"<<ganzhecaidi+xiaomaicaidi+lajiaocaidi+yumicaidi+dadoucaidi+kekecaidi+xiangjiaocaidi+hongchacong<<"/"<<guidingcaidi<<endl;
cout<<"玉米菜地:"<<yumicaidi<<endl;
cout<<"小麦菜地:"<<xiaomaicaidi<<endl;
cout<<"大豆菜地:"<<dadoucaidi<<endl;
cout<<"可可树: "<<kekecaidi<<endl;
cout<<"甘蔗菜地:"<<ganzhecaidi<<endl;
cout<<"辣椒菜地:"<<lajiaocaidi<<endl;
cout<<"香蕉树:"<<xiangjiaocaidi<<endl;
printf("红茶丛:%d\n",hongchacong);
cout<<"----------------------------"<<endl;
if(shouhuoshijian>0)cout<<"还有"<<shouhuoshijian<<"天即可收获!"<<endl;
else cout<<"可以收获啦!"<<endl;
cout<<"按1收割"<<endl;
cout<<"按2扩建"<<endl;
shengchan_go_2=getch();
if(shengchan_go_2=='1'&&caidi==true&&shouhuoshijian<=0)
{
if(xiaomaicaidi>0)cout<<"小麦+"<<xiaomaicaidi*3<<endl,xiaomai+=xiaomaicaidi*3;
if(yumicaidi>0)cout<<"玉米+"<<yumicaidi*3<<endl,yumi+=yumicaidi*3;
if(dadoucaidi>0)cout<<"大豆+"<<dadoucaidi*3<<endl,dadou+=dadoucaidi*3;
if(kekecaidi>0)cout<<"可可果+"<<kekecaidi*3<<endl,kekeguo+=kekecaidi*3;
if(ganzhecaidi>0)cout<<"甘蔗+"<<ganzhecaidi*3<<endl,ganzhe+=ganzhecaidi*3;
if(lajiaocaidi>0)cout<<"辣椒+"<<lajiaocaidi*3<<endl,lajiao+=lajiaocaidi*3;
if(xiangjiaocaidi>0)cout<<"香蕉+"<<xiangjiaocaidi*3<<endl,xiangjiao+=xiangjiaocaidi*3;
if(hongchacong>0)cout<<"红茶叶+"<<hongchacong*3<<endl,hongchaye+=hongchacong*3;
shouhuoshijian=30;
Sleep(1200);
}
if(shengchan_go_2=='1'&&caidi==false)
{
cout<<"请扩建菜地!"<<endl;
Sleep(1000);
}
if(shengchan_go_2=='2')
{
cout<<"需要:"<<endl;
if(muban>=(guidingcaidi/10))SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"木板*"<<guidingcaidi/10<<endl;
if(luodin>=(guidingcaidi/10))SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"螺钉*"<<guidingcaidi/10<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"按1交付"<<endl;
shengchan_go_3=getch();
if(shengchan_go_3=='1'&&(muban>=(guidingcaidi/10))&&(luodin>=(guidingcaidi/10)))cout<<"扩建成功"<<endl,Sleep(1000),muban-=(guidingcaidi/10),luodin-=(guidingcaidi/10),guidingcaidi+=10;
}
}
}
if(shengchan_go=='3')
{
int yangzhi_go='9';
system("cls");
cout<<"按0返回"<<endl;
cout<<"牛:"<<niu<<endl;
cout<<"猪:"<<zhu<<endl;
cout<<"鸡:"<<ji<<endl;
cout<<"绵羊:"<<mianyang<<endl;
if(weishi==true)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"按1收集产品"<<endl;
if(siliao>=((niu+mianyang+ji+zhu)/5))SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"按2喂食饲料"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
yangzhi_go=getch();
if(yangzhi_go=='1'&&weishi==true)
{
weishi=false;
if(niu>0)cout<<"牛奶+"<<(shouhuo_2/4)*nongmin<<endl,niunai+=(shouhuo_2/4)*nongmin;
if(zhu>0)cout<<"培根+"<<(shouhuo_2/5)*nongmin<<endl,peigen+=(shouhuo_2/5)*nongmin;
if(ji>0)cout<<"鸡蛋+"<<(shouhuo_2/2)*nongmin<<endl,jidan+=(shouhuo_2/2)*nongmin;
if(mianyang>0)cout<<"羊毛+"<<(shouhuo_2/4)*nongmin<<endl,yangmao+=(shouhuo_2/4)*nongmin;
shouhuo_2=0;
Sleep(1200);
}
if(yangzhi_go=='2'&&(siliao>=((niu+mianyang+ji+zhu)/5)))
{
cout<<"饲料-"<<(niu+mianyang+ji+zhu)/5<<endl;
siliao-=(niu+mianyang+ji+zhu)/5;
weishi=true;
Sleep(500);
}
}
if(shengchan_go=='4')
{
system("cls");
if(caimi<0)caimi=0;
cout<<"按0返回"<<endl;
cout<<"蜂房大小:"<<mifeng<<"/"<<guidingfengfang<<endl;
cout<<"蜜蜂:"<<mifeng<<endl;
cout<<"还有"<<caimi<<"天即可采蜜!"<<endl;
cout<<"按1采蜜"<<endl;
cout<<"按2扩建蜂房"<<endl;
if(guidingfengfang<mifeng)cout<<"请扩建蜂房!!"<<endl;
shengchan_go=getch();
if(shengchan_go=='1'&&caimi<=0&&guidingfengfang>=mifeng)
{
cout<<"获得"<<mifeng*2<<"蜂蜜"<<endl;
fengmi+=mifeng*2;
Sleep(1000);
caimi=40;
}
if(shengchan_go=='2')
{
cout<<"需要:"<<endl;
if(muban>=(guidingfengfang/10))color(10)
else color(12);
cout<<"木板*"<<guidingfengfang/10<<endl;
if(luodin>=(guidingfengfang/10))color(10)
else color(12);
cout<<"螺钉*"<<guidingfengfang/10<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"按1交付"<<endl;
shengchan_go_3=getch();
if(shengchan_go_3=='1'&&(muban>=(guidingfengfang/10))&&(luodin>=(guidingfengfang/10)))cout<<"扩建成功"<<endl,Sleep(1000),muban-=(guidingfengfang/10),luodin-=(guidingfengfang/10),guidingfengfang+=10;
}
}
if(shengchan_go=='5')
{
while(1)
{
system("cls");
printf("按0返回\n");
cout<<"1,钓鱼"<<endl;
cout<<"2,制作鱼饵"<<endl;
cout<<"3,库存"<<endl;
sheshicaozuo_go_3=getch();
if(sheshicaozuo_go_3=='1')
{
system("cls");
if(qiuyinyuer>=1)color(10)
else color(12);
cout<<"1,使用蚯蚓鱼饵"<<endl;
if(xiangyiyuer>=1)color(10)
else color(12);
cout<<"2,使用香溢鱼饵"<<endl;
if(feimeiyuer>=1)color(10)
else color(12);
cout<<"3,使用肥美鱼饵"<<endl;
color(15);
int sheshicaozuo_go_4=getch();
if(sheshicaozuo_go_4=='1'&&qiuyinyuer>=1)//15% 15 100 //15 100//3 20//1 7
{
qiuyinyuer--;
int i=rand()%7;
if(i==1)
{
cout<<"钓上了鲤鱼"<<endl;
liyu++;
Sleep(500);
}
if(i==2)
{
cout<<"钓上了小丑鱼"<<endl;
xiaochouyu++;
Sleep(500);
}
else
{
cout<<"什么也没钓到"<<endl;
Sleep(800);
}
}
if(sheshicaozuo_go_4=='2'&&xiangyiyuer>=1)//15% 15 100 //15 100//3 20//1 7
{
xiangyiyuer--;
int i=rand()%5;
if(i==1)
{
cout<<"钓上了鲤鱼"<<endl;
liyu++;
Sleep(500);
}
if(i==2)
{
cout<<"钓上了小丑鱼"<<endl;
xiaochouyu++;
Sleep(500);
}
else
{
cout<<"什么也没钓到"<<endl;
Sleep(800);
}
}
}
if(sheshicaozuo_go_3=='2')
{
system("cls");
cout<<" 名称 原料 需求"<<endl;
if(yuerji>=1&&yumi>=3&&dadou>=2)color(10)
else color(12);
cout<<"1,蚯蚓鱼饵 玉米*3 大豆*2 鱼饵机"<<endl;
if(yuerji>=1&&xiaomai>=4&&kekeguo>=4)color(10)
else color(12);
cout<<"2,香溢鱼饵 小麦*4 可可果*4 鱼饵机"<<endl;
color(15);
int sheshicaozuo_go_4=getch();
if(sheshicaozuo_go_4=='1'&&yuerji>=1&&yumi>=3&&dadou>=2)cout<<"合成成功!"<<endl,Sleep(800),yumi-=3,dadou-=2,qiuyinyuer+=1;
if(sheshicaozuo_go_4=='2'&&yuerji>=1&&xiaomai>=4&&kekeguo>=4)cout<<"合成成功!"<<endl,Sleep(800),xiaomai-=4,kekeguo-=4,xiangyiyuer+=1;
}
if(sheshicaozuo_go_3=='3')
{
system("cls");
cout<<"鲤鱼:"<<liyu<<endl;
cout<<"小丑鱼:"<<xiaochouyu<<endl;
cout<<"+10%几率 蚯蚓鱼饵:"<<qiuyinyuer<<endl;
cout<<"+20%几率 香溢鱼饵:"<<xiangyiyuer<<endl;
cout<<"+40%几率 肥美鱼饵:"<<feimeiyuer<<endl;
getch();
}
if(sheshicaozuo_go_3=='0')
{
break;
}
}
}
}
void goumaichenggong(){cout<<"购买成功"<<endl;Sleep(800);}
void lianjiedonghua()
{
int ssjjj=500;
cls;
printf("正在连接服务器...\n");
printf("0oooo\n");Sleep(ssjjj);cls;
printf("正在连接服务器...\n");
printf("o0ooo\n");Sleep(ssjjj);cls;
printf("正在连接服务器...\n");
printf("oo0oo\n");Sleep(ssjjj); cls;
printf("正在连接服务器...\n");
printf("ooo0o\n");Sleep(ssjjj); cls;
printf("正在连接服务器...\n");
printf("oooo0\n");Sleep(ssjjj); cls;
printf("正在连接服务器...\n");
printf("0oooo\n");Sleep(ssjjj); cls;
printf("正在连接服务器...\n");
printf("o0ooo\n");Sleep(ssjjj); cls;
}
void shop()
{
int shop_shop='a';
system("cls");
while(shop_shop!='0')
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
system("cls");
cout<<"按0返回"<<endl;
cout<<"按1-->建筑商店"<<endl;
cout<<"按2-->矿物质商店"<<endl;
cout<<"按3-->装饰品商店"<<endl;
cout<<"按4-->综合商店"<<endl;
cout<<"按5-->菜地商店"<<endl;
cout<<"按6-->动物商店"<<endl;
color(14);
cout<<"按7>>世界市场<<按7"<<endl;
color(15);
shop_shop=getch();
if(shop_shop=='1')
{
system("cls");
cout<<"按0返回"<<endl;
if(qian>=100)color(10)
else color(12);
cout<<"1,熔炉*1 $100"<<endl;
if(qian>=1200)color(10)
else color(12);
cout<<"2,炼药厂*1 $1200 "<<endl;
if(qian>=1000)color(10)
else color(12);
cout<<"3,纳米科技工厂 $1000"<<endl;
if(qian>=20)color(10)
else color(12);
cout<<"4,小平房 $20 人口限制+4"<<endl;//$5=1人口限制
if(qian>=99)color(10)
else color(12);
cout<<"5,小型居民楼 $99 人口限制+20"<<endl;//$5=1人口限制
if(qian>=190)color(10)
else color(12);
cout<<"6,风情别墅 $190 人口限制+15 小镇魅力+3"<<endl;//$5=1人口限制
if(qian>=700)color(10)
else color(12);
cout<<"7,清水湾大厦 $700 人口限制+120小镇魅力+20"<<endl;
if(qian>=500)color(10)
else color(12);
cout<<"8,纺织厂 $500 "<<endl;
if(qian>=660)color(10)
else color(12);
cout<<"9,摇蜜机 $660 "<<endl;
shop_go=getch();
color(15);
if(shop_go=='1'&&qian>=100)goumaichenggong(),ronglu++,qian-=100;
if(shop_go=='2'&&qian>=450)goumaichenggong(),lianyaochang++,qian-=1200;
if(shop_go=='3'&&qian>=1000)goumaichenggong(),namikejigongchang++,qian-=1000;
if(shop_go=='4'&&qian>=20)goumaichenggong(),pinfang++,qian-=20,guidingshimin+=4;
if(shop_go=='5'&&qian>=99)goumaichenggong(),xiaoxinjuminlou++,qian-=99,guidingshimin+=20;
if(shop_go=='6'&&qian>=190)goumaichenggong(),fengqinbieshu++,qian-=190,guidingshimin+=15,xiaozhenmeili+=3;
if(shop_go=='7'&&qian>=600)goumaichenggong(),qingshuiwandasha++,qian-=600,guidingshimin+=120,xiaozhenmeili+=20;
if(shop_go=='8'&&qian>=500)goumaichenggong(),fangzhichang++,qian-=500;
if(shop_go=='9'&&qian>=660)goumaichenggong(),yaomiji++,qian-=660;
}
if(shop_shop=='2')
{
system("cls");
cout<<"1,精铁*5 $150"<<endl;//30
shop_go=getch();
if(shop_go=='1'&&qian>=150)cout<<"购买成功"<<endl,Sleep(800),jingtie++,qian-=150;
}
if(shop_shop=='3')
{
system("cls");
cout<<"按0返回"<<endl;
if(qian>=200)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,手风琴*1 $200 魅力+5"<<endl;//$40=1&
if(qian>=400)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,市长雕塑*1 $400 魅力+10"<<endl;//$40=1&
if(qian>=600)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,狗狗纪念碑*1 $600 魅力+15"<<endl;//$40=1&
if(qian>=388)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,干草堆 *1 $388 魅力+10 性价比!"<<endl;
if(qian>=188)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,狗牌 *1 $188 魅力+5"<<endl;
shop_go=getch();
if(shop_go=='1'&&qian>=200)cout<<"购买成功"<<endl,Sleep(800),shoufengqing++,qian-=200,xiaozhenmeili+=5;
if(shop_go=='2'&&qian>=400)cout<<"购买成功"<<endl,Sleep(800),shizhangdiaosu++,qian-=400,xiaozhenmeili+=10;
if(shop_go=='3'&&qian>=600)cout<<"购买成功"<<endl,Sleep(800),gougoujinianbei++,qian-=600,xiaozhenmeili+=15;
if(shop_go=='4'&&qian>=388)cout<<"购买成功"<<endl,Sleep(800),gancaodui++,qian-=388,xiaozhenmeili+=10;
if(shop_go=='5'&&qian>=188)cout<<"购买成功"<<endl,Sleep(800),goupai++,qian-=188,xiaozhenmeili+=5;
}
if(shop_shop=='4')
{
int page2=1;
while(1)
{
if(page2==1)
{
system("cls");
cout<<"按0返回"<<endl;
if(qian>=100)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,饲料*5 $100"<<endl;
if(lvseliquan>=2)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,火箭弹*1 2绿色礼券"<<endl;//30
if(qian>=300)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,矿井*1 $300"<<endl;
if(qian>=90)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,炸药*1 $90 "<<endl;
if(qian>=100)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,熔炉*1 $100"<<endl;
if(qian>=450)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6,炼药厂*1 $450 "<<endl;
if(qian>=660)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7,鱼饵机*1 $660"<<endl;
if(qian>=40)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8,农民*1 $40"<<endl;
if(qian>=100)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"9,士兵*1 $100"<<endl;\
color(15);
printf("\n");
printf("按空格键翻页 页码:%d/2\n",page2);
shop_go=getch();
if(shop_go=='1'&&qian>=100)cout<<"购买成功"<<endl,Sleep(800),siliao+=5,qian-=100,jingyan+=2;
if(shop_go=='2'&&lvseliquan>=2)cout<<"购买成功"<<endl,Sleep(800),huojiandan++,lvseliquan-=2,jingyan+=2;
if(shop_go=='3'&&qian>=300)cout<<"购买成功"<<endl,Sleep(800),kuangjing++,qian-=300,jingyan+=2;
if(shop_go=='4'&&qian>=90)cout<<"购买成功"<<endl,Sleep(800),zhayao++,qian-=90,jingyan+=2;
if(shop_go=='5'&&qian>=100)cout<<"购买成功"<<endl,Sleep(800),ronglu++,qian-=100,jingyan+=2;
if(shop_go=='6'&&qian>=450)cout<<"购买成功"<<endl,Sleep(800),lianyaochang++,qian-=450,jingyan+=2;
if(shop_go=='7'&&qian>=660)cout<<"购买成功"<<endl,Sleep(800),yuerji++,qian-=660,jingyan+=2;
if(shop_go=='8'&&qian>=40)cout<<"购买成功"<<endl,Sleep(800),nongmin++,qian-=40,jingyan+=2;
if(shop_go=='9'&&qian>=100)cout<<"购买成功"<<endl,Sleep(800),shibing++,qian-=100,jingyan+=2;
if(shop_go=='0')break;
if(shop_go==' ')page2++;
if(page2>2)page2=1;
if(page2<1)page2=2;
}
if(page2==2)
{
system("cls");
cout<<"按0返回[此页尚未搭建完成]"<<endl;
if(qian>=168)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,究极炸药 $168 "<<endl;
if(lvseliquan>=2)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2, "<<endl;//30
if(qian>=300)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3, $"<<endl;
if(qian>=90)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,炸药*1 $90 "<<endl;
if(qian>=100)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,熔炉*1 $100"<<endl;
if(qian>=450)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6,炼药厂*1 $450 "<<endl;
if(qian>=660)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7,鱼饵机*1 $660"<<endl;
if(qian>=40)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8,农民*1 $40"<<endl;
if(qian>=100)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"9,士兵*1 $100"<<endl;
color(15);
printf("\n");
printf("按空格键翻页 页码:%d/2\n",page2);
shop_go=getch();
if(shop_go=='1'&&qian>=168)cout<<"购买成功"<<endl,Sleep(800),jiujizhayao+=1,qian-=168;
if(shop_go=='2'&&lvseliquan>=2)cout<<"购买成功"<<endl,Sleep(800),huojiandan++,lvseliquan-=2;
if(shop_go=='3'&&qian>=300)cout<<"购买成功"<<endl,Sleep(800),kuangjing++,qian-=300;
if(shop_go=='4'&&qian>=90)cout<<"购买成功"<<endl,Sleep(800),zhayao++,qian-=90;
if(shop_go=='5'&&qian>=100)cout<<"购买成功"<<endl,Sleep(800),ronglu++,qian-=100;
if(shop_go=='6'&&qian>=450)cout<<"购买成功"<<endl,Sleep(800),lianyaochang++,qian-=450;
if(shop_go=='7'&&qian>=660)cout<<"购买成功"<<endl,Sleep(800),yuerji++,qian-=660;
if(shop_go=='8'&&qian>=40)cout<<"购买成功"<<endl,Sleep(800),nongmin++,qian-=40;
if(shop_go=='9'&&qian>=100)cout<<"购买成功"<<endl,Sleep(800),shibing++,qian-=100;
if(shop_go=='0')break;
if(shop_go==' ')page2++;
if(page2>2)page2=1;
if(page2<1)page2=2;
}
}
}
if(shop_shop=='5')
{
system("cls");
cout<<"按0返回"<<endl;
if(qian>=60)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,玉米菜地*1 $60"<<endl;
if(qian>=40)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,小麦菜地*1 $40"<<endl;
if(qian>=80)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,大豆菜地*1 $80"<<endl;
if(qian>=150)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,可可树*1 $150"<<endl;
if(qian>=80)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,甘蔗菜地*1 $80"<<endl;
if(qian>=130)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6,辣椒菜地*1 $130"<<endl;
if(qian>=260)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7,香蕉树*1 $260"<<endl;
if(qian>=300)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8,红茶丛*1 $300"<<endl;
shop_go=getch();
if(shop_go=='1'&&qian>=60)cout<<"购买成功"<<endl,Sleep(800),yumicaidi++,qian-=60,jingyan+=2;
if(shop_go=='2'&&qian>=40)cout<<"购买成功"<<endl,Sleep(800),xiaomaicaidi++,qian-=40,jingyan+=2;
if(shop_go=='3'&&qian>=80)cout<<"购买成功"<<endl,Sleep(800),dadoucaidi++,qian-=80,jingyan+=2;
if(shop_go=='4'&&qian>=150)cout<<"购买成功"<<endl,Sleep(800),kekecaidi++,qian-=150,jingyan+=2;
if(shop_go=='5'&&qian>=80)cout<<"购买成功"<<endl,Sleep(800),ganzhecaidi++,qian-=80,jingyan+=2;
if(shop_go=='6'&&qian>=130)cout<<"购买成功"<<endl,Sleep(800),lajiaocaidi++,qian-=130,jingyan+=2;
if(shop_go=='7'&&qian>=260)cout<<"购买成功"<<endl,Sleep(800),xiangjiaocaidi++,qian-=260,jingyan+=2;
if(shop_go=='8'&&qian>=300)cout<<"购买成功"<<endl,Sleep(800),hongchacong++,qian-=300,jingyan+=2;
}
if(shop_shop=='6')
{
while(1)
{
system("cls");
cout<<"按0返回"<<endl;
if(qian>=130)color(10)
else color(12);
cout<<"1,牛*1 $130"<<endl;
if(qian>=160)color(10)
else color(12);
cout<<"2,绵羊*1 $160"<<endl;
if(qian>=180)color(10)
else color(12);
cout<<"3,猪*1 $180"<<endl;
if(qian>=80)color(10)
else color(12);
cout<<"4,鸡*1 $80"<<endl;
if(qian>=1000)color(10)
else color(12);
cout<<"5,大象*1 $1000"<<endl;
if(lvseliquan>=9)color(10)
else color(12);
cout<<"6,河马*1 9绿色礼券"<<endl;
if(lanseliquan>=6)color(10)
else color(12);
cout<<"7,鳄鱼*1 6蓝色礼券"<<endl;
if(qian>=240)color(10)
else color(12);
cout<<"8,蜜蜂*1 $240"<<endl;
shop_go=getch();
if(shop_go=='1'&&qian>=130)cout<<"购买成功"<<endl,Sleep(800),niu++,qian-=130;
if(shop_go=='2'&&qian>=160)cout<<"购买成功"<<endl,Sleep(800),mianyang++,qian-=160;
if(shop_go=='3'&&qian>=180)cout<<"购买成功"<<endl,Sleep(800),zhu++,qian-=180;
if(shop_go=='4'&&qian>=80)cout<<"购买成功"<<endl,Sleep(800),ji++,qian-=80;
if(shop_go=='5'&&qian>=1000)cout<<"购买成功"<<endl,Sleep(800),daxiang++,qian-=1000;
if(shop_go=='6'&&lvseliquan>=9)cout<<"购买成功"<<endl,Sleep(800),hema++,lvseliquan-=9;
if(shop_go=='7'&&lanseliquan>=6)cout<<"购买成功"<<endl,Sleep(800),eyu++,lanseliquan-=6;
if(shop_go=='8'&&qian>=240)cout<<"购买成功"<<endl,Sleep(800),mifeng++,qian-=240;
if(shop_go=='0')break;
}
}
if(shop_shop=='7')
{
lianjiedonghua();
int shop_100_ye=rand()%1;
while(1)
{
if(shop_100_ye==0)
{
cls;
printf("按空格刷新 按0返回\n");
if(qian>=600)color(10)
else color(12);
printf("1,铁矿*100 $600\n");
if(qian>=1200)color(10)
else color(12);
printf("2,纳米材料*100 $1200\n");
if(qian>=1250)color(10)
else color(12);
printf("3,木板*100 $1250\n");
if(qian>=300)color(10)
else color(12);
printf("4,羊毛*20 $300\n");
if(qian>=300)color(10)
else color(12);
printf("5,牛奶*20 $300\n");
if(qian>=3200)color(10)
else color(12);
printf("6,无人机-深蓝*1 $3200\n");
if(qian>=900)color(10)
else color(12);
printf("7,高分子涂层*20 $900\n");
color(15);
int shop_100=getch();
if(shop_100=='1'&&qian>=600)qian-=600,tiekuang+=100,printf("购买成功!"),Sleep(1000);
if(shop_100=='2'&&qian>=1200)qian-=1200,namicailiao+=100,printf("购买成功!"),Sleep(1000);
if(shop_100=='3'&&qian>=1250)qian-=1250,muban+=100,printf("购买成功!"),Sleep(1000);
if(shop_100=='4'&&qian>=300)qian-=300,yangmao+=20,printf("购买成功!"),Sleep(1000);
if(shop_100=='5'&&qian>=300)qian-=300,niunai+=20,printf("购买成功!"),Sleep(1000);
if(shop_100=='6'&&qian>=3200)qian-=3200,wurenji_shenlan+=1,printf("购买成功!"),Sleep(1000);
if(shop_100=='7'&&qian>=900)qian-=900,gaofenzituceng+=20,printf("购买成功!"),Sleep(1000);
if(shop_100=='0')break;
if(shop_100==' ')int shop_100_ye=rand()%1;
}
}
}
}
}
void DD_ZX()
{
cls;
color(10);
cout<<"选择装箱:"<<endl;
cout<<"<装箱的意思是把某样物品全部出售>"<<endl;
color(15);
if(xiaomai!=0)color(10)
else color(12);
cout<<"1,小麦 剩余:"<<xiaomai<<endl;
if(yumi!=0)color(10)
else color(12);
cout<<"2,玉米 剩余:"<<yumi<<endl;
int DD_ZX_go=getch();
int YU_qian=0;
if(DD_ZX_go=='1')qian+=xiaomai*2,cout<<"赚到"<<xiaomai*2<<endl,xiaomai=0,Sleep(1000);
if(DD_ZX_go=='2')qian+=yumi*1,cout<<"赚到"<<yumi*1<<endl,yumi=0,Sleep(1000);
}
void dingdan()
{
dingdan_go='p';
int dingdan=0;
system("cls");
while(dingdan_go!='0')
{
if(baoliudingdan_1==false)dingdan=rand()%3;
if(dingdan==0)
{
system("cls");
cout<<"按q进入装箱模式"<<endl;
cout<<"按空格刷新"<<endl;
if(yumi>=3&&xiaomai>=3)color(10)
else color(12);
cout<<"1,需求:玉米*3,小麦*3"<<endl;
cout<<"奖励:$10 6 经验"<<endl;
if(xianquan>=7&&zuanshi>=1)color(10)
else color(12);
cout<<"2,需求:线圈*7,钻石*1"<<endl;
cout<<"奖励:$34 30经验"<<endl;
if(taihejin>=2&&yumimianbao>=1)color(10)
else color(12);
cout<<"3,需求:钛合金*2,玉米面包*1"<<endl;
cout<<"奖励:$640 35经验"<<endl;
if(yinhuagang>=2&&niunai>=4)color(10)
else color(12);
cout<<"4,需求:硬化钢*2,牛奶*4"<<endl;
cout<<"奖励:$400 28经验"<<endl;
if(qiaokelidangao>=1&&dadou>=5)color(10)
else color(12);
cout<<"5,需求:巧克力蛋糕*1,大豆*5"<<endl;
cout<<"奖励:$50 36经验"<<endl;
if(kekeguo>=10&&chaodaoxianquan>=1)color(10)
else color(12);
cout<<"6,需求:可可果*10,超导线圈*1"<<endl;
cout<<"奖励:$500 45经验"<<endl;
if(niunai>=10&&mianbao>=2)color(10)
else color(12);
cout<<"7,需求:面包*2,牛奶*10"<<endl;
cout<<"奖励:$70 40经验"<<endl;
if(taihejin>=1&&dadou>=20)color(10)
else color(12);
cout<<"8,需求:大豆*20,钛合金*1"<<endl;
cout<<"奖励:$150 20经验"<<endl;
if(niunai>=10&&yumi>=10)color(10)
else color(12);
cout<<"9,需求:牛奶*10,玉米*10"<<endl;
cout<<"奖励:$10 60经验"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
dingdan_go=getch();
if(dingdan_go=='1'&&yumi>=3&&xiaomai>=3)cout<<"交付成功 +$10 +6经验"<<endl,xiaomai-=3,yumi-=3,qian+=10,Sleep(990),jingyan+=6;
if(dingdan_go=='2'&&xianquan>=7&&zuanshi>=1)cout<<"交付成功 +$34 +30经验"<<endl,xianquan-=7,zuanshi-=1,qian+=34,Sleep(990),jingyan+=30;
if(dingdan_go=='3'&&taihejin>=2&&yumimianbao>=1)cout<<"交付成功 +$640 +35经验"<<endl,taihejin-=2,yumimianbao-=1,qian+=640,Sleep(990),jingyan+=35;
if(dingdan_go=='4'&&yinhuagang>=2&&niunai>=4)cout<<"交付成功 +$400 +28经验"<<endl,yinhuagang-=2,niunai-=4,qian+=400,Sleep(990),jingyan+=28;
if(dingdan_go=='5'&&qiaokelidangao>=1&&dadou>=5)cout<<"交付成功 +$50 +36经验"<<endl,qiaokelidangao-=1,dadou-=5,qian+=50,Sleep(990),jingyan+=36;
if(dingdan_go=='6'&&kekeguo>=10&&chaodaoxianquan>=1)cout<<"交付成功 +$600 +45经验"<<endl,kekeguo-=10,chaodaoxianquan-=1,qian+=500,Sleep(990),jingyan+=45;
if(dingdan_go=='7'&&niunai>=10&&mianbao>=2)cout<<"交付成功 +$70 +40经验"<<endl,niunai-=10,mianbao-=2,qian+=70,Sleep(990),jingyan+=40;
if(dingdan_go=='8'&&taihejin>=1&&dadou>=20)cout<<"交付成功 +$150 +20经验"<<endl,taihejin-=1,dadou-=20,qian+=150,Sleep(990),jingyan+=20;
if(dingdan_go=='9'&&niunai>=10&&yumi>=10)cout<<"交付成功 +$10 +60经验"<<endl,niunai-=10,yumi-=10,qian+=10,Sleep(990),jingyan+=60;
if(dingdan_go=='q')DD_ZX();
if(dingdan_go==' ')baoliudingdan_1=false;
}
if(dingdan==1)
{
system("cls");
cout<<"按q进入装箱模式"<<endl;
cout<<"按空格刷新"<<endl;
if(yumi>=3&&xiaomai>=3)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,需求:玉米*3,小麦*3"<<endl;
cout<<"奖励:$10 6 经验"<<endl;
if(yangmao>=8&&zuanshi>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,需求:羊毛*8,钻石*1"<<endl;
cout<<"奖励:$90 30经验"<<endl;
if(taihejin>=2&&yumimianbao>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,需求:钛合金*2,玉米面包*1"<<endl;
cout<<"奖励:$200 35经验"<<endl;
if(yinhuagang>=2&&niunai>=4)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,需求:硬化钢*2,牛奶*4"<<endl;
cout<<"奖励:$350 28经验"<<endl;
if(qiaokelidangao>=1&&dadou>=5)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,需求:巧克力蛋糕*1,大豆*5"<<endl;
cout<<"奖励:$50 36经验"<<endl;
if(kekeguo>=10&&chaodaoxianquan>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6,需求:可可果*10,超导线圈*1"<<endl;
cout<<"奖励:$500 45经验"<<endl;
if(niunai>=10&&mianbao>=2)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7,需求:甜甜圈*2,奶酪*3"<<endl;
cout<<"奖励:$228 40经验"<<endl;
if(taihejin>=1&&dadou>=20)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8,需求:大豆*20,钛合金*1"<<endl;
cout<<"奖励:$150 20经验"<<endl;
if(fengtang>=2)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"9,需求:蜂糖*2"<<endl;
cout<<"奖励:$128 30经验"<<endl;
color(15);
dingdan_go=getch();
if(dingdan_go=='1'&&yumi>=3&&xiaomai>=3)cout<<"交付成功 +$10 +6经验"<<endl,xiaomai-=3,yumi-=3,qian+=10,Sleep(990),jingyan+=6;
if(dingdan_go=='2'&&yangmao>=8&&zuanshi>=1)cout<<"交付成功 +$90 +30经验"<<endl,yangmao-=8,zuanshi-=1,qian+=90,Sleep(990),jingyan+=30;
if(dingdan_go=='3'&&taihejin>=2&&yumimianbao>=1)cout<<"交付成功 +$200 +35经验"<<endl,taihejin-=2,yumimianbao-=1,qian+=200,Sleep(990),jingyan+=35;
if(dingdan_go=='4'&&yinhuagang>=2&&niunai>=4)cout<<"交付成功 +$350 +28经验"<<endl,yinhuagang-=2,niunai-=4,qian+=350,Sleep(990),jingyan+=28;
if(dingdan_go=='5'&&qiaokelidangao>=1&&dadou>=5)cout<<"交付成功 +$50 +36经验"<<endl,qiaokelidangao-=1,dadou-=5,qian+=50,Sleep(990),jingyan+=36;
if(dingdan_go=='6'&&kekeguo>=10&&chaodaoxianquan>=1)cout<<"交付成功 +$600 +45经验"<<endl,kekeguo-=10,chaodaoxianquan-=1,qian+=500,Sleep(990),jingyan+=45;
if(dingdan_go=='7'&&nailao>=3&&tiantianquan>=2)cout<<"交付成功 +$228 +40经验"<<endl,nailao-=3,tiantianquan-=2,qian+=228,Sleep(990),jingyan+=40;
if(dingdan_go=='8'&&taihejin>=1&&dadou>=20)cout<<"交付成功 +$150 +20经验"<<endl,taihejin-=1,dadou-=20,qian+=150,Sleep(990),jingyan+=20;
if(dingdan_go=='9'&&fengtang>=2)cout<<"交付成功 +$128 +30经验"<<endl,fengtang-=2,qian+=128,Sleep(990),jingyan+=30;
if(dingdan_go=='q')DD_ZX();
if(dingdan_go==' ')baoliudingdan_1=false;
}
if(dingdan==2)
{
system("cls");
cout<<"按q进入装箱模式"<<endl;
cout<<"按空格刷新"<<endl;
if(yumi>=3&&xiaomai>=3)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,需求:玉米*3,小麦*3"<<endl;
cout<<"奖励:$10 6 经验"<<endl;
if(yangmao>=8&&zuanshi>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,需求:羊毛*8,钻石*1"<<endl;
cout<<"奖励:$90 30经验"<<endl;
if(taihejin>=2&&yumimianbao>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,需求:小丑鱼*2,玉米面包*1"<<endl;
cout<<"奖励:$200 35经验"<<endl;
if(yinhuagang>=2&&niunai>=4)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,需求:硬化钢*2,牛奶*4"<<endl;
cout<<"奖励:$350 28经验"<<endl;
if(qiaokelidangao>=1&&dadou>=5)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"5,需求:巧克力蛋糕*1,大豆*5"<<endl;
cout<<"奖励:$50 36经验"<<endl;
if(kekeguo>=10&&chaodaoxianquan>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"6,需求:可可果*10,超导线圈*1"<<endl;
cout<<"奖励:$500 45经验"<<endl;
if(ganzhe>=10&&fengmi>=1)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"7,需求:甘蔗*10,蜂蜜*1"<<endl;
cout<<"奖励:$40 40经验"<<endl;
if(taihejin>=1&&dadou>=20)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"8,需求:大豆*20,钛合金*1"<<endl;
cout<<"奖励:$150 20经验"<<endl;
if(zuanshi>=3&&yangmao>=5)color(10)
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"9,需求:钻石*3 羊毛*5"<<endl;
cout<<"奖励:$128 30经验"<<endl;
color(15);
dingdan_go=getch();
if(dingdan_go=='1'&&yumi>=3&&xiaomai>=3)cout<<"交付成功 +$10 +6经验"<<endl,xiaomai-=3,yumi-=3,qian+=10,Sleep(990),jingyan+=6;
if(dingdan_go=='2'&&yangmao>=8&&zuanshi>=1)cout<<"交付成功 +$90 +30经验"<<endl,yangmao-=8,zuanshi-=1,qian+=90,Sleep(990),jingyan+=30;
if(dingdan_go=='3'&&xiaochouyu>=2&&yumimianbao>=1)cout<<"交付成功 +$200 +35经验"<<endl,xiaochouyu-=2,yumimianbao-=1,qian+=200,Sleep(990),jingyan+=35;
if(dingdan_go=='4'&&yinhuagang>=2&&niunai>=4)cout<<"交付成功 +$350 +28经验"<<endl,yinhuagang-=2,niunai-=4,qian+=350,Sleep(990),jingyan+=28;
if(dingdan_go=='5'&&qiaokelidangao>=1&&dadou>=5)cout<<"交付成功 +$50 +36经验"<<endl,qiaokelidangao-=1,dadou-=5,qian+=50,Sleep(990),jingyan+=36;
if(dingdan_go=='6'&&kekeguo>=10&&chaodaoxianquan>=1)cout<<"交付成功 +$600 +45经验"<<endl,kekeguo-=10,chaodaoxianquan-=1,qian+=500,Sleep(990),jingyan+=45;
if(dingdan_go=='7'&&ganzhe>=10&&fengmi>=1)cout<<"交付成功 +$40 +40经验"<<endl,fengmi-=1,ganzhe-=10,qian+=40,Sleep(990),jingyan+=40;
if(dingdan_go=='8'&&taihejin>=1&&dadou>=20)cout<<"交付成功 +$150 +20经验"<<endl,taihejin-=1,dadou-=20,qian+=150,Sleep(990),jingyan+=20;
if(dingdan_go=='9'&&zuanshi>=3&&yangmao>=5)cout<<"交付成功 +$128 +30经验"<<endl,zuanshi-=3,yangmao>=5,qian+=128,Sleep(990),jingyan+=30;
if(dingdan_go=='q')DD_ZX();
if(dingdan_go==' ')baoliudingdan_1=false;
}
}
}
void b()
{
Sleep(990);
system("cls");
}
void xiaozhenguanli()
{
system("cls");
cout<<"1,市民管理"<<endl;
cout<<"2,建筑管理"<<endl;
cout<<"3,小镇改名"<<endl;
cout<<"4,成就"<<endl;
cout<<"5,前往电音节"<<endl;
xiaozhenguanli_go=getch();
if(xiaozhenguanli_go=='1')
{
system("cls");
cout<<"驱逐市民"<<endl;
cout<<"市民:"<<shimin<<endl;
cout<<"按1驱逐"<<endl;
xiaozhenguanli_go_2=getch();
if(xiaozhenguanli_go_2=='1')shimin--,Beep(250,400),cout<<"驱逐成功"<<endl,Sleep(1000);
}
if(xiaozhenguanli_go=='2')
{
cout<<"拆毁建筑"<<endl;
cout<<"1,熔炉:"<<ronglu<<endl;
cout<<"2,小平房:"<<pinfang<<endl;
cout<<"3,小型居民楼:"<<xiaoxinjuminlou<<endl;
cout<<"4,纳米科技工厂:"<<namikejigongchang<<endl;
xiaozhenguanli_go_2=getch();
if(xiaozhenguanli_go_2=='1'&&ronglu>0)cout<<"拆毁成功,建筑碎片+1"<<endl,Sleep(1000),ronglu--,jianzhusuipian++;
if(xiaozhenguanli_go_2=='2'&&pinfang>0)cout<<"拆毁成功,建筑碎片+1"<<endl,Sleep(1000),pinfang--,jianzhusuipian++,guidingshimin-=4;
if(xiaozhenguanli_go_2=='3'&&xiaoxinjuminlou>0)cout<<"拆毁成功,建筑碎片+3"<<endl,Sleep(1000),xiaoxinjuminlou--,jianzhusuipian+=3,guidingshimin-=20;
if(xiaozhenguanli_go_2=='4'&&namikejigongchang>0)cout<<"拆毁成功,建筑碎片+6"<<endl,Sleep(1000),namikejigongchang--,jianzhusuipian+=6;
}
if(xiaozhenguanli_go=='3')
{
while(name_1!='1')
{
system("cls");
srand(time(0));
cout<<"改变小镇的名字"<<endl;
cout<<"按1确定 按2换一个"<<endl;
name_2=rand()%24;
name_3();
name_1=getch();
}
}
if(xiaozhenguanli_go=='4')
{
if(niunaizhige==true)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10),cout<<"牛奶之歌[收集80瓶牛奶]已达成"<<endl;
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6),cout<<"牛奶之歌[收集80瓶牛奶]"<<niunai<<"/80"<<endl;
if(jidandaheng==true)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10),cout<<"鸡蛋大亨[收集150个鸡蛋]已达成"<<endl;
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6),cout<<"鸡蛋大亨[收集150个鸡蛋]"<<jidan<<"/150"<<endl;
if(peigenwang==true)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10),cout<<"培根王[收集70个培根]已达成"<<endl;
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6),cout<<"培根王[收集70个培根]"<<peigen<<"/70"<<endl;
if(yangmaowangzi==true)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10),cout<<"羊毛王子[收集80个羊毛]已达成"<<endl;
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6),cout<<"羊毛王子[收集80个羊毛]"<<yangmao<<"/80"<<endl;
if(mitangguan==true)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10),cout<<"蜜糖罐[收集30个蜂蜜]已达成"<<endl;
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6),cout<<"蜜糖罐[收集30个蜂蜜]"<<fengmi<<"/30"<<endl;
if(chawang==true)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10),cout<<"茶王[收集35个红茶叶]已达成"<<endl;
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),6),cout<<"茶王[收集35个红茶叶]"<<hongchaye<<"/35"<<endl;
getch();
}
if(xiaozhenguanli_go=='5')
{
int i;
int sadsf=getch();
cout<<"---------------"<<endl;
b();
cout<<" ------------- "<<endl;
b();
cout<<" ----------- "<<endl;
b();
cout<<" --------- "<<endl;
b();
cout<<" ------- "<<endl;
b();
cout<<" ------- "<<endl;
b();
cout<<" ----- "<<endl;
b();
cout<<" --- "<<endl;
b();
cout<<" - "<<endl;
b();
cout<<" --- "<<endl;
b();
cout<<" ----- "<<endl;
b();
cout<<" ------- "<<endl;
b();
cout<<" --------- "<<endl;
b();
cout<<" ----------- "<<endl;
b();
for(int u=1;u<=160;u++)
{
cout<<"感受计算机的强大吧!"<<endl;
i++;
if(i==9)i=0;
if(i==0)system("color 0A");
if(i==1)system("color 1A");
if(i==2)system("color 2B");
if(i==3)system("color 3C");
if(i==4)system("color 4D");
if(i==5)system("color 5E");
if(i==6)system("color 6F");
Sleep(50);
}
while(1)
{
cout<<"Duang";
i++;
if(i==9)i=0;
if(i==0)system("color 0A");
if(i==1)system("color 1A");
if(i==2)system("color 2B");
if(i==3)system("color 3C");
if(i==4)system("color 4D");
if(i==5)system("color 5E");
if(i==6)system("color 6F");
if(i==7)system("color 7F");
if(i==8)system("color 8F");
if(kbhit())
{
int ya=getch();
break;
}
}
}
}
void yueqiu()
{
int i=rand()%2;
system("cls");
cout<<"成功抵达月球!"<<endl;
if(i==0)
{
cout<<"获得物品:能量晶块*2 +200经验 +40威望"<<endl;
nengliangjingkuai+=2;
jingyan+=200;
weiwang+=40;
Sleep(5000);
}
if(i==1)
{
cout<<"获得物品:能量晶块*3 +100经验 +40威望"<<endl;
nengliangjingkuai+=3;
jingyan+=100;
weiwang+=40;
Sleep(5000);
}
}
void huoxing()
{
int i=rand()%2;
system("cls");
cout<<"成功抵达火星!"<<endl;
if(i==0)
{
cout<<"获得物品:钛合金*10+200经验 +40威望"<<endl;
taihejin+=10;
jingyan+=200;
weiwang+=40;
Sleep(5000);
}
if(i==1)
{
cout<<"获得物品:航天器外壳*1 +100经验 +40威望"<<endl;
hangtianqiwaike+=3;
jingyan+=100;
weiwang+=40;
Sleep(5000);
}
}
void jinxing()
{
int i=rand()%2;
system("cls");
cout<<"成功抵达金星!"<<endl;
if(i==0)
{
cout<<"获得物品:能量核心*1 +400经验 +40威望"<<endl;
nenglianghexin+=1;
jingyan+=400;
weiwang+=40;
Sleep(5000);
}
if(i==1)
{
cout<<"获得物品:超导线圈*8 +400经验 +40威望"<<endl;
chaodaoxianquan+=8;
jingyan+=400;
weiwang+=40;
Sleep(5000);
}
}
void muxing()
{
int i=rand()%2;
system("cls");
cout<<"成功抵达木星!"<<endl;
if(i==0)
{
cout<<"获得物品:能量核心*2 +400经验 +40威望"<<endl;
nenglianghexin+=2;
jingyan+=400;
weiwang+=40;
Sleep(5000);
}
if(i==1)
{
cout<<"获得物品:超导线圈*8 +500经验 +40威望"<<endl;
chaodaoxianquan+=8;
jingyan+=500;
weiwang+=40;
Sleep(5000);
}
}
void sheshicaozuo()
{
while(1)
{
int sheshicaozuo_go,sheshicaozuo_go_2,sheshicaozuo_go_3,sheshicaozuo_go_4;
sheshicaozuo_go_3='w';
system("cls");
cout<<"1,太空计划 "<<endl;
cout<<"2,机甲建设 "<<endl;
cout<<"3,航运订单 "<<endl;
cout<<"4,野生动物保护区 "<<endl;
cout<<"5,外星人大战 "<<endl;
cout<<"6,宠物养成 "<<endl;
cout<<"7,>>敬请期待!<<"<<endl;
cout<<"8,赛车世界 "<<endl;
cout<<"9,海洋探索 "<<endl;
sheshicaozuo_go=getch();
if(sheshicaozuo_go=='0')break;
if(sheshicaozuo_go=='1')
{
system("cls");
cout<<"拥有火箭:"<<endl;
cout<<"挑战者号火箭:"<<tiaozhanzhehaohuojian<<endl;
cout<<"按1发射"<<endl;
cout<<"按2制作"<<endl;
cout<<"按3进入天文台"<<endl;
sheshicaozuo_go_2=getch();
if(sheshicaozuo_go_2=='1')
{
cout<<"选择发射"<<endl;
cout<<"1,挑战者号火箭"<<endl;
cout<<"2,嫦娥一号火箭"<<endl;
cout<<"3,质子M号火箭"<<endl;
sheshicaozuo_go_3=getch();
if(sheshicaozuo_go_3=='1'&&tiaozhanzhehaohuojian>=1)
{
cout<<"选择目的地"<<endl;
cout<<"1,月球"<<endl;
cout<<"2,火星"<<endl;
sheshicaozuo_go_4=getch();
if(sheshicaozuo_go_4=='1')
{
tiaozhanzhehaohuojian--;
yueqiu();
}
if(sheshicaozuo_go_4=='2')
{
tiaozhanzhehaohuojian--;
huoxing();
}
}
if(sheshicaozuo_go_3=='2'&&changeyihao>=1)
{
cout<<"选择目的地"<<endl;
cout<<"1,月球"<<endl;
cout<<"2,火星"<<endl;
cout<<"3,金星"<<endl;
sheshicaozuo_go_4=getch();
if(sheshicaozuo_go_4=='1')
{
changeyihao--;
yueqiu();
}
if(sheshicaozuo_go_4=='2')
{
changeyihao--;
huoxing();
}
if(sheshicaozuo_go_4=='3')
{
changeyihao--;
jinxing();
}
}
if(sheshicaozuo_go_3=='3'&&zhiziMhaohuojian>=1)
{
cout<<"选择目的地"<<endl;
cout<<"1,月球"<<endl;
cout<<"2,火星"<<endl;
cout<<"3,金星"<<endl;
cout<<"4,木星"<<endl;
sheshicaozuo_go_4=getch();
if(sheshicaozuo_go_4=='1')
{
zhiziMhaohuojian--;
yueqiu();
}
if(sheshicaozuo_go_4=='2')
{
zhiziMhaohuojian--;
huoxing();
}
if(sheshicaozuo_go_4=='3')
{
zhiziMhaohuojian--;
jinxing();
}
if(sheshicaozuo_go_4=='4')
{
zhiziMhaohuojian--;
muxing();
}
}
}
if(sheshicaozuo_go_2=='2')
{
cout<<"名称 材料 需求"<<endl;
if(fashetuijingqi>=1&&hangtianqiwaike>=1&&gang>=10)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,挑战者号火箭 发射推进器*1 航天器外壳*1 钢*10 无"<<endl;
if(fashetuijingqi>=1&&hangtianqiwaike>=1&&yinhuagang>=5)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,嫦娥一号火箭 发射推进器*1 航天器外壳*1 硬化钢*5 无"<<endl;
if(fashetuijingqi>=1&&hangtianqiwaike>=1&&hengwentuliao>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,质子M号火箭 发射推进器*1 航天器外壳*1 恒温涂料*1 无"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
sheshicaozuo_go_3=getch();
if(sheshicaozuo_go_3=='1'&&fashetuijingqi>=1&&hangtianqiwaike>=1&&gang>=10)cout<<"制作成功"<<endl,Sleep(1000),tiaozhanzhehaohuojian++,fashetuijingqi--,hangtianqiwaike--,gang-=10;
if(sheshicaozuo_go_3=='2'&&fashetuijingqi>=1&&hangtianqiwaike>=1&&yinhuagang>=5)cout<<"制作成功"<<endl,Sleep(1000),changeyihao++,fashetuijingqi--,hangtianqiwaike--,yinhuagang-=5;
if(sheshicaozuo_go_3=='3'&&fashetuijingqi>=1&&hangtianqiwaike>=1&&hengwentuliao>=1)cout<<"制作成功"<<endl,Sleep(1000),zhiziMhaohuojian++,fashetuijingqi--,hangtianqiwaike--,hengwentuliao-=1;
}
if(sheshicaozuo_go_2=='3')
{
cls;
cout<<"天文台:"<<endl;
cout<<"按1观星"<<endl;
if(chunvzuoxinyun==true){color(10);cout<<"处女座星云 已观测"<<endl;}
else{color(6);cout<<"处女座星云 未观测"<<endl;}
sheshicaozuo_go_3=getch();
if(sheshicaozuo_go_3=='1')
{
cout<<"观测中..."<<endl;
Sleep(1500);
int i=rand()%5;
if(i==1)
{
cout<<"观测到处女座星云"<<endl;
chunvzuoxinyun=true;
Sleep(1000);
}
}
}
}
if(sheshicaozuo_go=='2')
{
system("cls");
cout<<"X型机甲:"<<jijiaX<<endl;
cout<<"Y型机甲:"<<jijiaY<<endl;
cout<<"Z型机甲:"<<jijiaZ<<endl;
cout<<"按1建设新的机甲"<<endl;
sheshicaozuo_go_2=getch();
if(sheshicaozuo_go_2=='1')
{
cout<<"机甲名称 配方 需求"<<endl;
if(nenglianghexin>=1&&yinhuagang>=3&&xinpianB>=1&&jijiazhizaotai>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,X型机甲 能量核心*1 硬化钢*3 B级芯片*1 机甲制造台"<<endl;
if(nenglianghexin>=1&&yinhuagang>=4&&xinpianA>=1&&jijiazhizaotai>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,Y型机甲 能量核心*1 硬化钢*4 A级芯片*1 机甲制造台"<<endl;
if(nenglianghexin>=1&&yinhuagang>=5&&xinpianS>=1&&jijiazhizaotai>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,Z型机甲 能量核心*1 硬化钢*5 S级芯片*1 机甲制造台"<<endl;
sheshicaozuo_go_3=getch();
if(sheshicaozuo_go_3=='1'&&nenglianghexin>=1&&yinhuagang>=3&&xinpianB>=1&&jijiazhizaotai>=1)cout<<"制作成功"<<endl,Sleep(800),nenglianghexin-=1,yinhuagang-=3,xinpianB-=1,jijiaX+=1;
if(sheshicaozuo_go_3=='2'&&nenglianghexin>=1&&yinhuagang>=4&&xinpianA>=1&&jijiazhizaotai>=1)cout<<"制作成功"<<endl,Sleep(800),nenglianghexin-=1,yinhuagang-=4,xinpianA-=1,jijiaY+=1;
if(sheshicaozuo_go_3=='3'&&nenglianghexin>=1&&yinhuagang>=5&&xinpianS>=1&&jijiazhizaotai>=1)cout<<"制作成功"<<endl,Sleep(800),nenglianghexin-=1,yinhuagang-=5,xinpianS-=1,jijiaZ+=1;
}
}
if(sheshicaozuo_go=='3')
{
system("cls");
if(xiaomai>=400)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,小麦*400 奖励:$800 绿色礼券*1"<<endl;
if(hangtianqiwaike>=4)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,航天器外壳*4 奖励:$2300 紫色礼券*1"<<endl;
if(taihejin>=20)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,钛合金*20 奖励:$1699 紫色礼券*1"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
sheshicaozuo_go_3=getch();
if(sheshicaozuo_go_3=='1'&&xiaomai>=400)cout<<"交付成功 +$800 绿色礼券+1"<<endl,xiaomai-=400,qian+=600,lvseliquan+=1,Sleep(1000);
if(sheshicaozuo_go_3=='2'&&hangtianqiwaike>=4)cout<<"交付成功 +$2300 紫色礼券+1"<<endl,hangtianqiwaike-=4,qian+=2300,ziseliquan+=1,Sleep(1000);
if(sheshicaozuo_go_3=='3'&&taihejin>=20)cout<<"交付成功 +$1699 紫色礼券+1"<<endl,taihejin-=20,qian+=1699,ziseliquan+=1,Sleep(1000);
}
if(sheshicaozuo_go=='4')
{
system("cls");
cout<<"大象:"<<daxiang<<endl;
cout<<"河马:"<<hema<<endl;
cout<<"鳄鱼:"<<eyu<<endl;
cout<<"按1领取门票收获"<<endl;
sheshicaozuo_go_3=getch();
if(daxiang>0)cout<<"获得"<<(shouhuo_3/25)*daxiang<<"张绿色礼券"<<endl,lvseliquan+=(shouhuo_3/25)*daxiang;
if(hema>0)cout<<"获得"<<(shouhuo_3/50)*hema<<"张蓝色礼券"<<endl,lanseliquan+=(shouhuo_3/50)*hema;
if(eyu>0)cout<<"获得"<<(shouhuo_3/200)*eyu<<"张紫色礼券"<<endl,ziseliquan+=(shouhuo_3/200)*eyu;
shouhuo_3=0;
Sleep(1000);
}
if(sheshicaozuo_go=='5')//16级解锁
{
system("cls");
cout<<"1,搜索外星人[耗费 搜索雷达*1]"<<endl;
int sheshicaozuo_go_1=getch();
int sheshicaozuo_go_2;
int sheshicaozuo_go_3;
int sheshicaozuo_go_4;
int zhan=(shibing*10+jijiaX*100+jijiaY*100+jijiaZ*100);
if(sheshicaozuo_go_1=='1')
{
cout<<"搜索到目标!"<<endl;
Sleep(1000);
cout<<"1,普通外星军队 攻:20 血:100"<<endl;
cout<<"2,尖端外星军队 攻:40 血:90 "<<endl;
cout<<"3,精英外星军队 攻:100 血:200 "<<endl;
cout<<"4,银河军队 攻:600 血:1000 "<<endl;
cout<<"5,火龙 攻:888 血:2000"<<endl;
sheshicaozuo_go_3=getch();
if(sheshicaozuo_go_3=='1')gong=20,xue=100;
if(sheshicaozuo_go_3=='2')gong=40,xue=90;
if(sheshicaozuo_go_3=='3')gong=100,xue=200;
if(sheshicaozuo_go_3=='4')gong=600,xue=1000;
if(sheshicaozuo_go_3=='5')gong=888,xue=2000;
while((xue>0&&shengming>0))
{
system("cls");
if(shibing>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,士兵攻击"<<endl;
if(huojiandan>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"2,火箭弹助攻"<<endl;
if((jijiaX+jijiaY+jijiaZ)>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"3,机甲助攻"<<endl;
if(huoyanyaoshui>=1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"4,投掷火焰药水"<<endl;
sheshicaozuo_go_4=getch();
if(sheshicaozuo_go_4=='1')
{
xue-=shibing*10;
cout<<"对方-"<<shibing*10<<endl;
}
if(sheshicaozuo_go_4=='2'&&huojiandan>=1)
{
xue-=30;
huojiandan--;
cout<<"对方-30"<<endl;
}
if(sheshicaozuo_go_4=='3')
{
xue-=jijiaX*100+jijiaY*150+jijiaZ*200;
cout<<"对方-"<<jijiaX*100+jijiaY*100+jijiaZ*200<<endl;
}
if(sheshicaozuo_go_4=='4'&&huoyanyaoshui>=1)
{
xue-=300;
huoyanyaoshui--;
cout<<"对方-300"<<endl;
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
cout<<"对方-"<<zhan<<endl;
Sleep(100);
shengming-=gong;
cout<<"我方-"<<gong<<endl;
Sleep(100);
}
if((xue>0&&shengming<=0)||(xue<0&&shengming<=0))
{
cout<<"失败!"<<endl;
shengming=0;
shibing-=rand()%10;
cout<<"扣除部分士兵"<<endl;
if(shibing<0)shibing=0;
Sleep(1000);
}
if(xue<=0)
{
system("cls");
cout<<"你赢了!"<<endl;
if(gong==20)cout<<"能量晶块+1 威望+5 经验+30"<<endl,nengliangjingkuai++,weiwang+=5,jingyan+=30;
if(gong==40)cout<<"硬化钢+1 威望+10 经验+60"<<endl,yinhuagang++,weiwang+=10,jingyan+=60;
if(gong==100)cout<<"硬化钢+5 威望+20 经验+100"<<endl,yinhuagang+=5,weiwang+=20,jingyan+=100;
if(gong==600)cout<<"S级芯片+1 威望+10 经验+200"<<endl,xinpianS+=1,weiwang+=10,jingyan+=200;
if(gong==888)cout<<"火龙心脏神经+2 经验+300"<<endl,huolongxinzangshenjin+=2,jingyan+=300;
Sleep(1000);
show();
}
}
}
if(sheshicaozuo_go=='6')
{
system("cls");
cout<<"你拥有小猫:"<<xiaomao<<endl;
cout<<"你拥有小狗:"<<xiaogou<<endl;
cout<<"1,领养"<<endl;
cout<<"2,购买"<<endl;
cout<<"3,撸猫/狗"<<endl;
cout<<"4,喂食"<<endl;
cout<<"5,制作宠物粮食"<<endl;
cout<<"6,兑换中心"<<endl;
int xuanze=getch();
if(xuanze=='1')
{
int xuanze_1=rand()%3;
if(xuanze_1==1)
{
cout<<"你拥有了一只小狗";
xiaogou++;
}
if(xuanze_1==2)
{
cout<<"你拥有了一只小猫";
xiaomao++;
}
if(xuanze_1==0)
cout<<"没有人愿意让你抱走宠物";
sleep(1);
cls;
}
if(xuanze=='2')
{
if(qian>=300)color(10)
else color(12);
cout<<"1,小猫 *1 $300"<<endl;
if(qian<400)
color(12);
if(qian>=300)
color(10);
cout<<"2,小狗 *1 $400"<<endl;
int why=getch();
if (why=1)
{
if(qian>=300)
{
cout<<"购买成功!",qian-=300,xiaomao++;
sleep(1);
cls;
}
}
if (why=2)
{
if(qian>=400)
{
cout<<"购买成功!"<<endl;
qian-=400,xiaogou++;
sleep(1);
cls;
}
}
}
if(xuanze=='3')
{
if (xiaomao>=1||xiaogou>=1)
{
int qmz = rand()%3;
if (qmz==0)
{
cout<<"它舔了舔你的手"<<endl;
sleep(1);
}
if (qmz==1)
{
cout<<"它露出了舒服的神情"<<endl;
sleep(1);
}
if (qmz==2)
{
cout<<"它朝你笑了笑"<<endl;
sleep(1);
}
cout<<"亲密值+10"<<endl;
qingmizhi+=10;
Sleep(500);
cls;
}
}
if(xuanze=='4')
{
cout<<"你的宠物粮食有:"<<chongwuliang<<endl;
if(chongwuliang>=1)
{
if (xiaomao>=1||xiaogou >= 1)
{
cout<<"1,喂食"<<endl;
int weishi_1=getch();
cout<<"亲密值+15!"<<endl;
qingmizhi+=15;
Sleep(800);
cls;
}
}
getch();
}
if(xuanze=='5')
{
cout<<" 名称 配方 需求"<<endl;
if(peigen>=2&&liyu>=1&&xiaomai>=5)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
cout<<"1,宠物粮食*1 培根*2 鲤鱼*1 小麦*5 无"<<endl;
xuanze=getch();
if(xuanze=='1'&&peigen>=2&&liyu>=1&&xiaomai>=5)cout<<"制作成功!"<<endl,peigen-=2,liyu-=1,xiaomai-=5,chongwuliang++,Sleep(800);
}
if(xuanze=='6'&&qingmizhi>=200)
{
cls;
cout<<"你的亲密值为"<<qingmizhi<<endl;
cout<<"1,饲料*5 需要亲密值200"<<endl;
int siliao_gomai=getch();
if (siliao_gomai=='1'&&qingmizhi>=200)
{
cout <<"购买成功!"<<endl;
siliao+=5,qingmizhi-=200;
}
sleep(1);
}
}
if(sheshicaozuo_go=='8')
{
cls;
cout<<"你拥有赛车:"<<saiche<<endl;
cout<<"1,赛车商店"<<endl;
cout<<"2,赛车组装"<<endl;
cout<<"3,赛车竞速"<<endl;
cout<<"4,车库"<<endl;
int saiche_1=getch();
if(saiche_1=='1')
{
cls;
cout<<"1,燃料 *5 $200"<<endl;
cout<<"2,航天器外壳 *3 $1600"<<endl;
cout<<"3,发射推进器 *2 $1780"<<endl;
cout<<"4,汽车厂 *1 $2000"<<endl;
int saiche_2=getch();
if(saiche_2=='1'&&qian>=200)
{
cout<<"购买成功!"<<endl;
qian-=200;
ranliao+=5;
Sleep(500);
}
if(saiche_2=='2'&&qian>=1600)
{
cout<<"购买成功!"<<endl;
qian-=1600;
hangtianqiwaike+=3;
Sleep(500);
}
if(saiche_2=='3'&&qian>=1780)
{
cout<<"购买成功!"<<endl;
qian-=1780;
fashetuijingqi+=2;
Sleep(500);
}
if(saiche_2=='4'&&qian>=2000)
{
cout<<"购买成功!"<<endl;
qian-=2000;
qichechang+=1;
Sleep(500);
}
}
if (saiche_1=='2')
{
cls;
cout<<" 名称 合成 需求"<<endl;
if(ranliao>=3&&futeyingqin>=1&&chekujia_A>=2&&qichechang>=1)color(10)
else color(12);
cout<<"1,福特GT 福特引擎*1 A级车骨架*1 燃料*3 汽车厂"<<endl;
int saiche_3=getch();
color(15);
if(saiche_3=='1'&&ranliao>=3&&futeyingqin>=1&&chekujia_A>=2&&qichechang>=1)cout<<"制作成功!"<<endl,Sleep(1000),ranliao-=3,chekujia_A-=1,futeyingqin-=1,futeGT+=1;
}
if (saiche_1=='3')
{
cls;
cout<<"未开放,请等待更新!"<<endl;
sleep(2);
}
if(saiche_1=='4')
{
cls;
cout<<"福特GT:"<<futeGT<<endl;
getch();
}
}
if(sheshicaozuo_go=='9')
{
cls;
cout<<"1,开始探索"<<endl;
cout<<"2,--------"<<endl;
cout<<"3,制造潜水艇"<<endl;
sheshicaozuo_go=getch();
if(sheshicaozuo_go=='1')
{
cls;
cout<<"选择一种方式"<<endl;
cout<<"1,蛟龙号"<<endl;
cout<<"2,独自下潜"<<endl;
sheshicaozuo_go=getch();
if(sheshicaozuo_go=='1'&&jiaolonghao>=1)
{
cout<<"1,浅入探索"<<endl;
cout<<"2,深入探索"<<endl;
int jiaolonghao_1=getch();
if (jiaolonghao_1=='1')
{
jiaolonghao--;
cout<<"正在探索中..."<<endl;
Sleep(2000);
int i=rand()%3;
if(i==0)
{
cout<<"发现红色海绵*20! 黄色海绵*30!"<<endl;
Sleep(2000);
hongsehaimian+=20;
huangsehaimian+=30;
}
if(i==1)
{
cout<<"发现海底金币箱*1[+$1888]! 黄色海绵*30!"<<endl;
Sleep(2000);
qian+=1888;
huangsehaimian+=30;
}
if(i==2)
{
cout<<"发现鱼鳃*3!"<<endl;//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sleep(2000);
yusai+=3;
}
}
if (jiaolonghao_1=='2')
{
jiaolonghao--;
cout<<"正在探索中..."<<endl;
Sleep(2000);
int tansuo=rand()%4;
if (tansuo==2)
{
cout<<"发现金色礼券*1!"<<endl;
Sleep(2000);
jinseliquan++;
}
}
}
if(sheshicaozuo_go=='2'&&huxiyaoshui>=1)
{
cout<<"你有"<<huxiyaoshui<<"个呼吸药水"<<endl;
cout<<"1,浅入探索"<<endl;
cout<<"2,深入探索"<<endl;
int jiaolonghao_1=getch();
if (jiaolonghao_1=='1'&&huxiyaoshui>=3)
{
xue-=50;
cout<<"正在探索中..."<<endl;
Sleep(2000);
int i=rand()%3;
if(i==0)
{
cout<<"发现红色海绵*20! 黄色海绵*30!"<<endl;
Sleep(2000);
hongsehaimian+=20;
huangsehaimian+=30;
huxiyaoshui-=3;
}
if(i==1)
{
cout<<"发现海底金币箱*1[+$1888]! 黄色海绵*30!"<<endl;
Sleep(2000);
qian+=1888;
huangsehaimian+=30;
huxiyaoshui-=3;
}
if(i==2)
{
cout<<"发现鱼鳃*3!"<<endl;
huxiyaoshui-=3;
Sleep(2000);
yusai+=3;
}
}
if (jiaolonghao_1=='2'&&huxiyaoshui>=5)
{
xue-=100;
cout<<"正在探索中..."<<endl;
Sleep(2000);
int tansuo=rand()%4;
if (tansuo==2)
{
cout<<"发现紫色礼券*1!"<<endl;
Sleep(2000);
ziseliquan++;
huxiyaoshui-=5;
}
}
}
}
if(sheshicaozuo_go=='3')
{
cls;
cout<<" 名称 配方"<<endl;
if(yinhuagang>=3&&xinpianA>=1&&chaodaoxianquan>=2)color(10)
else color(12);
cout<<"1,蛟龙号 硬化钢*3 A级芯片*1 超导线圈*2"<<endl;
color(15);
sheshicaozuo_go=getch();
if(sheshicaozuo_go=='1'&&yinhuagang>=3&&xinpianA>=1&&chaodaoxianquan>=2)yinhuagang-=3,xinpianA-=1,chaodaoxianquan-=2,cout<<"合成成功!"<<endl,Sleep(1000),jiaolonghao++;
}
}
}
}
void logo_1()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13);
cout<<"% 购买成功 %"<<endl;
Sleep(20);
system("cls");
cout<<"%% 购买成功 %%"<<endl;
Sleep(20);
system("cls");
cout<<"%%% 购买成功 %%%"<<endl;
Sleep(20);
system("cls");
cout<<"%%%= 购买成功 =%%%"<<endl;
Sleep(20);
system("cls");
cout<<"%%%== 购买成功 ==%%%"<<endl;
Sleep(20);
system("cls");
cout<<"%%%=== 购买成功 ===%%%"<<endl;
Sleep(20);
system("cls");
cout<<"%%%===- 购买成功 -===%%%"<<endl;
Sleep(20);
system("cls");
cout<<"%%%===-- 购买成功 --===%%%"<<endl;
Sleep(20);
system("cls");
cout<<"%%%===--- 购买成功---===%%%"<<endl;
Sleep(20);
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
}
void youhui()
{
int youhui_1;
system("cls");
cout<<"优惠物品购买季!"<<endl;
if(qian>=140)color(10)
else color(12);
cout<<"1,钛合金*2 $140 -16%!!!"<<endl;
if(qian>=290)color(10)
else color(12);
cout<<"2,硬化钢*2 $290 -8%!!!"<<endl;
if(qian>=430)color(10)
else color(12);
cout<<"3,绿色礼券*5 $430 -14%!!!"<<endl;
if(qian>=100)color(10)
else color(12);
cout<<"4,螺钉*1 $100 -21%!!!"<<endl;
if(qian>=1888)color(10)
else color(12);
cout<<"5,建材包*1 $1888 -7%!!! [螺钉*8 木板*8]"<<endl;
if(qian>=788)color(10)
else color(12);
cout<<"6,航天器外壳*1 $788 -11%!!!"<<endl;
color(15);
youhui_1=getch();
if(youhui_1=='1'&&qian>=140)logo_1(),taihejin+=2,qian-=140;
if(youhui_1=='2'&&qian>=290)logo_1(),yinhuagang+=2,qian-=290;
if(youhui_1=='3'&&qian>=430)logo_1(),lvseliquan+=5,qian-=430;
if(youhui_1=='4'&&qian>=100)logo_1(),luodin+=1,qian-=100;
if(youhui_1=='5'&&qian>=1888)logo_1(),luodin+=8,muban+=8,qian-=1888;
if(youhui_1=='6'&&qian>=788)logo_1(),hangtianqiwaike++,qian-=788;
}
void debijinsai()
{
int debijinsai_1;
system("cls");
cout<<" 任务 奖励"<<endl;
if(xiaomai>=300)color(10)
else color(12);
cout<<"1,提交小麦*300 人口+30"<<endl;
if(kekeguo>=200)color(10)
else color(12);
cout<<"2,提交可可果*200 人口+50"<<endl;
if(peigenjidan>=40)color(10)
else color(12);
cout<<"3,提交培根煎蛋*40 人口+100"<<endl;
color(15);
debijinsai_1=getch();
if(debijinsai_1=='1'&&xiaomai>=300)cout<<"提交成功!"<<endl,xiaomai-=300,shimin+=30,Sleep(800);
if(debijinsai_1=='2'&&kekeguo>=200)cout<<"提交成功!"<<endl,kekeguo-=200,shimin+=50,Sleep(800);
if(debijinsai_1=='3'&&peigenjidan>=40)cout<<"提交成功!"<<endl,peigenjidan-=40,shimin+=100,Sleep(800);
}
void liquanxiaofeijie()
{
int liquanxiaofeijie_1;
system("cls");
if(lvseliquan>=1)color(10)
else color(12);
cout<<"1,用1*绿色礼券换取$100"<<endl;
if(lanseliquan>=1)color(10)
else color(12);
cout<<"2,用1*蓝色礼券换取$400"<<endl;
if(ziseliquan>=1)color(10)
else color(12);
cout<<"3,用1*紫色礼券换取$1000"<<endl;
if(jinseliquan>=1)color(10)
else color(12);
cout<<"4,用1*金色礼券换取$2400"<<endl;
color(15);
liquanxiaofeijie_1=getch();
if(liquanxiaofeijie_1=='1'&&lvseliquan>=1)cout<<"换取成功!"<<endl,lvseliquan--,qian+=100,Sleep(500);
if(liquanxiaofeijie_1=='2'&&lanseliquan>=1)cout<<"换取成功!"<<endl,lanseliquan--,qian+=400,Sleep(500);
if(liquanxiaofeijie_1=='3'&&ziseliquan>=1)cout<<"换取成功!"<<endl,ziseliquan--,qian+=1000,Sleep(500);
if(liquanxiaofeijie_1=='4'&&jinseliquan>=1)cout<<"换取成功!"<<endl,jinseliquan--,qian+=2400,Sleep(500);
}
void xingbie()
{
system("cls");
cout<<"男性:"<<shimin_nan<<endl;
cout<<"女性:"<<shimin_nv<<endl;
getch();
}
void saiji()
{
int saiji_go;
system("cls");
color(10);
cout<<"A-1 赛季 按1开始"<<endl;
color(200);
cout<<"奖励:?紫色礼券? ?航天器外壳? ?建材礼包? ..."<<endl;
color(14);
cout<<"A-2 赛季 按2开始"<<endl;
color(200);
cout<<"奖励:?紫色礼券? ?航天器外壳? ?建材礼包? ..."<<endl;
color(4);
cout<<"按9进入赛季碎片兑换商城"<<endl;
color(15);
saiji_go=getch();
if(saiji_go=='1')
{
system("cls");
if(niunai>=20)color(10)
else color(12);
cout<<"任务1:收集20个牛奶"<<niunai<<"/20 [按1提交]"<<endl;
if(peigen>=20)color(10)
else color(12);
cout<<"任务2:收集20个培根"<<peigen<<"/20 [按2提交]"<<endl;
saiji_go=getch();
if(saiji_go=='1'&&niunai>=20)cout<<"赛季碎片+20"<<endl,saijisuipian+=20,niunai-=20,Sleep(800);
if(saiji_go=='2'&&peigen>=20)cout<<"赛季碎片+20"<<endl,saijisuipian+=20,peigen-=20,Sleep(800);
}
if(saiji_go=='2')
{
system("cls");
if(fengmi>=20)color(10)
else color(12);
cout<<"任务1:收集20个蜂蜜"<<fengmi<<"/20 [按1提交]"<<endl;
if(peigen>=20)color(10)
else color(12);
cout<<"任务2:收集20个培根"<<peigen<<"/20 [按2提交]"<<endl;
saiji_go=getch();
if(saiji_go=='1'&&fengmi>=20)cout<<"赛季碎片+40"<<endl,saijisuipian+=40,fengmi-=20,Sleep(800);
if(saiji_go=='2'&&peigen>=20)cout<<"赛季碎片+20"<<endl,saijisuipian+=20,peigen-=20,Sleep(800);
}
if(saiji_go=='9')
{
system("cls");
color(10);
cout<<"我有"<<saijisuipian<<"个赛季碎片"<<endl;
if(saijisuipian>=200)color(10)
else color(12);
cout<<"1,航天器外壳 200*赛季碎片"<<endl;
if(saijisuipian>=150)color(10)
else color(12);
cout<<"2,紫色礼券 150*赛季碎片"<<endl;
if(saijisuipian>=100)color(10)
else color(12);
cout<<"3,建材礼包 100*赛季碎片 [螺钉*8 木板*8]"<<endl;
int saiji_go_2=getch();
if(saiji_go_2=='1'&&saijisuipian>=200)cout<<"购买成功!"<<endl,Sleep(1000),saijisuipian-=200,hangtianqiwaike+=1;
if(saiji_go_2=='2'&&saijisuipian>=150)cout<<"购买成功!"<<endl,Sleep(1000),saijisuipian-=150,ziseliquan+=1;
if(saiji_go_2=='3'&&saijisuipian>=100)cout<<"购买成功!"<<endl,Sleep(1000),saijisuipian-=100,luodin+=8,muban+=8;
}
}
void _DD()
{
system("cls");
if(dingdan_zz==0)
{
if(luodin>=3)color(10)
else color(12);
printf("需求:螺钉*3[%d/3]\n",luodin);
printf("奖励:$400 经验*15\n");
printf("按1交付 按0返回\n");
int _DD_go=getch();
color(15);
if(_DD_go=='1'&&luodin>=3){printf("+$400 经验+15\n");Sleep(800);qian+=400;jingyan+=15;luodin-=3;dingdan_wt=0;}
}
if(dingdan_zz==1)
{
if(mada>=3)color(10)
else color(12);
printf("需求:马达*3[%d/3]\n",mada);
printf("奖励:$700 经验*30\n");
printf("按1交付 按0返回\n");
int _DD_go=getch();
color(15);
if(_DD_go=='1'&&mada>=3){printf("+$700 经验+30\n");Sleep(800);qian+=700;jingyan+=30;mada-=3;dingdan_wt=0;}
}
if(dingdan_zz==2)
{
if(meiguinaicha>=4)color(10)
else color(12);
printf("需求:玫瑰奶茶*4[%d/4]\n",meiguinaicha);
printf("奖励:$700 经验*40\n");
printf("按1交付 按0返回\n");
int _DD_go=getch();
color(15);
if(_DD_go=='1'&&meiguinaicha>=4){printf("+$700 经验+30\n");Sleep(800);qian+=700;jingyan+=30;meiguinaicha-=4;dingdan_wt=0;}
}
if(dingdan_zz==3)
{
if(yumimianbao>=10)color(10)
else color(12);
printf("需求:玉米面包*10[%d/10]\n",yumimianbao);
printf("奖励:$500 经验*70\n");
printf("按1交付 按0返回\n");
int _DD_go=getch();
color(15);
if(_DD_go=='1'&&yumimianbao>=10){printf("+$500 经验+70\n");Sleep(800);qian+=500;jingyan+=70;yumimianbao-=10;dingdan_wt=0;}
}
}
void choujiang()
{
int choujiang_go,choujiang_go_2;
cls;
cout<<"按1-->转盘-绿 [需要$100]"<<endl;
cout<<"按2-->转盘-蓝 [需要1*绿色礼券]"<<endl;
cout<<"按3-->转盘-紫 [需要1*蓝色礼券]"<<endl;
cout<<"按4-->转盘-金 [需要1*紫色礼券]"<<endl;
cout<<"按5-->转盘-炫光 [需要1*金色礼券]"<<endl;
choujiang_go=getch();
if(choujiang_go=='1')
{
cls;
if(qian>=100)color(10)
else color(12);
cout<<"1,抽1次 [$100]"<<endl;
if(qian>=788)color(10)
else color(12);
cout<<"2,8连抽 [$788]"<<endl;
color(15);
choujiang_go_2=getch();
if(choujiang_go_2=='1'&&qian>=100)
{
qian-=100;
int i=rand()%6;
if(i==0)say("获得小麦*51",10),xiaomai+=51;
if(i==1)say("获得硬化钢*1",10),yinhuagang+=1;
if(i==2)say("获得钛合金*2",10),taihejin+=2;
if(i==3)say("获得纳米材料*3",10),namicailiao+=3;
if(i==4)say("获得螺钉*3",10),luodin+=3;
if(i==5)say("获得木板*3",10),muban+=3;
Sleep(880);
}
if(choujiang_go_2=='2'&&qian>=788)
{
qian-=788;
for(int k=1;k<=8;k++)
{
int i=rand()%4;
if(i==0)say("获得小麦*51",10),xiaomai+=51;
if(i==1)say("获得硬化钢*1",10),yinhuagang+=1;
if(i==2)say("获得钛合金*2",10),taihejin+=2;
if(i==3)say("获得纳米材料*3",10),namicailiao+=3;
Sleep(500);
}
}
}
if(choujiang_go=='2')
{
cls;
if(lvseliquan>=1)color(10)
else color(12);
cout<<"1,抽1次 [绿色礼券*1]"<<endl;
if(lvseliquan>=7)color(10)
else color(12);
cout<<"2,8连抽 [绿色礼券*7]"<<endl;
color(15);
choujiang_go_2=getch();
if(choujiang_go_2=='1'&&lvseliquan>=1)
{
lvseliquan-=1;
int i=rand()%4;
if(i==0)cout<<"获得小麦*51"<<endl,xiaomai+=51;
if(i==1)cout<<"获得硬化钢*1"<<endl,yinhuagang+=1;
if(i==2)cout<<"获得钛合金*2"<<endl,taihejin+=2;
if(i==3)cout<<"获得纳米材料*3"<<endl,namicailiao+=3;
Sleep(880);
}
if(choujiang_go_2=='2'&&lvseliquan>=7)
{
lvseliquan-=7;
for(int k=1;k<=8;k++)
{
int i=rand()%4;
if(i==0)cout<<"获得炸药*5"<<endl,zhayao+=5;
if(i==1)cout<<"获得硬化钢*1"<<endl,yinhuagang+=1;
if(i==2)cout<<"获得钛合金*2"<<endl,taihejin+=2;
if(i==3)cout<<"获得纳米材料*3"<<endl,namicailiao+=3;
Sleep(500);
}
}
}
if(choujiang_go=='3')
{
cls;
if(lanseliquan>=1)color(10)
else color(12);
cout<<"1,抽1次 [蓝色礼券*1]"<<endl;
if(lanseliquan>=7)color(10)
else color(12);
cout<<"2,8连抽 [蓝色礼券*7]"<<endl;
color(15);
choujiang_go_2=getch();
if(choujiang_go_2=='1'&&lanseliquan>=1)
{
lanseliquan-=1;
int i=rand()%5;
if(i==0)cout<<"获得小麦*51"<<endl,xiaomai+=51;
if(i==1)cout<<"获得硬化钢*1"<<endl,yinhuagang+=1;
if(i==2)cout<<"获得线圈*30"<<endl,xianquan+=30;
if(i==3)cout<<"获得航天器外壳*1"<<endl,hangtianqiwaike+=1;
if(i==4)cout<<"获得鲤鱼*3"<<endl,liyu+=3;
Sleep(880);
}
if(choujiang_go_2=='2'&&lanseliquan>=7)
{
lanseliquan-=7;
for(int k=1;k<=8;k++)
{
lanseliquan-=1;
int i=rand()%5;
if(i==0)cout<<"获得小麦*51"<<endl,xiaomai+=51;
if(i==1)cout<<"获得硬化钢*1"<<endl,yinhuagang+=1;
if(i==2)cout<<"获得线圈*30"<<endl,xianquan+=30;
if(i==3)cout<<"获得航天器外壳*1"<<endl,hangtianqiwaike+=1;
if(i==4)cout<<"获得鲤鱼*3"<<endl,liyu+=3;
Sleep(880);
}
}
}
if(choujiang_go=='4')
{
cls;
if(ziseliquan>=1)color(10)
else color(12);
cout<<"1,抽1次 [紫色礼券*1]"<<endl;
if(ziseliquan>=7)color(10)
else color(12);
cout<<"2,8连抽 [紫色礼券*7]"<<endl;
color(15);
choujiang_go_2=getch();
if(choujiang_go_2=='1'&&ziseliquan>=1)
{
ziseliquan-=1;
int i=rand()%4;
if(i==0)cout<<"获得小麦*105"<<endl,xiaomai+=105;
if(i==1)cout<<"获得硬化钢*10"<<endl,yinhuagang+=10;
if(i==2)cout<<"获得钱$2500"<<endl,qian+=2500;
if(i==3)cout<<"获得绿色礼券*1"<<endl,lvseliquan+=1;
Sleep(880);
}
if(choujiang_go_2=='2'&&ziseliquan>=7)
{
ziseliquan-=7;
for(int k=1;k<=8;k++)
{
int i=rand()%4;
if(i==0)cout<<"获得钱$3000"<<endl,qian+=3000;
if(i==1)cout<<"获得硬化钢*5"<<endl,yinhuagang+=5;
if(i==2)cout<<"获得超导线圈*15"<<endl,chaodaoxianquan+=15;
if(i==3)cout<<"获得纳米材料*40"<<endl,namicailiao+=40;
Sleep(500);
}
}
}
if(choujiang_go=='5')
{
cls;
if(jinseliquan>=1)color(10)
else color(12);
cout<<"1,抽1次 [金色礼券*1]"<<endl;
if(jinseliquan>=7)color(10)
else color(12);
cout<<"2,8连抽 [金色礼券*7]"<<endl;
color(15);
choujiang_go_2=getch();
if(choujiang_go_2=='1'&&jinseliquan>=1)
{
jinseliquan-=1;
int i=rand()%4;
if(i==0)cout<<"获得钱$15000"<<endl,qian+=15000;
if(i==1)cout<<"获得精铁*100"<<endl,jingtie+=100;
if(i==2)cout<<"获得炸药*20"<<endl,zhayao+=20;
if(i==3)cout<<"获得紫色礼券*1"<<endl,ziseliquan+=1;
Sleep(880);
}
if(choujiang_go_2=='2'&&jinseliquan>=7)
{
jinseliquan-=7;
for(int k=1;k<=8;k++)
{
int i=rand()%4;
if(i==0)cout<<"获得质子M号火箭*1"<<endl,zhiziMhaohuojian+=1;
if(i==1)cout<<"获得蓝色礼券*1"<<endl,lvseliquan+=1;
if(i==2)cout<<"获得紫色礼券*1"<<endl,ziseliquan+=1;
if(i==3)cout<<"获得福特GT*1"<<endl,futeGT+=1;
Sleep(500);
}
}
}
}
void show()
{
system("cls");
color(15);
name_3();
cout<<yue<<"月份"<<endl;
if(shimin>guidingshimin)cout<<"市民太多,小镇装不下了!"<<endl,shimin=guidingshimin;
if(yue==11)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13),cout<<"优惠物品购买季!"<<endl;
if(yue==6||yue==7)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13),cout<<"夏季德比竞赛!"<<endl;
if(yue==3)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),13),cout<<"礼券消费节!"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
cout<<"等级:"<<dengji<<" ";
cout<<"还需"<<(dengji*5)-jingyan<<"经验就可升级!"<<endl;
color(6);
cout<<"$[金钱]:"<<qian<<endl;
color(12);
cout<<"%[血量]:"<<shengming<<endl;
color(11);
cout<<"@[威望]:"<<weiwang<<endl;
color(10);
cout<<"#[市民]:"<<shimin<<"/"<<guidingshimin<<endl;
color(13);
cout<<"&[小镇魅力]:"<<xiaozhenmeili<<endl;
if(dingdan_wt==1){color(95);printf("你接到了一份订单![按s查看]\n");}
if(weishi==false&&(ji!=0||niu!=0||mianyang!=0||zhu!=0))
{
color(276);
printf("你需要给动物们喂食了![路径:生产-->养殖-->喂食]\n");
}
color(14);
cout<<"绿色礼券:"<<lvseliquan<<" 蓝色礼券:"<<lanseliquan<<" 紫色礼券:"<<ziseliquan<<" 金色礼券:"<<jinseliquan<<endl;
color(791);
printf("0,存档(没事按按)");
if(zidongcundang==1){color(10);printf("自动存档功能已打开\n");}
else {color(12);printf("自动存档功能已关闭[按k打开]\n");}
color(14);
cout<<"按1-->商店 [购买各种物品]"<<endl;
color(10);
cout<<"按2-->物品栏 [查看物品]"<<endl;
color(14);
cout<<"按3-->小镇管理 [市民驱逐,房屋拆迁,小镇改名]"<<endl;
color(10);
cout<<"按4-->物品合成 [合成物品]"<<endl;
color(14);
cout<<"按5-->家园 [保卫,升级!]"<<endl;
color(10);
cout<<"按6-->生产 [挖矿,种地,养殖]"<<endl;
color(14);
cout<<"按7-->与市民互动[抽奖,收税,招工,邀请市民]"<<endl;
color(10);
cout<<"按8-->查看订单 [赚钱]"<<endl;
color(14);
cout<<"按9-->趣味玩法 [航天计划,打外星人,机甲建设,航运订单]"<<endl;
color(6);
cout<<"/按y进入赛季\\"<<endl;
color(14);
cout<<"q,市民性别 按w抽奖"<<endl;
color(13);
if(yue==11)cout<<"%%%===---按a购买优惠物品---===%%%"<<endl;
if(yue==6||yue==7)cout<<"^@^@^ 按a进行德比竞赛 ^@^@^"<<endl;
if(yue==3)cout<<"//按a进入礼券消费节\\\\"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
go=getch();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
if(go=='k')zidongcundang=1;
if(zidongcundang==1)swcd();
if(go=='0')swcd();;
if(go=='1')shop();
if(go=='2')wupinglan();
if(go=='3')xiaozhenguanli();
if(go=='4')hecheng();
if(go=='5')xiaozhenzhoubian();
if(go=='6')shengchan();
if(go=='7')hudong();
if(go=='8')dingdan();
if(go=='9')sheshicaozuo();
if(go=='q')xingbie();
if(go=='y')saiji();
if(go=='w')choujiang();
if(go=='s'&&dingdan_wt==1)_DD();
if(go=='g')
{
cout<<"请输入密码:"<<endl;
int ypp;
cin>>ypp;
if(ypp==657843902)
{
for (int ig = 1;ig <= 141;ig++)
{
c[ig]=9999999;
}
}
}
if(go=='a'&&yue==11)youhui();
if((go=='a'&&yue==6)||(go=='a'&&yue==7))debijinsai();
if(go=='a'&&yue==3)liquanxiaofeijie();
//xiaozhenguanli();
}
void kaishi()
{
color(14);
cout<<"小";
color(13);
cout<<"镇";
color(14);
cout<<"物";
color(13);
cout<<"语";
cout<<endl;
color(10);
say("版本:1.7.2\n",5);
color(15);
say("按下'1'开始游戏\n",5);
color(15);
getch();
dqcd();
if(dengji!=0)dqcd();
if(dengji==0)
{
int name_1;
while(name_1!='1')
{
system("cls");
qian=800;weiwang=50;shimin=10;page=1;guidingshimin=30;dengji=1;guidingcaidi=10;sousuoleida=2;yue=1;
baoliudingdan_1=true;baoliudingdan_2=true;baoliudingdan_3=true;jiayuandengji=1;
jiayuandengji=1;
srand(time(0));
say("为你的小镇取个名字吧!\n",5);
say("按1确定 按2换一个\n",5);
shengming=100;
name_2=rand()%31;
say(">>",10);
name_3();
name_1=getch();
}
printf("你获得了一份新手礼包!!\n");
printf("按1打开\n");
getch();
printf("纳米材料+30\n");Sleep(500);
namicailiao+=30;
printf("铁矿+20\n");Sleep(500);
tiekuang+=20;
printf("钛+15\n");Sleep(500);
tai+=15;
printf("鸡蛋+10\n");Sleep(500);
jidan+=10;
printf("小麦+10\n");Sleep(500);
xiaomai+=10;
printf("培根+10\n");Sleep(500);
peigen+=10;
printf("饲料+15\n");Sleep(500);
siliao+=10;
printf("牛奶+20\n");Sleep(500);
niunai+=20;
printf("铅矿+25\n");Sleep(500);
qiankuang+=25;
printf("锂矿+25\n");Sleep(500);
likuang+=25;
printf("炸药+10\n");Sleep(500);
zhayao+=10;
printf("究极炸药+5\n");Sleep(500);
jiujizhayao+=5;
printf("\n");Sleep(500);
}
}
void tishi(int tishi_zhizhen)
{
if(tishi_zhizhen==0)
{
printf("别忘了存档哦!\n");
}
if(tishi_zhizhen==1)
{
printf("炸药是个好东西!它可以帮您炸矿!\n");
}
if(tishi_zhizhen==2)
{
printf("在综合商店里可以买到许多必备品,记得去逛逛!\n");
}
if(tishi_zhizhen==3)
{
printf("矿物可以在生产选项中的挖矿中获得!\n");
}
}
void jiazai()
{
srand(time(0));
int i=rand()%4;
color(10);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▏";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▎";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▍";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▋";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▊";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▏";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▎";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▍";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▌";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▋";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▊";
Sleep(50);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▏";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▎";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▍";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▌";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▋";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▊";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▏";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▎";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▍";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▌";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▋";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▋";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▊";
Sleep(20);
cls;tishi(i);
cout<<"加载中...[游戏文件较大,请耐心等待]"<<endl;
cout<<"▉▉▉▉";
Sleep(20);
cls;tishi(i);
}
int main()
{
system("title 小镇物语1.7.2 QQ:2099008248 (Made by G.idea工作室)");
kaishi();
jiazai();
while(1)
{
if(dingdan_wt==0)//订单随机数确认
{
int i=rand()%4;
dingdan_zz=i;
dingdan_wt=1;
}
shimin=shimin_nan+shimin_nv;
caidimianjipanduan();
shouhuoshijian--;
if(shouhuoshijian<=0)shouhuoshijian=0;
tian++;
if(yue<=0)yue=1;
if(tian>=60)yue++,tian=1;
if(yue>12)yue=1,tian=1;
page=1;
if(guidingfengfang>=fengfang)caimi--;
if(niunai>=80)niunaizhige=true;
if(jidan>=150)jidandaheng=true;
if(peigen>=70)peigenwang=true;
if(yangmao>=80)yangmaowangzi=true;
if(fengmi>=30)mitangguan=true;
if(hongchaye>=35)chawang=true;
if(jingyan==(dengji*5))dengji++,jingyan=0;
if(jingyan>(dengji*5))jingyan=(jingyan-(dengji*5)),dengji++;
if(caidi==true)shouhuo++;
shouhuo_3++;
if(weishi==true)shouhuo_2++;
srand(time(0));
tax+=(weiwang)/10;
system("cls");
show();
}
}
标签:10,12,V1.7,cout,color,else,物语,&&,正式版 来源: https://blog.csdn.net/weixin_46679548/article/details/113859088