The Witness: Panel Hunt Mode (#3265)
* Add panel hunt options * Make sure all panels are either solvable or disabled in panel hunt * Pick huntable panels * Discards in disable non randomized * Set up panel hunt requirement * Panel hunt functional * Make it so an event can have multiple names * Panel hunt with events * Add hunt entities to slot data * ruff * add to hint data, no client sneding yet * encode panel hunt amount in compact hint data * Remove print statement * my b * consistent * meh * additions for lcient * Nah * Victory panels ineligible for panel hunt * Panel Hunt Postgame option * cleanup * Add data generation file * pull out set * always disable gate ep in panel hunt * Disallow certain challenge panels from being panel hunt panels * Make panelhuntpostgame its own function, so it can be called even if normal postgame is enabled * disallow PP resets from panel hunt * Disable challenge timer and elevetor start respectively in disable hunt postgame * Fix panelhunt postgame * lol * When you test that the bug is fixed but not that the non-bug is not unfixed * Prevent Obelisks from being panel hunt panels * Make picking panels for panel hunt a bit more sophisticated, if less random * Better function maybe ig * Ok maybe that was a bit too much * Give advanced players some control over panel hunt * lint * correct the logic for amount to pick * decided the jingle thing was dumb, I'll figure sth out client side. Same area discouragement is now a configurable factor, and the logic has been significantly rewritten * comment * Make the option visible * Safety * Change assert slightly * We do a little logging * number tweak & we do a lil logging * we do a little more logging * Ruff * Panel Hunt Option Group * Idk how that got here * Update worlds/witness/options.py Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * Update worlds/witness/__init__.py Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * remove merge error * Update worlds/witness/player_logic.py Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * True * Don't have underwater sliding bridge when you have above water sliding bridge * These are not actually connected lol * get rid of unnecessary variable * Refactor compact hint function again * lint * Pull out Entity Hunt Picking into its own class, split it into many functions. Kept a lot of the comments tho * forgot to actually add the new file * some more refactoring & docstrings * consistent naming * flip elif change * Comment about naming * Make static eligible panels a constant I can refer back to * slight formatting change * pull out options-based eligibility into its own function * better text and stuff * lint * this is not necessary * capitalisation * Fix same area discouragement 0 * Simplify data file generation * Simplify data file generation * prevent div 0 * Add Vault Boxes -> Vault Panels to replacements * Update options.py * Update worlds/witness/entity_hunt.py Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * Update entity_hunt.py * Fix some events not working * assert * remove now unused function * lint * Lasers Activate, Lasers don't Solve * lint * oops * mypy * lint * Add simple panel hunt unit test * Add Panel Hunt Tests * Add more Panel Hunt Tests * Disallow Box Short for normal panel hunt --------- Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
@@ -173,6 +173,7 @@ class VictoryCondition(Choice):
|
||||
- Challenge: Beat the secret Challenge (requires Challenge Lasers).
|
||||
- Mountain Box Short: Input the short solution to the Mountaintop Box (requires Mountain Lasers).
|
||||
- Mountain Box Long: Input the long solution to the Mountaintop Box (requires Challenge Lasers).
|
||||
- Panel Hunt: Solve a specific number of randomly selected panels before going to the secret ending in Tutorial.
|
||||
|
||||
It is important to note that while the Mountain Box requires Desert Laser to be redirected in Town for that laser
|
||||
to count, the laser locks on the Elevator and Challenge Timer panels do not.
|
||||
@@ -182,6 +183,62 @@ class VictoryCondition(Choice):
|
||||
option_challenge = 1
|
||||
option_mountain_box_short = 2
|
||||
option_mountain_box_long = 3
|
||||
option_panel_hunt = 4
|
||||
|
||||
|
||||
class PanelHuntTotal(Range):
|
||||
"""
|
||||
Sets the number of random panels that will get marked as "Panel Hunt" panels in the "Panel Hunt" game mode.
|
||||
"""
|
||||
display_name = "Total Panel Hunt panels"
|
||||
range_start = 5
|
||||
range_end = 100
|
||||
default = 40
|
||||
|
||||
|
||||
class PanelHuntRequiredPercentage(Range):
|
||||
"""
|
||||
Determines the percentage of "Panel Hunt" panels that need to be solved to win.
|
||||
"""
|
||||
display_name = "Percentage of required Panel Hunt panels"
|
||||
range_start = 20
|
||||
range_end = 100
|
||||
default = 63
|
||||
|
||||
|
||||
class PanelHuntPostgame(Choice):
|
||||
"""
|
||||
In panel hunt, there are technically no postgame locations.
|
||||
Depending on your options, this can leave Mountain and Caves as two huge areas with Hunt Panels in them that cannot be reached until you get enough lasers to go through the very linear Mountain descent.
|
||||
Panel Hunt tends to be more fun when the world is open.
|
||||
This option lets you force anything locked by lasers to be disabled, and thus ineligible for Hunt Panels.
|
||||
To compensate, the respective mountain box solution (short box / long box) will be forced to be a Hunt Panel.
|
||||
Does nothing if Panel Hunt is not your victory condition.
|
||||
|
||||
Note: The "Mountain Lasers" option may also affect locations locked by challenge lasers if the only path to those locations leads through the Mountain Entry.
|
||||
"""
|
||||
|
||||
display_name = "Force postgame in Panel Hunt"
|
||||
|
||||
option_everything_is_eligible = 0
|
||||
option_disable_mountain_lasers_locations = 1
|
||||
option_disable_challenge_lasers_locations = 2
|
||||
option_disable_anything_locked_by_lasers = 3
|
||||
default = 3
|
||||
|
||||
|
||||
class PanelHuntDiscourageSameAreaFactor(Range):
|
||||
"""
|
||||
The greater this value, the less likely it is that many Hunt Panels show up in the same area.
|
||||
|
||||
At 0, Hunt Panels will be selected randomly.
|
||||
At 100, Hunt Panels will be almost completely evenly distributed between areas.
|
||||
"""
|
||||
display_name = "Panel Hunt Discourage Same Area Factor"
|
||||
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 40
|
||||
|
||||
|
||||
class PuzzleRandomization(Choice):
|
||||
@@ -332,6 +389,10 @@ class TheWitnessOptions(PerGameCommonOptions):
|
||||
victory_condition: VictoryCondition
|
||||
mountain_lasers: MountainLasers
|
||||
challenge_lasers: ChallengeLasers
|
||||
panel_hunt_total: PanelHuntTotal
|
||||
panel_hunt_required_percentage: PanelHuntRequiredPercentage
|
||||
panel_hunt_postgame: PanelHuntPostgame
|
||||
panel_hunt_discourage_same_area_factor: PanelHuntDiscourageSameAreaFactor
|
||||
early_caves: EarlyCaves
|
||||
early_symbol_item: EarlySymbolItem
|
||||
elevators_come_to_you: ElevatorsComeToYou
|
||||
@@ -352,6 +413,12 @@ witness_option_groups = [
|
||||
MountainLasers,
|
||||
ChallengeLasers,
|
||||
]),
|
||||
OptionGroup("Panel Hunt Settings", [
|
||||
PanelHuntRequiredPercentage,
|
||||
PanelHuntTotal,
|
||||
PanelHuntPostgame,
|
||||
PanelHuntDiscourageSameAreaFactor,
|
||||
], start_collapsed=True),
|
||||
OptionGroup("Locations", [
|
||||
ShuffleDiscardedPanels,
|
||||
ShuffleVaultBoxes,
|
||||
|
||||
Reference in New Issue
Block a user