Skip to content

Commit

Permalink
only apply menu rewards post cut
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguy11325 committed Mar 22, 2024
1 parent 7e581ed commit 9523d10
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions pokemonred_puffer/rewards/baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 9523d10

Please sign in to comment.