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:
parent
207a76d1b5
commit
1eefe23f11
|
@ -128,6 +128,9 @@ class LingoWorld(World):
|
||||||
pool.append(self.create_item("Puzzle Skip"))
|
pool.append(self.create_item("Puzzle Skip"))
|
||||||
|
|
||||||
if traps:
|
if traps:
|
||||||
|
if self.options.speed_boost_mode:
|
||||||
|
self.options.trap_weights.value["Slowness Trap"] = 0
|
||||||
|
|
||||||
total_weight = sum(self.options.trap_weights.values())
|
total_weight = sum(self.options.trap_weights.values())
|
||||||
|
|
||||||
if total_weight == 0:
|
if total_weight == 0:
|
||||||
|
@ -171,7 +174,7 @@ class LingoWorld(World):
|
||||||
"death_link", "victory_condition", "shuffle_colors", "shuffle_doors", "shuffle_paintings", "shuffle_panels",
|
"death_link", "victory_condition", "shuffle_colors", "shuffle_doors", "shuffle_paintings", "shuffle_panels",
|
||||||
"enable_pilgrimage", "sunwarp_access", "mastery_achievements", "level_2_requirement", "location_checks",
|
"enable_pilgrimage", "sunwarp_access", "mastery_achievements", "level_2_requirement", "location_checks",
|
||||||
"early_color_hallways", "pilgrimage_allows_roof_access", "pilgrimage_allows_paintings", "shuffle_sunwarps",
|
"early_color_hallways", "pilgrimage_allows_roof_access", "pilgrimage_allows_paintings", "shuffle_sunwarps",
|
||||||
"group_doors"
|
"group_doors", "speed_boost_mode"
|
||||||
]
|
]
|
||||||
|
|
||||||
slot_data = {
|
slot_data = {
|
||||||
|
@ -188,5 +191,8 @@ class LingoWorld(World):
|
||||||
return slot_data
|
return slot_data
|
||||||
|
|
||||||
def get_filler_item_name(self) -> str:
|
def get_filler_item_name(self) -> str:
|
||||||
filler_list = [":)", "The Feeling of Being Lost", "Wanderlust", "Empty White Hallways"]
|
if self.options.speed_boost_mode:
|
||||||
return self.random.choice(filler_list)
|
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.
|
@ -17,6 +17,7 @@ special_items:
|
||||||
Iceland Trap: 444411
|
Iceland Trap: 444411
|
||||||
Atbash Trap: 444412
|
Atbash Trap: 444412
|
||||||
Puzzle Skip: 444413
|
Puzzle Skip: 444413
|
||||||
|
Speed Boost: 444680
|
||||||
panels:
|
panels:
|
||||||
Starting Room:
|
Starting Room:
|
||||||
HI: 444400
|
HI: 444400
|
||||||
|
|
|
@ -85,6 +85,7 @@ def load_item_data():
|
||||||
"The Feeling of Being Lost": ItemClassification.filler,
|
"The Feeling of Being Lost": ItemClassification.filler,
|
||||||
"Wanderlust": ItemClassification.filler,
|
"Wanderlust": ItemClassification.filler,
|
||||||
"Empty White Hallways": ItemClassification.filler,
|
"Empty White Hallways": ItemClassification.filler,
|
||||||
|
"Speed Boost": ItemClassification.filler,
|
||||||
**{trap_name: ItemClassification.trap for trap_name in TRAP_ITEMS},
|
**{trap_name: ItemClassification.trap for trap_name in TRAP_ITEMS},
|
||||||
"Puzzle Skip": ItemClassification.useful,
|
"Puzzle Skip": ItemClassification.useful,
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,6 +232,14 @@ class TrapWeights(OptionDict):
|
||||||
default = {trap_name: 1 for trap_name in TRAP_ITEMS}
|
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):
|
class PuzzleSkipPercentage(Range):
|
||||||
"""Replaces junk items with puzzle skips, at the specified rate."""
|
"""Replaces junk items with puzzle skips, at the specified rate."""
|
||||||
display_name = "Puzzle Skip Percentage"
|
display_name = "Puzzle Skip Percentage"
|
||||||
|
@ -260,6 +268,7 @@ lingo_option_groups = [
|
||||||
Level2Requirement,
|
Level2Requirement,
|
||||||
TrapPercentage,
|
TrapPercentage,
|
||||||
TrapWeights,
|
TrapWeights,
|
||||||
|
SpeedBoostMode,
|
||||||
PuzzleSkipPercentage,
|
PuzzleSkipPercentage,
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
@ -287,6 +296,7 @@ class LingoOptions(PerGameCommonOptions):
|
||||||
shuffle_postgame: ShufflePostgame
|
shuffle_postgame: ShufflePostgame
|
||||||
trap_percentage: TrapPercentage
|
trap_percentage: TrapPercentage
|
||||||
trap_weights: TrapWeights
|
trap_weights: TrapWeights
|
||||||
|
speed_boost_mode: SpeedBoostMode
|
||||||
puzzle_skip_percentage: PuzzleSkipPercentage
|
puzzle_skip_percentage: PuzzleSkipPercentage
|
||||||
death_link: DeathLink
|
death_link: DeathLink
|
||||||
start_inventory_from_pool: StartInventoryPool
|
start_inventory_from_pool: StartInventoryPool
|
||||||
|
|
|
@ -59,4 +59,11 @@ class TestShuffleSunwarpsAccess(LingoTestBase):
|
||||||
"victory_condition": "pilgrimage",
|
"victory_condition": "pilgrimage",
|
||||||
"shuffle_sunwarps": "true",
|
"shuffle_sunwarps": "true",
|
||||||
"sunwarp_access": "individual"
|
"sunwarp_access": "individual"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TestSpeedBoostMode(LingoTestBase):
|
||||||
|
options = {
|
||||||
|
"location_checks": "insanity",
|
||||||
|
"speed_boost_mode": "true",
|
||||||
|
}
|
||||||
|
|
|
@ -216,3 +216,6 @@ config.each do |room_name, room_data|
|
||||||
end
|
end
|
||||||
|
|
||||||
File.write(outputpath, old_generated.to_yaml)
|
File.write(outputpath, old_generated.to_yaml)
|
||||||
|
|
||||||
|
puts "Next item ID: #{next_item_id}"
|
||||||
|
puts "Next location ID: #{next_location_id}"
|
||||||
|
|
Loading…
Reference in New Issue