From 9523d107c4e475ba0a67df8c8a8d146e30e6c55a Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:44:45 -0400 Subject: [PATCH] only apply menu rewards post cut --- pokemonred_puffer/rewards/baseline.py | 36 +++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/pokemonred_puffer/rewards/baseline.py b/pokemonred_puffer/rewards/baseline.py index d3722f0..e3a3069 100644 --- a/pokemonred_puffer/rewards/baseline.py +++ b/pokemonred_puffer/rewards/baseline.py @@ -140,28 +140,38 @@ def get_game_state_reward(self): return { "event": self.reward_config["event"] * self.update_max_event_rew(), "met_bill": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F1, 0)), - "used_cell_separator_on_bill": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 3)), + "used_cell_separator_on_bill": ( + self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 3)) + ), "ss_ticket": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 4)), "met_bill_2": self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 5)), - "bill_said_use_cell_separator": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 6)), - "left_bills_house_after_helping": self.reward_config["bill_saved"] - * int(self.read_bit(0xD7F2, 7)), + "bill_said_use_cell_separator": ( + self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 6)) + ), + "left_bills_house_after_helping": ( + self.reward_config["bill_saved"] * int(self.read_bit(0xD7F2, 7)) + ), "moves_obtained": self.reward_config["moves_obtained"] * sum(self.moves_obtained), "hm_count": self.reward_config["hm_count"] * self.get_hm_count(), "badges": self.reward_config["badges"] * self.get_badges(), "exploration": self.reward_config["exploration"] * sum(self.seen_coords.values()), "explore_npcs": self.reward_config["explore_npcs"] * sum(self.seen_npcs.values()), - "explore_hidden_objs": self.reward_config["explore_hidden_objs"] - * sum(self.seen_hidden_objs.values()), + "explore_hidden_objs": ( + self.reward_config["explore_hidden_objs"] * sum(self.seen_hidden_objs.values()) + ), "cut_coords": self.reward_config["cut_coords"] * sum(self.cut_coords.values()), "cut_tiles": self.reward_config["cut_tiles"] * sum(self.cut_tiles), - "start_menu": self.reward_config["start_menu"] * self.seen_start_menu, - "pokemon_menu": self.reward_config["pokemon_menu"] * self.seen_pokemon_menu, - "stats_menu": self.reward_config["stats_menu"] * self.seen_stats_menu, - "bag_menu": self.reward_config["bag_menu"] * self.seen_bag_menu, - "taught_cut": self.reward_config["taught_cut"] * int(self.check_if_party_has_cut()), + "start_menu": ( + self.reward_config["start_menu"] * self.seen_start_menu * int(self.taught_cut) + ), + "pokemon_menu": ( + self.reward_config["pokemon_menu"] * self.seen_pokemon_menu * int(self.taught_cut) + ), + "stats_menu": ( + self.reward_config["stats_menu"] * self.seen_stats_menu * int(self.taught_cut) + ), + "bag_menu": self.reward_config["bag_menu"] * self.seen_bag_menu * int(self.taught_cut), + "taught_cut": self.reward_config["taught_cut"] * int(self.taught_cut), } def update_max_event_rew(self):