Simpler inline conditional
This commit is contained in:
parent
6a4b56a182
commit
da636e93ab
@ -121,7 +121,7 @@ init python:
|
|||||||
return int(progress_factor * random_gold)
|
return int(progress_factor * random_gold)
|
||||||
else:
|
else:
|
||||||
filtered_list = [x for x in drop_list if x.owned <= 5]
|
filtered_list = [x for x in drop_list if x.owned <= 5]
|
||||||
random_item = renpy.random.choice(filtered_list if filtered_list else drop_list)
|
random_item = renpy.random.choice(filtered_list or drop_list)
|
||||||
return random_item
|
return random_item
|
||||||
|
|
||||||
elif game.difficulty == 2:
|
elif game.difficulty == 2:
|
||||||
@ -131,7 +131,7 @@ init python:
|
|||||||
return int(progress_factor * random_gold)
|
return int(progress_factor * random_gold)
|
||||||
else:
|
else:
|
||||||
filtered_list = [x for x in drop_list if x.owned <= 3]
|
filtered_list = [x for x in drop_list if x.owned <= 3]
|
||||||
random_item = renpy.random.choice(filtered_list if filtered_list else drop_list)
|
random_item = renpy.random.choice(filtered_list or drop_list)
|
||||||
|
|
||||||
if int(120 * math.log(game.day)) / 3 < random_item.price:
|
if int(120 * math.log(game.day)) / 3 < random_item.price:
|
||||||
chance = max(6 - (random_item.owned * 5), 1)
|
chance = max(6 - (random_item.owned * 5), 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user