Skip to content

Commit

Permalink
Fix joy ignore skips
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguy11325 committed Aug 28, 2024
1 parent 2a919b6 commit f79abaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pokemonred_puffer/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,8 @@ def run_action_on_emulator(self, action):
self.update_seen_coords()

while self.read_m("wJoyIgnore"):
# DO NOT DELETE. Some animations require dialog interaction
self.pyboy.button("a", 8)
self.pyboy.tick(self.action_freq, render=False)

if self.events.get_event("EVENT_GOT_HM01"):
Expand Down Expand Up @@ -1375,7 +1377,7 @@ def cut_hook(self, context):

def disable_wild_encounter_hook(self, *args, **kwargs):
self.pyboy.memory[self.pyboy.symbol_lookup("wRepelRemainingSteps")[1]] = 0xFF
self.pyboy.memory[self.pyboy.symbol_lookup("wCurEnemyLVL")[1]] = 0x01
self.pyboy.memory[self.pyboy.symbol_lookup("wCurEnemyLevel")[1]] = 0x01

def agent_stats(self, action):
levels = [self.read_m(f"wPartyMon{i+1}Level") for i in range(self.read_m("wPartyCount"))]
Expand Down

0 comments on commit f79abaa

Please sign in to comment.