From b79446c70db295c8443fb9483ff02312719f8fa5 Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Sat, 23 Mar 2024 20:07:30 -0400 Subject: [PATCH] Only give menu rewards when not in battle --- pokemonred_puffer/environment.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index 44e22fb..ae56df3 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -529,19 +529,24 @@ def sprite_hook(self, *args, **kwargs): self.seen_npcs[(map_id, sprite_id)] = 1 def start_menu_hook(self, *args, **kwargs): - self.seen_start_menu = 1 + if self.read_m("wIsInBattle") == 0: + self.seen_start_menu = 1 def item_menu_hook(self, *args, **kwargs): - self.seen_bag_menu = 1 + if self.read_m("wIsInBattle") == 0: + self.seen_bag_menu = 1 def pokemon_menu_hook(self, *args, **kwargs): - self.seen_pokemon_menu = 1 + if self.read_m("wIsInBattle") == 0: + self.seen_pokemon_menu = 1 def chose_stats_hook(self, *args, **kwargs): - self.seen_stats_menu = 1 + if self.read_m("wIsInBattle") == 0: + self.seen_stats_menu = 1 def chose_item_hook(self, *args, **kwargs): - self.seen_action_bag_menu = 1 + if self.read_m("wIsInBattle") == 0: + self.seen_action_bag_menu = 1 def blackout_hook(self, *args, **kwargs): self.blackout_count += 1