海岛生存游戏v1.2.7.5开源代码三
2024-09-02 19:51:21
发布于:浙江
开源代码三
//续接上半代码
else if(input == "7"){//boss2
system("cls");
if(mode == 0){
life2 = 1500;
int cnt = 0;//致幻层数
int temp = 1;//阶段
cout << "开始与克苏鲁之脑作战!" << endl;
if(resentment != 0){cout << "克苏鲁之脑因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "克苏鲁之脑详情:" << endl << "生命:1500 " << "攻击:80" << "防御:70" << 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 - 70;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对克苏鲁之脑造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "克苏鲁之脑还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "克苏鲁之脑被你击败了!你真厉害!" << endl;
cout << "你的攻击与防御都恢复了原状!" << endl;
attack += cnt * 5;
defense += cnt * 5;
wait(1000);
cout << "你获得了50枚金币与20个猩红矿!,生命值增加了50点!并获取了10个去村庄抢劫的次数!……但你也增加了150点怨念" << endl;
wait(1000);
coin += 50;
life += 50;
ci += 10;
resentment += 150;
crimtane += 20;
system("pause");
system("cls");
jm();
}
if(life2 <= 600 && 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);
_ = 70 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "克苏鲁之脑对你使用了大脑致幻!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 30 - defense;
if(_ < 1) _ = 1;
life -= _;
cout << "你被致幻了!攻击与防御降低了5点!" << endl;
attack -= 5;
defense -= 5;
if(attack < 1) attack = 1;
if(defense < 0) defense = 0;
cnt++;
}
}
else{
_ = rand()%2;
if(_ != 0){
cout << "克苏鲁之脑对你使用了幻影攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 80 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "克苏鲁之脑对你使用了双重大脑致幻!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 60 - defense;
if(_ < 1) _ = 1;
life -= _;
cout << "你被双重致幻了!攻击与防御降低了10点!" << endl;
attack -= 10;
defense -= 10;
if(attack < 1) attack = 1;
if(defense < 0) defense = 0;
cnt += 2;
}
}
if(life < 1){
cout << "你被克苏鲁之脑击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
defense += cnt * 5;
attack += cnt * 5;
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 " << "攻击:350" << "防御:140" << 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 - 140;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对毁灭者造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "毁灭者还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "毁灭者被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了100枚金币,生命值增加了50点!并获取了5个去村庄抢劫的次数!……但你的怨念增加了200点" << endl;
wait(1000);
coin += 100;
life += 50;
ci += 5;
resentment += 200;
system("pause");
system("cls");
jm();
}
if(life2 <= 5000 && temp == 1){
cout << "毁灭者进入了第二阶段!" << endl;
temp = 2;
}
_ = rand() % 3;
wait(200);
if(temp == 1){
if(_ == 0){
cout << "毁灭者对你使用了冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 350 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
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 C0");
wait(200);
system("color 0F");
wait(200);
_ = 400 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
if(_ == 0){
cout << "毁灭者对你疯狂冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 400 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "毁灭者对你使用了连射激光!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 420 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "毁灭者对你发射了死亡射线!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 450 - 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 = 30000;
int cnt = 0;//层数
int temp = 1;
cout << "开始与瘟疫使者歌莉娅作战!" << endl;
if(resentment != 0){cout << "瘟疫使者歌莉娅因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "瘟疫使者歌莉娅详情:" << endl << "生命:30000 " << "攻击:550 " << "防御:600" << 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 - 600;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对瘟疫使者歌莉娅造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "瘟疫使者歌莉娅还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "瘟疫使者歌莉娅被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了130枚金币,攻击力恢复了!生命值增加了50点!并获取了8个去村庄抢劫的次数!……但你的怨念增加了350点" << endl;
wait(1000);
coin += 130;
life += 50;
ci += 8;
attack += cnt * 5;
resentment += 350;
system("pause");
system("cls");
jm();
}
if(life2 <= 12500 && 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 B0");
wait(200);
system("color 0F");
wait(200);
cnt++;
cout << "你被瘟疫病毒感染了!攻击力降低了5点!" << endl;
attack -= 5;
_ = 550 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "瘟疫使者歌莉娅对你使用了变异黄蜂!" << endl;
wait(200);
system("color B0");
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);
_ = 550 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "瘟疫使者歌莉娅对你发射了瘟疫核弹!" << endl;
wait(200);
system("color B0");
wait(200);
system("color 0F");
wait(200);
_ = 1050 - defense;
cnt += 3;
attack -= 3 * 5;
cout << "你被瘟疫病毒感染了!攻击力降低了15点!" << endl;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "瘟疫使者歌莉娅朝你狂射瘟疫病毒!" << endl;
wait(200);
system("color B0");
wait(200);
system("color 0F");
wait(200);
_ = 600 - defense;
cnt += 1;
attack -= 1 * 5;
cout << "你被瘟疫病毒感染了!攻击力降低了5点!" << endl;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被瘟疫使者歌莉娅击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
attack += cnt * 5;
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 = 70000;
int enat = 0;
int ende = 0;//攻击加成与防御加成
int temp = 1;
int what = 0;//是否被晕眩
int at, de;
cout << "开始与星神游龙作战!" << endl;
if(resentment != 0){cout << "星神游龙因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "星神游龙详情:" << endl << "生命:70000 " << "攻击:3000 " << "防御:1000(有15%的减伤)" << endl;
string q;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> q;
if(q == "1"){
if(what == 0){
cout << "你向星神游龙发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = 0.85 * (attack - (1000 + ende));
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对星神游龙造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "星神游龙还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "星神游龙被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了200枚金币!属性恢复了!生命值增加了50点!并获取了8个去村庄抢劫的次数!……但你的怨念增加了400点" << endl;
wait(1000);
if(temp == 2){
attack += at;
defense += de;
}
coin += 200;
life += 50;
ci += 8;
resentment += 400;
system("pause");
system("cls");
jm();
}
}
else{
cout << "你被致盲,该回合无法攻击!" << endl;
what = 0;
}
if(life2 <= 35000 && temp == 1){
cout << "你感到星辉细胞正在吞噬你的身体……" << endl;
cout << "你被弱化了!攻击力与防御力各降低了15%!" << endl;
cout << "星神游龙切换到了飞龙形态!" << endl;
at = attack * 0.15;
de = defense * 0.15;
attack -= at;
defense -= de;
temp = 2;
}
_ = rand() % 3;
wait(200);
if(temp == 1){
if(_ == 0){
cout << "星神游龙对你使用了冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 3000 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "星神游龙对你发射了星陨射线!" << endl;
wait(200);
system("color 9F");
wait(200);
system("color 0F");
wait(200);
_ = 3500 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
if(_ == 0){
cout << "星神游龙对你使用了流影冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 4500 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
if(rand()%3 == 0){
cout << "你被流影致盲了!下一回合将无法行动!" << endl;
what = 1;
}
}
else if(_ == 1){
cout << "星神游龙对你发射了星雷!" << endl;
wait(200);
system("color 9F");
wait(200);
system("color 0F");
wait(200);
_ = 4000 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
if(life < 1){
cout << "你被星神游龙击败了!" << endl;
wait(1000);
cout << "等待复活……" << endl;
wait(1000);
life = 100;
if(temp == 2){
attack += at;
defense += de;
}
jm();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
}
这里空空如也
有帮助,赞一个