* 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>
* WebHost: use new safe yaml template filename
this mirrors the change in ArchipelagoMW/#4106 in WebHost
* WebHost: install docs into safe filename and require docs to be named safe
* Test: update doc test for safe name
* WebHost: fix import order to not break ModuleUpdate
* add quotes around strings containing {{ game }}
* do the actually correct thing instead of a hack
thanks berserker66 for pointing out to me that I was doing this the
completly wrong way, so I fixed it up
* Clean up filenames to prevent illegal chars
* Use %s substitution instead of concatenation
* whoops
somehow i removed a space from the comment for the regex, so this adds
it back
* Use pre-existing function in Utils.py
* Test: add test for option yaml with colon
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Tests: Add a test that weights file generates different results per player correctly
* Update test/programs/test_generate.py
* Generate.main() return and accessibility options were changed
The "filling multiworld" subtest was at the wrong indentation, so was
only running for the last world_type.
"games" has additionally been added to the subtest to help better
identify failures.
Now that the subtest is actually being run for each world type, this
adds about 20 seconds to the duration of the test on my machine.
* WebHost: add spinner to room command
and show error message if fetch fails due to NetworkError
* WebHost: don't update room log while tab is inactive
* WebHost: don't include log for automated requests
* WebHost: refresh room also for re-spinups
and do that from javascript
* Test, WebHost: send fake user-agent where required
* WebHost: remove wrong comment in host room
* 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, WebHost: move out setUp and fix typing in api_generate
Also fixes a typo
and changes client to be per-test rather than a ClassVar
* Tests, WebHost: add tests for display_log endpoint
* Tests, WebHost: add tests for host_room endpoint
* Tests, WebHost: enable Flask DEBUG mode for tests
This provides the actual error if a test raised an exception on the server.
* Tests, WebHost: use user_path for logs
This is what custom_server does now.
* Tests, WebHost: avoid triggering security scans
* Speedups: remove dependency on c++
* Speedups: intset: handle malloc failing
* Speedups: intset: fix corner case for int64 on 32bit systems
original idea was to only use bucket->val if int<pointer,
but we always have a union now anyway
* Speedups: add size comment to player_set bucket configuration
* test: more tests for LocationStore.find_item
* test: require _speedups in CI
This kind of tests that the build succeeds.
* test: even more tests for LocationStore.find_item
* Speedups: intset uniform comment style
* Speedups: intset: avoid memory leak when realloc fails
* Speedups: intset: make `gcc -pedantic -std=c99 -fanalyzer` without warnings
Unnamed unions are not in C99, this got fixed.
The overhead of setting count=0 is minimal or optimized-out and silences -fanalizer (see comment).
* Speedups: don't leak memory in case of exception
* Speedups: intset: validate alloc and free
This won't happen in our cython, but it's still a good addition.
* CI: add test framework for C/C++ code
* CI: ctest: fix cwd
* Speedups: intset: ignore msvc warning
* Tests: intset: revert attempt at no-asan
We solve this with env vars in ctest now, and this fails for msvc.
* Test: cpp: docs: fix typo
* Test: cpp: docs: fix another typo
* Test: intset: proper bucket count for Negative test
INTxx_MIN % 1 would not produce a negative number, so the test was flawed.
* 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: add hosting simulation test
* WebHost: add weak typing to get_app()
* MultiServer: add typing to auto_saver_thread
* MultiServer: don't cancel task, properly end it
* customserver: stop auto-save thread from saving after shutdown
and make sure it stops, another potential memory leak
* MultiServer, customserver: make datapackage small again
* customserver: collect/finish room tasks
Hopefully fixes the memory leak we are seeing
* CI: test hosting
* Test: hosting: verify autohoster saves on Ctrl+C
* customserver: save when stopping via Ctrl+C
* Core: add unit tests for the numeric options
* document using a collection and the hashing quirk
* add another example for the footgun
---------
Co-authored-by: NewSoupVi <57900059+NewSoupVi@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>