Skip to content

Commit

Permalink
Fix Feebas mode when Pokemon doesn't have 4 moves
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultLassiaz committed Nov 18, 2024
1 parent a6fb704 commit 247840b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/modes/feebas.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from ..encounter import EncounterInfo
from ..memory import get_event_flag


# How many times the bot tries to fish on the same tile before it deems it
# a non-Feebas tile and moves on.
maximum_number_of_fishing_attempts_per_tile = 3
Expand Down Expand Up @@ -177,7 +178,7 @@ def run(self) -> Generator:
if get_event_flag("BADGE08_GET"):
for pokemon in get_party():
for learned_move in pokemon.moves:
if learned_move.move.name == "Waterfall":
if learned_move is not None and learned_move.move.name == "Waterfall":
self._can_use_waterfall = True
break

Expand Down

0 comments on commit 247840b

Please sign in to comment.