#include<bits/stdc++.h>
#include<algorithm>
#include<cstdio>
#include<windows.h>
using namespace std;
string s[9]={"蓝银草","柔骨兔","昊天锤","七宝琉璃塔","白虎","幽冥灵猫","火凤凰","大力金刚熊","罗三炮"};
string x[5]={"暗魔邪神虎","泰坦巨猿","天青牛蟒","蓝银皇","冰苍狼"};
int a[5]={1,2,3,4,5};
int c=1;
int wfx,wfgj,dfx,dfgj,gj,fy;
int q,jy;
int main()
{
system("color 9E");
cout<<"欢 迎 来 到 斗 罗 大 陆 ! ! ! "<<endl;
Sleep(1000);
system("cls");
cout<<"开始觉醒武魂......"<<endl;
Sleep(2000);
srand(time(0));
int r=rand()%8;
cout<<"您的武魂是:";
Sleep(500);
cout<<s[r]<<endl;
Sleep(2000);
system("cls");
while(1)
{
logo:
system("cls");
cout<<"你现在要做什么?"<<endl;
cout<<"1.打怪 2.商城 3.查看等级 4.退出"<<endl;
int z;
cin>>z;
if(z==1)
{
cout<<"开始抽取魂兽......"<<endl;
Sleep(2000);
srand(time(0));
int y=rand()%5;
int o=rand()%5;
system("cls");
cout<<"魂兽是:";
Sleep(500);
cout<<x[y]<<endl;
Sleep(500);
cout<<"等级:";
Sleep(500);
cout<<a[o]<<endl;
cout<<"是否战斗? 1.是 2.否"<<endl;
int b;
cin>>b;
if(b==1)
{
system("cls");
if(a[o]==1)
{
dfx=80;
dfgj=20;
}
if(a[o]==2)
{
dfx=100;
dfgj=30;
}
if(a[o]==3)
{
dfx=120;
dfgj=35;
}
if(a[o]==4)
{
dfx=150;
dfgj=50;
}
if(a[o]==5)
{
dfx=160;
dfgj=60;
}
wfx=fy;
wfgj=gj;
if(c==1)
{
wfx+=100;
wfgj+=25;
}
if(c==2)
{
wfx+=110;
wfgj+=30;
}
if(c==3)
{
wfx+=130;
wfgj+=35;
}
if(c==4)
{
wfx+=155;
wfgj+=40;
}
if(c==5)
{
wfx+=165;
wfgj+=55;
}
if(c==6)
{
wfx+=170;
wfgj+=60;
}
system("cls");
cout<<"开始战斗!!!"<<endl;
Sleep(1000);
system("cls");
for(int i=1;;i++)
{
cout<<"第"<<i<<"回合"<<endl;
cout<<"我方血量:"<<wfx<<" "<<"敌方血量:"<<dfx<<endl;
cout<<"你对它攻击"<<endl;
cout<<"它对你攻击"<<endl;
wfx-=dfgj;
dfx-=wfgj;
Sleep(2000);
if(wfx<=0&&dfx<=0)
{
if(wfx>=dfx)
{
cout<<"恭喜你赢了!!!"<<endl;
q+=1;
jy+=1;
Sleep(500);
if(jy%5==0)
{
c++;
}
goto logo;
}
else
{
cout<<"你死了!!!"<<endl;
return 0;
}
}
else if(dfx<=0)
{
cout<<"恭喜你赢了!!!"<<endl;
q+=1;
jy+=1;
Sleep(500);
if(jy%5==0)
{
c++;
}
goto logo;
}
if(wfx<=0)
{
cout<<"你死了!!!"<<endl;
return 0;
}
system("cls");
}
}
else if(b==2)
{
continue;
}
else
{
cout<<"你点错了!";
continue;
}
}
else if(z==2)
{
system("cls");
cout<<"钱:"<<q<<endl;
cout<<"请问要买什么?"<<endl;
cout<<"1.神之剑 攻击力增加20 10元"<<endl;
cout<<"2.神之护盾 血量增加30 10元"<<endl;
int d;
cin>>d;
if(d==1)
{
if(q>=10)
{
gj=20;
cout<<"已购买!!!"<<endl;
q-=10;
continue;
}
else
{
cout<<"你的钱不够!!"<<endl;
Sleep(500);
continue;
}
}
else if(d==2)
{
if(q>=10)
{
fy=30;
cout<<"已购买!!!"<<endl;
q-=10;
continue;
}
else
{
cout<<"你的钱不够!!"<<endl;
Sleep(500);
continue;
}
}
else
{
cout<<"点错了!"<<endl;
Sleep(1000);
continue;
}
}
else if(z==3)
{
system("cls");
cout<<"目前等级是:"<<c;
Sleep(3000);
continue;
}
else if(z==4)
{
system("cls");
for(int i=1;i<=100;i++)
{
cout<<i<<"%"<<endl;
Sleep(50);
system("cls");
}
return 0;
}
else
{
cout<<"点错了!"<<endl;
Sleep(1000);
continue;
}
return 0;
}
}
斗罗大陆(不喜勿喷)
最新推荐文章于 2025-02-10 21:26:16 发布