7
2024-11-20 16:09:04
发布于:浙江
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int tao=200;
int a=1,b=1;
int gong=10,lian=0,yun=0;
float fan=79,xia=15,zho=5,shang=1;
int shengmax=1000,ti=6,dti=3,xian=1,sheng=1000;
int g,ling=10000;
int lingss[21]={0,500,1500,4500,12000,20000,30000,50000,100000,150000,200000,300000,500000,800000,1400000,2200000,3000000,3500000,4000000};
float fann[21]={0,0,74,69,64,59,50,42,35};
float xi[21]={0,0,19,23,27,30,34,37,39};
float zhos[21]={0,0,6,7,7,9,13,17,21};
float sha[21]={0,0,1,1,2,2,3,4,5};
void cc(){
float a=rand()%100+1;
int b=rand()%12+1;
int c,d;
float e;
if(a<=fan){
c=rand()%40+12;
d=rand()%70+48;
cout<<" 凡品";
}
else if(a>fan&&a<(fan+xia)){
c=rand()%65+20;
d=rand()%100+56;
cout<<" 下品";
}
else if(a>(fan+xia)&&a<(fan+xia+zho)){
c=rand()%105+30;
d=rand()%165+65;
cout<<" 中品";
}
else if(a>(fan+xia+zho)&&a<(fan+xia+zho+shang)){
c=rand()%150+45;
d=rand()%205+70;
e=rand()%4+0.2;
cout<<" 上品";
}
Sleep(500);
gong+=c;
shengmax+=d;
lian+=e;
cout<<"\n 战力加"<<c*7+d*5+e*10;
Sleep(1000);
}
void zh() {
Sleep(1000);
while(1) {
cout<<"\n\n\n\n\n";
cout<<" O"<<" O\n";
cout<<" |--"<<" --|\n";
cout<<" / \\"<<" / \\\n";
Sleep(400);
system("cls");
cout<<"\n\n\n\n\n";
cout<<" O"<<" O\n";
cout<<" |--"<<" --|\n";
cout<<" / \\"<<" / \\\n";
Sleep(400);
system("cls");
cout<<"\n\n\n\n\n";
cout<<" O"<<" O\n";
cout<<" |--"<<" --|\n";
cout<<" / \\"<<" / \\ \n";
Sleep(400);
system("cls");
cout<<"\n\n\n\n\n";
cout<<" "<<gong<<endl;
g=g-gong;
int jj=rand()%100+1;
if(jj>100-lian){
Sleep(400);
cout<<" "<<"连击\n";
cout<<" O "<<" O\n";
cout<<" |-O"<<" -|\n";
cout<<" / \\"<<" / \\ \n";
}
Sleep(400);
cout<<" O "<<" O\n";
cout<<" |-O"<<" -|\n";
cout<<" / \\"<<" / \\ \n";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n\n";
cout<<" "<<a*120+b*12<<endl;
sheng=sheng-a*200-b*80;
cout<<" O"<<" O\n";
cout<<" |--"<<" o-|\n";
cout<<" / \\"<<" / \\ \n";
Sleep(1000);
system("cls");
cout<<"\n\n\n\n\n";
Sleep(1000);
cout<<" O"<<" O\n";
cout<<" |--"<<" --|\n";
cout<<" / \\"<<" / \\\n";
system("cls");
if(sheng<=0){
system("cls");
Sleep(500);
cout<<"你...";
Sleep(500);
cout<<"死了";
Sleep(1000);
sheng=shengmax;
break;
}
if(g<=0){
Sleep(300);
cout<<"恭喜成功";
ling=ling+a*2000+b*200;
Sleep(1000);
b+=1;
if(b>=10){
a+=1;
}
sheng=shengmax;
break;
}
}
}
void zao() {
cout<<" ________\n";
cout<<" |1.冒险|\n";
cout<<" |______|\n";
cout<<" __________\n";
cout<<" |"<<"目前关卡|\n";
cout<<" |"<<a<<" "<<b<<"|\n";
cout<<" |________|\n";
int c;
cin>>c;
if(c==1) {
g=a*600+b*40;
zh();
}
}
void n(){
cout<<"1.挑战妖王\n挑战次数"<<ti<<'\n';
cout<<"2.斗法\n挑战卷"<<dti;
}
void cnm(){
cout<<"目前灵石:"<<ling;
cout<<"目前等级:"<<xian;
cout<<"升级需灵石"<<lingss[xian];
cout<<"是否升级(y/n)";
char a;
cin>>a;
if(a=='y'){
if(ling>=lingss[xian]){
xian++;
fan=fann[xian];
xia=xi[xian];
zho=zhos[xian];
}
}
}
int main() {
while(1) {
cout<<" "<<tao<<"个\n";
Sleep(100);
cout<<" 1砍 2冒险 3挑战(/) 4升级仙树\n";
int d;
cin>>d;
if(d==1) {
cc();
Sleep(500);
tao-=1;
system("cls");
} else if(d==2) {
system("cls");
zao();
}
else if(d==3){
n();
}
else if(d==4){
cnm();
}
}
}
这里空空如也
有帮助,赞一个