LttP, beemizer: support fine-tuned trap replacements (#113)

* update beemizer logic to separate replacement chance and single vs trap chance

* convert beemizer options to new style
This commit is contained in:
Adam Ziegler
2021-11-03 05:34:11 +00:00
committed by GitHub
parent cb8da2e757
commit 583819c4ae
9 changed files with 172 additions and 97 deletions

View File

@@ -261,6 +261,26 @@ class TriforceHud(Choice):
option_hide_both = 3
class BeemizerRange(Range):
value: int
range_start = 0
range_end = 100
class BeemizerTotalChance(BeemizerRange):
"""Percentage chance for each junk-fill item (rupees, bombs, arrows) to be
replaced with either a bee swarm trap or a single bottle-filling bee."""
default = 0
displayname = "Beemizer Total Chance"
class BeemizerTrapChance(BeemizerRange):
"""Percentage chance for each replaced junk-fill item to be a bee swarm
trap; all other replaced items are single bottle-filling bees."""
default = 60
displayname = "Beemizer Trap Chance"
alttp_options: typing.Dict[str, type(Option)] = {
"crystals_needed_for_gt": CrystalsTower,
"crystals_needed_for_ganon": CrystalsGanon,
@@ -293,6 +313,8 @@ alttp_options: typing.Dict[str, type(Option)] = {
"reduceflashing": ReduceFlashing,
"triforcehud": TriforceHud,
"glitch_boots": DefaultOnToggle,
"beemizer_total_chance": BeemizerTotalChance,
"beemizer_trap_chance": BeemizerTrapChance,
"death_link": DeathLink
}