Skip to content

Commit

Permalink
deprioritize Time Stopper in rush checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed May 31, 2024
1 parent bac14d9 commit d5db9ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions worlds/mm2/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def set_rules(world: "MM2World") -> None:
boss_damage = weapon_boss[boss]
weapon_weight = {weapon: (weapon_energy[weapon] / damage) if damage else 0 for weapon, damage in
boss_damage.items() if weapon_energy[weapon]}
if any(boss_damage[i] > 0 for i in range(8)):
# We get exactly one use of Time Stopper during the rush
# So we want to make sure that use is absolutely needed
weapon_weight[8] = min(weapon_weight[8], 0.001)
while boss_health[boss] > 0:
if boss_damage[0]:
boss_health[boss] = 0 # if we can buster, we should buster
Expand Down
4 changes: 4 additions & 0 deletions worlds/mm2/test/test_weakness.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def validate_wily_5(base: MM2TestBase) -> None:
boss_damage = weapon_boss[boss]
weapon_weight = {weapon: (weapon_energy[weapon] / damage) if damage else 0 for weapon, damage in
boss_damage.items() if weapon_energy[weapon]}
if any(boss_damage[i] > 0 for i in range(8)):
# We get exactly one use of Time Stopper during the rush
# So we want to make sure that use is absolutely needed
weapon_weight[8] = min(weapon_weight[8], 0.001)
while boss_health[boss] > 0:
if boss_damage[0]:
boss_health[boss] = 0 # if we can buster, we should buster
Expand Down

0 comments on commit d5db9ea

Please sign in to comment.