1
已解决
杨家瑞
新手光能
新手光能
镜界战记
你会不会以为我转行了?
我告诉你
才怪!
小说同样会更
镜界同款游戏《镜界战记》
开始更新
0.11(测试版)开端部分
作者:沐
比较low 后面更新会有存档
请见谅啊
/*
镜界战记 0.11
作者:沐
0.11版较为low
请见谅
*/
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
struct human{
string name;
int aggressivity;
int blood;
int Defense;
string Skills1;
int Skillaggressivity;
int Skillnl;
};
struct smallboss{
string name;
int aggressivity;
int blood;
int Defense;
};
struct boss{
string name;
int aggressivity;
int blood;
int Defense;
};
void changecolor(){
system("color 01");
system("color 02");
system("color 03");
system("color 04");
system("color 05");
system("color 06");
system("color 07");
}
void output(){
Sleep(2000);
}
void clear(){
system("cls");
}
human a;
string name[11]={"盛海易","天宇","秋风","SY","夕灵浮","永连","森月","修影","空凌初","王魔沐"};
int blood[11]={125,128,115,118,135,130,310,180,350,400};
int aggressivity[11]={10,12,10,15,8,9,38,25,35,55};
int Defense[11]={5,6,5,3,8,7,16,15,16,17};
string Skills1[11]={"沐斩流","深海怒涛劈","飞凌踢","狂嗜砍","梦化反盾","海涛旋涡","亡月斩流","鬼影攻击","光萧长鸣","混辉风暴"};
int Skillaggressivity[11]={85,78,75,80,60,70,200,170,190,195};
int Skillnl[11]={20,30,30,30,20,20,30,30,25,30};
bool Possession[11]={0};
int Current;
string gamername;
int money=100;
int Experience=0;
int play;
int main(){
cout<<"由于该版本是0.11版本,所以简陋,后续会更新,请见谅。";
output();
clear();
for(int i=1;i<=5;i++){
cout<<"镜界战记-0.11";
changecolor();
clear();
}
cout<<"输入你的姓名。"<<endl;
getline(cin,gamername);
cout<<"你的姓名是:"<<gamername;
output();
clear();
cout<<"随机初始人物抽取中...";
output();
output();
srand((int)time(0));
int x=rand()%10;
cout<<endl<<"你的初始人物是:"<<name[x];
cout<<endl<<"人物初始血量:"<<blood[x];
cout<<endl<<"人物初始攻击:"<<aggressivity[x];
cout<<endl<<"人物初始防御:"<<Defense[x];
cout<<endl<<"人物技能:"<<Skills1[x];
cout<<endl<<"技能初始伤害:"<<Skillaggressivity[x];
cout<<endl<<"技能所需能量:"<<Skillnl[x];
Possession[x]=1;
Current=x;
output();
output();
clear();
while(true){
cout<<gamername<<",欢迎来到镜界营地!"<<endl;
cout<<"1-商人 2-镜兽 3-人物 4.剧情(**中)5-家园(**中) 6-探索(**中) 7.穿梭(**中) 8.更多(**中)";
cout<<endl<<"当前使用人物:"<<name[Current];
cout<<endl<<"血量:"<<blood[Current];
cout<<endl<<"攻击:"<<aggressivity[Current];
cout<<endl<<"防御:"<<Defense[Current];
cout<<endl<<"技能:"<<Skills1[Current];
cout<<endl<<"技能伤害:"<<Skillaggressivity[Current];
cout<<endl<<"技能所需能量:"<<Skillnl[Current];
cout<<endl<<"钱:"<<money;
cout<<endl<<"经验值:"<<Experience<<endl;
cin>>play;
}
}
杨家瑞在2022-09-12 19:22:46追加了内容
#include<bits/stdc++.h>
#include "codingtang.h"
#include<time.h>
#include<conio.h>
#include<Windows.h>
using namespace std;
string name,gname,wqm="手",hjm="空";
long long gly,hjnx=-1,hjz=0,pg=0,s=20,ssx,csg=1,wq=0,gjz=csg+wq,t,z=0,l=0,x=0,y=60,u,sy=2,dy=1,fms=0,jez=20,kfl=5,wjl=1,mb=0,mt=0,mg=0,zhongzi[4]={0,0,0,0},st=0,td=0,jd=0,wqnj=0,nj,jy=0,dj,jyzy=10,gtdj=0,gtnj=0,ftnj,tks=0,jks=0,mty=0,ysy[7]={0,0,0,0,0,0,0},yq=10,hsd=0,zk=1,mm,hb=0,hjj[4]={0,0,0,0},hjnj=0,wqq;
bool fmr=0,cldt=0,bydt=0,cly=0,tp=1,gk=0,dyt=0,zlld=0;//附魔室开关
char k,a,c;
char dg;
void js();//僵尸
void xb();//小白
void klp();//苦力怕
void xh();//小黑
void py();//平原
void mx();//冒险
int kk();//挖矿
void dd();//等待
int wk();// 挖矿2
void xl();//血量判断
void myl();//末影龙
void dl();//凋零
void dgw(string names,int b,int g,int j,int jyyy);//打怪
void zy();//字幕
void sh();//钓鱼
void sd();//商店
void bb();//背包
void jh();//交换
void cl();
void cd();//菜单
void wqgj();//武器工具
void wqy();//武器
void gzt();//工作台
void qt();//其它
void sjy();//升级
void home();//回家
void gjy();//工具
void rly();//熔炉
void czy();//村庄
void ldfd();
void xsjc();
void by();
void xhy();
void xby();
void hjy();
void tf();
void tf()
{
while(1)
{
cout<<"屠夫:你好,你要购买什么?\n0.离开 1.皮革 1煤炭\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(mt>=1)
{
mt--;
pg++;
cout<<"购买成功\n";
system("pause");
}
else
{
cout<<"煤炭不够了\n";
system("pause");
}
}
}
}
void hjy()
{
while(1)
{
system("cls");
cout<<"你要合成什么护甲?(护甲需要到背包自行装备)(材料*24)\n0.离开 1.皮革套装 2.铁套装 3.金套装 4.钻石套装\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(pg>=24)
{
hjj[0]++;
pg-=24;
cout<<"合成成功\n";
system("pause");
}
else
{
cout<<"合成失败\n";
system("pause");
}
}
else
if(a=='2')
{
if(td>=24)
{
hjj[1]++;
td-=24;
cout<<"合成成功\n";
system("pause");
}
else
{
cout<<"合成失败\n";
system("pause");
}
}
else
if(a=='3')
{
if(jd>=24)
{
hjj[2]++;
jd-=24;
cout<<"合成成功\n";
system("pause");
}
else
{
cout<<"合成失败\n";
system("pause");
}
}
else
if(a=='4')
{
if(z>=24)
{
hjj[3]++;
z-=24;
cout<<"合成成功\n";
system("pause");
}
else
{
cout<<"合成失败\n";
system("pause");
}
}
}
}
void xby()
{
while(1)
{
system("cls");
cout<<"是否继续探宝?\n0.退出 1.继续(火把*1)\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(hb>0)
{
}
else
{
cout<<"你的火把不够了。\n";
}
}
}
}
void xhy()
{
yq=10;
hsd=0;
while(1)
{
system("cls");
cout<<"潜水中,请注意氧气剩余量:"<<yq<<" 潜水深度:"<<hsd<<endl<<"0.离开 1.下潜 2.上浮 3.水肺药水 加5氧气(剩余:"<<ysy[6]<<") 3.建造补给站 200木板,50铁锭,氧气2 (当深度达到这里时,氧气加满)\n";
for(int i=0;i<yq;i++)
{
cout<<".";
}
cout<<endl;
a=getch();
if(a=='0')
{
if(hsd==0)
{
break;
}
else
{
cout<<"请先浮出水面。\n";
system("pause");
}
}
else
if(a=='1')
{
hsd++;
t=rand()%20;
if(t==0)
{
cout<<"发现海底神庙,是否进入?(有丰厚的奖励!)\n";
}
}
yq--;
if(yq<=0)
{
cout<<"你呛水了,还剩"<<s<<"滴血。\n";
yq=0;
s--;
xl();
system("pause");
}
}
}
void by()
{
if(bydt==0)
{
cout<<"请先在村庄购买通往冰原的地图\n";
system("pause");
}
else
{
while(1)
{
cout<<"欢迎来到冰原!你要去干什么?\n0.离开 1.下海 ";
if(gk==0)
{
cout<<"2.搭建港口 ";
}
else
{
cout<<"2.出海 ";
}
if(dyt==0)
{
cout<<"3搭建**\n";
}
else
{
cout<<"3.钓鱼\n";
}
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
xhy();
}
else
if(a=='2')
{
}
else
if(a=='3')
{
}
}
}
}
void xsjc()
{
while(1)
{
system("cls");
cout<<"请问你要查看什么方面的教程?\n0.退出 1.工具 2.挖矿 3.砍树 4.战斗 5.交易 6.耐久 7.背包 8.作者\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
cout<<"武器:增加一定的攻击值。\n镐子:等级越高,能采集的矿物种类就越多。\n斧子:加快砍树的速度。\n";
system("pause");
}
else
if(a=='2')
{
cout<<"挖矿需要使用镐子,否则就没有掉落物。在挖矿时有几率遇见怪物。\n";
system("pause");
}
else
if(a=='3')
{
cout<<"砍树时间越长,获得木头越多。\n";
system("pause");
}
else
if(a=='4')
{
cout<<"如果遇见怪物就会进入战斗。在战斗中可以攻击,逃跑和药水。在被动遇见怪物时无法逃跑,药水需要在村庄牧师处购买。\n";
system("pause");
}
else
if(a=='5')
{
cout<<"交易可以在村庄进行。村庄偶尔会遭到劫掠,如果打败劫掠就会得到村民的丰厚回报。\n";
system("pause");
}
else
if(a=='6')
{
cout<<"在游戏中,武器、镐子、斧子和护甲都是有耐久的,当耐久为0时效果消失。\n";
system("pause");
}
else
if(a=='7')
{
cout<<"在大多数的界面都是可以打开背包界面的,按e即可开启背包界面。\n";
system("pause");
}
else
if(a=='8')
{
cout<<"作者:YYH(如有转载请告知) QQ:2054196623(欢迎**扰,在验证消息中发送070801) 微信:没有……\n";
system("pause");
}
else
if(a=='e')
{
bb();
}
}
}
void ldfd()
{
system("cls");
cout<<"**提示:在林地府邸里有很多怪物,请确认做好准备再进入!(占领即可使用)\n1.进入\n2.离开";
a=getch();
if(a=='1')
{
if(zlld==0)
{
system("cls");
cout<<"你来到了大门口,一群卫道士冲了上来。\n";
Sleep(1000);
system("cls");
dgw("卫道士",20,8,10,20);
dgw("卫道士",20,8,10,20);
dgw("卫道士",20,8,10,20);
dgw("卫道士",20,8,10,20);
system("cls");
cout<<"你进入了大厅,有一群唤魔者来了。\n";
Sleep(1000);
system("cls");
dgw("唤魔者",30,7,10,20);
dgw("唤魔者",30,7,10,20);
dgw("唤魔者",30,7,10,20);
dgw("唤魔者",30,7,10,20);
cout<<"又有一群怪物来了。\n";
Sleep(1000);
system("cls");
js();
js();
xb();
xb();
klp();
klp();
xh();
xh();
cout<<"你已经占领了林地府邸。\n";
zlld=1;
system("pause");
}
else
{
while(1)
{
system("cls");
cout<<"欢迎来到林地府邸,你要干什么?\n1.**(刷经验) 2.寻宝/n";
a=getch();
if(a=='1')
{
time_t c_start, t_start, c_end, t_end;
c_start = clock();
t_start = time(NULL);
cout << "正在**按下任意键停止" << endl;
_getch();
c_end = clock();
t_end = time(NULL);
cout << "你获得" << (int)difftime(c_end, c_start) / 10 << "经验" << endl;
jy+= (int)difftime(c_end, c_start) / 10;
sjy();
system("pause");
}
}
}
}
else
if(a=='e')
{
bb();
}
}
void czy()
{
int tttt=rand()%10;
if(tttt==0)
{
cout<<"这个村庄正在遭到劫掠,你是否出手相助?\n1.相助\n2.离开";
a=getch();
if(a=='1')
{
dgw("劫掠者",20,6,100,50);
dgw("劫掠者",20,6,100,50);
dgw("劫掠者",20,6,100,50);
dgw("劫掠者",20,6,100,50);
dgw("劫掠兽",100,10,100,50);
cout<<"村民们都很感谢你,给你了很多绿宝石\n";
l+=100;
system ("pause");
}
else
{
cout<<"你悄悄地回了家";
cd();
system ("pause");
}
}
while(1)
{
system("cls");
cout<<"你要去找谁?\n0.离开\n1.制图师\n2.制箭师\n3.图书**员\n4.牧师\n5.屠夫";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
while(1)
{
system("cls");
if(name!="Nouth")
cout<<"制图师:你好,请问你要买什么?\n0.离开\n1.通往从林的地图 100绿宝石\n2.通往冰原的地图 100绿宝石\n";
else
cout<<"制图师:Nouth大人,你好。\n0.离开\n1.通往从林的地图 50绿宝石\n2.通往冰原的地图 50绿宝石\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(cldt==1)
{
cout<<"你已经买过这件物品了\n";
system ("pause");
}
else
if(l<100)
{
cout<<"绿宝石不够了\n";
system ("pause");
}
else
{
cout<<"购买成功\n";
l-=100;
cldt=1;
system ("pause");
}
}
else
if(a=='2')
{
if(bydt==1)
{
cout<<"你已经买过这件物品了\n";
system ("pause");
}
else
if(l<100)
{
cout<<"绿宝石不够了\n";
system ("pause");
}
else
{
cout<<"购买成功\n";
l-=100;
bydt=1;
system ("pause");
}
}
}
}
else
if(a=='4')
{
while(1)
{
system("cls");
if(zk==1)
cout<<"牧师:你好,请问你要买什么?\n0.离开\n1.治疗药水I:血量加5 20绿宝石\n2.治疗药水II:血量加10 30绿宝石\n3.治疗药水III:血量加15 40绿宝石\n4.伤害药水I:敌人血量减5 10绿宝石\n5.伤害药水II:敌人血量减10 15绿宝石\n6.伤害药水III:敌人血量减15 20绿宝石\n";
else
cout<<"牧师:你好Nouth大人,请问你要买什么?\n0.离开\n1.治疗药水I:血量加5 10绿宝石\n2.治疗药水II:血量加10 15绿宝石\n3.治疗药水III:血量加15 20绿宝石\n4.伤害药水I:敌人血量减5 5绿宝石\n5.伤害药水II:敌人血量减10 7绿宝石\n6.伤害药水III:敌人血量减15 10绿宝石\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(l>=20)
{
cout<<"购买成功\n";
l-=20/zk;
ysy[0]++;
system ("pause");
}
else
{
cout<<"绿宝石不够了\n";
system ("pause");
}
}
else
if(a=='2')
{
if(l>=30)
{
cout<<"购买成功\n";
l-=30/zk;
ysy[1]++;
system ("pause");
}
else
{
cout<<"绿宝石不够了\n";
system ("pause");
}
}
else
if(a=='3')
{
if(l>=40)
{
cout<<"购买成功\n";
l-=40/zk;
ysy[2]++;
system ("pause");
}
else
{
cout<<"绿宝石不够了\n";
system ("pause");
}
}
else
if(a=='4')
{
if(l>=10)
{
cout<<"购买成功\n";
l-=10/zk;
ysy[3]++;
system ("pause");
}
else
{
cout<<"绿宝石不够了\n";
system ("pause");
}
}
else
if(a=='5')
{
if(l>=15)
{
cout<<"购买成功\n";
l-=15/zk;
ysy[4]++;
system ("pause");
}
else
{
cout<<"绿宝石不够了\n";
system ("pause");
}
}
else
if(a=='6')
{
if(l>=20)
{
cout<<"购买成功\n";
l-=20/zk;
ysy[5]++;
system ("pause");
}
else
{
cout<<"绿宝石不够了\n";
system ("pause");
}
}
}
}
else
if(a=='5')
{
tf();
}
else
if(a=='e')
{
bb();
}
}
}
void rly()
{
while(1)
{
system("cls");
cout<<"煤炭:"<<mty<<endl<<"你要炼造什么?\n0.离开\n1.铁矿石(剩余"<<tks<<")\n2.金矿石(剩余"<<jks<<"个)\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
cout<<"已经为你炼造了最多\n";
if(mty<tks)
{
td+=mty;
tks-=mty;
mty=0;
}
else
{
td+=tks;
mty-=tks;
tks=0;
}
system ("pause");
}
else
if(a=='2')
{
cout<<"已经为你炼造了最多\n";
if(mty<jks)
{
jd+=mty;
jks-=mty;
mty=0;
}
else
{
jd+=jks;
mty-=jks;
jks=0;
}
system ("pause");
}
else
if(a=='e')
{
bb();
}
}
}
void gjy()
{
while(1)
{
system("cls");
cout<<"0.退出 1.木镐 2.石镐 3.铁镐 4.金镐 5.钻石镐 6.木斧 7.石斧 8.铁斧 9.金斧 a.钻石斧"<<endl;
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(gtdj>1)
{
cout<<"你已经拥有更好的镐子了";
system ("pause");
gjy();
}
if(mb>=3&&mg>=2)
{
gtdj=1;
gtnj=60;
mb-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='2')
{
if(gtdj>2)
{
cout<<"你已经拥有更好的镐子了";
system ("pause");
gjy();
}
if(mg>=2&&st>=3)
{
gtdj=2;
gtnj=132;
st-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='3')
{
if(gtdj>3)
{
cout<<"你已经拥有更好的镐子了";
system ("pause");
gjy();
}
if(mg>=2&&td>=3)
{
gtdj=3;
gtnj=251;
td-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='4')
{
if(gtdj>1)
{
cout<<"你已经拥有更好的镐子了";
system ("pause");
gjy();
}
if(mg>=2&&jd>=3)
{
gtdj=1;
gtnj=44;
jd-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='5')
{
if(mg>=2&&z>=3)
{
gtdj=4;
gtnj=1562;
z-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='6')
{
if(kfl<4)
{
cout<<"你已经拥有更好的斧子了";
system ("pause");
gjy();
}
if(mg>=2&&mb>=3)
{
kfl=4;
ftnj=60;
mb-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='7')
{
if(kfl<3)
{
cout<<"你已经拥有更好的斧子了";
system ("pause");
gjy();
}
if(mg>=2&&st>=3)
{
kfl=3;
ftnj=132;
st-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='8')
{
if(kfl<2)
{
cout<<"你已经拥有更好的斧子了";
system ("pause");
gjy();
}
if(mg>=2&&td>=3)
{
kfl=2;
ftnj=251;
td-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='9')
{
if(kfl<4)
{
cout<<"你已经拥有更好的斧子了";
system ("pause");
gjy();
}
if(mg>=2&&jd>=3)
{
kfl=4;
ftnj=44;
jd-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='a')
{
if(mg>=2&&z>=3)
{
kfl=1;
ftnj=1562;
z-=3;
mg-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='e')
{
bb();
}
}
}
void home()
{
cout<<"回家了!"<<endl;
Sleep(500);
s=ssx;
cout<<"已经为你加满血了"<<endl;
system ("pause");
}
void sjy()
{
while(jy>=jyzy)
{
dj++;
jy-=jyzy;
jyzy*=2;
cout<<"你升级了,现等级为"<<dj<<endl;
Sleep(500);
}
}
void qt()
{
while(1)
{
system("cls");
cout<<"0.退出 1.木板 2.木棍"<<endl;
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(mt>=1)
{
mb+=4;
mt--;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='2')
{
if(mb>=2)
{
mg+=4;
mb-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='e')
{
bb();
}
}
}
void gj()
{
}
void wqy()
{
while(1)
{
system("cls");
cout<<"0.退出 1.木剑 2.石剑 3.铁剑 4.金剑 5.钻石剑"<<endl;
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
if(wq>4)
{
cout<<"你已经拥有更好的武器了";
system ("pause");
wqgj();
}
if(mb>=2&&mg>=1)
{
wq=4;
wqnj=60;
wqm="木剑";
mg--;
mb-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='2')
{
if(wq>5)
{
cout<<"你已经拥有更好的武器了";
system ("pause");
wqgj();
}
if(mg>=1&&st>=2)
{
wq=5;
wqnj=126;
mg--;
st-=2;
wqm="石剑";
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='3')
{
if(wq>6)
{
cout<<"你已经拥有更好的武器了";
system ("pause");
wqgj();
}
if(mg>=1&&td>=2)
{
wq=6;
wqnj=251;
mg--;
td-=2;
wqm="铁剑";
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='4')
{
if(wq>4)
{
cout<<"你已经拥有更好的武器了";
system ("pause");
wqgj();
}
if(mg>=1&&jd>=2)
{
wq=4;
wqnj=44;
mg--;
jd-=2;
wqm="金剑";
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='5')
{
if(mg>=1&&z>=2)
{
wq=7;
wqnj=1562;
wqm="钻石剑";
mg--;
z-=2;
cout<<"合成成功"<<endl;
system ("pause");
}
else
{
cout<<"合成失败"<<endl;
system ("pause");
}
}
else
if(a=='e')
{
bb();
}
}
}
void wqgj()
{
while(1)
{
system("cls");
cout<<"请问你要合成什么?"<<endl<<"0.退出 1.武器 2.盔甲 3.工具"<<endl;
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
wqy();
}
else
if(a=='2')
{
hjy();
}
else
if(a=='3')
{
gjy();
}
else
if(a=='e')
{
bb();
}
}
}
void gzt()
{
while(1)
{
system("cls");
cout<<"请问你要合成什么类型的物品:"<<endl<<"0.退出 1.武器工具 2.家具 3.建筑 4.其它"<<endl;
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
wqgj();
}
else
if(a=='2')
{
}
else
if(a=='3')
{
}
else
if(a=='4')
{
qt();
}
else
if(a=='e')
{
bb();
}
}
}
void cl()
{
if(cldt==0)
{
cout<<"请先在村庄购买通往丛林的地图\n";
system ("pause");
cd();
}
else
{
cly=1;
while(1)
{
system("cls");
cout<<"欢迎来到丛林!(友情提示:在这里你可以得到一些平原无法得到的东西)\n0.离开 1.挖矿 2.砍树 3.寻找林地府邸\n";
a=getch();
if(a=='0')
{
cly=0;
break;
}
else
if(a=='1')
{
system("cls");
cout<<"正在搜索矿洞"<<endl;
Sleep(2000);
wk();
}
else
if(a=='2')
{
system("cls");
if(ftnj>0)
{
ftnj--;
}
else
{
kfl=5;
}
time_t c_start, t_start, c_end, t_end;
c_start = clock();
t_start = time(NULL);
cout << "正在砍树,按下任意键停止" << endl;
_getch();
c_end = clock();
t_end = time(NULL);
cout << "你获得" << (int)difftime(c_end, c_start) / (500*kfl) << "木头" << endl;
mt+= (int)difftime(c_end, c_start) / (500*kfl);
system("pause");
}
else
if(a=='3')
{
ldfd();
}
else
if(a=='e')
{
bb();
}
}
}
}
void py()
{
while(1)
{
tp=1;
system("cls");
cout<<"欢迎来到平原!你可以:"<<endl<<"0.离开 1.搜寻小麦种子(暂时没用) 2.砍树 3.刷怪 4.挖矿"<<endl;
char pyy=getch();
if(pyy=='0')
{
break;
}
else
if(pyy=='1')
{
while(1)
{
system("cls");
Sleep(1000);
t=rand()%10;
cout<<"获得小麦种子"<<t<<"个"<<endl;
zhongzi[0]+=t;
cout<<"你要退出吗?(按0)"<<endl;
pyy=getch();
if(pyy=='0')
{
break;
}
else
{
continue;
}
}
}
else
if(pyy=='2')
{
system("cls");
if(ftnj>0)
{
ftnj--;
}
else
{
kfl=5;
}
time_t c_start, t_start, c_end, t_end;
c_start = clock();
t_start = time(NULL);
cout << "正在砍树,按下任意键停止" << endl;
_getch();
c_end = clock();
t_end = time(NULL);
cout << "你获得" << (int)difftime(c_end, c_start) / (1000*kfl) << "木头" << endl;
mt+= (int)difftime(c_end, c_start) / (1000*kfl);
system("pause");
}
else
if(pyy=='3')
{
while(1)
{
system("cls");
cout<<"是否继续刷怪?\n0.退出 1.继续\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
tp=0;
int sj=rand()%4;
if(sj==0)
{
js();
}
else
if(sj==1)
{
xb();
}
else
if(sj==2)
{
klp();
}
else
{
xh();
}
}
}
}
else
if(pyy=='4')
{
system("cls");
cout<<"正在搜索矿洞"<<endl;
Sleep(1000);
wk();
}
if(pyy=='e')
{
bb();
}
}
}
void mx()
{
while(1)
{
system("cls");
cout<<"你要去哪里?"<<endl<<"0.返回 1.平原 2.丛林 3.冰原 4.村庄 5.下界 6.末地"<<endl;
char mxy=getch();
if(mxy=='0')
{
break;
}
else
if(mxy=='1')
{
py();
}
else
if(mxy=='2')
{
cl();
}
else
if(mxy=='4')
{
czy();
}
else
if(mxy=='e')
{
bb();
}
}
}
int kk()
{
k=getch();
if(k=='1')
{
x-=1;
}
else
if(k=='2')
{
x+=1;
}
else
if(k=='3')
{
y-=1;
}
else
if(k=='4')
{
return 1;
}
else
if(a=='e')
{
bb();
}
int gw=rand()%10;
if(gw==0&&k!='e')
{
js();
}
else
if(gw==1&&k!='e')
{
xb();
}
if(gtnj>0)
gtnj--;
if(gtnj==0)
{
gtdj=0;
}
if(y<=30&&y>10&>dj>=3&&cly==1)
{
int j=rand()%sy;
l+=j;
if(j!=0)
cout<<"获得绿宝石"<<j<<"颗"<<endl;
else
cout<<"什么都没有!"<<endl;
Sleep(300);
}
if(y<=10&>dj>=3)
{
int j=rand()%sy;
z+=j;
if(j!=0)
cout<<"获得钻石"<<j<<"颗"<<endl;
else
cout<<"什么都没有!"<<endl;
Sleep(300);
}
if(y>=10&>dj>=2)
{
int j=rand()%sy;
tks+=j;
if(j!=0)
cout<<"获得铁矿石"<<j<<"个"<<endl;
else
cout<<"什么都没有!"<<endl;
Sleep(300);
}
if(y<=30&>dj>=3&&cly==1)
{
int j=rand()%sy;
jks+=j;
if(j!=0)
cout<<"获得金矿石"<<j<<"个"<<endl;
else
cout<<"什么都没有!"<<endl;
Sleep(300);
}
if(gtdj>=1)
{
int j=rand()%sy;
st+=j;
if(j!=0)
cout<<"获得石头"<<j<<"个"<<endl;
else
cout<<"什么都没有!"<<endl;
Sleep(300);
}
if(y<=55&&y>10&>dj>=1)
{
int j=rand()%sy;
mty+=j;
if(j!=0)
cout<<"获得煤炭"<<j<<"颗"<<endl;
else
cout<<"什么都没有!"<<endl;
Sleep(300);
}
return 0;
}
int wk()
{
while(1)
{
system("cls");
cout<<"1.向左挖 2.向右挖 3.向下挖 4.离开"<<endl<<"x坐标:"<<x<<","<<"y坐标:"<<y<<"."<<endl;
if(kk()==1)
{
return 0;
}
}
}
void xl()
{
if(s<=0)
{
cout<<"你失败了"<<endl;
Sleep(1000);
s=20;
cd();
}
}
void js()
{
gname="僵尸";
dgw(gname,20,2,6,10);
}
void xb()
{
gname="小白";
dgw(gname,20,4,10,20);
}
void klp()
{
gname="苦力怕";
dgw(gname,20,0,30,30);
}
void xh()
{
gname="小黑";
dgw(gname,40,10,50,40);
}
void myl()
{
gname="末影龙";
dgw(gname,200,20,0,1000);
}
void dl()
{
gname="凋零";
dgw(gname,300,50,1000,0);
}
void dgw(string names,int b,int g,int j,int jyyy)
{
system("cls");
cout<<"一只"<<names<<"来袭"<<endl;
Sleep(1000);
while(1)
{
system("cls");
cout<<"你要干什么?"<<endl<<"1.攻击 2.逃跑 3.药水\n";
a=getch();
if(a=='3')
{
system("cls");
cout<<"你要使用什么药水?\n1.治疗药水I:血量加5*"<<ysy[0]<<"\n2.治疗药水II:血量加10*"<<ysy[1]<<"\n3.治疗药水III:血量加15*"<<ysy[2]<<"\n4.伤害药水I:敌人血量减5*"<<ysy[3]<<"\n5.伤害药水II:敌人血量减10*"<<ysy[4]<<"\n6.伤害药水III:敌人血量减15*"<<ysy[5]<<"\n";
a=getch();
if(a=='1')
{
if(ysy[0]>0)
{
s+=5;
ysy[0]--;
cout<<"使用成功\n";
system ("pause");
}
else
{
cout<<"使用失败\n";
system ("pause");
}
}
else
if(a=='2')
{
if(ysy[1]>0)
{
s+=10;
ysy[1]--;
cout<<"使用成功\n";
system ("pause");
}
else
{
cout<<"使用失败\n";
system ("pause");
}
}
else
if(a=='3')
{
if(ysy[2]>0)
{
s+=15;
ysy[2]--;
cout<<"使用成功\n";
system ("pause");
}
else
{
cout<<"使用失败\n";
system ("pause");
}
}
else
if(a=='4')
{
if(ysy[3]>0)
{
b-=5;
ysy[3]--;
cout<<"使用成功\n";
system ("pause");
}
else
{
cout<<"使用失败\n";
system ("pause");
}
}
else
if(a=='5')
{
if(ysy[4]>0)
{
b-=10;
ysy[4]--;
cout<<"使用成功\n";
system ("pause");
}
else
{
cout<<"使用失败\n";
system ("pause");
}
}
else
if(a=='6')
{
if(ysy[5]>0)
{
b-=15;
ysy[5]--;
cout<<"使用成功\n";
system ("pause");
}
else
{
cout<<"使用失败\n";
system ("pause");
}
}
}
else
if(a=='2')
{
if(tp==0)
{
cout<<"逃跑成功"<<endl;
system ("pause");
break;
}
else
{
cout<<"逃跑失败"<<endl;
system ("pause");
}
}
else
if(a=='1')
{
cout<<"你对"<<names<<"造成了"<<gjz<<"点伤害\n";
b-=gjz;
if(wqnj==0)
{
wqm="手";
wq=0;
}
else
{
wqnj--;
}
}
if(s>ssx)
{
s=ssx;
}
if(b<0)
{
b=0;
}
cout<<names<<"还有"<<b<<"滴血\n";
if(b<=0)
{
cout<<"你还有"<<s<<"滴血\n";
int jl=rand()%j;
if(jl!=0)
{
cout<<"获得绿宝石"<<jl<<"颗\n";
l+=jl;
}
else
{
cout<<names<<"太穷了,什么也没掉落\n";
}
jy+=jyyy;
sjy();
system ("pause");
break;
}
if(hjnj>0)
{
hjnj--;
if(hjnj==0)
{
hjz=0;
hjj[hjnx]--;
}
}
if(g>=hjz)
{
cout<<names<<"对你"<<"造成了"<<g-hjz<<"点伤害\n";
s-=g-hjz;
}
else
{
cout<<names<<"对你"<<"造成了"<<0<<"点伤害\n";
}
cout<<"你还有"<<s<<"滴血\n";
system ("pause");
xl();
}
}
int op=0;
void zy()
{
gjz=csg+wq;
y=60;x=0;
string hh="请问你要去干什么?";
system("cls");
cout<<"欢迎回来:"<<name<<endl;
if(op==0)
{
cout<<"M";Sleep(100);cout<<"C";Sleep(100);cout<<"1";Sleep(100);cout<<".";Sleep(100);cout<<"2";Sleep(100);cout<<".";Sleep(100);cout<<"3";Sleep(100);cout<<endl;
}
else
{
cout<<"MC1.2.3";
}
if(op==0)
for(int i=0;i<hh.size();i++)
{
cout<<hh[i];
Sleep(100);
}
else
cout<<endl<<hh;
op=1;
cout<<endl<<"1.冒险 2.工具 3.回家 4.熔炉 5.提示 6.保存"<<endl<<"其它按照传统MC"<<endl;
a=0;
system("color 0");
a=getch();
op=1;
}
void bb()
{
while(1)
{
system("cls");
cout<<"请问你要看什么?\n0.离开 1.矿物 2.工具 3.药水 4.属** 5.其他 6.护甲\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
system("cls");
cout<<"石头"<<st<<"个,"<<"铁"<<td<<"个,"<<"金"<<jd<<"个,"<<"绿宝石"<<l<<"个,"<<"钻石"<<z<<"个\n"<<"铁矿石"<<tks<<"个\n金矿石"<<jks<<"个\n煤炭"<<mty<<"个\n";
system ("pause");
}
else
if(a=='2')
{
system("cls");
cout<<"武器:"<<wqm<<"\n耐久:"<<wqnj<<"\n镐子等级"<<gtdj<<"\n耐久:"<<gtnj<<"\n砍伐力"<<kfl<<endl;
system ("pause");
}
else
if(a=='3')
{
system("cls");
cout<<"治疗药水I "<<ysy[0]<<",治疗药水II "<<ysy[1]<<",治疗药水III "<<ysy[2]<<",伤害药水I "<<ysy[3]<<",伤害药水II"<<ysy[4]<<",伤害药水III "<<ysy[5]<<endl;
system ("pause");
}
if(a=='4')
{
system("cls");
cout<<"生命值"<<s<<endl;
system ("pause");
}
else
if(a=='5')
{
system("cls");
cout<<"木头"<<mt<<"个,"<<"木板"<<mb<<"个,"<<"木棍"<<mg<<"个\n";
system ("pause");
}
else
if(a=='6')
{
while(1)
{
system("cls");
cout<<"现装备护甲:"<<hjm<<endl<<"库存护甲:\n1.皮革护甲:"<<hjj[0]<<endl<<"2.铁护甲:"<<hjj[1]<<endl<<"3.金护甲:"<<hjj[2]<<endl<<"4.钻石护甲:"<<hjj[3]<<endl<<"0.退出 1.卸下当前护甲 2.装备护甲\n";
a=getch();
if(a=='0')
{
break;
}
else
if(a=='1')
{
cout<<"卸下成功\n";
hjm="空";
hjz=0;
hjnj=0;
system("pause");
}
else
if(a=='2')
{
if(hjm!="空")
{
cout<<"请先卸下当前护甲\n";
system("pause");
}
else
{
cout<<"请输入护甲前面的编码。\n";
a=getch();
if(a=='1')
{
if(hjj[0]>0)
{
hjm="皮革护甲";
hjnx=0;
cout<<"装备成功\n";
hjz=2;
hjnj=60;
system("pause");
}
else
{
cout<<"物品不足\n";
system("pause");
}
}
else
if(a=='2')
{
if(hjj[1]>0)
{
hjm="铁护甲";
hjnx=1;
cout<<"装备成功\n";
hjz=4;
hjnj=256;
system("pause");
}
else
{
cout<<"物品不足\n";
system("pause");
}
}
else
if(a=='3')
{
hjm="金护甲";
if(hjj[2]>0)
{
hjnx=2;
cout<<"装备成功\n";
hjz=2;
hjnj=40;
system("pause");
}
else
{
cout<<"物品不足\n";
system("pause");
}
}
if(a=='4')
{
if(hjj[3]>0)
{
hjm="钻石护甲";
hjnx=3;
cout<<"装备成功\n";
hjz=7;
hjnj=1562;
system("pause");
}
else
{
cout<<"物品不足\n";
system("pause");
}
}
}
}
}
}
}
}
void jh()
{
char jh;
long long kw;
system("cls");
cout<<"请问你要交换什么矿物?"<<endl<<"1.绿宝石->钻石" <<endl;
jh=getch();
if(jh=='1')
{
cout<<"4颗绿宝石换1颗钻石。"<<endl<<"你有绿宝石"<<l<<"颗"<<endl<<"请问你要换几颗钻石?"<<endl;
cin>>kw;
if(l>=4*kw)
{
z+=kw;
l-=4*kw;
cout<<"交换成功"<<endl;
system ("pause");
}
else
{
cout<<"交换失败"<<endl;
system ("pause");
}
}
}
void sg()
{
while(1)
{
system("cls");
char xgq;
cout<<"请问你要修改什么?"<<endl<<"0.退出 1.血量 2.绿宝石 3.钻石 4.铁 5.金 6.血量上限"<<endl;
xgq=getch();
if(xgq=='0')
{
break;
}
if(xgq=='1')
{
cout<<"请输入修改值"<<endl;;
cin>>s;
cout<<"修改成功"<<endl;
system ("pause");
}
if(xgq=='2')
{
cout<<"请输入修改值"<<endl;;
cin>>l;
cout<<"修改成功"<<endl;
system ("pause");
}
if(xgq=='3')
{
cout<<"请输入修改值"<<endl;;
cin>>z;
cout<<"修改成功"<<endl;
system ("pause");
}
if(xgq=='4')
{
cout<<"请输入修改值"<<endl;;
cin>>td;
cout<<"修改成功"<<endl;
system ("pause");
}
if(xgq=='5')
{
cout<<"请输入修改值"<<endl;;
cin>>jd;
cout<<"修改成功"<<endl;
system ("pause");
}
if(xgq=='6')
{
cout<<"请输入修改值"<<endl;;
cin>>ssx;
cout<<"修改成功"<<endl;
system ("pause");
}
}
}
void cd()
{
while(1)
{
zy();
gjz=1+wq;
if(a=='1')
{
mx();
}
else
if(a=='2')
{
gzt();
}
else
if(a=='3')
{
home();
}
else
if(a=='4')
{
rly();
}
else
if(a=='5')
{
xsjc();
}
else
if(a=='6')
{
mm=(z+l)%1000000;
ofstream ofile;
ofile.open("mc.Minecraft");
ofile<<s<<" "<<wq<<" "<<z<<" "<<l<<" "<<z<<" "<<kfl<<" "<<mb<<" "<<mt<<" "<<mg<<" "<<st<<" "<<td<<" "<<jd<<" "<<wqnj<<" "<<jy<<" "<<jyzy<<" "<<gtdj<<" "<<gtnj<<" "<<ftnj<<" "<<tks<<" "<<jks<<" "<<mty<<" "<<ysy[0]<<" "<<ysy[1]<<" "<<ysy[2]<<" "<<ysy[3]<<" "<<ysy[4]<<" "<<ysy[5]<<" "<<cldt<<" "<<bydt<<" "<<wqm<<" "<<name<<" "<<zlld<<" "<<mm<<" "<<ssx<<" "<<hb<<" "<<hjz<<" "<<pg<<" "<<hjnj<<" "<<hjj[0]<<" "<<hjj[1]<<" "<<hjj[2]<<" "<<hjj[3]<<" "<<hjnx<<" "<<gly<<" "<<hjm;
ofile.close();
cout<<"存档成功"<<endl;
system ("pause");
}
else
if(a=='y'&&gly==801)
{
sg();
}
if(a=='e')
{
bb();
}
}
}
int main()
{
createConsole("文本游戏");
int hhh;
cout<<"欢迎来到我的世界文字版1.2.3。(增加护甲值,游戏帮助提升)"<<endl;
cout<<"请问你要打开什么模式?"<<endl<<"1.新建世界"<<endl<<"2.加载存档"<<endl;
c=getch();
ssx=20;
if(c=='1')
{
cout<<"请输入你的名字"<<endl;
cin>>name;
if(name=="Nouth")
{
zk=2;
l=10000;
z=10000;
wq=100;
wqm="创始者之剑";
wqnj=100000000;
s=1000;
ssx=1000;
}
else
if(name=="Herobrine")
{
wq=10000;
wqm="黑曜石";
wqnj=-1;
s=100;
ssx=100;
}
else
if(name=="YYH")
{
cout<<"测试版,请普通玩家不要进入。\n1.开启 2. 不开启\n";
a=getch();
if(a=='2')
{
cd();
}
cin>>gly;
}
cd();
}
else
if(c=='2')
{
ifstream ifile;
ifile.open("mc.Minecraft");
ifile>>s>>wq>>z>>l>>z>>kfl>>mb>>mt>>mg>>st>>td>>jd>>wqnj>>jy>>jyzy>>gtdj>>gtnj>>ftnj>>tks>>bydt>>mty>>ysy[0]>>ysy[1]>>ysy[2]>>ysy[3]>>ysy[4]>>ysy[5]>>cldt>>bydt>>wqm>>name>>zlld>>mm>>ssx>>hb>>hjz>>pg>>hjnj>>hjj[0]>>hjj[1]>>hjj[2]>>hjj[3]>>hjnx>>gly>>hjm;
if(mm!=(z+l)%1000000)
{
cout<<"作者很反感作弊,帮你把存档删了。(诚信为本)\n";
ofstream ofile;
ofile.open("mc.Minecraft");
ofile.close();
return 0;
}
cd();
}
return 0;
}
即将发布
0
已采纳
郝天尘
资深光能
资深光能
本人加工了一下还没写完
/*
镜界战记 0.11
作者:沐
改编者:郝天尘
1.0版较为low
请见谅
*/
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
struct human{
string name;
int aggressivity;
int blood;
int Defense;
string Skills1;
int Skillaggressivity;
int Skillnl;
};
struct smallboss{
string name;
int aggressivity;
int blood;
int Defense;
};
struct boss{
string name;
int aggressivity;
int blood;
int Defense;
};
void changecolor(){
system("color 01");
system("color 02");
system("color 03");
system("color 04");
system("color 05");
system("color 06");
system("color 07");
}
void output(){
Sleep(2000);
}
void clear(){
system("cls");
}
human a;
string name[11]={"盛海易","天宇","秋风","SY","夕灵浮","永连","森月","修影","空凌初","王魔沐"};
int blood[11]={125,128,115,118,135,130,310,180,350,400};
int aggressivity[11]={10,12,10,15,8,9,38,25,35,55};
int Defense[11]={5,6,5,3,8,7,16,15,16,17};
string Skills1[11]={"沐斩流","深海怒涛劈","飞凌踢","狂嗜砍","梦化反盾","海涛旋涡","亡月斩流","鬼影攻击","光萧长鸣","混辉风暴"};
int Skillaggressivity[11]={85,78,75,80,60,70,200,170,190,195};
int Skillnl[11]={20,30,30,30,20,20,30,30,25,30};
bool Possession[11]={0};
int Current;
string gamername;
int Experience=0;
int play;
int jb=500;
int wp[25];
int main(){
cout<<"由于该版本是1.0版本,所以简陋,后续会更新,请见谅。";
output();
clear();
for(int i=1;i<=5;i++){
cout<<"镜界战记-0.11";
changecolor();
clear();
}
cout<<"输入你的姓名。"<<endl;
getline(cin,gamername);
cout<<"你的姓名是:"<<gamername;
output();
clear();
cout<<"随机初始人物抽取中...";
output();
output();
srand((int)time(0));
int x=rand()%10;
cout<<endl<<"你的初始人物是:"<<name[x];
cout<<endl<<"人物初始血量:"<<blood[x];
cout<<endl<<"人物初始攻击:"<<aggressivity[x];
cout<<endl<<"人物初始防御:"<<Defense[x];
cout<<endl<<"人物技能:"<<Skills1[x];
cout<<endl<<"技能初始伤害:"<<Skillaggressivity[x];
cout<<endl<<"技能所需能量:"<<Skillnl[x];
Possession[x]=1;
Current=x;
output();
output();
clear();
while(true){
cout<<gamername<<",欢迎来到镜界营地!"<<endl;
cout<<"0-退出 1-商人 2-镜兽 3-人物 4.剧情(更新中)5-家园(更新中) 6-探索(更新中) 7.穿梭(更新中) 8.更多(更新中)9.状态 10.升级 11.规则查询";
cin>>play;
if(play==0){
break;
}
if(play==1){
int sr;
cout<<"请选择你要找的商人:"<<endl;
cout<<"1-乔尔加里森 2-兰德尔菲舍(**中) 3-托马斯爱德华(**中) 4-弗拉德伦(**中)";
cin>>sr;
if(sr>5&&sr<1){
cout<<"错误输入,请重新输入:";
cin>>sr;
}else if(sr==1){
cout<<" 我这里有点好货你要不要?"<<endl;
cout<<" 1-出售 2-购买";
int yz;
cin>>yz;
if(yz!=1&&yz!=2){
cout<<"错误输入,请重新输入:";
cin>>yz;
}else if(yz==1){
cout<<"1.经验药 2.回血包 3.技能伤害(+1) 4.技能能量低级 5.技能能量中级 6.技能能量高级";
int yx;
cin>>yx;
if(yx==1){
cout<<"经验药300块,当前药草为"<<wp[1]<<"个"<<endl;
cout<<"是否出售"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(wp[1]<1){
cout<<"您的药草不足";
}else if(PD=='Y'||PD=='y'){
jb+=300;
wp[1]-=1;
}
}else if(yx==2){
cout<<"回血包500块,当前回血包为"<<wp[2]<<"个"<<endl;
cout<<"是否出售"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(wp[2]<1){
cout<<"您的回血包不足";
}else if(PD=='Y'||PD=='y'){
jb+=500;
wp[2]-=1;
}
}else if(yx==3){
cout<<"技能伤害700块,当前技能伤害为"<<wp[3]<<"个"<<endl;
cout<<"是否出售"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(wp[3]<1){
cout<<"您的技能伤害不足";
}else if(PD=='Y'||PD=='y'){
jb+=700;
wp[3]-=1;
}
}else if(yx==4){
cout<<"技能能量低级1000块,当前技能能量低级为"<<wp[4]<<"个"<<endl;
cout<<"是否出售"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(wp[4]<1){
cout<<"您的技能能量低级不足";
}else if(PD=='Y'||PD=='y'){
jb+=1000;
wp[4]-=1;
}
}else if(yx==4){
cout<<"技能能量中级1500块,当前技能能量中级为"<<wp[5]<<"个"<<endl;
cout<<"是否出售"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(wp[5]<1){
cout<<"您的技能能量中级不足";
}else if(PD=='Y'||PD=='y'){
jb+=1500;
wp[5]-=1;
}
}else if(yx==4){
cout<<"技能能量高级1000块,当前技能能量高级为"<<wp[6]<<"个"<<endl;
cout<<"是否出售"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(wp[6]<1){
cout<<"您的技能能量高级不足";
}else if(PD=='Y'||PD=='y'){
jb+=2000;
wp[6]-=1;
}
}else{
cout<<"1.经验药(400) 2.回血包(600) 3.技能伤害(800) 4.技能能量低级(1100) 5.技能能量中级(1600) 6.技能能量高级(2100)";
if(yx==1){
cout<<"经验药400块,当前药草为"<<wp[1]<<"个"<<"当前钱为"<<jb<<endl;
cout<<"是否购买"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(jb<400){
cout<<"您的钱不足";
}else if(PD=='Y'||PD=='y'){
jb-=400;
wp[1]+=1;
}
}else if(yx==2){
cout<<"回血包600块,当前回血包为"<<wp[2]<<"个"<<"当前钱为"<<jb<<endl;
cout<<"是否购买"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(jb<600){
cout<<"您的钱不足";
}else if(PD=='Y'||PD=='y'){
jb-=600;
wp[2]+=1;
}
}else if(yx==2){
cout<<"技能伤害800块,当前技能伤害为"<<wp[3]<<"个"<<"当前钱为"<<jb<<endl;
cout<<"是否购买"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(jb<800){
cout<<"您的钱不足";
}else if(PD=='Y'||PD=='y'){
jb-=800;
wp[3]+=1;
}
}else if(yx==3){
cout<<"技能能量低级1100块,当前技能能量低级为"<<wp[4]<<"个"<<"当前钱为"<<jb<<endl;
cout<<"是否购买"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(jb<1100){
cout<<"您的钱不足";
}else if(PD=='Y'||PD=='y'){
jb-=1100;
wp[4]+=1;
}
}else if(yx==3){
cout<<"技能能量中级1600块,当前技能能量中级为"<<wp[5]<<"个"<<"当前钱为"<<jb<<endl;
cout<<"是否购买"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(jb<1600){
cout<<"您的钱不足";
}else if(PD=='Y'||PD=='y'){
jb-=1600;
wp[5]+=1;
}
}else if(yx==3){
cout<<"技能能量高级2100块,当前技能能量高级为"<<wp[6]<<"个"<<"当前钱为"<<jb<<endl;
cout<<"是否购买"<<endl;
cout<<"是(Y) 否(N)"<<endl;
char PD;
cin>>PD;
if(jb<2100){
cout<<"您的钱不足";
}else if(PD=='Y'||PD=='y'){
jb-=2100;
wp[6]+=1;
}
}
}
}
}else if(){
cout<<"1-孟加拉虎 2-史莱姆 3-丛林怪 4-沼泽怪 5-学弟怪 6-空间怪";
int gw;
cin>>gw;
if(gw>6&&gw<1){
cout<<"输入错误请重新输入!";
cin>>gw;
}else if(gw==1)
}else if(play==9){
cout<<endl<<"当前使用人物:"<<name[Current];
cout<<endl<<"血量:"<<blood[Current];
cout<<endl<<"攻击:"<<aggressivity[Current];
cout<<endl<<"防御:"<<Defense[Current];
cout<<endl<<"技能:"<<Skills1[Current];
cout<<endl<<"技能伤害:"<<Skillaggressivity[Current];
cout<<endl<<"技能所需能量:"<<Skillnl[Current];
cout<<endl<<"钱:"<<jb;
cout<<endl<<"经验值:"<<Experience<<endl;
}
}
}
return 0;
}
0
0
0
0