include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
void x(const string c) {
size_t len = c.size();
for(int i = 0; i < c.size(); i) {
cout << c[i];
usleep(30000);
}
}
void color(int a) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int shengmingli=10;
int gongjili=1;
int fangyuli=0;
int M=100;
int beibao[20];
int shuliang[20];
int n;
int main() {
color(10);
system(“cls”);
x(“书”);
sleep(1);
x(“涵”);
sleep(1);
x(“小”);
sleep(1);
x(“游”);
sleep(1);
x(“戏”);
sleep(1);
x(“工”);
sleep(1);
x(“作”);
sleep(1);
x(“室”);
sleep(1);
x(“出”);
sleep(1);
x(“品”);
sleep(1);
system(“cls”);
sleep(1);
color(6);
x(“此为幻像工作室所编的游戏:《生存日记》,请大家多点赞,多评论。”);
cout<[HTML_REMOVED]>kaishi;
if(kaishi!=1) {
x(“指令错误,请检查输入是否正确”);
cout<<endl;
return 0;
}
x(“游戏加载中”);
for(int i=1; i<=5; i) {
x(“.”);
sleep(1);
}
system(“cls”);
int a;
srand((unsigned)time(NULL));
a=1+rand()%6;
for(int i=1; i<=4; i++) {
x("游戏已加载至");
cout<<i*25<<"%";
cout<<endl;
sleep(1);
srand((unsigned)time(NULL));
a=1+rand()%10;
if(a==1) {
x("在与村民交易时有几率获得武器包。");
}
if(a==2) {
x("在与四天王作战时最好准备一把时之剑。");
}
if(a==3) {
x("想致富,先撸树。");
}
if(a==4) {
x("时刻保持一颗善良的心。");
}
if(a==5) {
x("迷雾出品,必属精品。");
}
if(a==6) {
x("真得有人会看这些吗?");
}
if(a==7) {
x("击杀怪物可以获得丰厚的奖励!");
cout<<endl;
}
if(a==8) {
x("可以在更多内容中签到以及抽奖,不要错过。");
cout<<endl;
}
if(a==9) {
x("在20级以后可以解锁探险模式。");
cout<<endl;
}
if(a==10) {
x("要开启四天王遗迹需要火、冰、土、暗四种钥匙。");
cout<<endl;
}
sleep(3);
system("cls");
}
x("加载成功!!!");
cout<<endl;
system("pause");
system("cls");
string zh,mm,ID;
x("请输入账号:");
cin>>zh;
cout<<endl;
x("请输入密码:");
cin>>mm;
cout<<endl;
x("请输入ID:");
cin>>ID;
cout<<endl;
x("登陆成功!!!");
cout<<endl;
system("cls");
x("请输入你要选择的难度(1.简单 2.普通 3.困难 4.传奇)");
int nd3;
cin>>nd3;
if(nd3==1) {
n=80;
}
if(nd3==2) {
n=70;
}
if(nd3==3) {
n=40;
}
if(nd3==4) {
n=20;
}
for(int i=1; i<=n; i++) {
int jiemian;
x("玩家:");
cout<<ID;
cout<<endl;
x("1.林场");
cout<<endl;
x("2.矿洞");
cout<<endl;
x("3.村庄集市");
cout<<endl;
x("4.去打小怪物");
cout<<endl;
x("5.去打四天王");
cout<<endl;
x("6.更多内容");
cout<<endl;
x("7.个人中心");
cout<<endl;
x("8.探险模式");
cout<<endl;
x("9.考古模式");
cout<<endl;
x("10.家园模式");
cout<<endl;
x("11.显示你的状态");
cout<<endl;
x("12.退出游戏");
cout<<endl;
cin>>jiemian;
if(jiemian==1) {
x("欢迎来到林场!!!");
cout<<endl;
x("请问你打算砍几棵树?(提示:一棵树有5个木块)");
cout<<endl;
int sm,kw;
cin>>sm;
x("预计");
cout<<sm*10;
x("秒完成");
cout<<endl;
for(int i=sm*10; i>=1; i--) {
cout<<i;
sleep(1);
system("cls");
}
x("你获得了");
cout<<sm*5;
x("个木头");
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kw=i;
break;
}
}
beibao[kw]=35;
shuliang[kw]=sm*5;
}
if(jiemian==2) {
x("欢迎来到矿洞!!!");
cout<<endl;
x("请问你打算挖什么矿?(1.煤炭 2.石头 3.铁矿 4.铜矿)");
cout<<endl;
int kd,ke,tk,kl,kr;
cin>>kd;
x("请问你要挖几个?");
cout<<endl;
cin>>kl;
if(kd==1) {
tk=5*kl;
}
if(kd==2) {
tk=2*kl;
}
if(kd==3) {
tk=15*kl;
}
if(kd==4) {
tk=30*kl;
}
x("预计");
cout<<tk;
x("秒完成");
cout<<endl;
for(int i=tk; i>=1; i--) {
cout<<i;
sleep(1);
system("cls");
}
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kr=i;
break;
}
}
if(kd==1) {
beibao[kr]=50;
}
if(kd==2) {
beibao[kr]=36;
}
if(kd==3) {
beibao[kr]=52;
}
if(kd==4) {
beibao[kr]=37;
}
shuliang[kr]=kl;
}
if(jiemian==8||jiemian==9) {
x("未开放");
cout<<endl;
}
if(jiemian==3) {
x("欢迎来到集市!!!输入1够买");
cout<<endl;
int js;
cin>>js;
if(js==1) {
x("------------------------------------------------------");
cout<<endl;
x("村民小铺");
cout<<endl;
x("本月上新 HOT");
cout<<endl;
x("1.青铜防御套装NEW 2.治疗药水NEW");
cout<<endl;
x("食品");
cout<<endl;
x("1.面包/1M");
cout<<endl;
x("2.牛排/5M");
cout<<endl;
x("3.饺子/20M");
cout<<endl;
x("战斗用品");
cout<<endl;
x("4.石剑/6M");
cout<<endl;
x("5.铁剑/32M");
cout<<endl;
x("6.铁防御套装/360M");
cout<<endl;
x("7.青铜剑/62M");
cout<<endl;
x("8.青铜防御套装/720M");
cout<<endl;
x("道具");
cout<<endl;
x("9.治疗药水/500M");
cout<<endl;
x("工具");
cout<<endl;
x("已售空");
cout<<endl;
x("------------------------------------------------------");
cout<<endl;
x("输入0返回");
cout<<endl;
int jsgm,kj;
cin>>jsgm;
if(jsgm==1) {
if(M>=1) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=1;
shuliang[kj]=1;
M-=1;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==2) {
if(M>=5) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=2;
shuliang[kj]=1;
M-=5;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==3) {
if(M>=20) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=8;
shuliang[kj]=1;
M-=20;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==4) {
if(M>=6) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=18;
shuliang[kj]=1;
M-=18;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==5) {
if(M>=32) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=21;
shuliang[kj]=1;
M-=32;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==6) {
if(M>=360) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=24;
beibao[kj+1]=25;
beibao[kj+2]=26;
beibao[kj+3]=27;
shuliang[kj]=1;
shuliang[kj+1]=1;
shuliang[kj+2]=1;
shuliang[kj+3]=1;
M-=360;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==7) {
if(M>=62) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=28;
shuliang[kj]=1;
M-=62;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==8) {
if(M>=720) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=31;
beibao[kj+1]=32;
beibao[kj+2]=33;
beibao[kj+3]=34;
shuliang[kj]=1;
shuliang[kj+1]=1;
shuliang[kj+2]=1;
shuliang[kj+3]=1;
M-=720;
} else {
x("M币不够");
cout<<endl;
}
}
if(jsgm==9) {
if(M>=500) {
x("购买成功");
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==0) {
kj=i;
break;
}
}
beibao[kj]=45;
shuliang[kj]=1;
M-=500;
} else {
x("M币不够");
cout<<endl;
}
}
}
}
if(jiemian==4) {
x("开始生成怪物");
cout<<endl;
int gw,gx;
srand((unsigned)time(NULL));
gw=1+rand()%3;
for(int i=10; i>=1; i--) {
cout<<i;
system("cls");
}
x("怪物已生成");
cout<<"你的背包:";
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==1) {
cout<<"面包";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==2) {
cout<<"牛排";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==3) {
cout<<"炸鸡";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==4) {
cout<<"小白菜";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==5) {
cout<<"卷心菜";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==6) {
cout<<"番茄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==7) {
cout<<"土豆";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==8) {
cout<<"饺子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==9) {
cout<<"小麦";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==10) {
cout<<"面粉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==11) {
cout<<"生猪肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==12) {
cout<<"生鸡肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==13) {
cout<<"生牛肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==14) {
cout<<"白米饭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==15) {
cout<<"木剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==16) {
cout<<"木镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==17) {
cout<<"木斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==18) {
cout<<"石剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==19) {
cout<<"石镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==20) {
cout<<"石斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==21) {
cout<<"铁剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==22) {
cout<<"铁镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==23) {
cout<<"铁斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==24) {
cout<<"铁头盔";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==25) {
cout<<"铁胸甲";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==26) {
cout<<"铁护腿";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==27) {
cout<<"铁靴子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==28) {
cout<<"青铜剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==29) {
cout<<"青铜镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==30) {
cout<<"青铜斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==31) {
cout<<"青铜头盔";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==32) {
cout<<"青铜胸甲";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==33) {
cout<<"青铜护腿";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==34) {
cout<<"青铜靴子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==35) {
cout<<"木块";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==36) {
cout<<"石头";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==37) {
cout<<"铜矿石";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==38) {
cout<<"铁锭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==39) {
cout<<"铜锭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==40) {
cout<<"水稻";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==41) {
cout<<"木锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==42) {
cout<<"石锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==43) {
cout<<"铁锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==44) {
cout<<"青铜锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==45) {
cout<<"治疗药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==46) {
cout<<"剧毒药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==47) {
cout<<"能量药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==48) {
cout<<"合成台";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==49) {
cout<<"煅烧台";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==50) {
cout<<"煤炭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==51) {
cout<<"木棍";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==52) {
cout<<"铁矿石";
cout<<shuliang[i]<<"个";
cout<<endl;
}
}
x("请选择武器");
int wqbh,gjl;
cin>>wqbh;
if(beibao[wqbh]!=15&&beibao[wqbh]!=18&&beibao[wqbh]!=21&&beibao[wqbh]!=28) {
x("此物品不能打怪");
cout<<endl;
} else {
if(gw==1) {
gx=30;
}
if(gw==2) {
gx=40;
}
if(gw==3) {
gx=35;
}
if(beibao[wqbh]==15) {
gjl=3;
}
if(beibao[wqbh]==18) {
gjl=5;
}
if(beibao[wqbh]==21) {
gjl=6;
}
if(beibao[wqbh]==28) {
gjl=7;
}
x("开始打怪");
for(int i=1; i<=gx/gjl; i++) {
sleep(1);
shengmingli-=1;
}
if(shengmingli<=0) {
x("你死了");
cout<<endl;
return 0;
} else {
x("恭喜你获得了20M");
cout<<endl;
M=M+20;
}
}
}
if(jiemian==5) {
x("1.水仙");
cout<<endl;
x("2.木圣");
cout<<endl;
x("3.土帝");
cout<<endl;
x("4.火主");
cout<<endl;
int tw;
cin>>tw;
if(tw!=1) {
x("未开放");
} else {
cout<<"你的背包:";
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==1) {
cout<<"面包";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==2) {
cout<<"牛排";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==3) {
cout<<"炸鸡";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==4) {
cout<<"小白菜";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==5) {
cout<<"卷心菜";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==6) {
cout<<"番茄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==7) {
cout<<"土豆";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==8) {
cout<<"饺子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==9) {
cout<<"小麦";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==10) {
cout<<"面粉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==11) {
cout<<"生猪肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==12) {
cout<<"生鸡肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==13) {
cout<<"生牛肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==14) {
cout<<"白米饭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==15) {
cout<<"木剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==16) {
cout<<"木镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==17) {
cout<<"木斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==18) {
cout<<"石剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==19) {
cout<<"石镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==20) {
cout<<"石斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==21) {
cout<<"铁剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==22) {
cout<<"铁镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==23) {
cout<<"铁斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==24) {
cout<<"铁头盔";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==25) {
cout<<"铁胸甲";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==26) {
cout<<"铁护腿";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==27) {
cout<<"铁靴子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==28) {
cout<<"青铜剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==29) {
cout<<"青铜镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==30) {
cout<<"青铜斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==31) {
cout<<"青铜头盔";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==32) {
cout<<"青铜胸甲";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==33) {
cout<<"青铜护腿";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==34) {
cout<<"青铜靴子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==35) {
cout<<"木块";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==36) {
cout<<"石头";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==37) {
cout<<"铜矿石";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==38) {
cout<<"铁锭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==39) {
cout<<"铜锭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==40) {
cout<<"水稻";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==41) {
cout<<"木锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==42) {
cout<<"石锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==43) {
cout<<"铁锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==44) {
cout<<"青铜锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==45) {
cout<<"治疗药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==46) {
cout<<"剧毒药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==47) {
cout<<"能量药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==48) {
cout<<"合成台";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==49) {
cout<<"煅烧台";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==50) {
cout<<"煤炭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==51) {
cout<<"木棍";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==52) {
cout<<"铁矿石";
cout<<shuliang[i]<<"个";
cout<<endl;
}
}
x("请选择武器");
int wqbh1,gjl1,gx1=60;
cin>>wqbh1;
if(beibao[wqbh1]!=15&&beibao[wqbh1]!=18&&beibao[wqbh1]!=21&&beibao[wqbh1]!=28) {
x("此物品不能打怪");
cout<<endl;
} else {
if(beibao[wqbh1]==15) {
gjl1=3;
}
if(beibao[wqbh1]==18) {
gjl1=5;
}
if(beibao[wqbh1]==21) {
gjl1=6;
}
if(beibao[wqbh1]==28) {
gjl1=7;
}
x("开始攻击");
cout<<endl;
for(int i=1; i<=60/gjl1; i++) {
sleep(1);
x("水仙对你造成了1点伤害");
cout<<endl;
x("你对水仙造成了");
cout<<gjl1;
x("点伤害");
cout<<endl;
shengmingli-=1;
}
if(shengmingli<=0) {
x("你死了");
cout<<endl;
return 0;
} else {
x("你胜利了");
cout<<endl;
return 0;
}
}
}
}
if(jiemian==6) {
x("1.签到");
cout<<endl;
x("2.抽奖");
cout<<endl;
x("3.活动");
cout<<endl;
x("4.游戏攻略");
cout<<endl;
int gdxz;
cin>>gdxz;
cout<<endl;
if(gdxz==1) {
int qd;
srand((unsigned)time(NULL));
qd=1+rand()%11;
if(qd==1||qd==2||qd==3||qd==4||qd==5||qd==6||qd==7||qd==8) {
x("你获得了50M");
cout<<endl;
M=M+50;
}
if(qd==9||qd==10) {
x("你获得了100M");
cout<<endl;
M=M+100;
}
if(qd==11) {
x("你获得了500M");
cout<<endl;
M=M+500;
}
}
if(gdxz==2||gdxz==3||gdxz==4) {
x("未开放");
cout<<endl;
}
}
if(jiemian==7) {
}
if(jiemian==11) {
cout<<"你的生命力:"<<shengmingli<<endl;
cout<<"你的攻击力:"<<gongjili<<endl;
cout<<"你的防御力:"<<fangyuli<<endl;
cout<<"你拥有的钱:"<<M<<endl;
cout<<"你的背包:";
cout<<endl;
for(int i=1; i<=15; i++) {
if(beibao[i]==1) {
cout<<"面包";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==2) {
cout<<"牛排";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==3) {
cout<<"炸鸡";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==4) {
cout<<"小白菜";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==5) {
cout<<"卷心菜";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==6) {
cout<<"番茄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==7) {
cout<<"土豆";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==8) {
cout<<"饺子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==9) {
cout<<"小麦";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==10) {
cout<<"面粉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==11) {
cout<<"生猪肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==12) {
cout<<"生鸡肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==13) {
cout<<"生牛肉";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==14) {
cout<<"白米饭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==15) {
cout<<"木剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==16) {
cout<<"木镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==17) {
cout<<"木斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==18) {
cout<<"石剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==19) {
cout<<"石镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==20) {
cout<<"石斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==21) {
cout<<"铁剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==22) {
cout<<"铁镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==23) {
cout<<"铁斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==24) {
cout<<"铁头盔";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==25) {
cout<<"铁胸甲";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==26) {
cout<<"铁护腿";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==27) {
cout<<"铁靴子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==28) {
cout<<"青铜剑";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==29) {
cout<<"青铜镐";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==30) {
cout<<"青铜斧";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==31) {
cout<<"青铜头盔";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==32) {
cout<<"青铜胸甲";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==33) {
cout<<"青铜护腿";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==34) {
cout<<"青铜靴子";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==35) {
cout<<"木块";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==36) {
cout<<"石头";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==37) {
cout<<"铜矿石";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==38) {
cout<<"铁锭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==39) {
cout<<"铜锭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==40) {
cout<<"水稻";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==41) {
cout<<"木锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==42) {
cout<<"石锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==43) {
cout<<"铁锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==44) {
cout<<"青铜锄";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==45) {
cout<<"治疗药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==46) {
cout<<"剧毒药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==47) {
cout<<"能量药水";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==48) {
cout<<"合成台";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==49) {
cout<<"煅烧台";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==50) {
cout<<"煤炭";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==51) {
cout<<"木棍";
cout<<shuliang[i]<<"个";
cout<<endl;
}
if(beibao[i]==52) {
cout<<"铁矿石";
cout<<shuliang[i]<<"个";
cout<<endl;
}
}
}
cout<<endl;
system("pause");
cout<<endl;
system("cls");
}
}
希展丰?使Md。
希展丰?使Md。
这个代码前面的一些部分没用代码框,格式有点炸了,能修复一下吗?