Lingo: Add speed boost mode (#3989)

* Add speed boost mode

* Update generated.dat

* Modify the actual trap weights option when speed boost mode is on

* EOF newline

* Update generated.dat
This commit is contained in:
Star Rauchenberger 2025-01-15 15:13:29 -05:00 committed by GitHub
parent 207a76d1b5
commit 1eefe23f11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 32 additions and 4 deletions

View File

@ -128,6 +128,9 @@ class LingoWorld(World):
pool.append(self.create_item("Puzzle Skip"))
if traps:
if self.options.speed_boost_mode:
self.options.trap_weights.value["Slowness Trap"] = 0
total_weight = sum(self.options.trap_weights.values())
if total_weight == 0:
@ -171,7 +174,7 @@ class LingoWorld(World):
"death_link", "victory_condition", "shuffle_colors", "shuffle_doors", "shuffle_paintings", "shuffle_panels",
"enable_pilgrimage", "sunwarp_access", "mastery_achievements", "level_2_requirement", "location_checks",
"early_color_hallways", "pilgrimage_allows_roof_access", "pilgrimage_allows_paintings", "shuffle_sunwarps",
"group_doors"
"group_doors", "speed_boost_mode"
]
slot_data = {
@ -188,5 +191,8 @@ class LingoWorld(World):
return slot_data
def get_filler_item_name(self) -> str:
filler_list = [":)", "The Feeling of Being Lost", "Wanderlust", "Empty White Hallways"]
return self.random.choice(filler_list)
if self.options.speed_boost_mode:
return "Speed Boost"
else:
filler_list = [":)", "The Feeling of Being Lost", "Wanderlust", "Empty White Hallways"]
return self.random.choice(filler_list)

Binary file not shown.

View File

@ -17,6 +17,7 @@ special_items:
Iceland Trap: 444411
Atbash Trap: 444412
Puzzle Skip: 444413
Speed Boost: 444680
panels:
Starting Room:
HI: 444400

View File

@ -85,6 +85,7 @@ def load_item_data():
"The Feeling of Being Lost": ItemClassification.filler,
"Wanderlust": ItemClassification.filler,
"Empty White Hallways": ItemClassification.filler,
"Speed Boost": ItemClassification.filler,
**{trap_name: ItemClassification.trap for trap_name in TRAP_ITEMS},
"Puzzle Skip": ItemClassification.useful,
}

View File

@ -232,6 +232,14 @@ class TrapWeights(OptionDict):
default = {trap_name: 1 for trap_name in TRAP_ITEMS}
class SpeedBoostMode(Toggle):
"""
If on, the player's default speed is halved, as if affected by a Slowness Trap. Speed Boosts are added to
the item pool, which temporarily return the player to normal speed. Slowness Traps are removed from the pool.
"""
display_name = "Speed Boost Mode"
class PuzzleSkipPercentage(Range):
"""Replaces junk items with puzzle skips, at the specified rate."""
display_name = "Puzzle Skip Percentage"
@ -260,6 +268,7 @@ lingo_option_groups = [
Level2Requirement,
TrapPercentage,
TrapWeights,
SpeedBoostMode,
PuzzleSkipPercentage,
])
]
@ -287,6 +296,7 @@ class LingoOptions(PerGameCommonOptions):
shuffle_postgame: ShufflePostgame
trap_percentage: TrapPercentage
trap_weights: TrapWeights
speed_boost_mode: SpeedBoostMode
puzzle_skip_percentage: PuzzleSkipPercentage
death_link: DeathLink
start_inventory_from_pool: StartInventoryPool

View File

@ -59,4 +59,11 @@ class TestShuffleSunwarpsAccess(LingoTestBase):
"victory_condition": "pilgrimage",
"shuffle_sunwarps": "true",
"sunwarp_access": "individual"
}
}
class TestSpeedBoostMode(LingoTestBase):
options = {
"location_checks": "insanity",
"speed_boost_mode": "true",
}

View File

@ -216,3 +216,6 @@ config.each do |room_name, room_data|
end
File.write(outputpath, old_generated.to_yaml)
puts "Next item ID: #{next_item_id}"
puts "Next location ID: #{next_location_id}"