from random import *
def gacha(times):
ifornotlist = []
goldslist = []
golds = 0
chance = 0
gachatimes = 0
gacha2 = False
while gachatimes <= int(times):
gachatimes = gachatimes + 1
realtimes = (gachatimes + 1 - golds) % 90
if realtimes < 75: #没保底
chance = 6
elif realtimes < 90: #保底了
chance = 6 + (realtimes - 74) * 60 #设定概率
if realtimes == 0:
chance = 1000
c = randint(1, 1000) # 随机数
if c <= chance:
gacha1 = True
d = randint(1,2)
if ifornotlist:
if not ifornotlist[len(ifornotlist)-1]:
gacha2 = True
ifornotlist.append(gacha2)
else:
if d == 1:
gacha2 = True