0
已解决
#include<iostream>
#include<windows.h>
#include<time.h>
using namespace std;
int g = 150, x = 300, f = 10, kj = 0, chuan = 0;
int xue = 300, ff = f;
int bag[41];
int zhandou(int g1, int x1, int f1, int q, int shan, int fang, string boss) {
int k = 0;
x = xue;
ff = f;
while (1) {
int cc = g - f1;
if (cc <= 0)cc = 0;
x1 -= cc;
cout<<"你向"<<boss<<"攻击,"<<boss<<"扣了"<<cc<<"滴血,还剩"<<x1<<"滴血"<<endl;
if (x1 <= 0) {
k++;
break;
}
Sleep(1000);
if(rand() % fang){cout<<boss<<"十分恼怒,防御+"<<q; f1 += q;}
else{ cout<<boss<<"气势低沉,防御-"<<q<<endl; f1 -= q;}
Sleep(1000);
cout<<boss<<"向你扑来"<<endl;
Sleep(1000);
int ccc = g1 - f;
if (ccc < 0)ccc = 0;
x -= ccc;
cout<<boss<<"向你发动攻击,你扣了"<<ccc<<"滴血,还剩"<<x<<"滴血"<<endl;
if (x <= 0) {
cout<<"你已**亡!"<<endl;
Sleep(1000);
break;
}
Sleep(1000);
if (rand() % 2){cout<<"你十分恼怒,防御+"<<q; f += q;}
else {cout<<"你气势低沉,防御-"<<q; f -= q;}
Sleep(1000);
}
f = ff;
return k;
}
int main() { // 此行代码不可删除,创建一个命令行窗口
char s[20];
int vip, a, b, c, d, e, u, v, w, x, y, z, wuqi = 0, key = 0, sys = 0, yhk = 0, kc = 0, slb = 0;
int exp = 0, money = 300, lv = 1, lv1 = 1;
for (int i = 1; i <= 40; i++)
bag[i] = 0;
int xie = 0, chuan = 0, xz[21];
for (int i = 0; i <= 20; i++)
xz[i] = 0;
cout<<"罪";
Sleep(500);
cout<<"恶";
Sleep(500);
cout<<"之";
Sleep(500);
cout<<"城"<<endl;
Sleep(500);
Sleep(1000);
cout<<"在2020年,芝*歌(S城)……"<<endl;
Sleep(1000);
cout<<"这是一座充满罪恶的工业城市…………"<<endl;
Sleep(1000);
cout<<"某一天……"<<endl;
Sleep(2000);
cout<<"警察A:这都快半年了,S城一直平安无事,你说我们俩在这里天天转悠,够无聊的。"<<endl;
Sleep(1000);
cout<<"警察B:哎,咋们也是为了混口饭吃,不容易啊!"<<endl;
Sleep(1000);
cout<<"警察A:算了,巡逻巡逻吧。"<<endl;
Sleep(1000);
cout<<"突然,**一声巨响,两名警察应声倒地"<<endl;
Sleep(1000);
cout<<"烟雾中,你出现了~"<<endl;
Sleep(1000);
cout<<"请输入你的名字:";
cin >> s;
cout<<"确认名字:你的名字是"<<s<<endl;
Sleep(1000);
cout<<"下面正式开始游戏"<<endl;
Sleep(1000);
cout<<"你,"<<s<<"是一名S城万千歹徒中的普通一员(S市真乱...),然而,你想干出一番大事业。"<<endl;
Sleep(1000);
Sleep(1000);
Sleep(1000);
goto a1;
a1: {
while (exp > 500) {
exp -= 500;
lv += 1;
}
if (lv - lv1 == 1) {
cout<<"你升级了!"<<endl;
xue += 100;
g += 50;
f += 20;
lv1++;
}
if (lv > lv1 && lv - lv1 != 1) {
int eeeee = lv - lv1;
cout<<"你连升了";
cout << eeeee;
cout<<"级!"<<endl;
xue += 100 * eeeee;
g += 50 * eeeee;
f += 20 * eeeee;
lv1 += eeeee;
}
cout<<"现在你要去哪里"<<endl;
cout<<"1.奥黑尔大街 2.密歇根商店 3.北城矿场 4.五大湖实验室 5.伊利诺伊州警察局 6.西尔斯银行 7.查看背包 8.试炼场 9.黑市 10.开启VIP 11.饭店 12.抽奖机"<<endl;
cin >> a;
}
if (a == 1) {
int dajie;
srand((unsigned)time(NULL));
dajie = rand() % 10;
if (dajie >= 0 && dajie <= 4) {
cout<<"大街上走来了一个路人"<<endl;
Sleep(1000);
cout<<"是否打他? 1.是 2.否"<<endl;
cin >> b;
if (b == 1) {
if (zhandou(100, 350, 0, 10, 1, 2, "路人")) {
int luren;
luren = rand() % 10;
cout<<"胜利!"<<endl;
Sleep(1000);
cout<<"获得50金币,30经验"<<endl;
money += 50;
exp += 30;
if (luren >= 0 && luren <= 4) {
cout<<"恭喜获得:小瓶攻击药水*1"<<endl;
bag[1]++;
}
else {
cout<<"没有获得物品"<<endl;
}
}
}
goto a1;
}
if (dajie > 4 && dajie <= 6) {
cout<<"大街上过来了一名警察"<<endl;
Sleep(1000);
cout<<"是否攻击?1.是 2.否"<<endl;
cin >> b;
if (b == 1) {
if (zhandou(200, 700, 50, 5, 1, 2, "警察")) {
int police;
police = rand() % 10;
cout<<"胜利!"<<endl;
Sleep(1000);
cout<<"获得100金币,80经验"<<endl;
money += 100;
exp += 80;
if (police >= 0 && police <= 3) {
cout<<"恭喜获得:中瓶攻击药水*1"<<endl;
bag[2]++;
}
if (police > 3 && police <= 6) {
cout<<"恭喜获得:长刀*1"<<endl;
bag[7]++;
}
else cout<<"没有获得任何物品"<<endl;
goto a1;
}
}
goto a1;
}
if (dajie > 6 && dajie <= 8) {
cout<<"安全。"<<endl;
goto a1;
}
if (dajie == 9) {
cout<<"大街上来了一辆装甲车"<<endl;
Sleep(1000);
cout<<"是否攻击?1.是 2.否"<<endl;
cin >> b;
if (b == 1) {
if (zhandou(850, 3000, 660, 0, 1, 2, "装甲车")) {
cout<<"你胜利了!"<<endl;
Sleep(1000);
cout<<"获得600金币,500经验!!!"<<endl;
money += 600;
exp += 500;
Sleep(1000);
cout<<"你有资格驾驶这辆装甲车!"<<endl;
bag[13]++;
}
}
goto a1;
}
}
if (a == 2) {
cout<<"黑店老板:你要做甚么? 1.购买 2.**"<<endl;
cin >> c;
if (c == 1) {
int shangdian[16];
for (int aaaaa = 1; aaaaa <= 15; aaaaa++)
shangdian[aaaaa] = 0;
cout<<"黑店老板:你要买啥类?"<<endl;
Sleep(1000);
cout<<"1.长刀 200¥"<<endl;
cout<<"2.青龙偃月刀 666¥"<<endl;
cout<<"3.开启实验室的钥匙 500¥"<<endl;
cout<<"4.银行卡(别想了,里面没钱) 300¥"<<endl;
cout<<"5.手枪 800¥"<<endl;
cout<<"6.机关枪 1000¥"<<endl;
cout<<"7.98K 1999¥"<<endl;
cout<<"8.熔炼炉 650¥"<<endl;
cout<<"9.树皮/木头/白纸/碳(随机) 100¥"<<endl;
cout<<"10.黑市入场券 100¥"<<endl;
cout<<"11.挖矿镐 150¥"<<endl;
cout<<"12.黑市终身贵宾卡 9999¥"<<endl;
cout<<"13.等离子大炮 2000¥"<<endl;
cout<<"14. 高级装甲车升级道具 999999¥"<<endl;
cout<<"15.退出"<<endl;
cin >> b;
shangdian[b] = 1;
cout<<"黑店老板:你要买几个?"<<endl;
cin >> kj;
int sdm = 0, j;
for (int i = 1; i <= 14; i++) {
if (b == 1) {
sdm = 200;
j = 1;
}
if (b == 2) {
sdm = 666;
j = 8;
}
if (b == 3) {
sdm = 500;
j = 0;
}
if (b == 4) {
sdm = 300;
j = -1;
}
if (b == 5) {
sdm = 800;
j = 9;
}
if (b == 6) {
sdm = 1000;
j = 10;
}
if (b == 7) {
sdm = 1999;
j = 11;
}
if (b == 8) {
sdm = 650;
j = 20;
}
if (b == 9) {
sdm = 100;
j = -2;
}
if (b == 10) {
sdm = 100;
j = 21;
}
if (b == 11) {
sdm = 150;
j = 31;
}
if (b == 12) {
sdm = 9999;
j = 22;
};
if (b == 13) {
sdm = 2000;
j = 12;
}
if (b == 14) {
sdm = 999999;
j = -3;
}
if (shangdian[i] == 1){
if (money < sdm * kj)
cout<<"黑店老板:钱都没有?来人,打出去!"<<endl;
else {
cout<<"购买成功!"<<endl;
if (j != -3 && j != 0 && j != -1 && j != -2) {
bag[j] = 1;
money -= sdm * kj;
}
else {
if (j == 0){
if (money < sdm * kj)
cout<<"黑店老板:钱都没有?来人,打出去!"<<endl;
else {
cout<<"购买成功!"<<endl;
sys = 1;
money -= sdm * kj;
}
}
if (j == -1){
if (money < sdm * kj)
cout<<"黑店老板:钱都没有?来人,打出去!"<<endl;
else {
cout<<"购买成功!"<<endl;
yhk = 1;
money -= sdm * kj;
}
}
if (j == -2){
if (money < sdm * kj)
cout<<"黑店老板:钱都没有?来人,打出去!"<<endl;
else {
cout<<"购买成功!"<<endl;
{ {
if (money < 100 * kj)cout<<"黑店老板:钱都没有?来人,打出去!"<<endl;
else {
cout<<"购买成功!"<<endl;
money -= 100 * kj;
int dian;
for (int ss = 1; ss <= kj; ss++) {
dian = rand() % 15;
if (dian <= 4) {
cout<<"获得树皮"<<endl;
bag[16]++;
}
if (dian > 4 && dian <= 7) {
cout<<"获得木头"<<endl;
bag[17]++;
}
if (dian > 7 && dian <= 11) {
cout<<"获得白纸"<<endl;
bag[18]++;
}
if (dian > 11) {
cout<<"获得碳"<<endl;
bag[19]++;
}
}
}
}
}
}
}
if (j == -3){
if (money < sdm * kj && bag[13] < kj)
cout<<"黑店老板:钱(车)都没有?来人,打出去!"<<endl;
else {
cout<<"购买成功!"<<endl;
bag[14] += kj;
money -= sdm * kj;
bag[13] -= kj;
}
}
}
}
}
}
for (int aaaaa = 1; aaaaa <= 15; aaaaa++)
shangdian[aaaaa] = 0;
}
if (c == 2) {
cout<<"黑店老板:来人呀!**了!"<<endl;
Sleep(1000);
cout<<"一名持枪警察冲了过来!你没有办法,只能迎战!"<<endl;
Sleep(1000);
if (zhandou(400, 700, 50, 10, 1, 2, "持枪警察")) {
cout<<"你把黑店老板狠揍了一顿,并且抢到了600金币"<<endl;
money += 600;
}
else {
cout<<"**没抢成,反倒赔了200金币!"<<endl;
money -= 200;
}
}
Sleep(1000);
goto a1;
}
if (a == 3) {
if (kc == 1) {
cout<<"欢迎来到属于你的矿场!你要做什么?"<<endl;
cout<<"1.挖矿 2.退出"<<endl;
cin >> b;
if (b == 1) {
if (bag[31] == 0)
cout<<"你没有挖矿镐!"<<endl;
if (bag[31] > 0) {
cout<<"挖矿开始!"<<endl;
Sleep(3000);
int wk;
wk = rand() % 13;
if (wk == 0 || wk == 1 || wk == 2 || wk == 3) {
cout<<"挖中青铜矿*1"<<endl;
bag[26]++;
}
if (wk == 4 || wk == 5) {
cout<<"挖中铁矿*1"<<endl;
bag[27]++;
}
if (wk == 6) {
cout<<"挖中金矿*1"<<endl;
bag[28]++;
}
if (wk == 7) {
cout<<"运气超赞,挖中钻石矿*1"<<endl;
bag[29]++;
}
if (wk == 8) {
cout<<"运气爆棚,挖中翡翠矿*1,但是由于太过坚硬,废了一把稿子"<<endl;
bag[30]++;
bag[31]--;
}
if (wk > 8) {
cout<<"运气太差,啥也没挖到,稿子还断了"<<endl;
bag[31]--;
}
}
}
}
if (kc == 0) {
cout<<"你进入矿场"<<endl;
cout<<"你看见许多劳工在不停地干活,而监工们却十分清闲,如果有劳工停了一下,他们还用鞭子抽打"<<endl;
cout<<"你虽是歹徒,却也看不下去了"<<endl;
cout<<s<<":";
cout<<"你们这样太过分了,**平等年代怎么还会有这种事!"<<endl;
cout<<"监工:哪里来的**,多管闲事!"<<endl;
cout<<s<<":";
cout<<"(怒)我是歹徒,不是**!"<<endl;
if (zhandou(350, 800, 100, 10, 1, 2, "矿场监工"))
cout<<"另一名监工冲了过来"<<endl;
else {
cout<<"没实力就不要**!"<<endl;
Sleep(1000);
goto a1;
}
if (zhandou(400, 900, 200, 10, 1, 2, "矿场监工"))
cout<<"监工找来了总监工"<<endl;
else {
cout<<"没实力就不要**!"<<endl;
Sleep(1000);
goto a1;
}
cout<<"总监工:竟敢扰乱矿场秩序,老子杀了你!"<<endl;
if (zhandou(600, 1200, 250, 5, 1, 2, "矿场总监工"))
cout<<"矿场主出现了!"<<endl;
else {
cout<<"没实力就不要**!"<<endl;
Sleep(1000);
goto a1;
}
cout<<"矿场主:**,你不要自寻**路!"<<endl;
cout<<s<<":";
cout<<"(暴怒)再说一遍,老子不是**!"<<endl;
if (zhandou(800, 2000, 200, 10, 1, 2, "矿场主"))
cout<<"你干掉了矿场主,所有劳工都自由了!"<<endl;
else {
cout<<"没实力就不要**!"<<endl;
Sleep(1000);
goto a1;
}
cout<<"所有劳工:感谢您救了我们,以示报答,这个矿场属于您了!"<<endl;
kc = 1;
}
Sleep(1000);
goto a1;
}
if (a == 4) {
if (sys < 1)
cout<<"你没有钥匙,进不去!"<<endl;
else {
cout<<"你要研制些甚么?"<<endl;
Sleep(1000);
cout<<"1.小瓶/中瓶/大瓶攻击药水 需要:①50¥/100¥/150¥ ②树皮*1/*2/*4"<<endl;
cout<<"2.小瓶/中瓶/大瓶增血药水 需要:①50¥/100¥/200¥ ②木头*1/*2/*3"<<endl;
cout<<"3.小瓶/中瓶/大瓶经验药水 需要 ①500¥/1000¥/2000¥ ②碳*3/*6/*9"<<endl;
cout<<"4.退出"<<endl;
if (bag[20] > 0) {
cin >> b;
if (b == 1) {
cout<<"小瓶/中瓶/大瓶?"<<endl;
cin >> c;
cout<<"你要研制几瓶?"<<endl;
cin >> kj;
if (c == 1) {
if (money < 50 * kj && bag[16] < kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 50 * kj) {
cout<<"研制成功!"<<endl;
bag[16] -= kj;
bag[1] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 50 * kj;
bag[1] += kj;
}
}
}
if (c == 2) {
if (money < 100 * kj && bag[16] < 2 * kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 100 * kj) {
cout<<"研制成功!"<<endl;
bag[16] -= 2 * kj;
bag[2] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 100 * kj;
bag[2] += kj;
}
}
}
if (c == 3) {
if (money < 150 * kj && bag[16] < 4 * kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 150 * kj) {
cout<<"研制成功!"<<endl;
bag[16] -= 4 * kj;
bag[3] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 150 * kj;
bag[3] += kj;
}
}
}
}
if (b == 2) {
cout<<"小瓶/中瓶/大瓶?"<<endl;
cin >> c;
if (c == 1) {
if (money <= 50 * kj && bag[17] < kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 50 * kj) {
cout<<"研制成功!"<<endl;
bag[17] -= kj;
bag[4] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 50 * kj;
bag[4] += kj;
}
}
}
if (c == 2) {
if (money <= 100 * kj && bag[17] < 2 * kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 100 * kj) {
cout<<"研制成功!"<<endl;
bag[17] -= 2 * kj;
bag[5] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 100 * kj;
bag[5] += kj;
}
}
}
if (c == 3) {
if (money <= 200 * kj && bag[17] < 3 * kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 200 * kj) {
cout<<"研制成功!"<<endl;
bag[17] -= 3 * kj;
bag[6] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 200 * kj;
bag[6] += kj;
}
}
}
}
if (b == 3) {
cout<<"小瓶/中瓶/大瓶?"<<endl;
cin >> c;
cout<<"你要研制几瓶?"<<endl;
cin >> kj;
if (c == 1) {
if (money <= 500 * kj && bag[19] < kj * 3)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 500 * kj) {
cout<<"研制成功!"<<endl;
bag[19] -= 3 * kj;
bag[34] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 500 * kj;
bag[34] += kj;
}
}
}
if (c == 2) {
if (money <= 1000 * kj && bag[19] < 6 * kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 1000 * kj) {
cout<<"研制成功!"<<endl;
bag[19] -= 6 * kj;
bag[35] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 1000 * kj;
bag[35] += kj;
}
}
}
if (c == 3) {
if (money <= 1500 * kj && bag[19] < 9 * kj)
cout<<"钱(或材料)不够!"<<endl;
else {
if (money < 1500 * kj) {
cout<<"研制成功!"<<endl;
bag[19] -= 9 * kj;
bag[36] += kj;
}
else {
cout<<"研制成功!"<<endl;
money -= 1500 * kj;
bag[36] += kj;
}
}
}
}
}
else cout<<"你没有炼药炉"<<endl;
}
Sleep(1000);
goto a1;
}
if (a == 5) {
cout<<"你确定要闯进去吗?不要作**! 1.确定 2.算了"<<endl;
cin >> b;
if (b == 1) {
cout<<"你走到门口,门卫拦住了你"<<endl;
if (zhandou(200, 600, 50, 5, 1, 2, "门卫"))
cout<<"战斗胜利,继续前进!"<<endl;
else {
cout<<"你都还没进门就嗝屁了~告诉过你不要作**!"<<endl;
goto a1;
}
Sleep(1000);
cout<<"你走了进去,一名拿着青龙偃月刀(从哪儿冒出来的?)的警察拦住了你"<<endl;
if (zhandou(650, 800, 80, 10, 1, 2, "警察"))
cout<<"战斗胜利,继续前进!"<<endl;
else {
cout<<"才第二关诶!你这个菜鸟水平也敢进伊利诺伊州警察局?"<<endl;
goto a1;
}
Sleep(1000);
cout<<"你继续前进,一名铁甲警察掏出手枪对准了你!"<<endl;
if (zhandou(600, 1000, 400, 15, 1, 2, "铁甲警察"))
cout<<"战斗胜利,继续前进!"<<endl;
else {
cout<<"你也不赖了,可战力还需提高!"<<endl;
goto a1;
}
Sleep(1000);
cout<<"你就要走到伊利诺伊州警察局大楼的门口了,忽然,一名凭空出现的警察掏出了98K!"<<endl;
if (zhandou(1000, 1100, 150, 10, 1, 2, "警察"))
cout<<"战斗胜利,继续前进!"<<endl;
else {
cout<<"你完蛋了,变强后再来吧!"<<endl;
goto a1;
}
Sleep(1000);
cout<<"你走到了大楼门口,伊利诺伊州警察局局长出现了!"<<endl;
cout<<"局长:大胆歹徒,竟敢闯入伊利诺伊州警察局,我要让你有去无回!"<<endl;
cout<<"伊利诺伊州警察局局长派出了一名保镖!"<<endl;
if (zhandou(900, 1800, 300, 20, 1, 2, "局长保镖"))
cout<<"局长:什么?!你赢了!走着瞧!"<<endl;
else {
cout<<"你凉了……"<<endl;
goto a1;
}
Sleep(1000);
cout<<"局长:没想到你这么难打,只好派出我的精英保镖了!"<<endl;
if (zhandou(1100, 2200, 450, 20, 1, 2, "精英保镖"))
cout<<"局长:你这么厉害?!看来只能请求支援了!"<<endl;
else {
cout<<"……你失败了,下次再来吧!"<<endl;
goto a1;
}
Sleep(1000);
cout<<"局长:呼叫上级,呼叫上级,请求支援!"<<endl;
cout<<"一辆超强装甲车开了过来~"<<endl;
cout<<"你有一次逃跑的机会,是否逃跑?1.逃跑 2.继续战斗!"<<endl;
cin >> c;
if (c == 1) {
cout<<"你溜了,作者表示很鄙视,但还是奖励你800金币,1000经验"<<endl;
money += 800;
exp += 1000;
goto a1;
}
if (zhandou(1200, 4000, 800, 0, 1, 2, "超强装甲车"))
cout<<"局长:纳尼!只能使出终极武器了!"<<endl;
else {
cout<<"NO 作 NO die!"<<endl;
goto a1;
}
Sleep(1000);
cout<<"一辆坦克说来就来了……"<<endl;
cout<<"你已无法逃跑,决一**战吧!"<<endl;
if (zhandou(2000, 7500, 1000, 0, 1, 2, "坦克"))
cout<<"局长:这……这怎么可能!"<<endl;
else {
cout<<"你被坦克轰**了~"<<endl;
goto a1;
}
Sleep(1000);
cout<<"局长:我要亲自上,干掉你这个家伙!呃啊啊啊啊啊啊啊"<<endl;
cout<<"局长进入了暴怒状态,血量暴增!"<<endl;
if (zhandou(1100, 15000, 0, 100, 1, 2, "伊利诺伊州警察局局长"))
cout<<"你把伊利诺伊州警察局局长干掉了!你占领了整个伊利诺伊州警察局!"<<endl;
else {
cout<<"唉,都最后一关了,真是遗憾!"<<endl;
goto a1;
}
Sleep(1000);
cout<<"你成功占领了伊利诺伊州警察局,任务完成,游戏成功!\n\n\n\n\n\n\n\n"<<endl;
cout<<"请不要关闭游戏,不然你会后悔的"<<endl;
Sleep(5000);
cout<<"此时……**……"<<endl;
cout<<"**部长:什么?!一个歹徒就把伊利诺伊州警察局给占了?警察局的人都干什么吃的?!"<<endl;
cout<<"**议员:部长,伊利诺伊州警察局有很多的弹药和武器,我认为现在可以发射**,炸掉警察局,也炸掉那歹徒的老巢"<<endl;
cout<<"**部长:嗯……好,就这样办!"<<endl;
cout<<"**发射**:准备发射**,准备发射**,目标:S城,伊利诺伊州警察局。倒计时开始"<<endl;
Sleep(1000);
cout<<"五 ";
Sleep(1000);
cout<<"四 ";
Sleep(1000);
cout<<"三 ";
Sleep(1000);
cout<<"二 ";
Sleep(1000);
cout<<"一"<<endl;
Sleep(1000);
cout<<"敬请期待!"<<endl;
Sleep(3000);
return 0;
}
Sleep(1000);
goto a1;
}
if (a == 6) {
cout<<"前台:你要在银行作甚么? 1.存钱 2.抢银行"<<endl;
cin >> b;
if (b == 1) {
if (yhk < 1) cout<<"你没有银行卡,存不了钱!"<<endl;
else {
cout<<"你要存多少钱?"<<endl;
cin >> c;
if (c > money)
cout<<"前台:小伙子,你没有那么多钱!"<<endl;
else {
cout<<"存钱成功!"<<endl;
Sleep(1000);
money -= c;
cout<<"等待中……"<<endl;
Sleep(10000);
int cunqian;
cunqian = rand() % 10;
if (cunqian <= 1) {
cout<<"运气不错,收获利息1.5倍!"<<endl;
c *= 1.5;
money += c;
}
if (cunqian > 1 && cunqian <= 4) {
cout<<"运气不错,收获利息1.2倍!"<<endl;
c *= 1.2;
money += c;
}
if (cunqian > 4 && cunqian <= 7) {
cout<<"很遗憾,运气不好,存的钱只剩一半了"<<endl;
c *= 0.5;
money += c;
}
if (cunqian > 7)
cout<<"很遗憾,运气不好,存的钱都打水漂了"<<endl;
}
}
}
if (b == 2) {
cout<<"前台:喂,110吗?这里有人抢银行啊!你们快来啊!"<<endl;
Sleep(1000);
cout<<"一名防弹持枪警察冲了过来!"<<endl;
Sleep(1000);
if (zhandou(900, 1500, 300, 15, 1, 2, "防弹持枪警察")) {
int qiang;
qiang = rand() % 10;
if (qiang <= 4) {
cout<<"抢银行成功了!获得1000元"<<endl;
money += 1000;
}
if (qiang > 4 && qiang <= 7) {
cout<<"抢银行成功了!获得2000元"<<endl;
money += 2000;
}
if (qiang > 7 && qiang <= 9) {
cout<<"抢银行成功了!获得3000元"<<endl;
money += 3000;
}
if (qiang > 9) {
cout<<"抢银行成功了!获得5000元"<<endl;
money += 5000;
}
}
else {
cout<<"抢银行没成功,你被警察带走了……你被关了一个月,还被罚了500金币"<<endl;
money -= 500;
cout<<"一个月后……"<<endl;
}
}
Sleep(1000);
goto a1;
}
if (a == 7) {
cout<<"1.查看属** 2.查看武器 3.查看药水 4.查看其它"<<endl;
cin >> b;
if (b == 1) {
b1:
cout<<s<<"\n";
cout<<"等级:"<<lv<<endl;
cout<<"金币:"<<money<<endl;
cout<<"经验:"<<exp<<endl;
cout<<"血量:"<<xue<<endl;
cout<<"攻击:"<<g<<endl;
cout<<"防御:"<<f<<endl;
cout<<"试炼币:"<<slb<<endl;
cout<<"请输入0退出"<<endl;
cin >> c;
if (c == 0) {
goto a1;
}
else
goto b1;
}
if (b == 2) {
b2://7.长刀 8.青龙偃月刀(乱入) 9.手枪 10.机关枪 11.98K
//12.等离子大炮 13.装甲车 14.高级装甲车 15.坦克
cout<<"7.长刀"<<bag[7]<<endl<<"8.青龙偃月刀"<<bag[8]<<endl<<"9.手枪"<<bag[9]<<endl<<"10.机关枪"<<bag[10]<<endl<<"11.98K"<<bag[11]<<endl;
cout<<"12.等离子大炮"<<bag[12]<<endl<<"13.装甲车"<<bag[13]<<endl<<"14.高级装甲车"<<bag[14]<<endl<<"15.坦克"<<bag[15]<<endl;
cout<<"输入1穿上装备,输入2卸下装备,输入0退出"<<endl;
cin >> c;
if (c == 0) {
goto a1;
}
if (c == 1) {
cout<<"请输入要穿上的装备。"<<endl;
cin >> d;
if (bag[d] == 0) {
cout<<"抱歉,你没有这件装备!"<<endl;
goto b2;
}
if (chuan == 1) {
cout<<"你已经穿上装备了!请先卸下原有装备!"<<endl;
goto b2;
}
if (bag[d] > 0 && chuan == 0) {
cout<<"装备成功!"<<endl;
chuan = 1;
wuqi = d;
if (d == 7) {
xue += 150;
g += 100;
f += 20;
xz[7] = 1;
}
if (d == 8) {
xue += 200;
g += 200;
f += 35;
xz[8] = 1;
}
if (d == 9) {
xue += 200;
g += 250;
f += 50;
xz[9] = 1;
}
if (d == 10) {
xue += 220;
g += 330;
f += 60;
xz[10] = 1;
}
if (d == 11) {
xue += 230;
g += 400;
f += 60;
xz[11] = 1;
}
if (d == 12) {
xue += 250;
g += 600;
f += 80;
xz[12] = 1;
}
if (d == 13) {
xue += 400;
g += 700;
f += 300;
xz[13] = 1;
}
if (d == 14) {
xue += 420;
g += 700;
f += 380;
xz[14] = 1;
}
if (d == 15) {
xue += 650;
g += 1000;
f += 500;
xz[15] = 1;
}
}
}
if (c == 2) {
cout<<"请输入你要卸下的装备"<<endl;
cin >> d;
if (wuqi != d) {
cout<<"你还没有穿这件装备!"<<endl;
goto b2;
}
if (wuqi == d) {
cout<<"成功卸下装备!"<<endl;
chuan = 0;
if (d == 7) {
xue -= 150;
g -= 100;
f -= 20;
xz[7] = 0;
}
if (d == 8) {
xue -= 200;
g -= 200;
f -= 35;
xz[8] = 0;
}
if (d == 9) {
xue -= 200;
g -= 250;
f -= 50;
xz[9] = 0;
}
if (d == 10) {
xue -= 220;
g -= 330;
f -= 60;
xz[10] = 0;
}
if (d == 11) {
xue -= 230;
g -= 400;
f -= 60;
xz[11] = 0;
}
if (d == 12) {
xue -= 250;
g -= 600;
f -= 80;
xz[12] = 0;
}
if (d == 13) {
xue -= 400;
g -= 700;
f -= 300;
xz[13] = 0;
}
if (d == 14) {
xue -= 420;
g -= 700;
f -= 380;
xz[14] = 0;
}
if (d == 15) {
xue -= 650;
g -= 1000;
f -= 500;
xz[15] = 0;
}
goto b2;
}
}
else goto b2;
}
if (b == 3) {
b3:
cout<<"1.小瓶攻击药水"<<bag[1]<<endl<<"2.中瓶"<<bag[2]<<endl<<"3.大瓶"<<bag[3]<<endl;
cout<<"4.小瓶增血药水"<<bag[4]<<endl<<"5.中瓶"<<bag[5]<<endl<<"6.大瓶"<<bag[6]<<endl;
cout<<"7.小瓶经验药水"<<bag[34]<<endl<<"8.中瓶"<<bag[35]<<endl<<"9.大瓶"<<bag[36]<<endl;
cout<<"输入1喝下药水,输入0退出"<<endl;
cin >> c;
if (c == 0) {
goto a1;
}
if (c == 1) {
cout<<"请输入药水序号"<<endl;
cin >> d;
cout<<"请输入要使用的数量"<<endl;
cin >> e;
if (d != 7 && d != 8 && d != 9)
if (e > bag[d] || e <= 0) {
cout<<"你没有那么多药水!"<<endl;
goto b3;
}
if (d == 7 || d == 8 || d == 9)
if (e > bag[27 + d] || e <= 0) {
cout<<"你没有那么多药水!"<<endl;
goto b3;
}
if (d != 7 && d != 8 && d != 9)
if (e <= bag[d] && e > 0) {
cout<<"成功喝下药水"<<endl;
bag[d] -= e;
if (d == 1)
g += 10 * e;
if (d == 2)
g += 20 * e;
if (d == 3)
g += 35 * e;
if (d == 4)
xue += 40 * e;
if (d == 5)
xue += 75 * e;
if (d == 6)
xue += 100 * e;
}
if (d == 7 || d == 8 || d == 9)
if (e <= bag[d + 27] && e > 0) {
bag[d + 27] -= e;
if (d == 7)
exp += 500 * e;
if (d == 8)
exp += 1000 * e;
if (d == 9)
exp += 2000 * e;
}
goto a1;
}
}
if (b == 4) {
b4:
cout<<"树皮"<<bag[16]<<endl<<"木头"<<bag[17]<<endl<<"白纸"<<bag[18]<<endl<<"碳"<<bag[19]<<endl<<"熔炼炉"<<bag[20]<<endl;
/*21.黑市入场券 22.黑市终身贵宾卡 23.黑市交易券 24.试炼券 25.抽奖券*/
cout<<"黑市入场券"<<bag[21]<<endl<<"黑市终身贵宾卡"<<bag[22]<<endl<<"试炼1.2倍经验符"<<bag[23]<<endl<<"试炼券"<<bag[24]<<endl<<"抽奖券"<<bag[25]<<endl;
/*26.青铜矿 27.铁矿 28.金矿 29.钻石矿 30.翡翠矿 31.挖矿镐*/
cout<<"青铜矿"<<bag[26]<<endl<<"铁矿"<<bag[27]<<endl<<"金矿"<<bag[28]<<endl<<"钻石矿"<<bag[29]<<endl<<"翡翠矿"<<bag[30]<<endl<<"挖矿镐"<<bag[31]<<endl;
cout<<"输入0退出"<<endl;
cin >> c;
if (c == 0) {
goto a1;
}
else goto b4;
}
Sleep(1000);
goto a1;
}
if (a == 8) {
cout<<"请选择模式,1为战斗试炼场,2为商店,3**"<<endl;
cin >> c;
if (c == 1){
if (bag[24] == 0) {
cout<<"你没有试炼券"<<endl;
Sleep(1000);
goto a1;
}
else {
cout<<"即将迎来您的对手:小猪佩奇"<<endl;
{
cout<<"试炼场上来了一只小猪佩奇"<<endl;
Sleep(1000);
cout<<"是否攻击?1.是 2.否"<<endl;
cin >> b;
if (b == 1) {
if (zhandou(250, 3000, 560, 0, 1, 2, "小猪佩奇")) {
cout<<"你胜利了!"<<endl;
Sleep(1000);
cout<<"获得500试炼币!!!"<<endl;
slb += 500;
Sleep(1000);
{
cout<<"试炼场上来了一辆火箭"<<endl;
Sleep(1000);
cout<<"是否攻击?1.是 2.否"<<endl;
cin >> b;
if (b == 1) {
if (zhandou(1550, 1, 2000, 0, 1, 2, "火箭")) {
cout<<"你胜利了!"<<endl;
Sleep(1000);
cout<<"获得2000试炼币!!!"<<endl;
slb += 2000;
Sleep(1000);
}
}
}
goto a1;
}
}
}
Sleep(1000);
goto a1;
}
}
if (c == 2) {
cout<<"商店老板:你要买啥类?"<<endl;
Sleep(1000);
cout<<"1. 坦克 23333¥"<<endl;
cout<<"2. 退出"<<endl;
cin >> b;
if (b == 1) {
cout<<"商店老板:你要买几个?"<<endl;
cin >> kj;
if (slb < 23333 * kj)
cout<<"没钱还来买东西"<<endl;
else {
cout<<"购买成功"<<endl;
bag[15] += kj;
slb -= 23333 * kj;
}
}
goto a1;
}
if (c == 3) {
cout<<"商店老板:**了,救命啊"<<endl;
cout<<"一名未来战士小跑而来,你避无可避,只能迎战"<<endl;
if (zhandou(1780, 12200, 1220, 10, 1, 2, "未来战士"))
cout<<"你干掉了未来战士,获得了2000试炼币!"<<endl;
else {
cout<<"没实力就不要**!"<<endl;
Sleep(1000);
goto a1;
}
Sleep(1000);
slb += 2000;
goto a1;
}
}
if (a == 9) {
if (bag[22] == 0) {
cout<<"黑衣人:您好,黑市是秘密地点,请问您有黑市入场券吗?"<<endl;
cout<<"1.进入(消耗黑市入场券*1) 2.算了"<<endl;
cin >> b;
if (b == 1) {
if (bag[21] == 0)
cout<<"入场券不足。"<<endl;
else {
bag[21]--;
int hs;
hs = rand() % 3;
if (hs == 0) {
cout<<"今日上架:"<<endl;
cout<<"1.500¥ 交换 300经验"<<endl;
cout<<"2.碳*2 交换 中瓶攻击药水*4"<<endl;
cout<<"3.小瓶增血药水*3 交换 金币*400"<<endl;
cin >> c;
if (c == 1) {
if (money < 500)
cout<<"钱不够!"<<endl;
else {
cout<<"交易成功,获得300经验"<<endl;
exp += 300;
money -= 500;
}
}
if (c == 2) {
if (bag[19] < 2)
cout<<"材料不足。"<<endl;
else {
cout<<"交易成功,获得中瓶攻击药水*4"<<endl;
bag[19] -= 2;
bag[2] += 4;
}
}
if (c == 3) {
if (bag[4] < 3)
cout<<"药水不足"<<endl;
else {
cout<<"交易成功,获得金币*400"<<endl;
bag[4] -= 3;
money += 400;
}
}
}
if (hs > 0)
cout<<"黑市歇业中……"<<endl;
}
}
}
if (bag[22] > 0) {
cout<<"黑衣人:啊,您有终身贵宾卡!赶快迎接!"<<endl;
cout<<s<<"";
cout<<"大摇大摆地走了进去。"<<endl;
cout<<"贵宾上架:"<<endl;
cout<<"1.金币*100 交换 抽奖券*3"<<endl;
cout<<"2.钻石矿*1 交换 金币*1000"<<endl;
cout<<"3.小瓶攻击药水*2 交换 大瓶增血药水*5"<<endl;
cin >> c;
if (c == 1) {
if (money < 100)
cout<<"金币不足!"<<endl;
else {
cout<<"交易成功,获得抽奖券*3"<<endl;
money -= 100;
bag[25] += 3;
}
}
if (c == 2) {
if (bag[29] == 0)
cout<<"钻石矿不足。"<<endl;
else {
cout<<"交易成功,获得金币*1000"<<endl;
money += 1000;
bag[29]--;
}
}
if (c == 3) {
if (bag[1] < 2)
cout<<"药水不足。"<<endl;
else {
cout<<"交易成功,获得大瓶增血药水*5"<<endl;
bag[1] -= 2;
bag[6] += 5;
}
}
}
Sleep(1000);
goto a1;
}
if (a == 10) {
if (vip != 1) {
cout<<"-----------VIP模式特权:-------------"<<endl;
cout<<" 1.超高金币 "<<endl;
cout<<" 2.超高生命值 "<<endl;
cout<<" 3.超高攻击力 "<<endl;
cout<<" 4.抽奖券*20"<<endl;
cout<<" 5.直接拥有最强武器——坦克"<<endl;
Sleep(5000);
cout<<"请输入密码:";
cin >> d;
if (d == 20140212) {
cout<<"恭喜密码正确!成功开启VIP模式!!!"<<endl;
money += 99999;
xue += 9999;
g += 999;
bag[25] += 20;
bag[15]++;
vip = 1;
Sleep(1000);
goto a1;
}
else {
cout<<"不晓得密码就别开启了,你只配玩普通模式!"<<endl;
Sleep(1000);
goto a1;
}
}
else {
cout<<"你已经是VIP了!"<<endl;
goto a1;
}
}
if (a == 11) {
cout<<"境泽:欢迎光临真香饭店,我是店长境泽。你要点什么?"<<endl;
cout<<" 真香菜单"<<endl;
cout<<"1.独家秘制招牌真香蛋炒饭 300¥"<<endl;
cout<<"2.宫保**丁 150¥"<<endl;
cout<<"3.鱼香肉丝 180¥"<<endl;
cout<<"4.番茄炒蛋 200¥"<<endl;
cout<<"0.退出"<<endl;
cin >> b;
int fd;
if (b == 1) {
if (money < 300)
cout<<"你的钱不够!"<<endl;
else {
cout<<s<<":真香!\n";
money -= 300;
Sleep(1000);
cout<<"获得150经验"<<endl;
exp += 150;
fd = rand() % 5;
if (fd == 0) {
cout<<"你元气爆棚,加血500滴,加攻击力200点,加防御力80点!"<<endl;
g += 200;
xue += 500;
f += 80;
}
if (fd == 1) {
cout<<"你感觉全身充满了力量,加攻击力200点,防御力50点!"<<endl;
g += 200;
f += 50;
}
if (fd == 2) {
cout<<"你奇迹般地获得了2张试炼券!"<<endl;
bag[24] += 2;
}
}
}
if (b == 2) {
if (money < 150)
cout<<"你的钱不够!"<<endl;
else {
cout<<s<<":味道不错!"<<endl;
money -= 150;
Sleep(1000);
cout<<"加经验80点"<<endl;
exp += 80;
fd = rand() % 3;
if (fd == 0) {
cout<<"你运气很好,获得黑市终身贵宾卡一张!"<<endl;
bag[22]++;
}
if (fd == 1) {
cout<<"你奇迹般地获得了3张抽奖券!"<<endl;
bag[25] += 3;
}
}
}
if (b == 3) {
if (money < 180)
cout<<"你的钱不够!"<<endl;
else {
cout<<s<<":太好吃了!";
money -= 180;
Sleep(1000);
cout<<"获得经验80点"<<endl;
exp += 80;
fd = rand() % 2;
if (fd == 0) {
cout<<"你从鱼香肉丝中获得了神奇的力量,血量加300滴!"<<endl;
xue += 300;
}
}
}
if (b == 4) {
if (money < 200)
cout<<"你的钱不够!"<<endl;
else {
cout<<s<<":DELICIOUS!"<<endl;
money -= 200;
Sleep(1000);
cout<<"获得经验100点"<<endl;
exp += 100;
fd = rand() % 2;
if (fd == 0) {
cout<<"你瞬间爆发出神力,加攻击力200点,防御力30点!"<<endl;
g += 200;
f += 30;
}
}
}
Sleep(1000);
goto a1;
}
if (a == 12) {
cout<<"欢迎来到抽奖机!拥有抽奖券即有机会获得以下惊喜大礼!"<<endl;
cout<<"1.试炼券*3 2.50000金币 3.试炼券*2 4.黑市入场券*3 5.2000经验"<<endl;
cout<<"6.100000金币 7.大瓶增血药水*10 8.钻石矿*5(终极大奖)"<<endl;
cout<<"1.开始抽奖(消耗抽奖券*1)2.退出"<<endl;
cin >> b;
if (b == 1) {
if (bag[25] == 0)
cout<<"抽奖券不足!"<<endl;
else {
cout<<"正在抽奖中……"<<endl;
bag[25]--;
Sleep(5000);
int cj;
cj = rand() % 11;
if (cj == 1) {
cout<<"获得试炼券*3"<<endl;
bag[24] += 3;
}
if (cj == 2) {
cout<<"获得50000金币"<<endl;
money += 50000;
}
if (cj == 3) {
cout<<"获得试炼券*2"<<endl;
bag[24] += 2;
}
if (cj == 4) {
cout<<"获得黑市入场券*3"<<endl;
bag[22] += 3;
}
if (cj == 5) {
cout<<"获得20000经验"<<endl;
exp += 20000;
}
if (cj == 6) {
cout<<"获得100000金币"<<endl;
money += 100000;
}
if (cj == 7 || cj == 8) {
cout<<"获得大瓶增血药水*10"<<endl;
bag[6] += 10;
}
if (cj == 9) {
cout<<"抽中大奖:钻石矿*5"<<endl;
bag[29] += 5;
}
}
}
Sleep(1000);
goto a1;
}
if (a > 12 || a < 1) {
cout<<"输出错误"<<endl;
goto a1;
}
return 0;
}
