Archipelago/worlds/inscryption/Options.py

138 lines
4.7 KiB
Python
Raw Normal View History

Inscryption: Implement new game (#3621) * Worked locally before that so this is a lot of work . So, initial push * Changes in init with better create_regions (Thanks to Phar on discord). Add a rule for victory. Change the regions list to remove menu in the destination. * Added tests for location rules and changed rule locations to lists instead of sets * Fixed game var in InscryptionLocation * Fixed location access by using the same system from The Messenger * Remove unuse rules in init and add region rules. Add all the act 2 locations and items. * Add locations rule for the left of the bridge in act 2 * Added test for bridge requirement and added a dash to locationfor clarity * Added more act 2 rules and removed completion rule * Created docs for website, added Salmon Card item, marked multiple items as "progression", renamed tomb checks, added more location rules, re-added completion rule * Renamed tower bath check to "Tentacle", added monocle as requirement for some checks, adjusted setup doc a bit * Added tentacle to monocle test * Added forest burrow chest rule * Switch the two clock location because the id was swapped and screwed with the logic * Added Ancient Obol rule and adjusted docs * Added act 3 locations/items/rules/tests * Added drone & battery to trader rules * Fixed tutorial docs, added more act 3 rules, renamed holo pelt locations * Add an option for the optional death card feature * Added well check and quill item, added rules and tests * Renamed Gems module and Gems drone * Added slot data options * Added rule for act 3 middle pelt * Added option for randomize ability and uptade the randomize deck option to fit the new setup * Added randomize ability in slot data * Added more requirements for mycologists boss since it's pretty much an impossible fight early on * Finished the french translation of the installation guide * Changed the french title in the guide * Added goal option and tests associated to it + fixed goal requirement missing quill * Added goal option to docs and removed references to the now discarded API mod. Fixed some french translations. * Added ourobot item + renamed some goal settings * Fixed locations and items for act 1 goal * Added skip tutorial option. Cleanup and rename of some options. Added tower requirement for Mycologist Key check. Fixed missing comma in act 2 locations oopsies. * Added missing rules for Extra Battery, Nano Armor and Goobert's painting * Added act 1 deathlink behaviour and epitaph pieces randomization options + made pieces progressive + adjusted docs * Fixed some docs typos * Added act 3 clock rule. Paintings 2, 3 and Goobert's painting can no longer contain progression items. * New options system and fixed act 1 goal option breaking * Added skip epilogue and painting checks balancing options. Renamed randomize abilities to randomize sigils. Fixed generation issue with epitaph pieces randomization. Goobert's painting no longer forces filler. Removed traps option for now. Reworded some option descriptions. * Attempting type fix for python 3.8 * Attempting type fix for python 3.8 again * Added starting only option for randomize deck * Fixed arbitrary rule error * Import fix attempt * Migrated to DeathLinkMixin instead of creating a custom DeathLink option, cleaned up imports, renamed Death Link related options to include "death_link" instead of "deathlink", replaced numeral values for option checking into class attributes for readability, slight optimization to tower rule, fixed typo in codes option description. * Added bug report page to web class, condensed pelt rules to one function, added items/locations count in game docs and adjusted some sections * Added Inscryption to CODEOWNERS * Implemented a bunch of suggestions: Better handling of painting option, options as dict for slot data, remove redundant auto_display_name, use of has_all, better goal tests, demote skink card to filler if goal is act 1 and force filler on paintings * Makes clover plant and squirrel head progression items if paintings are balanced + fixed other issues * filler items, start inventory from pool, '->" * Fix bleeding issue * Copy the list instead * Fixed bleeding using proper deep copy * Remove unnecessary for loops in tests * Add defaults to choice options --------- Co-authored-by: Benjamin Gregoire <benjamingregoire@outlook.com> Co-authored-by: Exempt-Medic <ExemptMedic@Gmail.com> Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-12-21 22:12:35 +00:00
from dataclasses import dataclass
from Options import Toggle, Choice, DeathLinkMixin, StartInventoryPool, PerGameCommonOptions, DefaultOnToggle
class Act1DeathLinkBehaviour(Choice):
"""If DeathLink is enabled, determines what counts as a death in act 1. This affects deaths sent and received.
- Sacrificed: Send a death when sacrificed by Leshy. Receiving a death will extinguish all candles.
- Candle Extinguished: Send a death when a candle is extinguished. Receiving a death will extinguish a candle."""
display_name = "Act 1 Death Link Behaviour"
option_sacrificed = 0
option_candle_extinguished = 1
default = 0
class Goal(Choice):
"""Defines the goal to accomplish in order to complete the randomizer.
- Full Story In Order: Complete each act in order. You can return to previously completed acts.
- Full Story Any Order: Complete each act in any order. All acts are available from the start.
- First Act: Complete Act 1 by finding the New Game button. Great for a smaller scale randomizer."""
display_name = "Goal"
option_full_story_in_order = 0
option_full_story_any_order = 1
option_first_act = 2
default = 0
class RandomizeCodes(Toggle):
"""Randomize codes and passwords in the game (clocks, safes, etc.)"""
display_name = "Randomize Codes"
class RandomizeDeck(Choice):
"""Randomize cards in your deck into new cards.
Disable: Disable the feature.
- Every Encounter Within Same Type: Randomize cards within the same type every encounter (keep rarity/scrybe type).
- Every Encounter Any Type: Randomize cards into any possible card every encounter.
- Starting Only: Only randomize cards given at the beginning of runs and acts."""
display_name = "Randomize Deck"
option_disable = 0
option_every_encounter_within_same_type = 1
option_every_encounter_any_type = 2
option_starting_only = 3
default = 0
class RandomizeSigils(Choice):
"""Randomize sigils printed on the cards into new sigils every encounter.
- Disable: Disable the feature.
- Randomize Addons: Only randomize sigils added from sacrifices or other means.
- Randomize All: Randomize all sigils."""
display_name = "Randomize Abilities"
option_disable = 0
option_randomize_addons = 1
option_randomize_all = 2
default = 0
class OptionalDeathCard(Choice):
"""Add a moment after death in act 1 where you can decide to create a death card or not.
- Disable: Disable the feature.
- Always On: The choice is always offered after losing all candles.
- DeathLink Only: The choice is only offered after receiving a DeathLink event."""
display_name = "Optional Death Card"
option_disable = 0
option_always_on = 1
option_deathlink_only = 2
default = 2
class SkipTutorial(DefaultOnToggle):
"""Skips the first few tutorial runs of act 1. Bones are available from the start."""
display_name = "Skip Tutorial"
class SkipEpilogue(Toggle):
"""Completes the goal as soon as the required acts are completed without the need of completing the epilogue."""
display_name = "Skip Epilogue"
class EpitaphPiecesRandomization(Choice):
"""Determines how epitaph pieces in act 2 are randomized. This can affect your chances of getting stuck.
- All Pieces: Randomizes all nine pieces as their own item.
- In Groups: Randomizes pieces in groups of three.
- As One Item: Group all nine pieces as a single item."""
display_name = "Epitaph Pieces Randomization"
option_all_pieces = 0
option_in_groups = 1
option_as_one_item = 2
default = 0
class PaintingChecksBalancing(Choice):
"""Generation options for the second and third painting checks in act 1.
- None: Adds no progression logic to these painting checks. They will all count as sphere 1 (early game checks).
- Balanced: Adds rules to these painting checks. Early game items are less likely to appear into these paintings.
- Force Filler: For when you dislike doing these last two paintings. Their checks will only contain filler items."""
display_name = "Painting Checks Balancing"
option_none = 0
option_balanced = 1
option_force_filler = 2
default = 1
@dataclass
class InscryptionOptions(DeathLinkMixin, PerGameCommonOptions):
start_inventory_from_pool: StartInventoryPool
act1_death_link_behaviour: Act1DeathLinkBehaviour
goal: Goal
randomize_codes: RandomizeCodes
randomize_deck: RandomizeDeck
randomize_sigils: RandomizeSigils
optional_death_card: OptionalDeathCard
skip_tutorial: SkipTutorial
skip_epilogue: SkipEpilogue
epitaph_pieces_randomization: EpitaphPiecesRandomization
painting_checks_balancing: PaintingChecksBalancing