Skip to content

Commit

Permalink
Only give menu rewards when not in battle
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguy11325 committed Mar 24, 2024
1 parent eeaa40d commit b79446c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pokemonred_puffer/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b79446c

Please sign in to comment.