From 4087851f7c9c92791182ffa695073827c5433829 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Mon, 11 Nov 2013 22:39:37 -0600 Subject: wild switch prompt detector --- pokemontools/vba/vba.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'pokemontools/vba/vba.py') diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py index 6f863b6..17d3be6 100644 --- a/pokemontools/vba/vba.py +++ b/pokemontools/vba/vba.py @@ -625,8 +625,16 @@ class crystal(object): Detects if the battle is waiting for the player to choose whether or not to continue to fight the wild pokemon. """ - # TODO: make a better implementation - return False + # get on-screen text + screen_text = self.get_text() + + requirements = [ + "YES", + "NO", + "Use next POKMON?", + ] + + return all([requirement in text for requirement in requirements]) def is_switch_prompt(self): """ -- cgit v1.2.3