Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pokemon Red and Blue: Updates to trap weights and tracker support #1395

Merged
merged 4 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion worlds/pokemon_rb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ def create_items(self) -> None:
item = self.create_filler()
else:
item = self.create_item(location.original_item)
combined_traps = self.multiworld.poison_trap_weight[self.player].value + self.multiworld.fire_trap_weight[self.player].value + self.multiworld.paralyze_trap_weight[self.player].value + self.multiworld.ice_trap_weight[self.player].value
if (item.classification == ItemClassification.filler and self.multiworld.random.randint(1, 100)
<= self.multiworld.trap_percentage[self.player].value):
<= self.multiworld.trap_percentage[self.player].value and combined_traps != 0):
item = self.create_item(self.select_trap())
if location.event:
self.multiworld.get_location(location.name, self.player).place_locked_item(item)
Expand Down Expand Up @@ -349,6 +350,7 @@ def fill_slot_data(self) -> dict:
"elite_four_condition": self.multiworld.elite_four_condition[self.player].value,
"victory_road_condition": self.multiworld.victory_road_condition[self.player].value,
"viridian_gym_condition": self.multiworld.viridian_gym_condition[self.player].value,
"cerulean_cave_condition": self.multiworld.cerulean_cave_condition[self.player].value,
"free_fly_map": self.fly_map_code,
"extra_badges": self.extra_badges,
"type_chart": self.type_chart,
Expand Down
4 changes: 2 additions & 2 deletions worlds/pokemon_rb/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ class TrapWeight(Choice):
option_low = 1
option_medium = 3
option_high = 5
option_disabled = 0
default = 3


Expand All @@ -539,7 +540,6 @@ class ParalyzeTrapWeight(TrapWeight):
class IceTrapWeight(TrapWeight):
"""Weights for Ice Traps. These apply the Ice status to all your party members. Don't forget to buy Ice Heals!"""
display_name = "Ice Trap Weight"
option_disabled = 0
default = 0


Expand Down Expand Up @@ -605,4 +605,4 @@ class IceTrapWeight(TrapWeight):
"paralyze_trap_weight": ParalyzeTrapWeight,
"ice_trap_weight": IceTrapWeight,
"death_link": DeathLink
}
}