原神模拟抽卡代码

原神抽卡模拟代码(3.0版本甘雨池子)

概率与游戏近似,保底无小保底,有第二次必出up五星,十连必出四星

#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <Windows.h>
using namespace std;
int x,y,chou;
bool card=0,sxbd=0;
int cho[1024];
char up1[64]={"甘雨*****"};
char up2[64]={"行秋****"};
char up3[64]={"砂糖****"};
char up4[64]={"多莉****"};
char oneten;
int main()
{
	sxbd=false;
	cout<<"*****************************"<<endl;
	cout<<"*"<<"     "<<"//原神模拟抽卡//"<<"      "<<"*"<<endl;
	cout<<"*"<<"       "<<"按a祈愿十次"<<"         "<<"*"<<endl;
	cout<<"*"<<"      "<<"*五星up-甘雨*"<<"        "<<"*"<<endl;
	cout<<"*"<<" "<<"四星up-行秋-砂糖-多莉"<<"     "<<"*"<<endl;
	cout<<"*****************************"<<endl;
	cin>>oneten;
	if(oneten=='a')
	{
		srand((int)time(NULL));
		for(int q=1;q<=10;++q)
		{
			cho[q]=rand()%741;
		}
		for(int p=1;p<=10;++p)
		{
			if(cho[p]>=24 && cho[p]<=152)
			{
				sxbd=true;
			}
		} 
		if(sxbd==false)
		{
			cho[10]=rand()%129+25;
		}
		for(int i=1;i<=10;++i)
		{
			//cout<<cho[i]<<" ";
			chou=cho[i]; 
			if(chou>=0 && chou<=9)
			{
				cout<<"up五星-"<<up1<<endl; 
			}
			if(card==1 && chou>=10 && chou<=23)
			{
				cout<<"up五星-"<<up1<<endl; 
				card=false;
				Sleep(1000); 
			}
			if(chou==10)
			{
				cout<<"五星-琴*****"<<endl;
				card=true;
			}
			if(chou==11)
			{
				cout<<"五星-迪卢克*****"<<endl;
				card=true;
			}
			if(chou==12)
			{
				cout<<"五星-七七*****"<<endl;
				card=true;
			}
			if(chou==13)
			{
				cout<<"五星-莫娜*****"<<endl;
				card=true;
			}
			if(chou==14)
			{
				cout<<"五星-阿莫斯之弓*****"<<endl;
				card=true;
			}
			if(chou==15)
			{
				cout<<"五星-和璞鸢*****"<<endl;
				card=true; 
			}
			if(chou==16)
			{
				cout<<"五星-四风原典*****"<<endl;
				card=true; 
			}
			if(chou==17)
			{
				cout<<"五星-天空之卷*****"<<endl;
				card=true;
			}
			if(chou==18)
			{
				cout<<"五星-昆吾段红*****"<<endl;
				card=true;
			}
			if(chou==19)
			{
				cout<<"五星-天空之翼*****"<<endl;
				card=true;
			}
			if(chou==20)
			{
				cout<<"五星-狼的末路*****"<<endl;
				card=true; 
			}
			if(chou==21)
			{
				cout<<"五星-天空之傲*****"<<endl;
				card=true;
			} 
			if(chou==22)
			{
				cout<<"五星-天空之刃*****"<<endl; 
				card=true;
			}
			if(chou==23)
			{
				cout<<"五星-风鹰剑*****"<<endl;
				card=true;
			}
			if(chou>=24 && chou<=34)
			{
				cout<<"四星-"<< up2 <<endl;
			}
			if(chou>=35 && chou<=45)
			{
				cout<<"四星-"<<up3<<endl; 
			}
			if(chou>=46 && chou<=56)
			{
				cout<<"四星-"<<up4<<endl;
			} 
			if(chou>=57 && chou<=152)
			{
				cout<<"四星-";
				if(chou==57 || chou==58)
					cout<<"香菱****"<<endl;
				if(chou==59 || chou==60)
					cout<<"行秋****"<<endl;
				if(chou==61 || chou==62)
					cout<<"班尼特****"<<endl;
				if(chou==63 || chou==64)
					cout<<"菲谢尔****"<<endl;
				if(chou==65 || chou==66)
				    cout<<"鹿野院平藏****"<<endl;
				if(chou==67 || chou==68)
					cout<<"罗莎莉亚****"<<endl;
				if(chou==69 || chou==70)
					cout<<"芭芭拉****"<<endl;
				if(chou==71 || chou==72)
				    cout<<"砂糖****"<<endl;
				if(chou==73 || chou==74)
				    cout<<"凝光****"<<endl;
				if(chou==75 || chou==76)
				    cout<<"安柏****"<<endl;
				if(chou==77 || chou==78)
				    cout<<"凯亚****"<<endl;
				if(chou==79 || chou==80)
				    cout<<"丽莎****"<<endl;
				if(chou==81 || chou==82)
				    cout<<"柯莱****"<<endl;
				if(chou==83 || chou==84)
				    cout<<"雷泽****"<<endl;
				if(chou==85 || chou==86)
				    cout<<"重云****"<<endl;
				if(chou==87 || chou==88)
				    cout<<"诺艾尔****"<<endl;
				if(chou==89 || chou==90)
				    cout<<"云堇****"<<endl;
				if(chou==91 || chou==92)
				    cout<<"五郎****"<<endl;
				if(chou==93 || chou==94)
				    cout<<"九条裟罗****"<<endl;
				if(chou==95 || chou==96)
				    cout<<"久岐忍****"<<endl;
				if(chou==97 || chou==98)
				    cout<<"烟绯****"<<endl;
				if(chou==99 || chou==100)
				    cout<<"辛焱****"<<endl;
				if(chou==101 || chou==102)
					cout<<"迪奥娜****"<<endl;
				if(chou==103 || chou==104)
					cout<<"早柚****"<<endl;
				if(chou==105 || chou==106)
					cout<<"北斗****"<<endl;
				if(chou==107 || chou==108)
					cout<<"托马****"<<endl;
				if(chou==109 || chou==110)
					cout<<"宗室大剑****"<<endl;
				if(chou==111 || chou==112)
					cout<<"祭礼大剑****"<<endl;
				if(chou==113 || chou==114)
					cout<<"西风大剑****"<<endl;
				if(chou==115 || chou==116)
					cout<<"黑岩斩刀****"<<endl;
				if(chou==117 || chou==118)
					cout<<"钟剑****"<<endl;
				if(chou==119 || chou==120)
					cout<<"白影剑****"<<endl;
				if(chou==121 || chou==122)
					cout<<"千岩古剑****"<<endl;
				if(chou==123 || chou==124)
					cout<<"西风剑****"<<endl;
				if(chou==125 || chou==126)
					cout<<"祭礼剑****"<<endl;
				if(chou==127 || chou==128)
					cout<<"笛剑****"<<endl;
				if(chou==129 || chou==130)
					cout<<"暗巷闪光****"<<endl;
				if(chou==131 || chou==132)
					cout<<"祭礼弓****"<<endl;
				if(chou==133 || chou==134)
					cout<<"破魔之弓****"<<endl;
				if(chou==135 || chou==136)
					cout<<"西风猎弓****"<<endl;
				if(chou==137 || chou==138)
					cout<<"绝弦****"<<endl;
				if(chou==139 || chou==140)
					cout<<"昭心****"<<endl;
				if(chou==141 || chou==142)
					cout<<"万国诸海图****"<<endl;
				if(chou==143 || chou==144)
					cout<<"西风秘典****"<<endl;
				if(chou==145 || chou==146)
					cout<<"流浪乐章****"<<endl; 
				if(chou==147 || chou==148)
					cout<<"祭礼残章****"<<endl; 
				if(chou==149 || chou==150)
					cout<<"千岩长枪****"<<endl; 
				if(chou==151 || chou==152)
					cout<<"西风长枪****"<<endl; 
			}
			if(chou>=153 && chou<=740)
			{
				cout<<"三星-";
				if(chou>=154 && chou<=180)
				{
					cout<<"黎明神剑***"<<endl;
				}
				if(chou>=181 && chou<=210)
				{
					cout<<"冷刃***"<<endl;
				}
				if(chou>=211 && chou<=240)
				{
					cout<<"飞天御剑***"<<endl;
				}
				if(chou>=241 && chou<=270)
				{
					cout<<"旅行剑***"<<endl;
				}
				if(chou>=271 && chou<=300)
				{
					cout<<"吃虎鱼刀***"<<endl;
				}
				if(chou>=301 && chou<=330)
				{
					cout<<"铁影阔剑***"<<endl;
				}
				if(chou>=331 && chou<=360)
				{
					cout<<"沐浴龙血的剑***"<<endl;
				}
				if(chou>=361 && chou<=390)
				{
					cout<<"以理服人***"<<endl;
				}
				if(chou>=391 && chou<=420)
				{
					cout<<"石英大剑***"<<endl;
				}
				if(chou>=421 && chou<=450)
				{
					cout<<"飞天大御剑***"<<endl;
				}
				if(chou>=451 && chou<=480)
				{
					cout<<"鸦羽弓***"<<endl;
				} 
				if(chou>=481 && chou<=510)
				{
					cout<<"信使***"<<endl;
				} 
				if(chou>=511 && chou<=530)
				{
					cout<<"弹弓***"<<endl;
				} 
				if(chou>=531 && chou<=560)
				{
					cout<<"反曲弓***"<<endl;
				} 
				if(chou>=561 && chou<=590)
				{
					cout<<"讨龙英杰谭***"<<endl;
				} 
				if(chou>=591 && chou<=620)
				{
					cout<<"魔导诸论***"<<endl;
				} 
				if(chou>=621 && chou<=650)
				{
					cout<<"翡玉法球***"<<endl;
				} 
				if(chou>=651 && chou<=680)
				{
					cout<<"白缨枪***"<<endl;
				} 
				if(chou>=681 && chou<=710)
				{
					cout<<"黑缨枪***"<<endl;
				} 
				if(chou>=711 && chou<=740)
				{
					cout<<"钺矛***"<<endl;
				} 
			} 
			Sleep(1000);
		}
	}
	main();
	return 0;
}

制作不易,点个赞憋

要就拿着吧,运行编译软件----DEV-C++

  • 22
    点赞
  • 38
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值