2020-8-30 《明日方舟》python抽卡代码

import random
m = input(“请输入抽卡次数”)
n = int(m)
a = 0
b = 0
c = 0
d = 0
luck = 0
number1 = 0
six = [“棘刺”,“铃兰”,“早露”,“W”,“温蒂”,“傀影”,“风笛”,
“刻俄柏”,“年”,“阿”,“煌”,“莫斯提马”,“麦哲伦”,“赫拉格”,
“黑”,“陈”,“斯卡蒂”,“银灰”,“塞雷娅”,“星熊”,“夜莺”,
“闪灵”,“安洁莉娜”,“艾雅法拉”,
“伊芙利特”,“推进之王”,“能天使”,“森蚺”]
five = [“安哲拉”,“贾维”,“蜜蜡”,“断崖”,“莱恩哈特”,
“月禾”,“石棉”,“极境”,“巫恋”,“慑砂”,
“惊蛰”,“吽”,“灰喉”,“布洛卡”,“苇草”,“槐琥”,
“送葬人”,“星极”,“格劳克斯”,“诗怀雅”,
“夜魔”,“食铁兽”,“狮蝎”,“空”,“真理”,“初雪”,
“崖心”,“守林人”,“普罗旺斯”,“可颂”,“雷蛇”,“红”,
“临光”,“华法琳”,“赫默”,“梅尔”,“天火”,“陨星”,“白金”,
“蓝毒”,“幽灵鲨”,“拉普兰德”,“芙兰卡”,“德克萨斯”,
“凛冬”,“白面鸮”,“燧石”]
four = [“孑”,“卡达”,“波登可”,“刻刀”,“宴”,“安比尔”,
“梅”,“红云”,“桃金娘”,“苏苏洛”,“格雷伊”,“猎蜂”,
“阿消”,“地灵”,“深海色”,“古米”,“蛇屠箱”,“角峰”,“调香师”,“嘉维尔”,
“末药”,“暗索”,“砾”,“慕斯”,“霜叶”,“缠丸”,“杜宾”,“红豆”,
“清道夫”,“讯使”,“白雪”,“流星”,“杰西卡”,“远山”,“夜烟”,“酸糖”]
three = [“斑点”,“泡普卡”,“月见夜”,“空爆”,“梓兰”,“史都华德”,
“安塞尔”,“芙蓉”,“炎熔”,“安德切尔”,
“克洛斯”,“米格鲁”,“卡缇”,“梅兰莎”,“翎羽”,“香草”,“芬”]
for i1 in range(0,n,1):
secret = random.randint(1,100)
if luck <= 50:
if 1<=secret<=2:
number1 = random.randint(0,28)
print(six[number1])
a = a + 1
elif secret<=10:
number2 = random.randint(0,46)
print(five[number2])
b = b + 1
elif secret<=60:
number3 = random.randint(0,35)
print(four[number3])
c = c + 1
else:
number4 = random.randint(0,16)
print(three[number4])
d = d + 1
else:
if 1 <= secret <= 2 * (luck-49):
number5 = random.randint(0,28)
print(six[number5])
luck = 0
a = a + 1
elif secret <= 2 * (luck-49) +8:
number6 = random.randint(0,46)
print(five[number6])
b = b + 1
elif secret <= 2 * (luck-49) +58:
number7 = random.randint(0,35)
print(four[number7])
c = c + 1
else:
number8 = random.randint(0,16)
print(three[number8])
d = d + 1
luck = luck + 1
print(“抽卡结束,共抽到六星a个,五星b个,四星c个,三星d个,抽出六星比例a/n”)
p = a / n
if p > 0.02:
print(“双黄出货全满潜”)
else:
print(“醒来枕边泪点点”)

你可能感兴趣的:(python,python)