Skip to content

Commit

Permalink
fix weakness landing beneath required amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed Jul 25, 2024
1 parent f196854 commit a17ca2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions worlds/mm2/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def set_rules(world: "MM2World") -> None:
for boss in range(13):
for weapon in world.weapon_damage:
world.weapon_damage[weapon].append(min(14, max(-1, int(world.random.normalvariate(3, 3)))))
if not any([world.weapon_damage[weapon][boss] >= 4
if not any([world.weapon_damage[weapon][boss] >= max(4, minimum_weakness_requirement[weapon])
for weapon in range(1, 7)]):
# failsafe, there should be at least one defined non-Buster weakness
weapon = world.random.randint(1, 7)
Expand Down Expand Up @@ -212,7 +212,6 @@ def set_rules(world: "MM2World") -> None:
weapon_energy[wp] -= weapon_costs[wp] * uses
weapon_weight.pop(wp)


for i, boss_locations in zip(range(14), [
heat_man_locations,
air_man_locations,
Expand Down

0 comments on commit a17ca2d

Please sign in to comment.