C++文字florr.io
2024-08-11 15:06:54
发布于:上海
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
void florr();void shuaguai();void card();void heka();void absorb();
int common,unusual,rare,epic,leg,mythic,ultra,super;
int level=1;
long long xp_now=1;
long long xp_all;
void florr(){
xp_all=10+pow(level,3)*10;
system("cls");
int key;
cout<<" florr.io\n";
cout<<" 等级:"<<level<<endl;
for(int i = 1;i<=100;i++){
if(i<=(int)((double)xp_now/xp_all*100)){
cout<<"█";
}else{
cout<<"▓";
}
}
cout<<"\n "<<xp_now<<"/"<<xp_all<<"xp level"<<level;
cout<<"\n\n\n\n";
card();
cout<<"1:刷怪 ";
cout<<"2:和卡 ";
cout<<"3:吸收 ";
cout<<"4:退出 \n";
cin>>key;
if(key==1){
shuaguai();
}else if(key==2){
heka();
}else if(key==3){
absorb();
}
}
void absorb(){
xp_all=10+pow(level,3)*10;
while(1){
system("cls");
cout<<" -----------------------\n";
cout<<" | 吸收 |\n";
cout<<"----------------------------------------------------\n";
cout<<"|common:5 |unusual 50 |rare 750 |epic 5000 |\n";
cout<<"|legendary 60k|mythic 500k|ultra 64m |super 2b |\n";
cout<<"----------------------------------------------------\n";
for(int i = 1;i<=100;i++){
if(i<=(int)((double)xp_now/xp_all*100)){
cout<<"█";
}else{
cout<<"▓";
}
}
cout<<"\n "<<xp_now<<"/"<<xp_all<<"xp level"<<level;
cout<<endl;
int key;
card();
cout<<"\n\n输入\n1:common\n2:unusual\n3:rare\n4:epic\n5:legendary\n6:mythic\n7:ultra\n8:super否则退出吸收\n";
cin>>key;
if(key==1){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>common){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
common-=num;
for(int i = 0;i<num;i++){
xp_now+=5;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}else if(key==2){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>unusual){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
unusual-=num;
for(int i = 0;i<num;i++){
xp_now+=50;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}else if(key==3){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>rare){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
rare-=num;
for(int i = 0;i<num;i++){
xp_now+=750;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}else if(key==4){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>epic){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
epic-=num;
for(int i = 0;i<num;i++){
xp_now+=5000;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}else if(key==5){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>leg){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
leg-=num;
for(int i = 0;i<num;i++){
xp_now+=60000;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}else if(key==6){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>mythic){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
mythic-=num;
for(int i = 0;i<num;i++){
xp_now+=500000;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}else if(key==7){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>ultra){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
ultra-=num;
for(int i = 0;i<num;i++){
xp_now+=64000000;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}else if(key==8){
int num;
cout<<"请输入吸收数量";
cin>>num;
if(num>super){
cout<<"输入不合法!";Sleep(1000);continue;
}else{
super-=num;
for(int i = 0;i<num;i++){
xp_now+=2000000000;
while(xp_now>=xp_all){
level+=1;
xp_now-=xp_all;
xp_all=10+pow(level,3)*10;
}
}
continue;
}
}
}
}
void card(){
printf("你有common:%d unusual:%d rare:%d epic:%d legendary:%d mythic:%d ultra:%d super%d\n",common,unusual,rare,epic,leg,mythic,ultra,super);
}
void shuaguai(){
system("cls");
cout<<"刷怪中."<<endl;
Sleep(500);
system("cls");
cout<<"刷怪中.."<<endl;
Sleep(500);
system("cls");
cout<<"刷怪中..."<<endl;
Sleep(500);
system("cls");
cout<<"刷怪中...."<<endl;
Sleep(500);
system("cls");
cout<<"刷怪中....."<<endl;
Sleep(500); system("cls");
cout<<"刷怪中......"<<endl;
Sleep(500); system("cls");
cout<<"刷怪中......."<<endl;
Sleep(2000);system("cls");
int a=0,b=0,c=0,d=0,e=0,f=0,g=0;
for(int i = 0;i<=level;i++){
if(level<=10){
a+=rand()%3;
}else if(level<=20&&common>=1){
a+=rand()%4;
b+=rand()%2;
}else if(level<=40&&unusual>=1){
a+=rand()%8;
b+=rand()%4;
c+=rand()%2;
}else if(level<=70&&rare>=1){
a+=rand()%16;
b+=rand()%8;
c+=rand()%4;
d+=rand()%2;
}else if(level<=100&&epic>=1){
a+=rand()%32;
b+=rand()%16;
c+=rand()%8;
d+=rand()%4;
e+=rand()%2;
}else if(level<=145&&leg>=1){
a+=rand()%64;
b+=rand()%32;
c+=rand()%16;
d+=rand()%8;
e+=rand()%4;
f+=rand()%2;
}else if(level<190&&mythic>=1){
a+=rand()%128;
b+=rand()%64;
c+=rand()%32;
d+=rand()%16;
e+=rand()%8;
f+=rand()%4;
g+=rand()%2;
}else if(level>=190&&ultra>=1){
a+=rand()%256;
b+=rand()%128;
c+=rand()%64;
d+=rand()%32;
e+=rand()%16;
f+=rand()%8;
g+=rand()%4;
}
}
cout<<" 你死了,你获得了:\n";
cout<<"common:"<<a<<endl;
cout<<"unusual:"<<b<<endl;
cout<<"rare:"<<c<<endl;
cout<<"epic:"<<d<<endl;
cout<<"legandary:"<<e<<endl;
cout<<"mythic:"<<f<<endl;
cout<<"ultra:"<<g<<endl;
common+=a;unusual+=b;rare+=c;epic+=d;leg+=e;mythic+=f;ultra+=g;
Sleep(4000);
florr();
}
void heka(){
system("cls");
while(1){
cout<<" -----------------------\n";
cout<<" - 合卡 -\n";
cout<<" -----------------------\n";
card();
int key;
cout<<"\n\n输入\n1:common\n2:unusual\n3:rare\n4:epic\n5:legendary\n6:mythic\n7:ultra否则退出合卡\n";
cin>>key;
if(key==1){
int tmp=0;
while(common>=5){
if(rand()%100+1<=64){
tmp+=1;
common-=5;
}else{
common-=rand()%4+1;
}
}
cout<<"本次合出了"<< tmp<<"个unusual卡,剩余"<<common<<"个common卡";
unusual+=tmp;
Sleep(1500);
system("cls");
continue;
}
else if(key==2){
int tmp=0;
while(unusual>=5){
if(rand()%100+1<=32){
tmp+=1;
unusual-=5;
}else{
unusual-=rand()%4+1;
}
}
cout<<"本次合出了"<< tmp<<"个rare卡,剩余"<<unusual<<"个unusual卡";
Sleep(1500);
rare+=tmp;
system("cls");
continue;
}
else if(key==3){
int tmp=0;
while(rare>=5){
if(rand()%100+1<=16){
tmp+=1;
rare-=5;
}else{
rare-=rand()%4+1;
}
}
cout<<"本次合出了"<< tmp<<"个epic卡,剩余"<<rare<<"个rare卡";
Sleep(1500);
epic+=tmp;
system("cls");
continue;
}
else if(key==4){
int tmp=0;
while(epic>=5){
if(rand()%100+1<=8){
tmp+=1;
epic-=5;
}else{
epic-=rand()%4+1;
}
}
cout<<"本次合出了"<< tmp<<"个legendary卡,剩余"<<epic<<"个epic卡";
Sleep(1500);
leg+=tmp;
system("cls");
continue;
}
else if(key==5){
int tmp=0;
while(leg>=5){
if(rand()%100+1<=4){
tmp+=1;
leg-=5;
}else{
leg-=rand()%4+1;
}
}
cout<<"本次合出了"<< tmp<<"个mythic卡,剩余"<<leg<<"个legendary卡";
Sleep(1500);
mythic+=tmp;
system("cls");
continue;
}
else if(key==6){
int tmp=0;
while(mythic>=5){
if(rand()%100+1<=2){
tmp+=1;
mythic-=5;
}else{
mythic-=rand()%4+1;
}
}
cout<<"本次合出了"<< tmp<<"个ultra卡,剩余"<<mythic<<"个mythic卡";
Sleep(1500);
ultra+=tmp;
system("cls");
continue;
}
else if(key==7){
int tmp=0;
while(ultra>=5){
if(rand()%100+1<=1){
tmp+=1;
ultra-=5;
}else{
ultra-=rand()%4+1;
}
}
cout<<"本次合出了"<< tmp<<"个super卡,剩余"<<ultra<<"个ultra卡";
Sleep(1500);
super+=tmp;
system("cls");
continue;
}else{
break;
}
}
florr();
}
int main(){
srand(time(NULL));
florr();
}
全部评论 1
2024-09-30 来自 陕西
0
有帮助,赞一个