海岛生存游戏v1.2.7.5开源代码二
2024-09-02 19:49:25
发布于:浙江
开源代码二
//续接上半代码
else if(input == "6"){//boss1
system("cls");
if(mode == 0){
life2 = 800;
int temp = 1;
cout << "开始与克苏鲁之眼作战!" << endl;
if(resentment != 0){cout << "克苏鲁之眼因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "克苏鲁之眼详情:" << endl << "生命:800 " << "攻击:120 (小眼球伤害:50) " << "防御:60" << 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 - 60;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对克苏鲁之眼造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "克苏鲁之眼还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "克苏鲁之眼被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了40枚金币,生命值增加了30点!并获取了5个去村庄抢劫的次数!……但你的怨念增加了120点" << endl;
wait(1000);
coin += 40;
life += 30;
ci += 5;
resentment += 120;
system("pause");
system("cls");
jm();
}
if(life2 <= 400 && 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);
_ = 100 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
int temp = rand() % 5 + 1;
cout << "克苏鲁之眼对你发射了" << temp << "个小眼球!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = temp * 50 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
cout << "克苏鲁之眼对你使用了五连冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 120 - 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 = 9000;
int temp = 1;
cout << "开始与双子魔眼作战!" << endl;
if(resentment != 0){cout << "双子魔眼因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "双子魔眼详情:" << endl << "生命:9000 " << "攻击:300" << "防御: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个去村庄抢劫的次数!……但你的怨念增加了200点" << endl;
wait(1000);
coin += 100;
life += 50;
ci += 5;
resentment += 200;
system("pause");
system("cls");
jm();
}
if(life2 <= 4500 && 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);
_ = 280 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "双子魔眼对你发射了激光!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 280 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "双子魔眼对你发射了咒火球!" << endl;
wait(200);
system("color A0");
wait(200);
system("color 0F");
wait(200);
_ = 280 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
if(_ == 0){
cout << "双子魔眼对你使用了高速冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 320 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "双子魔眼对你使用了连射激光!" << endl;
wait(200);
system("color D0");
wait(200);
system("color 0F");
wait(200);
_ = 320 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "双子魔眼朝你狂喷咒火!" << endl;
wait(200);
system("color A0");
wait(200);
system("color 0F");
wait(200);
_ = 320 - 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 = 20000;
int temp = 1;
cout << "开始与世纪之花作战!" << endl;
if(resentment != 0){cout << "世纪之花因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "世纪之花详情:" << endl << "生命:20000 " << "攻击:400 " << "防御:450" << 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 - 450;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对世纪之花造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "世纪之花还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "世纪之花被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了120枚金币,生命值增加了50点!并获取了8个去村庄抢劫的次数!……但你的怨念增加了300点" << endl;
wait(1000);
coin += 120;
life += 50;
ci += 8;
resentment += 300;
system("pause");
system("cls");
jm();
}
if(life2 <= 10000 && 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);
_ = 350 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "世纪之花对你发射了尖叶片!" << endl;
wait(200);
system("color A0");
wait(200);
system("color 0F");
wait(200);
_ = 400 - 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 -= _;
}
}
else{
if(_ == 0){
cout << "世纪之花对你使用了高速冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 450 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "世纪之花对你使用了钩爪攻击!" << endl;
wait(200);
system("color A0");
wait(200);
system("color 0F");
wait(200);
_ = 400 - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "世纪之花朝你狂喷尖叶片!" << endl;
wait(200);
system("color A0");
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 == 3){
life2 = 60000;
int enat = 0;
int ende = 0;//攻击加成与防御加成
int temp = 1;
int at, de;
cout << "开始与白金星舰作战!" << endl;
if(resentment != 0){cout << "白金星舰因为怨念被增强了!" << endl; life2 += resentment/2;}
cout << "白金星舰详情:" << endl << "生命:60000 " << "攻击:2200 " << "防御:800(有20%的减伤)" << 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.8 * (attack - (800 + 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();
}
if(life2 <= 25000 && temp == 1){
cout << "你感到星辉细胞正在吞噬你的身体……" << endl;
cout << "你被弱化了!攻击力与防御力各降低了10%!" << endl;
at = attack * 0.1;
de = defense * 0.1;
attack -= at;
defense -= de;
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);
_ = 2500 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "白金星舰对你发射了三道激光!" << endl;
wait(200);
system("color 9F");
wait(200);
system("color 0F");
wait(200);
_ = 2400 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "白金星舰使用了充能!" << endl;
wait(200);
cout << "白金星舰获得了增强!攻击与防御提升了25点!" << endl;
enat += 25;
ende += 25;
}
}
else{
if(_ == 0){
cout << "白金星舰对你使用了连续猛击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 3500 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
}
else if(_ == 1){
cout << "白金星舰对你发射了五道激光!" << endl;
wait(200);
system("color 9F");
wait(200);
system("color 0F");
wait(200);
_ = 4000 + enat - defense;
if(_ < 1) _ = 1;
life -= _;
}
else{
cout << "白金星舰使用了超级充能!" << endl;
wait(200);
cout << "白金星舰获得了增强!攻击与防御提升了50点!" << endl;
enat += 50;
ende += 50;
}
}
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;
}
}
}
}
这里空空如也
有帮助,赞一个