提交 a7c6f233 编辑于 作者: 哲昊 周's avatar 哲昊 周
浏览文件

Upload New File

上级 f1715893
#include <Windows.h>
#include <iostream>
#include<conio.h>
#include "Prepare.h"
#define W Sleep(1000);//延时一秒
using namespace std;
void Battle::Battle_Gainong() //打盖侬
{
system("cls");
//定义主角对怪物杀伤 和怪物对主角杀伤
int* pKillValue = new int(0);//初始值
int* mKillValue = new int(0);
int count = 0;
int* HuiHe = new int;//回合制初始化
*HuiHe = 0;
life = LifeValue;
g_life = g_LifeValue[4];
g_hudun = g_Shield[1];
zhi1 = true;
feng1 = false;
feng2 = 0;
lei1 = false;
lei2 = 0;
longjuan = 0;
int harm;
int* XuanZe = new int;
char input;
cout << "林克走进了残破不堪的城堡,看着曾经的宏伟宫殿成了现在的断垣残壁,一股愤怒涌上心头" << endl; W
cout << "突然,脚下的地面开始震动,地板随之破碎,林克毫无防备的摔了下来" << endl; W
cout << "林克没有了退路,只能前进" << endl; W
cout << "这里是城堡的地下空间,异常寂静的氛围让你感到不安" << endl; W
cout << "一股股怨念的力量在你身旁飞速划过,最后在中心汇聚" << endl; W
cout << "————————“盖侬”现身了————————" << endl; W
cout << "“又来了个送死的吗?没人可以帮你,等我先除掉你,再把那该死的限制打碎,这个世界就是我的了”" << endl; W
cout << "恐惧的声音传来,林克握紧了武器,最终之战一触即发!" << endl;W
do
{
cout << "按下空格继续" << endl;
input = _getch();
} while (input != 32);
system("cls");
cout << "开始讨伐“盖侬”" << endl;
//战斗循坏
W
Lieyanbiyou();//英灵之力烈焰庇佑
while (1)
{
count++;
(*HuiHe)++;//第二回合
W
cout << endl << "现在是第" << *HuiHe << "回合!" << endl;
if (longjuan == 1)
{
cout << "你被击飞,此回合无法行动" << endl;W
longjuan = 0;
}
else
{
cout << "请选择你的动作:\n";
cout << "1、攻击\n2、使用凭风而起(飞至空中躲避此回合的伤害,每次战斗可用三次)\n3、使用雷神之怒(造成200%攻击力的雷元素伤害,每次战斗可用两次)\n";
cin >> *XuanZe;
switch (*XuanZe)
{
case 1:
cout << "你砍向“盖侬”!" << endl;
W
* mKillValue = Attack;
if ((*mKillValue) - (g_hudun) > 0)
{
harm = (*mKillValue) - (g_hudun);
g_hudun = 0;
g_life -= harm;
cout << "造成了" << harm << "的伤害" << endl;
cout << "“盖侬”还剩" << g_life << "点生命" << endl;
}
else
{
cout << "伤害被护盾阻挡" << endl;
g_hudun -= *mKillValue;
}
break;
case 2:
Pingfengerqi();
break;
case 3:
Leishenzhinu();
break;
default:
cout << "你手忙脚乱,错失机会" << endl;
break;
}
}
//人物结算
if ((g_life) <= 0) //末尾
{
W W
system("cls");
cout << endl;
cout << "“盖侬”被你的力量所震惊,它咆哮着凝聚所有的灾厄之力" << endl;W
cout << "这是终末吐息,一股难以阻挡的邪恶力量喷涌而出,仿佛是要摧毁一切" << endl;W
cout << "林克使劲全力阻挡盖侬的攻击,但是最终还是失败了" << endl;W
cout << "他,倒下了……" << endl;W
cout << "“盖侬”发出了刺耳的笑声,除此之外一片寂静" << endl;W
cout << "结 束 了……吗?" << endl;W
cout << "…………" << endl; W
cout << "…………" << endl; W
cout << "…………" << endl; W W W
cout << "“啦~~~啦啦~~~”" << endl;W
cout << "突然之间,一阵熟悉的歌声渐渐响起" << endl;W
cout << "那是塞尔达的声音,充满着温暖和光明的力量" << endl;W
cout << "“盖侬,到此为止了!”公主站到了盖侬面前说道" << endl;W
cout << "倒下的林克渐渐有了知觉,感受到新的力量在不断涌现,重新站了起来" << endl;W
cout << "“上吧,我的英雄!”公主呐喊道" << endl;W
cout << "折断的剑刃上散发出耀眼的光芒,封印之力与之融为了一体" << endl;W
cout << "林克重新举起了武器,与此同时“盖侬”怒吼着向他们袭来" << endl;W
do {
cout << "你摆好架势,怒视着面目狰狞的恶魔,使出浑身的力量" << endl;W
cout << "挥出至强一剑(按下空格)" << endl;
input = _getch();
} while (input != 32);
system("cls");
system("color F1");
W W
system("color E1");
cout <<endl<<endl<<endl<<endl<<"一阵巨响后,“盖侬”被彻底的消灭了" << endl;W
cout << "灾厄从这片大陆上铲除了,塞尔达公主成为了新的女王,让海拉鲁大陆重现荣光" << endl;W
cout << "而林克,继续守护着,这片土地,和他的公主" << endl;W
cout << endl << endl << endl;
cout << "GOOD END" << endl; W
process = 6;
break;
}
//怪物反应
if (count == 3)
{
cout << endl << "“盖侬”召唤出“狂风”" << endl;W
Longjuan();
}
else if (count == 5)
{
cout << endl << "“盖侬”召唤出“洪流”" << endl;W
cout << "“洪流”开始蓄力”,水元素正在聚集" << endl;
feng1 = false;
}
else if (count == 6)
{
Xuanwo();
}
else if (count == 8)
{
cout << endl << "“盖侬”召唤出“沙暴”" << endl;W
Leibao();
}
else if (count == 10)
{
cout << endl << "“盖侬”召唤出“炙岩”" << endl;W
cout << "火元素的结晶开始在“盖侬”身边聚集" << endl;
feng1 = false;
}
else if (count == 11)
{
Hudun();
feng1 = false;
count = 0;
}
else
{
W
cout << endl << "“盖侬”向你挥出了灾厄之镰!" << endl;
if (feng1)
{
cout << "英灵之力——凭风而起发动,躲避了这次攻击" << endl;
feng1 = false;
}
else
{
if (g_Attack[4] - Defense - Shield > 0)
{
harm = g_Attack[4] - Defense - Shield;
Shield = 0;
life -= harm;
cout << "“盖侬”打掉了你" << harm << "点生命" << endl;
cout << "你还剩" << life << "点生命" << endl;
}
else
{
cout << "伤害被护盾阻挡" << endl;
Shield -= g_Attack[4];
}
}
}
//怪物结算
lei1 = false;
if (life <= 0 && zhi1) //治愈之力发动
{
Zhiyuzhili();
}
else if (life <= 0) //你被杀死
{
W W
system("cls");
system("color E1");
cout << endl << endl << endl << endl << "你被“盖侬”击败,塞尔达公主的封印之力也在岁月流逝中渐渐削弱,“盖侬”挣脱了束缚,摧毁了一切生灵" << endl; W
cout << "海拉鲁大陆陷入了无尽的黑暗……" << endl; W
cout << endl << endl << endl;
cout << "BAD END" << endl; W
process = 5;
break;
}
}
//末尾
delete pKillValue;
delete mKillValue;
delete XuanZe;
delete HuiHe;
do {
cout << "按下空格继续" << endl;
input = _getch();
} while (input != 32);
Battle_Map();
}
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册