mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
update trigger result key before trigger
This commit is contained in:
@@ -409,6 +409,7 @@ def roll_triggers(weights: dict) -> dict:
|
|||||||
f'This is probably in error.')
|
f'This is probably in error.')
|
||||||
trigger_result = get_choice("option_result", option_set)
|
trigger_result = get_choice("option_result", option_set)
|
||||||
result = get_choice(key, weights)
|
result = get_choice(key, weights)
|
||||||
|
weights[key] = result
|
||||||
if result == trigger_result and roll_percentage(get_choice("percentage", option_set, 100)):
|
if result == trigger_result and roll_percentage(get_choice("percentage", option_set, 100)):
|
||||||
if "options" in option_set:
|
if "options" in option_set:
|
||||||
weights = update_weights(weights, option_set["options"], "Triggered", option_set["option_name"])
|
weights = update_weights(weights, option_set["options"], "Triggered", option_set["option_name"])
|
||||||
@@ -418,7 +419,7 @@ def roll_triggers(weights: dict) -> dict:
|
|||||||
rom_weights = update_weights(rom_weights, option_set["rom_options"], "Triggered Rom",
|
rom_weights = update_weights(rom_weights, option_set["rom_options"], "Triggered Rom",
|
||||||
option_set["option_name"])
|
option_set["option_name"])
|
||||||
weights["rom"] = rom_weights
|
weights["rom"] = rom_weights
|
||||||
weights[key] = result
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ValueError(f"Your trigger number {i+1} is destroyed. "
|
raise ValueError(f"Your trigger number {i+1} is destroyed. "
|
||||||
f"Please fix your triggers.") from e
|
f"Please fix your triggers.") from e
|
||||||
|
Reference in New Issue
Block a user