Skip to content

Commit

Permalink
Find path like ball saver not strong boss (#116)
Browse files Browse the repository at this point in the history
* Update auto_max_lair.py

* Update Config.sample.toml

* Update auto_max_lair.py
  • Loading branch information
TeachingGame authored Apr 3, 2021
1 parent 26dc166 commit 6151a93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 2 additions & 3 deletions Config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ LEGENDARY_BALLS = 500
# "KEEP PATH" - Will force the game to always reset on a pre-saved path.
# Similar to "BALL SAVER" and "STRONG BOSS" but will always use the same path if it fails.
# This will deplete your Ore quickly.
# "FIND PATH" - Will run like STRONG BOSS mode but will stop when it consecutively wins the
# number of times inputted into "FIND PATH WINS". It is recommended to leave the
# NON_LEGEND setting as "default" to avoid any false posistives.
# "FIND PATH" - Will run like BALL SAVER mode but will stop when it consecutively wins the
# number of times inputted into "FIND PATH WINS".
# It can be used alongside KEEP PATH to find a winning path. Don't forget to update the
# CONSECUTIVE_RESETS section below, before starting KEEP PATH.
# It's up to the user to check if the path found was good or not.
Expand Down
13 changes: 9 additions & 4 deletions auto_max_lair.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,15 @@ def select_pokemon(ctrlr) -> str:
# caught.
if (
(ctrlr.mode == 'keep path' and (run.num_caught < 4 or i > 0))
or (ctrlr.mode == 'ball saver' and run.num_caught == 4 and i > 0)
or (
(ctrlr.mode == 'ball saver' or ctrlr.mode == 'find path')
and run.num_caught == 4 and i > 0
)
):
if ctrlr.mode == 'ball saver' or ctrlr.check_sufficient_ore(2):
if (
(ctrlr.mode == 'ball saver' or ctrlr.mode == 'find path')
or ctrlr.check_sufficient_ore(2)
):
reset_game = True
break
else:
Expand Down Expand Up @@ -692,8 +698,7 @@ def select_pokemon(ctrlr) -> str:
ctrlr.push_button(b'^', 3 + VIDEO_EXTRA_DELAY)

if (
not take_pokemon and (
ctrlr.mode == 'strong boss' or ctrlr.mode == 'find path')
not take_pokemon and ctrlr.mode == 'strong boss'
and run.num_caught == 4 and ctrlr.check_sufficient_ore(1)
):
reset_game = True
Expand Down

0 comments on commit 6151a93

Please sign in to comment.