海岛生存游戏v1.2.7.5开源代码四
2024-09-02 19:55:00
发布于:浙江
开源代码(四)
else if(input == "8"){//boss3
system("cls");
if(mode == 0){
life2 = 2000;
int temp = 1;//阶段
cout << "开始与骷髅队长作战!" << endl;
if(resentment != 0){cout << "骷髅队长因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "骷髅队长详情:" << endl << "生命:2000 " << "攻击:120(骷髅头伤害50) " << "防御:90" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
cout << "你向骷髅队长发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 90;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对骷髅队长造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "骷髅队长还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "骷髅队长被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了70枚金币!,生命值增加了80点!并获取了15个去村庄抢劫的次数!……但你的怨念也增加了180点" << endl;
wait(1000);
coin += 70;
life += 80;
ci += 15;
resentment += 180;
system("pause");
system("cls");
jm();
}
if(life2 <= 1000 && temp == 1){
cout << "骷髅队长进入了第二阶段!" << endl;
temp = 2;
}
_ = rand() % 2;
wait(200);
if(temp == 1){
if(_ != 0){
cout << "骷髅队长对你扇了一巴掌!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 100 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "骷髅队长对你使用了头槌!" << endl;
wait(200);
system("color F0");
wait(200);
system("color 0F");
wait(200);
_ = 120 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
_ = rand()%2;
if(_ != 0){
cout << "骷髅队长对你使用了五连头槌!" << endl;
wait(200);
system("color F0");
wait(200);
system("color 0F");
wait(200);
_ = 150 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
_ = rand() % 5 + 1;
cout << "骷髅队长对你发射了" << _ << "个骷髅头!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 50 * _ - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被骷髅队长击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(mode == 1){
life2 = 8000;
int temp = 1;//阶段
cout << "开始与机械骷髅队长作战!" << endl;
if(resentment != 0){cout << "机械骷髅队长因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "机械骷髅队长详情:" << endl << "生命:8000 " << "攻击:350 " << "防御:150" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
cout << "你向机械骷髅队长发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 150;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对机械骷髅队长造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "机械骷髅队长还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "机械骷髅队长被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了100枚金币!,生命值增加了50点!并获取了5个去村庄抢劫的次数!……但你的怨念也增加了220点" << endl;
wait(1000);
coin += 100;
life += 50;
ci += 5;
resentment += 220;
system("pause");
system("cls");
jm();
}
if(life2 <= 4000 && temp == 1){
cout << "机械骷髅队长进入了第二阶段!" << endl;
temp = 2;
}
_ = rand() % 2;
wait(200);
if(temp == 1){
if(_ != 0){
cout << "机械骷髅队长对你扇了一巴掌!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 300 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "机械骷髅队长对你使用了尖刺头槌!" << endl;
wait(200);
system("color F0");
wait(200);
system("color 0F");
wait(200);
_ = 350 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
_ = rand()%2;
if(_ != 0){
cout << "机械骷髅队长对你使用了五连头槌!" << endl;
wait(200);
system("color F0");
wait(200);
system("color 0F");
wait(200);
_ = 400 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "机械骷髅队长对你使用了炮击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 600 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被机械骷髅队长击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(mode == 2){
life2 = 40000;
int temp = 1;
cout << "开始与痴愚金龙作战!" << endl;
if(resentment != 0){cout << "痴愚金龙因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "痴愚金龙详情:" << endl << "生命:40000 " << "攻击:500 " << "防御:650" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
cout << "你向痴愚金龙发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 650;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对痴愚金龙造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "痴愚金龙还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "痴愚金龙被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了150枚金币!生命值增加了50点!并获取了8个去村庄抢劫的次数!……但你的怨念增加了380点" << endl;
wait(1000);
coin += 130;
life += 50;
ci += 8;
resentment += 380;
system("pause");
system("cls");
jm();
}
if(life2 <= 20000 && temp == 1){
cout << "你感到十分炎热……" << endl;
temp = 2;
}
_ = rand() % 4;
wait(200);
if(temp == 1){
if(_ == 0){
cout << "痴愚金龙对你使用了冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "痴愚金龙对你发射了黄金羽毛!" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 550 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "痴愚金龙对你使用了冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
if(_ == 0){
cout << "痴愚金龙对你使用了四连冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 600 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "痴愚金龙对你发射了一大片黄金羽毛!" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 650 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "痴愚金龙朝你使用了龙裔!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 600 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被痴愚金龙击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(mode == 3){
life2 = 90000;
int temp = 1;
cout << "开始与亵渎守卫作战!" << endl;
if(resentment != 0){cout << "亵渎守卫因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "亵渎守卫详情:" << endl << "生命:90000 " << "攻击:5000 " << "防御:800(减伤25%)" << endl;
cout << "先上来的是圣晶守卫!" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
if(temp == 1){
cout << "你向圣晶守卫发起了攻击!" << endl;
}
else if(temp == 2){
cout << "你向神石守卫发起了攻击!" << endl;
}
else{
cout << "你向统御守卫发起了攻击!" << endl;
}
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = 0.75 * (attack - 800);
if(_ < 1) _ = 1;
life2 -= _;
if(temp == 1){
cout << "你对圣晶守卫造成了" << _ << "点伤害!" << endl;
}
else if(temp == 2){
cout << "你对神石守卫造成了" << _ << "点伤害!" << endl;
}
else{
cout << "你对统御守卫造成了" << _ << "点伤害!" << endl;
}
wait(200);
cout << "亵渎守卫还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "亵渎守卫被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了200枚金币!生命值增加了50点!并获取了8个去村庄抢劫的次数!……但你的怨念增加了500点" << endl;
wait(1000);
coin += 200;
life += 50;
ci += 8;
resentment += 500;
system("pause");
system("cls");
jm();
}
if(life2 <= 60000 && temp == 1){
cout << "圣晶守卫被你击败了!接下来上来的是神石守卫!" << endl;
temp = 2;
}
if(life2 <= 30000 && temp == 2){
cout << "神石守卫被你击败了!接下来上来的是统御守卫!" << endl;
temp = 2;
}
wait(200);
if(temp == 1){
_ = rand()%2;
if(_ == 0){
cout << "圣晶守卫对你使用了圣晶碎片!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 5000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "圣晶守卫使用了治疗,增加了400点血!" << endl;
life2 += 400;
}
}
else if(temp == 2){
int godstone = 0;
_ = rand()%2;
if(godstone != 0){
if(_ == 0){
cout << "神石守卫对你发射了一块神石!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 1000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "神石守卫使用全部神石向你使用了一次神石冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 1000 * godstone - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
_ = rand()%6 + 3;
cout << "神石守卫通过凝聚能量获得了" << _ << "块神石!" << endl;
godstone += _;
}
}
else if(temp == 3){
_ = rand()%3;
if(_ == 0){
cout << "统御守卫对你使用了冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 7000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "统御守卫对你使用了圣之爆炎!" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 8000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 2){
cout << "统御守卫对你发射了神圣之矛!" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 8000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被亵渎守卫击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
}
else if(input == "9"){//big boss
system("cls");
if(mode == 0){
life2 = 5000;
int temp = 1;//阶段
cout << "开始与血肉之墙作战!" << endl;
if(resentment != 0){cout << "血肉之墙因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "血肉之墙详情:" << endl << "生命:5000 " << "攻击:180(激光伤害30,饿鬼伤害40) " << "防御:100" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
cout << "你向血肉之墙发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 100;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对血肉之墙造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "血肉之墙还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "血肉之墙被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了100枚金币!,生命值增加了100点!并获取了20个去村庄抢劫的次数!……但你的怨念也增加了800点" << endl;
cout << "你的世界进入了困难模式!怪物都已经变得极为强悍,小心!" << endl;
mode = 1;
wait(1000);
coin += 100;
life += 100;
ci += 20;
resentment += 800;
system("pause");
system("cls");
jm();
}
if(life2 <= 2500 && temp == 1){
cout << "血肉之墙进入了第二阶段!" << endl;
temp = 2;
}
_ = rand() % 2;
wait(200);
if(temp == 1){
if(_ != 0){
cout << "血肉之墙对你发射了激光!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 130 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "血肉之墙对你发射了饿鬼!" << endl;
wait(200);
system("color F0");
wait(200);
system("color 0F");
wait(200);
_ = 150 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
_ = rand()%2;
if(_ != 0){
cout << "血肉之墙对你使用了激光连射!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 180 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "血肉之墙对你使用了撕咬!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 200 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被血肉之墙击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(mode == 1){
life2 = 10000;
int temp = 1;//阶段
cout << "开始与奥库瑞姆作战!" << endl;
if(resentment != 0){cout << "奥库瑞姆因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "奥库瑞姆详情:" << endl << "生命:10000 " << "攻击:400 " << "防御:300" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
cout << "你向奥库瑞姆发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 300;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对奥库瑞姆造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "奥库瑞姆还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "奥库瑞姆被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了100枚金币!,生命值增加了100点!并获取了20个去村庄抢劫的次数!……但你的怨念也增加了1500点" << endl;
mode = 2;
wait(1000);
coin += 100;
life += 100;
ci += 20;
resentment += 1500;
system("pause");
system("cls");
jm();
}
if(life2 <= 5000 && temp == 1){
cout << "奥库瑞姆进入了第二阶段!" << endl;
temp = 2;
}
_ = rand() % 2;
wait(200);
if(temp == 1){
if(_ != 0){
cout << "奥库瑞姆对你发射了仆从!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 300 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "奥库瑞姆对你使用了冲撞!" << endl;
wait(200);
system("color F0");
wait(200);
system("color 0F");
wait(200);
_ = 400 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
_ = rand()%2;
if(_ != 0){
cout << "奥库瑞姆对你狂射激光!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 450 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "奥库瑞姆对你使用了恶魔锄刀!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被奥库瑞姆击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(mode == 2){
life2 = 40000;
int temp = 1;
cout << "开始与丛林龙作战!" << endl;
if(resentment != 0){cout << "丛林龙因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "丛林龙详情:" << endl << "生命:40000 " << "攻击:2000 " << "防御:1000(有10%的减伤)" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
cout << "你向丛林龙发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = 0.9 * (attack - 1000);
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对丛林龙造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "丛林龙还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "丛林龙被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了200枚金币!生命值增加了50点!并获取了8个去村庄抢劫的次数!……但你的怨念增加了3000点" << endl;
wait(1000);
coin += 200;
life += 50;
ci += 8;
resentment += 3000;
mode = 3;
system("pause");
system("cls");
jm();
}
if(life2 <= 20000 && temp == 1){
cout << "周围的空气变得灼热起来……" << endl;
cout << "丛林龙获得了增强!攻击力大幅度提升了!" << endl;
temp = 2;
}
_ = rand() % 4;
wait(200);
if(temp == 1){
if(_ == 0){
cout << "丛林龙对你使用了高速冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 2000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "丛林龙对你发射了一大片黄金羽毛!" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 2500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "丛林龙对你使用了龙吟!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 2500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
if(_ == 0){
cout << "丛林龙对你使用了圣龙冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 3500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "丛林龙对你发射了一道黄金羽毛龙卷!" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 4500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "丛林龙朝你使用了金龙圣火!" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 4000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被丛林龙击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(mode == 3){
life2 = 100000;
int temp = 1;
cout << "开始与亵渎天神-普罗维登斯作战!" << endl;
if(resentment != 0){cout << "亵渎天神-普罗维登斯因为怨念被增强了!" << endl; life2 += resentment/2;}
int def = 1500;
int jian = 0.75;
cout << "亵渎天神-普罗维登斯详情:" << endl << "生命:100000 " << "攻击:6000 " << "防御:1500(有25%的减伤)" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
cout << "你向亵渎天神-普罗维登斯发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = jian * (attack - def);
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对亵渎天神-普罗维登斯造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "亵渎天神-普罗维登斯还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "亵渎天神-普罗维登斯被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了500枚金币!生命值增加了50点!并获取了8个去村庄抢劫的次数!……但你的怨念增加了3000点" << endl;
wait(1000);
coin += 500;
life += 50;
ci += 8;
resentment += 3000;
system("pause");
system("cls");
jm();
}
if(life2 <= 30000 && temp == 1){
cout << "亵渎天神-普罗维登斯躲入了神圣之茧里面!" << endl;
cout << "亵渎天神-普罗维登斯通过牺牲1000点防御力,让减伤飙升到了75%!" << endl;
def = 500;
jian = 0.25;
temp = 2;
}
_ = rand() % 4;
wait(200);
if(temp == 1){
if(_ == 0){
cout << "亵渎天神-普罗维登斯对你发射了 辉-圣之爆炎!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 6000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "亵渎天神-普罗维登斯对你发射了 辉-神圣之矛" << endl;
wait(200);
system("color E0");
wait(200);
system("color 0F");
wait(200);
_ = 7000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "亵渎天神-普罗维登斯对你使用了 辉-圣晶碎片!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 5500 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
if(_ == 0){
cout << "亵渎天神-普罗维登斯对你使用了 堙-圣洁极光!" << endl;
wait(200);
system("color C0");
wait(200);
system("color E0");
wait(200);
_ = 10000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "亵渎天神-普罗维登斯对你发射了 灭-狱火冲击!" << endl;
wait(200);
system("color 6F");
wait(200);
system("color 0F");
wait(200);
_ = 7000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "亵渎天神-普罗维登斯对你发射了 灭-狱火冲击!" << endl;
wait(200);
system("color 6F");
wait(200);
system("color 0F");
wait(200);
_ = 7000 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被亵渎天神-普罗维登斯击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
}
else if(input == "10"){//刷怪
system("cls");
if(mode == 0){
int _ = rand()%2;
if(_ == 0){//僵尸
life2 = 60;
cout << "开始与僵尸作战!" << endl;
if(resentment != 0){cout << "僵尸因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "僵尸详情:" << endl << "生命:60 " << "攻击:15 " << "防御:0" << endl;
string q;
while(life || life2){//一直干到有人噶了
cout << "请做出你的选择:\n1,干!" << endl;
cin >> q;
if(q == "1"){
cout << "你向僵尸发起了攻击!" << endl;
wait(200);
system("color C0");
life2 -= attack;
wait(200);
system("color 0F");
cout << "你对僵尸造成了" << attack << "点伤害!" << endl;
if(life2 <= 0){//赢咯!
cout << "僵尸被你击败了!你获得了10个金币!……但增加了5点怨念" << endl;
coin += 10;
ci++;
resentment += 5;
wait(1000);
system("pause");
system("cls");
jm();
}
cout << "僵尸还剩" << life2 << "点生命!" << endl;
wait(200);
cout << "僵尸发起了反击!" << endl;
wait(200);
system("color C0");
_ = 15 - defense;
if(_ < 1) _ = 1;
life -= _;
wait(200);
system("color 0F");
cout << "僵尸打掉了你" << _ << "点生命!" << endl;
if(life <= 0){//你死了
cout << "你被杀死了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你还有" << life << "点生命" << endl;
system("pause");
system("cls");
continue;
}
else{
cout << "别乱选啊" << endl;
continue;
}
}
}
else if(_ == 1){
life2 = 50;
cout << "开始与恶魔之眼作战!" << endl;
if(resentment != 0){cout << "恶魔之眼因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "恶魔之眼详情:" << endl << "生命:50 " << "攻击:20 " << "防御:0" << endl;
string q;
while(life || life2){//一直干到有人噶了
cout << "请做出你的选择:\n1,干!" << endl;
cin >> q;
if(q == "1"){
cout << "你向恶魔之眼发起了攻击!" << endl;
wait(200);
system("color C0");
life2 -= attack;
wait(200);
system("color 0F");
cout << "你对恶魔之眼造成了" << attack << "点伤害!" << endl;
if(life2 <= 0){//赢咯!
cout << "恶魔之眼被你击败了!你获得了10个金币!……但增加了5点怨念" << endl;
coin += 10;
ci++;
resentment += 5;
wait(1000);
system("pause");
system("cls");
jm();
}
cout << "恶魔之眼还剩" << life2 << "点生命!" << endl;
wait(200);
cout << "恶魔之眼发起了反击!" << endl;
wait(200);
system("color C0");
_ = 20 - defense;
if(_ < 1) _ = 1;
life -= _;
wait(200);
system("color 0F");
cout << "恶魔之眼打掉了你" << _ << "点生命!" << endl;
if(life <= 0){//你死了
cout << "你被杀死了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();
}
cout << "你还有" << life << "点生命" << endl;
system("pause");
system("cls");
continue;
}
else{
cout << "别乱选啊" << endl;
continue;
}
}
}
}
else if(mode == 1){
int _ = rand()%2;
if(_ == 0){//血腥僵尸
life2 = 300;
cout << "开始与血腥僵尸作战!" << endl;
if(resentment != 0){cout << "血腥僵尸因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "血腥僵尸详情:" << endl << "生命:300 " << "攻击:100 " << "防御:20" << endl;
string q;
while(life || life2){//一直干到有人噶了
cout << "请做出你的选择:\n1,干!" << endl;
cin >> q;
if(q == "1"){
cout << "你向血腥僵尸发起了攻击!" << endl;
wait(200);
system("color C0");
_ = attack - 20;
if(_ < 1) _ = 1;
life2 -= _;
wait(200);
system("color 0F");
cout << "你对血腥僵尸造成了" << _ << "点伤害!" << endl;
if(life2 <= 0){//赢咯!
cout << "血腥僵尸被你击败了!你获得了50个金币!……但增加了15点怨念" << endl;
coin += 50;
ci++;
resentment += 15;
wait(1000);
system("pause");
system("cls");
jm();
}
cout << "血腥僵尸还剩" << life2 << "点生命!" << endl;
wait(200);
cout << "血腥僵尸发起了反击!" << endl;
wait(200);
system("color C0");
_ = 100 - defense;
if(_ < 1) _ = 1;
life -= _;
wait(200);
system("color 0F");
cout << "血腥僵尸打掉了你" << _ << "点生命!" << endl;
if(life <= 0){//你死了
cout << "你被杀死了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();//直接终止程序
}
cout << "你还有" << life << "点生命" << endl;
system("pause");
system("cls");
continue;
}
else{
cout << "别乱选啊" << endl;
continue;
}
}
}
else if(_ == 1){
life2 = 250;
cout << "开始与幻灵作战!" << endl;
if(resentment != 0){cout << "幻灵因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "幻灵详情:" << endl << "生命:250 " << "攻击:150 " << "防御:0" << endl;
string q;
while(life || life2){//一直干到有人噶了
cout << "请做出你的选择:\n1,干!" << endl;
cin >> q;
if(q == "1"){
cout << "你向幻灵发起了攻击!" << endl;
wait(200);
system("color C0");
life2 -= attack;
wait(200);
system("color 0F");
cout << "你对幻灵造成了" << attack << "点伤害!" << endl;
if(life2 <= 0){//赢咯!
cout << "幻灵被你击败了!你获得了50个金币!……但增加了5点怨念" << endl;
coin += 50;
ci++;
resentment += 5;
wait(1000);
system("pause");
system("cls");
jm();
}
cout << "幻灵还剩" << life2 << "点生命!" << endl;
wait(200);
cout << "幻灵发起了反击!" << endl;
wait(200);
system("color C0");
_ = 150 - defense;
if(_ < 1) _ = 1;
life -= _;
wait(200);
system("color 0F");
cout << "幻灵打掉了你" << _ << "点生命!" << endl;
if(life <= 0){//你死了
cout << "你被杀死了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
jm();//直接终止程序
}
cout << "你还有" << life << "点生命" << endl;
system("pause");
system("cls");
continue;
}
else{
cout << "别乱选啊" << endl;
continue;
}
}
}
}
}
else if(input == "11"){//显示状态
cout << "以下是你的状态" << endl;
cout << "你的攻击力为" << attack << "点,你的防御力为" << defense << "点" << endl;
cout << "你的木头有" << wood << "个" << endl;
cout << "你的石头有" << stone << "个" << endl;
cout << "你的铜矿有" << copper << "个" << endl;
cout << "你的铁矿有" << iron << "个" << endl;
cout << "你的银矿有" << sliver << "个" << endl;
cout << "你的金矿有" << gold << "个" << endl;
cout << "你的猩红矿有" << crimtane << "个" << endl;
cout << "你的钯金矿有" << palladium << "个" << endl;
cout << "你的叶绿矿有" << chlorophyte << "个" << endl;
cout << "你有" << coin << "枚金币" << endl;
cout << "你的生命值为" << life << endl;
system("pause");
system("cls");
jm();
}
else if(input == "12"){//不玩了
cout << "已退出" << endl;
abort();
}
else{
cout << "没有这个选项,给我重输" << endl;
system("pause");
system("cls");
jm();
}
}
}
//主函数
int main(){
ios::sync_with_stdio(false);//优化
MessageBoxA(NULL, "该游戏为Loki原创,改编记得先说一声", "注意!",MB_ICONWARNING);
cout << "按任意键开始游戏" << endl;
system("pause");
system("cls");
start();
jm();
return 0;
}
这里空空如也
有帮助,赞一个