Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed Jul 25, 2024
1 parent 87d5dd8 commit e1e8186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions worlds/mm2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def generate_early(self) -> None:
robot_master_pool.append(4)
self.options.starting_robot_master.value = self.random.choice(robot_master_pool)
logger.warning(
f"Mega Man 2 ({self.player_name}): "
f"Incompatible starting Robot Master, changing to "
f"{self.options.starting_robot_master.current_key.replace('_', ' ').title()}")

Expand Down
7 changes: 1 addition & 6 deletions worlds/mm2/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@


def can_defeat_enough_rbms(state: "CollectionState", player: int, required: int) -> bool:
can_defeat = 0

for boss in robot_masters:
if state.has(robot_masters[boss], player):
can_defeat += 1
return can_defeat >= required
return state.has_from_list(robot_masters.values(), player, required)


def set_rules(world: "MM2World") -> None:
Expand Down

0 comments on commit e1e8186

Please sign in to comment.