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

Upload New File

上级 1b016993
#include <Windows.h>
#include <iostream>
#include<conio.h>
#include<iomanip>
#include "Prepare.h"
#define W Sleep(1000);//延时一秒
using namespace std;
Battle::Battle() {
LifeValue = 100;
Attack = 10;
Defense = 5;
Money = 0;
TongGuan = false;
g_LifeValue = new int[5]{ 250, 400,1000,700,3500 };
g_Attack = new int[5]{ 45, 60,90,120,150 };
g_Shield = new int[2]{ 500,0 };
process = 0;
fengkang = false;
leikang = false;
lei1 = false;
lei2 = 0;
g_life = 0;
g_hudun = 0;
feng2 = 0;
feng1 = false;
zhi1 = true;
Shield = 0;
longjuan = 0;
life = 0;
}
Battle::~Battle()
{
delete[]g_LifeValue;
delete[]g_Attack;//怪物攻击力
}
void Battle::Battle_start()
{
SetConsoleTitleA("塞尔达传说重制版");// 设置窗口标题
system("color E1");//设置背景颜色
system("mode con cols=75 lines=20");//调整窗口大小
system("cls");
cout << endl << endl<<endl << endl << endl << endl;
cout << " &&&&& &&&&& & &&&& & "<<endl;
cout << " & & & & && & & " << endl;
cout << " & &&&& & & & &&&&&" << endl;
cout << " & & & & && & & " << endl;
cout << " &&&&& &&&&& &&&& &&&& & &" << endl << endl << endl;
cout << " 塞尔达传说——重制版" << endl;
cout << " NJU 周哲昊 敬献" << endl; W W 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
cout << " 到了最后的危难时刻,塞尔达体内的封印之力终于觉醒," << endl; W
cout << " 但现在的她无法消灭盖侬,只能将自己和恶魔一起限制在城堡之中," << endl<<endl; W
cout << " 海拉鲁王国灭亡若干年后,伤愈的林克在地下遗迹中苏醒过来," << endl; W
cout << " 但是林克知道凭借自己现在的力量什么都做不了," << endl;W
cout << " 为了消灭灾厄,拯救公主,林克决定先去寻找被囚禁的英灵伙伴……" << endl << endl; W
char input;
do {
cout << " 按下空格继续" << endl;
input = _getch();
if (input == 32)
return;
} while (input != 32);
}
void Battle::Battle_Map() {
system("color F1");//设置背景颜色
system("mode con cols=60 lines=20");
system("cls");
cout << "************************************************************" <<endl;
cout << "1.继续冒险" << " ** ** ** ** ** ** "<<endl;
cout << "2.护送商队" << " ** ** ** ** ** ** "<< endl;
cout << "3.前往阿卡莱古代研究所" << " ** ** ** ** ** " << endl;
cout << "4.显示你的状态" << " ** ** ** ** "<< endl;
cout << "5.退出游戏" << " ** ** ** ** " << endl;
cout << "************************************************************" << endl;
cout << "请输入你的选择" << endl;
}
//初始化
void Battle::Battle_Init()
{
Battle_start();
Battle_Map();
int Choose;
cin >> Choose;//选择项目
while (Choose != 5) {
switch (Choose) {
case 1:
Battle_Adventure();//继续冒险
break;
case 2:
Battle_Husong();//护送商队
break;
case 3:
Battle_AncientTechLab();//阿卡莱古代研究所
break;
case 4:
Battle_zhuangtai();//显示状态
break;
default:
cout << "请输入正确选择!" << endl;
break;
}
cin >> Choose;
}
if (Choose == 5)
{
cout << "正在退出...." << endl;
}
}
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册