* unit test that get all state is called with partial entrances before connect_entrances
* fix the two worlds doing it
* lol
* unused import
* Update test/general/test_entrances.py
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
* Update test_entrances.py
---------
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
* Add connect_entrances
* update ER docs
* fix that test, but also ew
* Add a test that asserts the new finalization
* Rewrite test a bit
* rewrite some more
* blank line
* rewrite rewrite rewrite
* rewrite rewrite rewrite
* RE. WRITE.
* oops
* Bruh
* I guess, while we're at it
* giga oops
* It's been a long day
* Switch KH1 over to this design with permission of GICU
* Revert
* Oops
* Bc I like it
* Update locations.py
* Core: some low-hanging fruit on the strict type check
* bump pyright version
* bump pyright version
* bump pyright and remove file that's no longer easy
* Initial implementation of Generic ER
* Move ERType to Entrance.Type, fix typing imports
* updates based on testing (read: flailing)
* Updates from feedback
* Various bug fixes in ERCollectionState
* Use deque instead of queue.Queue
* Allow partial entrances in collection state earlier, doc improvements
* Prevent early loops in region graph, improve reusability of ER stage code
* Typos, grammar, PEP8, and style "fixes"
* use RuntimeError instead of bare Exceptions
* return tuples from connect since it's slightly faster for our purposes
* move the shuffle to the beginning of find_pairing
* do er_state placements within pairing lookups to remove code duplication
* requested adjustments
* Add some temporary performance logging
* Use CollectionState to track available exits and placed regions
* Add a method to automatically disconnect entrances in a coupled-compliant way
Update docs and cleanup todos
* Make find_placeable_exits deterministic by sorting blocked_connections set
* Move EntranceType out of Entrance
* Handle minimal accessibility, autodetect regions, and improvements to disconnect
* Add on_connect callback to react to succeeded entrance placements
* Relax island-prevention constraints after a successful run on minimal accessibility; better error message on failure
* First set of unit tests for generic ER
* Change on_connect to send lists, add unit tests for EntranceLookup
* Fix duplicated location names in tests
* Update tests after merge
* Address review feedback, start docs with diagrams
* Fix rendering of hidden nodes in ER doc
* Move most docstring content into a docs article
* Clarify when randomize_entrances can be called safely
* Address review feedback
* Apply suggestions from code review
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
* Docs on ERPlacementState, add coupled/uncoupled handling to deadend detection
* Documentation clarifications
* Update groups to allow any hashable
* Restrict groups from hashable to int
* Implement speculative sweeping in stage 1, address misc review comments
* Clean unused imports in BaseClasses.py
* Restrictive region/speculative sweep test
* sweep_for_events->advancement
* Remove redundant __str__
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
* Allow partial entrances in auto indirect condition sweep
* Treat regions needed for logic as non-dead-end regardless of if they have exits, flip order of stage 3 and 4 to ensure there are enough exits for the dead ends
* Typing fixes suggested by mypy
* Remove erroneous newline
Not sure why the merge conflict editor is different and worse than the normal editor. Crazy
* Use modern typing for ER
* Enforce the use of explicit indirect conditions
* Improve doc on required indirect conditions
---------
Co-authored-by: qwint <qwint.42@gmail.com>
Co-authored-by: alwaysintreble <mmmcheese158@gmail.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
* Core: fix settings API for removal of Python 3.8, 3.9
This is fixing 2 problems:
- The `World` class has the annotation:
`settings: ClassVar[Optional["Group"]]`
so `MyWorld.settings` should not raise an exception like it does for some worlds.
With the `Optional` there, it looks like it should return `None` for the worlds that don't use it. So that's what I changed it to.
- `Group.update` had some code that required `typing.Union` instead of the Python 3.10 `|` for unions.
added unit test for this fix
added change in Zillion that I used to discover this problem and used it to test the test
* fix copy-pasted stuff
* tuple instead of set
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Rename sweep_for_events to sweep_for_advancements
* more event->advancement renames
* oops accidentally deleted the deprecation thing in the force push
* Update TestDungeon.py
* Update BaseClasses.py
* Update BaseClasses.py
* oops
* utils.deprecate
* treble, you had no idea how right you were
* Update test_panel_hunt.py
* Update BaseClasses.py
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
---------
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
* Blasphemous: WIP overhaul
* Entrance rule mistake
* stuff
* Getting closer
* Real?? Maybe??
* Don't fail me now 🙏
* Add starting location tests
* More tests (it still doesn't work actually 😔)
* REAL
* Add unreachable regions to test_reachability.py
* PR ready
- Remove unused functions from init
- Use group exclusive functions in rules
- Style changes
* Bump required client version
* Clean up unused imports
* Change slot data
* Review fixes
- Prevent strength calculations from including excess items
- Add new lines to ends of files
- Fix missed deprecated option and random usage in init
* Update option docstrings, add groups
* Add preprocessor files
* Update option docstrings again actually
* Update player strength calculation
* Rename group methods
* Fix missing logic for RESCUED_CHERUB_06
* Register indirect conditions
* Register indirect conditions (part 2)
* Update extracted logic, change slot data key
* Add region to excluded list
* A capital letter
* Use camelCase keys in preprocessor
* Write some of new setup guide
* Remove indents before list points
* Change locationinfo to list of dictonaries
* Finish docs, update extractor config and data
* Mark region_data.py as generated
* Suggested changes
* More suggested changes
* Suggested changes again
- Use OptionError
- Create list of disabled locations before looping
- Check if options are equal to str instead of int
- Clean up start location override
- Reword some of setup guide
- Organize location list
- Remove unnecessary escaped quotes from option docstrings
- Add world type to test base
* C# moment
* Requested changes
* Update .gitattributes
---------
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
* rename locations accessibility to "full" and make old locations accessibility debug only
* fix a bug in oot
* reorder lttp tests to not override its overrides
* changed the wrong word in the dict
* :forehead:
* update the manual lttp yaml
* use __debug__
* update pokemon and messenger
* fix conflicts from 993
* fix stardew presets
* add that locations may be inaccessible to description
* use reST format and make the items description one line so that it renders correctly on webhost
* forgot i renamed that
* add aliases for back compat
* some cleanup
* fix imports
* fix test failure
* only check "items" players when the item is progression
* Revert "only check "items" players when the item is progression"
This reverts commit ecbf986145e6194aa99a39c481d8ecd0736d5a4c.
* remove some unnecessary diffs
* CV64: Add ItemsAccessibility
* put items description at the bottom of the docstring since that's it's visual order
* :
* rename accessibility reference in pokemon rb dexsanity
* make the rendered tooltips look nicer
* Core: move item linking out of main
* add a test that item link option correctly validates
* remove unused fluff
---------
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
* settings: clean up imports
* settings: try to use atomic rename
* settings: flush, sync and validate new yaml
before replacing the old one
* settings: add test for Settings.save
* Tests: Add checksum validation to the postgen datapackage test
* add a special case for the test world datapackage rather than hidden
* add the test world to the datapackage instead of special casing around it
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* test that no worlds fail to load
* pep8
* Update test_implemented.py
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
* Initial implementation of Yu-Gi-Oh! WC 2006
* Added Opponents and banlists
* Initial implementation of Yu-Gi-Oh! WC 2006
* Added Opponents and banlists
* Added Campaign Logic
* Added Bonuses Logic
* Added challenge logic
* fixed yugioh client
* ygo06 rom cleanup and include lua
* ygo06 patch cleanup
* ygo06 move client to world folder
* lots of small changes
* bug fixes
* implemented filler item for yugioh06
* BizHawkClient: Add client and connector
* BizHawkClient: Add launcher component and inno_setup lines
* BizHawkClient: Misc stability updates and small improvements
Bad commit organization a consequence of working with two different branches and not keeping the commits separated
* BizHawkClient: Add docstrings
* BizHawkClient: Pull in changes from other branch
* BizHawkClient: Fix no handler message not displaying after changed ROMs
* BizHawkClient: Remove extra print statement from lua
* BizHawkClient: Change version command to use raw strings
* BizHawkClient: Change script version to single integer
* YGO06: added logic for "all expect type forbidden" limited duels
* YGO06: Structure Deck choice now affects logic. Fixed a bug with tier 5 campaign opponents. Added logic for TD16 Union.
* BizHawkClient: Add newline to version for lua script
* BizHawkClient: Call send_connect from BizHawkClient's watcher loop
* BizHawkClient: Add handling for failed request getting script version
* BizHawkClient: Have base64.lua check lua version explicitly for bit operations
On 2.9, it would detect LuaJIT and flood the console with deprecation warnings
* BizHawkClient: Update connector script for slightly better errors and address Gambatte frame sync issue
* BizHawkClient: Remove accidentally added print statements
* BizHawkClient: Fix connector server not closing correctly
* BizHawkClient: Move some connector code around, some linting
* BizHawkClient: Small cleanup in lua
* BizHawkClient: Lua linting
* BizHawkClient: Remove outdated sentences in docstrings
* YGO06: Logic additions and bug fixes
* BizHawkClient: Correctly null check patch file arg
* BizHawkClient: Initialize logging
* BizHawkClient: Move code to worlds/_bizhawk
Also splits out BizHawk communication functions to their own file for use outside this client
* BizHawkClient: Add license to connector lua, add types to docs
* BizHawkClient: Add module docstrings
* YGO06: Logic additions
* BizHawkClient: Allow clients to define multiple systems
* BizHawkClient: Better logging and handling of interruptions to connection to script
* YGO06: Logic additions
* YGO06: Added text to options
* YGO06: Ported to bizhawk client
* YGO06: fix goal not being detected
* YGO06: fix access item rule for tier 5 column 1 and 2
* YGO06: docu and bug fixes
* YGO06: change name
* YGO06: some fixes
* YGO06: fix starting opponent and booster not applying
* YGO06: added option to reduce the amount of challenges and remove the no ban list from pool.
* YGO06: added rom being asked for on first use
* YGO06: fix rules for challenges
* YGO06: create proper rules for TD04 Ritual Summon
* YGO06: mark most banlists as usefull instead of progression
* YGO06: reduce the required core boosters across the board
* YGO06: fix client not loading if another game already loaded the bizhawk client
* YGO06: fix client not finding the bizhawk client.
* YGO06: fix TD08 Draw not giving out an item
* YGO06: small text changes
* YGO06: update to version 0.4.4
* YGO06: logic mixin clean-up
* YGO06: added option for campaign opponents as goal
* Pokemon Emerald add encounter table randomization
* Pokemon Emerald: Item ball randomization working
* Pokemon Emerald: Clean up code a little
* Pokemon Emerald: Partial rework of region/location creation
* Pokemon Emerald: Dedupe items and add more readable names
* Refactor region creation to manually defined regions
* Split region json
* Use new data.json with flattened constants and add HM locations
* YGO06: bug fixes
* YGO06: bug fix
* YGO06: changes default options to be more beginner friendly
* YGO06: attempt at universal tracker support. Settings are stored in slot data now.
* YGO06: fix for older python versions
* YGO06: fix slot data
* YGO06: added diiferent opponents to the campaign
* YGO06: fix small bug with opponent icons
* YGO06: fix unwanted changes
* YGO06: repair merge with main
* YGO06: map out all of the opponents
* YGO06: added opponent shuffle
* YGO06: added logic to opponent shuffle
* YGO06: added option to use ocg art
* YGO06: bug_fixes
* YGO06: removed todos, since they are not needed anymore
* YGO06: added draft mode
* YGO06: added logic to draft mode
* YGO06: Added Money multiplier when you lose
* YGO06: Fixed Unit Test errors
* YGO06: Added Random deck option
* YGO06: Bug fix with registering client
* YGO06: client clean-up
* YGO06: fixed card misspellings
* YGO06: removed unused imports and other small changes
* YGO06: small changes
* YGO06: fix generation error when the combination of starting with "No Banlist" and not adding "No Banlist" to the pool is selected
* YGO06: fix ocg art path overwriting Huge Revolution bugfix
* YGO06: added comments and other minor changes
* YGO06: fixed byte length in client for money
* YGO06: fixes for webhost and options
* YGO06: use the proper random function
* YGO06: change settings to options
* YGO06: move to procedure patch
* YGO06: fix imports
* YGO06: fix download link for patch not showing
* YGO06: remove unnecessary Optional
* YGO06: fix universal tracker stuff
* YGO06: add typings
* YGO06: small cleanup
* yugioh06: small change to setup
Co-authored-by: Scipio Wright <scipiowright@gmail.com>
* YGO06: remove logic mixin
* YGO06: fix create item and implement create filler and get filler item name
* YGO06: remove double lambdas
* YGO06: use pkgutil.get_data instaed pf zipFile
* YGO06: fix starting items being duplicated
* YGO06: lots of small changes
* YGO06: moved functions to match execution order
* YGO06: run ruff
* YGO06: run ruff format
* YGO06: fix ruff errors
* YGO06: undo ruff format for rules
* YGO06: move import to prevent circular dependency
* YGO06: remove unused class
* YGO06: optimizing rules
* YGO06: some optimization and small bug fix
---------
Co-authored-by: Zunawe <gyroscope15@gmail.com>
Co-authored-by: Scipio Wright <scipiowright@gmail.com>
* Tests: Clean up some of the fill test helpers a bit
* fix some formatting
---------
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Adds HotS, LotV and NCO campaigns to SC2 game.
The world's name has changed to reflect that (it's not only Wings of Liberty now)
The client was patched in a way that can still join to games generated prior this change
---------
Co-authored-by: Magnemania <magnemight@gmail.com>
Co-authored-by: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com>
Co-authored-by: Matthew <matthew.marinets@gmail.com>
Co-authored-by: hopop201 <benjy.hopop201@gmail.com>
Co-authored-by: Salzkorn <salzkitty@gmail.com>
Co-authored-by: genderdruid <pallyoffail@gmail.com>
Co-authored-by: MadiMadsen <137329235+MadiMadsen@users.noreply.github.com>
Co-authored-by: neocerber <neocerber@gmail.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
* proof of concept
* add dict support, block top/game level merge
* prevent key error when option being merged is new
* update triggers guide
* Add documentation about add/remove/replace
* move to trailing name instead of proper tag
* update docs
* confirm types
* Update Utils.py
* Update Generate.py
* pep8
* move to + syntax
* forgot to support sets
* specify received type of type error
* Update Generate.py
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
* Apply suggestion from review
* add test for update weights
* move test to new test case
* Apply suggestions from code review
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
---------
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Tests: add test for all games multiworld and test for two player multiworld per game
* make assertSteps behave like call_all
* review improvements
* fix stage calling and loc copying in accessibility
* add docstrings
* lttp is on the options api now
* skip the all games multiworld for now. likely needs to be modified to test specific worlds
* move skip to the class
* Core: create the per world random object in the world constructor
* remove the check that multiworld exists
* add a deprecation warning to per_slot_randoms
* move random import and fix conflicts
* assert worlds don't exist before setting the multiworld seed
* fix the dlcq and sdv tests
* actually use the seed
* Tests: test that item/location name groups are not empty
* Tests: better name for test_groups TestCase
---------
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
* Tests: add a test for worlds to only modify the itempool in `create_items`
* extend test multiworld setup instead of a new function
* cleanup the test a bit
* put more strict wording in `create_items` docstring
* list of shame
* Don't call `set_rules` before testing
* remove ChecksFinder from the list of shame
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
* Fill: add test for swap error with item rules
https://discord.com/channels/731205301247803413/731214280439103580/1167195750082560121
* Fill: fix swap error found in CI
Swap now assumes the unplaced items can be placed before the to-be-swapped item.
Unsure if that is safe or unsafe.
* Test: clarify docstring and comments in fill swap test
* Test: clarify comments in fill swap test more