#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,x,bd=0,up=0,s=0,a=0;
char t;
bool flag=true;
cout<<"你好!\n我是您的抽卡小助手,接下来是抽卡的一些小规则\n\n";
cout<<"**************************************\n";
cout<<"* 1.卡池分为新手池和UP池,本次UP为尘 *\n";
cout<<"* 世闲游——钟离、无暇之人——爱莉希 *\n";
cout<<"* 雅,五星(S级)陪跑为迪锅巴、小提,四 *\n";
cout<<"* 星(A级)陪跑若干,八十抽小保底,一百 *\n";
cout<<"* 八十抽大保底。 *\n";
cout<<"* 注:按a一抽,按s十连,0退出 *\n";
cout<<"* 五星出率:%2 UP出率(已出五星):%10 *\n";
cout<<"**************************************\n";
while(flag)
{
cin>>t;
if(t=='a')
{
if(bd==160)
{
s++;
x=rand()%10;
if(x>0&&x<6)
{
cout<<"获得——爱莉希雅!\n";
up++;
}
else
{
cout<<"获得——钟离!\n";
up++;
}
bd=0;
}
if(bd==80)
{
s++;
x=rand()%100;
if(x>11&&x<17||x==99||x==43||x>=50&&x<=53)
{
x=rand()%10;
if(x>0&&x<6)
{
cout<<"获得——爱莉希雅!\n";
up++;
}
else
{
cout<<"获得——钟离!\n";
up++;
}
bd=0;
}
else
{
x=rand()%10;
if(x==1||x==5||x==2||x==10||x==7)
cout<<"获得——迪卢克!\n";
else
cout<<"获得——提纳里!\n";
}
}
x=rand()%1000;
if(x>=11&&x<=21||x>=597&&x<=607)//五星
{
s++;
x=rand()%100;
if(x>11&&x<17||x==99||x==43||x>=50&&x<=53)
{
x=rand()%10;
if(x>0&&x<6)
{
cout<<"获得——爱莉希雅!\n";
up++;
}
else
{
cout<<"获得——钟离!\n";
up++;
}
bd=0;
}
else
{
x=rand()%10;
if(x==1||x==5||x==2||x==10||x==7)
cout<<"获得——迪卢克!\n";
else
cout<<"获得——提纳里!\n";
}
}
else
{
x=rand()%100;
if(x>=22&&x<=66)
{
x=rand()%100;
if(x>=1&&x<=20) cout<<"获得——云堇!\n";
else if(x>=21&&x<=40) cout<<"获得——班尼特!\n";
else if(x>=41&&x<=60) cout<<"获得——行秋!\n";
else if(x>=61&&x<=80) cout<<"获得——久岐忍!\n";
else if(x>=81&&x<=100) cout<<"获得——香菱!\n";
a++;
}
else
cout<<"依托答辩\n";
bd++;
}
}
if(t=='0')
break;
if(t=='s')
{
for(int i=1;i<=10;i++)
{
if(bd==160)
{
s++;
x=rand()%10;
if(x>0&&x<6)
{
cout<<"获得——爱莉希雅!\n";
up++;
}
else
{
cout<<"获得——钟离!\n";
up++;
}
bd=0;
}
if(bd==80)
{
s++;
x=rand()%100;
if(x>11&&x<17||x==99||x==43||x>=50&&x<=53)
{
x=rand()%10;
if(x>0&&x<6)
{
cout<<"获得——爱莉希雅!\n";
up++;
}
else
{
cout<<"获得——钟离!\n";
up++;
}
bd=0;
}
else
{
x=rand()%10;
if(x==1||x==5||x==2||x==10||x==7)
cout<<"获得——迪卢克!\n";
else
cout<<"获得——提纳里!\n";
}
}
x=rand()%1000;
if(x>=11&&x<=21||x>=597&&x<=607)//五星
{
s++;
x=rand()%100;
if(x>11&&x<17||x==99||x==43||x>=50&&x<=53)
{
x=rand()%10;
if(x>0&&x<6)
{
cout<<"获得——爱莉希雅!\n";
up++;
}
else
{
cout<<"获得——钟离!\n";
up++;
}
bd=0;
}
else
{
x=rand()%10;
if(x==1||x==5||x==2||x==10||x==7)
cout<<"获得——迪卢克!\n";
else
cout<<"获得——提纳里!\n";
bd++;
}
}
else
{
x=rand()%100;
if(x>=22&&x<=66)
{
x=rand()%100;
if(x>=1&&x<=20) cout<<"获得——云堇!\n";
else if(x>=21&&x<=40) cout<<"获得——班尼特!\n";
else if(x>=41&&x<=60) cout<<"获得——行秋!\n";
else if(x>=61&&x<=80) cout<<"获得——久岐忍!\n";
else if(x>=81&&x<=100) cout<<"获得——香菱!\n";
a++;
}
else
cout<<"依托答辩\n";
bd++;
}
}
}
cout<<"目前五星"<<s<<"个 UP"<<up<<"个 四星"<<a<<"个 距离保底还有"<<80-bd<<"个\n";
}
}
做了个抽卡小程序
最新推荐文章于 2024-03-29 16:36:09 发布