From f79abaa97681c71ba1394c745bcbcc23da512108 Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:56:36 -0400 Subject: [PATCH] Fix joy ignore skips --- pokemonred_puffer/environment.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index adf55b3..22f5af9 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -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"): @@ -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"))]