From b16b0e25377cd25290014f280e450c16650218d1 Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Sun, 9 Jun 2024 00:56:35 -0400 Subject: [PATCH] set repel every turn --- pokemonred_puffer/environment.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index 20617e7..09b47cd 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -884,6 +884,9 @@ def step(self, action): if self.save_video and self.step_count == 0: self.start_video() + if self.disable_wild_encounters: + self.pyboy.memory[self.pyboy.symbol_lookup("wRepelRemainingSteps")[1]] = 100 + _, wMapPalOffset = self.pyboy.symbol_lookup("wMapPalOffset") if self.auto_flash and self.pyboy.memory[wMapPalOffset] == 6: self.pyboy.memory[wMapPalOffset] = 0