mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Update prts_handle.py
This commit is contained in:
parent
29816ada2a
commit
cb6549c297
@ -91,7 +91,9 @@ def _get_operator_card(add: float):
|
|||||||
zoom = z
|
zoom = z
|
||||||
else:
|
else:
|
||||||
weight = z
|
weight = z
|
||||||
|
up_operator_name = ""
|
||||||
# UP
|
# UP
|
||||||
|
try:
|
||||||
if random.random() < zoom:
|
if random.random() < zoom:
|
||||||
up_operators = [x.operators for x in UP_OPERATOR if x.star == star and x.zoom < 1][0]
|
up_operators = [x.operators for x in UP_OPERATOR if x.star == star and x.zoom < 1][0]
|
||||||
up_operator_name = random.choice(up_operators)
|
up_operator_name = random.choice(up_operators)
|
||||||
@ -107,6 +109,8 @@ def _get_operator_card(add: float):
|
|||||||
acquire_operator = [x for x in ALL_OPERATOR if x.name == up_operator_name][0]
|
acquire_operator = [x for x in ALL_OPERATOR if x.name == up_operator_name][0]
|
||||||
else:
|
else:
|
||||||
acquire_operator = random.choice(all_star_operators)
|
acquire_operator = random.choice(all_star_operators)
|
||||||
|
except IndexError:
|
||||||
|
acquire_operator = Operator(up_operator_name, star, True, False, False)
|
||||||
else:
|
else:
|
||||||
acquire_operator = random.choice([x for x in ALL_OPERATOR if x.star == star
|
acquire_operator = random.choice([x for x in ALL_OPERATOR if x.star == star
|
||||||
and not any([x.limited, x.event_only, x.recruit_only])])
|
and not any([x.limited, x.event_only, x.recruit_only])])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user