这一次的小游戏的功能及代码比上一次多了整整三倍左右,并且增加了存档功能,具体玩法自己探索,附上源码:
#include<bits/stdc++.h>
#include<conio.h>
#include<time.h>
#include<windows.h>
using namespace std;
int shengming = 80, gongji = 10, jinbi = 10, smsx = 80, shanbi = 10, yunqi = 20, times = 0;
int mw = 0,tx = 0,kg = 0,wj = 1;
string s;
void slowout(char* p)
{
while (1)
{
if (*p != 0)
printf("%c", *p++);
else
break;
Sleep(5);
}
Sleep(15);
}
void Read()
{
ifstream in("10.in");
in>>gongji>>shengming>>smsx>>jinbi>>yunqi>>shanbi>>times>>mw>>tx>>kg>>wj;
in.close();
}
void Save()
{
ofstream out("10.in");
out<<gongji<<" "<<shengming<<" "<<smsx<<" "<<jinbi<<" "<<yunqi<<" "<<shanbi<<" "<<times<<" "<<mw<<" "<<tx<<" "<<kg<<" "<<wj;
out.close();
}
int main()
{
int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, q = 0,i = 0;
slowout("欢迎进入打怪小游戏, 请输入你的名字:");
cout<<endl;
cin>>s;
slowout("欢迎");
cout<<s;
slowout("来游玩打怪小游戏");
cout<<endl<<endl;
slowout("注:打败魔王后可获得海量好玩的游戏");
cout<<endl<<endl;
Read();
for (int i = 0; i < 1; i--){
// cout << "1.购买装备和恢复生命。" << endl;
// cout << "2.打怪专区。" << endl;
// cout << "3.个人信息。" << endl;
// cout << "4.开心扭蛋。" << endl;
// cout << "5.VVIP入口。" << endl;
// cout << "6.海量游戏。(打败魔王后解锁)"<<endl;
// cout << "7.矿场。" << endl;
// cout << "8.对话。" << endl;
// cout << "9.无尽模式。" << endl;
// cout << "10.图鉴。" << endl;
// cout << "11.公告。" << endl;
slowout("1.购买装备和恢复生命。\n");
slowout("2.打怪专区。\n");
slowout("3.个人信息。\n");
slowout("4.开心扭蛋。\n");
slowout("5.VVIP入口。\n");
slowout("6.海量游戏。(打败魔王后解锁)\n");
slowout("7.矿场。\n");
slowout("8.对话。\n");
slowout("9.无尽模式。\n");
slowout("10.图鉴。\n");
slowout("11.公告。\n");
slowout("12.存档。\n");
cout << "0.退出游戏。" << endl << "输入:"<<endl<<endl;
cin >> a;
if (a == 1){
while (1){
cout << endl
<< "你的信息:(生命" << shengming << "),(攻击" << gongji << "),(金币" << jinbi << "),(幸运值" <<yunqi<<")"<< endl;
cout << "1.武器 金币>=10" << endl;
cout << "2.生命 10金币+满" << endl;
cout << "3.生命上限 金币>=40" << endl;
cout << "4.闪避 金币>=15" << endl;
cout << "5.运气值 金币>=5" <<endl;
cout << "0.退出。" << endl
<< "输入:";
cin >> b;
if (b == 1 && jinbi >= 10){
while (1){
cout << endl
<< "1.木剑——10金币+7" << endl;
cout << "2.石剑——50金币+30" << endl;
cout << "3.铁剑——200金币+120" << endl;
cout << "4.钻石剑——1000金币+600" << endl;
cout << "0.退出。" << endl
<< "输入:";
cin >> c;
if (c == 1 && jinbi >= 10){
gongji += 7;
jinbi -= 10;
cout << "攻击:" << gongji - 7 << "+7=" << gongji << endl;
}
else if (c == 2 && jinbi >= 50){
gongji += 30;
jinbi -= 50;
cout << "攻击:" << gongji - 30 << "+30=" << gongji << endl;
}
else if (c == 3 && jinbi >= 200){
gongji += 120;
jinbi -= 200;
cout << "攻击:" << gongji - 120 << "+120=" << gongji << endl;
}
else if (c == 4 && jinbi >= 1000){
gongji += 600;
jinbi -= 1000;
cout << "攻击:" << gongji - 600 << "+600=" << gongji << endl;
}
else if (c == 0){
break;
}
else if (c > 3){
cout << "没有这个按键。" << endl;
}
else{
cout << "金币不够。" << endl
<< endl;
}
}
}
else if (b == 2 && jinbi >= 10){
shengming = smsx;
jinbi -= 10;
cout << "生命=" << smsx << endl;
}
else if (b == 3 && jinbi >= 40){
while (1){
cout << endl
<< "1.一级生命上限——40金币+30" << endl;
cout << "2.二级生命上限——100金币+60" << endl;
cout << "3.三级生命上限——400金币+200" << endl;
cout << "4.四级生命上限——2000金币+1000" << endl;
cout << "5.五级生命上限——6000金币+5000" << endl;
cout << "6.六级生命上限——10000金币+10000"<<endl;
cout << "0.退出。" << endl
<< "输入:";
cin >> c;
if (c == 1 && jinbi >= 40){
smsx += 30;
shengming += 30;
jinbi -= 40;
cout << "生命上限:" << smsx - 30 << "+30=" << smsx << endl;
}
else if (c == 2 && jinbi >= 100){
smsx += 60;
shengming += 60;
jinbi -= 100;
cout << "生命上限:" << smsx - 60 << "+60=" << smsx << endl;
}
else if (c == 3 && jinbi >= 400){
smsx += 200;
shengming += 200;
jinbi -= 400;
cout << "生命上限:" << smsx - 200 << "+200=" << smsx << endl;
}
else if (c == 4 && jinbi >= 2000){
smsx += 1000;
shengming += 1000;
jinbi -= 2000;
cout << "生命上限:" << smsx - 1000 << "+1000=" << smsx << endl;
}
else if (c == 5 && jinbi >= 6000){
smsx += 5000;
shengming += 5000;
jinbi -= 6000;
cout << "生命上限:" << smsx - 5000 << "+5000=" << smsx << endl;
}
else if (c == 6 && jinbi >= 10000){
smsx += 10000;
shengming += 10000;
jinbi -= 10000;
cout << "生命上限:" << smsx - 10000 << "+10000=" << smsx << endl;
}
else if (c == 0)
{
break;
}
else
{
cout << "金币不够。" << endl
<< endl;
}
}
}
else if (b == 4 && jinbi >= 15)
{
while (1)
{
cout << endl
<< "1.一级闪避——15金币+1" << endl;
cout << "2.二级闪避——150金币+10" << endl;
cout << "3.三级闪避——300金币+20" << endl;
cout << "4.四级闪避——1500金币+100" << endl;
cout << "0.退出。" << endl
<< "输入:";
cin >> c;
if (c == 1 && jinbi >= 15){
shanbi += 1;
jinbi -= 15;
cout << "闪避次数:" << shanbi - 1 << "+1=" << shanbi << endl;
}
else if (c == 2 && jinbi >= 100){
shanbi += 10;
jinbi -= 150;
cout << "闪避次数:" << shanbi - 10 << "+10=" << shanbi << endl;
}
else if (c == 3 && jinbi >= 400)
{
shanbi += 20;
jinbi -= 300;
cout << "闪避次数:" << shanbi - 20 << "+20=" << shanbi << endl;
}
else if (c == 4 && jinbi >= 2000)
{
shanbi += 100;
jinbi -= 1500;
cout << "闪避次数:" << shanbi - 100 << "+100=" << shanbi << endl;
}
else if (c == 0)
{
break;
}
else
{
cout << "金币不够。" << endl
<< endl;
}
}
}
else if (b == 5)
{
while(1)
{
cout<<"欢迎来购买运气值,这是价格表:"<<endl;
cout<<"1.运气棒棒糖——+1 需5金币"<<endl;
cout<<"2.运气蛋糕——+5 需20金币"<<endl;
cout<<"3.运气帝王蟹——+20 需50金币"<<endl;
cout<<"4.运气大套餐——+200 需400金币"<<endl;
cout<<"0.退出"<<endl;
cin>>f;
if(f == 0)
{
break;
}
if(f == 1 && jinbi >= 5)
{
cout<<"购买成功!运气值+1 "<<endl;
yunqi += 1;
jinbi -= 5;
cout<<"你的运气值是:"<<yunqi-1<<" + "<<" 1 "<<" = "<<yunqi<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
}
if(f == 2 && jinbi >= 20)
{
cout<<"购买成功!运气值+5 "<<endl;
yunqi += 5;
jinbi -= 20;
cout<<"你的运气值是:"<<yunqi-5<<" + "<<" 5 "<<" = "<<yunqi<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
}
if(f == 3 && jinbi >= 50)
{
cout<<"购买成功!运气值+20 "<<endl;
yunqi += 20;
jinbi -= 50;
cout<<"你的运气值是:"<<yunqi-20<<" + "<<" 20 "<<" = "<<yunqi<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
}
if(f == 4 && jinbi >= 200)
{
cout<<"购买成功!运气值+200 "<<endl;
yunqi += 200;
jinbi -= 400;
cout<<"你的运气值是:"<<yunqi-200<<" + "<<" 200 "<<" = "<<yunqi<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
}
else
{
cout<<"金币不够!"<<endl;
}
}
}
else if (b == 0)
{
break;
}
else
{
cout << "金币不够。" << endl;
}
}
}
else if (a == 2){
while (1){
cout << endl
<< "1.地方小怪——生命20,攻击10,可获得金币10" << endl;
cout << "2.地方大怪——生命100,攻击25,可获得金币100" << endl;
cout << "3.小怪—— 生命500,攻击250, 可获得金币200 "<<endl;
cout << "4.大怪——生命1000,攻击500,可获得金币500" << endl;
cout << "5.使者——生命5000,攻击1000,可获金币1000"<<endl;
cout << "6.魔王——生命30000,攻击4000,可获得金币4000,并通关游戏" << endl;
cout << "0.退出。" << endl<< "输入:";
cin >> b;
if (b == 1){
int sm = 20, gj = 10;
int duobi = shanbi;
cout << endl
<< "地方小怪——生命20,攻击10,可获得金币10" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 10 && sm > -500)
{
cout<<"地方小怪放大招了!你减10生命"<<endl;
shengming -= 10;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 10;
cout << "恭喜您获得金币10" << endl;
int duobi1 = duobi;
}
else if (b == 2){
cout << endl
<< "地方大怪——生命100,攻击25,可获得金币25" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
int sm = 100, gj = 25;
int duobi = shanbi;
while (sm > 0)
{
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 30 && sm > -1000)
{
cout<<"地方大怪放大招了!你减30生命"<<endl;
shengming -= 30;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 100;
cout << "恭喜您获得金币100" << endl;
int duobi1 = duobi;
}
else if (b == 3){
cout << endl
<< "小怪——生命500,攻击250,可获得金币200" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
int sm = 500, gj = 250;
int duobi = shanbi;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 50 && sm > -1500)
{
cout<<"小怪放大招了!你减300生命"<<endl;
shengming -= 300;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 200;
cout << "恭喜您获得金币200" << endl;
int duobi1 = duobi;
}
else if (b == 4){
cout << endl
<< "大怪——生命1000,攻击500,可获得金币500" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
int sm = 1000, gj = 500;
int duobi = shanbi;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "躲避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 150 && sm > -2000)
{
cout<<"大怪放大招了!你减700生命"<<endl;
shengming -= 700;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
system("pause");
return 0;
}
}
jinbi += 500;
cout << "恭喜您获得金币500" << endl;
int duobi1 = duobi;
}
else if (b == 5){
cout << endl
<< "使者——生命5000,攻击1000,可获得金币1000" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
int sm = 5000, gj = 1000;
int duobi = shanbi;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "躲避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 660 && sm > -5000)
{
cout<<"使者放大招了!你减1500生命,金币减少200"<<endl;
shengming -= 1500;
jinbi -= 200;
cout<<"你还剩"<<jinbi<<"金币"<<endl;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 1000;
cout << "恭喜您获得金币1000" << endl;
int duobi1 = duobi;
}
else if (b == 6){
cout << endl
<< "魔王——生命30000,攻击4000,可获得金币4000,并通关游戏" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS魔王" << endl;
int sm = 30000, gj = 4000;
int duobi = shanbi;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让魔王生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "魔王生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "魔王生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else
{
cout << "没有这个按键。" << endl;
}
if(sm <= 5000 )
{
cout<<"我死了,你也别想活!你减10000生命"<<endl;
shengming -= 10000;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"魔王发动技能<召唤>,召唤出了一只幻影"<<endl;
cout << endl
<< "幻影——生命3000,攻击700,可获得金币0" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
int smm = 3000, gjj = 700;
int duobi = shanbi;
while (smm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gjj;
smm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << smm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "躲避成功。" << endl;
duobi--;
smm -= 5;
cout << "敌人生命:" << smm + 5 << "-5=" << smm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gjj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << smm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
int duobi11 = duobi;
}
if (shengming <= 0){
cout << "你死了。"<<"你的生命为" <<shengming<< endl;
return 0;
}
}
jinbi += 4000;
mw = 1;
cout << "恭喜您打败魔王,通关了游戏!" << endl;
cout << "是否退出?"<<endl;
cout << "是——1, 继续——0"<<endl;
cin>>q;
if(q == 1)
{
cout<<"确定要放弃海量游戏吗?1:残忍放弃, 2:继续游玩";
int aa;
cin>>aa;
if(aa == 1)
{
cout<<"已退出"<<endl;
return 0;
}
else if(aa == 2)
{
cout<<"一路走好";
}
}
if(q == 0)
{
cout<<"一路走好!";
}
else
{
cout<<"没有这个按键, 请重新输入:";
cin>>q;
}
}
else if (b == 0){w
break;
}
}
}
else if (a == 3){
cout << endl;
cout << "你的生命:" << shengming << endl;
cout << "你的攻击:" << gongji << endl;
cout << "你的金币:" << jinbi << endl;
cout << "闪避次数:" << shanbi << endl;
cout << "生命上限:" << smsx << endl;
cout << "你的运气:" << yunqi << endl;
cout<<endl<<endl;
}
else if (a == 4){
while(1)
{
cout<<"欢迎来玩扭蛋,500一次(多买一点运气值,有助于抽到大奖哦~~)"<<endl;
cout<<"1——参加, 0——退出"<<endl<<endl;
cin>>e;
if(e == 1 && jinbi >= 500)
{
jinbi -= 500;
cout<<"正在扭蛋中......"<<endl<<endl;
if(yunqi <= 20)
{
cout<<"哎呦!运气有点差(快去买运气值),只获得了100攻击力"<<endl<<endl;
gongji += 100;
cout<<"你的攻击为"<<gongji<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
times += 1;
}
else if(yunqi > 20 && yunqi <= 50)
{
cout<<"恭喜抽中三等奖 获得400金币!"<<endl<<endl;
jinbi += 400;
cout<<"你的金币数为"<<jinbi<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
times += 1;
}
else if(yunqi > 50 && yunqi <= 220)
{
cout<<"恭喜抽中二等奖 获得300生命上限!"<<endl<<endl;
smsx += 300 ;
cout<<"你的生命上限为"<<smsx<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
times ++;
}
else if(yunqi > 220 && yunqi <= 1000)
{
cout<<"恭喜抽中一等奖 获得1200金币!"<<endl<<endl;
jinbi += 1200;
cout<<"你的金币数为"<<jinbi<<endl;
times += 1;
}
else if(yunqi > 1000)
{
cout<<"恭喜抽中特等奖 获得2000生命上限"<<endl<<endl;
smsx += 2000;
cout<<"你的生命上限为"<<smsx<<endl;
cout<<"你还剩"<<jinbi<<"个金币"<<endl;
times += 1;
}
}
if(times >= 10)
{
cout<<"年轻人,你太贪心了,你会恶人有恶报的!你将减少以7000金币"<<endl<<endl;
jinbi -= 7000;
cout<<"你还剩"<<jinbi<<"枚金币" <<endl<<endl;
times -= 9;
break;
}
else if(e == 0)
{
break;
}
else
{
cout<<"金币不足, 请退出"<<endl;
}
}
}
else if (a == 5)
{
cout<<"请输入VVIP密码:"<<endl;
int a;
cin>>a;
if(a == 132435)
{
cout<<"欢迎刘喆宇大人开通VVIP"<<endl;
cout<<"已将金币,生命,生命上限,攻击,运气加99999"<<endl;
jinbi += 99999;
shengming += 99999;
smsx += 99999;
gongji += 99999;
yunqi += 99999;
mw = 1;
}
else
{
cout<<"不是刘喆宇还妄想开通VVIP?做梦!"<<endl<<endl;
}
}
else if (a == 6)
{
if(mw == 0)
{
cout<<"连魔王都没打过还妄想玩游戏?做梦!"<<endl<<endl;
}
else
{
cout<<"1.poki小游戏。2.crazygames小游戏。3.c++小游戏。4.4399小游戏。5.共创世界小游戏"<<endl<<endl;
int a;
cin>>a;
if(a == 1)
{
system("start https://poki.cn/");
}
else if(a == 2)
{
system("start https://www.crazygames.com/");
}
else if(a == 3)
{
system("start https://www.luogu.com.cn/paste/tq3yx6gt");
}
else if(a == 4)
{
system("start https://www.4399.com/");
}
else if(a == 5)
{
system("start https://www.ccw.site/");
}
else
{
cout<<"输入错误。"<<endl;
}
}
}
else if (a == 7)
{
cout<<"欢迎来到矿场。"<<endl;
cout<<"你只有打败很多怪才能拿到宝石哦~~~QWQ"<<endl;
cout<<"是否进入 1.是 2.否"<<endl;
int aaa;
cin>>aaa;
if(aaa == 1)
{
cout<<"第一波攻势即将来袭"<<endl;
cout<<"一只地方小怪来袭"<<endl;
int sm = 20, gj = 10;
int duobi = shanbi;
cout << endl
<< "地方小怪——生命20,攻击10,可获得金币10" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 10 && sm > -500)
{
cout<<"地方小怪放大招了!你减10生命"<<endl;
shengming -= 10;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 10;
cout << "恭喜您获得金币10" << endl;
int duobi1 = duobi;
cout<<"恭喜!你闯过了第一关。不过这只是开始。"<<endl;
cout<<"你要逃跑吗?1.逃跑,2.继续战斗"<<endl;
int aaaaa;
cin>>aaaaa;
if(aaaaa == 1)
{
cout<<"虽然作者很鄙视你这种逃兵行为,但还是送给你了10金币"<<endl;
jinbi += 10;
}
else
{
cout<<"作者送给你了一个止血药和一个增攻药"<<endl;
cout<<"攻击+30,血量+30"<<endl;
gongji += 30;
shengming += 30;
cout<<"第二波攻势即将来袭"<<endl<<"两只地方小怪和一只地方大怪冲了出来。"<<endl<<endl;
sm = 20, gj = 10;
duobi = shanbi;
cout << endl
<< "地方小怪——生命20,攻击10,可获得金币10" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0)
{
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 10 && sm > -500)
{
cout<<"地方小怪放大招了!你减10生命"<<endl;
shengming -= 10;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 10;
cout << "恭喜您获得金币10" << endl;
duobi1 = duobi;
sm = 20, gj = 10;
duobi = shanbi;
cout << endl
<< "地方小怪——生命20,攻击10,可获得金币10" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 10 && sm > -500)
{
cout<<"地方小怪放大招了!你减10生命"<<endl;
shengming -= 10;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 10;
cout << "恭喜您获得金币10" << endl;
duobi1 = duobi;
cout << endl
<< "地方大怪——生命100,攻击25,可获得金币25" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
sm = 100, gj = 25;
duobi = shanbi;
while (sm > 0)
{
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 30 && sm > -1000)
{
cout<<"地方大怪放大招了!你减30生命"<<endl;
shengming -= 30;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 100;
cout << "恭喜您获得金币100" << endl;
duobi1 = duobi;
cout<<"干得漂亮"<<endl;
cout<<endl<<endl<<endl;
cout<<"不过...."<<endl;
cout<<"你在矿场遇到的第一个boss来了......"<<endl;
cout<<"面对疾风吧!"<<endl;
cout<<endl<<endl;
cout<<"矿场蝙蝠冲了出来!!!"<<endl;
sm = 500, gj = 75;
duobi = shanbi;
cout << endl
<< "矿场蝙蝠——生命500,攻击75,可获得金币150" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 150 && sm > -5000)
{
cout<<"矿场蝙蝠放大招了!你减125生命"<<endl;
shengming -= 125;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"矿场蝙蝠使用<回血>技能,回了40血"<<endl;
sm += 40;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 150;
cout << "恭喜您获得金币150" << endl;
duobi1 = duobi;
cout<<"矿场蝙蝠:你竟然打赢了我!不过我的兄弟姐妹会帮我复仇的!"<<endl;
cout<<"矿场蝙蝠死了......"<<endl<<endl<<endl<<endl;
cout<<"你意外发现了一颗品质很差的进攻宝石,攻击+50"<<endl<<endl;
gongji += 50;
cout<<"矿场蝙蝠的哥哥冲了出来"<<endl;
cout<<"就是你杀了我的弟弟是吧,此仇不报不可也......"<<endl;
sm = 1500, gj = 300;
duobi = shanbi;
cout << endl
<< "矿场蝙蝠(哥哥)——生命1500,攻击300,可获得金币350" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 400 && sm > -5000)
{
cout<<"矿场蝙蝠(哥哥)放大招了!你减400生命"<<endl;
shengming -= 400;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"矿场蝙蝠(哥哥)使用<复仇>技能,回了100血,对你造成了300伤害"<<endl;
sm += 100;
shengming -= 300;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 350;
cout << "恭喜您获得金币350" << endl;
duobi1 = duobi;
cout << "矿场蝙蝠(哥哥):不!!!,我年轻力壮的弟弟会帮我复仇的!!"<<endl<<endl;
cout << "说罢,矿场蝙蝠(哥哥)倒下了......"<<endl<<endl;
cout << "矿场蝙蝠(弟弟)从背后偷袭了你"<<endl;
cout << "你被这突如其来的进攻打掉了500血量"<<endl;
shengming -= 500;
if(shengming <= 0)
{
cout<<"你连这偷袭都受不了,还妄想打败矿场蝙蝠(弟弟)?做梦!"<<endl;
cout<<"你死了。";
return 0;
}
sm = 2500, gj = 500;
duobi = shanbi;
cout << endl
<< "矿场蝙蝠(弟弟)——生命2500,攻击500,可获得金币600" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 400 && sm > -5000)
{
cout<<"矿场蝙蝠(弟弟)放大招了!你减700生命"<<endl;
shengming -= 700;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"矿场蝙蝠(弟弟)使用<偷袭>技能,对你造成了1000伤害"<<endl;
shengming -= 1000;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 350;
cout << "恭喜您获得金币350" << endl;
duobi1 = duobi;
cout<<"矿场蝙蝠(弟弟):你竟然击败了我!只可惜我并没有死。溜了溜了溜了~~~"<<endl;
cout<<"矿场蝙蝠(弟弟):当然,我的姐姐和妹妹会把你击败的"<<endl;
cout<<"矿场蝙蝠(弟弟)召唤了2只小怪"<<endl;
cout<<"第三波攻势即将来袭"<<endl;
cout << endl
<< "小怪——生命500,攻击250,可获得金币200" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
sm = 500, gj = 250;
duobi = shanbi;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 50 && sm > -1500)
{
cout<<"小怪放大招了!你减300生命"<<endl;
shengming -= 300;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 200;
cout << "恭喜您获得金币200" << endl;
duobi1 = duobi;
cout << endl
<< "小怪——生命500,攻击250,可获得金币200" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
sm = 500, gj = 250;
duobi = shanbi;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 50 && sm > -1500)
{
cout<<"小怪放大招了!你减300生命"<<endl;
shengming -= 300;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 200;
cout << "恭喜您获得金币200" << endl;
duobi1 = duobi;
cout<<endl<<endl<<"矿场蝙蝠(姐姐):练手菜好玩吗?别得意哟~"<<endl;
cout<<endl<<endl<<"矿场蝙蝠(姐姐)使用了魔法让你的攻击少了100"<<endl;
gongji -= 100;
cout<<endl<<endl<<"矿场蝙蝠(姐姐)有使用了魔法让你的生命和生命上限减少了600"<<endl;
smsx -= 600;
shengming -= 600;
if(shengming <= 0)
{
cout<<"你死了。";
return 0;
}
sm = 1500, gj = 700;
duobi = shanbi;
cout << endl
<< "矿场蝙蝠(姐姐)——生命1500,攻击700,可获得金币700" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 300 && sm > -50000)
{
cout<<"矿场蝙蝠(姐姐)放大招了!你减1000生命"<<endl;
shengming -= 1000;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"矿场蝙蝠(姐姐)使用<魔法>技能,对你造成了1200伤害,减少了你50攻击,回了300血"<<endl;
shengming -= 1200;
gongji -= 50;
sm += 300;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 700;
cout << "恭喜您获得金币700" << endl;
duobi1 = duobi;
cout<<"恭喜找到中品质加血宝石,生命+600,生命上限+1000"<<endl;
shengming += 600;
smsx += 1000;
cout<<"恭喜找到中品质攻击宝石,攻击+150"<<endl;
gongji += 150;
cout<<"恭喜找打红宝石,售卖后获得500金币"<<endl;
jinbi += 500;
cout<<endl<<endl<<endl<<endl<<endl;
cout<<"正当你扬扬得意时,矿场蝙蝠(妹妹)冲了出来"<<endl;
sm = 2500, gj = 1000;
duobi = shanbi;
cout << endl
<< "矿场蝙蝠(妹妹)——生命2500,攻击1000,可获得金币1000" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 300 && sm > -50000)
{
cout<<"矿场蝙蝠(妹妹)放大招了!你减1500生命"<<endl;
shengming -= 1500;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"矿场蝙蝠(妹妹)使用<魔法>技能,对你造成了1500伤害,回了400血"<<endl;
shengming -= 1500;
sm += 400;
cout<<"矿场蝙蝠(妹妹)使用<削弱>技能,减少了你70攻击";
gongji -= 70;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 1000;
cout << "恭喜您获得金币1000" << endl;
duobi1 = duobi;
cout<<"恭喜将矿工蝙蝠一家族打败"<<endl;
cout<<"是否逃跑 是——1, 否——2"<<endl;
int b;
cin>>b;
if(b == 1)
{
cout<<"byebye"<<endl;
}
else
{
cout<<"继续战斗"<<endl;
cout<<"很高兴你能出道这一关并不放弃,"<<s<<"。"<<endl;
cout<<"这是作者送给你的大礼"<<endl;
cout<<"很显然,你现在的血量和攻击应该不是很多了(除非你开挂)"<<endl;
cout<<"那我就送你一个高品质进攻和血量宝石吧!"<<endl<<endl<<endl;
cout<<"攻击+300, 生命上限+2000,生命+1500"<<endl<<endl<<endl;
gongji += 300;
smsx += 2000;
shengming += 1500;
cout<<"一个使者冲了出来"<<endl<<endl;
cout << endl
<< "使者——生命5000,攻击1000,可获得金币1000" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
sm = 5000, gj = 1000;
int duobi = shanbi;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "躲避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 660 && sm > -5000)
{
cout<<"使者放大招了!你减1500生命,金币减少200"<<endl;
shengming -= 1500;
jinbi -= 200;
cout<<"你还剩"<<jinbi<<"金币"<<endl;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 1000;
cout << "恭喜您获得金币1000" << endl;
duobi1 = duobi;
cout<<"使者来了,贵宾也终于到了......"<<endl<<endl<<endl<<endl;
cout<<"你发现你身边的温度越来越高......"<<endl<<endl;
cout<<"熔岩巨人挥舞着它那沾满熔岩的拳头向你砸了过来。"<<endl;
cout<<"生命-1500"<<endl<<endl<<endl;
shengming -= 1500;
duobi = shanbi;
sm = 5500, gj = 1500;
cout << endl
<< "熔岩巨人——生命5500,攻击1500,可获得金币1500" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 2000)
{
cout<<"熔岩巨人放大招了!你减2000生命"<<endl;
shengming -= 2000;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"熔岩巨人使用<拳击>技能,又对你造成了2500伤害"<<endl;
shengming -= 2500;
cout<<"熔岩巨人使用<自愈>技能,回了700血量"<<endl;
sm += 700;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 1500;
cout << "恭喜您获得金币1500" << endl;
duobi1 = duobi;
cout<<"首先,恭喜你打败了熔岩巨人"<<endl;
cout<<"但是,你的生命与攻击可能已经不容乐观了"<<endl;
cout<<"给你看看吧"<<endl;
cout<<"攻击"<<":"<<gongji<<" "<<"生命:"<<shengming<<endl;
cout<<"你想逃跑吗?"<<endl;
cout<<"1.逃跑 2.继续战斗"<<endl;
int c;
cin>>c;
if(c == 1)
{
cout<<"byebye"<<endl;
}
else
{
cout<<"矿场的终极boss来了"<<endl;
cout<<"作者帮你回满了血"<<endl<<endl<<endl<<endl;
shengming = smsx;
cout<<"准备好了吗?"<<endl<<endl<<endl<<endl<<endl;
cout<<"开战!!!"<<endl<<endl<<endl;
duobi = shanbi;
sm = 50000, gj = 8000;
cout << endl
<< "矿场之王——生命50000,攻击8000,可获得金币8000" << endl
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
while (sm > 0){
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= 12000)
{
cout<<"矿场之王放大招了!你减10000生命"<<endl;
shengming -= 10000;
cout<<"你还剩"<<shengming<<"生命"<<endl;
cout<<"矿场之王使用<拳击>技能,又对你造成了12500伤害"<<endl;
shengming -= 12500;
cout<<"矿场之王使用<自愈>技能,回了3000血量"<<endl;
sm += 3000;
cout<<"矿场之王使用<削弱>技能, 你的攻击-150"<<endl;
gongji -= 150;
cout<<"矿场之王使用<魔法>技能,对你造成了5000伤害,自己回血1500"<<endl;
shengming -= 5000;
sm += 1500;
cout<<"矿场之王使用<偷袭>技能,对你造成了10000伤害"<<endl;
shengming -= 10000;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += 8000;
cout << "恭喜您获得金币8000" << endl;
duobi1 = duobi;
cout<<"你打败了矿场里的所有怪物,又获得了一个超高品质进攻宝石和一个超高品质生命宝石。"<<endl<<endl<<endl<<endl;
cout<<"攻击+1000,生命上限+8000,生命+8000"<<endl;
gongji += 1000;
smsx += 8000;
shengming += 8000;
}
}
}
if(aaa == 2)
{
cout<<"byebye"<<endl;
}
}
else if (a == 8)
{
cout<<"你要跟谁对话?"<<endl<<endl;
cout<<"1.探险者 2.矿工 3.士兵"<<endl<<endl;
cout<<"请输入你要和谁对话:"<<endl;
int e;
cin>>e;
if(e == 1)
{
cout<<"你是想击败魔王吗?好胆量!一定要小心他的大招。"<<endl<<endl<<endl<<endl;
if(tx == 0)
{
cout<<"这是我给你的薄礼"<<endl<<endl<<endl;
cout<<"他送给你了一把木剑"<<endl<<endl<<endl;
cout<<"攻击+7"<<endl<<endl<<endl;
tx++;
gongji += 7;
}
else
{
cout<<"加油!"<<endl;
}
}
else if(e == 2)
{
cout<<"矿场里有许多矿物和宝石,可里面的怪物太多太强了......"<<endl;
if(kg == 0)
{
cout<<"我送给你一个最低品质加血宝石吧"<<endl;
cout<<"别嫌弃,这宝石可是在一大堆怪物大追杀下获得的呢"<<endl<<endl;
cout<<"血量上限+30,血量+30"<<endl<<endl;
smsx += 30, shengming += 30;
kg++;
}
else
{
cout<<"心动不如行动,快点去矿场探险吧!"<<endl<<endl<<endl;
}
}
else if(e == 3)
{
cout<<"加油,你一定可以打败魔王的!"<<endl<<endl;
}
}
}
else if (a == 9)
{
cout<<"欢迎来到无尽模式。"<<endl<<endl<<endl;
cout<<"你现在闯到了第"<<wj<<"关"<<endl<<endl<<endl;
cout<<"你真的要继续闯关吗?1——确定,2——稍等"<<endl<<endl;
int qwq;
cin>>qwq;
if(qwq == 1)
{
cout << endl;
cout<<"无尽模式——生命"<<wj * 100<<",攻击"<<wj * 25<<",可获得金币"<<wj * 80<<"。"
<< "你的攻击力:" << gongji << " "
<< "生命力:" << shengming << endl
<< endl
<< "开始 你VS怪物" << endl;
int sm = wj * 100, gj = wj * 25;
int duobi = shanbi;
while (sm > 0)
{
cout << endl
<< "1.攻击 2.闪避(" << duobi << ")可让怪物生命-5" << endl
<< "输入:";
cin >> c;
if (c == 1){
shengming -= gj;
sm -= gongji;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
else if (c == 2){
if (duobi > 0){
cout << "闪避成功。" << endl;
duobi--;
sm -= 5;
cout << "敌人生命:" << sm + 5 << "-5=" << sm << endl;
}
else if (duobi == 0){
cout << "闪避失败。 受到攻击" << endl;
shengming -= gj;
cout << endl
<< "我的生命:" << shengming << endl;
cout << "敌方生命:" << sm << endl;
}
}
else{
cout << "没有这个按键。" << endl;
}
if(sm <= wj * 30)
{
cout<<"无尽模式放大招了! 你减"<<wj * 45<<"血量";
shengming -= wj * 45;
cout<<"你还剩"<<shengming<<"生命"<<endl;
}
if (shengming <= 0){
cout << "你死了。" << endl;
return 0;
}
}
jinbi += wj * 80;
cout << "恭喜您获得金币"<<wj * 80 << endl;
int duobi1 = duobi;
wj++;
}
}
else if (a == 10)
{
slowout("1.地方小怪\n2.地方大怪\n3.小怪\n4.大怪\n5.使者\n6.魔王\n7.矿场蝙蝠\n8.矿场蝙蝠(哥哥)\n9.矿场蝙蝠(弟弟)\n");
slowout("10.矿场蝙蝠(姐姐)\n11.矿场蝙蝠(妹妹)\n12.熔岩巨人\n13.矿场之王\n14.幻影\n15.无尽模式\n请输入你要查看的图鉴:\n");
// 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;
// cout<<"10.矿场蝙蝠(姐姐)"<<endl;
// cout<<"11.矿场蝙蝠(妹妹)"<<endl;
// cout<<"12.熔岩巨人"<<endl;
// cout<<"13.矿场之王"<<endl;
// cout<<"14.幻影"<<endl;
// cout<<"15.无尽模式"<<endl;
// cout<<"请输入你要查看的图鉴:"<<endl;
int w;
cin>>w;
if(w == 1)
{
slowout("\n地方小怪:生命20,攻击10,可获得金币10\n危险程度:0星\n攻略:这么菜的怪还用攻略?\n\n\n");
// cout<<"地方小怪:生命20,攻击10,可获得金币10"<<endl;
// cout<<"危险程度:0星"<<endl;
// cout<<"攻略:这么菜的怪还用攻略?"<<endl<<endl<<endl;
}
if(w == 2)
{
slowout("\n地方大怪:生命100,攻击25,可获得金币100\n危险程度:0.5星\n攻略:这么菜的怪还用攻略?\n\n\n");
// cout<<endl;
// cout<<"地方大怪:生命100,攻击25,可获得金币100"<<endl;
// cout<<"危险程度:0.5星"<<endl;
// cout<<"攻略:这么菜的怪还用攻略?"<<endl<<endl<<endl;
}
if(w == 3)
{
slowout("\n小怪:生命500,攻击250,可获得金币200\n危险程度:1星\n攻略:这么菜的怪还用攻略?\n\n\n");
// cout<<endl;
// cout<<"小怪:生命500,攻击250,可获得金币200"<<endl;
// cout<<"危险程度:1星"<<endl;
// cout<<"攻略:这么菜的怪还用攻略?"<<endl<<endl<<endl;
}
if(w == 4)
{
slowout("\n大怪:生命1000,攻击500,可获得金币500\n危险程度:2星\n攻略:比较强的怪物,不过大招很普通\n\n\n");
// cout<<endl;
// cout<<"大怪:生命1000,攻击500,可获得金币500"<<endl;
// cout<<"危险程度:2星"<<endl;
// cout<<"攻略:比较强的怪物,不过大招很普通"<<endl<<endl<<endl;
}
if(w == 5)
{
slowout("\n使者:生命5000,攻击1000,可获得金币1000\n危险程度:3星\n攻略:一定要速战速决,免得被大招吸走太多金币\n\n\n注:一般预示着boss即将来袭\n\n");
// cout<<endl;
// cout<<"使者:生命5000,攻击1000,可获得金币1000"<<endl;
// cout<<"危险程度:3星"<<endl;
// cout<<"攻略:一定要速战速决,免得被大招吸走太多金币"<<endl<<endl<<endl;
// cout<<"注:一般预示着boss即将来袭" <<endl<<endl;
}
if(w == 6)
{
slowout("\n魔王:生命30000,攻击4000,可获得金币4000\n危险程度:5星\n攻略:普通模式里最强大的怪物,大招会释放幻影\n\n\n注:打败后可通关游戏\n\n");
// cout<<endl;
// cout<<"魔王:生命30000,攻击4000,可获得金币4000"<<endl;
// cout<<"危险程度:5星"<<endl;
// cout<<"攻略:普通模式里最强大的怪物,大招会释放幻影"<<endl<<endl<<endl;
// cout<<"注:打败后可通关游戏"<<endl<<endl;
}
if(w == 7)
{
slowout("\n矿场蝙蝠:生命:不透露,攻击不透露,可获得金币150\n危险程度:1星\n攻略:大招会回血\n\n\n");
// cout<<endl;
// cout<<"矿场蝙蝠:生命:不透露,攻击不透露,可获得金币150"<<endl;
// cout<<"危险程度:1星"<<endl;
// cout<<"攻略:大招会回血"<<endl<<endl<<endl;
}
if(w == 8)
{
slowout("\n矿场蝙蝠(哥哥):生命:不透露,攻击不透露,可获得金币350\n危险程度:2星\n攻略:大招会回血,并对你造成700伤害。\n\n\n注:它是为了矿场蝙蝠的报仇而来的。\n\n");
// cout<<endl;
// cout<<"矿场蝙蝠(哥哥):生命:不透露,攻击不透露,可获得金币350"<<endl;
// cout<<"危险程度:2星"<<endl;
// cout<<"攻略:大招会回血,并对你造成700伤害。"<<endl<<endl<<endl;
// cout<<"注:它是为了矿场蝙蝠的报仇而来的。"<<endl<<endl;
}
if(w == 9)
{
slowout("\n矿场蝙蝠(弟弟):生命:不透露,攻击不透露,可获得金币600\n危险程度:2.5星\n攻略:大招会对你造成1700伤害。\n\n\n注:它是为了矿场蝙蝠(哥哥)的报仇而来的。\n\n");
// cout<<endl;
// cout<<"矿场蝙蝠(弟弟):生命:不透露,攻击不透露,可获得金币600"<<endl;
// cout<<"危险程度:2.5星"<<endl;
// cout<<"攻略:大招会对你造成1700伤害。"<<endl<<endl<<endl;
// cout<<"注:它是为了矿场蝙蝠(哥哥)的报仇而来的。"<<endl<<endl;
}
if(w == 10)
{
slowout("\n矿场蝙蝠(姐姐):生命:不透露,攻击不透露,可获得金币700\n危险程度:3星\n攻略:善用魔法大招会对你造成高额伤害,降低你的攻击,增加自己的生命。\n\n\n注:它是为了矿场蝙蝠(弟弟)的报仇而来的。\n\n");
// cout<<endl;
// cout<<"矿场蝙蝠(姐姐):生命:不透露,攻击不透露,可获得金币700"<<endl;
// cout<<"危险程度:3星"<<endl;
// cout<<"攻略:善用魔法大招会对你造成高额伤害,降低你的攻击,增加自己的生命。"<<endl<<endl<<endl;
// cout<<"注:它是为了矿场蝙蝠(弟弟)的报仇而来的。"<<endl<<endl;
}
if(w == 11)
{
slowout("\n矿场蝙蝠(妹妹):生命:不透露,攻击不透露,可获得金币1000\n危险程度:4星\n攻略:大招与矿场蝙蝠(姐姐)类似,但更强。\n\n\n注:它是为了矿场蝙蝠(姐姐)的报仇而来的。\n\n");
// cout<<endl;
// cout<<"矿场蝙蝠(妹妹):生命:不透露,攻击不透露,可获得金币1000"<<endl;
// cout<<"危险程度:4星"<<endl;
// cout<<"攻略:大招与矿场蝙蝠(姐姐)类似,但更强。"<<endl<<endl<<endl;
// cout<<"注:它是为了矿场蝙蝠(姐姐)的报仇而来的。"<<endl<<endl;
}
if(w == 12)
{
slowout("\n熔岩巨人:生命:不透露,攻击不透露,可获得金币1500\n危险程度:4.5星\n攻略:没啥技巧,乱打一通。\n\n\n");
// cout<<endl;
// cout<<"熔岩巨人:生命:不透露,攻击不透露,可获得金币1500"<<endl;
// cout<<"危险程度:4.5星"<<endl;
// cout<<"攻略:没啥技巧,乱打一通。"<<endl<<endl<<endl;
}
if(w == 13)
{
slowout("\n矿场之王:生命:不透露,攻击不透露,可获得金币8000\n危险程度:5.5星\n攻略:大招掌握几乎所有其他在矿场里的怪物的大招,十分强大。\n\n\n注:它是整个矿场最强的怪物。\n\n");
// cout<<endl;
// cout<<"矿场之王:生命:不透露,攻击不透露,可获得金币8000"<<endl;
// cout<<"危险程度:5.5星"<<endl;
// cout<<"攻略:大招掌握几乎所有其他在矿场里的怪物的大招,十分强大。"<<endl<<endl<<endl;
// cout<<"注:它是整个矿场最强的怪物。"<<endl<<endl;
}
if(w == 14)
{
slowout("\n幻影:生命3000,攻击700,可获得金币0\n危险程度:2.5星\n攻略:他没有大招。\n\n\n注:它是被魔王召唤出来的。\n\n");
// cout<<endl;
// cout<<"幻影:生命3000,攻击700,可获得金币0"<<endl;
// cout<<"危险程度:2.5星"<<endl;
// cout<<"攻略:他没有大招。"<<endl<<endl<<endl;
// cout<<"注:它是被魔王召唤出来的。"<<endl<<endl;
}
if(w == 15)
{
slowout("\n无尽模式:生命:无尽关卡*100,攻击无尽关卡*25,可获得金币:无尽关卡*80\n危险程度:0.5星 ~ 无限星\n攻略:大招造成无尽管卡*45伤害。\n\n\n");
// cout<<endl;
// cout<<"无尽模式:生命:无尽关卡*100,攻击无尽关卡*25,可获得金币:无尽关卡*80"<<endl;
// cout<<"危险程度:0.5星 ~ 无限星"<<endl;
// cout<<"攻略:大招造成无尽管卡*45伤害。"<<endl<<endl<<endl;
}
}
else if (a == 11)
{
cout<<"作者:simonliu30"<<endl;
cout<<"1.攻略 2.规则"<<endl;
int d;
cin>>d;
if(d == 1)
{
cout<<"开局购买木剑,去打地方小怪。"<<endl<<endl;
cout<<"切记,第一次打小怪要用一次闪避"<<endl<<endl;
cout<<"打败两只地方小怪后,购买回满生命和一个木剑"<<endl<<endl;
cout<<"剩下的就等你自己探索了哦~~~"<<endl<<endl;
cout<<"注意!所有怪物都有大招!(只会在他们血量低的时候触发)"<<endl<<endl;
cout<<"如果你打败了魔王,不妨再发展一段时间后去矿场玩玩(矿场终极boss比魔王强得多)"<<endl<<endl<<endl<<endl;
cout<<"通关矿场后可以去打无尽模式"<<endl<<endl<<endl;
}
if(d == 2)
{
cout<<"打败魔王即可获得游戏胜利"<<endl;
cout<<"如非测试,请勿调整游戏数据"<<endl<<endl<<endl;
}
}
else if (a == 12)
{
Save();
}
else if (a == 0)
{
cout<<"你确定要退出吗? 0——退出, 1——继续"<<endl<<"请输入:"<<endl;
cin>>i;
if(i == 0)
{
Save();
cout<<"游戏已退出";
return 0;
}
if(i == 1)
{
cout<<"请继续游玩";
}
else
{
cout<<"没有这个按键";
cin>>i;
}
}
}
return 0;
}