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

Upload New File

上级 e0d3bf0d
#include <Windows.h>
#include <iostream>
#include<conio.h>
#include "Prepare.h"
#define W Sleep(1000);//延时一秒
using namespace std;
//阿卡莱古代研究所
void Battle::Battle_AncientTechLab() {
system("cls");
if (process == 5)
{
system("color 84");
cout << endl << endl << endl << endl << endl << endl;
cout << " 世界毁灭,林克已死"; W W
Battle_Map();
}
else
{
cout << "欢迎来到阿卡莱古代研究所,这里可以出售古代科技配件强化装备!" << endl;
cout << "每个配件提供20攻击,100生命值,10防御值,限购一次" << endl;
cout << "1、遗迹科技配件1号(¥10)" << endl;
cout << "2、遗迹科技配件2号(¥50,通关第一个boss后解锁)" << endl;
cout << "3、遗迹科技配件3号(¥100,通关第二个boss后解锁)" << endl;
cout << "4、遗迹科技配件4号(¥150,通关第三个boss后解锁)" << endl << endl;
cout << "5、劲风斗篷(¥30,不会受到击飞效果)" << endl;
cout << "6、雷沙之冠(¥100,免疫雷元素伤害)" << endl;
cout << "7、重铸大师之剑(¥200,且需要四块大师之剑碎片)" << endl;
cout << "8、离开" << endl;
int GetArms;
cout << endl << "输入你的选择" << endl;
cin >> GetArms;
static int storage1 = 1, storage2 = 1, storage3 = 1, storage4 = 1, storage5 = 1, storage6 = 1, storage7 = 1;
while (8 != GetArms)
{
switch (GetArms) {
case 1:
if (Money < 10) {
cout << "金钱不足" << endl;
break;
}
if (storage1 < 1)
{
cout << "没有库存" << endl;
break;
}
cout << "购买成功" << endl;
Attack += 20;
Defense += 10;
LifeValue += 100;
Money -= 10;
storage1--;
break;
case 2:
if (process < 1)
cout << "此商品未解锁" << endl;
else
{
if (Money < 50) {
cout << "金钱不足" << endl;
break;
}
if (storage2 < 1)
{
cout << "没有库存" << endl;
break;
}
cout << "购买成功" << endl;
Attack += 20;
Defense += 10;
LifeValue += 100;
Money -= 50;
storage2--;
}
break;
case 3:
if (process < 2)
cout << "此商品未解锁" << endl;
else
{
if (Money < 100) {
cout << "金钱不足" << endl;
break;
}
if (storage3 < 1)
{
cout << "没有库存" << endl;
break;
}
cout << "购买成功" << endl;
Attack += 20;
Defense += 10;
LifeValue += 100;
Money -= 100;
storage3--;
}
break;
case 4:
if (process < 3)
cout << "此商品未解锁" << endl;
else
{
if (Money < 150) {
cout << "金钱不足" << endl;
break;
}
if (storage4 < 1)
{
cout << "没有库存" << endl;
break;
}
cout << "购买成功" << endl;
Attack += 20;
Defense += 10;
LifeValue += 100;
Money -= 150;
storage4--;
}
break;
case 5:
if (Money < 30) {
cout << "金钱不足" << endl;
break;
}
if (storage5 < 1)
{
cout << "没有库存" << endl;
break;
}
cout << "购买成功" << endl;
fengkang = true;
Money -= 30;
storage5--;
break;
case 6:
if (Money < 100) {
cout << "金钱不足" << endl;
break;
}
if (storage6 < 1)
{
cout << "没有库存" << endl;
break;
}
cout << "购买成功" << endl;
leikang = true;
Money -= 100;
storage6--;
break;
case 7:
if (process < 4)
cout << "你现在只拥有" << process << "块大师之剑碎片" << endl;
else
{
if (Money < 200) {
cout << "金钱不足" << endl;
break;
}
if (storage7 < 1)
{
cout << "你想要几把大师之剑啊喂!" << endl;
break;
}
cout << "************************************************************" << endl;
cout << "重铸成功" << endl;
cout << "你获得了大师之剑的认可,感觉体内充满了力量(攻击+60,生命+300,防御+5)" << endl;
cout << "************************************************************" << endl;
Attack += 60;
Defense += 5;
LifeValue += 300;
Money -= 200;
storage7--;
}
break;
default:
cout << "无效的选择,重新输入" << endl;
}
cout << "请输入你的选择" << endl;
cin >> GetArms;
}
if (8 == GetArms) {
cout << "谢谢惠顾,欢迎下次再来!" << endl; W
Battle_Map();
}
}
}
\ No newline at end of file
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册