Compare commits

..

135 Commits

Author SHA1 Message Date
NewSoupVi
8cfdf4b340 Core: Remove broken unused code from Options.py
"Unused" is a baseless assertion, but this code path has been crashing on the first statement for 6 months and noone's complained
2024-08-12 16:55:03 +02:00
Exempt-Medic
67520adcea Core: Error on empty options.as_dict (#3773)
* Error on empty options.as_dict

* ValueError instead

* Apply suggestions from code review

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

---------

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-08-12 02:13:45 +02:00
Exempt-Medic
a3e54a951f Undertale: Fix slot_data and options.as_dict() (#3774)
* Undertale: Fixing slot_data

* Booleans were difficult
2024-08-12 01:53:40 +02:00
qwint
ae0abd3821 Core: change start inventory from pool to warn when nothing to remove (#3158)
* makes start inventory from pool warn and fixes the itempool to match when it can not find a matching item to remove

* calc the difference correctly

* save new filler and non-removed items differently so we don't remove existing items at random
2024-08-12 00:57:59 +02:00
Scipio Wright
21bbf5fb95 TUNIC: Add note to Universal Tracker stuff #3772 2024-08-12 00:24:30 +02:00
Jarno
09e052c750 Timespinner: Fix eels check logic #3777 2024-08-12 00:24:09 +02:00
Scipio Wright
68a92b0c6f Clique: Update to new options API (#3759) 2024-08-11 14:47:17 +02:00
Silvris
8e06ab4f68 Core: fix invalid __package__ of zipped worlds (#3686)
* fix invalid package fix

* add comment describing fix
2024-08-10 13:49:32 +02:00
black-sliver
9dba39b606 SoE: fix determinism (#3745)
Fixes randomly placed ingredients not being deterministic (depending on settings)
and in turn also fixes logic not being deterministic if they get replaced by fragments.
2024-08-10 13:08:24 +02:00
Exempt-Medic
a6f376b02e TLOZ: world: multiworld (#3752) 2024-08-09 22:38:42 +02:00
Kaito Sinclaire
c66a8605da DOOM, DOOM II: Update steam URLs (#3746) 2024-08-09 17:04:59 +02:00
Mysteryem
ac7590e621 HK: fix iterating all worlds instead of only HK worlds in stage_pre_fill (#3750)
Would cause generation to fail when generating with HK and another game.

Mistake in 6803c373e5.
2024-08-09 17:02:41 +02:00
Mysteryem
30f97dd7de Core: Speed up CollectionState.copy() using built-in copy methods (#3678)
All the types being copied are built-in types with their own `copy()`
methods, so using the `copy` module was a bit overkill and also slower.

This patch replaces the use of the `copy` module in
`CollectionState.copy()` with using the built-in `.copy()` methods.

The copying of `reachable_regions` and `blocked_connections` was also
iterating the keys of each dictionary and then looking up the value in
the dictionary for that key. It is faster, and I think more readable, to
iterate the dictionary's `.items()` instead.

For me, when generating a multiworld including the template yaml of
every world with `python -O .\Generate.py --skip_output`, this patch
saves about 2.1s. The overall generation duration for these yamls varies
quite a lot, but averages around 160s for me, so on average this patch
reduced overall generation duration (excluding output duration) by
around 1.3%.

Timing comparisons were made by calling time.perf_counter() at the start
and end of `CollectionState.copy()`'s body, and summing the differences
between the starts and ends of the method body into a global variable
that was printed at the end of generation.

Additional timing comparisons were made, using the `timeit` module, of
the individual function calls or dictionary comprehensions used to
perform the copying.

The main performance cost was `copy.deepcopy()`, which gets slow as the
number of keys multiplied by the number of values within the
sets/Counters gets large, e.g., to deepcopy a `dict[int, Counter[str]]`
with 100 keys and where each Counter contains 100 keys was 30x slower
than most other tested copying methods. Increasing the number of dict
keys or Counter keys only makes it slower.
2024-08-09 14:25:39 +02:00
Mysteryem
6e41c60672 Core: Check parent_region.can_reach first in Location.can_reach (#3724)
* Core: Check parent_region.can_reach first in Location.can_reach

The comment about self.access_rule computing faster on average appears
to no longer be correct with the current caching system for region
accessibility, resulting in self.parent_region.can_reach computing
faster on average.

Generation of template yamls for each game that does not require a rom
to generate, generated with `python -O .\Generate.py --seed 1`
(all durations averaged over at 4 or 5 generations):

Full generation with `spoiler: 1` and no progression balancing:
89.9s -> 72.6s
Only output from above case:
2.6s -> 2.2s

Full generation with `spoiler: 3` and no progression balancing:
769.9s -> 627.1s
Only playthrough calculation + paths from above case:
680.5s -> 555.3s

Full generation with `spoiler: 1` with default progression balancing:
123.5s -> 98.3s
Only progression balancing from above case:
11.3s -> 9.6s

* Update BaseClasses.py

* Update BaseClasses.py

* Update BaseClasses.py

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-08-09 14:13:01 +02:00
Natalie Weizenbaum
5efb3fd2b0 DS3: Version 3.0.0 (#3128)
* Update worlds/dark_souls_3/Locations.py

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

* Fix Covetous Silver Serpent Ring location

* Update location groups

This should cover pretty much all of the seriously hidden items. It
also splits out miniboss drops, mimic drops, and hostile NPC drops.

* Remove the "Guarded by Keys" group

On reflection, I don't think this is actually that useful. It'll also
get a lot muddier once we can randomize shops and ashes become
pseudo-"keys".

* Restore Knight Slayer's Ring classification

* Support infusions/upgrades in the new DS3 mod system

* Support random starting loadouts

* Make an item's NPC status orthogonal to its category

* Track location groups with flags

* Track Archipelago/Offline mismatches on the server

Also fix a few incorrect item names.

* Add additional locations that are now randomizable

* Don't put soul and multiple items in shops

* Add an option to enable whether NG+ items/locations are included

* Clean up useful item categorization

There are so many weapons in the game now, it doesn't make sense to
treat them all as useful

* Add more variety to filler items

* Iron out a few bugs and incompatibilities

* Fix more silly bugs

* Get tests passing

* Update options to cover new item types

Also recategorize some items.

* Verify the default values of `Option`s.

Since `Option.verify()` can handle normalization of option names, this allows options  to define defaults which rely on that normalization. For example, it allows a world to exclude certain locations by default.

This also makes it easier to catch errors if a world author accidentally sets an invalid default.

* Make a few more improvements and fixes

* Randomize Path of the Dragon

* Mark items that unlock checks as useful

These items all unlock missable checks, but they're still good to ahve in the game for variety's sake.

* Guarantee more NPC quests are completable

* Fix a syntax error

* Fix rule definition

* Support enemy randomization

* Support online Yhorm randomization

* Remove a completed TODO

* Fix tests

* Fix force_unique

* Add an option to smooth out upgrade item progression

* Add helpers for setting location/entrance rules

* Support smoother soul item progression

* Fill extra smoothing items into conditional locations as well as other worlds

* Add health item smoothing

* Handle infusions at item generation time

* Handle item upgrades at genreation time

* Fix Grave Warden's Ashes

* Don't overwrite old rules

* Randomize items based on spheres instead of DS3 locations

* Add a smoothing option for weapon upgrades

* Add rules for crow trades

* Small fixes

* Fix a few more bugs

* Fix more bugs

* Try to prevent Path of the Dragon from going somewhere it doesn't work

* Add the ability to provide enemy presets

* Various fixes and features

* Bug fixes

* Better Coiled Sword placement

* Structure DarkSouls3Location more like DarkSouls3Item

* Add events to make DS3's spheres more even

* Restructure locations to work like items do now

* Add rules for more missable locations

* Don't add two Storm Rulers

* Place Hawk Ring in Farron Keep

* Mark the Grass Crest Shield as useful

* Mark new progression items

* Fix a bug

* Support newer better Path of the Dragon code

* Don't lock the player out of Coiled Sword

* Don't create events for missable locations

* Don't throw strings

* Don't smooth event items

* Properly categorize Butcher Knife

* Be more careful about placing Yhorm in low-randomization scenarios

* Don't try to smooth DLC items with DLC disabled

* Fix another Yhorm bug

* Fix upgrade/infusion logic

* Remove the PoolType option

This distinction is no longer meaningful now that every location in
the game of each type is randomized

* Categorize HWL: Red Eye Orb as an NPC location

* Don't place Storm Ruler on CA: Coiled Sword

* Define flatten() locally to make this APWorld capable

* Fix some more Leonhard weirdness

* Fix unique item randomization

* Don't double Twin Dragon Greatshield

* Remove debugging print

* Don't add double Storm Ruler

Also remove now-redundant item sorting by category in create_items.

* Don't add double Storm Ruler

Also remove now-redundant item sorting by category in create_items.

* Add a missing dlc_enabled check

* Use nicer options syntax

* Bump data_version

* Mention where Yhorm is in which world

* Better handle excluded events

* Add a newline to Yhorm location

* Better way of handling excluded unradomized progression locations

* Fix a squidge of nondeterminism

* Only smooth items from this world

* Don't smooth progression weapons

* Remove a location that doesn't actually exist in-game

* Classify Power Within as useful

* Clarify location names

* Fix location requirements

* Clean up randomization options

* Properly name Coiled Sword location

* Add an option for configuring how missable items are handled

* Fix some bugs from location name updates

* Fix location guide link

* Fix a couple locations that were busted offline

* Update detailed location descriptions

* Fix some bugs when generating for a multiworld

* Inject Large Leather Shield

* Fix a few location issues

* Don't allow progression_skip_balancing for unnecessary locs

* Update some location info

* Don't uniquify the wrong items

* Fix some more location issues

* More location fixes

* Use hyphens instead of parens for location descriptions

* Update and fix more locations

* Fix Soul of Cinder boss name

* Fix some logic issues

* Add item groups and document item/location groups

* Fix the display name for "Impatient Mimics"

* Properly handle Transposing Kiln and Pyromancer's Flame

* Testing

* Some fixes to NPC quests, late basin, and transposing kiln

* Improve a couple location names

* Split out and improve missable NPC item logic

* Don't allow crow trades to have foreign items

* Fix a variable capture bug

* Make sure early items are accessible early even with early Castle

* Mark ID giant slave drops as missable

* Make sure late basin means that early items aren't behind it

* Make is_location_available explicitly private

* Add an _add_item_rule utility that checks availability

* Clear excluded items if excluded_locations == "unnecessary"

* Don't allow upgrades/infusions in crow trades

* Fix the documentation for deprecated options

* Create events for all excluded locations

This allows `can_reach` logic to work even if the locations are
randomized.

* Fix up Patches' and Siegward's logic based on some manual testing

* Factor out more sub-methods for setting location rules

* Oops, left these in

* Fixing name

* Left that in too

* Changing to NamedRange to support special_range_names

* Alphabetizing

* Don't call _is_location_available on foreign locations

* Add missing Leonhard items

* Changing late basin to have a post-small-doll option

* Update basin option, add logic for some of Leonhard Hawkwood and Orbeck

* Simplifying an option, fixing a copy-paste error

* Removing trailing whitespace

* Changing lost items to go into start inventory

* Revert Basin changes

* Oops

* Update Options.py

* Reverting small doll changes

* Farron Keep boss requirement logic

* Add Scroll for late_dlc

* Fixing excluded unnecessary locations

* Adding Priestess Ring as being after UG boss

* Removing missable from Corvian Titanite Slab

* Adding KFF Yhorm boss locks

* Screams about Creighton

* Elite Knight Set isn't permanently missable

* Adding Kiln requirement to KFF

* fixing valid_keys and item groups

* Fixing an option-checker

* Throwing unplaceable Storm Ruler into start inventory

* Update locations

* Refactor item injection

* Update setup doc

* Small fixes

* Fix another location name

* Fix injection calculation

* Inject guaranteed items along with progression items

* Mark boss souls as required for access to regions

This allows us to set quest requirements for boss souls and have them
automatically propagated to regions, means we need less machinery for
Yhorm bosses, and allows us to get rid of a few region-transition
events.

* Make sure Sirris's quest can be completed before Pontiff

* Removing unused list

* Changing dict to list

* Removing unused test

* Update __init__.py

* self.multiworld.random -> self.random (#9)

* Fix some miscellaneous location issues

* Rewrite the DS3 intro page/FAQ

* Removing modifying the itempool after fill (#7)

Co-authored-by: Natalie Weizenbaum <nweiz@google.com>

* Small fixes to the setup guide (#10)

Small fixes, adding an example for connecting

* Expanded Late Basin of Vows and Late DLC (#6)

* Add proper requirements for CD: Black Eye Orb

* Fix Aldrich's name

* Document the differences with the 2.x.x branch

* Don't crash if there are more items than locations in smoothing

* Apply suggestions from code review

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>

* Code review

* Fix _replace_with_filler

* Don't use the shared flatten function in SM

* Track local items separately rather than iterating the multiworld

* Various formatting/docs changes suggested by PyCharm (#12)

* Drop deprecated options

* Rename "offline randomizer" to "static randomizer" which is clearer

* Move `enable_*_locations` under removed options.

* Avoid excluded locations for locally-filled items

* Adding Removed options to error (#14)

* Changes for WebHost options display and the options overhaul

* unpack iterators in item list (#13)

* Allow worlds to add options to prebuilt groups

Previously, this crashed because `typing.NamedTuple` fields such as
`group.name` aren't assignable. Now it will only fail for group names
that are actually incorrectly cased, and will fail with a better error
message.

* Style changes, rename exclude behavior options, remove guaranteed items option

* Spacing/Formatting (#18)

* Various Fixes (#19)

* Universally Track Yhorm (#20)

* Account for excluded and missable

* These are behaviors now

* This is singular, apparently

* Oops

* Fleshing out the priority process

* Missable Titanite Lizards and excluded locations (#22)

* Small style/efficiency changes

* Final passthrough fixes (#24)

* Use rich option formatting

* Make the behavior option values actual behaviors (#25)

* Use !=

* Remove unused flatten utility

* Some changes from review (#28)

* Fixing determinism and making smooth faster (#29)

* Style change

* PyCharm and Mypy fixes (#26)

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

* Change yhorm default (#30)

* Add indirect condition (#27)

* Update worlds/dark_souls_3/docs/locations_en.md

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>

* Ship all item IDs to the client

This avoids issues where items might get skipped if, for instance,
they're only in the starting inventory.

* Make sure to send AP IDs for infused/upgraded weapons

* Make `RandomEnemyPresetOption` compatible with ArchipelagoMW/Archipelago#3280 (#31)

* Fix cast

* More typing and small fixes (#32)

---------

Co-authored-by: Scipio Wright <scipiowright@gmail.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: Exempt-Medic <ExemptMedic@Gmail.com>
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-08-09 12:14:26 +02:00
qwint
6803c373e5 HK: add grub hunt goal (#3203)
* makes grub hunt goal option that calculates the total available grubs (including item link replacements) and requires all of them to be gathered for goal completion

* update slot data name for grub count

* add option to set number needed for grub hub

* updates to grub hunt goal based on review

* copy/paste fix

* account for 'any' goal and fix overriding non-grub goals

* making sure godhome is in logic for any and removing redundancy on completion condition

* fix typing

* i hate typing

* move to stage_pre_fill

* modify "any" goal so all goals are in logic under minimal settings

* rewrite grub counting to create lookups for grubs and groups that can be reused

* use generator instead of list comprehension

* fix whitespace merging wrong

* minor code cleanup
2024-08-08 20:33:13 +02:00
Louis M
575c338aa3 Aquaria: Logic bug fixes (#3679)
* Fixing logic bugs

* Require energy attack in the cathedral and energy form in the body

* King Jelly can be beaten easily with only the Dual Form

* I think that I have a problem with my left and right...

* There is a monster that is blocking the path, soo need attack to pass

* The Li cage is not accessible without the Sunken city boss

* Removing useless space.

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Two more minors logic modification

* Adapting tests to af9b6cd

* Reformat the Region file

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-08-08 00:19:52 +02:00
Mysteryem
05ce29f7dc RoR2: Remove recursion from explore mode access rules (#3681)
The access rules for "<Environment name> Chest n", "<Environment name>
Shrine n" etc. locations recursively called state.can_reach() for the
n-1 location name, with the n=1 location being the only location to have
the actual access rule set.

This patch removes the recursion, instead setting the actual access rule
directly on each location, increasing the performance of checking
accessibility of n>1 locations.

Risk of Rain 2 was already quite fast to generate despite the recursion
in the access rules, but with this patch, generating a multiworld with
200 copies of the template RoR2 yaml (and progression balancing
disabled through a meta.yaml) goes from about 18s to about 6s for me.

From generating the same seed before and after this patch, the same
result is produced.
2024-08-07 23:57:07 +02:00
JaredWeakStrike
74697b679e KH2: Update the docs to support steam in the setup guide (#3711)
* doc updates

* add steam link

* Update worlds/kh2/docs/setup_en.md

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Update setup_en.md

* Forgot to include these

* Consistent styling

* :)

* version 3.3.0

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-08-07 23:56:22 +02:00
Scipio Wright
cf6661439e TUNIC: Sort entrances in the spoiler log (#3733)
* Sort entrances in spoiler log

* Rearrange portal list to closer match the vanilla game order, for better spoiler and because I already did this mod-side

* Add break (thanks vi)
2024-08-07 18:18:50 +02:00
Scipio Wright
6297a4efa5 TUNIC: Fix missing traversal req #3740 2024-08-07 18:01:41 +02:00
digiholic
8ddb49f071 OSRS: Implement New Game (#1976)
* MMBN3: Press program now has proper color index when received remotely

* Initial commit of OSRS untangled from MMBN3 branch

* Fixes some broken region connections

* Removes some locations

* Rearranges locations to fill in slots left by removed locations

* Adds starting area rando

* Moves Oak and Willow trees to resource regions

* Fixes various PEP8 violations

* Refactor of regions

* Fixes variable capture issue with region rules

* Partial completion of brutal grind logic

* Finishes can_reach_skill function

* Adds skill requirements to location rules, fixes regions rules

* Adds documentation for OSRS

* Removes match statement

* Updates Data Version to test mode to prevent item name caching

* Fixes starting spawn logic for east varrock

* Fixes river lum crossing logic to not assume you can phase across water

* Prevents equipping items when you haven't unlocked them

* Changes canoe logic to not require huge levels

* Skeletoning out some data I'll need for variable task system

* Adds csvs and parser for logic

* Adds Items parsing

* Fixes the spawning logic to not default to Chunksanity when you didn't pick it

* Begins adding generation rules for data-driven logic

* Moves region handling and location creating to different methods

* Adds logic limits to Options

* Begun the location generation has

* Randomly generates tasks for each skill until populated

* Mopping up improper names, adding custom logic, and fixes location rolling

* Drastically cleans up the location rolling loop

* Modifies generation to properly use local variables and pass unit tests

* Game is now generating, but rules don't seem to work

* Lambda capture, my old nemesis. We meet again

* Fixes issue with Corsair Cove item requirement causing logic loop

* Okay one more fix, another variable capture

* On second thought lets not have skull sceptre tasks. 'Tis a silly place

* Removes QP from item pool (they're events not items)

* Removes Stronghold floor tasks, no varbit to track them

* Loads CSV with pkutil so it can be used in apworld

* Fixes logic of skill tasks and adds QP requirements to long grinds

* Fixes pathing in pkgutil call

* Better handling for empty task categories, no longer throws errors

* Fixes order for progressive tasks, removes un-checkable spider task

* Fixes logic issues related to stew and the Blurite caves

* Fixes issues generating causing tests to sporadically fail

* Adds missing task that caused off-by-one error

* Updates to new Options API

* Updates generation to function properly with the Universal Tracker (Thanks Faris)

* Replaces runtime CSV parsing with pre-made python files generated from CSVs

* Switches to self.random and uses random.choice instead of doing it manually

* Fixes to typing, variable names, iterators, and continue conditions

* Replaces Name classes with Enums

* Fixes parse error on region special rules

* Skill requirements check now returns an accessrule instead of being one that checks options

* Updates documentation and setup guide

* Adjusts maximum numbers for combat and general tasks

* Fixes region names so dictionary lookup works for chunksanity

* Update worlds/osrs/docs/en_Old School Runescape.md

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>

* Update worlds/osrs/docs/en_Old School Runescape.md

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>

* Updates readme.md and codeowners doc

* Removes erroneous East Varrock -> Al Kharid connection

* Changes to canoe logic to account for woodcutting level options

* Fixes embarassing typo on 'Edgeville'

* Moves Logic CSVs to separate repository, addresses suggested changes on PR

* Fixes logic error in east/west lumbridge regions. Fixes incorrect List typing in main

* Removes task types with weight 0 from the list of rollable tasks

* Missed another place that the task type had to be removed if 0 weight

* Prevents adding an empty task weight if levels are too restrictive for tasks to be added

* Removes giant blank space in error message

* Adds player name to error for not having enough available tasks

---------

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2024-08-06 23:13:11 +02:00
Exempt-Medic
90446ad175 ChecksFinder: Refactor/Cleaning (#3725)
* Update ChecksFinder

* minor cleanup

* Check for compatible name

* Enable APWorld

* Update setup_en.md

* Update en_ChecksFinder.md

* The client is getting updated instead

* Qwint suggestions, ' -> ", streamline fill_slot_data

* Oops, too many refactors

---------

Co-authored-by: SunCat <suncat.game@ya.ru>
2024-08-06 16:39:56 +02:00
Exempt-Medic
98bb8517e1 Docs: Missed Full Accessibility mention/conversion #3734 2024-08-06 00:00:33 +02:00
Exempt-Medic
203c8f4d89 Pokemon R/B: Removing Floats from NamedRange #3717 2024-08-05 23:40:16 +02:00
Aaron Wagener
c0ef02d6fa Core: fix missing import for MultiWorld.link_items() (#3731) 2024-08-04 12:55:34 +01:00
Exempt-Medic
4620493828 Spire: Convert options, clean up random calls, and add DeathLink (#3704)
* Convert StS options

* probably a bad idea

* Update worlds/spire/Options.py

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

---------

Co-authored-by: Kono Tyran <Kono@koifysh.dev>
Co-authored-by: Scipio Wright <scipiowright@gmail.com>
2024-07-31 18:27:35 +02:00
wildham
75b8c7891c Docs: Add FFMQ French Setup Guide + Minor fixes to English Guide (#3590)
* Add docs

* Fix character

* Configuration

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* ajuster

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* inclure

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* doublon

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* remplissage

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* autre

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* pouvoir

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* mappemonde

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* apostrophes

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* virgule

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* fournir

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* apostrophes 2

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* snes9x

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* apostrophes 3

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* options

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* lien

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* de laquelle

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* Étape de génération

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* apostrophes 4

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* également

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* guillemets

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* guillemets 2

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* adresse

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* Connect

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* seed

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>

* Changer fichier yaml pour de configuration

* Fix capitalization

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>

* Fix capitalization 2

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>

* Fix typo+Add link to fr/en info page

---------

Co-authored-by: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2024-07-31 17:40:45 +02:00
Aaron Wagener
53bc4ffa52 Options: Always verify keys for VerifyKeys options (#3280)
* Options: Always verify keys for VerifyKeys options

* fix PlandoTexts

* use OptionError and give a slightly better error message for which option it is

* add the player name to the error

* don't create an unnecessary list

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-07-31 17:37:52 +02:00
Trevor L
91f7cf16de Bomb Rush Cyberfunk: Fix Coil quest being in glitched logic too early (#3720)
* Update Rules.py

* Update Rules.py
2024-07-31 17:32:51 +02:00
GodlFire
7c8ea34a02 Shivers: New features and removes two missed options using the old options API (#3287)
* Adds an option to have pot pieces placed local/non-local/anywhere

Shivers nearly always finishes last in multiworld games due to the fact you need all 20 pot pieces to win and the pot pieces open very few location checks. This option allows the pieces to be placed locally. This should allow Shivers to be finished earlier.

* New option: Choose how many ixupi captures are needed for goal completion

New option: Choose how many ixupi captures are needed for goal completion

* Fixes rule logic for location 'puzzle solved three floor elevator'

Fixes rule logic for location 'puzzle solved three floor elevator'. Missing a parenthesis caused only the key requirement to be checked for the blue maze region.

* Merge branch 'main' of https://github.com/GodlFire/Shivers

* Revert "Merge branch 'main' of https://github.com/GodlFire/Shivers"

This reverts commit bb08c3f0c2.

* Fixes issue with office elevator rule logic.

* Bug fix, missing logic requirement for location 'Final Riddle: Guillotine Dropped'

Bug fix, missing logic requirement for location 'Final Riddle: Guillotine Dropped'

* Moves plaque location to front for better tracker referencing.

* Tiki should be Shaman.

* Hanging should be Gallows.

* Merrick spelling.

* Clarity change.

* Changes new option to use new option API

Changes new option to use new option API

* Added sub regions for Ixupi

-Added sub regions for Ixupi and moved ixupi capture checks into the sub region.
-Added missing wax capture possible spot in Shaman room

* Adds option for ixupi captures to be priority locations

Adds option for ixupi captures to be priority locations

* Consistency

Consistency

* Changes ixupi captures priority to default on toggle

Changes ixupi captures priority to default on toggle

* Docs update

-Updated link to randomizer
-Update some text to reflect the latest functionality
-Replaced 'setting' with 'option'

* New features/bug fixes

-Adds an option to have completed pots in the item pool
-Moved subterranean world information plaque to maze staircase

* Cleanup

Cleanup

* Fixed name for moved location

When moving a location and renaming it I forgot to fix the name in a second spot.

* Squashed commit of the following:

commit 630a3bdfb9
Merge: 8477d3c8 5e579200
Author: GodlFire <46984098+GodlFire@users.noreply.github.com>
Date:   Mon Apr 1 19:08:48 2024 -0600

    Merge pull request #10 from ArchipelagoMW/main

    Merge main into branch

commit 5e5792009c
Author: Alchav <59858495+Alchav@users.noreply.github.com>
Date:   Mon Apr 1 12:08:21 2024 -0500

    LttP: delete playerSettings.yaml (#3062)

commit 9aeeeb077a
Author: CaitSith2 <d_good@caitsith2.com>
Date:   Mon Apr 1 06:07:56 2024 -0700

    ALttP: Re-mark light/dark world regions after applying plando connections (#2964)

commit 35458380e6
Author: Bryce Wilson <gyroscope15@gmail.com>
Date:   Mon Apr 1 07:07:11 2024 -0600

    Pokemon Emerald: Fix wonder trade race condition (#2983)

commit 4ac1866689
Author: Alchav <59858495+Alchav@users.noreply.github.com>
Date:   Mon Apr 1 08:06:31 2024 -0500

    ALTTP: Skull Woods Inverted fix (#2980)

commit 4aa03da66e
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Mon Apr 1 15:06:02 2024 +0200

    Factorio: fix attempting to create savegame with not filename safe characters (#2842)

commit 24a03bc8b6
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Mon Apr 1 08:02:26 2024 -0500

    KDL3: fix shuffled animals not actually being random (#3060)

commit f813a7005f
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Sun Mar 31 11:11:10 2024 -0500

    The Messenger: update docs formatting and fix outdated info (#3033)

    * The Messenger: update docs formatting and fix outdated info

    * address review feedback

    * 120 chars

commit 2a0b7e0def
Author: LiquidCat64 <74896918+LiquidCat64@users.noreply.github.com>
Date:   Sun Mar 31 09:55:55 2024 -0600

    CV64: A couple of very small docs corrections. (#3057)

commit 03d47e460e
Author: Ixrec <ericrhitchcock@gmail.com>
Date:   Sun Mar 31 16:55:08 2024 +0100

    A Short Hike: Clarify installation instructions (#3058)

    * Clarify installation instructions

    * don't mention 'config' folder since it isn't created until the game starts

commit e546c0f7ff
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Sun Mar 31 10:50:31 2024 -0500

    Yoshi's Island: add patch suffix (#3061)

commit 2ec93ba82a
Author: Bryce Wilson <gyroscope15@gmail.com>
Date:   Sun Mar 31 09:48:59 2024 -0600

    Pokemon Emerald: Fix inconsistent location name (#3065)

commit 4e3d396394
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Sun Mar 31 10:47:11 2024 -0500

    The Messenger: Fix precollected notes not being removed from the itempool (#3066)

    * The Messenger: fix precollected notes not being properly removed from pool

    * The Messenger: bump required client version

commit 72c53513f8
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Sun Mar 31 03:57:59 2024 +0200

    WebHost: fix /check creating broken yaml files if files don't end with a newline (#3063)

commit b7ac6a4cbd
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Fri Mar 29 20:14:53 2024 -0500

    The Messenger: Fix various portal shuffle issues (#2976)

    * put constants in a bit more sensical order

    * fix accidental incorrect scoping

    * fix plando rules not being respected

    * add docstrings for the plando functions

    * fix the portal output pools being overwritten

    * use shuffle and pop instead of removing by content so plando can go to the same area twice

    * move portal pool rebuilding outside mapping creation

    * remove plando_connection cleansing since it isn't shared with transition shuffle

commit 5f0112e783
Author: Zach Parks <zach@alliware.com>
Date:   Fri Mar 29 19:13:51 2024 -0500

    Tracker: Add starting inventory to trackers and received items table. (#3051)

commit bb481256de
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Thu Mar 28 21:48:40 2024 -0500

    Core: Make fill failure error more human parseable (#3023)

commit 301d9de975
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Thu Mar 28 19:31:59 2024 -0500

    Docs: adding games rework (#2892)

    * Docs: complete adding games.md rework

    * remove all the now unused images

    * review changes

    * address medic's review

    * address more comments

commit 9dc708978b
Author: Trevor L <80716066+TRPG0@users.noreply.github.com>
Date:   Thu Mar 28 18:26:58 2024 -0600

    Hylics 2: Fix invalid multiworld data, use `self.random` instead of `self.multiworld.random` (#3001)

    * Hylics 2: Fixes

    * Rewrite loop

commit 4391d1f4c1
Author: Bryce Wilson <gyroscope15@gmail.com>
Date:   Thu Mar 28 18:05:39 2024 -0600

    Pokemon Emerald: Fix opponents learning non-randomized TMs (#3025)

commit 5d9d4ed9f1
Author: black-sliver <59490463+black-sliver@users.noreply.github.com>
Date:   Fri Mar 29 01:01:31 2024 +0100

    SoE: update to pyevermizer v0.48.0 (#3050)

commit c97215e0e7
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Thu Mar 28 17:23:37 2024 -0400

    TUNIC: Minor refactor of the vanilla_portals function (#3009)

    * Remove unused, change an if to an elif

    * Remove unused import

commit eb66886a90
Author: Alchav <59858495+Alchav@users.noreply.github.com>
Date:   Thu Mar 28 16:23:01 2024 -0500

    SC2: Don't Filter Excluded Victory Locations (#3018)

commit de860623d1
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Thu Mar 28 22:21:56 2024 +0100

    Core: differentiate between unknown worlds and broken worlds in error message (#2903)

commit 74b2bf5161
Author: Bryce Wilson <gyroscope15@gmail.com>
Date:   Thu Mar 28 15:20:55 2024 -0600

    Pokemon Emerald: Exclude norman trainer location during norman goal (#3038)

commit 74ac66b032
Author: BadMagic100 <dempsey.sean@outlook.com>
Date:   Thu Mar 28 08:49:19 2024 -0700

    Hollow Knight: 0.4.5 doc revamp and default options tweaks (#2982)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 80d7ac4164
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Thu Mar 28 09:41:32 2024 -0500

    KDL3: RC1 Fixes and Enhancement (#3022)

    * fix cloudy park 4 rule, zero deathlink message

    * remove redundant door_shuffle bool

    when generic ER gets in, this whole function gets rewritten. So just clean it a little now.

    * properly fix deathlink messages, fix fill error

    * update docs

commit 77311719fa
Author: Ziktofel <ziktofel@gmail.com>
Date:   Thu Mar 28 15:38:34 2024 +0100

    SC2: Fix HERC upgrades (#3044)

commit cfc1541be9
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Thu Mar 28 15:19:32 2024 +0100

    Docs: Mention the "last received item index" paradigm in the network protocol docs (#2989)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 4d954afd9b
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Thu Mar 28 10:11:20 2024 -0400

    TUNIC: Add link to AP plando guide to connection plando section of game page (#2993)

commit 17748a4bf1
Author: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
Date:   Thu Mar 28 10:00:10 2024 -0400

    Launcher, Docs: Update UI and Set-Up Guide to Reference Options  (#2950)

commit 9182fe563f
Author: Entropynines <163603868+Entropynines@users.noreply.github.com>
Date:   Thu Mar 28 06:56:35 2024 -0700

    README: Remove outdated information about launchers (#2966)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit bcf223081f
Author: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com>
Date:   Thu Mar 28 09:54:56 2024 -0400

    TLOZ: Fix markdown issue with game info page (#2985)

commit fa93488f3f
Author: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Date:   Thu Mar 28 09:46:00 2024 -0400

    Docs: Consistent naming for "connection plando" (#2994)

commit db15dd4bde
Author: chandler05 <66492208+chandler05@users.noreply.github.com>
Date:   Thu Mar 28 08:45:19 2024 -0500

    A Short Hike: Fix incorrect info in docs (#3016)

commit 01cdb0d761
Author: PoryGone <98504756+PoryGone@users.noreply.github.com>
Date:   Thu Mar 28 09:44:23 2024 -0400

    SMW: Update World Doc for v2.0 Features (#3034)

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>

commit d0ac2b744e
Author: panicbit <panicbit@users.noreply.github.com>
Date:   Thu Mar 28 10:11:26 2024 +0100

    LADX: fix local and non-local instrument placement (#2987)

    * LADX: fix local and non-local instrument placement

    * change confusing variable name

commit 14f5f0127e
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Thu Mar 28 04:42:35 2024 -0400

    Stardew Valley: Fix potential soft lock with vanilla tools and entrance randomizer + Performance improvement for vanilla tool/skills (#3002)

    * fix vanilla tool fishing rod requiring metal bars
    fix vanilla skill requiring previous level (it's always the same rule or more restrictive)

    * add test to ensure fishing rod need fish shop

    * fishing rod should be indexed from 0 like a mentally sane person would do.

    * fishing rod 0 isn't real, but it definitely can hurt you.

    * reeeeeeeee

commit cf133dde72
Author: Bryce Wilson <gyroscope15@gmail.com>
Date:   Thu Mar 28 02:32:27 2024 -0600

    Pokemon Emerald: Fix typo (#3020)

commit ca18121811
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Thu Mar 28 04:27:49 2024 -0400

    Stardew Valley: Fix generation fail with SVE and entrance rando when Wizard Tower is in place of Sprite Spring (#2970)

commit 1d4512590e
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Wed Mar 27 21:09:09 2024 +0100

    requirements.txt: _ instead of - to make PyCharm happy (#3043)

commit f7b415dab0
Author: agilbert1412 <alexgilbert@yahoo.com>
Date:   Tue Mar 26 19:40:58 2024 +0300

    Stardew valley: Game version documentation (#2990)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 702f006c84
Author: LiquidCat64 <74896918+LiquidCat64@users.noreply.github.com>
Date:   Tue Mar 26 07:31:36 2024 -0600

    CV64: Change all mentions of "settings" to "options" and fix a broken link (#3015)

commit 98ce8f8844
Author: Yussur Mustafa Oraji <N00byKing@hotmail.de>
Date:   Tue Mar 26 14:29:25 2024 +0100

    sm64ex: New Options API and WebHost fix (#2979)

commit ea47b90367
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Tue Mar 26 09:25:41 2024 -0400

    TUNIC: You can grapple down here without the ladder, neat (#3019)

commit bf3856866c
Author: agilbert1412 <alexgilbert@yahoo.com>
Date:   Sun Mar 24 23:53:49 2024 +0300

    Stardew Valley: presets with some of the new available values for existing settings to make them more accurate (#3014)

commit c0368ae0d4
Author: Phaneros <31861583+MatthewMarinets@users.noreply.github.com>
Date:   Sun Mar 24 13:53:20 2024 -0700

    SC2: Fixed missing upgrade from custom tracker (#3013)

commit 36c83073ad
Author: Salzkorn <salzkitty@gmail.com>
Date:   Sun Mar 24 21:52:41 2024 +0100

    SC2 Tracker: Fix grouped items pointing at wrong item IDs (#2992)

commit 2b24539ea5
Author: Ziktofel <ziktofel@gmail.com>
Date:   Sun Mar 24 21:52:16 2024 +0100

    SC2 Tracker: Use level tinting to let the player know which level he has of Replenishable Magazine (#2986)

commit 7e904a1c78
Author: Ziktofel <ziktofel@gmail.com>
Date:   Sun Mar 24 21:51:46 2024 +0100

    SC2: Fix Kerrigan presence resolving when deciding which races should be used (#2978)

commit bdd498db23
Author: Alchav <59858495+Alchav@users.noreply.github.com>
Date:   Fri Mar 22 15:36:27 2024 -0500

    ALTTP: Fix #2290's crashes (#2973)

commit 355223b8f0
Author: PinkSwitch <52474902+PinkSwitch@users.noreply.github.com>
Date:   Fri Mar 22 15:35:00 2024 -0500

    Yoshi's Island: Implement New Game (#2141)

    Co-authored-by: Silvris <58583688+Silvris@users.noreply.github.com>
    Co-authored-by: Alchav <59858495+Alchav@users.noreply.github.com>
    Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit aaa3472d5d
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Fri Mar 22 21:30:51 2024 +0100

    The Witness: Fix seed bleed issue (#3008)

commit 96d93c1ae3
Author: chandler05 <66492208+chandler05@users.noreply.github.com>
Date:   Fri Mar 22 15:30:23 2024 -0500

    A Short Hike: Add option to customize filler coin count (#3004)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit ca549df20a
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Fri Mar 22 15:29:24 2024 -0500

    CommonClient: fix hint tab overlapping (#2957)

    Co-authored-by: Remy Jette <remy@remyjette.com>

commit 44988d430d
Author: Star Rauchenberger <fefferburbia@gmail.com>
Date:   Fri Mar 22 15:28:41 2024 -0500

    Lingo: Add trap weights option (#2837)

commit 11b32f17ab
Author: Danaël V <104455676+ReverM@users.noreply.github.com>
Date:   Fri Mar 22 12:46:14 2024 -0400

    Docs: replacing "setting" to "option" in world docs  (#2622)

    * Update contributing.md

    * Update contributing.md

    * Update contributing.md

    * Update contributing.md

    * Update contributing.md

    * Update contributing.md

    Added non-AP World specific information

    * Update contributing.md

    Fixed broken link

    * Some minor touchups

    * Update Contributing.md

    Draft for version with picture

    * Update contributing.md

    Small word change

    * Minor updates for conciseness, mostly

    * Changed all instances of settings to options in info and setup guides

    I combed through all world docs and swapped "setting" to "option" when this was refering to yaml options.
    I also changed a leftover "setting" in option.py

    * Update contributing.md

    * Update contributing.md

    * Update setup_en.md

    Woops I forgot one

    * Update Options.py

    Reverted changes regarding options.py

    * Update worlds/noita/docs/en_Noita.md

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>

    * Update worlds/sc2wol/docs/en_Starcraft 2 Wings of Liberty.md

    revert change waiting for that page to be updated

    * Update worlds/witness/docs/setup_en.md

    * Update worlds/witness/docs/en_The Witness.md

    * Update worlds/soe/docs/multiworld_en.md

    Fixed Typo

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

    * Update worlds/witness/docs/en_The Witness.md

    * Update worlds/adventure/docs/en_Adventure.md

    * Update worlds/witness/docs/setup_en.md

    * Updated Stardew valley to hopefully get rid of the merge conflicts

    * Didn't work :dismay:

    * Delete worlds/sc2wol/docs/setup_en.md

    I think this will fix the merge issue

    * Now it should work

    * Woops

    ---------

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>
    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

commit 218cd45844
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Fri Mar 22 03:02:38 2024 -0500

    APProcedurePatch: fix RLE/COPY incorrect sizing (#3006)

    * change class variables to instance variables

    * Update worlds/Files.py

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

    * Update worlds/Files.py

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

    * move required_extensions to tuple

    * fix missing tuple ellipsis

    * fix classvar mixup

    * rename tokens to _tokens. use hasattr

    * type hint cleanup

    * Update Files.py

    * check using isinstance instead

    * Update Files.py

    ---------

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

commit 4196bde597
Author: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Date:   Thu Mar 21 16:38:36 2024 -0400

    Docs: Fixing special_range_names example (#3005)

commit 40f843f54d
Author: Star Rauchenberger <fefferburbia@gmail.com>
Date:   Thu Mar 21 11:00:53 2024 -0500

    Lingo: Minor game data fixes (#3003)

commit da333fbb0c
Author: GodlFire <46984098+GodlFire@users.noreply.github.com>
Date:   Thu Mar 21 09:52:16 2024 -0600

    Shivers: Adds missing logic rule for skull dial door location (#2997)

commit 43084da23c
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Thu Mar 21 16:51:29 2024 +0100

    The Witness: Fix newlines in Witness option tooltips (#2971)

commit 14816743fc
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Thu Mar 21 11:50:07 2024 -0400

    TUNIC: Shuffle Ladders option (#2919)

commit 30a0aa2c85
Author: Star Rauchenberger <fefferburbia@gmail.com>
Date:   Thu Mar 21 10:46:53 2024 -0500

    Lingo: Add item/location groups (#2789)

commit f4b7c28a33
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Wed Mar 20 17:45:32 2024 -0500

    APProcedurePatch: hotfix changing class variables to instance variables (#2996)

    * change class variables to instance variables

    * Update worlds/Files.py

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

    * Update worlds/Files.py

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

    * move required_extensions to tuple

    * fix missing tuple ellipsis

    * fix classvar mixup

    * rename tokens to _tokens. use hasattr

    * type hint cleanup

    * Update Files.py

    * check using isinstance instead

    ---------

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

commit 12864f7b24
Author: chandler05 <66492208+chandler05@users.noreply.github.com>
Date:   Wed Mar 20 22:44:09 2024 +0100

    A Short Hike: Implement New Game (#2577)

commit db02e9d2aa
Author: LiquidCat64 <74896918+LiquidCat64@users.noreply.github.com>
Date:   Wed Mar 20 15:03:25 2024 -0600

    Castlevania 64: Implement New Game (#2472)

commit 32315776ac
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Wed Mar 20 16:57:45 2024 -0400

    Stardew Valley: Fix extended family legendary fishes being locations with fishsanity set to exclude legendary (#2967)

commit e9620bea77
Author: Magnemania <89949176+Magnemania@users.noreply.github.com>
Date:   Wed Mar 20 16:56:00 2024 -0400

    SM64: Goal Logic and Hint Bugfixes (#2886)

commit 183ca35bba
Author: qwint <qwint.42@gmail.com>
Date:   Wed Mar 20 08:39:37 2024 -0500

    CommonClient: Port Casting Bug (#2975)

commit fcaaa197a1
Author: TheLX5 <luisyuregi@gmail.com>
Date:   Wed Mar 20 05:56:19 2024 -0700

    SMW: Fixes for Bowser being defeatable on Egg Hunt and CI2 DC room access (#2981)

commit 8f7b63a787
Author: TheLX5 <luisyuregi@gmail.com>
Date:   Wed Mar 20 05:56:04 2024 -0700

    SMW: Blocksanity logic fixes (#2988)

commit 6f64bb9869
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Wed Mar 20 08:46:31 2024 -0400

    Noita: Remove newline from option description so it doesn't look bad on webhost (#2969)

commit d0a9d0e2d1
Author: Bryce Wilson <gyroscope15@gmail.com>
Date:   Wed Mar 20 06:43:13 2024 -0600

    Pokemon Emerald: Bump required client version (#2963)

commit 94650a02de
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Tue Mar 19 17:08:29 2024 -0500

    Core: implement APProcedurePatch and APTokenMixin (#2536)

    * initial work on procedure patch

    * more flexibility

    load default procedure for version 5 patches
    add args for procedure
    add default extension for tokens and bsdiff
    allow specifying additional required extensions for generation

    * pushing current changes to go fix tloz bug

    * move tokens into a separate inheritable class

    * forgot the commit to remove token from ProcedurePatch

    * further cleaning from bad commit

    * start on docstrings

    * further work on docstrings and typing

    * improve docstrings

    * fix incorrect docstring

    * cleanup

    * clean defaults and docstring

    * define interface that has only the bare minimum required
    for `Patch.create_rom_file`

    * change to dictionary.get

    * remove unnecessary if statement

    * update to explicitly check for procedure, restore compatible version and manual override

    * Update Files.py

    * remove struct uses

    * ensure returning bytes, add token type checking

    * Apply suggestions from code review

    Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

    * pep8

    ---------

    Co-authored-by: beauxq <beauxq@yahoo.com>
    Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* Changes pot_completed_list to a instance variable instead of global.

Changes pot_completed_list to a instance variable instead of global. The global variable was unintentional and was causing missmatch in pre_fill which would cause generation error.

* Removing deprecated options getter

* Adds back fix from main branch

Adds back fix from main branch

* Removing messenger changes that somehow got on my branch?

Removing messenger changes that somehow got on my branch?

* Removing messenger changes that are somehow on the Shivers branch

Removing messenger changes that are somehow on the Shivers branch

* Still trying to remove Messenger changes on Shivers branch

Still trying to remove Messenger changes on Shivers branch

* Review comments addressed. Early lobby access set as default.

Review comments addressed. Early lobby access set as default.

* Review comments addressed

Review comments addressed

* Review comments addressed. Option for priority locations removed.

Option to have ixupi captures a priority has been removed and can be added again if Priority Fill is changed. See Issues #3467.

* Minor Change

Minor Change

* Fixed ID 10 T Error

Fixed ID 10 T Error

* Front door option added to slot data

Front door option added to slot data

* Add missing .value on slot data

Add missing .value on slot data

* Small change to slot data

Small change to slot data

* Small change to slot data

Why didn't this change get pushed github...

* Forgot list

Forgot list

---------

Co-authored-by: Kory Dondzila <korydondzila@gmail.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-07-31 17:32:17 +02:00
Aaron Wagener
a05dbac55f Core: Rework accessibility (#1481)
* 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 ecbf986145.

* 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
2024-07-31 12:13:14 +02:00
Aaron Wagener
83521e99d9 Core: migrate item links out of main (#2914)
* 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>
2024-07-31 12:04:21 +02:00
Jarno
1d19da0c76 Timespinner: migrate to new options api and correct random (#2485)
* Implemented new options system into Timespinner

* Fixed typo

* Fixed typo

* Fixed slotdata maybe

* Fixes

* more fixes

* Fixed failing unit tests

* Implemented options backwards comnpatibility

* Fixed option fallbacks

* Implemented review results

* Fixed logic bug

* Fixed python 3.8/3.9 compatibility

* Replaced one more multiworld option usage

* Update worlds/timespinner/Options.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Updated logging of options replacement to include player name and also write it to spoiler
Fixed generation bug
Implemented review results

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-07-31 11:50:04 +02:00
Remy Jette
77e3f9fbef WebHost: Fix NamedRange values clamping to the range (#3613)
If a NamedRange has a `special_range_names` entry outside the
`range_start` and `range_end`, the HTML5 range input will clamp the
submitted value to the closest value in the range.

These means that, for example, Pokemon RB's "HM Compatibility" option's
"Vanilla (-1)" option would instead get posted as "0" rather than "-1".

This change updates NamedRange to behave like TextChoice, where the
select element has a `name` attribute matching the option, and there is
an additional element to be able to provide an option other than the
select element's choices.

This uses a different suffix of `-range` rather than `-custom` that
TextChoice uses. The reason is we need some way to decide whether to use
the custom value or the select value, and that method needs to work
without JavaScript. For TextChoice this is easy, if the custom field is
empty use the select element. For NamedRange this is more difficult as
the browser will always submit *something*. My choice was to only use
the value from the range if the select box is set to "custom". Since
this only happens with JS as "custom' is hidden, I made the range hidden
under no-JS. If it's preferred, I could make the select box hidden
instead. Let me know.

This PR also makes the `js-required` class set `display: none` with
`!important` as otherwise the class wouldn't work on any rule that
had `display: flex` with more specificity than a single class.
2024-07-29 20:13:44 -04:00
Phaneros
954d728005 sc2: Removing unused dependency in requirements.txt (#3697)
* sc2: Removing unused dependency in requirements.txt

* sc2: Add missing newline in requirements.txt

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-07-29 23:09:51 +02:00
agilbert1412
80daa092a7 - Take shipsanity moss out of shipsanity crops (#3709) 2024-07-29 19:42:16 +02:00
Alchav
fac72dbc20 FFMQ: Fix reset protection (#3710)
* Revert reset protection

* Fix reset protection

---------

Co-authored-by: alchav <alchav@jalchavware.com>
2024-07-29 19:40:58 +02:00
qwint
e764da3dc6 HK: Options API updates, et al. (#3428)
* updates HK to consistently use world.random, use world.options, don't use world = self.multiworld, and remove some things from the logicMixin

* Update HK to new options dataclass

* Move completion condition helpers to Rules.py

* updates from review
2024-07-28 23:27:39 +02:00
CaitSith2
ab0903679c Factorio: Fix ap-get-technology nil value crashes (#3517) 2024-07-28 20:57:10 +02:00
Star Rauchenberger
67f329b96f Lingo: Add warpless connection between Hedge Maze and The Incomparable (#3703)
These areas are technically connected through The Observant, but the connection between The Observant and The Incomparable is marked as a warp because of the warp hallways leading up to The Observant's achievement panel. Creating separate entrances for The Incomparable is a simple workaround, and allows use of that connection during a pilgrimage.
2024-07-28 17:41:57 +02:00
Scipio Wright
b273852512 Fix obvious typo (#3622) 2024-07-28 00:44:48 -04:00
Fabian Dill
b77805e5ee Fill: remove sweep_for_events(key_only=True) (#2239) 2024-07-28 01:32:25 +02:00
lilDavid
34141f8de0 SMZ3: Classify "nice" items as useful (#3683) 2024-07-27 23:19:09 +02:00
Scipio Wright
e38f5d0a61 TUNIC: Update plando connection option call to use options API #3695 2024-07-27 23:17:59 +02:00
Star Rauchenberger
35ed0d4e19 Lingo: Fix Rhyme Room LEAP panel logic (#3699) 2024-07-27 23:17:34 +02:00
CookieCat
e5c9b8ad0c AHIT: Generation error fixes and some other bug fixes (#3663)
* duh

* Fuck it

* Major fixes

* a

* b

* Even more fixes

* New option - NoFreeRoamFinale

* a

* Hat Logic Fix

* Just to be safe

* multiworld.random to world.random

* KeyError fix

* Update .gitignore

* Update __init__.py

* Zoinks Scoob

* ffs

* Ruh Roh Raggy, more r-r-r-random bugs!

* 0.9b - cleanup + expanded logic difficulty

* Update Rules.py

* Update Regions.py

* AttributeError fix

* 0.10b - New Options

* 1.0 Preparations

* Docs

* Docs 2

* Fixes

* Update __init__.py

* Fixes

* variable capture my beloathed

* Fixes

* a

* 10 Seconds logic fix

* 1.1

* 1.2

* a

* New client

* More client changes

* 1.3

* Final touch-ups for 1.3

* 1.3.1

* 1.3.3

* Zero Jumps gen error fix

* more fixes

* Formatting improvements

* typo

* Update __init__.py

* Revert "Update __init__.py"

This reverts commit e178a7c0a6.

* init

* Update to new options API

* Missed some

* Snatcher Coins fix

* Missed some more

* some slight touch ups

* rewind

* a

* fix things

* Revert "Merge branch 'main' of https://github.com/CookieCat45/Archipelago-ahit"

This reverts commit a2360fe197, reversing
changes made to b8948bc495.

* Update .gitignore

* 1.3.6

* Final touch-ups

* Fix client and leftover old options api

* Delete setup-ahitclient.py

* Update .gitignore

* old python version fix

* proper warnings for invalid act plandos

* Update worlds/ahit/docs/en_A Hat in Time.md

Co-authored-by: Danaël V. <104455676+ReverM@users.noreply.github.com>

* Update worlds/ahit/docs/setup_en.md

Co-authored-by: Danaël V. <104455676+ReverM@users.noreply.github.com>

* 120 char per line

* "settings" to "options"

* Update DeathWishRules.py

* Update worlds/ahit/docs/en_A Hat in Time.md

Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>

* No more loading the data package

* cleanup + act plando fixes

* almost forgot

* Update Rules.py

* a

* Update worlds/ahit/Options.py

Co-authored-by: Ixrec <ericrhitchcock@gmail.com>

* Options stuff

* oop

* no unnecessary type hints

* warn about depot download length in setup guide

* Update worlds/ahit/Options.py

Co-authored-by: Ixrec <ericrhitchcock@gmail.com>

* typo

Co-authored-by: Ixrec <ericrhitchcock@gmail.com>

* Update worlds/ahit/Rules.py

Co-authored-by: Ixrec <ericrhitchcock@gmail.com>

* review stuff

* More stuff from review

* comment

* 1.5 Update

* link fix?

* link fix 2

* Update setup_en.md

* Update setup_en.md

* Update setup_en.md

* Evil

* Good fucking lord

* Review stuff again + Logic fixes

* More review stuff

* Even more review stuff - we're almost done

* DW review stuff

* Finish up review stuff

* remove leftover stuff

* a

* assert item

* add A Hat in Time to readme/codeowners files

* Fix range options not being corrected properly

* 120 chars per line in docs

* Update worlds/ahit/Regions.py

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* Update worlds/ahit/DeathWishLocations.py

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* Remove some unnecessary option.class.value

* Remove data_version and more option.class.value

* Update worlds/ahit/Items.py

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* Remove the rest of option.class.value

* Update worlds/ahit/DeathWishLocations.py

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* review stuff

* Replace connect_regions with Region.connect

* review stuff

* Remove unnecessary Optional from LocData

* Remove HatType.NONE

* Update worlds/ahit/test/TestActs.py

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* fix so default tests actually don't run

* Improve performance for death wish rules

* rename test file

* change test imports

* 1000 is probably unnecessary

* a

* change state.count to state.has

* stuff

* starting inventory hats fix

* shouldn't have done this lol

* make ship shape task goal equal to number of tasksanity checks if set to 0

* a

* change act shuffle starting acts + logic updates

* dumb

* option groups + lambda capture cringe + typo

* a

* b

* missing option in groups

* c

* Fix Your Contract Has Expired being placed on first level when it shouldn't

* yche fix

* formatting

* major logic bug fix for death wish

* Update Regions.py

* Add missing indirect connections

* Fix generation error from chapter 2 start with act shuffle off

* a

* Revert "a"

This reverts commit df58bbcd99.

* Revert "Fix generation error from chapter 2 start with act shuffle off"

This reverts commit 0f4d441824.

* bunch of fixes

* Update Regions.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update Regions.py

* Update worlds/ahit/__init__.py

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* Update __init__.py

* Update __init__.py

---------

Co-authored-by: Danaël V. <104455676+ReverM@users.noreply.github.com>
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
Co-authored-by: Ixrec <ericrhitchcock@gmail.com>
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2024-07-27 19:16:52 +02:00
Exempt-Medic
6994f863e5 Core: Make excluded locations and priority locations excluded and remove unreachable code (#3424)
* Make excluded and priority locations excluded

* Only pass on KeyError

* Alternative/Clearer format
2024-07-26 17:51:55 +02:00
Jérémie Bolduc
9d36ad0df2 Stardew Valley: Properly support Universal Tracker (#3630)
* save the seed in slot data to reuse it in UT

* add logging when seed is missing

* add UT test and fix bundle test

* self review

* run UT test on allsanity+mod so it's more meaningfull
2024-07-26 11:33:14 +02:00
Star Rauchenberger
cc22161644 Lingo: Add panels mode door shuffle (#3163)
* Created panels mode door shuffle

* Added some panel door item names

* Remove RUNT TURN panel door

Not really useful.

* Fix logic with First SIX related stuff

* Add group_doors to slot data

* Fix LEVEL 2 behavior with panels mode

* Fixed unit tests

* Fixed duplicate IDs from merge

* Just regenerated new IDs

* Fixed duplication of color and door group items

* Removed unnecessary unit test option

* Fix The Seeker being achievable without entrance door

* Fix The Observant being achievable without locked panels

* Added some more panel doors

* Added Progressive Suits Area

* Lingo: Fix Basement access with THE MASTER

* Added indirect conditions for MASTER-blocked entrances

* Fixed Incomparable achievement access

* Fix STAIRS panel logic

* Fix merge error with good items

* Is this clearer?

* DREAD and TURN LEARN

* Allow a weird edge case for reduced locations

Panels mode door shuffle + grouped doors + color shuffle + pilgrimage enabled is exactly the right number of items for reduced locations. Removing color shuffle also allows for disabling pilgrimage, adding sunwarp locking, or both, with a couple of locations left over.

* Prevent small sphere one on panels mode

* Added shuffle_doors aliases for old options

* Fixed a unit test

* Updated datafile

* Tweaked requirements for reduced locations

* Added player name to OptionError messages

* Update generated.dat
2024-07-26 10:53:11 +02:00
Star Rauchenberger
d030a698a6 Lingo: Changed minimum progression requirement (#3672) 2024-07-25 23:09:37 +02:00
Exempt-Medic
b6e5223aa2 Docs: Expanding on the answers in the FAQ (#3690)
* Expand on some existing answers

* Oops

* Sphere "one"

* Removing while

* Update docs/apworld_dev_faq.md

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

---------

Co-authored-by: Scipio Wright <scipiowright@gmail.com>
2024-07-25 23:02:25 +02:00
qwint
79843803cf Docs: Add header to FAQ doc referencing other relevant docs (#3692)
* Add header to FAQ doc referencing other relevant docs

* Update docs/apworld_dev_faq.md

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Update docs/apworld_dev_faq.md

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: Scipio Wright <scipiowright@gmail.com>
2024-07-25 23:01:22 +02:00
Tsukino
5fb1ebdcfd Docs: Add Swedish Guide for Pokemon Emerald (#3252)
* Docs: Add Swedish Guide for Pokemon Emerald

Swedish Translation

* v2

some proof reading & clarification changes

* v3

* v4

* v5

typo

* v6

* Update worlds/pokemon_emerald/docs/setup_sv.md

Co-authored-by: Bryce Wilson <gyroscope15@gmail.com>

* Update worlds/pokemon_emerald/docs/setup_sv.md

Co-authored-by: Bryce Wilson <gyroscope15@gmail.com>

* v7

Tried to reduce the length of lines, this should still convey the same message/meaning

* typo

* v8

Removed Leading/Trailing Spaces

* typo v2

* Added a couple of full stops.

* lowercase typos

* Update setup_sv.md

* Apply suggestions from code review

Co-authored-by: Bryce Wilson <gyroscope15@gmail.com>

---------

Co-authored-by: Bryce Wilson <gyroscope15@gmail.com>
Co-authored-by: bittersweetrin <chandraherbozo@gmail.com>
2024-07-25 09:30:23 +02:00
CookieCat
b019485944 AHIT: Update Setup Guide (#3647) 2024-07-25 09:27:22 +02:00
Witchybun
205ca7fa37 Stardew Valley: Fix Daggerfish, Cropsanity; Move Some Rules to Content Packs; Add Missing Shipsanity Location (#3626)
* Fix logic bug on daggerfish

* Make new region for pond.

* Fix SVE logic for crops

* Fix Distant Lands Cropsanity

* Fix failing tests.

* Reverting removing these for now.

* Fix bugs, add combat requirement

* convert str into tuple directly

* add ginger island to mod tests

* Move a lot of mod item logic to content pack

* Gut the rules from DL while we're at it.

* Import nuke

* Fix alecto

* Move back some rules for now.

* Move archaeology rules

* Add some comments why its done.

* Clean up archaeology and fix sve

* Moved dulse to water item class

* Remove digging like worms for now

* fix

* Add missing shipsanity location

* Move background names around or something idk

* Revert ArchaeologyTrash for now

---------

Co-authored-by: Jouramie <jouramie@hotmail.com>
2024-07-25 09:22:46 +02:00
black-sliver
8949e21565 settings: safer writing (#3644)
* 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
2024-07-25 09:10:36 +02:00
qwint
deae524e9b Docs: add a living faq document for sharing dev solutions (#3156)
* adding one faq :)

* adding another faq that links to the relevant file

* add lined line breaks between questions and lower the heading size of the question so sub-divisions can be added later

* missed some newlines

* updating best practice filler method

* add note about get_filler_item_name()

* updates to wording from review

* add section to CODEOWNERS for maintainers of this doc

* use underscores to reference the file easier in CODEOWNERS

* update link to be direct and filter to function name
2024-07-25 09:05:04 +02:00
qwint
496f0e09af CommonClient: forget password when disconnecting (#3641)
* makes the kivy connect button do the same username forgetting that /connect does to fix an issue where losing connection would make you unable to connect to a different server

* extract duplicate code

* per request, adds handling on any disconnect to forget the saved password as to not leak it to other servers

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-07-25 08:21:51 +02:00
agilbert1412
f34da74012 Stardew Valley: Make Fairy Dust a Ginger Island only item and location (#3650) 2024-07-25 06:13:16 +02:00
Alchav
94e6e978f3 Pokémon R/B: Also fix Rt 4 Hidden Item (#3668)
Co-authored-by: alchav <alchav@jalchavware.com>
2024-07-25 06:07:20 +02:00
Silent
697f749518 TUNIC: Missing slot data bugfix (#3628)
* Fix certain items not being added to slot data

* Change where items get added to slot data
2024-07-25 06:06:45 +02:00
qwint
2307694012 HK: fix remove issues failing collect/remove test (#3667) 2024-07-25 03:08:58 +02:00
Exempt-Medic
b23c120258 Subnautica: Fix deprecated option getting (#3685) 2024-07-24 22:17:43 +02:00
Silent
ea1bb8d927 TUNIC: Missing slot data bugfix (#3628)
* Fix certain items not being added to slot data

* Change where items get added to slot data
2024-07-24 14:37:18 +02:00
Star Rauchenberger
e714d2e129 Lingo: Add option to prevent shuffling postgame (#3350)
* Lingo: Add option to prevent shuffling postgame

* Allow roof access on door shuffle

* Fix broken unit test

* Simplified THE END edge case

* Revert unnecessary change

* Review comments

* Fix mastery unit test

* Update generated.dat

* Added player's name to error message
2024-07-24 14:34:51 +02:00
JKLeckr
878d5141ce Project: Add .code-workspace wildcard to gitignore 2024-07-24 14:08:16 +02:00
Ladybunne
1852287c91 LADX: Add an item group for instruments (#3666)
* Add an item group for LADX instruments

* Update worlds/ladx/__init__.py

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

* Fix indent depth

---------

Co-authored-by: Scipio Wright <scipiowright@gmail.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-07-24 14:07:07 +02:00
t3hf1gm3nt
8756f48e46 [TLOZ]: Fix determinism / Add Location Name Groups / Remove Level 9 Junk Fill (#3670)
* [TLOZ]: Fix determinism / Add Location Name Groups / Remove Level 9 Junk Fill

Axing the final uses of world.multiworld.random that were missed before, hopefully fixing the determinism issue brought up in Issue #3664 (at least on TLOZ's end, leaving SMZ3 alone). Also adding location name groups finally, as well as axing the Level 9 Junk Fill because with the new location name groups players can choose to exclude Level 9 with exclude locations instead.

* location name groups

* add take any item and sword cave location name groups

* use sets like you're supposed to, silly
2024-07-24 14:00:16 +02:00
agilbert1412
ff680b26cc DLC Quest: Add options presets to DLC Quest (#3676)
* - Add options presets to DLC Quest

* - Removed unused import

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-07-24 13:49:28 +02:00
JaredWeakStrike
29a0b013cb KH2: Hotfix update for game verison 1.0.0.9 (#3534)
* update the addresses hopefully

* todo

* update address for steam and epic

* oops

* leftover hard address

* made auto tracking say which version of the game

* not needed anymore since they were updated
2024-07-24 13:47:19 +02:00
Alchav
e7dbfa7fcd FFMQ: Efficiency Improvement and Use New Options Methods (#2767)
* FFMQ Efficiency improvement and use new options methods

* Hard check for 0x01 game status

* Fixes

* Why were Mac's Ship entrance hints excluded?

* Two remaining per_slot_randoms purged

* reformat generate_early

* Utils.parse_yaml
2024-07-24 13:46:14 +02:00
agilbert1412
ad5089b5a3 DLC Quest - Add option groups to DLC Quest (#3677)
* - Add option groups to DLC Quest

* - Slight reorganisation

* - Add type hint
2024-07-24 13:36:41 +02:00
NewSoupVi
dc50444edd The Witness: Small naming inconsistencies (#3618) 2024-07-24 13:13:41 +02:00
Silent
ed4ad386e8 TUNIC: Add setting to disable local spoiler to host yaml (#3661)
* Add TunicSettings class for host yaml options

* Update __init__.py

* Update worlds/tunic/__init__.py

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

* Use self.settings

* Remove unused import

---------

Co-authored-by: Scipio Wright <scipiowright@gmail.com>
2024-07-23 09:04:24 +02:00
Star Rauchenberger
5188375736 Lingo: Add pilgrimage logic through Starting Room (#3654)
* Lingo: Add pilgrimage logic through Starting Room

* Added unit test

* Reverse order of two doors in unit test

* Remove print statements from TestPilgrimage

* Update generated.dat
2024-07-23 08:34:47 +02:00
Star Rauchenberger
9c2933f803 Lingo: Fix Early Color Hallways painting in pilgrimages (#3645) 2024-07-23 00:45:49 +02:00
Scipio Wright
b840c3fe1a TUNIC: Move 3 locations to Quarry Back (#3649)
* Move 3 locations to Quarry Back

* Change the non-er region too
2024-07-23 00:43:41 +02:00
agilbert1412
c12d3dd6ad Stardew valley: Fix Queen of Sauce Cookbook conditions (#3651)
* - Extracted walnut logic to a Mixin so it can be used in content pack requirements

* - Add 100 walnut requirements to the Queen of Sauce Cookbook

* - Woops a file wasn't added to previous commits

* - Make the queen of sauce cookbook a ginger island only thing, due to the walnut requirement

* - Moved the book in the correct content pack

* - Removed an empty class that I'm not sure where it came from
2024-07-23 00:36:42 +02:00
Trevor L
f7989780fa Bomb Rush Cyberfunk: Fix final graffiti location being unobtainable (#3669) 2024-07-22 09:17:34 +02:00
agilbert1412
e59bec36ec Stardew Valley: Add gourmand frog rules for completing his tasks sequentially (#3652) 2024-07-22 08:32:40 +02:00
agilbert1412
48a0fb05a2 Stardew Valley: Removed Stardrop Tea from Full Shipment (#3655) 2024-07-22 01:52:44 +02:00
chandler05
12f1ef873c A Short Hike: Fix Boat Rental purchase being incorrectly calculated (#3639) 2024-07-22 01:47:46 +02:00
Rensen3
d7d4565429 YGO06: fixes non-deterministic bug by changing sets to lists (#3674) 2024-07-22 01:27:10 +02:00
qwint
7039b17bf6 CommonClient: fix bug when using Connect button without a disconnect (#3609)
* makes the kivy connect button do the same username forgetting that /connect does to fix an issue where losing connection would make you unable to connect to a different server

* extract duplicate code
2024-07-22 01:12:11 +02:00
Jérémie Bolduc
34e7748f23 Stardew Valley: Make sure number of month in time logic is a int to improve performance by ~20% (#3665)
* make sure number of month is actually a int

* improve rule explain like in pr

* remove redundant if in can_complete_bundle

* assert number is int so cache is not bloated
2024-07-20 21:24:24 +02:00
gurglemurgle5
e33a9991ef CommonClient: Escape markup sent in chat messages (#3659)
* escape markup in uncolored text

* Fix comment to allign with style guide

Fixes the comment so it follows the style guide, along with making it
better explain the code.

* Make more concise
2024-07-19 08:37:59 +02:00
black-sliver
4d1507cd0e Core: Update cx_freeze to 7.2.0 and freeze it (#3648)
supersedes ArchipelagoMW/Archipelago#3405
2024-07-18 00:49:59 +02:00
Fabian Dill
7b39b23f73 Subnautica: increase minimum client version (#3657) 2024-07-17 22:33:51 +02:00
Sunny Bat
925e02dca7 Raft: Move to new Options API (#3587) 2024-07-15 15:09:02 +02:00
CookieCat
e76d32e908 AHIT: Fix act shuffle test fail (#3522) 2024-07-14 14:17:05 +02:00
dennisw100
08a36ec223 Undertale: Fixed output location of the patched game in UndertaleClient.py (#3418)
* Update UndertaleClient.py Fixed output location of the patched game

Fixed the error that when the client is opened outside of the archipelago folder, the patched folder would be created in there which on windows ends up trying to create it in the system32 folder

Bug Report: https://discord.com/channels/731205301247803413/1148330675452264499/1237412436382973962

* Undertale: removed unnecessary wrapping in UndertaleClient.py

I did not know os.path.join was unnecessary in this case the more you know.
2024-07-14 14:11:52 +02:00
Bryce Wilson
48dc14421e Pokemon Emerald: Fix logic for coin case location (#3631) 2024-07-14 14:05:50 +02:00
black-sliver
948f50f35d customserver: fix minor memory leak (#3636)
Old code keeps ref to last started room's task and thus never fully cleans it up.
2024-07-14 13:56:56 +02:00
black-sliver
187f9dac94 customserver: preemtively run GC before starting room (#3637)
GC seems to be lazy.
2024-07-14 13:56:27 +02:00
Scipio Wright
eaec41d885 TUNIC: Fix event region for Quarry fuse (#3635) 2024-07-11 22:44:29 +02:00
Doug Hoskisson
1e3a4b6db5 Zillion: more rooms added to map_gen option (#3634) 2024-07-10 23:11:47 -07:00
Alchav
8c86139066 ALTTP: Bombable Wall to Crystaroller Room Logic (#3627) 2024-07-10 17:15:29 +02:00
black-sliver
c96c554dfa Tests, WebHost: add tests for host_room and minor cleanup (#3619)
* 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
2024-07-07 16:51:10 +02:00
agilbert1412
9b22458f44 Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests

This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.

In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
2024-07-07 15:04:25 +02:00
NewSoupVi
f99ee77325 The Witness: Add some unit tests (#3328)
* Add hidden early symbol item option, make some unit tests

* Add early symbol item false to the arrows test

* I guess it's not an issue

* more tests

* assertEqual

* cleanup

* add minimum symbols test for all 3 modes

* Formatting

* Add more minimal beatability tests

* one more for the road

* I HATE THIS AAAAAAAAAAAHHHHHHHHHHH WHY DID WE GO WITH OPTIONS

* loiaqeäsdhgalikSDGHjasDÖKHGASKLDÖGHJASKLJGHJSAÖkfaöslifjasöfASGJÖASDLFGJ'sklgösLGIKsdhJLGÖsdfjälghklDASFJghjladshfgjasdfälkjghasdöLfghasd-kjgjASDLÖGHAESKDLJGJÖsdaLGJHsadöKGjFDSLAkgjölSÄDghbASDFKGjasdLJGhjLÖSDGHLJASKDkgjldafjghjÖLADSFghäasdökgjäsadjlgkjsadkLHGsaDÖLGSADGÖLwSdlgkJLwDSFÄLHBJsaöfdkHweaFGIoeWjvlkdösmVJÄlsafdJKhvjdsJHFGLsdaövhWDsköLV-ksdFJHGVöSEKD

* fix imports (within apworld needs to be relative)

* Update worlds/witness/options.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Sure

* good suggestion

* subtest

* Add some EP shuffle unit tests, also an explicit event-checking unit test

* add more tests yay

* oops

* mypy

* Update worlds/witness/options.py

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

* Collapse into one test :(

* More efficiency

* line length

* More collapsing

* Cleanup and docstrings

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2024-07-06 13:40:55 +02:00
jamesbrq
bfac100567 MLSS: Fix for missing cutscene trigger 2024-07-05 22:54:35 +02:00
Scipio Wright
e7a8e195e6 TUNIC: Use fewer parameters in helper functions (#3356)
* Clean these functions up, get the hell out of here 5 parameter function

* Clean up a bunch of rules that no longer need to be multi-lined since the functions are shorter

* Clean up some range functions

* Update to use world instead of player like Vi recommended

* Fix merge conflict

* Fix after merge
2024-07-05 22:50:12 +02:00
Louis M
4054a9f15f Aquaria: Renaming some locations for consistency (#3533)
* Change 'The Body main area' by 'The Body center area' for consistency

* Renaming some locations for consistency

* Adding a line for standard

* Replacing Cathedral by Mithalas Cathedral and addin Blind goal option

* Client option renaming for consistency

* Fix death link not working

* Removing death link from the option to put it client side

* Changing Left to Right
2024-07-05 22:40:26 +02:00
Phaneros
ca76628813 sc2: Fixing typo in itemgroups.py causing spurious item groups with 2 letters chopped off (#3612) 2024-07-05 22:37:32 +02:00
Scipio Wright
d4d0a3e945 TUNIC: Make the shop checks require a sword 2024-07-05 22:36:55 +02:00
Scipio Wright
315e0c89e2 Docs: Lastest -> Latest (#3616) 2024-07-03 18:13:16 +02:00
Remy Jette
f6735745b6 Core: Fix !remaining (#3611) 2024-07-03 15:39:08 +02:00
Doug Hoskisson
50f7a79ea7 Zillion: new map generation feature (#3604) 2024-07-02 19:32:01 -07:00
NewSoupVi
95110c4787 The Witness: Fix door shuffle being completely broken 2024-07-03 00:34:17 +02:00
NewSoupVi
93617fa546 The Witness: mypy compliance (#3112)
* Make witness apworld mostly pass mypy

* Fix all remaining mypy errors except the core ones

* I'm a goofy stupid poopoo head

* Two more fixes

* ruff after merge

* Mypy for new stuff

* Oops

* Stricter ruff rules (that I already comply with :3)

* Deprecated ruff thing

* wait no i lied

* lol super nevermind

* I can actually be slightly more specific

* lint
2024-07-02 23:59:26 +02:00
black-sliver
b6925c593e WebHost: Log: handle FileNotFoundError (#3603) 2024-07-02 01:03:55 +02:00
Emily
401606e8e3 Docs: Clarify docs for create_items stage (#3600)
* Clarify docs re: `create_items` stage

* adjust wording after feedback

* adjust wording after more feedback
2024-07-01 23:34:06 +02:00
black-sliver
e95bb5ea56 WebHost: Better host room (#3496)
* add Range= to log, making responses a lot smaller for massive rooms
* switch xhr to fetch
* post the form using fetch if possible
  * also refresh log faster while waiting for command echo / response
  * do not follow redirect, saving a request
  * do not post empty body
* smooth-scroll the log view
* paste the log into the div when loading the HTML (up to 1MB, rest will be `fetch`ed)
* fix duplicate charset in display_log response
2024-07-01 21:47:49 +02:00
Silvris
52a13d38e9 Tests: fix error reporting in test_default_all_state_can_reach_everything (#3601) 2024-07-01 20:47:40 +02:00
Scipio Wright
31bd5e3ebc OOT: Add keys item_name_group (#3218)
* Add keys item_name_group

* Pep8ify

* Capitalizing Keys cause Bottles is capitalized, also putting it in the clearly marked hint groups area
2024-06-30 01:19:36 +02:00
Sunny Bat
192f1b3fae Update Raft option text, setup guide text (#3272)
* Update Raft option text, setup guide

* Address comments

* Address PR comments

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-06-30 01:18:09 +02:00
Silent
55cb81d487 TUNIC: Update victory condition (#3579)
* Add hero relics to victory condition

* Update __init__.py

* Remove unneeded local variables for options

* Use has_group_unique

* fix spacing
2024-06-30 01:17:00 +02:00
Justus Lind
2424fb0c5b Muse Dash: 6th Anniversary Song update (#3593)
* 6th Anniversary Update songs.

* Forgot to fix the name of Heartbeat.
2024-06-30 01:15:13 +02:00
Mrks
6191ff4b47 LADX: Fixed Display Names In Options Page (#3584)
* Fixed option group display names.

* Fixed display names for -at the moment- unused options.
2024-06-30 01:14:39 +02:00
Justus Lind
1c817e1eb7 Muse Dash: Update installation guides to recommend installing v0.6.1. (#3594)
* Update installation guides to recommend installing v0.6.1.

* Fix spanish spacing.

* Apply spanish changes.
2024-06-30 01:13:00 +02:00
Fabian Dill
d4c00ed267 CommonClient: fix /received with items from Server (#3597) 2024-06-29 03:00:32 +02:00
Ziktofel
e07a2667ae SC2 Tracker: Migrate icons away from sc2legacy (#3595) 2024-06-27 14:02:03 +02:00
Scipio Wright
b8f78af506 TUNIC: Fix minor logic bug in upper Zig (#3576)
* Add note about bushes to logic section of readme

* Fix missing logic on bridge switch chest in upper zig

* Revise upper zig rule change to account for ER
2024-06-27 14:01:35 +02:00
Scipio Wright
77304a8743 TUNIC: Update game info page with more tips (#3591)
* More minor updates to game info page

* Fix grammar
2024-06-27 13:00:20 +02:00
black-sliver
5882ce7380 Various worlds: Fix more absolute world imports (#3510)
* Adventure: remove absolute imports

* Alttp: remove absolute imports (all but tests)

* Aquaria: remove absolute imports in tests

running tests from apworld may fail (on 3.8 and maybe in the future) otherwise

* DKC3: remove absolute imports

* LADX: remove absolute imports

* Overcooked 2: remove absolute imports in tests

running tests from apworld may fail otherwise

* Rogue Legacy: remove absolute imports in tests

running tests from apworld may fail otherwise

* SC2: remove absolute imports

* SMW: remove absolute imports

* Subnautica: remove absolute imports in tests

running tests from apworld may fail otherwise

* Zillion: remove absolute imports in tests

running tests from apworld may fail otherwise
2024-06-27 08:51:27 +02:00
PinkSwitch
6c54b3596b Yoshi's Island: Fix client giving victory randomly (#3586)
* Create d

* Create d

* Delete worlds/mariomissing/d

* Delete mariomissing directory

* Create d

* Add files via upload

* Delete worlds/mariomissing/d

* Delete worlds/mariomissing directory

* Add files via upload

* Delete worlds/sai2 directory

* fix dumb client bug
2024-06-26 13:19:16 +02:00
Alchav
07dd8f0671 LTTP: Add Missing Blind's Cell rule (#3589) 2024-06-25 20:15:51 +02:00
Remy Jette
935c94dc80 Installer: Fix .apworld registration (#3588) 2024-06-25 20:15:12 +02:00
Fabian Dill
1ab1aeff15 Core: update required_server_version to 0.5.0 (#3580) 2024-06-23 07:50:00 +02:00
Silvris
5ca31533dc Tests: give seed on default tests and fix execnet error (#3520)
* output seed of default tests

* test execnet fix

* try failing with interpolated string

* Update bases.py

* try without tryexcept

* Update bases.py

* Update bases.py

* remove fake exception

* fix indent

* actually fix the execnet issue

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-06-22 21:00:15 +02:00
Mrks
60a26920e1 LADX: Probably fix generation error that palex had 2024-06-22 19:32:10 +02:00
StripesOO7
d00abe7b8e OOT: Adds Options to slot_data for poptracker-pack (#3570)
* Add imo all needed options to fill_slot_data that are worth tracking in the poptracker pack. This is aimed at providing information for the oot poptracker-pack for autofilling of settings within this pack.

* cap line length at 120 and reorganize list

---------

Co-authored-by: StripesOO7 <54711792+StripeesOO7@users.noreply.github.com>
2024-06-22 13:50:20 +02:00
Mewlif
40c9dfd3bf Undertale: Fixes a major logic bug, and updates Undertale to use the new Options API (#3528)
* Updated the options definitions to the new api

* Fixed the wrong base class being used for UndertaleOptions

* Undertale: Added get_filler_item_name to Undertale, changed multiworld.per_slot_randoms to self.random, removed some unused imports in options.py, and fixed rules.py still using state.multiworld instead of world.options, and simplified the set_completion_rules function in rules.py

* Undertale: Fixed it trying to add strings to the finished item pool

* fixed 1000g item not being in the key items pool for Undertale

* Removed ".copy()" for the junk_weights, reformatted the requested lines to have less new lines, and changed "itempool += [self.create_filler()]" to "itempool.append(self.create_filler())"
2024-06-21 18:21:46 +02:00
Fabian Dill
ce37bed7c6 WebHost: fix accidental robots.txt capture (#3502) 2024-06-21 14:54:19 +02:00
484 changed files with 28551 additions and 16471 deletions

2
.gitignore vendored
View File

@@ -150,7 +150,7 @@ venv/
ENV/
env.bak/
venv.bak/
.code-workspace
*.code-workspace
shell.nix
# Spyder project settings

View File

@@ -1,6 +1,6 @@
from __future__ import annotations
import copy
import collections
import itertools
import functools
import logging
@@ -63,7 +63,6 @@ class MultiWorld():
state: CollectionState
plando_options: PlandoOptions
accessibility: Dict[int, Options.Accessibility]
early_items: Dict[int, Dict[str, int]]
local_early_items: Dict[int, Dict[str, int]]
local_items: Dict[int, Options.LocalItems]
@@ -288,6 +287,86 @@ class MultiWorld():
group["non_local_items"] = item_link["non_local_items"]
group["link_replacement"] = replacement_prio[item_link["link_replacement"]]
def link_items(self) -> None:
"""Called to link together items in the itempool related to the registered item link groups."""
from worlds import AutoWorld
for group_id, group in self.groups.items():
def find_common_pool(players: Set[int], shared_pool: Set[str]) -> Tuple[
Optional[Dict[int, Dict[str, int]]], Optional[Dict[str, int]]
]:
classifications: Dict[str, int] = collections.defaultdict(int)
counters = {player: {name: 0 for name in shared_pool} for player in players}
for item in self.itempool:
if item.player in counters and item.name in shared_pool:
counters[item.player][item.name] += 1
classifications[item.name] |= item.classification
for player in players.copy():
if all([counters[player][item] == 0 for item in shared_pool]):
players.remove(player)
del (counters[player])
if not players:
return None, None
for item in shared_pool:
count = min(counters[player][item] for player in players)
if count:
for player in players:
counters[player][item] = count
else:
for player in players:
del (counters[player][item])
return counters, classifications
common_item_count, classifications = find_common_pool(group["players"], group["item_pool"])
if not common_item_count:
continue
new_itempool: List[Item] = []
for item_name, item_count in next(iter(common_item_count.values())).items():
for _ in range(item_count):
new_item = group["world"].create_item(item_name)
# mangle together all original classification bits
new_item.classification |= classifications[item_name]
new_itempool.append(new_item)
region = Region("Menu", group_id, self, "ItemLink")
self.regions.append(region)
locations = region.locations
for item in self.itempool:
count = common_item_count.get(item.player, {}).get(item.name, 0)
if count:
loc = Location(group_id, f"Item Link: {item.name} -> {self.player_name[item.player]} {count}",
None, region)
loc.access_rule = lambda state, item_name = item.name, group_id_ = group_id, count_ = count: \
state.has(item_name, group_id_, count_)
locations.append(loc)
loc.place_locked_item(item)
common_item_count[item.player][item.name] -= 1
else:
new_itempool.append(item)
itemcount = len(self.itempool)
self.itempool = new_itempool
while itemcount > len(self.itempool):
items_to_add = []
for player in group["players"]:
if group["link_replacement"]:
item_player = group_id
else:
item_player = player
if group["replacement_items"][player]:
items_to_add.append(AutoWorld.call_single(self, "create_item", item_player,
group["replacement_items"][player]))
else:
items_to_add.append(AutoWorld.call_single(self, "create_filler", item_player))
self.random.shuffle(items_to_add)
self.itempool.extend(items_to_add[:itemcount - len(self.itempool)])
def secure(self):
self.random = ThreadBarrierProxy(secrets.SystemRandom())
self.is_race = True
@@ -523,26 +602,22 @@ class MultiWorld():
players: Dict[str, Set[int]] = {
"minimal": set(),
"items": set(),
"locations": set()
"full": set()
}
for player, access in self.accessibility.items():
players[access.current_key].add(player)
for player, world in self.worlds.items():
players[world.options.accessibility.current_key].add(player)
beatable_fulfilled = False
def location_condition(location: Location):
def location_condition(location: Location) -> bool:
"""Determine if this location has to be accessible, location is already filtered by location_relevant"""
if location.player in players["locations"] or (location.item and location.item.player not in
players["minimal"]):
return True
return False
return location.player in players["full"] or \
(location.item and location.item.player not in players["minimal"])
def location_relevant(location: Location):
def location_relevant(location: Location) -> bool:
"""Determine if this location is relevant to sweep."""
if location.progress_type != LocationProgressType.EXCLUDED \
and (location.player in players["locations"] or location.advancement):
return True
return False
return location.progress_type != LocationProgressType.EXCLUDED \
and (location.player in players["full"] or location.advancement)
def all_done() -> bool:
"""Check if all access rules are fulfilled"""
@@ -643,14 +718,14 @@ class CollectionState():
def copy(self) -> CollectionState:
ret = CollectionState(self.multiworld)
ret.prog_items = copy.deepcopy(self.prog_items)
ret.reachable_regions = {player: copy.copy(self.reachable_regions[player]) for player in
self.reachable_regions}
ret.blocked_connections = {player: copy.copy(self.blocked_connections[player]) for player in
self.blocked_connections}
ret.events = copy.copy(self.events)
ret.path = copy.copy(self.path)
ret.locations_checked = copy.copy(self.locations_checked)
ret.prog_items = {player: counter.copy() for player, counter in self.prog_items.items()}
ret.reachable_regions = {player: region_set.copy() for player, region_set in
self.reachable_regions.items()}
ret.blocked_connections = {player: entrance_set.copy() for player, entrance_set in
self.blocked_connections.items()}
ret.events = self.events.copy()
ret.path = self.path.copy()
ret.locations_checked = self.locations_checked.copy()
for function in self.additional_copy_functions:
ret = function(self, ret)
return ret
@@ -680,13 +755,13 @@ class CollectionState():
def can_reach_region(self, spot: str, player: int) -> bool:
return self.multiworld.get_region(spot, player).can_reach(self)
def sweep_for_events(self, key_only: bool = False, locations: Optional[Iterable[Location]] = None) -> None:
def sweep_for_events(self, locations: Optional[Iterable[Location]] = None) -> None:
if locations is None:
locations = self.multiworld.get_filled_locations()
reachable_events = True
# since the loop has a good chance to run more than once, only filter the events once
locations = {location for location in locations if location.advancement and location not in self.events and
not key_only or getattr(location.item, "locked_dungeon_item", False)}
locations = {location for location in locations if location.advancement and location not in self.events}
while reachable_events:
reachable_events = {location for location in locations if location.can_reach(self)}
locations -= reachable_events
@@ -1052,9 +1127,9 @@ class Location:
and (not check_access or self.can_reach(state))))
def can_reach(self, state: CollectionState) -> bool:
# self.access_rule computes faster on average, so placing it first for faster abort
# Region.can_reach is just a cache lookup, so placing it first for faster abort on average
assert self.parent_region, "Can't reach location without region"
return self.access_rule(state) and self.parent_region.can_reach(state)
return self.parent_region.can_reach(state) and self.access_rule(state)
def place_locked_item(self, item: Item):
if self.item:
@@ -1291,8 +1366,6 @@ class Spoiler:
state = CollectionState(multiworld)
collection_spheres = []
while required_locations:
state.sweep_for_events(key_only=True)
sphere = set(filter(state.can_reach, required_locations))
for location in sphere:

View File

@@ -23,7 +23,7 @@ if __name__ == "__main__":
from MultiServer import CommandProcessor
from NetUtils import (Endpoint, decode, NetworkItem, encode, JSONtoTextParser, ClientStatus, Permission, NetworkSlot,
RawJSONtoTextParser, add_json_text, add_json_location, add_json_item, JSONTypes)
RawJSONtoTextParser, add_json_text, add_json_location, add_json_item, JSONTypes, SlotType)
from Utils import Version, stream_input, async_start
from worlds import network_data_package, AutoWorldRegister
import os
@@ -61,6 +61,7 @@ class ClientCommandProcessor(CommandProcessor):
if address:
self.ctx.server_address = None
self.ctx.username = None
self.ctx.password = None
elif not self.ctx.server_address:
self.output("Please specify an address.")
return False
@@ -514,6 +515,7 @@ class CommonContext:
async def shutdown(self):
self.server_address = ""
self.username = None
self.password = None
self.cancel_autoreconnect()
if self.server and not self.server.socket.closed:
await self.server.socket.close()
@@ -862,7 +864,8 @@ async def process_server_cmd(ctx: CommonContext, args: dict):
ctx.team = args["team"]
ctx.slot = args["slot"]
# int keys get lost in JSON transfer
ctx.slot_info = {int(pid): data for pid, data in args["slot_info"].items()}
ctx.slot_info = {0: NetworkSlot("Archipelago", "Archipelago", SlotType.player)}
ctx.slot_info.update({int(pid): data for pid, data in args["slot_info"].items()})
ctx.hint_points = args.get("hint_points", 0)
ctx.consume_players_package(args["players"])
ctx.stored_data_notification_keys.add(f"_read_hints_{ctx.team}_{ctx.slot}")

View File

@@ -646,7 +646,6 @@ def balance_multiworld_progression(multiworld: MultiWorld) -> None:
def get_sphere_locations(sphere_state: CollectionState,
locations: typing.Set[Location]) -> typing.Set[Location]:
sphere_state.sweep_for_events(key_only=True, locations=locations)
return {loc for loc in locations if sphere_state.can_reach(loc)}
def item_percentage(player: int, num: int) -> float:

105
Main.py
View File

@@ -124,14 +124,19 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
for player in multiworld.player_ids:
exclusion_rules(multiworld, player, multiworld.worlds[player].options.exclude_locations.value)
multiworld.worlds[player].options.priority_locations.value -= multiworld.worlds[player].options.exclude_locations.value
world_excluded_locations = set()
for location_name in multiworld.worlds[player].options.priority_locations.value:
try:
location = multiworld.get_location(location_name, player)
except KeyError as e: # failed to find the given location. Check if it's a legitimate location
if location_name not in multiworld.worlds[player].location_name_to_id:
raise Exception(f"Unable to prioritize location {location_name} in player {player}'s world.") from e
else:
except KeyError:
continue
if location.progress_type != LocationProgressType.EXCLUDED:
location.progress_type = LocationProgressType.PRIORITY
else:
logger.warning(f"Unable to prioritize location \"{location_name}\" in player {player}'s world because the world excluded it.")
world_excluded_locations.add(location_name)
multiworld.worlds[player].options.priority_locations.value -= world_excluded_locations
# Set local and non-local item rules.
if multiworld.players > 1:
@@ -146,6 +151,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
# Because some worlds don't actually create items during create_items this has to be as late as possible.
if any(getattr(multiworld.worlds[player].options, "start_inventory_from_pool", None) for player in multiworld.player_ids):
new_items: List[Item] = []
old_items: List[Item] = []
depletion_pool: Dict[int, Dict[str, int]] = {
player: getattr(multiworld.worlds[player].options,
"start_inventory_from_pool",
@@ -164,97 +170,26 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
depletion_pool[item.player][item.name] -= 1
# quick abort if we have found all items
if not target:
new_items.extend(multiworld.itempool[i+1:])
old_items.extend(multiworld.itempool[i+1:])
break
else:
new_items.append(item)
old_items.append(item)
# leftovers?
if target:
for player, remaining_items in depletion_pool.items():
remaining_items = {name: count for name, count in remaining_items.items() if count}
if remaining_items:
raise Exception(f"{multiworld.get_player_name(player)}"
logger.warning(f"{multiworld.get_player_name(player)}"
f" is trying to remove items from their pool that don't exist: {remaining_items}")
assert len(multiworld.itempool) == len(new_items), "Item Pool amounts should not change."
multiworld.itempool[:] = new_items
# find all filler we generated for the current player and remove until it matches
removables = [item for item in new_items if item.player == player]
for _ in range(sum(remaining_items.values())):
new_items.remove(removables.pop())
assert len(multiworld.itempool) == len(new_items + old_items), "Item Pool amounts should not change."
multiworld.itempool[:] = new_items + old_items
# temporary home for item links, should be moved out of Main
for group_id, group in multiworld.groups.items():
def find_common_pool(players: Set[int], shared_pool: Set[str]) -> Tuple[
Optional[Dict[int, Dict[str, int]]], Optional[Dict[str, int]]
]:
classifications: Dict[str, int] = collections.defaultdict(int)
counters = {player: {name: 0 for name in shared_pool} for player in players}
for item in multiworld.itempool:
if item.player in counters and item.name in shared_pool:
counters[item.player][item.name] += 1
classifications[item.name] |= item.classification
for player in players.copy():
if all([counters[player][item] == 0 for item in shared_pool]):
players.remove(player)
del (counters[player])
if not players:
return None, None
for item in shared_pool:
count = min(counters[player][item] for player in players)
if count:
for player in players:
counters[player][item] = count
else:
for player in players:
del (counters[player][item])
return counters, classifications
common_item_count, classifications = find_common_pool(group["players"], group["item_pool"])
if not common_item_count:
continue
new_itempool: List[Item] = []
for item_name, item_count in next(iter(common_item_count.values())).items():
for _ in range(item_count):
new_item = group["world"].create_item(item_name)
# mangle together all original classification bits
new_item.classification |= classifications[item_name]
new_itempool.append(new_item)
region = Region("Menu", group_id, multiworld, "ItemLink")
multiworld.regions.append(region)
locations = region.locations
for item in multiworld.itempool:
count = common_item_count.get(item.player, {}).get(item.name, 0)
if count:
loc = Location(group_id, f"Item Link: {item.name} -> {multiworld.player_name[item.player]} {count}",
None, region)
loc.access_rule = lambda state, item_name = item.name, group_id_ = group_id, count_ = count: \
state.has(item_name, group_id_, count_)
locations.append(loc)
loc.place_locked_item(item)
common_item_count[item.player][item.name] -= 1
else:
new_itempool.append(item)
itemcount = len(multiworld.itempool)
multiworld.itempool = new_itempool
while itemcount > len(multiworld.itempool):
items_to_add = []
for player in group["players"]:
if group["link_replacement"]:
item_player = group_id
else:
item_player = player
if group["replacement_items"][player]:
items_to_add.append(AutoWorld.call_single(multiworld, "create_item", item_player,
group["replacement_items"][player]))
else:
items_to_add.append(AutoWorld.call_single(multiworld, "create_filler", item_player))
multiworld.random.shuffle(items_to_add)
multiworld.itempool.extend(items_to_add[:itemcount - len(multiworld.itempool)])
multiworld.link_items()
if any(multiworld.item_links.values()):
multiworld._all_state = None

View File

@@ -1352,7 +1352,7 @@ class ClientMessageProcessor(CommonCommandProcessor):
if self.ctx.remaining_mode == "enabled":
remaining_item_ids = get_remaining(self.ctx, self.client.team, self.client.slot)
if remaining_item_ids:
self.output("Remaining items: " + ", ".join(self.ctx.item_names[self.client.slot.game][item_id]
self.output("Remaining items: " + ", ".join(self.ctx.item_names[self.ctx.games[self.client.slot]][item_id]
for item_id in remaining_item_ids))
else:
self.output("No remaining items found.")
@@ -1365,7 +1365,7 @@ class ClientMessageProcessor(CommonCommandProcessor):
if self.ctx.client_game_state[self.client.team, self.client.slot] == ClientStatus.CLIENT_GOAL:
remaining_item_ids = get_remaining(self.ctx, self.client.team, self.client.slot)
if remaining_item_ids:
self.output("Remaining items: " + ", ".join(self.ctx.item_names[self.client.slot.game][item_id]
self.output("Remaining items: " + ", ".join(self.ctx.item_names[self.ctx.games[self.client.slot]][item_id]
for item_id in remaining_item_ids))
else:
self.output("No remaining items found.")

View File

@@ -786,17 +786,22 @@ class VerifyKeys(metaclass=FreezeValidKeys):
verify_location_name: bool = False
value: typing.Any
@classmethod
def verify_keys(cls, data: typing.Iterable[str]) -> None:
if cls.valid_keys:
data = set(data)
dataset = set(word.casefold() for word in data) if cls.valid_keys_casefold else set(data)
extra = dataset - cls._valid_keys
def verify_keys(self) -> None:
if self.valid_keys:
data = set(self.value)
dataset = set(word.casefold() for word in data) if self.valid_keys_casefold else set(data)
extra = dataset - self._valid_keys
if extra:
raise Exception(f"Found unexpected key {', '.join(extra)} in {cls}. "
f"Allowed keys: {cls._valid_keys}.")
raise OptionError(
f"Found unexpected key {', '.join(extra)} in {getattr(self, 'display_name', self)}. "
f"Allowed keys: {self._valid_keys}."
)
def verify(self, world: typing.Type[World], player_name: str, plando_options: "PlandoOptions") -> None:
try:
self.verify_keys()
except OptionError as validation_error:
raise OptionError(f"Player {player_name} has invalid option keys:\n{validation_error}")
if self.convert_name_groups and self.verify_item_name:
new_value = type(self.value)() # empty container of whatever value is
for item_name in self.value:
@@ -833,7 +838,6 @@ class OptionDict(Option[typing.Dict[str, typing.Any]], VerifyKeys, typing.Mappin
@classmethod
def from_any(cls, data: typing.Dict[str, typing.Any]) -> OptionDict:
if type(data) == dict:
cls.verify_keys(data)
return cls(data)
else:
raise NotImplementedError(f"Cannot Convert from non-dictionary, got {type(data)}")
@@ -879,7 +883,6 @@ class OptionList(Option[typing.List[typing.Any]], VerifyKeys):
@classmethod
def from_any(cls, data: typing.Any):
if is_iterable_except_str(data):
cls.verify_keys(data)
return cls(data)
return cls.from_text(str(data))
@@ -905,7 +908,6 @@ class OptionSet(Option[typing.Set[str]], VerifyKeys):
@classmethod
def from_any(cls, data: typing.Any):
if is_iterable_except_str(data):
cls.verify_keys(data)
return cls(data)
return cls.from_text(str(data))
@@ -948,6 +950,19 @@ class PlandoTexts(Option[typing.List[PlandoText]], VerifyKeys):
self.value = []
logging.warning(f"The plando texts module is turned off, "
f"so text for {player_name} will be ignored.")
else:
super().verify(world, player_name, plando_options)
def verify_keys(self) -> None:
if self.valid_keys:
data = set(text.at for text in self)
dataset = set(word.casefold() for word in data) if self.valid_keys_casefold else set(data)
extra = dataset - self._valid_keys
if extra:
raise OptionError(
f"Invalid \"at\" placement {', '.join(extra)} in {getattr(self, 'display_name', self)}. "
f"Allowed placements: {self._valid_keys}."
)
@classmethod
def from_any(cls, data: PlandoTextsFromAnyType) -> Self:
@@ -971,7 +986,6 @@ class PlandoTexts(Option[typing.List[PlandoText]], VerifyKeys):
texts.append(text)
else:
raise Exception(f"Cannot create plando text from non-dictionary type, got {type(text)}")
cls.verify_keys([text.at for text in texts])
return cls(texts)
else:
raise NotImplementedError(f"Cannot Convert from non-list, got {type(data)}")
@@ -1144,18 +1158,35 @@ class PlandoConnections(Option[typing.List[PlandoConnection]], metaclass=Connect
class Accessibility(Choice):
"""Set rules for reachability of your items/locations.
"""
Set rules for reachability of your items/locations.
**Full:** ensure everything can be reached and acquired.
- **Locations:** ensure everything can be reached and acquired.
- **Items:** ensure all logically relevant items can be acquired.
- **Minimal:** ensure what is needed to reach your goal can be acquired.
**Minimal:** ensure what is needed to reach your goal can be acquired.
"""
display_name = "Accessibility"
rich_text_doc = True
option_locations = 0
option_items = 1
option_full = 0
option_minimal = 2
alias_none = 2
alias_locations = 0
alias_items = 0
default = 0
class ItemsAccessibility(Accessibility):
"""
Set rules for reachability of your items/locations.
**Full:** ensure everything can be reached and acquired.
**Minimal:** ensure what is needed to reach your goal can be acquired.
**Items:** ensure all logically relevant items can be acquired. Some items, such as keys, may be self-locking, and
some locations may be inaccessible.
"""
option_items = 1
default = 1
@@ -1205,6 +1236,7 @@ class CommonOptions(metaclass=OptionsMetaProperty):
:param option_names: names of the options to return
:param casing: case of the keys to return. Supports `snake`, `camel`, `pascal`, `kebab`
"""
assert option_names, "options.as_dict() was used without any option names."
option_results = {}
for option_name in option_names:
if option_name in type(self).type_hints:
@@ -1486,31 +1518,3 @@ def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], ge
with open(os.path.join(target_folder, game_name + ".yaml"), "w", encoding="utf-8-sig") as f:
f.write(res)
if __name__ == "__main__":
from worlds.alttp.Options import Logic
import argparse
map_shuffle = Toggle
compass_shuffle = Toggle
key_shuffle = Toggle
big_key_shuffle = Toggle
hints = Toggle
test = argparse.Namespace()
test.logic = Logic.from_text("no_logic")
test.map_shuffle = map_shuffle.from_text("ON")
test.hints = hints.from_text('OFF')
try:
test.logic = Logic.from_text("overworld_glitches_typo")
except KeyError as e:
print(e)
try:
test.logic_owg = Logic.from_text("owg")
except KeyError as e:
print(e)
if test.map_shuffle:
print("map_shuffle is on")
print(f"Hints are {bool(test.hints)}")
print(test)

View File

@@ -72,6 +72,7 @@ Currently, the following games are supported:
* Aquaria
* Yu-Gi-Oh! Ultimate Masters: World Championship Tournament 2006
* A Hat in Time
* Old School Runescape
For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/).
Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled

View File

@@ -29,7 +29,7 @@ class UndertaleCommandProcessor(ClientCommandProcessor):
def _cmd_patch(self):
"""Patch the game. Only use this command if /auto_patch fails."""
if isinstance(self.ctx, UndertaleContext):
os.makedirs(name=os.path.join(os.getcwd(), "Undertale"), exist_ok=True)
os.makedirs(name=Utils.user_path("Undertale"), exist_ok=True)
self.ctx.patch_game()
self.output("Patched.")
@@ -43,7 +43,7 @@ class UndertaleCommandProcessor(ClientCommandProcessor):
def _cmd_auto_patch(self, steaminstall: typing.Optional[str] = None):
"""Patch the game automatically."""
if isinstance(self.ctx, UndertaleContext):
os.makedirs(name=os.path.join(os.getcwd(), "Undertale"), exist_ok=True)
os.makedirs(name=Utils.user_path("Undertale"), exist_ok=True)
tempInstall = steaminstall
if not os.path.isfile(os.path.join(tempInstall, "data.win")):
tempInstall = None
@@ -62,7 +62,7 @@ class UndertaleCommandProcessor(ClientCommandProcessor):
for file_name in os.listdir(tempInstall):
if file_name != "steam_api.dll":
shutil.copy(os.path.join(tempInstall, file_name),
os.path.join(os.getcwd(), "Undertale", file_name))
Utils.user_path("Undertale", file_name))
self.ctx.patch_game()
self.output("Patching successful!")
@@ -111,12 +111,12 @@ class UndertaleContext(CommonContext):
self.save_game_folder = os.path.expandvars(r"%localappdata%/UNDERTALE")
def patch_game(self):
with open(os.path.join(os.getcwd(), "Undertale", "data.win"), "rb") as f:
with open(Utils.user_path("Undertale", "data.win"), "rb") as f:
patchedFile = bsdiff4.patch(f.read(), undertale.data_path("patch.bsdiff"))
with open(os.path.join(os.getcwd(), "Undertale", "data.win"), "wb") as f:
with open(Utils.user_path("Undertale", "data.win"), "wb") as f:
f.write(patchedFile)
os.makedirs(name=os.path.join(os.getcwd(), "Undertale", "Custom Sprites"), exist_ok=True)
with open(os.path.expandvars(os.path.join(os.getcwd(), "Undertale", "Custom Sprites",
os.makedirs(name=Utils.user_path("Undertale", "Custom Sprites"), exist_ok=True)
with open(os.path.expandvars(Utils.user_path("Undertale", "Custom Sprites",
"Which Character.txt")), "w") as f:
f.writelines(["// Put the folder name of the sprites you want to play as, make sure it is the only "
"line other than this one.\n", "frisk"])

View File

@@ -325,10 +325,12 @@ def run_server_process(name: str, ponyconfig: dict, static_server_data: dict,
def run(self):
while 1:
next_room = rooms_to_run.get(block=True, timeout=None)
gc.collect(0)
task = asyncio.run_coroutine_threadsafe(start_room(next_room), loop)
self._tasks.append(task)
task.add_done_callback(self._done)
logging.info(f"Starting room {next_room} on {name}.")
del task # delete reference to task object
starter = Starter()
starter.daemon = True

View File

@@ -1,6 +1,6 @@
import datetime
import os
from typing import List, Dict, Union
from typing import Any, IO, Dict, Iterator, List, Tuple, Union
import jinja2.exceptions
from flask import request, redirect, url_for, render_template, Response, session, abort, send_from_directory
@@ -97,25 +97,37 @@ def new_room(seed: UUID):
return redirect(url_for("host_room", room=room.id))
def _read_log(path: str):
if os.path.exists(path):
with open(path, encoding="utf-8-sig") as log:
yield from log
else:
yield f"Logfile {path} does not exist. " \
f"Likely a crash during spinup of multiworld instance or it is still spinning up."
def _read_log(log: IO[Any], offset: int = 0) -> Iterator[bytes]:
marker = log.read(3) # skip optional BOM
if marker != b'\xEF\xBB\xBF':
log.seek(0, os.SEEK_SET)
log.seek(offset, os.SEEK_CUR)
yield from log
log.close() # free file handle as soon as possible
@app.route('/log/<suuid:room>')
def display_log(room: UUID):
def display_log(room: UUID) -> Union[str, Response, Tuple[str, int]]:
room = Room.get(id=room)
if room is None:
return abort(404)
if room.owner == session["_id"]:
file_path = os.path.join("logs", str(room.id) + ".txt")
if os.path.exists(file_path):
return Response(_read_log(file_path), mimetype="text/plain;charset=UTF-8")
return "Log File does not exist."
try:
log = open(file_path, "rb")
range_header = request.headers.get("Range")
if range_header:
range_type, range_values = range_header.split('=')
start, end = map(str.strip, range_values.split('-', 1))
if range_type != "bytes" or end != "":
return "Unsupported range", 500
# NOTE: we skip Content-Range in the response here, which isn't great but works for our JS
return Response(_read_log(log, int(start)), mimetype="text/plain", status=206)
return Response(_read_log(log), mimetype="text/plain")
except FileNotFoundError:
return Response(f"Logfile {file_path} does not exist. "
f"Likely a crash during spinup of multiworld instance or it is still spinning up.",
mimetype="text/plain")
return "Access Denied", 403
@@ -139,7 +151,22 @@ def host_room(room: UUID):
with db_session:
room.last_activity = now # will trigger a spinup, if it's not already running
return render_template("hostRoom.html", room=room, should_refresh=should_refresh)
def get_log(max_size: int = 1024000) -> str:
try:
with open(os.path.join("logs", str(room.id) + ".txt"), "rb") as log:
raw_size = 0
fragments: List[str] = []
for block in _read_log(log):
if raw_size + len(block) > max_size:
fragments.append("")
break
raw_size += len(block)
fragments.append(block.decode("utf-8"))
return "".join(fragments)
except FileNotFoundError:
return ""
return render_template("hostRoom.html", room=room, should_refresh=should_refresh, get_log=get_log)
@app.route('/favicon.ico')

View File

@@ -231,10 +231,17 @@ def generate_yaml(game: str):
del options[key]
# Detect keys which end with -range, indicating a NamedRange with a possible custom value
elif key_parts[-1].endswith("-range"):
if options[key_parts[-1][:-6]] == "custom":
options[key_parts[-1][:-6]] = val
del options[key]
# Detect random-* keys and set their options accordingly
for key, val in options.copy().items():
if key.startswith("random-"):
options[key[len("random-"):]] = "random"
options[key.removeprefix("random-")] = "random"
del options[key]
# Error checking

View File

@@ -8,7 +8,8 @@ from . import cache
def robots():
# If this host is not official, do not allow search engine crawling
if not app.config["ASSET_RIGHTS"]:
return app.send_static_file('robots.txt')
# filename changed in case the path is intercepted and served by an outside service
return app.send_static_file('robots_file.txt')
# Send 404 if the host has affirmed this to be the official WebHost
abort(404)

View File

@@ -44,7 +44,7 @@
{{ macros.list_patches_room(room) }}
{% if room.owner == session["_id"] %}
<div style="display: flex; align-items: center;">
<form method=post style="flex-grow: 1; margin-right: 1em;">
<form method="post" id="command-form" style="flex-grow: 1; margin-right: 1em;">
<div class="form-group">
<label for="cmd"></label>
<input class="form-control" type="text" id="cmd" name="cmd"
@@ -55,24 +55,89 @@
Open Log File...
</a>
</div>
<div id="logger"></div>
<script type="application/ecmascript">
let xmlhttp = new XMLHttpRequest();
let url = '{{ url_for('display_log', room = room.id) }}';
{% set log = get_log() -%}
{%- set log_len = log | length - 1 if log.endswith("…") else log | length -%}
<div id="logger" style="white-space: pre">{{ log }}</div>
<script>
let url = '{{ url_for('display_log', room = room.id) }}';
let bytesReceived = {{ log_len }};
let updateLogTimeout;
let awaitingCommandResponse = false;
let logger = document.getElementById("logger");
xmlhttp.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200) {
document.getElementById("logger").innerText = this.responseText;
}
};
function request_new() {
xmlhttp.open("GET", url, true);
xmlhttp.send();
function scrollToBottom(el) {
let bot = el.scrollHeight - el.clientHeight;
el.scrollTop += Math.ceil((bot - el.scrollTop)/10);
if (bot - el.scrollTop >= 1) {
window.clearTimeout(el.scrollTimer);
el.scrollTimer = window.setTimeout(() => {
scrollToBottom(el)
}, 16);
}
}
window.setTimeout(request_new, 1000);
window.setInterval(request_new, 10000);
async function updateLog() {
try {
let res = await fetch(url, {
headers: {
'Range': `bytes=${bytesReceived}-`,
}
});
if (res.ok) {
let text = await res.text();
if (text.length > 0) {
awaitingCommandResponse = false;
if (bytesReceived === 0 || res.status !== 206) {
logger.innerHTML = '';
}
if (res.status !== 206) {
bytesReceived = 0;
} else {
bytesReceived += new Blob([text]).size;
}
if (logger.innerHTML.endsWith('…')) {
logger.innerHTML = logger.innerHTML.substring(0, logger.innerHTML.length - 1);
}
logger.appendChild(document.createTextNode(text));
scrollToBottom(logger);
}
}
}
finally {
window.clearTimeout(updateLogTimeout);
updateLogTimeout = window.setTimeout(updateLog, awaitingCommandResponse ? 500 : 10000);
}
}
async function postForm(ev) {
/** @type {HTMLInputElement} */
let cmd = document.getElementById("cmd");
if (cmd.value === "") {
ev.preventDefault();
return;
}
/** @type {HTMLFormElement} */
let form = document.getElementById("command-form");
let req = fetch(form.action || window.location.href, {
method: form.method,
body: new FormData(form),
redirect: "manual",
});
ev.preventDefault(); // has to happen before first await
form.reset();
let res = await req;
if (res.ok || res.type === 'opaqueredirect') {
awaitingCommandResponse = true;
window.clearTimeout(updateLogTimeout);
updateLogTimeout = window.setTimeout(updateLog, 100);
} else {
window.alert(res.statusText);
}
}
document.getElementById("command-form").addEventListener("submit", postForm);
updateLogTimeout = window.setTimeout(updateLog, 1000);
logger.scrollTop = logger.scrollHeight;
</script>
{% endif %}
</div>

View File

@@ -54,7 +54,7 @@
{% macro NamedRange(option_name, option) %}
{{ OptionTitle(option_name, option) }}
<div class="named-range-container">
<select id="{{ option_name }}-select" data-option-name="{{ option_name }}" {{ "disabled" if option.default == "random" }}>
<select id="{{ option_name }}-select" name="{{ option_name }}" data-option-name="{{ option_name }}" {{ "disabled" if option.default == "random" }}>
{% for key, val in option.special_range_names.items() %}
{% if option.default == val %}
<option value="{{ val }}" selected>{{ key|replace("_", " ")|title }} ({{ val }})</option>
@@ -64,17 +64,17 @@
{% endfor %}
<option value="custom" hidden>Custom</option>
</select>
<div class="named-range-wrapper">
<div class="named-range-wrapper js-required">
<input
type="range"
id="{{ option_name }}"
name="{{ option_name }}"
name="{{ option_name }}-range"
min="{{ option.range_start }}"
max="{{ option.range_end }}"
value="{{ option.default | default(option.range_start) if option.default != "random" else option.range_start }}"
{{ "disabled" if option.default == "random" }}
/>
<span id="{{ option_name }}-value" class="range-value js-required">
<span id="{{ option_name }}-value" class="range-value">
{{ option.default | default(option.range_start) if option.default != "random" else option.range_start }}
</span>
{{ RandomizeButton(option_name, option) }}

View File

@@ -11,7 +11,7 @@
<noscript>
<style>
.js-required{
display: none;
display: none !important;
}
</style>
</noscript>

View File

@@ -79,7 +79,7 @@ class TrackerData:
# Normal lookup tables as well.
self.item_name_to_id[game] = game_package["item_name_to_id"]
self.location_name_to_id[game] = game_package["item_name_to_id"]
self.location_name_to_id[game] = game_package["location_name_to_id"]
def get_seed_name(self) -> str:
"""Retrieves the seed name."""
@@ -1366,28 +1366,28 @@ if "Starcraft 2" in network_data_package["games"]:
organics_icon_base_url = "https://0rganics.org/archipelago/sc2wol/"
icons = {
"Starting Minerals": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/icons/icon-mineral-protoss.png",
"Starting Vespene": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/icons/icon-gas-terran.png",
"Starting Minerals": github_icon_base_url + "blizzard/icon-mineral-nobg.png",
"Starting Vespene": github_icon_base_url + "blizzard/icon-gas-terran-nobg.png",
"Starting Supply": github_icon_base_url + "blizzard/icon-supply-terran_nobg.png",
"Terran Infantry Weapons Level 1": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-infantryweaponslevel1.png",
"Terran Infantry Weapons Level 2": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-infantryweaponslevel2.png",
"Terran Infantry Weapons Level 3": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-infantryweaponslevel3.png",
"Terran Infantry Armor Level 1": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-infantryarmorlevel1.png",
"Terran Infantry Armor Level 2": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-infantryarmorlevel2.png",
"Terran Infantry Armor Level 3": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-infantryarmorlevel3.png",
"Terran Vehicle Weapons Level 1": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-vehicleweaponslevel1.png",
"Terran Vehicle Weapons Level 2": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-vehicleweaponslevel2.png",
"Terran Vehicle Weapons Level 3": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-vehicleweaponslevel3.png",
"Terran Vehicle Armor Level 1": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-vehicleplatinglevel1.png",
"Terran Vehicle Armor Level 2": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-vehicleplatinglevel2.png",
"Terran Vehicle Armor Level 3": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-vehicleplatinglevel3.png",
"Terran Ship Weapons Level 1": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-shipweaponslevel1.png",
"Terran Ship Weapons Level 2": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-shipweaponslevel2.png",
"Terran Ship Weapons Level 3": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-shipweaponslevel3.png",
"Terran Ship Armor Level 1": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-shipplatinglevel1.png",
"Terran Ship Armor Level 2": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-shipplatinglevel2.png",
"Terran Ship Armor Level 3": "https://sclegacy.com/images/uploaded/starcraftii_beta/gamefiles/upgrades/btn-upgrade-terran-shipplatinglevel3.png",
"Terran Infantry Weapons Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryweaponslevel1.png",
"Terran Infantry Weapons Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryweaponslevel2.png",
"Terran Infantry Weapons Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryweaponslevel3.png",
"Terran Infantry Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryarmorlevel1.png",
"Terran Infantry Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryarmorlevel2.png",
"Terran Infantry Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-infantryarmorlevel3.png",
"Terran Vehicle Weapons Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleweaponslevel1.png",
"Terran Vehicle Weapons Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleweaponslevel2.png",
"Terran Vehicle Weapons Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleweaponslevel3.png",
"Terran Vehicle Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleplatinglevel1.png",
"Terran Vehicle Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleplatinglevel2.png",
"Terran Vehicle Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-vehicleplatinglevel3.png",
"Terran Ship Weapons Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-shipweaponslevel1.png",
"Terran Ship Weapons Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-shipweaponslevel2.png",
"Terran Ship Weapons Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-shipweaponslevel3.png",
"Terran Ship Armor Level 1": github_icon_base_url + "blizzard/btn-upgrade-terran-shipplatinglevel1.png",
"Terran Ship Armor Level 2": github_icon_base_url + "blizzard/btn-upgrade-terran-shipplatinglevel2.png",
"Terran Ship Armor Level 3": github_icon_base_url + "blizzard/btn-upgrade-terran-shipplatinglevel3.png",
"Bunker": "https://static.wikia.nocookie.net/starcraft/images/c/c5/Bunker_SC2_Icon1.jpg",
"Missile Turret": "https://static.wikia.nocookie.net/starcraft/images/5/5f/MissileTurret_SC2_Icon1.jpg",

View File

@@ -1,8 +1,8 @@
# Archipelago World Code Owners / Maintainers Document
#
# This file is used to notate the current "owners" or "maintainers" of any currently merged world folder. For any pull
# requests that modify these worlds, a code owner must approve the PR in addition to a core maintainer. This is not to
# be used for files/folders outside the /worlds folder, those will always need sign off from a core maintainer.
# This file is used to notate the current "owners" or "maintainers" of any currently merged world folder as well as
# certain documentation. For any pull requests that modify these worlds/docs, a code owner must approve the PR in
# addition to a core maintainer. All other files and folders are owned and maintained by core maintainers directly.
#
# All usernames must be GitHub usernames (and are case sensitive).
@@ -115,6 +115,9 @@
# Ocarina of Time
/worlds/oot/ @espeon65536
# Old School Runescape
/worlds/osrs @digiholic
# Overcooked! 2
/worlds/overcooked2/ @toasterparty
@@ -226,3 +229,11 @@
# Ori and the Blind Forest
# /worlds_disabled/oribf/
###################
## Documentation ##
###################
# Apworld Dev Faq
/docs/apworld_dev_faq.md @qwint @ScipioWright

45
docs/apworld_dev_faq.md Normal file
View File

@@ -0,0 +1,45 @@
# APWorld Dev FAQ
This document is meant as a reference tool to show solutions to common problems when developing an apworld.
It is not intended to answer every question about Archipelago and it assumes you have read the other docs,
including [Contributing](contributing.md), [Adding Games](<adding games.md>), and [World API](<world api.md>).
---
### My game has a restrictive start that leads to fill errors
Hint to the Generator that an item needs to be in sphere one with local_early_items. Here, `1` represents the number of "Sword" items to attempt to place in sphere one.
```py
early_item_name = "Sword"
self.multiworld.local_early_items[self.player][early_item_name] = 1
```
Some alternative ways to try to fix this problem are:
* Add more locations to sphere one of your world, potentially only when there would be a restrictive start
* Pre-place items yourself, such as during `create_items`
* Put items into the player's starting inventory using `push_precollected`
* Raise an exception, such as an `OptionError` during `generate_early`, to disallow options that would lead to a restrictive start
---
### I have multiple settings that change the item/location pool counts and need to balance them out
In an ideal situation your system for producing locations and items wouldn't leave any opportunity for them to be unbalanced. But in real, complex situations, that might be unfeasible.
If that's the case, you can create extra filler based on the difference between your unfilled locations and your itempool by comparing [get_unfilled_locations](https://github.com/ArchipelagoMW/Archipelago/blob/main/BaseClasses.py#:~:text=get_unfilled_locations) to your list of items to submit
Note: to use self.create_filler(), self.get_filler_item_name() should be defined to only return valid filler item names
```py
total_locations = len(self.multiworld.get_unfilled_locations(self.player))
item_pool = self.create_non_filler_items()
for _ in range(total_locations - len(item_pool)):
item_pool.append(self.create_filler())
self.multiworld.itempool += item_pool
```
A faster alternative to the `for` loop would be to use a [list comprehension](https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions):
```py
item_pool += [self.create_filler() for _ in range(total_locations - len(item_pool))]
```

View File

@@ -456,8 +456,9 @@ In addition, the following methods can be implemented and are called in this ord
called to place player's regions and their locations into the MultiWorld's regions list.
If it's hard to separate, this can be done during `generate_early` or `create_items` as well.
* `create_items(self)`
called to place player's items into the MultiWorld's itempool. After this step all regions
and items have to be in the MultiWorld's regions and itempool, and these lists should not be modified afterward.
called to place player's items into the MultiWorld's itempool. By the end of this step all regions, locations and
items have to be in the MultiWorld's regions and itempool. You cannot add or remove items, locations, or regions
after this step. Locations cannot be moved to different regions after this step.
* `set_rules(self)`
called to set access and item rules on locations and entrances.
* `generate_basic(self)`

View File

@@ -219,7 +219,7 @@ Root: HKCR; Subkey: "{#MyAppName}multidata\shell\open\command"; ValueData: """{
Root: HKCR; Subkey: ".apworld"; ValueData: "{#MyAppName}worlddata"; Flags: uninsdeletevalue; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}worlddata"; ValueData: "Archipelago World Data"; Flags: uninsdeletekey; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}worlddata\DefaultIcon"; ValueData: "{app}\ArchipelagoLauncher.exe,0"; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}worlddata\shell\open\command"; ValueData: """{app}\ArchipelagoLauncher.exe"" ""%1""";
Root: HKCR; Subkey: "{#MyAppName}worlddata\shell\open\command"; ValueData: """{app}\ArchipelagoLauncher.exe"" ""%1"""; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "archipelago"; ValueType: "string"; ValueData: "Archipegalo Protocol"; Flags: uninsdeletekey;
Root: HKCR; Subkey: "archipelago"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: "";

View File

@@ -595,8 +595,9 @@ class GameManager(App):
"!help for server commands.")
def connect_button_action(self, button):
self.ctx.username = None
self.ctx.password = None
if self.ctx.server:
self.ctx.username = None
async_start(self.ctx.disconnect())
else:
async_start(self.ctx.connect(self.server_connect_bar.text.replace("/connect ", "")))
@@ -836,6 +837,10 @@ class KivyJSONtoTextParser(JSONtoTextParser):
return self._handle_text(node)
def _handle_text(self, node: JSONMessagePart):
# All other text goes through _handle_color, and we don't want to escape markup twice,
# or mess up text that already has intentional markup applied to it
if node.get("type", "text") == "text":
node["text"] = escape_markup(node["text"])
for ref in node.get("refs", []):
node["text"] = f"[ref={self.ref_count}|{ref}]{node['text']}[/ref]"
self.ref_count += 1

View File

@@ -3,6 +3,7 @@ Application settings / host.yaml interface using type hints.
This is different from player options.
"""
import os
import os.path
import shutil
import sys
@@ -11,7 +12,6 @@ import warnings
from enum import IntEnum
from threading import Lock
from typing import cast, Any, BinaryIO, ClassVar, Dict, Iterator, List, Optional, TextIO, Tuple, Union, TypeVar
import os
__all__ = [
"get_settings", "fmt_doc", "no_gui",
@@ -798,6 +798,7 @@ class Settings(Group):
atexit.register(autosave)
def save(self, location: Optional[str] = None) -> None: # as above
from Utils import parse_yaml
location = location or self._filename
assert location, "No file specified"
temp_location = location + ".tmp" # not using tempfile to test expected file access
@@ -807,10 +808,18 @@ class Settings(Group):
# can't use utf-8-sig because it breaks backward compat: pyyaml on Windows with bytes does not strip the BOM
with open(temp_location, "w", encoding="utf-8") as f:
self.dump(f)
# replace old with new
if os.path.exists(location):
f.flush()
if hasattr(os, "fsync"):
os.fsync(f.fileno())
# validate new file is valid yaml
with open(temp_location, encoding="utf-8") as f:
parse_yaml(f.read())
# replace old with new, try atomic operation first
try:
os.rename(temp_location, location)
except (OSError, FileExistsError):
os.unlink(location)
os.rename(temp_location, location)
os.rename(temp_location, location)
self._filename = location
def dump(self, f: TextIO, level: int = 0) -> None:
@@ -832,7 +841,6 @@ def get_settings() -> Settings:
with _lock: # make sure we only have one instance
res = getattr(get_settings, "_cache", None)
if not res:
import os
from Utils import user_path, local_path
filenames = ("options.yaml", "host.yaml")
locations: List[str] = []

View File

@@ -21,7 +21,7 @@ from pathlib import Path
# This is a bit jank. We need cx-Freeze to be able to run anything from this script, so install it
try:
requirement = 'cx-Freeze==7.0.0'
requirement = 'cx-Freeze==7.2.0'
import pkg_resources
try:
pkg_resources.require(requirement)
@@ -66,7 +66,6 @@ non_apworlds: set = {
"Adventure",
"ArchipIDLE",
"Archipelago",
"ChecksFinder",
"Clique",
"Final Fantasy",
"Lufia II Ancient Cave",

View File

@@ -292,12 +292,12 @@ class WorldTestBase(unittest.TestCase):
"""Ensure all state can reach everything and complete the game with the defined options"""
if not (self.run_default_tests and self.constructed):
return
with self.subTest("Game", game=self.game):
with self.subTest("Game", game=self.game, seed=self.multiworld.seed):
excluded = self.multiworld.worlds[self.player].options.exclude_locations.value
state = self.multiworld.get_all_state(False)
for location in self.multiworld.get_locations():
if location.name not in excluded:
with self.subTest("Location should be reached", location=location):
with self.subTest("Location should be reached", location=location.name):
reachable = location.can_reach(state)
self.assertTrue(reachable, f"{location.name} unreachable")
with self.subTest("Beatable"):
@@ -308,7 +308,7 @@ class WorldTestBase(unittest.TestCase):
"""Ensure empty state can reach at least one location with the defined options"""
if not (self.run_default_tests and self.constructed):
return
with self.subTest("Game", game=self.game):
with self.subTest("Game", game=self.game, seed=self.multiworld.seed):
state = CollectionState(self.multiworld)
locations = self.multiworld.get_reachable_locations(state, self.player)
self.assertGreater(len(locations), 0,

View File

@@ -174,8 +174,8 @@ class TestFillRestrictive(unittest.TestCase):
player1 = generate_player_data(multiworld, 1, 3, 3)
player2 = generate_player_data(multiworld, 2, 3, 3)
multiworld.accessibility[player1.id].value = multiworld.accessibility[player1.id].option_minimal
multiworld.accessibility[player2.id].value = multiworld.accessibility[player2.id].option_locations
multiworld.worlds[player1.id].options.accessibility.value = Accessibility.option_minimal
multiworld.worlds[player2.id].options.accessibility.value = Accessibility.option_full
multiworld.completion_condition[player1.id] = lambda state: True
multiworld.completion_condition[player2.id] = lambda state: state.has(player2.prog_items[2].name, player2.id)

View File

@@ -1,11 +1,12 @@
import os
import os.path
import unittest
from io import StringIO
from tempfile import TemporaryFile
from tempfile import TemporaryDirectory, TemporaryFile
from typing import Any, Dict, List, cast
import Utils
from settings import Settings, Group
from settings import Group, Settings, ServerOptions
class TestIDs(unittest.TestCase):
@@ -80,3 +81,27 @@ class TestSettingsDumper(unittest.TestCase):
self.assertEqual(value_spaces[2], value_spaces[0]) # start of sub-list
self.assertGreater(value_spaces[3], value_spaces[0],
f"{value_lines[3]} should have more indentation than {value_lines[0]} in {lines}")
class TestSettingsSave(unittest.TestCase):
def test_save(self) -> None:
"""Test that saving and updating works"""
with TemporaryDirectory() as d:
filename = os.path.join(d, "host.yaml")
new_release_mode = ServerOptions.ReleaseMode("enabled")
# create default host.yaml
settings = Settings(None)
settings.save(filename)
self.assertTrue(os.path.exists(filename),
"Default settings could not be saved")
self.assertNotEqual(settings.server_options.release_mode, new_release_mode,
"Unexpected default release mode")
# update host.yaml
settings.server_options.release_mode = new_release_mode
settings.save(filename)
self.assertFalse(os.path.exists(filename + ".tmp"),
"Temp file was not removed during save")
# read back host.yaml
settings = Settings(filename)
self.assertEqual(settings.server_options.release_mode, new_release_mode,
"Settings were not overwritten")

View File

@@ -1,6 +1,6 @@
import unittest
from BaseClasses import PlandoOptions
from BaseClasses import MultiWorld, PlandoOptions
from Options import ItemLinks
from worlds.AutoWorld import AutoWorldRegister
@@ -47,3 +47,15 @@ class TestOptions(unittest.TestCase):
self.assertIn("Bow", link.value[0]["item_pool"])
# TODO test that the group created using these options has the items
def test_item_links_resolve(self):
"""Test item link option resolves correctly."""
item_link_group = [{
"name": "ItemLinkTest",
"item_pool": ["Everything"],
"link_replacement": False,
"replacement_item": None,
}]
item_links = {1: ItemLinks.from_any(item_link_group), 2: ItemLinks.from_any(item_link_group)}
for link in item_links.values():
self.assertEqual(link.value[0], item_link_group[0])

View File

@@ -41,15 +41,15 @@ class TestBase(unittest.TestCase):
state = multiworld.get_all_state(False)
for location in multiworld.get_locations():
if location.name not in excluded:
with self.subTest("Location should be reached", location=location):
with self.subTest("Location should be reached", location=location.name):
self.assertTrue(location.can_reach(state), f"{location.name} unreachable")
for region in multiworld.get_regions():
if region.name in unreachable_regions:
with self.subTest("Region should be unreachable", region=region):
with self.subTest("Region should be unreachable", region=region.name):
self.assertFalse(region.can_reach(state))
else:
with self.subTest("Region should be reached", region=region):
with self.subTest("Region should be reached", region=region.name):
self.assertTrue(region.can_reach(state))
with self.subTest("Completion Condition"):

View File

@@ -69,7 +69,7 @@ class TestTwoPlayerMulti(MultiworldTestBase):
for world in AutoWorldRegister.world_types.values():
self.multiworld = setup_multiworld([world, world], ())
for world in self.multiworld.worlds.values():
world.options.accessibility.value = Accessibility.option_locations
world.options.accessibility.value = Accessibility.option_full
self.assertSteps(gen_steps)
with self.subTest("filling multiworld", seed=self.multiworld.seed):
distribute_items_restrictive(self.multiworld)

View File

@@ -0,0 +1,36 @@
import unittest
import typing
from uuid import uuid4
from flask import Flask
from flask.testing import FlaskClient
class TestBase(unittest.TestCase):
app: typing.ClassVar[Flask]
client: FlaskClient
@classmethod
def setUpClass(cls) -> None:
from WebHostLib import app as raw_app
from WebHost import get_app
raw_app.config["PONY"] = {
"provider": "sqlite",
"filename": ":memory:",
"create_db": True,
}
raw_app.config.update({
"TESTING": True,
"DEBUG": True,
})
try:
cls.app = get_app()
except AssertionError as e:
# since we only have 1 global app object, this might fail, but luckily all tests use the same config
if "register_blueprint" not in e.args[0]:
raise
cls.app = raw_app
def setUp(self) -> None:
self.client = self.app.test_client()

View File

@@ -1,31 +1,16 @@
import io
import unittest
import json
import yaml
from . import TestBase
class TestDocs(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
from WebHostLib import app as raw_app
from WebHost import get_app
raw_app.config["PONY"] = {
"provider": "sqlite",
"filename": ":memory:",
"create_db": True,
}
raw_app.config.update({
"TESTING": True,
})
app = get_app()
cls.client = app.test_client()
def test_correct_error_empty_request(self):
class TestAPIGenerate(TestBase):
def test_correct_error_empty_request(self) -> None:
response = self.client.post("/api/generate")
self.assertIn("No options found. Expected file attachment or json weights.", response.text)
def test_generation_queued_weights(self):
def test_generation_queued_weights(self) -> None:
options = {
"Tester1":
{
@@ -43,7 +28,7 @@ class TestDocs(unittest.TestCase):
self.assertTrue(json_data["text"].startswith("Generation of seed "))
self.assertTrue(json_data["text"].endswith(" started successfully."))
def test_generation_queued_file(self):
def test_generation_queued_file(self) -> None:
options = {
"game": "Archipelago",
"name": "Tester",

View File

@@ -0,0 +1,192 @@
import os
from uuid import UUID, uuid4, uuid5
from flask import url_for
from . import TestBase
class TestHostFakeRoom(TestBase):
room_id: UUID
log_filename: str
def setUp(self) -> None:
from pony.orm import db_session
from Utils import user_path
from WebHostLib.models import Room, Seed
super().setUp()
with self.client.session_transaction() as session:
session["_id"] = uuid4()
with db_session:
# create an empty seed and a room from it
seed = Seed(multidata=b"", owner=session["_id"])
room = Room(seed=seed, owner=session["_id"], tracker=uuid4())
self.room_id = room.id
self.log_filename = user_path("logs", f"{self.room_id}.txt")
def tearDown(self) -> None:
from pony.orm import db_session, select
from WebHostLib.models import Command, Room
with db_session:
for command in select(command for command in Command if command.room.id == self.room_id): # type: ignore
command.delete()
room: Room = Room.get(id=self.room_id)
room.seed.delete()
room.delete()
try:
os.unlink(self.log_filename)
except FileNotFoundError:
pass
def test_display_log_missing_full(self) -> None:
"""
Verify that we get a 200 response even if log is missing.
This is required to not get an error for fetch.
"""
with self.app.app_context(), self.app.test_request_context():
response = self.client.get(url_for("display_log", room=self.room_id))
self.assertEqual(response.status_code, 200)
def test_display_log_missing_range(self) -> None:
"""
Verify that we get a full response for missing log even if we asked for range.
This is required for the JS logic to differentiate between log update and log error message.
"""
with self.app.app_context(), self.app.test_request_context():
response = self.client.get(url_for("display_log", room=self.room_id), headers={
"Range": "bytes=100-"
})
self.assertEqual(response.status_code, 200)
def test_display_log_denied(self) -> None:
"""Verify that only the owner can see the log."""
other_client = self.app.test_client()
with self.app.app_context(), self.app.test_request_context():
response = other_client.get(url_for("display_log", room=self.room_id))
self.assertEqual(response.status_code, 403)
def test_display_log_missing_room(self) -> None:
"""Verify log for missing room gives an error as opposed to missing log for existing room."""
missing_room_id = uuid5(uuid4(), "") # rooms are always uuid4, so this can't exist
other_client = self.app.test_client()
with self.app.app_context(), self.app.test_request_context():
response = other_client.get(url_for("display_log", room=missing_room_id))
self.assertEqual(response.status_code, 404)
def test_display_log_full(self) -> None:
"""Verify full log response."""
with open(self.log_filename, "w", encoding="utf-8") as f:
text = "x" * 200
f.write(text)
with self.app.app_context(), self.app.test_request_context():
response = self.client.get(url_for("display_log", room=self.room_id))
self.assertEqual(response.status_code, 200)
self.assertEqual(response.get_data(True), text)
def test_display_log_range(self) -> None:
"""Verify that Range header in request gives a range in response."""
with open(self.log_filename, "w", encoding="utf-8") as f:
f.write(" " * 100)
text = "x" * 100
f.write(text)
with self.app.app_context(), self.app.test_request_context():
response = self.client.get(url_for("display_log", room=self.room_id), headers={
"Range": "bytes=100-"
})
self.assertEqual(response.status_code, 206)
self.assertEqual(response.get_data(True), text)
def test_display_log_range_bom(self) -> None:
"""Verify that a BOM in the log file is skipped for range."""
with open(self.log_filename, "w", encoding="utf-8-sig") as f:
f.write(" " * 100)
text = "x" * 100
f.write(text)
self.assertEqual(f.tell(), 203) # including BOM
with self.app.app_context(), self.app.test_request_context():
response = self.client.get(url_for("display_log", room=self.room_id), headers={
"Range": "bytes=100-"
})
self.assertEqual(response.status_code, 206)
self.assertEqual(response.get_data(True), text)
def test_host_room_missing(self) -> None:
"""Verify that missing room gives a 404 response."""
missing_room_id = uuid5(uuid4(), "") # rooms are always uuid4, so this can't exist
with self.app.app_context(), self.app.test_request_context():
response = self.client.get(url_for("host_room", room=missing_room_id))
self.assertEqual(response.status_code, 404)
def test_host_room_own(self) -> None:
"""Verify that own room gives the full output."""
with open(self.log_filename, "w", encoding="utf-8-sig") as f:
text = "* should be visible *"
f.write(text)
with self.app.app_context(), self.app.test_request_context():
response = self.client.get(url_for("host_room", room=self.room_id))
response_text = response.get_data(True)
self.assertEqual(response.status_code, 200)
self.assertIn("href=\"/seed/", response_text)
self.assertIn(text, response_text)
def test_host_room_other(self) -> None:
"""Verify that non-own room gives the reduced output."""
from pony.orm import db_session
from WebHostLib.models import Room
with db_session:
room: Room = Room.get(id=self.room_id)
room.last_port = 12345
with open(self.log_filename, "w", encoding="utf-8-sig") as f:
text = "* should not be visible *"
f.write(text)
other_client = self.app.test_client()
with self.app.app_context(), self.app.test_request_context():
response = other_client.get(url_for("host_room", room=self.room_id))
response_text = response.get_data(True)
self.assertEqual(response.status_code, 200)
self.assertNotIn("href=\"/seed/", response_text)
self.assertNotIn(text, response_text)
self.assertIn("/connect ", response_text)
self.assertIn(":12345", response_text)
def test_host_room_own_post(self) -> None:
"""Verify command from owner gets queued for the server and response is redirect."""
from pony.orm import db_session, select
from WebHostLib.models import Command
with self.app.app_context(), self.app.test_request_context():
response = self.client.post(url_for("host_room", room=self.room_id), data={
"cmd": "/help"
})
self.assertEqual(response.status_code, 302, response.text)\
with db_session:
commands = select(command for command in Command if command.room.id == self.room_id) # type: ignore
self.assertIn("/help", (command.commandtext for command in commands))
def test_host_room_other_post(self) -> None:
"""Verify command from non-owner does not get queued for the server."""
from pony.orm import db_session, select
from WebHostLib.models import Command
other_client = self.app.test_client()
with self.app.app_context(), self.app.test_request_context():
response = other_client.post(url_for("host_room", room=self.room_id), data={
"cmd": "/help"
})
self.assertLess(response.status_code, 500)
with db_session:
commands = select(command for command in Command if command.room.id == self.room_id) # type: ignore
self.assertNotIn("/help", (command.commandtext for command in commands))

View File

@@ -280,7 +280,7 @@ class World(metaclass=AutoWorldRegister):
future. Protocol level compatibility check moved to MultiServer.min_client_version.
"""
required_server_version: Tuple[int, int, int] = (0, 2, 4)
required_server_version: Tuple[int, int, int] = (0, 5, 0)
"""update this if the resulting multidata breaks forward-compatibility of the server"""
hint_blacklist: ClassVar[FrozenSet[str]] = frozenset()

View File

@@ -73,7 +73,12 @@ class WorldSource:
else: # TODO: remove with 3.8 support
mod = importer.load_module(os.path.basename(self.path).rsplit(".", 1)[0])
mod.__package__ = f"worlds.{mod.__package__}"
if mod.__package__ is not None:
mod.__package__ = f"worlds.{mod.__package__}"
else:
# load_module does not populate package, we'll have to assume mod.__name__ is correct here
# probably safe to remove with 3.8 support
mod.__package__ = f"worlds.{mod.__name__}"
mod.__name__ = f"worlds.{mod.__name__}"
sys.modules[mod.__name__] = mod
with warnings.catch_warnings():

View File

@@ -1,7 +1,5 @@
from worlds.adventure import location_table
from worlds.adventure.Options import BatLogic, DifficultySwitchB, DifficultySwitchA
from .Options import BatLogic, DifficultySwitchB
from worlds.generic.Rules import add_rule, set_rule, forbid_item
from BaseClasses import LocationProgressType
def set_rules(self) -> None:

View File

@@ -39,7 +39,7 @@ def create_itempool(world: "HatInTimeWorld") -> List[Item]:
continue
else:
if name == "Scooter Badge":
if world.options.CTRLogic is CTRLogic.option_scooter or get_difficulty(world) >= Difficulty.MODERATE:
if world.options.CTRLogic == CTRLogic.option_scooter or get_difficulty(world) >= Difficulty.MODERATE:
item_type = ItemClassification.progression
elif name == "No Bonk Badge" and world.is_dw():
item_type = ItemClassification.progression

View File

@@ -292,6 +292,9 @@ blacklisted_combos = {
# See above comment
"Time Rift - Deep Sea": ["Alpine Free Roam", "Nyakuza Free Roam", "Contractual Obligations",
"Murder on the Owl Express"],
# was causing test failures
"Time Rift - Balcony": ["Alpine Free Roam"],
}
@@ -656,6 +659,10 @@ def is_valid_act_combo(world: "HatInTimeWorld", entrance_act: Region,
if exit_act.name not in chapter_finales:
return False
exit_chapter: str = act_chapters.get(exit_act.name)
# make sure that certain time rift combinations never happen
always_block: bool = exit_chapter != "Mafia Town" and exit_chapter != "Subcon Forest"
if not ignore_certain_rules or always_block:
if entrance_act.name in rift_access_regions and exit_act.name in rift_access_regions[entrance_act.name]:
return False
@@ -681,9 +688,12 @@ def is_valid_first_act(world: "HatInTimeWorld", act: Region) -> bool:
if act.name not in guaranteed_first_acts:
return False
if world.options.ActRandomizer == ActRandomizer.option_light and "Time Rift" in act.name:
return False
# If there's only a single level in the starting chapter, only allow Mafia Town or Subcon Forest levels
start_chapter = world.options.StartingChapter
if start_chapter is ChapterIndex.ALPINE or start_chapter is ChapterIndex.SUBCON:
if start_chapter == ChapterIndex.ALPINE or start_chapter == ChapterIndex.SUBCON:
if "Time Rift" in act.name:
return False
@@ -720,7 +730,8 @@ def is_valid_first_act(world: "HatInTimeWorld", act: Region) -> bool:
elif act.name == "Contractual Obligations" and world.options.ShuffleSubconPaintings:
return False
if world.options.ShuffleSubconPaintings and act_chapters.get(act.name, "") == "Subcon Forest":
if world.options.ShuffleSubconPaintings and "Time Rift" not in act.name \
and act_chapters.get(act.name, "") == "Subcon Forest":
# Only allow Subcon levels if painting skips are allowed
if diff < Difficulty.MODERATE or world.options.NoPaintingSkips:
return False

View File

@@ -1,7 +1,6 @@
from worlds.AutoWorld import CollectionState
from worlds.generic.Rules import add_rule, set_rule
from .Locations import location_table, zipline_unlocks, is_location_valid, contract_locations, \
shop_locations, event_locs
from .Locations import location_table, zipline_unlocks, is_location_valid, shop_locations, event_locs
from .Types import HatType, ChapterIndex, hat_type_to_item, Difficulty, HitType
from BaseClasses import Location, Entrance, Region
from typing import TYPE_CHECKING, List, Callable, Union, Dict
@@ -148,14 +147,14 @@ def set_rules(world: "HatInTimeWorld"):
if world.is_dlc1():
chapter_list.append(ChapterIndex.CRUISE)
if world.is_dlc2() and final_chapter is not ChapterIndex.METRO:
if world.is_dlc2() and final_chapter != ChapterIndex.METRO:
chapter_list.append(ChapterIndex.METRO)
chapter_list.remove(starting_chapter)
world.random.shuffle(chapter_list)
# Make sure Alpine is unlocked before any DLC chapters are, as the Alpine door needs to be open to access them
if starting_chapter is not ChapterIndex.ALPINE and (world.is_dlc1() or world.is_dlc2()):
if starting_chapter != ChapterIndex.ALPINE and (world.is_dlc1() or world.is_dlc2()):
index1 = 69
index2 = 69
pos: int
@@ -165,7 +164,7 @@ def set_rules(world: "HatInTimeWorld"):
if world.is_dlc1():
index1 = chapter_list.index(ChapterIndex.CRUISE)
if world.is_dlc2() and final_chapter is not ChapterIndex.METRO:
if world.is_dlc2() and final_chapter != ChapterIndex.METRO:
index2 = chapter_list.index(ChapterIndex.METRO)
lowest_index = min(index1, index2)
@@ -242,9 +241,6 @@ def set_rules(world: "HatInTimeWorld"):
if not is_location_valid(world, key):
continue
if key in contract_locations.keys():
continue
loc = world.multiworld.get_location(key, world.player)
for hat in data.required_hats:
@@ -256,7 +252,7 @@ def set_rules(world: "HatInTimeWorld"):
if data.paintings > 0 and world.options.ShuffleSubconPaintings:
add_rule(loc, lambda state, paintings=data.paintings: has_paintings(state, world, paintings))
if data.hit_type is not HitType.none and world.options.UmbrellaLogic:
if data.hit_type != HitType.none and world.options.UmbrellaLogic:
if data.hit_type == HitType.umbrella:
add_rule(loc, lambda state: state.has("Umbrella", world.player))
@@ -518,7 +514,7 @@ def set_hard_rules(world: "HatInTimeWorld"):
lambda state: can_use_hat(state, world, HatType.ICE))
# Hard: clear Rush Hour with Brewing Hat only
if world.options.NoTicketSkips is not NoTicketSkips.option_true:
if world.options.NoTicketSkips != NoTicketSkips.option_true:
set_rule(world.multiworld.get_location("Act Completion (Rush Hour)", world.player),
lambda state: can_use_hat(state, world, HatType.BREWING))
else:
@@ -863,6 +859,8 @@ def set_rift_rules(world: "HatInTimeWorld", regions: Dict[str, Region]):
if world.is_dlc1():
for entrance in regions["Time Rift - Balcony"].entrances:
add_rule(entrance, lambda state: can_clear_required_act(state, world, "The Arctic Cruise - Finale"))
reg_act_connection(world, world.multiworld.get_entrance("The Arctic Cruise - Finale",
world.player).connected_region, entrance)
for entrance in regions["Time Rift - Deep Sea"].entrances:
add_rule(entrance, lambda state: has_relic_combo(state, world, "Cake"))
@@ -939,6 +937,7 @@ def set_default_rift_rules(world: "HatInTimeWorld"):
if world.is_dlc1():
for entrance in world.multiworld.get_region("Time Rift - Balcony", world.player).entrances:
add_rule(entrance, lambda state: can_clear_required_act(state, world, "The Arctic Cruise - Finale"))
reg_act_connection(world, "Rock the Boat", entrance.name)
for entrance in world.multiworld.get_region("Time Rift - Deep Sea", world.player).entrances:
add_rule(entrance, lambda state: has_relic_combo(state, world, "Cake"))

View File

@@ -1,15 +1,16 @@
from BaseClasses import Item, ItemClassification, Tutorial, Location, MultiWorld
from .Items import item_table, create_item, relic_groups, act_contracts, create_itempool, get_shop_trap_name, \
calculate_yarn_costs
calculate_yarn_costs, alps_hooks
from .Regions import create_regions, randomize_act_entrances, chapter_act_info, create_events, get_shuffled_region
from .Locations import location_table, contract_locations, is_location_valid, get_location_names, TASKSANITY_START_ID, \
get_total_locations
from .Rules import set_rules
from .Rules import set_rules, has_paintings
from .Options import AHITOptions, slot_data_options, adjust_options, RandomizeHatOrder, EndGoal, create_option_groups
from .Types import HatType, ChapterIndex, HatInTimeItem, hat_type_to_item
from .Types import HatType, ChapterIndex, HatInTimeItem, hat_type_to_item, Difficulty
from .DeathWishLocations import create_dw_regions, dw_classes, death_wishes
from .DeathWishRules import set_dw_rules, create_enemy_events, hit_list, bosses
from worlds.AutoWorld import World, WebWorld, CollectionState
from worlds.generic.Rules import add_rule
from typing import List, Dict, TextIO
from worlds.LauncherComponents import Component, components, icon_paths, launch_subprocess, Type
from Utils import local_path
@@ -86,19 +87,27 @@ class HatInTimeWorld(World):
if self.is_dw_only():
return
# If our starting chapter is 4 and act rando isn't on, force hookshot into inventory
# If starting chapter is 3 and painting shuffle is enabled, and act rando isn't, give one free painting unlock
start_chapter: ChapterIndex = ChapterIndex(self.options.StartingChapter)
# Take care of some extremely restrictive starts in other chapters with act shuffle off
if not self.options.ActRandomizer:
start_chapter = self.options.StartingChapter
if start_chapter == ChapterIndex.ALPINE:
self.multiworld.push_precollected(self.create_item("Hookshot Badge"))
if self.options.UmbrellaLogic:
self.multiworld.push_precollected(self.create_item("Umbrella"))
if start_chapter == ChapterIndex.ALPINE or start_chapter == ChapterIndex.SUBCON:
if not self.options.ActRandomizer:
if start_chapter == ChapterIndex.ALPINE:
self.multiworld.push_precollected(self.create_item("Hookshot Badge"))
if self.options.UmbrellaLogic:
self.multiworld.push_precollected(self.create_item("Umbrella"))
if start_chapter == ChapterIndex.SUBCON and self.options.ShuffleSubconPaintings:
if self.options.ShuffleAlpineZiplines:
ziplines = list(alps_hooks.keys())
ziplines.remove("Zipline Unlock - The Twilight Bell Path") # not enough checks from this one
self.multiworld.push_precollected(self.create_item(self.random.choice(ziplines)))
elif start_chapter == ChapterIndex.SUBCON:
if self.options.ShuffleSubconPaintings:
self.multiworld.push_precollected(self.create_item("Progressive Painting Unlock"))
elif start_chapter == ChapterIndex.BIRDS:
if self.options.UmbrellaLogic:
if self.options.LogicDifficulty < Difficulty.EXPERT:
self.multiworld.push_precollected(self.create_item("Umbrella"))
elif self.options.LogicDifficulty < Difficulty.MODERATE:
self.multiworld.push_precollected(self.create_item("Umbrella"))
def create_regions(self):
# noinspection PyClassVar
@@ -119,7 +128,10 @@ class HatInTimeWorld(World):
# place vanilla contract locations if contract shuffle is off
if not self.options.ShuffleActContracts:
for name in contract_locations.keys():
self.multiworld.get_location(name, self.player).place_locked_item(create_item(self, name))
loc = self.get_location(name)
loc.place_locked_item(create_item(self, name))
if self.options.ShuffleSubconPaintings and loc.name != "Snatcher's Contract - The Subcon Well":
add_rule(loc, lambda state: has_paintings(state, self, 1))
def create_items(self):
if self.has_yarn():
@@ -317,7 +329,7 @@ class HatInTimeWorld(World):
def remove(self, state: "CollectionState", item: "Item") -> bool:
old_count: int = state.count(item.name, self.player)
change = super().collect(state, item)
change = super().remove(state, item)
if change and old_count == 1:
if "Stamp" in item.name:
if "2 Stamp" in item.name:

View File

@@ -12,41 +12,29 @@
## Instructions
1. Have Steam running. Open the Steam console with this link: [steam://open/console](steam://open/console)
This may not work for some browsers. If that's the case, and you're on Windows, open the Run dialog using Win+R,
paste the link into the box, and hit Enter.
1. **BACK UP YOUR SAVE FILES IN YOUR MAIN INSTALL IF YOU CARE ABOUT THEM!!!**
Go to `steamapps/common/HatinTime/HatinTimeGame/SaveData/` and copy everything inside that folder over to a safe place.
**This is important! Changing the game version CAN and WILL break your existing save files!!!**
2. In the Steam console, enter the following command:
`download_depot 253230 253232 7770543545116491859`. ***Wait for the console to say the download is finished!***
This can take a while to finish (30+ minutes) depending on your connection speed, so please be patient. Additionally,
**try to prevent your connection from being interrupted or slowed while Steam is downloading the depot,**
or else the download may potentially become corrupted (see first FAQ issue below).
2. In your Steam library, right-click on **A Hat in Time** in the list of games and click on **Properties**.
3. Once the download finishes, go to `steamapps/content/app_253230` in Steam's program folder.
3. Click the **Betas** tab. In the **Beta Participation** dropdown, select `tcplink`.
While it downloads, you can subscribe to the [Archipelago workshop mod.]((https://steamcommunity.com/sharedfiles/filedetails/?id=3026842601))
4. There should be a folder named `depot_253232`. Rename it to HatinTime_AP and move it to your `steamapps/common` folder.
4. Once the game finishes downloading, start it up.
In Game Settings, make sure **Enable Developer Console** is checked.
5. In the HatinTime_AP folder, navigate to `Binaries/Win64` and create a new file: `steam_appid.txt`.
In this new text file, input the number **253230** on the first line.
6. Create a shortcut of `HatinTimeGame.exe` from that folder and move it to wherever you'd like.
You will use this shortcut to open the Archipelago-compatible version of A Hat in Time.
7. Start up the game using your new shortcut. To confirm if you are on the correct version,
go to Settings -> Game Settings. If you don't see an option labelled ***Live Game Events*** you should be running
the correct version of the game. In Game Settings, make sure ***Enable Developer Console*** is checked.
5. You should now be good to go. See below for more details on how to use the mod and connect to an Archipelago game.
## Connecting to the Archipelago server
To connect to the multiworld server, simply run the **ArchipelagoAHITClient**
(or run it from the Launcher if you have the apworld installed) and connect it to the Archipelago server.
To connect to the multiworld server, simply run the **Archipelago AHIT Client** from the Launcher
and connect it to the Archipelago server.
The game will connect to the client automatically when you create a new save file.
@@ -61,33 +49,8 @@ make sure ***Enable Developer Console*** is checked in Game Settings and press t
## FAQ/Common Issues
### I followed the setup, but I receive an odd error message upon starting the game or creating a save file!
If you receive an error message such as
**"Failed to find default engine .ini to retrieve My Documents subdirectory to use. Force quitting."** or
**"Failed to load map "hub_spaceship"** after booting up the game or creating a save file respectively, then the depot
download was likely corrupted. The only way to fix this is to start the entire download all over again.
Unfortunately, this appears to be an underlying issue with Steam's depot downloader. The only way to really prevent this
from happening is to ensure that your connection is not interrupted or slowed while downloading.
### The game keeps crashing on startup after the splash screen!
This issue is unfortunately very hard to fix, and the underlying cause is not known. If it does happen however,
try the following:
- Close Steam **entirely**.
- Open the downpatched version of the game (with Steam closed) and allow it to load to the titlescreen.
- Close the game, and then open Steam again.
- After launching the game, the issue should hopefully disappear. If not, repeat the above steps until it does.
### I followed the setup, but "Live Game Events" still shows up in the options menu!
The most common cause of this is the `steam_appid.txt` file. If you're on Windows 10, file extensions are hidden by
default (thanks Microsoft). You likely made the mistake of still naming the file `steam_appid.txt`, which, since file
extensions are hidden, would result in the file being named `steam_appid.txt.txt`, which is incorrect.
To show file extensions in Windows 10, open any folder, click the View tab at the top, and check
"File name extensions". Then you can correct the name of the file. If the name of the file is correct,
and you're still running into the issue, re-read the setup guide again in case you missed a step.
If you still can't get it to work, ask for help in the Discord thread.
### The game is running on the older version, but it's not connecting when starting a new save!
### The game is not connecting when starting a new save!
For unknown reasons, the mod will randomly disable itself in the mod menu. To fix this, go to the Mods menu
(rocket icon) in-game, and re-enable the mod.

View File

@@ -682,7 +682,7 @@ def get_alttp_settings(romfile: str):
if 'yes' in choice:
import LttPAdjuster
from worlds.alttp.Rom import get_base_rom_path
from .Rom import get_base_rom_path
last_settings.rom = romfile
last_settings.baserom = get_base_rom_path()
last_settings.world = None

View File

@@ -1437,7 +1437,7 @@ def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
invalid_cave_connections = defaultdict(set)
if world.glitches_required[player] in ['overworld_glitches', 'hybrid_major_glitches', 'no_logic']:
from worlds.alttp import OverworldGlitchRules
from . import OverworldGlitchRules
for entrance in OverworldGlitchRules.get_non_mandatory_exits(world.mode[player] == 'inverted'):
invalid_connections[entrance] = set()
if entrance in must_be_exits:

View File

@@ -1,8 +1,8 @@
import typing
from BaseClasses import MultiWorld
from Options import Choice, Range, Option, Toggle, DefaultOnToggle, DeathLink, \
StartInventoryPool, PlandoBosses, PlandoConnections, PlandoTexts, FreeText, Removed
from Options import Choice, Range, DeathLink, DefaultOnToggle, FreeText, ItemsAccessibility, Option, \
PlandoBosses, PlandoConnections, PlandoTexts, Removed, StartInventoryPool, Toggle
from .EntranceShuffle import default_connections, default_dungeon_connections, \
inverted_default_connections, inverted_default_dungeon_connections
from .Text import TextTable
@@ -486,7 +486,7 @@ class LTTPBosses(PlandoBosses):
@classmethod
def can_place_boss(cls, boss: str, location: str) -> bool:
from worlds.alttp.Bosses import can_place_boss
from .Bosses import can_place_boss
level = ''
words = location.split(" ")
if words[-1] in ("top", "middle", "bottom"):
@@ -743,6 +743,7 @@ class ALttPPlandoTexts(PlandoTexts):
alttp_options: typing.Dict[str, type(Option)] = {
"accessibility": ItemsAccessibility,
"plando_connections": ALttPPlandoConnections,
"plando_texts": ALttPPlandoTexts,
"start_inventory_from_pool": StartInventoryPool,

View File

@@ -406,7 +406,7 @@ def create_dungeon_region(world: MultiWorld, player: int, name: str, hint: str,
def _create_region(world: MultiWorld, player: int, name: str, type: LTTPRegionType, hint: str, locations=None,
exits=None):
from worlds.alttp.SubClasses import ALttPLocation
from .SubClasses import ALttPLocation
ret = LTTPRegion(name, type, hint, player, world)
if exits:
for exit in exits:
@@ -760,7 +760,7 @@ location_table: typing.Dict[str,
'Turtle Rock - Prize': (
[0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708], None, True, 'Turtle Rock')}
from worlds.alttp.Shops import shop_table_by_location_id, shop_table_by_location
from .Shops import shop_table_by_location_id, shop_table_by_location
lookup_id_to_name = {data[0]: name for name, data in location_table.items() if type(data[0]) == int}
lookup_id_to_name = {**lookup_id_to_name, **{data[1]: name for name, data in key_drop_data.items()}}
lookup_id_to_name.update(shop_table_by_location_id)

View File

@@ -2,6 +2,7 @@ import collections
import logging
from typing import Iterator, Set
from Options import ItemsAccessibility
from BaseClasses import Entrance, MultiWorld
from worlds.generic.Rules import (add_item_rule, add_rule, forbid_item,
item_name_in_location_names, location_item_name, set_rule, allow_self_locking_items)
@@ -39,7 +40,7 @@ def set_rules(world):
else:
# Set access rules according to max glitches for multiworld progression.
# Set accessibility to none, and shuffle assuming the no logic players can always win
world.accessibility[player] = world.accessibility[player].from_text("minimal")
world.accessibility[player].value = ItemsAccessibility.option_minimal
world.progression_balancing[player].value = 0
else:
@@ -377,7 +378,7 @@ def global_rules(multiworld: MultiWorld, player: int):
or state.has("Cane of Somaria", player)))
set_rule(multiworld.get_location('Tower of Hera - Big Chest', player), lambda state: state.has('Big Key (Tower of Hera)', player))
set_rule(multiworld.get_location('Tower of Hera - Big Key Chest', player), lambda state: has_fire_source(state, player))
if multiworld.accessibility[player] != 'locations':
if multiworld.accessibility[player] != 'full':
set_always_allow(multiworld.get_location('Tower of Hera - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Tower of Hera)' and item.player == player)
set_rule(multiworld.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Flippers', player) and state.has('Open Floodgate', player))
@@ -393,7 +394,7 @@ def global_rules(multiworld: MultiWorld, player: int):
if state.has('Hookshot', player)
else state._lttp_has_key('Small Key (Swamp Palace)', player, 4))
set_rule(multiworld.get_location('Swamp Palace - Big Chest', player), lambda state: state.has('Big Key (Swamp Palace)', player))
if multiworld.accessibility[player] != 'locations':
if multiworld.accessibility[player] != 'full':
allow_self_locking_items(multiworld.get_location('Swamp Palace - Big Chest', player), 'Big Key (Swamp Palace)')
set_rule(multiworld.get_entrance('Swamp Palace (North)', player), lambda state: state.has('Hookshot', player) and state._lttp_has_key('Small Key (Swamp Palace)', player, 5))
if not multiworld.small_key_shuffle[player] and multiworld.glitches_required[player] not in ['hybrid_major_glitches', 'no_logic']:
@@ -405,16 +406,14 @@ def global_rules(multiworld: MultiWorld, player: int):
set_rule(multiworld.get_location('Swamp Palace - Waterway Pot Key', player), lambda state: can_use_bombs(state, player))
set_rule(multiworld.get_entrance('Thieves Town Big Key Door', player), lambda state: state.has('Big Key (Thieves Town)', player))
if multiworld.worlds[player].dungeons["Thieves Town"].boss.enemizer_name == "Blind":
set_rule(multiworld.get_entrance('Blind Fight', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3) and can_use_bombs(state, player))
set_rule(multiworld.get_location('Thieves\' Town - Big Chest', player),
lambda state: ((state._lttp_has_key('Small Key (Thieves Town)', player, 3)) or (location_item_name(state, 'Thieves\' Town - Big Chest', player) == ("Small Key (Thieves Town)", player)) and state._lttp_has_key('Small Key (Thieves Town)', player, 2)) and state.has('Hammer', player))
set_rule(multiworld.get_location('Thieves\' Town - Blind\'s Cell', player),
lambda state: state._lttp_has_key('Small Key (Thieves Town)', player))
if multiworld.accessibility[player] != 'locations' and not multiworld.key_drop_shuffle[player]:
set_always_allow(multiworld.get_location('Thieves\' Town - Big Chest', player), lambda state, item: item.name == 'Small Key (Thieves Town)' and item.player == player)
set_rule(multiworld.get_location('Thieves\' Town - Attic', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3))
set_rule(multiworld.get_location('Thieves\' Town - Spike Switch Pot Key', player),
lambda state: state._lttp_has_key('Small Key (Thieves Town)', player))
@@ -425,7 +424,7 @@ def global_rules(multiworld: MultiWorld, player: int):
set_rule(multiworld.get_entrance('Skull Woods First Section West Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
set_rule(multiworld.get_entrance('Skull Woods First Section (Left) Door to Exit', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
set_rule(multiworld.get_location('Skull Woods - Big Chest', player), lambda state: state.has('Big Key (Skull Woods)', player) and can_use_bombs(state, player))
if multiworld.accessibility[player] != 'locations':
if multiworld.accessibility[player] != 'full':
allow_self_locking_items(multiworld.get_location('Skull Woods - Big Chest', player), 'Big Key (Skull Woods)')
set_rule(multiworld.get_entrance('Skull Woods Torch Room', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 4) and state.has('Fire Rod', player) and has_sword(state, player)) # sword required for curtain
add_rule(multiworld.get_location('Skull Woods - Prize', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
@@ -490,7 +489,7 @@ def global_rules(multiworld: MultiWorld, player: int):
set_rule(multiworld.get_location('Turtle Rock - Roller Room - Right', player), lambda state: state.has('Cane of Somaria', player) and state.has('Fire Rod', player))
set_rule(multiworld.get_location('Turtle Rock - Big Chest', player), lambda state: state.has('Big Key (Turtle Rock)', player) and (state.has('Cane of Somaria', player) or state.has('Hookshot', player)))
set_rule(multiworld.get_entrance('Turtle Rock (Big Chest) (North)', player), lambda state: state.has('Cane of Somaria', player) or state.has('Hookshot', player))
set_rule(multiworld.get_entrance('Turtle Rock Big Key Door', player), lambda state: state.has('Big Key (Turtle Rock)', player) and can_kill_most_things(state, player, 10))
set_rule(multiworld.get_entrance('Turtle Rock Big Key Door', player), lambda state: state.has('Big Key (Turtle Rock)', player) and can_kill_most_things(state, player, 10) and can_bomb_or_bonk(state, player))
set_rule(multiworld.get_location('Turtle Rock - Chain Chomps', player), lambda state: can_use_bombs(state, player) or can_shoot_arrows(state, player)
or has_beam_sword(state, player) or state.has_any(["Blue Boomerang", "Red Boomerang", "Hookshot", "Cane of Somaria", "Fire Rod", "Ice Rod"], player))
set_rule(multiworld.get_entrance('Turtle Rock (Dark Room) (North)', player), lambda state: state.has('Cane of Somaria', player))
@@ -524,12 +523,12 @@ def global_rules(multiworld: MultiWorld, player: int):
set_rule(multiworld.get_entrance('Palace of Darkness Big Key Chest Staircase', player), lambda state: can_use_bombs(state, player) and (state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or (
location_item_name(state, 'Palace of Darkness - Big Key Chest', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 3))))
if multiworld.accessibility[player] != 'locations':
if multiworld.accessibility[player] != 'full':
set_always_allow(multiworld.get_location('Palace of Darkness - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5))
set_rule(multiworld.get_entrance('Palace of Darkness Spike Statue Room Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or (
location_item_name(state, 'Palace of Darkness - Harmless Hellway', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 4)))
if multiworld.accessibility[player] != 'locations':
if multiworld.accessibility[player] != 'full':
set_always_allow(multiworld.get_location('Palace of Darkness - Harmless Hellway', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5))
set_rule(multiworld.get_entrance('Palace of Darkness Maze Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6))
@@ -1202,7 +1201,7 @@ def set_trock_key_rules(world, player):
# Must not go in the Chain Chomps chest - only 2 other chests available and 3+ keys required for all other chests
forbid_item(world.get_location('Turtle Rock - Chain Chomps', player), 'Big Key (Turtle Rock)', player)
forbid_item(world.get_location('Turtle Rock - Pokey 2 Key Drop', player), 'Big Key (Turtle Rock)', player)
if world.accessibility[player] == 'locations':
if world.accessibility[player] == 'full':
if world.big_key_shuffle[player] and can_reach_big_chest:
# Must not go in the dungeon - all 3 available chests (Chomps, Big Chest, Crystaroller) must be keys to access laser bridge, and the big key is required first
for location in ['Turtle Rock - Chain Chomps', 'Turtle Rock - Compass Chest',
@@ -1216,7 +1215,7 @@ def set_trock_key_rules(world, player):
location.place_locked_item(item)
toss_junk_item(world, player)
if world.accessibility[player] != 'locations':
if world.accessibility[player] != 'full':
set_always_allow(world.get_location('Turtle Rock - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Turtle Rock)' and item.player == player
and state.can_reach(state.multiworld.get_region('Turtle Rock (Second Section)', player)))

View File

@@ -76,10 +76,6 @@ class ALttPItem(Item):
if self.type in {"SmallKey", "BigKey", "Map", "Compass"}:
return self.type
@property
def locked_dungeon_item(self):
return self.location.locked and self.dungeon_item
class LTTPRegionType(IntEnum):
LightWorld = 1

View File

@@ -37,7 +37,8 @@ class TestThievesTown(TestDungeon):
["Thieves' Town - Blind's Cell", False, []],
["Thieves' Town - Blind's Cell", False, [], ['Big Key (Thieves Town)']],
["Thieves' Town - Blind's Cell", True, ['Big Key (Thieves Town)']],
["Thieves' Town - Blind's Cell", False, [], ['Small Key (Thieves Town)']],
["Thieves' Town - Blind's Cell", True, ['Big Key (Thieves Town)', 'Small Key (Thieves Town)']],
["Thieves' Town - Boss", False, []],
["Thieves' Town - Boss", False, [], ['Big Key (Thieves Town)']],

View File

@@ -1,11 +1,11 @@
from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool
from worlds.alttp.Dungeons import get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import link_inverted_entrances
from worlds.alttp.InvertedRegions import create_inverted_regions
from worlds.alttp.ItemPool import difficulties
from worlds.alttp.Items import item_factory
from worlds.alttp.Regions import mark_light_world_regions
from worlds.alttp.Shops import create_shops
from test.TestBase import TestBase
from test.bases import TestBase
from worlds.alttp.test import LTTPTestBase

View File

@@ -6,7 +6,7 @@ from worlds.alttp.Items import item_factory
from worlds.alttp.Options import GlitchesRequired
from worlds.alttp.Regions import mark_light_world_regions
from worlds.alttp.Shops import create_shops
from test.TestBase import TestBase
from test.bases import TestBase
from worlds.alttp.test import LTTPTestBase

View File

@@ -6,7 +6,7 @@ from worlds.alttp.Items import item_factory
from worlds.alttp.Options import GlitchesRequired
from worlds.alttp.Regions import mark_light_world_regions
from worlds.alttp.Shops import create_shops
from test.TestBase import TestBase
from test.bases import TestBase
from worlds.alttp.test import LTTPTestBase

View File

@@ -99,7 +99,7 @@ item_table = {
"Mutant Costume": ItemData(698020, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mutant_costume
"Baby Nautilus": ItemData(698021, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_nautilus
"Baby Piranha": ItemData(698022, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_piranha
"Arnassi Armor": ItemData(698023, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_seahorse_costume
"Arnassi Armor": ItemData(698023, 1, ItemType.PROGRESSION, ItemGroup.UTILITY), # collectible_seahorse_costume
"Seed Bag": ItemData(698024, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_seed_bag
"King's Skull": ItemData(698025, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_skull
"Song Plant Spore": ItemData(698026, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_spore_seed

View File

@@ -30,7 +30,7 @@ class AquariaLocations:
locations_verse_cave_r = {
"Verse Cave, bulb in the skeleton room": 698107,
"Verse Cave, bulb in the path left of the skeleton room": 698108,
"Verse Cave, bulb in the path right of the skeleton room": 698108,
"Verse Cave right area, Big Seed": 698175,
}
@@ -45,7 +45,7 @@ class AquariaLocations:
"Home Water, bulb below the grouper fish": 698058,
"Home Water, bulb in the path below Nautilus Prime": 698059,
"Home Water, bulb in the little room above the grouper fish": 698060,
"Home Water, bulb in the end of the left path from the Verse Cave": 698061,
"Home Water, bulb in the end of the path close to the Verse Cave": 698061,
"Home Water, bulb in the top left path": 698062,
"Home Water, bulb in the bottom left room": 698063,
"Home Water, bulb close to Naija's Home": 698064,
@@ -67,7 +67,7 @@ class AquariaLocations:
locations_song_cave = {
"Song Cave, Erulian spirit": 698206,
"Song Cave, bulb in the top left part": 698071,
"Song Cave, bulb in the top right part": 698071,
"Song Cave, bulb in the big anemone room": 698072,
"Song Cave, bulb in the path to the singing statues": 698073,
"Song Cave, bulb under the rock in the path to the singing statues": 698074,
@@ -122,6 +122,7 @@ class AquariaLocations:
"Open Water top right area, second urn in the Mithalas exit": 698149,
"Open Water top right area, third urn in the Mithalas exit": 698150,
}
locations_openwater_tr_turtle = {
"Open Water top right area, bulb in the turtle room": 698009,
"Open Water top right area, Transturtle": 698211,
@@ -151,6 +152,9 @@ class AquariaLocations:
locations_arnassi_path = {
"Arnassi Ruins, Arnassi Statue": 698164,
}
locations_arnassi_cave_transturtle = {
"Arnassi Ruins, Transturtle": 698217,
}
@@ -195,7 +199,7 @@ class AquariaLocations:
locations_cathedral_l = {
"Mithalas City Castle, bulb in the flesh hole": 698042,
"Mithalas City Castle, Blue banner": 698165,
"Mithalas City Castle, Blue Banner": 698165,
"Mithalas City Castle, urn in the bedroom": 698130,
"Mithalas City Castle, first urn of the single lamp path": 698131,
"Mithalas City Castle, second urn of the single lamp path": 698132,
@@ -226,7 +230,7 @@ class AquariaLocations:
"Mithalas Cathedral, third urn in the path behind the flesh vein": 698146,
"Mithalas Cathedral, fourth urn in the top right room": 698147,
"Mithalas Cathedral, Mithalan Dress": 698189,
"Mithalas Cathedral right area, urn below the left entrance": 698198,
"Mithalas Cathedral, urn below the left entrance": 698198,
}
locations_cathedral_underground = {
@@ -239,7 +243,7 @@ class AquariaLocations:
}
locations_cathedral_boss = {
"Cathedral boss area, beating Mithalan God": 698202,
"Mithalas boss area, beating Mithalan God": 698202,
}
locations_forest_tl = {
@@ -268,11 +272,14 @@ class AquariaLocations:
}
locations_forest_bl = {
"Kelp Forest bottom left area, bulb close to the spirit crystals": 698054,
"Kelp Forest bottom left area, Walker baby": 698186,
"Kelp Forest bottom left area, Transturtle": 698212,
}
locations_forest_bl_sc = {
"Kelp Forest bottom left area, bulb close to the spirit crystals": 698054,
"Kelp Forest bottom left area, Walker Baby": 698186,
}
locations_forest_br = {
"Kelp Forest bottom right area, Odd Container": 698168,
}
@@ -369,7 +376,7 @@ class AquariaLocations:
locations_sun_temple_r = {
"Sun Temple, first bulb of the temple": 698091,
"Sun Temple, bulb on the left part": 698092,
"Sun Temple, bulb on the right part": 698092,
"Sun Temple, bulb in the hidden room of the right part": 698093,
"Sun Temple, Sun Key": 698182,
}
@@ -401,6 +408,9 @@ class AquariaLocations:
"Abyss right area, bulb in the middle path": 698110,
"Abyss right area, bulb behind the rock in the middle path": 698111,
"Abyss right area, bulb in the left green room": 698112,
}
locations_abyss_r_transturtle = {
"Abyss right area, Transturtle": 698214,
}
@@ -451,7 +461,7 @@ class AquariaLocations:
locations_body_c = {
"The Body center area, breaking Li's cage": 698201,
"The Body main area, bulb on the main path blocking tube": 698097,
"The Body center area, bulb on the main path blocking tube": 698097,
}
locations_body_l = {
@@ -498,6 +508,7 @@ location_table = {
**AquariaLocations.locations_skeleton_path_sc,
**AquariaLocations.locations_arnassi,
**AquariaLocations.locations_arnassi_path,
**AquariaLocations.locations_arnassi_cave_transturtle,
**AquariaLocations.locations_arnassi_crab_boss,
**AquariaLocations.locations_sun_temple_l,
**AquariaLocations.locations_sun_temple_r,
@@ -508,6 +519,7 @@ location_table = {
**AquariaLocations.locations_abyss_l,
**AquariaLocations.locations_abyss_lb,
**AquariaLocations.locations_abyss_r,
**AquariaLocations.locations_abyss_r_transturtle,
**AquariaLocations.locations_energy_temple_1,
**AquariaLocations.locations_energy_temple_2,
**AquariaLocations.locations_energy_temple_3,
@@ -529,6 +541,7 @@ location_table = {
**AquariaLocations.locations_forest_tr,
**AquariaLocations.locations_forest_tr_fp,
**AquariaLocations.locations_forest_bl,
**AquariaLocations.locations_forest_bl_sc,
**AquariaLocations.locations_forest_br,
**AquariaLocations.locations_forest_boss,
**AquariaLocations.locations_forest_boss_entrance,

View File

@@ -5,7 +5,7 @@ Description: Manage options in the Aquaria game multiworld randomizer
"""
from dataclasses import dataclass
from Options import Toggle, Choice, Range, DeathLink, PerGameCommonOptions, DefaultOnToggle, StartInventoryPool
from Options import Toggle, Choice, Range, PerGameCommonOptions, DefaultOnToggle, StartInventoryPool
class IngredientRandomizer(Choice):
@@ -111,6 +111,14 @@ class BindSongNeededToGetUnderRockBulb(Toggle):
display_name = "Bind song needed to get sing bulbs under rocks"
class BlindGoal(Toggle):
"""
Hide the goal's requirements from the help page so that you have to go to the last boss door to know
what is needed to access the boss.
"""
display_name = "Hide the goal's requirements"
class UnconfineHomeWater(Choice):
"""
Open the way out of the Home Water area so that Naija can go to open water and beyond without the bind song.
@@ -142,4 +150,4 @@ class AquariaOptions(PerGameCommonOptions):
dish_randomizer: DishRandomizer
aquarian_translation: AquarianTranslation
skip_first_vision: SkipFirstVision
death_link: DeathLink
blind_goal: BlindGoal

View File

@@ -14,97 +14,112 @@ from worlds.generic.Rules import add_rule, set_rule
# Every condition to connect regions
def _has_hot_soup(state:CollectionState, player: int) -> bool:
def _has_hot_soup(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the hotsoup item"""
return state.has("Hot soup", player)
return state.has_any({"Hot soup", "Hot soup x 2"}, player)
def _has_tongue_cleared(state:CollectionState, player: int) -> bool:
def _has_tongue_cleared(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the Body tongue cleared item"""
return state.has("Body tongue cleared", player)
def _has_sun_crystal(state:CollectionState, player: int) -> bool:
def _has_sun_crystal(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the Sun crystal item"""
return state.has("Has sun crystal", player) and _has_bind_song(state, player)
def _has_li(state:CollectionState, player: int) -> bool:
def _has_li(state: CollectionState, player: int) -> bool:
"""`player` in `state` has Li in its team"""
return state.has("Li and Li song", player)
def _has_damaging_item(state:CollectionState, player: int) -> bool:
def _has_damaging_item(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the shield song item"""
return state.has_any({"Energy form", "Nature form", "Beast form", "Li and Li song", "Baby Nautilus",
"Baby Piranha", "Baby Blaster"}, player)
return state.has_any({"Energy form", "Nature form", "Beast form", "Li and Li song", "Baby Nautilus",
"Baby Piranha", "Baby Blaster"}, player)
def _has_shield_song(state:CollectionState, player: int) -> bool:
def _has_energy_attack_item(state: CollectionState, player: int) -> bool:
"""`player` in `state` has items that can do a lot of damage (enough to beat bosses)"""
return _has_energy_form(state, player) or _has_dual_form(state, player)
def _has_shield_song(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the shield song item"""
return state.has("Shield song", player)
def _has_bind_song(state:CollectionState, player: int) -> bool:
def _has_bind_song(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the bind song item"""
return state.has("Bind song", player)
def _has_energy_form(state:CollectionState, player: int) -> bool:
def _has_energy_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the energy form item"""
return state.has("Energy form", player)
def _has_beast_form(state:CollectionState, player: int) -> bool:
def _has_beast_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the beast form item"""
return state.has("Beast form", player)
def _has_nature_form(state:CollectionState, player: int) -> bool:
def _has_beast_and_soup_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the beast form item"""
return _has_beast_form(state, player) and _has_hot_soup(state, player)
def _has_beast_form_or_arnassi_armor(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the beast form item"""
return _has_beast_form(state, player) or state.has("Arnassi Armor", player)
def _has_nature_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the nature form item"""
return state.has("Nature form", player)
def _has_sun_form(state:CollectionState, player: int) -> bool:
def _has_sun_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the sun form item"""
return state.has("Sun form", player)
def _has_light(state:CollectionState, player: int) -> bool:
def _has_light(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the light item"""
return state.has("Baby Dumbo", player) or _has_sun_form(state, player)
def _has_dual_form(state:CollectionState, player: int) -> bool:
def _has_dual_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the dual form item"""
return _has_li(state, player) and state.has("Dual form", player)
def _has_fish_form(state:CollectionState, player: int) -> bool:
def _has_fish_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the fish form item"""
return state.has("Fish form", player)
def _has_spirit_form(state:CollectionState, player: int) -> bool:
def _has_spirit_form(state: CollectionState, player: int) -> bool:
"""`player` in `state` has the spirit form item"""
return state.has("Spirit form", player)
def _has_big_bosses(state:CollectionState, player: int) -> bool:
def _has_big_bosses(state: CollectionState, player: int) -> bool:
"""`player` in `state` has beated every big bosses"""
return state.has_all({"Fallen God beated", "Mithalan God beated", "Drunian God beated",
"Sun God beated", "The Golem beated"}, player)
"Sun God beated", "The Golem beated"}, player)
def _has_mini_bosses(state:CollectionState, player: int) -> bool:
def _has_mini_bosses(state: CollectionState, player: int) -> bool:
"""`player` in `state` has beated every big bosses"""
return state.has_all({"Nautilus Prime beated", "Blaster Peg Prime beated", "Mergog beated",
"Mithalan priests beated", "Octopus Prime beated", "Crabbius Maximus beated",
"Mantis Shrimp Prime beated", "King Jellyfish God Prime beated"}, player)
"Mithalan priests beated", "Octopus Prime beated", "Crabbius Maximus beated",
"Mantis Shrimp Prime beated", "King Jellyfish God Prime beated"}, player)
def _has_secrets(state:CollectionState, player: int) -> bool:
return state.has_all({"First secret obtained", "Second secret obtained", "Third secret obtained"},player)
def _has_secrets(state: CollectionState, player: int) -> bool:
return state.has_all({"First secret obtained", "Second secret obtained", "Third secret obtained"}, player)
class AquariaRegions:
@@ -134,6 +149,7 @@ class AquariaRegions:
skeleton_path: Region
skeleton_path_sc: Region
arnassi: Region
arnassi_cave_transturtle: Region
arnassi_path: Region
arnassi_crab_boss: Region
simon: Region
@@ -152,6 +168,7 @@ class AquariaRegions:
forest_tr: Region
forest_tr_fp: Region
forest_bl: Region
forest_bl_sc: Region
forest_br: Region
forest_boss: Region
forest_boss_entrance: Region
@@ -179,6 +196,7 @@ class AquariaRegions:
abyss_l: Region
abyss_lb: Region
abyss_r: Region
abyss_r_transturtle: Region
ice_cave: Region
bubble_cave: Region
bubble_cave_boss: Region
@@ -213,7 +231,7 @@ class AquariaRegions:
"""
def __add_region(self, hint: str,
locations: Optional[Dict[str, Optional[int]]]) -> Region:
locations: Optional[Dict[str, int]]) -> Region:
"""
Create a new Region, add it to the `world` regions and return it.
Be aware that this function have a side effect on ``world`.`regions`
@@ -236,7 +254,7 @@ class AquariaRegions:
self.home_water_nautilus = self.__add_region("Home Water, Nautilus nest",
AquariaLocations.locations_home_water_nautilus)
self.home_water_transturtle = self.__add_region("Home Water, turtle room",
AquariaLocations.locations_home_water_transturtle)
AquariaLocations.locations_home_water_transturtle)
self.naija_home = self.__add_region("Naija's Home", AquariaLocations.locations_naija_home)
self.song_cave = self.__add_region("Song Cave", AquariaLocations.locations_song_cave)
@@ -280,6 +298,8 @@ class AquariaRegions:
self.arnassi = self.__add_region("Arnassi Ruins", AquariaLocations.locations_arnassi)
self.arnassi_path = self.__add_region("Arnassi Ruins, back entrance path",
AquariaLocations.locations_arnassi_path)
self.arnassi_cave_transturtle = self.__add_region("Arnassi Ruins, transturtle area",
AquariaLocations.locations_arnassi_cave_transturtle)
self.arnassi_crab_boss = self.__add_region("Arnassi Ruins, Crabbius Maximus lair",
AquariaLocations.locations_arnassi_crab_boss)
@@ -300,11 +320,11 @@ class AquariaRegions:
AquariaLocations.locations_cathedral_l_sc)
self.cathedral_r = self.__add_region("Mithalas Cathedral",
AquariaLocations.locations_cathedral_r)
self.cathedral_underground = self.__add_region("Mithalas Cathedral Underground area",
self.cathedral_underground = self.__add_region("Mithalas Cathedral underground",
AquariaLocations.locations_cathedral_underground)
self.cathedral_boss_r = self.__add_region("Mithalas Cathedral, Mithalan God room",
self.cathedral_boss_r = self.__add_region("Mithalas Cathedral, Mithalan God room", None)
self.cathedral_boss_l = self.__add_region("Mithalas Cathedral, after Mithalan God room",
AquariaLocations.locations_cathedral_boss)
self.cathedral_boss_l = self.__add_region("Mithalas Cathedral, after Mithalan God room", None)
def __create_forest(self) -> None:
"""
@@ -320,6 +340,8 @@ class AquariaRegions:
AquariaLocations.locations_forest_tr_fp)
self.forest_bl = self.__add_region("Kelp Forest bottom left area",
AquariaLocations.locations_forest_bl)
self.forest_bl_sc = self.__add_region("Kelp Forest bottom left area, spirit crystals",
AquariaLocations.locations_forest_bl_sc)
self.forest_br = self.__add_region("Kelp Forest bottom right area",
AquariaLocations.locations_forest_br)
self.forest_sprite_cave = self.__add_region("Kelp Forest spirit cave",
@@ -375,9 +397,9 @@ class AquariaRegions:
self.sun_temple_r = self.__add_region("Sun Temple right area",
AquariaLocations.locations_sun_temple_r)
self.sun_temple_boss_path = self.__add_region("Sun Temple before boss area",
AquariaLocations.locations_sun_temple_boss_path)
AquariaLocations.locations_sun_temple_boss_path)
self.sun_temple_boss = self.__add_region("Sun Temple boss area",
AquariaLocations.locations_sun_temple_boss)
AquariaLocations.locations_sun_temple_boss)
def __create_abyss(self) -> None:
"""
@@ -388,6 +410,8 @@ class AquariaRegions:
AquariaLocations.locations_abyss_l)
self.abyss_lb = self.__add_region("Abyss left bottom area", AquariaLocations.locations_abyss_lb)
self.abyss_r = self.__add_region("Abyss right area", AquariaLocations.locations_abyss_r)
self.abyss_r_transturtle = self.__add_region("Abyss right area, transturtle",
AquariaLocations.locations_abyss_r_transturtle)
self.ice_cave = self.__add_region("Ice Cave", AquariaLocations.locations_ice_cave)
self.bubble_cave = self.__add_region("Bubble Cave", AquariaLocations.locations_bubble_cave)
self.bubble_cave_boss = self.__add_region("Bubble Cave boss area", AquariaLocations.locations_bubble_cave_boss)
@@ -407,7 +431,7 @@ class AquariaRegions:
self.sunken_city_r = self.__add_region("Sunken City right area",
AquariaLocations.locations_sunken_city_r)
self.sunken_city_boss = self.__add_region("Sunken City boss area",
AquariaLocations.locations_sunken_city_boss)
AquariaLocations.locations_sunken_city_boss)
def __create_body(self) -> None:
"""
@@ -427,7 +451,7 @@ class AquariaRegions:
self.final_boss_tube = self.__add_region("The Body, final boss area turtle room",
AquariaLocations.locations_final_boss_tube)
self.final_boss = self.__add_region("The Body, final boss",
AquariaLocations.locations_final_boss)
AquariaLocations.locations_final_boss)
self.final_boss_end = self.__add_region("The Body, final boss area", None)
def __connect_one_way_regions(self, source_name: str, destination_name: str,
@@ -455,8 +479,8 @@ class AquariaRegions:
"""
Connect entrances of the different regions around `home_water`
"""
self.__connect_regions("Menu", "Verse Cave right area",
self.menu, self.verse_cave_r)
self.__connect_one_way_regions("Menu", "Verse Cave right area",
self.menu, self.verse_cave_r)
self.__connect_regions("Verse Cave left area", "Verse Cave right area",
self.verse_cave_l, self.verse_cave_r)
self.__connect_regions("Verse Cave", "Home Water", self.verse_cave_l, self.home_water)
@@ -464,7 +488,8 @@ class AquariaRegions:
self.__connect_regions("Home Water", "Song Cave", self.home_water, self.song_cave)
self.__connect_regions("Home Water", "Home Water, nautilus nest",
self.home_water, self.home_water_nautilus,
lambda state: _has_energy_form(state, self.player) and _has_bind_song(state, self.player))
lambda state: _has_energy_attack_item(state, self.player) and
_has_bind_song(state, self.player))
self.__connect_regions("Home Water", "Home Water transturtle room",
self.home_water, self.home_water_transturtle)
self.__connect_regions("Home Water", "Energy Temple first area",
@@ -472,7 +497,7 @@ class AquariaRegions:
lambda state: _has_bind_song(state, self.player))
self.__connect_regions("Home Water", "Energy Temple_altar",
self.home_water, self.energy_temple_altar,
lambda state: _has_energy_form(state, self.player) and
lambda state: _has_energy_attack_item(state, self.player) and
_has_bind_song(state, self.player))
self.__connect_regions("Energy Temple first area", "Energy Temple second area",
self.energy_temple_1, self.energy_temple_2,
@@ -482,28 +507,28 @@ class AquariaRegions:
lambda state: _has_fish_form(state, self.player))
self.__connect_regions("Energy Temple idol room", "Energy Temple boss area",
self.energy_temple_idol, self.energy_temple_boss,
lambda state: _has_energy_form(state, self.player))
lambda state: _has_energy_attack_item(state, self.player) and
_has_fish_form(state, self.player))
self.__connect_one_way_regions("Energy Temple first area", "Energy Temple boss area",
self.energy_temple_1, self.energy_temple_boss,
lambda state: _has_beast_form(state, self.player) and
_has_energy_form(state, self.player))
_has_energy_attack_item(state, self.player))
self.__connect_one_way_regions("Energy Temple boss area", "Energy Temple first area",
self.energy_temple_boss, self.energy_temple_1,
lambda state: _has_energy_form(state, self.player))
lambda state: _has_energy_attack_item(state, self.player))
self.__connect_regions("Energy Temple second area", "Energy Temple third area",
self.energy_temple_2, self.energy_temple_3,
lambda state: _has_bind_song(state, self.player) and
_has_energy_form(state, self.player))
lambda state: _has_energy_form(state, self.player))
self.__connect_regions("Energy Temple boss area", "Energy Temple blaster room",
self.energy_temple_boss, self.energy_temple_blaster_room,
lambda state: _has_nature_form(state, self.player) and
_has_bind_song(state, self.player) and
_has_energy_form(state, self.player))
_has_energy_attack_item(state, self.player))
self.__connect_regions("Energy Temple first area", "Energy Temple blaster room",
self.energy_temple_1, self.energy_temple_blaster_room,
lambda state: _has_nature_form(state, self.player) and
_has_bind_song(state, self.player) and
_has_energy_form(state, self.player) and
_has_energy_attack_item(state, self.player) and
_has_beast_form(state, self.player))
self.__connect_regions("Home Water", "Open Water top left area",
self.home_water, self.openwater_tl)
@@ -520,7 +545,7 @@ class AquariaRegions:
self.openwater_tl, self.forest_br)
self.__connect_regions("Open Water top right area", "Open Water top right area, turtle room",
self.openwater_tr, self.openwater_tr_turtle,
lambda state: _has_beast_form(state, self.player))
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
self.__connect_regions("Open Water top right area", "Open Water bottom right area",
self.openwater_tr, self.openwater_br)
self.__connect_regions("Open Water top right area", "Mithalas City",
@@ -529,10 +554,9 @@ class AquariaRegions:
self.openwater_tr, self.veil_bl)
self.__connect_one_way_regions("Open Water top right area", "Veil bottom right",
self.openwater_tr, self.veil_br,
lambda state: _has_beast_form(state, self.player))
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
self.__connect_one_way_regions("Veil bottom right", "Open Water top right area",
self.veil_br, self.openwater_tr,
lambda state: _has_beast_form(state, self.player))
self.veil_br, self.openwater_tr)
self.__connect_regions("Open Water bottom left area", "Open Water bottom right area",
self.openwater_bl, self.openwater_br)
self.__connect_regions("Open Water bottom left area", "Skeleton path",
@@ -551,10 +575,14 @@ class AquariaRegions:
self.arnassi, self.openwater_br)
self.__connect_regions("Arnassi", "Arnassi path",
self.arnassi, self.arnassi_path)
self.__connect_regions("Arnassi ruins, transturtle area", "Arnassi path",
self.arnassi_cave_transturtle, self.arnassi_path,
lambda state: _has_fish_form(state, self.player))
self.__connect_one_way_regions("Arnassi path", "Arnassi crab boss area",
self.arnassi_path, self.arnassi_crab_boss,
lambda state: _has_beast_form(state, self.player) and
_has_energy_form(state, self.player))
lambda state: _has_beast_form_or_arnassi_armor(state, self.player) and
(_has_energy_attack_item(state, self.player) or
_has_nature_form(state, self.player)))
self.__connect_one_way_regions("Arnassi crab boss area", "Arnassi path",
self.arnassi_crab_boss, self.arnassi_path)
@@ -564,61 +592,62 @@ class AquariaRegions:
"""
self.__connect_one_way_regions("Mithalas City", "Mithalas City top path",
self.mithalas_city, self.mithalas_city_top_path,
lambda state: _has_beast_form(state, self.player))
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
self.__connect_one_way_regions("Mithalas City_top_path", "Mithalas City",
self.mithalas_city_top_path, self.mithalas_city)
self.__connect_regions("Mithalas City", "Mithalas City home with fishpass",
self.mithalas_city, self.mithalas_city_fishpass,
lambda state: _has_fish_form(state, self.player))
self.__connect_regions("Mithalas City", "Mithalas castle",
self.mithalas_city, self.cathedral_l,
lambda state: _has_fish_form(state, self.player))
self.mithalas_city, self.cathedral_l)
self.__connect_one_way_regions("Mithalas City top path", "Mithalas castle, flower tube",
self.mithalas_city_top_path,
self.cathedral_l_tube,
lambda state: _has_nature_form(state, self.player) and
_has_energy_form(state, self.player))
_has_energy_attack_item(state, self.player))
self.__connect_one_way_regions("Mithalas castle, flower tube area", "Mithalas City top path",
self.cathedral_l_tube,
self.mithalas_city_top_path,
lambda state: _has_beast_form(state, self.player) and
_has_nature_form(state, self.player))
lambda state: _has_nature_form(state, self.player))
self.__connect_one_way_regions("Mithalas castle flower tube area", "Mithalas castle, spirit crystals",
self.cathedral_l_tube, self.cathedral_l_sc,
lambda state: _has_spirit_form(state, self.player))
self.cathedral_l_tube, self.cathedral_l_sc,
lambda state: _has_spirit_form(state, self.player))
self.__connect_one_way_regions("Mithalas castle_flower tube area", "Mithalas castle",
self.cathedral_l_tube, self.cathedral_l,
lambda state: _has_spirit_form(state, self.player))
self.cathedral_l_tube, self.cathedral_l,
lambda state: _has_spirit_form(state, self.player))
self.__connect_regions("Mithalas castle", "Mithalas castle, spirit crystals",
self.cathedral_l, self.cathedral_l_sc,
lambda state: _has_spirit_form(state, self.player))
self.__connect_regions("Mithalas castle", "Cathedral boss left area",
self.cathedral_l, self.cathedral_boss_l,
lambda state: _has_beast_form(state, self.player) and
_has_energy_form(state, self.player) and
_has_bind_song(state, self.player))
self.__connect_regions("Mithalas castle", "Cathedral underground",
self.__connect_one_way_regions("Mithalas castle", "Cathedral boss right area",
self.cathedral_l, self.cathedral_boss_r,
lambda state: _has_beast_form(state, self.player))
self.__connect_one_way_regions("Cathedral boss left area", "Mithalas castle",
self.cathedral_boss_l, self.cathedral_l,
lambda state: _has_beast_form(state, self.player))
self.__connect_regions("Mithalas castle", "Mithalas Cathedral underground",
self.cathedral_l, self.cathedral_underground,
lambda state: _has_beast_form(state, self.player) and
_has_bind_song(state, self.player))
self.__connect_regions("Mithalas castle", "Cathedral right area",
self.cathedral_l, self.cathedral_r,
lambda state: _has_bind_song(state, self.player) and
_has_energy_form(state, self.player))
self.__connect_regions("Cathedral right area", "Cathedral underground",
self.cathedral_r, self.cathedral_underground,
lambda state: _has_energy_form(state, self.player))
self.__connect_one_way_regions("Cathedral underground", "Cathedral boss left area",
self.cathedral_underground, self.cathedral_boss_r,
lambda state: _has_energy_form(state, self.player) and
_has_bind_song(state, self.player))
self.__connect_one_way_regions("Cathedral boss left area", "Cathedral underground",
lambda state: _has_beast_form(state, self.player))
self.__connect_one_way_regions("Mithalas castle", "Mithalas Cathedral",
self.cathedral_l, self.cathedral_r,
lambda state: _has_bind_song(state, self.player) and
_has_energy_attack_item(state, self.player))
self.__connect_one_way_regions("Mithalas Cathedral", "Mithalas Cathedral underground",
self.cathedral_r, self.cathedral_underground)
self.__connect_one_way_regions("Mithalas Cathedral underground", "Mithalas Cathedral",
self.cathedral_underground, self.cathedral_r,
lambda state: _has_beast_form(state, self.player) and
_has_energy_attack_item(state, self.player))
self.__connect_one_way_regions("Mithalas Cathedral underground", "Cathedral boss right area",
self.cathedral_underground, self.cathedral_boss_r)
self.__connect_one_way_regions("Cathedral boss right area", "Mithalas Cathedral underground",
self.cathedral_boss_r, self.cathedral_underground,
lambda state: _has_beast_form(state, self.player))
self.__connect_regions("Cathedral boss right area", "Cathedral boss left area",
self.__connect_one_way_regions("Cathedral boss right area", "Cathedral boss left area",
self.cathedral_boss_r, self.cathedral_boss_l,
lambda state: _has_bind_song(state, self.player) and
_has_energy_form(state, self.player))
_has_energy_attack_item(state, self.player))
self.__connect_one_way_regions("Cathedral boss left area", "Cathedral boss right area",
self.cathedral_boss_l, self.cathedral_boss_r)
def __connect_forest_regions(self) -> None:
"""
@@ -628,6 +657,12 @@ class AquariaRegions:
self.forest_br, self.veil_bl)
self.__connect_regions("Forest bottom right", "Forest bottom left area",
self.forest_br, self.forest_bl)
self.__connect_one_way_regions("Forest bottom left area", "Forest bottom left area, spirit crystals",
self.forest_bl, self.forest_bl_sc,
lambda state: _has_energy_attack_item(state, self.player) or
_has_fish_form(state, self.player))
self.__connect_one_way_regions("Forest bottom left area, spirit crystals", "Forest bottom left area",
self.forest_bl_sc, self.forest_bl)
self.__connect_regions("Forest bottom right", "Forest top right area",
self.forest_br, self.forest_tr)
self.__connect_regions("Forest bottom left area", "Forest fish cave",
@@ -641,7 +676,7 @@ class AquariaRegions:
self.forest_tl, self.forest_tl_fp,
lambda state: _has_nature_form(state, self.player) and
_has_bind_song(state, self.player) and
_has_energy_form(state, self.player) and
_has_energy_attack_item(state, self.player) and
_has_fish_form(state, self.player))
self.__connect_regions("Forest top left area", "Forest top right area",
self.forest_tl, self.forest_tr)
@@ -649,7 +684,7 @@ class AquariaRegions:
self.forest_tl, self.forest_boss_entrance)
self.__connect_regions("Forest boss area", "Forest boss entrance",
self.forest_boss, self.forest_boss_entrance,
lambda state: _has_energy_form(state, self.player))
lambda state: _has_energy_attack_item(state, self.player))
self.__connect_regions("Forest top right area", "Forest top right area fish pass",
self.forest_tr, self.forest_tr_fp,
lambda state: _has_fish_form(state, self.player))
@@ -663,7 +698,7 @@ class AquariaRegions:
self.__connect_regions("Fermog cave", "Fermog boss",
self.mermog_cave, self.mermog_boss,
lambda state: _has_beast_form(state, self.player) and
_has_energy_form(state, self.player))
_has_energy_attack_item(state, self.player))
def __connect_veil_regions(self) -> None:
"""
@@ -681,8 +716,7 @@ class AquariaRegions:
self.veil_b_sc, self.veil_br,
lambda state: _has_spirit_form(state, self.player))
self.__connect_regions("Veil bottom right", "Veil top left area",
self.veil_br, self.veil_tl,
lambda state: _has_beast_form(state, self.player))
self.veil_br, self.veil_tl)
self.__connect_regions("Veil top left area", "Veil_top left area, fish pass",
self.veil_tl, self.veil_tl_fp,
lambda state: _has_fish_form(state, self.player))
@@ -691,20 +725,25 @@ class AquariaRegions:
self.__connect_regions("Veil top left area", "Turtle cave",
self.veil_tl, self.turtle_cave)
self.__connect_regions("Turtle cave", "Turtle cave Bubble Cliff",
self.turtle_cave, self.turtle_cave_bubble,
lambda state: _has_beast_form(state, self.player))
self.turtle_cave, self.turtle_cave_bubble)
self.__connect_regions("Veil right of sun temple", "Sun Temple right area",
self.veil_tr_r, self.sun_temple_r)
self.__connect_regions("Sun Temple right area", "Sun Temple left area",
self.sun_temple_r, self.sun_temple_l,
lambda state: _has_bind_song(state, self.player))
self.__connect_one_way_regions("Sun Temple right area", "Sun Temple left area",
self.sun_temple_r, self.sun_temple_l,
lambda state: _has_bind_song(state, self.player) or
_has_light(state, self.player))
self.__connect_one_way_regions("Sun Temple left area", "Sun Temple right area",
self.sun_temple_l, self.sun_temple_r,
lambda state: _has_light(state, self.player))
self.__connect_regions("Sun Temple left area", "Veil left of sun temple",
self.sun_temple_l, self.veil_tr_l)
self.__connect_regions("Sun Temple left area", "Sun Temple before boss area",
self.sun_temple_l, self.sun_temple_boss_path)
self.sun_temple_l, self.sun_temple_boss_path,
lambda state: _has_light(state, self.player) or
_has_sun_crystal(state, self.player))
self.__connect_regions("Sun Temple before boss area", "Sun Temple boss area",
self.sun_temple_boss_path, self.sun_temple_boss,
lambda state: _has_energy_form(state, self.player))
lambda state: _has_energy_attack_item(state, self.player))
self.__connect_one_way_regions("Sun Temple boss area", "Veil left of sun temple",
self.sun_temple_boss, self.veil_tr_l)
self.__connect_regions("Veil left of sun temple", "Octo cave top path",
@@ -712,7 +751,7 @@ class AquariaRegions:
lambda state: _has_fish_form(state, self.player) and
_has_sun_form(state, self.player) and
_has_beast_form(state, self.player) and
_has_energy_form(state, self.player))
_has_energy_attack_item(state, self.player))
self.__connect_regions("Veil left of sun temple", "Octo cave bottom path",
self.veil_tr_l, self.octo_cave_b,
lambda state: _has_fish_form(state, self.player))
@@ -728,16 +767,22 @@ class AquariaRegions:
self.abyss_lb, self.sunken_city_r,
lambda state: _has_li(state, self.player))
self.__connect_one_way_regions("Abyss left bottom area", "Body center area",
self.abyss_lb, self.body_c,
lambda state: _has_tongue_cleared(state, self.player))
self.abyss_lb, self.body_c,
lambda state: _has_tongue_cleared(state, self.player))
self.__connect_one_way_regions("Body center area", "Abyss left bottom area",
self.body_c, self.abyss_lb)
self.body_c, self.abyss_lb)
self.__connect_regions("Abyss left area", "King jellyfish cave",
self.abyss_l, self.king_jellyfish_cave,
lambda state: _has_energy_form(state, self.player) and
_has_beast_form(state, self.player))
lambda state: (_has_energy_form(state, self.player) and
_has_beast_form(state, self.player)) or
_has_dual_form(state, self.player))
self.__connect_regions("Abyss left area", "Abyss right area",
self.abyss_l, self.abyss_r)
self.__connect_one_way_regions("Abyss right area", "Abyss right area, transturtle",
self.abyss_r, self.abyss_r_transturtle)
self.__connect_one_way_regions("Abyss right area, transturtle", "Abyss right area",
self.abyss_r_transturtle, self.abyss_r,
lambda state: _has_light(state, self.player))
self.__connect_regions("Abyss right area", "Inside the whale",
self.abyss_r, self.whale,
lambda state: _has_spirit_form(state, self.player) and
@@ -747,13 +792,14 @@ class AquariaRegions:
lambda state: _has_spirit_form(state, self.player) and
_has_sun_form(state, self.player) and
_has_bind_song(state, self.player) and
_has_energy_form(state, self.player))
_has_energy_attack_item(state, self.player))
self.__connect_regions("Abyss right area", "Ice Cave",
self.abyss_r, self.ice_cave,
lambda state: _has_spirit_form(state, self.player))
self.__connect_regions("Abyss right area", "Bubble Cave",
self.__connect_regions("Ice cave", "Bubble Cave",
self.ice_cave, self.bubble_cave,
lambda state: _has_beast_form(state, self.player))
lambda state: _has_beast_form(state, self.player) or
_has_hot_soup(state, self.player))
self.__connect_regions("Bubble Cave boss area", "Bubble Cave",
self.bubble_cave, self.bubble_cave_boss,
lambda state: _has_nature_form(state, self.player) and _has_bind_song(state, self.player)
@@ -772,7 +818,7 @@ class AquariaRegions:
self.sunken_city_l, self.sunken_city_boss,
lambda state: _has_beast_form(state, self.player) and
_has_sun_form(state, self.player) and
_has_energy_form(state, self.player) and
_has_energy_attack_item(state, self.player) and
_has_bind_song(state, self.player))
def __connect_body_regions(self) -> None:
@@ -780,11 +826,13 @@ class AquariaRegions:
Connect entrances of the different regions around The Body
"""
self.__connect_regions("Body center area", "Body left area",
self.body_c, self.body_l)
self.body_c, self.body_l,
lambda state: _has_energy_form(state, self.player))
self.__connect_regions("Body center area", "Body right area top path",
self.body_c, self.body_rt)
self.__connect_regions("Body center area", "Body right area bottom path",
self.body_c, self.body_rb)
self.body_c, self.body_rb,
lambda state: _has_energy_form(state, self.player))
self.__connect_regions("Body center area", "Body bottom area",
self.body_c, self.body_b,
lambda state: _has_dual_form(state, self.player))
@@ -803,22 +851,12 @@ class AquariaRegions:
self.__connect_one_way_regions("final boss third form area", "final boss end",
self.final_boss, self.final_boss_end)
def __connect_transturtle(self, item_source: str, item_target: str, region_source: Region, region_target: Region,
rule=None) -> None:
def __connect_transturtle(self, item_source: str, item_target: str, region_source: Region,
region_target: Region) -> None:
"""Connect a single transturtle to another one"""
if item_source != item_target:
if rule is None:
self.__connect_one_way_regions(item_source, item_target, region_source, region_target,
lambda state: state.has(item_target, self.player))
else:
self.__connect_one_way_regions(item_source, item_target, region_source, region_target, rule)
def __connect_arnassi_path_transturtle(self, item_source: str, item_target: str, region_source: Region,
region_target: Region) -> None:
"""Connect the Arnassi Ruins transturtle to another one"""
self.__connect_one_way_regions(item_source, item_target, region_source, region_target,
lambda state: state.has(item_target, self.player) and
_has_fish_form(state, self.player))
self.__connect_one_way_regions(item_source, item_target, region_source, region_target,
lambda state: state.has(item_target, self.player))
def _connect_transturtle_to_other(self, item: str, region: Region) -> None:
"""Connect a single transturtle to all others"""
@@ -827,24 +865,10 @@ class AquariaRegions:
self.__connect_transturtle(item, "Transturtle Open Water top right", region, self.openwater_tr_turtle)
self.__connect_transturtle(item, "Transturtle Forest bottom left", region, self.forest_bl)
self.__connect_transturtle(item, "Transturtle Home Water", region, self.home_water_transturtle)
self.__connect_transturtle(item, "Transturtle Abyss right", region, self.abyss_r)
self.__connect_transturtle(item, "Transturtle Abyss right", region, self.abyss_r_transturtle)
self.__connect_transturtle(item, "Transturtle Final Boss", region, self.final_boss_tube)
self.__connect_transturtle(item, "Transturtle Simon Says", region, self.simon)
self.__connect_transturtle(item, "Transturtle Arnassi Ruins", region, self.arnassi_path,
lambda state: state.has("Transturtle Arnassi Ruins", self.player) and
_has_fish_form(state, self.player))
def _connect_arnassi_path_transturtle_to_other(self, item: str, region: Region) -> None:
"""Connect the Arnassi Ruins transturtle to all others"""
self.__connect_arnassi_path_transturtle(item, "Transturtle Veil top left", region, self.veil_tl)
self.__connect_arnassi_path_transturtle(item, "Transturtle Veil top right", region, self.veil_tr_l)
self.__connect_arnassi_path_transturtle(item, "Transturtle Open Water top right", region,
self.openwater_tr_turtle)
self.__connect_arnassi_path_transturtle(item, "Transturtle Forest bottom left", region, self.forest_bl)
self.__connect_arnassi_path_transturtle(item, "Transturtle Home Water", region, self.home_water_transturtle)
self.__connect_arnassi_path_transturtle(item, "Transturtle Abyss right", region, self.abyss_r)
self.__connect_arnassi_path_transturtle(item, "Transturtle Final Boss", region, self.final_boss_tube)
self.__connect_arnassi_path_transturtle(item, "Transturtle Simon Says", region, self.simon)
self.__connect_transturtle(item, "Transturtle Arnassi Ruins", region, self.arnassi_cave_transturtle)
def __connect_transturtles(self) -> None:
"""Connect every transturtle with others"""
@@ -853,10 +877,10 @@ class AquariaRegions:
self._connect_transturtle_to_other("Transturtle Open Water top right", self.openwater_tr_turtle)
self._connect_transturtle_to_other("Transturtle Forest bottom left", self.forest_bl)
self._connect_transturtle_to_other("Transturtle Home Water", self.home_water_transturtle)
self._connect_transturtle_to_other("Transturtle Abyss right", self.abyss_r)
self._connect_transturtle_to_other("Transturtle Abyss right", self.abyss_r_transturtle)
self._connect_transturtle_to_other("Transturtle Final Boss", self.final_boss_tube)
self._connect_transturtle_to_other("Transturtle Simon Says", self.simon)
self._connect_arnassi_path_transturtle_to_other("Transturtle Arnassi Ruins", self.arnassi_path)
self._connect_transturtle_to_other("Transturtle Arnassi Ruins", self.arnassi_cave_transturtle)
def connect_regions(self) -> None:
"""
@@ -893,7 +917,7 @@ class AquariaRegions:
self.__add_event_location(self.energy_temple_boss,
"Beating Fallen God",
"Fallen God beated")
self.__add_event_location(self.cathedral_boss_r,
self.__add_event_location(self.cathedral_boss_l,
"Beating Mithalan God",
"Mithalan God beated")
self.__add_event_location(self.forest_boss,
@@ -970,8 +994,9 @@ class AquariaRegions:
"""Since Urns need to be broken, add a damaging item to rules"""
add_rule(self.multiworld.get_location("Open Water top right area, first urn in the Mithalas exit", self.player),
lambda state: _has_damaging_item(state, self.player))
add_rule(self.multiworld.get_location("Open Water top right area, second urn in the Mithalas exit", self.player),
lambda state: _has_damaging_item(state, self.player))
add_rule(
self.multiworld.get_location("Open Water top right area, second urn in the Mithalas exit", self.player),
lambda state: _has_damaging_item(state, self.player))
add_rule(self.multiworld.get_location("Open Water top right area, third urn in the Mithalas exit", self.player),
lambda state: _has_damaging_item(state, self.player))
add_rule(self.multiworld.get_location("Mithalas City, first urn in one of the homes", self.player),
@@ -1019,66 +1044,46 @@ class AquariaRegions:
Modify rules for location that need soup
"""
add_rule(self.multiworld.get_location("Turtle cave, Urchin Costume", self.player),
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
add_rule(self.multiworld.get_location("Sun Worm path, first cliff bulb", self.player),
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
add_rule(self.multiworld.get_location("Sun Worm path, second cliff bulb", self.player),
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
lambda state: _has_hot_soup(state, self.player))
add_rule(self.multiworld.get_location("The Veil top right area, bulb at the top of the waterfall", self.player),
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
lambda state: _has_beast_and_soup_form(state, self.player))
def __adjusting_under_rock_location(self) -> None:
"""
Modify rules implying bind song needed for bulb under rocks
"""
add_rule(self.multiworld.get_location("Home Water, bulb under the rock in the left path from the Verse Cave",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Verse Cave left area, bulb under the rock at the end of the path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Naija's Home, bulb under the rock at the right of the main path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Song Cave, bulb under the rock in the path to the singing statues",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Song Cave, bulb under the rock close to the song door",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Energy Temple second area, bulb under the rock",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Open Water top left area, bulb under the rock in the right path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Open Water top left area, bulb under the rock in the left path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Kelp Forest top right area, bulb under the rock in the right path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("The Veil top left area, bulb under the rock in the top right path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Abyss right area, bulb behind the rock in the whale room",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Abyss right area, bulb in the middle path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("The Veil top left area, bulb under the rock in the top right path",
self.player), lambda state: _has_bind_song(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
def __adjusting_light_in_dark_place_rules(self) -> None:
add_rule(self.multiworld.get_location("Kelp Forest top right area, Black Pearl", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_location("Kelp Forest bottom right area, Odd Container", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Veil top left to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Open Water top right to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Veil top right to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Forest bottom left to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Home Water to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Final Boss to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Simon Says to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Transturtle Arnassi Ruins to Transturtle Abyss right", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Body center area to Abyss left bottom area", self.player),
lambda state: _has_light(state, self.player))
add_rule(self.multiworld.get_entrance("Veil left of sun temple to Octo cave top path", self.player),
@@ -1097,12 +1102,14 @@ class AquariaRegions:
def __adjusting_manual_rules(self) -> None:
add_rule(self.multiworld.get_location("Mithalas Cathedral, Mithalan Dress", self.player),
lambda state: _has_beast_form(state, self.player))
add_rule(self.multiworld.get_location("Open Water bottom left area, bulb inside the lowest fish pass", self.player),
lambda state: _has_fish_form(state, self.player))
add_rule(self.multiworld.get_location("Kelp Forest bottom left area, Walker baby", self.player),
add_rule(
self.multiworld.get_location("Open Water bottom left area, bulb inside the lowest fish pass", self.player),
lambda state: _has_fish_form(state, self.player))
add_rule(self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby", self.player),
lambda state: _has_spirit_form(state, self.player))
add_rule(self.multiworld.get_location("The Veil top left area, bulb hidden behind the blocking rock", self.player),
lambda state: _has_bind_song(state, self.player))
add_rule(
self.multiworld.get_location("The Veil top left area, bulb hidden behind the blocking rock", self.player),
lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Turtle cave, Turtle Egg", self.player),
lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Abyss left area, bulb in the bottom fish pass", self.player),
@@ -1114,103 +1121,119 @@ class AquariaRegions:
add_rule(self.multiworld.get_location("Verse Cave right area, Big Seed", self.player),
lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Arnassi Ruins, Song Plant Spore", self.player),
lambda state: _has_beast_form(state, self.player))
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
add_rule(self.multiworld.get_location("Energy Temple first area, bulb in the bottom room blocked by a rock",
self.player), lambda state: _has_energy_form(state, self.player))
self.player), lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Home Water, bulb in the bottom left room", self.player),
lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Home Water, bulb in the path below Nautilus Prime", self.player),
lambda state: _has_bind_song(state, self.player))
add_rule(self.multiworld.get_location("Naija's Home, bulb after the energy door", self.player),
lambda state: _has_energy_form(state, self.player))
lambda state: _has_energy_attack_item(state, self.player))
add_rule(self.multiworld.get_location("Abyss right area, bulb behind the rock in the whale room", self.player),
lambda state: _has_spirit_form(state, self.player) and
_has_sun_form(state, self.player))
add_rule(self.multiworld.get_location("Arnassi Ruins, Arnassi Armor", self.player),
lambda state: _has_fish_form(state, self.player) and
_has_spirit_form(state, self.player))
lambda state: _has_fish_form(state, self.player) or
_has_beast_and_soup_form(state, self.player))
add_rule(self.multiworld.get_location("Mithalas City, urn inside a home fish pass", self.player),
lambda state: _has_damaging_item(state, self.player))
add_rule(self.multiworld.get_location("Mithalas City, urn in the Castle flower tube entrance", self.player),
lambda state: _has_damaging_item(state, self.player))
add_rule(self.multiworld.get_location(
"The Veil top right area, bulb in the middle of the wall jump cliff", self.player
), lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
add_rule(self.multiworld.get_location("Kelp Forest top left area, Jelly Egg", self.player),
lambda state: _has_beast_form(state, self.player))
add_rule(self.multiworld.get_location("Sun Worm path, first cliff bulb", self.player),
lambda state: state.has("Sun God beated", self.player))
add_rule(self.multiworld.get_location("Sun Worm path, second cliff bulb", self.player),
lambda state: state.has("Sun God beated", self.player))
add_rule(self.multiworld.get_location("The Body center area, breaking Li's cage", self.player),
lambda state: _has_tongue_cleared(state, self.player))
def __no_progression_hard_or_hidden_location(self) -> None:
self.multiworld.get_location("Energy Temple boss area, Fallen God Tooth",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Cathedral boss area, beating Mithalan God",
self.player).item_rule =\
self.multiworld.get_location("Mithalas boss area, beating Mithalan God",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Kelp Forest boss area, beating Drunian God",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Sun Temple boss area, beating Sun God",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Sunken City, bulb on top of the boss area",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Home Water, Nautilus Egg",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Energy Temple blaster room, Blaster Egg",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Mithalas City Castle, beating the Priests",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Mermog cave, Piranha Egg",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Octopus Cave, Dumbo Egg",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("King Jellyfish Cave, bulb in the right path from King Jelly",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("King Jellyfish Cave, Jellyfish Costume",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Final Boss area, bulb in the boss third form room",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Sun Worm path, first cliff bulb",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Sun Worm path, second cliff bulb",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("The Veil top right area, bulb at the top of the waterfall",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Bubble Cave, bulb in the left cave wall",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Bubble Cave, Verse Egg",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Kelp Forest bottom left area, bulb close to the spirit crystals",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Kelp Forest bottom left area, Walker baby",
self.player).item_rule =\
self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Sun Temple, Sun Key",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("The Body bottom area, Mutant Costume",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Sun Temple, bulb in the hidden room of the right part",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
self.multiworld.get_location("Arnassi Ruins, Arnassi Armor",
self.player).item_rule =\
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
def adjusting_rules(self, options: AquariaOptions) -> None:
"""
Modify rules for single location or optional rules
"""
self.multiworld.get_entrance("Before Final Boss to Final Boss", self.player)
self.__adjusting_urns_rules()
self.__adjusting_crates_rules()
self.__adjusting_soup_rules()
@@ -1234,7 +1257,7 @@ class AquariaRegions:
lambda state: _has_bind_song(state, self.player))
if options.unconfine_home_water.value in [0, 2]:
add_rule(self.multiworld.get_entrance("Home Water to Open Water top left area", self.player),
lambda state: _has_bind_song(state, self.player) and _has_energy_form(state, self.player))
lambda state: _has_bind_song(state, self.player) and _has_energy_attack_item(state, self.player))
if options.early_energy_form:
self.multiworld.early_items[self.player]["Energy form"] = 1
@@ -1274,6 +1297,7 @@ class AquariaRegions:
self.multiworld.regions.append(self.arnassi)
self.multiworld.regions.append(self.arnassi_path)
self.multiworld.regions.append(self.arnassi_crab_boss)
self.multiworld.regions.append(self.arnassi_cave_transturtle)
self.multiworld.regions.append(self.simon)
def __add_mithalas_regions_to_world(self) -> None:
@@ -1300,6 +1324,7 @@ class AquariaRegions:
self.multiworld.regions.append(self.forest_tr)
self.multiworld.regions.append(self.forest_tr_fp)
self.multiworld.regions.append(self.forest_bl)
self.multiworld.regions.append(self.forest_bl_sc)
self.multiworld.regions.append(self.forest_br)
self.multiworld.regions.append(self.forest_boss)
self.multiworld.regions.append(self.forest_boss_entrance)
@@ -1337,6 +1362,7 @@ class AquariaRegions:
self.multiworld.regions.append(self.abyss_l)
self.multiworld.regions.append(self.abyss_lb)
self.multiworld.regions.append(self.abyss_r)
self.multiworld.regions.append(self.abyss_r_transturtle)
self.multiworld.regions.append(self.ice_cave)
self.multiworld.regions.append(self.bubble_cave)
self.multiworld.regions.append(self.bubble_cave_boss)

View File

@@ -204,7 +204,8 @@ class AquariaWorld(World):
def fill_slot_data(self) -> Dict[str, Any]:
return {"ingredientReplacement": self.ingredients_substitution,
"aquarianTranslate": bool(self.options.aquarian_translation.value),
"aquarian_translate": bool(self.options.aquarian_translation.value),
"blind_goal": bool(self.options.blind_goal.value),
"secret_needed": self.options.objective.value > 0,
"minibosses_to_kill": self.options.mini_bosses_to_beat.value,
"bigbosses_to_kill": self.options.big_bosses_to_beat.value,

View File

@@ -60,7 +60,7 @@ after_home_water_locations = [
"Mithalas City, Doll",
"Mithalas City, urn inside a home fish pass",
"Mithalas City Castle, bulb in the flesh hole",
"Mithalas City Castle, Blue banner",
"Mithalas City Castle, Blue Banner",
"Mithalas City Castle, urn in the bedroom",
"Mithalas City Castle, first urn of the single lamp path",
"Mithalas City Castle, second urn of the single lamp path",
@@ -82,14 +82,14 @@ after_home_water_locations = [
"Mithalas Cathedral, third urn in the path behind the flesh vein",
"Mithalas Cathedral, fourth urn in the top right room",
"Mithalas Cathedral, Mithalan Dress",
"Mithalas Cathedral right area, urn below the left entrance",
"Mithalas Cathedral, urn below the left entrance",
"Cathedral Underground, bulb in the center part",
"Cathedral Underground, first bulb in the top left part",
"Cathedral Underground, second bulb in the top left part",
"Cathedral Underground, third bulb in the top left part",
"Cathedral Underground, bulb close to the save crystal",
"Cathedral Underground, bulb in the bottom right path",
"Cathedral boss area, beating Mithalan God",
"Mithalas boss area, beating Mithalan God",
"Kelp Forest top left area, bulb in the bottom left clearing",
"Kelp Forest top left area, bulb in the path down from the top left clearing",
"Kelp Forest top left area, bulb in the top left clearing",
@@ -104,7 +104,7 @@ after_home_water_locations = [
"Kelp Forest top right area, Black Pearl",
"Kelp Forest top right area, bulb in the top fish pass",
"Kelp Forest bottom left area, bulb close to the spirit crystals",
"Kelp Forest bottom left area, Walker baby",
"Kelp Forest bottom left area, Walker Baby",
"Kelp Forest bottom left area, Transturtle",
"Kelp Forest bottom right area, Odd Container",
"Kelp Forest boss area, beating Drunian God",
@@ -141,7 +141,7 @@ after_home_water_locations = [
"Sun Temple, bulb at the top of the high dark room",
"Sun Temple, Golden Gear",
"Sun Temple, first bulb of the temple",
"Sun Temple, bulb on the left part",
"Sun Temple, bulb on the right part",
"Sun Temple, bulb in the hidden room of the right part",
"Sun Temple, Sun Key",
"Sun Worm path, first path bulb",
@@ -175,7 +175,7 @@ after_home_water_locations = [
"Sunken City left area, Girl Costume",
"Sunken City, bulb on top of the boss area",
"The Body center area, breaking Li's cage",
"The Body main area, bulb on the main path blocking tube",
"The Body center area, bulb on the main path blocking tube",
"The Body left area, first bulb in the top face room",
"The Body left area, second bulb in the top face room",
"The Body left area, bulb below the water stream",

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the beast form
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class BeastFormAccessTest(AquariaTestBase):
@@ -13,36 +13,16 @@ class BeastFormAccessTest(AquariaTestBase):
def test_beast_form_location(self) -> None:
"""Test locations that require beast form"""
locations = [
"Mithalas City Castle, beating the Priests",
"Arnassi Ruins, Crab Armor",
"Arnassi Ruins, Song Plant Spore",
"Mithalas City, first bulb at the end of the top path",
"Mithalas City, second bulb at the end of the top path",
"Mithalas City, bulb in the top path",
"Mithalas City, Mithalas Pot",
"Mithalas City, urn in the Castle flower tube entrance",
"Mermog cave, Piranha Egg",
"Kelp Forest top left area, Jelly Egg",
"Mithalas Cathedral, Mithalan Dress",
"Turtle cave, bulb in Bubble Cliff",
"Turtle cave, Urchin Costume",
"Sun Worm path, first cliff bulb",
"Sun Worm path, second cliff bulb",
"The Veil top right area, bulb at the top of the waterfall",
"Bubble Cave, bulb in the left cave wall",
"Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
"Bubble Cave, Verse Egg",
"Sunken City, bulb on top of the boss area",
"Octopus Cave, Dumbo Egg",
"Beating the Golem",
"Beating Mergog",
"Beating Crabbius Maximus",
"Beating Octopus Prime",
"Beating Mantis Shrimp Prime",
"King Jellyfish Cave, Jellyfish Costume",
"King Jellyfish Cave, bulb in the right path from King Jelly",
"Beating King Jellyfish God Prime",
"Beating Mithalan priests",
"Sunken City cleared"
"Sunken City cleared",
]
items = [["Beast form"]]
self.assertAccessDependency(locations, items)

View File

@@ -0,0 +1,39 @@
"""
Author: Louis M
Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the beast form or arnassi armor
"""
from . import AquariaTestBase
class BeastForArnassiArmormAccessTest(AquariaTestBase):
"""Unit test used to test accessibility of locations with and without the beast form or arnassi armor"""
def test_beast_form_arnassi_armor_location(self) -> None:
"""Test locations that require beast form or arnassi armor"""
locations = [
"Mithalas City Castle, beating the Priests",
"Arnassi Ruins, Crab Armor",
"Arnassi Ruins, Song Plant Spore",
"Mithalas City, first bulb at the end of the top path",
"Mithalas City, second bulb at the end of the top path",
"Mithalas City, bulb in the top path",
"Mithalas City, Mithalas Pot",
"Mithalas City, urn in the Castle flower tube entrance",
"Mermog cave, Piranha Egg",
"Mithalas Cathedral, Mithalan Dress",
"Kelp Forest top left area, Jelly Egg",
"The Veil top right area, bulb in the middle of the wall jump cliff",
"The Veil top right area, bulb at the top of the waterfall",
"Sunken City, bulb on top of the boss area",
"Octopus Cave, Dumbo Egg",
"Beating the Golem",
"Beating Mergog",
"Beating Crabbius Maximus",
"Beating Octopus Prime",
"Beating Mithalan priests",
"Sunken City cleared"
]
items = [["Beast form", "Arnassi Armor"]]
self.assertAccessDependency(locations, items)

View File

@@ -5,7 +5,7 @@ Description: Unit test used to test accessibility of locations with and without
under rock needing bind song option)
"""
from worlds.aquaria.test import AquariaTestBase, after_home_water_locations
from . import AquariaTestBase, after_home_water_locations
class BindSongAccessTest(AquariaTestBase):

View File

@@ -5,8 +5,8 @@ Description: Unit test used to test accessibility of locations with and without
under rock needing bind song option)
"""
from worlds.aquaria.test import AquariaTestBase
from worlds.aquaria.test.test_bind_song_access import after_home_water_locations
from . import AquariaTestBase
from .test_bind_song_access import after_home_water_locations
class BindSongOptionAccessTest(AquariaTestBase):

View File

@@ -4,7 +4,7 @@ Date: Fri, 03 May 2024 14:07:35 +0000
Description: Unit test used to test accessibility of region with the home water confine via option
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class ConfinedHomeWaterAccessTest(AquariaTestBase):

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the dual song
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class LiAccessTest(AquariaTestBase):

View File

@@ -5,7 +5,7 @@ Description: Unit test used to test accessibility of locations with and without
energy form option)
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class EnergyFormAccessTest(AquariaTestBase):
@@ -17,55 +17,16 @@ class EnergyFormAccessTest(AquariaTestBase):
def test_energy_form_location(self) -> None:
"""Test locations that require Energy form"""
locations = [
"Home Water, Nautilus Egg",
"Naija's Home, bulb after the energy door",
"Energy Temple first area, bulb in the bottom room blocked by a rock",
"Energy Temple second area, bulb under the rock",
"Energy Temple bottom entrance, Krotite Armor",
"Energy Temple third area, bulb in the bottom path",
"Energy Temple boss area, Fallen God Tooth",
"Energy Temple blaster room, Blaster Egg",
"Mithalas City Castle, beating the Priests",
"Mithalas Cathedral, first urn in the top right room",
"Mithalas Cathedral, second urn in the top right room",
"Mithalas Cathedral, third urn in the top right room",
"Mithalas Cathedral, urn in the flesh room with fleas",
"Mithalas Cathedral, first urn in the bottom right path",
"Mithalas Cathedral, second urn in the bottom right path",
"Mithalas Cathedral, urn behind the flesh vein",
"Mithalas Cathedral, urn in the top left eyes boss room",
"Mithalas Cathedral, first urn in the path behind the flesh vein",
"Mithalas Cathedral, second urn in the path behind the flesh vein",
"Mithalas Cathedral, third urn in the path behind the flesh vein",
"Mithalas Cathedral, fourth urn in the top right room",
"Mithalas Cathedral, Mithalan Dress",
"Mithalas Cathedral right area, urn below the left entrance",
"Cathedral boss area, beating Mithalan God",
"Kelp Forest top left area, bulb close to the Verse Egg",
"Kelp Forest top left area, Verse Egg",
"Kelp Forest boss area, beating Drunian God",
"Mermog cave, Piranha Egg",
"Octopus Cave, Dumbo Egg",
"Sun Temple boss area, beating Sun God",
"Arnassi Ruins, Crab Armor",
"King Jellyfish Cave, bulb in the right path from King Jelly",
"King Jellyfish Cave, Jellyfish Costume",
"Sunken City, bulb on top of the boss area",
"The Body left area, first bulb in the top face room",
"The Body left area, second bulb in the top face room",
"The Body left area, bulb below the water stream",
"The Body left area, bulb in the top path to the top face room",
"The Body left area, bulb in the bottom face room",
"The Body right area, bulb in the top path to the bottom face room",
"The Body right area, bulb in the bottom face room",
"Final Boss area, bulb in the boss third form room",
"Beating Fallen God",
"Beating Mithalan God",
"Beating Drunian God",
"Beating Sun God",
"Beating the Golem",
"Beating Nautilus Prime",
"Beating Blaster Peg Prime",
"Beating Mergog",
"Beating Mithalan priests",
"Beating Octopus Prime",
"Beating Crabbius Maximus",
"Beating King Jellyfish God Prime",
"First secret",
"Sunken City cleared",
"Objective complete",
]
items = [["Energy form"]]

View File

@@ -0,0 +1,92 @@
"""
Author: Louis M
Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the energy form and dual form (and Li)
"""
from . import AquariaTestBase
class EnergyFormDualFormAccessTest(AquariaTestBase):
"""Unit test used to test accessibility of locations with and without the energy form and dual form (and Li)"""
options = {
"early_energy_form": False,
}
def test_energy_form_or_dual_form_location(self) -> None:
"""Test locations that require Energy form or dual form"""
locations = [
"Naija's Home, bulb after the energy door",
"Home Water, Nautilus Egg",
"Energy Temple second area, bulb under the rock",
"Energy Temple bottom entrance, Krotite Armor",
"Energy Temple third area, bulb in the bottom path",
"Energy Temple blaster room, Blaster Egg",
"Energy Temple boss area, Fallen God Tooth",
"Mithalas City Castle, beating the Priests",
"Mithalas boss area, beating Mithalan God",
"Mithalas Cathedral, first urn in the top right room",
"Mithalas Cathedral, second urn in the top right room",
"Mithalas Cathedral, third urn in the top right room",
"Mithalas Cathedral, urn in the flesh room with fleas",
"Mithalas Cathedral, first urn in the bottom right path",
"Mithalas Cathedral, second urn in the bottom right path",
"Mithalas Cathedral, urn behind the flesh vein",
"Mithalas Cathedral, urn in the top left eyes boss room",
"Mithalas Cathedral, first urn in the path behind the flesh vein",
"Mithalas Cathedral, second urn in the path behind the flesh vein",
"Mithalas Cathedral, third urn in the path behind the flesh vein",
"Mithalas Cathedral, fourth urn in the top right room",
"Mithalas Cathedral, Mithalan Dress",
"Mithalas Cathedral, urn below the left entrance",
"Kelp Forest top left area, bulb close to the Verse Egg",
"Kelp Forest top left area, Verse Egg",
"Kelp Forest boss area, beating Drunian God",
"Mermog cave, Piranha Egg",
"Octopus Cave, Dumbo Egg",
"Sun Temple boss area, beating Sun God",
"King Jellyfish Cave, bulb in the right path from King Jelly",
"King Jellyfish Cave, Jellyfish Costume",
"Sunken City right area, crate close to the save crystal",
"Sunken City right area, crate in the left bottom room",
"Sunken City left area, crate in the little pipe room",
"Sunken City left area, crate close to the save crystal",
"Sunken City left area, crate before the bedroom",
"Sunken City left area, Girl Costume",
"Sunken City, bulb on top of the boss area",
"The Body center area, breaking Li's cage",
"The Body center area, bulb on the main path blocking tube",
"The Body left area, first bulb in the top face room",
"The Body left area, second bulb in the top face room",
"The Body left area, bulb below the water stream",
"The Body left area, bulb in the top path to the top face room",
"The Body left area, bulb in the bottom face room",
"The Body right area, bulb in the top face room",
"The Body right area, bulb in the top path to the bottom face room",
"The Body right area, bulb in the bottom face room",
"The Body bottom area, bulb in the Jelly Zap room",
"The Body bottom area, bulb in the nautilus room",
"The Body bottom area, Mutant Costume",
"Final Boss area, bulb in the boss third form room",
"Final Boss area, first bulb in the turtle room",
"Final Boss area, second bulb in the turtle room",
"Final Boss area, third bulb in the turtle room",
"Final Boss area, Transturtle",
"Beating Fallen God",
"Beating Blaster Peg Prime",
"Beating Mithalan God",
"Beating Drunian God",
"Beating Sun God",
"Beating the Golem",
"Beating Nautilus Prime",
"Beating Mergog",
"Beating Mithalan priests",
"Beating Octopus Prime",
"Beating King Jellyfish God Prime",
"Beating the Golem",
"Sunken City cleared",
"First secret",
"Objective complete"
]
items = [["Energy form", "Dual form", "Li and Li song", "Body tongue cleared"]]
self.assertAccessDependency(locations, items)

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the fish form
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class FishFormAccessTest(AquariaTestBase):
@@ -17,6 +17,7 @@ class FishFormAccessTest(AquariaTestBase):
"""Test locations that require fish form"""
locations = [
"The Veil top left area, bulb inside the fish pass",
"Energy Temple first area, Energy Idol",
"Mithalas City, Doll",
"Mithalas City, urn inside a home fish pass",
"Kelp Forest top right area, bulb in the top fish pass",
@@ -30,8 +31,7 @@ class FishFormAccessTest(AquariaTestBase):
"Octopus Cave, Dumbo Egg",
"Octopus Cave, bulb in the path below the Octopus Cave path",
"Beating Octopus Prime",
"Abyss left area, bulb in the bottom fish pass",
"Arnassi Ruins, Arnassi Armor"
"Abyss left area, bulb in the bottom fish pass"
]
items = [["Fish form"]]
self.assertAccessDependency(locations, items)

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without Li
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class LiAccessTest(AquariaTestBase):
@@ -24,7 +24,7 @@ class LiAccessTest(AquariaTestBase):
"Sunken City left area, Girl Costume",
"Sunken City, bulb on top of the boss area",
"The Body center area, breaking Li's cage",
"The Body main area, bulb on the main path blocking tube",
"The Body center area, bulb on the main path blocking tube",
"The Body left area, first bulb in the top face room",
"The Body left area, second bulb in the top face room",
"The Body left area, bulb below the water stream",

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without a light (Dumbo pet or sun form)
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class LightAccessTest(AquariaTestBase):
@@ -39,7 +39,6 @@ class LightAccessTest(AquariaTestBase):
"Abyss right area, bulb in the middle path",
"Abyss right area, bulb behind the rock in the middle path",
"Abyss right area, bulb in the left green room",
"Abyss right area, Transturtle",
"Ice Cave, bulb in the room to the right",
"Ice Cave, first bulb in the top exit room",
"Ice Cave, second bulb in the top exit room",

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the nature form
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class NatureFormAccessTest(AquariaTestBase):
@@ -38,7 +38,7 @@ class NatureFormAccessTest(AquariaTestBase):
"Beating the Golem",
"Sunken City cleared",
"The Body center area, breaking Li's cage",
"The Body main area, bulb on the main path blocking tube",
"The Body center area, bulb on the main path blocking tube",
"The Body left area, first bulb in the top face room",
"The Body left area, second bulb in the top face room",
"The Body left area, bulb below the water stream",

View File

@@ -4,7 +4,7 @@ Date: Fri, 03 May 2024 14:07:35 +0000
Description: Unit test used to test that no progression items can be put in hard or hidden locations when option enabled
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
from BaseClasses import ItemClassification
@@ -16,7 +16,7 @@ class UNoProgressionHardHiddenTest(AquariaTestBase):
unfillable_locations = [
"Energy Temple boss area, Fallen God Tooth",
"Cathedral boss area, beating Mithalan God",
"Mithalas boss area, beating Mithalan God",
"Kelp Forest boss area, beating Drunian God",
"Sun Temple boss area, beating Sun God",
"Sunken City, bulb on top of the boss area",
@@ -35,7 +35,7 @@ class UNoProgressionHardHiddenTest(AquariaTestBase):
"Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
"Bubble Cave, Verse Egg",
"Kelp Forest bottom left area, bulb close to the spirit crystals",
"Kelp Forest bottom left area, Walker baby",
"Kelp Forest bottom left area, Walker Baby",
"Sun Temple, Sun Key",
"The Body bottom area, Mutant Costume",
"Sun Temple, bulb in the hidden room of the right part",

View File

@@ -4,8 +4,7 @@ Date: Fri, 03 May 2024 14:07:35 +0000
Description: Unit test used to test that progression items can be put in hard or hidden locations when option disabled
"""
from worlds.aquaria.test import AquariaTestBase
from BaseClasses import ItemClassification
from . import AquariaTestBase
class UNoProgressionHardHiddenTest(AquariaTestBase):
@@ -16,7 +15,7 @@ class UNoProgressionHardHiddenTest(AquariaTestBase):
unfillable_locations = [
"Energy Temple boss area, Fallen God Tooth",
"Cathedral boss area, beating Mithalan God",
"Mithalas boss area, beating Mithalan God",
"Kelp Forest boss area, beating Drunian God",
"Sun Temple boss area, beating Sun God",
"Sunken City, bulb on top of the boss area",
@@ -35,7 +34,7 @@ class UNoProgressionHardHiddenTest(AquariaTestBase):
"Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
"Bubble Cave, Verse Egg",
"Kelp Forest bottom left area, bulb close to the spirit crystals",
"Kelp Forest bottom left area, Walker baby",
"Kelp Forest bottom left area, Walker Baby",
"Sun Temple, Sun Key",
"The Body bottom area, Mutant Costume",
"Sun Temple, bulb in the hidden room of the right part",

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the spirit form
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class SpiritFormAccessTest(AquariaTestBase):
@@ -16,7 +16,7 @@ class SpiritFormAccessTest(AquariaTestBase):
"The Veil bottom area, bulb in the spirit path",
"Mithalas City Castle, Trident Head",
"Open Water skeleton path, King Skull",
"Kelp Forest bottom left area, Walker baby",
"Kelp Forest bottom left area, Walker Baby",
"Abyss right area, bulb behind the rock in the whale room",
"The Whale, Verse Egg",
"Ice Cave, bulb in the room to the right",
@@ -30,7 +30,6 @@ class SpiritFormAccessTest(AquariaTestBase):
"Sunken City left area, Girl Costume",
"Beating Mantis Shrimp Prime",
"First secret",
"Arnassi Ruins, Arnassi Armor",
]
items = [["Spirit form"]]
self.assertAccessDependency(locations, items)

View File

@@ -4,7 +4,7 @@ Date: Thu, 18 Apr 2024 18:45:56 +0000
Description: Unit test used to test accessibility of locations with and without the sun form
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class SunFormAccessTest(AquariaTestBase):

View File

@@ -5,7 +5,7 @@ Description: Unit test used to test accessibility of region with the unconfined
turtle and energy door
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class UnconfineHomeWaterBothAccessTest(AquariaTestBase):

View File

@@ -4,7 +4,7 @@ Date: Fri, 03 May 2024 14:07:35 +0000
Description: Unit test used to test accessibility of region with the unconfined home water option via the energy door
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class UnconfineHomeWaterEnergyDoorAccessTest(AquariaTestBase):

View File

@@ -4,7 +4,7 @@ Date: Fri, 03 May 2024 14:07:35 +0000
Description: Unit test used to test accessibility of region with the unconfined home water option via transturtle
"""
from worlds.aquaria.test import AquariaTestBase
from . import AquariaTestBase
class UnconfineHomeWaterTransturtleAccessTest(AquariaTestBase):

View File

@@ -762,7 +762,7 @@ location_table: List[LocationDict] = [
'game_id': "graf385"},
{'name': "Tagged 389 Graffiti Spots",
'stage': Stages.Misc,
'game_id': "graf379"},
'game_id': "graf389"},
]

View File

@@ -1006,6 +1006,8 @@ def rules(brcworld):
lambda state: mataan_challenge2(state, player, limit, glitched))
set_rule(multiworld.get_location("Mataan: Score challenge reward", player),
lambda state: mataan_challenge3(state, player))
set_rule(multiworld.get_location("Mataan: Coil joins the crew", player),
lambda state: mataan_deepest(state, player, limit, glitched))
if photos:
set_rule(multiworld.get_location("Mataan: Trash Polo", player),
lambda state: camera(state, player))

View File

@@ -3,8 +3,8 @@ import typing
class ItemData(typing.NamedTuple):
code: typing.Optional[int]
progression: bool
code: int
progression: bool = True
class ChecksFinderItem(Item):
@@ -12,16 +12,9 @@ class ChecksFinderItem(Item):
item_table = {
"Map Width": ItemData(80000, True),
"Map Height": ItemData(80001, True),
"Map Bombs": ItemData(80002, True),
"Map Width": ItemData(80000),
"Map Height": ItemData(80001),
"Map Bombs": ItemData(80002),
}
required_items = {
}
item_frequencies = {
}
lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in item_table.items() if data.code}
lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in item_table.items()}

View File

@@ -3,46 +3,14 @@ import typing
class AdvData(typing.NamedTuple):
id: typing.Optional[int]
region: str
id: int
region: str = "Board"
class ChecksFinderAdvancement(Location):
class ChecksFinderLocation(Location):
game: str = "ChecksFinder"
advancement_table = {
"Tile 1": AdvData(81000, 'Board'),
"Tile 2": AdvData(81001, 'Board'),
"Tile 3": AdvData(81002, 'Board'),
"Tile 4": AdvData(81003, 'Board'),
"Tile 5": AdvData(81004, 'Board'),
"Tile 6": AdvData(81005, 'Board'),
"Tile 7": AdvData(81006, 'Board'),
"Tile 8": AdvData(81007, 'Board'),
"Tile 9": AdvData(81008, 'Board'),
"Tile 10": AdvData(81009, 'Board'),
"Tile 11": AdvData(81010, 'Board'),
"Tile 12": AdvData(81011, 'Board'),
"Tile 13": AdvData(81012, 'Board'),
"Tile 14": AdvData(81013, 'Board'),
"Tile 15": AdvData(81014, 'Board'),
"Tile 16": AdvData(81015, 'Board'),
"Tile 17": AdvData(81016, 'Board'),
"Tile 18": AdvData(81017, 'Board'),
"Tile 19": AdvData(81018, 'Board'),
"Tile 20": AdvData(81019, 'Board'),
"Tile 21": AdvData(81020, 'Board'),
"Tile 22": AdvData(81021, 'Board'),
"Tile 23": AdvData(81022, 'Board'),
"Tile 24": AdvData(81023, 'Board'),
"Tile 25": AdvData(81024, 'Board'),
}
exclusion_table = {
}
events_table = {
}
lookup_id_to_name: typing.Dict[int, str] = {data.id: item_name for item_name, data in advancement_table.items() if data.id}
base_id = 81000
advancement_table = {f"Tile {i+1}": AdvData(base_id+i) for i in range(25)}
lookup_id_to_name: typing.Dict[int, str] = {data.id: item_name for item_name, data in advancement_table.items()}

View File

@@ -1,6 +0,0 @@
import typing
from Options import Option
checksfinder_options: typing.Dict[str, type(Option)] = {
}

View File

@@ -1,44 +1,24 @@
from ..generic.Rules import set_rule
from BaseClasses import MultiWorld, CollectionState
from worlds.generic.Rules import set_rule
from BaseClasses import MultiWorld
def _has_total(state: CollectionState, player: int, total: int):
return (state.count('Map Width', player) + state.count('Map Height', player) +
state.count('Map Bombs', player)) >= total
items = ["Map Width", "Map Height", "Map Bombs"]
# Sets rules on entrances and advancements that are always applied
def set_rules(world: MultiWorld, player: int):
set_rule(world.get_location("Tile 6", player), lambda state: _has_total(state, player, 1))
set_rule(world.get_location("Tile 7", player), lambda state: _has_total(state, player, 2))
set_rule(world.get_location("Tile 8", player), lambda state: _has_total(state, player, 3))
set_rule(world.get_location("Tile 9", player), lambda state: _has_total(state, player, 4))
set_rule(world.get_location("Tile 10", player), lambda state: _has_total(state, player, 5))
set_rule(world.get_location("Tile 11", player), lambda state: _has_total(state, player, 6))
set_rule(world.get_location("Tile 12", player), lambda state: _has_total(state, player, 7))
set_rule(world.get_location("Tile 13", player), lambda state: _has_total(state, player, 8))
set_rule(world.get_location("Tile 14", player), lambda state: _has_total(state, player, 9))
set_rule(world.get_location("Tile 15", player), lambda state: _has_total(state, player, 10))
set_rule(world.get_location("Tile 16", player), lambda state: _has_total(state, player, 11))
set_rule(world.get_location("Tile 17", player), lambda state: _has_total(state, player, 12))
set_rule(world.get_location("Tile 18", player), lambda state: _has_total(state, player, 13))
set_rule(world.get_location("Tile 19", player), lambda state: _has_total(state, player, 14))
set_rule(world.get_location("Tile 20", player), lambda state: _has_total(state, player, 15))
set_rule(world.get_location("Tile 21", player), lambda state: _has_total(state, player, 16))
set_rule(world.get_location("Tile 22", player), lambda state: _has_total(state, player, 17))
set_rule(world.get_location("Tile 23", player), lambda state: _has_total(state, player, 18))
set_rule(world.get_location("Tile 24", player), lambda state: _has_total(state, player, 19))
set_rule(world.get_location("Tile 25", player), lambda state: _has_total(state, player, 20))
def set_rules(multiworld: MultiWorld, player: int):
for i in range(20):
set_rule(multiworld.get_location(f"Tile {i+6}", player), lambda state, i=i: state.has_from_list(items, player, i+1))
# Sets rules on completion condition
def set_completion_rules(world: MultiWorld, player: int):
width_req = 10-5
height_req = 10-5
bomb_req = 20-5
completion_requirements = lambda state: \
state.has("Map Width", player, width_req) and \
state.has("Map Height", player, height_req) and \
state.has("Map Bombs", player, bomb_req)
world.completion_condition[player] = lambda state: completion_requirements(state)
def set_completion_rules(multiworld: MultiWorld, player: int):
width_req = 5 # 10 - 5
height_req = 5 # 10 - 5
bomb_req = 15 # 20 - 5
multiworld.completion_condition[player] = lambda state: state.has_all_counts(
{
"Map Width": width_req,
"Map Height": height_req,
"Map Bombs": bomb_req,
}, player)

View File

@@ -1,9 +1,9 @@
from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification
from .Items import ChecksFinderItem, item_table, required_items
from .Locations import ChecksFinderAdvancement, advancement_table, exclusion_table
from .Options import checksfinder_options
from BaseClasses import Region, Entrance, Tutorial, ItemClassification
from .Items import ChecksFinderItem, item_table
from .Locations import ChecksFinderLocation, advancement_table
from Options import PerGameCommonOptions
from .Rules import set_rules, set_completion_rules
from ..AutoWorld import World, WebWorld
from worlds.AutoWorld import World, WebWorld
client_version = 7
@@ -25,38 +25,34 @@ class ChecksFinderWorld(World):
ChecksFinder is a game where you avoid mines and find checks inside the board
with the mines! You win when you get all your items and beat the board!
"""
game: str = "ChecksFinder"
option_definitions = checksfinder_options
topology_present = True
game = "ChecksFinder"
options_dataclass = PerGameCommonOptions
web = ChecksFinderWeb()
item_name_to_id = {name: data.code for name, data in item_table.items()}
location_name_to_id = {name: data.id for name, data in advancement_table.items()}
def _get_checksfinder_data(self):
return {
'world_seed': self.multiworld.per_slot_randoms[self.player].getrandbits(32),
'seed_name': self.multiworld.seed_name,
'player_name': self.multiworld.get_player_name(self.player),
'player_id': self.player,
'client_version': client_version,
'race': self.multiworld.is_race,
}
def create_regions(self):
menu = Region("Menu", self.player, self.multiworld)
board = Region("Board", self.player, self.multiworld)
board.locations += [ChecksFinderLocation(self.player, loc_name, loc_data.id, board)
for loc_name, loc_data in advancement_table.items()]
connection = Entrance(self.player, "New Board", menu)
menu.exits.append(connection)
connection.connect(board)
self.multiworld.regions += [menu, board]
def create_items(self):
# Generate item pool
itempool = []
# Add all required progression items
for (name, num) in required_items.items():
itempool += [name] * num
# Add the map width and height stuff
itempool += ["Map Width"] * (10-5)
itempool += ["Map Height"] * (10-5)
itempool += ["Map Width"] * 5 # 10 - 5
itempool += ["Map Height"] * 5 # 10 - 5
# Add the map bombs
itempool += ["Map Bombs"] * (20-5)
itempool += ["Map Bombs"] * 15 # 20 - 5
# Convert itempool into real items
itempool = [item for item in map(lambda name: self.create_item(name), itempool)]
itempool = [self.create_item(item) for item in itempool]
self.multiworld.itempool += itempool
@@ -64,28 +60,16 @@ class ChecksFinderWorld(World):
set_rules(self.multiworld, self.player)
set_completion_rules(self.multiworld, self.player)
def create_regions(self):
menu = Region("Menu", self.player, self.multiworld)
board = Region("Board", self.player, self.multiworld)
board.locations += [ChecksFinderAdvancement(self.player, loc_name, loc_data.id, board)
for loc_name, loc_data in advancement_table.items() if loc_data.region == board.name]
connection = Entrance(self.player, "New Board", menu)
menu.exits.append(connection)
connection.connect(board)
self.multiworld.regions += [menu, board]
def fill_slot_data(self):
slot_data = self._get_checksfinder_data()
for option_name in checksfinder_options:
option = getattr(self.multiworld, option_name)[self.player]
if slot_data.get(option_name, None) is None and type(option.value) in {str, int}:
slot_data[option_name] = int(option.value)
return slot_data
return {
"world_seed": self.random.getrandbits(32),
"seed_name": self.multiworld.seed_name,
"player_name": self.player_name,
"player_id": self.player,
"client_version": client_version,
"race": self.multiworld.is_race,
}
def create_item(self, name: str) -> Item:
def create_item(self, name: str) -> ChecksFinderItem:
item_data = item_table[name]
item = ChecksFinderItem(name,
ItemClassification.progression if item_data.progression else ItemClassification.filler,
item_data.code, self.player)
return item
return ChecksFinderItem(name, ItemClassification.progression, item_data.code, self.player)

View File

@@ -24,8 +24,3 @@ next to an icon, the number is how many you have gotten and the icon represents
Victory is achieved when the player wins a board they were given after they have received all of their Map Width, Map
Height, and Map Bomb items. The game will say at the bottom of the screen how many of each you have received.
## Unique Local Commands
The following command is only available when using the ChecksFinderClient to play with Archipelago.
- `/resync` Manually trigger a resync.

View File

@@ -4,7 +4,6 @@
- ChecksFinder from
the [Github releases Page for the game](https://github.com/jonloveslegos/ChecksFinder/releases) (latest version)
- Archipelago from the [Archipelago Releases Page](https://github.com/ArchipelagoMW/Archipelago/releases)
## Configuring your YAML file
@@ -17,28 +16,15 @@ guide: [Basic Multiworld Setup Guide](/tutorial/Archipelago/setup/en)
You can customize your options by visiting the [ChecksFinder Player Options Page](/games/ChecksFinder/player-options)
### Generating a ChecksFinder game
## Joining a MultiWorld Game
**ChecksFinder is meant to be played _alongside_ another game! You may not be playing it for long periods of time if
you play it by itself with another person!**
When you join a multiworld game, you will be asked to provide your YAML file to whoever is hosting. Once that is done,
the host will provide you with either a link to download your data file, or with a zip file containing everyone's data
files. You do not have a file inside that zip though!
You need to start ChecksFinder client yourself, it is located within the Archipelago folder.
### Connect to the MultiServer
First start ChecksFinder.
Once both ChecksFinder and the client are started. In the client at the top type in the spot labeled `Server` type the
`Ip Address` and `Port` separated with a `:` symbol.
The client will then ask for the username you chose, input that in the text box at the bottom of the client.
### Play the game
When the console tells you that you have joined the room, you're all set. Congratulations on successfully joining a
multiworld game!
1. Start ChecksFinder
2. Enter the following information:
- Enter the server url (starting from `wss://` for https connection like archipelago.gg, and starting from `ws://` for http connection and local multiserver)
- Enter server port
- Enter the name of the slot you wish to connect to
- Enter the room password (optional)
- Press `Play Online` to connect
3. Start playing!
Game options and controls are described in the readme on the github repository for the game

View File

@@ -1,6 +1,9 @@
from typing import Callable, Dict, NamedTuple, Optional
from typing import Callable, Dict, NamedTuple, Optional, TYPE_CHECKING
from BaseClasses import Item, ItemClassification, MultiWorld
from BaseClasses import Item, ItemClassification
if TYPE_CHECKING:
from . import CliqueWorld
class CliqueItem(Item):
@@ -10,7 +13,7 @@ class CliqueItem(Item):
class CliqueItemData(NamedTuple):
code: Optional[int] = None
type: ItemClassification = ItemClassification.filler
can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True
can_create: Callable[["CliqueWorld"], bool] = lambda world: True
item_data_table: Dict[str, CliqueItemData] = {
@@ -21,11 +24,11 @@ item_data_table: Dict[str, CliqueItemData] = {
"Button Activation": CliqueItemData(
code=69696968,
type=ItemClassification.progression,
can_create=lambda multiworld, player: bool(getattr(multiworld, "hard_mode")[player]),
can_create=lambda world: world.options.hard_mode,
),
"A Cool Filler Item (No Satisfaction Guaranteed)": CliqueItemData(
code=69696967,
can_create=lambda multiworld, player: False # Only created from `get_filler_item_name`.
can_create=lambda world: False # Only created from `get_filler_item_name`.
),
"The Urge to Push": CliqueItemData(
type=ItemClassification.progression,

View File

@@ -1,6 +1,9 @@
from typing import Callable, Dict, NamedTuple, Optional
from typing import Callable, Dict, NamedTuple, Optional, TYPE_CHECKING
from BaseClasses import Location, MultiWorld
from BaseClasses import Location
if TYPE_CHECKING:
from . import CliqueWorld
class CliqueLocation(Location):
@@ -10,7 +13,7 @@ class CliqueLocation(Location):
class CliqueLocationData(NamedTuple):
region: str
address: Optional[int] = None
can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True
can_create: Callable[["CliqueWorld"], bool] = lambda world: True
locked_item: Optional[str] = None
@@ -22,7 +25,7 @@ location_data_table: Dict[str, CliqueLocationData] = {
"The Item on the Desk": CliqueLocationData(
region="The Button Realm",
address=69696968,
can_create=lambda multiworld, player: bool(getattr(multiworld, "hard_mode")[player]),
can_create=lambda world: world.options.hard_mode,
),
"In the Player's Mind": CliqueLocationData(
region="The Button Realm",

View File

@@ -1,6 +1,5 @@
from typing import Dict
from Options import Choice, Option, Toggle
from dataclasses import dataclass
from Options import Choice, Toggle, PerGameCommonOptions, StartInventoryPool
class HardMode(Toggle):
@@ -25,10 +24,11 @@ class ButtonColor(Choice):
option_black = 11
clique_options: Dict[str, type(Option)] = {
"color": ButtonColor,
"hard_mode": HardMode,
@dataclass
class CliqueOptions(PerGameCommonOptions):
color: ButtonColor
hard_mode: HardMode
start_inventory_from_pool: StartInventoryPool
# DeathLink is always on. Always.
# "death_link": DeathLink,
}
# death_link: DeathLink

View File

@@ -1,10 +1,13 @@
from typing import Callable
from typing import Callable, TYPE_CHECKING
from BaseClasses import CollectionState, MultiWorld
from BaseClasses import CollectionState
if TYPE_CHECKING:
from . import CliqueWorld
def get_button_rule(multiworld: MultiWorld, player: int) -> Callable[[CollectionState], bool]:
if getattr(multiworld, "hard_mode")[player]:
return lambda state: state.has("Button Activation", player)
def get_button_rule(world: "CliqueWorld") -> Callable[[CollectionState], bool]:
if world.options.hard_mode:
return lambda state: state.has("Button Activation", world.player)
return lambda state: True

View File

@@ -1,10 +1,10 @@
from typing import List
from typing import List, Dict, Any
from BaseClasses import Region, Tutorial
from worlds.AutoWorld import WebWorld, World
from .Items import CliqueItem, item_data_table, item_table
from .Locations import CliqueLocation, location_data_table, location_table, locked_locations
from .Options import clique_options
from .Options import CliqueOptions
from .Regions import region_data_table
from .Rules import get_button_rule
@@ -38,7 +38,8 @@ class CliqueWorld(World):
game = "Clique"
web = CliqueWebWorld()
option_definitions = clique_options
options: CliqueOptions
options_dataclass = CliqueOptions
location_name_to_id = location_table
item_name_to_id = item_table
@@ -48,7 +49,7 @@ class CliqueWorld(World):
def create_items(self) -> None:
item_pool: List[CliqueItem] = []
for name, item in item_data_table.items():
if item.code and item.can_create(self.multiworld, self.player):
if item.code and item.can_create(self):
item_pool.append(self.create_item(name))
self.multiworld.itempool += item_pool
@@ -61,41 +62,40 @@ class CliqueWorld(World):
# Create locations.
for region_name, region_data in region_data_table.items():
region = self.multiworld.get_region(region_name, self.player)
region = self.get_region(region_name)
region.add_locations({
location_name: location_data.address for location_name, location_data in location_data_table.items()
if location_data.region == region_name and location_data.can_create(self.multiworld, self.player)
if location_data.region == region_name and location_data.can_create(self)
}, CliqueLocation)
region.add_exits(region_data_table[region_name].connecting_regions)
# Place locked locations.
for location_name, location_data in locked_locations.items():
# Ignore locations we never created.
if not location_data.can_create(self.multiworld, self.player):
if not location_data.can_create(self):
continue
locked_item = self.create_item(location_data_table[location_name].locked_item)
self.multiworld.get_location(location_name, self.player).place_locked_item(locked_item)
self.get_location(location_name).place_locked_item(locked_item)
# Set priority location for the Big Red Button!
self.multiworld.priority_locations[self.player].value.add("The Big Red Button")
self.options.priority_locations.value.add("The Big Red Button")
def get_filler_item_name(self) -> str:
return "A Cool Filler Item (No Satisfaction Guaranteed)"
def set_rules(self) -> None:
button_rule = get_button_rule(self.multiworld, self.player)
self.multiworld.get_location("The Big Red Button", self.player).access_rule = button_rule
self.multiworld.get_location("In the Player's Mind", self.player).access_rule = button_rule
button_rule = get_button_rule(self)
self.get_location("The Big Red Button").access_rule = button_rule
self.get_location("In the Player's Mind").access_rule = button_rule
# Do not allow button activations on buttons.
self.multiworld.get_location("The Big Red Button", self.player).item_rule =\
lambda item: item.name != "Button Activation"
self.get_location("The Big Red Button").item_rule = lambda item: item.name != "Button Activation"
# Completion condition.
self.multiworld.completion_condition[self.player] = lambda state: state.has("The Urge to Push", self.player)
def fill_slot_data(self):
def fill_slot_data(self) -> Dict[str, Any]:
return {
"color": getattr(self.multiworld, "color")[self.player].current_key
"color": self.options.color.current_key
}

View File

@@ -1,5 +1,6 @@
from dataclasses import dataclass
from Options import OptionGroup, Choice, DefaultOnToggle, Range, Toggle, PerGameCommonOptions, StartInventoryPool
from Options import (OptionGroup, Choice, DefaultOnToggle, ItemsAccessibility, PerGameCommonOptions, Range, Toggle,
StartInventoryPool)
class CharacterStages(Choice):
@@ -521,6 +522,7 @@ class DeathLink(Choice):
@dataclass
class CV64Options(PerGameCommonOptions):
accessibility: ItemsAccessibility
start_inventory_from_pool: StartInventoryPool
character_stages: CharacterStages
stage_shuffle: StageShuffle

View File

@@ -0,0 +1,264 @@
# In almost all cases, we leave boss and enemy randomization up to the static randomizer. But for
# Yhorm specifically we need to know where he ends up in order to ensure that the Storm Ruler is
# available before his fight.
from dataclasses import dataclass, field
from typing import Set
@dataclass
class DS3BossInfo:
"""The set of locations a given boss location blocks access to."""
name: str
"""The boss's name."""
id: int
"""The game's ID for this particular boss."""
dlc: bool = False
"""This boss appears in one of the game's DLCs."""
before_storm_ruler: bool = False
"""Whether this location appears before it's possible to get Storm Ruler in vanilla.
This is used to determine whether it's safe to place Yhorm here if weapons
aren't randomized.
"""
locations: Set[str] = field(default_factory=set)
"""Additional individual locations that can't be accessed until the boss is dead."""
# Note: the static randomizer splits up some bosses into separate fights for separate phases, each
# of which can be individually replaced by Yhorm.
all_bosses = [
DS3BossInfo("Iudex Gundyr", 4000800, before_storm_ruler = True, locations = {
"CA: Coiled Sword - boss drop"
}),
DS3BossInfo("Vordt of the Boreal Valley", 3000800, before_storm_ruler = True, locations = {
"HWL: Soul of Boreal Valley Vordt"
}),
DS3BossInfo("Curse-rotted Greatwood", 3100800, locations = {
"US: Soul of the Rotted Greatwood",
"US: Transposing Kiln - boss drop",
"US: Wargod Wooden Shield - Pit of Hollows",
"FS: Hawkwood's Shield - gravestone after Hawkwood leaves",
"FS: Sunset Shield - by grave after killing Hodrick w/Sirris",
"US: Sunset Helm - Pit of Hollows after killing Hodrick w/Sirris",
"US: Sunset Armor - pit of hollows after killing Hodrick w/Sirris",
"US: Sunset Gauntlets - pit of hollows after killing Hodrick w/Sirris",
"US: Sunset Leggings - pit of hollows after killing Hodrick w/Sirris",
"FS: Sunless Talisman - Sirris, kill GA boss",
"FS: Sunless Veil - shop, Sirris quest, kill GA boss",
"FS: Sunless Armor - shop, Sirris quest, kill GA boss",
"FS: Sunless Gauntlets - shop, Sirris quest, kill GA boss",
"FS: Sunless Leggings - shop, Sirris quest, kill GA boss",
}),
DS3BossInfo("Crystal Sage", 3300850, locations = {
"RS: Soul of a Crystal Sage",
"FS: Sage's Big Hat - shop after killing RS boss",
"FS: Hawkwood's Shield - gravestone after Hawkwood leaves",
}),
DS3BossInfo("Deacons of the Deep", 3500800, locations = {
"CD: Soul of the Deacons of the Deep",
"CD: Small Doll - boss drop",
"FS: Hawkwood's Shield - gravestone after Hawkwood leaves",
}),
DS3BossInfo("Abyss Watchers", 3300801, before_storm_ruler = True, locations = {
"FK: Soul of the Blood of the Wolf",
"FK: Cinders of a Lord - Abyss Watcher",
"FS: Undead Legion Helm - shop after killing FK boss",
"FS: Undead Legion Armor - shop after killing FK boss",
"FS: Undead Legion Gauntlet - shop after killing FK boss",
"FS: Undead Legion Leggings - shop after killing FK boss",
"FS: Farron Ring - Hawkwood",
"FS: Hawkwood's Shield - gravestone after Hawkwood leaves",
}),
DS3BossInfo("High Lord Wolnir", 3800800, before_storm_ruler = True, locations = {
"CC: Soul of High Lord Wolnir",
"FS: Wolnir's Crown - shop after killing CC boss",
"CC: Homeward Bone - Irithyll bridge",
"CC: Pontiff's Right Eye - Irithyll bridge, miniboss drop",
}),
DS3BossInfo("Pontiff Sulyvahn", 3700850, locations = {
"IBV: Soul of Pontiff Sulyvahn",
}),
DS3BossInfo("Old Demon King", 3800830, locations = {
"SL: Soul of the Old Demon King",
}),
DS3BossInfo("Aldrich, Devourer of Gods", 3700800, locations = {
"AL: Soul of Aldrich",
"AL: Cinders of a Lord - Aldrich",
"FS: Smough's Helm - shop after killing AL boss",
"FS: Smough's Armor - shop after killing AL boss",
"FS: Smough's Gauntlets - shop after killing AL boss",
"FS: Smough's Leggings - shop after killing AL boss",
"AL: Sun Princess Ring - dark cathedral, after boss",
"FS: Leonhard's Garb - shop after killing Leonhard",
"FS: Leonhard's Gauntlets - shop after killing Leonhard",
"FS: Leonhard's Trousers - shop after killing Leonhard",
}),
DS3BossInfo("Dancer of the Boreal Valley", 3000899, locations = {
"HWL: Soul of the Dancer",
"FS: Dancer's Crown - shop after killing LC entry boss",
"FS: Dancer's Armor - shop after killing LC entry boss",
"FS: Dancer's Gauntlets - shop after killing LC entry boss",
"FS: Dancer's Leggings - shop after killing LC entry boss",
}),
DS3BossInfo("Dragonslayer Armour", 3010800, locations = {
"LC: Soul of Dragonslayer Armour",
"FS: Morne's Helm - shop after killing Eygon or LC boss",
"FS: Morne's Armor - shop after killing Eygon or LC boss",
"FS: Morne's Gauntlets - shop after killing Eygon or LC boss",
"FS: Morne's Leggings - shop after killing Eygon or LC boss",
"LC: Titanite Chunk - down stairs after boss",
}),
DS3BossInfo("Consumed King Oceiros", 3000830, locations = {
"CKG: Soul of Consumed Oceiros",
"CKG: Titanite Scale - tomb, chest #1",
"CKG: Titanite Scale - tomb, chest #2",
"CKG: Drakeblood Helm - tomb, after killing AP mausoleum NPC",
"CKG: Drakeblood Armor - tomb, after killing AP mausoleum NPC",
"CKG: Drakeblood Gauntlets - tomb, after killing AP mausoleum NPC",
"CKG: Drakeblood Leggings - tomb, after killing AP mausoleum NPC",
}),
DS3BossInfo("Champion Gundyr", 4000830, locations = {
"UG: Soul of Champion Gundyr",
"FS: Gundyr's Helm - shop after killing UG boss",
"FS: Gundyr's Armor - shop after killing UG boss",
"FS: Gundyr's Gauntlets - shop after killing UG boss",
"FS: Gundyr's Leggings - shop after killing UG boss",
"UG: Hornet Ring - environs, right of main path after killing FK boss",
"UG: Chaos Blade - environs, left of shrine",
"UG: Blacksmith Hammer - shrine, Andre's room",
"UG: Eyes of a Fire Keeper - shrine, Irina's room",
"UG: Coiled Sword Fragment - shrine, dead bonfire",
"UG: Soul of a Crestfallen Knight - environs, above shrine entrance",
"UG: Life Ring+3 - shrine, behind big throne",
"UG: Ring of Steel Protection+1 - environs, behind bell tower",
"FS: Ring of Sacrifice - Yuria shop",
"UG: Ember - shop",
"UG: Priestess Ring - shop",
"UG: Wolf Knight Helm - shop after killing FK boss",
"UG: Wolf Knight Armor - shop after killing FK boss",
"UG: Wolf Knight Gauntlets - shop after killing FK boss",
"UG: Wolf Knight Leggings - shop after killing FK boss",
}),
DS3BossInfo("Ancient Wyvern", 3200800),
DS3BossInfo("King of the Storm", 3200850, locations = {
"AP: Soul of the Nameless King",
"FS: Golden Crown - shop after killing AP boss",
"FS: Dragonscale Armor - shop after killing AP boss",
"FS: Golden Bracelets - shop after killing AP boss",
"FS: Dragonscale Waistcloth - shop after killing AP boss",
"AP: Titanite Slab - plaza",
"AP: Covetous Gold Serpent Ring+2 - plaza",
"AP: Dragonslayer Helm - plaza",
"AP: Dragonslayer Armor - plaza",
"AP: Dragonslayer Gauntlets - plaza",
"AP: Dragonslayer Leggings - plaza",
}),
DS3BossInfo("Nameless King", 3200851, locations = {
"AP: Soul of the Nameless King",
"FS: Golden Crown - shop after killing AP boss",
"FS: Dragonscale Armor - shop after killing AP boss",
"FS: Golden Bracelets - shop after killing AP boss",
"FS: Dragonscale Waistcloth - shop after killing AP boss",
"AP: Titanite Slab - plaza",
"AP: Covetous Gold Serpent Ring+2 - plaza",
"AP: Dragonslayer Helm - plaza",
"AP: Dragonslayer Armor - plaza",
"AP: Dragonslayer Gauntlets - plaza",
"AP: Dragonslayer Leggings - plaza",
}),
DS3BossInfo("Lothric, Younger Prince", 3410830, locations = {
"GA: Soul of the Twin Princes",
"GA: Cinders of a Lord - Lothric Prince",
}),
DS3BossInfo("Lorian, Elder Prince", 3410832, locations = {
"GA: Soul of the Twin Princes",
"GA: Cinders of a Lord - Lothric Prince",
"FS: Lorian's Helm - shop after killing GA boss",
"FS: Lorian's Armor - shop after killing GA boss",
"FS: Lorian's Gauntlets - shop after killing GA boss",
"FS: Lorian's Leggings - shop after killing GA boss",
}),
DS3BossInfo("Champion's Gravetender and Gravetender Greatwolf", 4500860, dlc = True,
locations = {"PW1: Valorheart - boss drop"}),
DS3BossInfo("Sister Friede", 4500801, dlc = True, locations = {
"PW2: Soul of Sister Friede",
"PW2: Titanite Slab - boss drop",
"PW1: Titanite Slab - Corvian",
"FS: Ordained Hood - shop after killing PW2 boss",
"FS: Ordained Dress - shop after killing PW2 boss",
"FS: Ordained Trousers - shop after killing PW2 boss",
}),
DS3BossInfo("Blackflame Friede", 4500800, dlc = True, locations = {
"PW2: Soul of Sister Friede",
"PW1: Titanite Slab - Corvian",
"FS: Ordained Hood - shop after killing PW2 boss",
"FS: Ordained Dress - shop after killing PW2 boss",
"FS: Ordained Trousers - shop after killing PW2 boss",
}),
DS3BossInfo("Demon Prince", 5000801, dlc = True, locations = {
"DH: Soul of the Demon Prince",
"DH: Small Envoy Banner - boss drop",
}),
DS3BossInfo("Halflight, Spear of the Church", 5100800, dlc = True, locations = {
"RC: Titanite Slab - mid boss drop",
"RC: Titanite Slab - ashes, NPC drop",
"RC: Titanite Slab - ashes, mob drop",
"RC: Filianore's Spear Ornament - mid boss drop",
"RC: Crucifix of the Mad King - ashes, NPC drop",
"RC: Shira's Crown - Shira's room after killing ashes NPC",
"RC: Shira's Armor - Shira's room after killing ashes NPC",
"RC: Shira's Gloves - Shira's room after killing ashes NPC",
"RC: Shira's Trousers - Shira's room after killing ashes NPC",
}),
DS3BossInfo("Darkeater Midir", 5100850, dlc = True, locations = {
"RC: Soul of Darkeater Midir",
"RC: Spears of the Church - hidden boss drop",
}),
DS3BossInfo("Slave Knight Gael 1", 5110801, dlc = True, locations = {
"RC: Soul of Slave Knight Gael",
"RC: Blood of the Dark Soul - end boss drop",
# These are accessible before you trigger the boss, but once you do you
# have to beat it before getting them.
"RC: Titanite Slab - ashes, mob drop",
"RC: Titanite Slab - ashes, NPC drop",
"RC: Sacred Chime of Filianore - ashes, NPC drop",
"RC: Crucifix of the Mad King - ashes, NPC drop",
"RC: Shira's Crown - Shira's room after killing ashes NPC",
"RC: Shira's Armor - Shira's room after killing ashes NPC",
"RC: Shira's Gloves - Shira's room after killing ashes NPC",
"RC: Shira's Trousers - Shira's room after killing ashes NPC",
}),
DS3BossInfo("Slave Knight Gael 2", 5110800, dlc = True, locations = {
"RC: Soul of Slave Knight Gael",
"RC: Blood of the Dark Soul - end boss drop",
# These are accessible before you trigger the boss, but once you do you
# have to beat it before getting them.
"RC: Titanite Slab - ashes, mob drop",
"RC: Titanite Slab - ashes, NPC drop",
"RC: Sacred Chime of Filianore - ashes, NPC drop",
"RC: Crucifix of the Mad King - ashes, NPC drop",
"RC: Shira's Crown - Shira's room after killing ashes NPC",
"RC: Shira's Armor - Shira's room after killing ashes NPC",
"RC: Shira's Gloves - Shira's room after killing ashes NPC",
"RC: Shira's Trousers - Shira's room after killing ashes NPC",
}),
DS3BossInfo("Lords of Cinder", 4100800, locations = {
"KFF: Soul of the Lords",
"FS: Billed Mask - Yuria after killing KFF boss",
"FS: Black Dress - Yuria after killing KFF boss",
"FS: Black Gauntlets - Yuria after killing KFF boss",
"FS: Black Leggings - Yuria after killing KFF boss"
}),
]
default_yhorm_location = DS3BossInfo("Yhorm the Giant", 3900800, locations = {
"PC: Soul of Yhorm the Giant",
"PC: Cinders of a Lord - Yhorm the Giant",
"PC: Siegbräu - Siegward after killing boss",
})

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,80 +1,78 @@
import typing
from dataclasses import dataclass
import json
from typing import Any, Dict
from Options import Toggle, DefaultOnToggle, Option, Range, Choice, ItemDict, DeathLink
from Options import Choice, DeathLink, DefaultOnToggle, ExcludeLocations, NamedRange, OptionDict, \
OptionGroup, PerGameCommonOptions, Range, Removed, Toggle
## Game Options
class RandomizeWeaponLocations(DefaultOnToggle):
"""Randomizes weapons (+76 locations)"""
display_name = "Randomize Weapon Locations"
class EarlySmallLothricBanner(Choice):
"""Force Small Lothric Banner into an early sphere in your world or across all worlds."""
display_name = "Early Small Lothric Banner"
option_off = 0
option_early_global = 1
option_early_local = 2
default = option_off
class RandomizeShieldLocations(DefaultOnToggle):
"""Randomizes shields (+24 locations)"""
display_name = "Randomize Shield Locations"
class LateBasinOfVowsOption(Choice):
"""Guarantee that you don't need to enter Lothric Castle until later in the run.
- **Off:** You may have to enter Lothric Castle and the areas beyond it immediately after High
Wall of Lothric.
- **After Small Lothric Banner:** You may have to enter Lothric Castle after Catacombs of
Carthus.
- **After Small Doll:** You won't have to enter Lothric Castle until after Irithyll of the
Boreal Valley.
"""
display_name = "Late Basin of Vows"
option_off = 0
alias_false = 0
option_after_small_lothric_banner = 1
alias_true = 1
option_after_small_doll = 2
class RandomizeArmorLocations(DefaultOnToggle):
"""Randomizes armor pieces (+97 locations)"""
display_name = "Randomize Armor Locations"
class LateDLCOption(Choice):
"""Guarantee that you don't need to enter the DLC until later in the run.
- **Off:** You may have to enter the DLC after Catacombs of Carthus.
- **After Small Doll:** You may have to enter the DLC after Irithyll of the Boreal Valley.
- **After Basin:** You won't have to enter the DLC until after Lothric Castle.
"""
display_name = "Late DLC"
option_off = 0
alias_false = 0
option_after_small_doll = 1
alias_true = 1
option_after_basin = 2
class RandomizeRingLocations(DefaultOnToggle):
"""Randomizes rings (+49 locations)"""
display_name = "Randomize Ring Locations"
class EnableDLCOption(Toggle):
"""Include DLC locations, items, and enemies in the randomized pools.
To use this option, you must own both the "Ashes of Ariandel" and the "Ringed City" DLCs.
"""
display_name = "Enable DLC"
class RandomizeSpellLocations(DefaultOnToggle):
"""Randomizes spells (+18 locations)"""
display_name = "Randomize Spell Locations"
class EnableNGPOption(Toggle):
"""Include items and locations exclusive to NG+ cycles."""
display_name = "Enable NG+"
class RandomizeKeyLocations(DefaultOnToggle):
"""Randomizes items which unlock doors or bypass barriers"""
display_name = "Randomize Key Locations"
## Equipment
class RandomizeStartingLoadout(DefaultOnToggle):
"""Randomizes the equipment characters begin with."""
display_name = "Randomize Starting Loadout"
class RandomizeBossSoulLocations(DefaultOnToggle):
"""Randomizes Boss Souls (+18 Locations)"""
display_name = "Randomize Boss Soul Locations"
class RandomizeNPCLocations(Toggle):
"""Randomizes friendly NPC drops (meaning you will probably have to kill them) (+14 locations)"""
display_name = "Randomize NPC Locations"
class RandomizeMiscLocations(Toggle):
"""Randomizes miscellaneous items (ashes, tomes, scrolls, etc.) to the pool. (+36 locations)"""
display_name = "Randomize Miscellaneous Locations"
class RandomizeHealthLocations(Toggle):
"""Randomizes health upgrade items. (+21 locations)"""
display_name = "Randomize Health Upgrade Locations"
class RandomizeProgressiveLocationsOption(Toggle):
"""Randomizes upgrade materials and consumables such as the titanite shards, firebombs, resin, etc...
Instead of specific locations, these are progressive, so Titanite Shard #1 is the first titanite shard
you pick up, regardless of whether it's from an enemy drop late in the game or an item on the ground in the
first 5 minutes."""
display_name = "Randomize Progressive Locations"
class PoolTypeOption(Choice):
"""Changes which non-progression items you add to the pool
Shuffle: Items are picked from the locations being randomized
Various: Items are picked from a list of all items in the game, but are the same type of item they replace"""
display_name = "Pool Type"
option_shuffle = 0
option_various = 1
class GuaranteedItemsOption(ItemDict):
"""Guarantees that the specified items will be in the item pool"""
display_name = "Guaranteed Items"
class RequireOneHandedStartingWeapons(DefaultOnToggle):
"""Require starting equipment to be usable one-handed."""
display_name = "Require One-Handed Starting Weapons"
class AutoEquipOption(Toggle):
@@ -83,47 +81,56 @@ class AutoEquipOption(Toggle):
class LockEquipOption(Toggle):
"""Lock the equipment slots so you cannot change your armor or your left/right weapons. Works great with the
Auto-equip option."""
"""Lock the equipment slots so you cannot change your armor or your left/right weapons.
Works great with the Auto-equip option.
"""
display_name = "Lock Equipment Slots"
class NoEquipLoadOption(Toggle):
"""Disable the equip load constraint from the game."""
display_name = "No Equip Load"
class NoWeaponRequirementsOption(Toggle):
"""Disable the weapon requirements by removing any movement or damage penalties.
Permitting you to use any weapon early"""
"""Disable the weapon requirements by removing any movement or damage penalties, permitting you
to use any weapon early.
"""
display_name = "No Weapon Requirements"
class NoSpellRequirementsOption(Toggle):
"""Disable the spell requirements permitting you to use any spell"""
"""Disable the spell requirements permitting you to use any spell."""
display_name = "No Spell Requirements"
class NoEquipLoadOption(Toggle):
"""Disable the equip load constraint from the game"""
display_name = "No Equip Load"
## Weapons
class RandomizeInfusionOption(Toggle):
"""Enable this option to infuse a percentage of the pool of weapons and shields."""
display_name = "Randomize Infusion"
class RandomizeInfusionPercentageOption(Range):
"""The percentage of weapons/shields in the pool to be infused if Randomize Infusion is toggled"""
class RandomizeInfusionPercentageOption(NamedRange):
"""The percentage of weapons/shields in the pool to be infused if Randomize Infusion is toggled.
"""
display_name = "Percentage of Infused Weapons"
range_start = 0
range_end = 100
default = 33
# 3/155 weapons are infused in the base game, or about 2%
special_range_names = {"similar to base game": 2}
class RandomizeWeaponLevelOption(Choice):
"""Enable this option to upgrade a percentage of the pool of weapons to a random value between the minimum and
maximum levels defined.
"""Enable this option to upgrade a percentage of the pool of weapons to a random value between
the minimum and maximum levels defined.
All: All weapons are eligible, both basic and epic
Basic: Only weapons that can be upgraded to +10
Epic: Only weapons that can be upgraded to +5"""
- **All:** All weapons are eligible, both basic and epic
- **Basic:** Only weapons that can be upgraded to +10
- **Epic:** Only weapons that can be upgraded to +5
"""
display_name = "Randomize Weapon Level"
option_none = 0
option_all = 1
@@ -132,7 +139,7 @@ class RandomizeWeaponLevelOption(Choice):
class RandomizeWeaponLevelPercentageOption(Range):
"""The percentage of weapons in the pool to be upgraded if randomize weapons level is toggled"""
"""The percentage of weapons in the pool to be upgraded if randomize weapons level is toggled."""
display_name = "Percentage of Randomized Weapons"
range_start = 0
range_end = 100
@@ -140,7 +147,7 @@ class RandomizeWeaponLevelPercentageOption(Range):
class MinLevelsIn5WeaponPoolOption(Range):
"""The minimum upgraded value of a weapon in the pool of weapons that can only reach +5"""
"""The minimum upgraded value of a weapon in the pool of weapons that can only reach +5."""
display_name = "Minimum Level of +5 Weapons"
range_start = 0
range_end = 5
@@ -148,7 +155,7 @@ class MinLevelsIn5WeaponPoolOption(Range):
class MaxLevelsIn5WeaponPoolOption(Range):
"""The maximum upgraded value of a weapon in the pool of weapons that can only reach +5"""
"""The maximum upgraded value of a weapon in the pool of weapons that can only reach +5."""
display_name = "Maximum Level of +5 Weapons"
range_start = 0
range_end = 5
@@ -156,7 +163,7 @@ class MaxLevelsIn5WeaponPoolOption(Range):
class MinLevelsIn10WeaponPoolOption(Range):
"""The minimum upgraded value of a weapon in the pool of weapons that can reach +10"""
"""The minimum upgraded value of a weapon in the pool of weapons that can reach +10."""
display_name = "Minimum Level of +10 Weapons"
range_start = 0
range_end = 10
@@ -164,72 +171,308 @@ class MinLevelsIn10WeaponPoolOption(Range):
class MaxLevelsIn10WeaponPoolOption(Range):
"""The maximum upgraded value of a weapon in the pool of weapons that can reach +10"""
"""The maximum upgraded value of a weapon in the pool of weapons that can reach +10."""
display_name = "Maximum Level of +10 Weapons"
range_start = 0
range_end = 10
default = 10
class EarlySmallLothricBanner(Choice):
"""This option makes it so the user can choose to force the Small Lothric Banner into an early sphere in their world or
into an early sphere across all worlds."""
display_name = "Early Small Lothric Banner"
option_off = 0
option_early_global = 1
option_early_local = 2
default = option_off
## Item Smoothing
class SmoothSoulItemsOption(DefaultOnToggle):
"""Distribute soul items in a similar order as the base game.
By default, soul items will be distributed totally randomly. If this is set, less valuable soul
items will generally appear in earlier spheres and more valuable ones will generally appear
later.
"""
display_name = "Smooth Soul Items"
class LateBasinOfVowsOption(Toggle):
"""This option makes it so the Basin of Vows is still randomized, but guarantees you that you wont have to venture into
Lothric Castle to find your Small Lothric Banner to get out of High Wall of Lothric. So you may find Basin of Vows early,
but you wont have to fight Dancer to find your Small Lothric Banner."""
display_name = "Late Basin of Vows"
class SmoothUpgradeItemsOption(DefaultOnToggle):
"""Distribute upgrade items in a similar order as the base game.
By default, upgrade items will be distributed totally randomly. If this is set, lower-level
upgrade items will generally appear in earlier spheres and higher-level ones will generally
appear later.
"""
display_name = "Smooth Upgrade Items"
class LateDLCOption(Toggle):
"""This option makes it so you are guaranteed to find your Small Doll without having to venture off into the DLC,
effectively putting anything in the DLC in logic after finding both Contraption Key and Small Doll,
and being able to get into Irithyll of the Boreal Valley."""
display_name = "Late DLC"
class SmoothUpgradedWeaponsOption(DefaultOnToggle):
"""Distribute upgraded weapons in a similar order as the base game.
By default, upgraded weapons will be distributed totally randomly. If this is set, lower-level
weapons will generally appear in earlier spheres and higher-level ones will generally appear
later.
"""
display_name = "Smooth Upgraded Weapons"
class EnableDLCOption(Toggle):
"""To use this option, you must own both the ASHES OF ARIANDEL and the RINGED CITY DLC"""
display_name = "Enable DLC"
### Enemies
class RandomizeEnemiesOption(DefaultOnToggle):
"""Randomize enemy and boss placements."""
display_name = "Randomize Enemies"
dark_souls_options: typing.Dict[str, Option] = {
"enable_weapon_locations": RandomizeWeaponLocations,
"enable_shield_locations": RandomizeShieldLocations,
"enable_armor_locations": RandomizeArmorLocations,
"enable_ring_locations": RandomizeRingLocations,
"enable_spell_locations": RandomizeSpellLocations,
"enable_key_locations": RandomizeKeyLocations,
"enable_boss_locations": RandomizeBossSoulLocations,
"enable_npc_locations": RandomizeNPCLocations,
"enable_misc_locations": RandomizeMiscLocations,
"enable_health_upgrade_locations": RandomizeHealthLocations,
"enable_progressive_locations": RandomizeProgressiveLocationsOption,
"pool_type": PoolTypeOption,
"guaranteed_items": GuaranteedItemsOption,
"auto_equip": AutoEquipOption,
"lock_equip": LockEquipOption,
"no_weapon_requirements": NoWeaponRequirementsOption,
"randomize_infusion": RandomizeInfusionOption,
"randomize_infusion_percentage": RandomizeInfusionPercentageOption,
"randomize_weapon_level": RandomizeWeaponLevelOption,
"randomize_weapon_level_percentage": RandomizeWeaponLevelPercentageOption,
"min_levels_in_5": MinLevelsIn5WeaponPoolOption,
"max_levels_in_5": MaxLevelsIn5WeaponPoolOption,
"min_levels_in_10": MinLevelsIn10WeaponPoolOption,
"max_levels_in_10": MaxLevelsIn10WeaponPoolOption,
"early_banner": EarlySmallLothricBanner,
"late_basin_of_vows": LateBasinOfVowsOption,
"late_dlc": LateDLCOption,
"no_spell_requirements": NoSpellRequirementsOption,
"no_equip_load": NoEquipLoadOption,
"death_link": DeathLink,
"enable_dlc": EnableDLCOption,
}
class SimpleEarlyBossesOption(DefaultOnToggle):
"""Avoid replacing Iudex Gundyr and Vordt with late bosses.
This excludes all bosses after Dancer of the Boreal Valley from these two boss fights. Disable
it for a chance at a much harder early game.
This is ignored unless enemies are randomized.
"""
display_name = "Simple Early Bosses"
class ScaleEnemiesOption(DefaultOnToggle):
"""Scale randomized enemy stats to match the areas in which they appear.
Disabling this will tend to make the early game much more difficult and the late game much
easier.
This is ignored unless enemies are randomized.
"""
display_name = "Scale Enemies"
class RandomizeMimicsWithEnemiesOption(Toggle):
"""Mix Mimics into the main enemy pool.
If this is enabled, Mimics will be replaced by normal enemies who drop the Mimic rewards on
death, and Mimics will be placed randomly in place of normal enemies. It's recommended to enable
Impatient Mimics as well if you enable this.
This is ignored unless enemies are randomized.
"""
display_name = "Randomize Mimics With Enemies"
class RandomizeSmallCrystalLizardsWithEnemiesOption(Toggle):
"""Mix small Crystal Lizards into the main enemy pool.
If this is enabled, Crystal Lizards will be replaced by normal enemies who drop the Crystal
Lizard rewards on death, and Crystal Lizards will be placed randomly in place of normal enemies.
This is ignored unless enemies are randomized.
"""
display_name = "Randomize Small Crystal Lizards With Enemies"
class ReduceHarmlessEnemiesOption(Toggle):
"""Reduce the frequency that "harmless" enemies appear.
Enable this to add a bit of extra challenge. This severely limits the number of enemies that are
slow to aggro, slow to attack, and do very little damage that appear in the enemy pool.
This is ignored unless enemies are randomized.
"""
display_name = "Reduce Harmless Enemies"
class AllChestsAreMimicsOption(Toggle):
"""Replace all chests with mimics that drop the same items.
If "Randomize Mimics With Enemies" is set, these chests will instead be replaced with random
enemies that drop the same items.
This is ignored unless enemies are randomized.
"""
display_name = "All Chests Are Mimics"
class ImpatientMimicsOption(Toggle):
"""Mimics attack as soon as you get close instead of waiting for you to open them.
This is ignored unless enemies are randomized.
"""
display_name = "Impatient Mimics"
class RandomEnemyPresetOption(OptionDict):
"""The YAML preset for the static enemy randomizer.
See the static randomizer documentation in `randomizer\\presets\\README.txt` for details.
Include this as nested YAML. For example:
.. code-block:: YAML
random_enemy_preset:
RemoveSource: Ancient Wyvern; Darkeater Midir
DontRandomize: Iudex Gundyr
"""
display_name = "Random Enemy Preset"
supports_weighting = False
default = {}
valid_keys = ["Description", "RecommendFullRandomization", "RecommendNoEnemyProgression",
"OopsAll", "Boss", "Miniboss", "Basic", "BuffBasicEnemiesAsBosses",
"DontRandomize", "RemoveSource", "Enemies"]
@classmethod
def get_option_name(cls, value: Dict[str, Any]) -> str:
return json.dumps(value)
## Item & Location
class DS3ExcludeLocations(ExcludeLocations):
"""Prevent these locations from having an important item."""
default = frozenset({"Hidden", "Small Crystal Lizards", "Upgrade", "Small Souls", "Miscellaneous"})
class ExcludedLocationBehaviorOption(Choice):
"""How to choose items for excluded locations in DS3.
- **Allow Useful:** Excluded locations can't have progression items, but they can have useful
items.
- **Forbid Useful:** Neither progression items nor useful items can be placed in excluded
locations.
- **Do Not Randomize:** Excluded locations always contain the same item as in vanilla Dark Souls
III.
A "progression item" is anything that's required to unlock another location in some game. A
"useful item" is something each game defines individually, usually items that are quite
desirable but not strictly necessary.
"""
display_name = "Excluded Locations Behavior"
option_allow_useful = 1
option_forbid_useful = 2
option_do_not_randomize = 3
default = 2
class MissableLocationBehaviorOption(Choice):
"""Which items can be placed in locations that can be permanently missed.
- **Allow Useful:** Missable locations can't have progression items, but they can have useful
items.
- **Forbid Useful:** Neither progression items nor useful items can be placed in missable
locations.
- **Do Not Randomize:** Missable locations always contain the same item as in vanilla Dark Souls
III.
A "progression item" is anything that's required to unlock another location in some game. A
"useful item" is something each game defines individually, usually items that are quite
desirable but not strictly necessary.
"""
display_name = "Missable Locations Behavior"
option_allow_useful = 1
option_forbid_useful = 2
option_do_not_randomize = 3
default = 2
@dataclass
class DarkSouls3Options(PerGameCommonOptions):
# Game Options
early_banner: EarlySmallLothricBanner
late_basin_of_vows: LateBasinOfVowsOption
late_dlc: LateDLCOption
death_link: DeathLink
enable_dlc: EnableDLCOption
enable_ngp: EnableNGPOption
# Equipment
random_starting_loadout: RandomizeStartingLoadout
require_one_handed_starting_weapons: RequireOneHandedStartingWeapons
auto_equip: AutoEquipOption
lock_equip: LockEquipOption
no_equip_load: NoEquipLoadOption
no_weapon_requirements: NoWeaponRequirementsOption
no_spell_requirements: NoSpellRequirementsOption
# Weapons
randomize_infusion: RandomizeInfusionOption
randomize_infusion_percentage: RandomizeInfusionPercentageOption
randomize_weapon_level: RandomizeWeaponLevelOption
randomize_weapon_level_percentage: RandomizeWeaponLevelPercentageOption
min_levels_in_5: MinLevelsIn5WeaponPoolOption
max_levels_in_5: MaxLevelsIn5WeaponPoolOption
min_levels_in_10: MinLevelsIn10WeaponPoolOption
max_levels_in_10: MaxLevelsIn10WeaponPoolOption
# Item Smoothing
smooth_soul_items: SmoothSoulItemsOption
smooth_upgrade_items: SmoothUpgradeItemsOption
smooth_upgraded_weapons: SmoothUpgradedWeaponsOption
# Enemies
randomize_enemies: RandomizeEnemiesOption
simple_early_bosses: SimpleEarlyBossesOption
scale_enemies: ScaleEnemiesOption
randomize_mimics_with_enemies: RandomizeMimicsWithEnemiesOption
randomize_small_crystal_lizards_with_enemies: RandomizeSmallCrystalLizardsWithEnemiesOption
reduce_harmless_enemies: ReduceHarmlessEnemiesOption
all_chests_are_mimics: AllChestsAreMimicsOption
impatient_mimics: ImpatientMimicsOption
random_enemy_preset: RandomEnemyPresetOption
# Item & Location
exclude_locations: DS3ExcludeLocations
excluded_location_behavior: ExcludedLocationBehaviorOption
missable_location_behavior: MissableLocationBehaviorOption
# Removed
pool_type: Removed
enable_weapon_locations: Removed
enable_shield_locations: Removed
enable_armor_locations: Removed
enable_ring_locations: Removed
enable_spell_locations: Removed
enable_key_locations: Removed
enable_boss_locations: Removed
enable_npc_locations: Removed
enable_misc_locations: Removed
enable_health_upgrade_locations: Removed
enable_progressive_locations: Removed
guaranteed_items: Removed
excluded_locations: Removed
missable_locations: Removed
option_groups = [
OptionGroup("Equipment", [
RandomizeStartingLoadout,
RequireOneHandedStartingWeapons,
AutoEquipOption,
LockEquipOption,
NoEquipLoadOption,
NoWeaponRequirementsOption,
NoSpellRequirementsOption,
]),
OptionGroup("Weapons", [
RandomizeInfusionOption,
RandomizeInfusionPercentageOption,
RandomizeWeaponLevelOption,
RandomizeWeaponLevelPercentageOption,
MinLevelsIn5WeaponPoolOption,
MaxLevelsIn5WeaponPoolOption,
MinLevelsIn10WeaponPoolOption,
MaxLevelsIn10WeaponPoolOption,
]),
OptionGroup("Item Smoothing", [
SmoothSoulItemsOption,
SmoothUpgradeItemsOption,
SmoothUpgradedWeaponsOption,
]),
OptionGroup("Enemies", [
RandomizeEnemiesOption,
SimpleEarlyBossesOption,
ScaleEnemiesOption,
RandomizeMimicsWithEnemiesOption,
RandomizeSmallCrystalLizardsWithEnemiesOption,
ReduceHarmlessEnemiesOption,
AllChestsAreMimicsOption,
ImpatientMimicsOption,
RandomEnemyPresetOption,
]),
OptionGroup("Item & Location Options", [
DS3ExcludeLocations,
ExcludedLocationBehaviorOption,
MissableLocationBehaviorOption,
])
]

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,97 @@
# python -m worlds.dark_souls_3.detailed_location_descriptions \
# worlds/dark_souls_3/detailed_location_descriptions.py
#
# This script downloads the static randomizer's descriptions for each location and adds them to
# the location documentation.
from collections import defaultdict
import html
import os
import re
import requests
import yaml
from .Locations import location_dictionary
location_re = re.compile(r'^([A-Z0-9]+): (.*?)(?:$| - )')
if __name__ == '__main__':
# TODO: update this to the main branch of the main randomizer once Archipelago support is merged
url = 'https://raw.githubusercontent.com/nex3/SoulsRandomizers/archipelago-server/dist/Base/annotations.txt'
response = requests.get(url)
if response.status_code != 200:
raise Exception(f"Got {response.status_code} when downloading static randomizer locations")
annotations = yaml.load(response.text, Loader=yaml.Loader)
static_to_archi_regions = {
area['Name']: area['Archipelago']
for area in annotations['Areas']
}
descriptions_by_key = {slot['Key']: slot['Text'] for slot in annotations['Slots']}
# A map from (region, item name) pairs to all the descriptions that match those pairs.
descriptions_by_location = defaultdict(list)
# A map from item names to all the descriptions for those item names.
descriptions_by_item = defaultdict(list)
for slot in annotations['Slots']:
region = static_to_archi_regions[slot['Area']]
for item in slot['DebugText']:
name = item.split(" - ")[0]
descriptions_by_location[(region, name)].append(slot['Text'])
descriptions_by_item[name].append(slot['Text'])
counts_by_location = {
location: len(descriptions) for (location, descriptions) in descriptions_by_location.items()
}
location_names_to_descriptions = {}
for location in location_dictionary.values():
if location.ap_code is None: continue
if location.static:
location_names_to_descriptions[location.name] = descriptions_by_key[location.static]
continue
match = location_re.match(location.name)
if not match:
raise Exception(f"Location name \"{location.name}\" doesn't match expected format.")
item_candidates = descriptions_by_item[match[2]]
if len(item_candidates) == 1:
location_names_to_descriptions[location.name] = item_candidates[0]
continue
key = (match[1], match[2])
if key not in descriptions_by_location:
raise Exception(f'No static randomizer location found matching "{match[1]}: {match[2]}".')
candidates = descriptions_by_location[key]
if len(candidates) == 0:
raise Exception(
f'There are only {counts_by_location[key]} locations in the static randomizer ' +
f'matching "{match[1]}: {match[2]}", but there are more in Archipelago.'
)
location_names_to_descriptions[location.name] = candidates.pop(0)
table = "<table><tr><th>Location name</th><th>Detailed description</th>\n"
for (name, description) in sorted(
location_names_to_descriptions.items(),
key = lambda pair: pair[0]
):
table += f"<tr><td>{html.escape(name)}</td><td>{html.escape(description)}</td></tr>\n"
table += "</table>\n"
with open(os.path.join(os.path.dirname(__file__), 'docs/locations_en.md'), 'r+') as f:
original = f.read()
start_flag = "<!-- begin location table -->\n"
start = original.index(start_flag) + len(start_flag)
end = original.index("<!-- end location table -->")
f.seek(0)
f.write(original[:start] + table + original[end:])
f.truncate()
print("Updated docs/locations_en.md!")

View File

@@ -1,28 +1,201 @@
# Dark Souls III
Game Page | [Items] | [Locations]
[Items]: /tutorial/Dark%20Souls%20III/items/en
[Locations]: /tutorial/Dark%20Souls%20III/locations/en
## What do I need to do to randomize DS3?
See full instructions on [the setup page].
[the setup page]: /tutorial/Dark%20Souls%20III/setup/en
## Where is the options page?
The [player options page for this game](../player-options) contains all the options you need to configure and export a
config file.
The [player options page for this game][options] contains all the options you
need to configure and export a config file.
[options]: ../player-options
## What does randomization do to this game?
Items that can be picked up from static corpses, taken from chests, or earned from defeating enemies or NPCs can be
randomized. Common pickups like titanite shards or firebombs can be randomized as "progressive" items. That is, the
location "Titanite Shard #5" is the fifth titanite shard you pick up, no matter where it was from. This is also what
happens when you randomize Estus Shards and Undead Bone Shards.
1. All item locations are randomized, including those in the overworld, in
shops, and dropped by enemies. Most locations can contain games from other
worlds, and any items from your world can appear in other players' worlds.
It's also possible to randomize the upgrade level of weapons and shields as well as their infusions (if they can have
one). Additionally, there are options that can make the randomized experience more convenient or more interesting, such as
removing weapon requirements or auto-equipping whatever equipment you most recently received.
2. By default, all enemies and bosses are randomized. This can be disabled by
setting "Randomize Enemies" to false.
The goal is to find the four "Cinders of a Lord" items randomized into the multiworld and defeat the Soul of Cinder.
3. By default, the starting equipment for each class is randomized. This can be
disabled by setting "Randomize Starting Loadout" to false.
## What Dark Souls III items can appear in other players' worlds?
4. By setting the "Randomize Weapon Level" or "Randomize Infusion" options, you
can randomize whether the weapons you find will be upgraded or infused.
Practically anything can be found in other worlds including pieces of armor, upgraded weapons, key items, consumables,
spells, upgrade materials, etc...
There are also options that can make playing the game more convenient or
bring a new experience, like removing equip loads or auto-equipping weapons as
you pick them up. Check out [the options page][options] for more!
## What does another world's item look like in Dark Souls III?
## What's the goal?
In Dark Souls III, items which are sent to other worlds appear as Prism Stones.
Your goal is to find the four "Cinders of a Lord" items randomized into the
multiworld and defeat the boss in the Kiln of the First Flame.
## Do I have to check every item in every area?
Dark Souls III has about 1500 item locations, which is a lot of checks for a
single run! But you don't necessarily need to check all of them. Locations that
you can potentially miss, such as rewards for failable quests or soul
transposition items, will _never_ have items required for any game to progress.
The following types of locations are also guaranteed not to contain progression
items by default:
* **Hidden:** Locations that are particularly difficult to find, such as behind
illusory walls, down hidden drops, and so on. Does not include large locations
like Untended Graves or Archdragon Peak.
* **Small Crystal Lizards:** Drops from small crystal lizards.
* **Upgrade:** Locations that contain upgrade items in vanilla, including
titanite, gems, and Shriving Stones.
* **Small Souls:** Locations that contain soul items in vanilla, not including
boss souls.
* **Miscellaneous:** Locations that contain generic stackable items in vanilla,
such as arrows, firebombs, buffs, and so on.
You can customize which locations are guaranteed not to contain progression
items by setting the `exclude_locations` field in your YAML to the [location
groups] you want to omit. For example, this is the default setting but without
"Hidden" so that hidden locations can contain progression items:
[location groups]: /tutorial/Dark%20Souls%20III/locations/en#location-groups
```yaml
Dark Souls III:
exclude_locations:
- Small Crystal Lizards
- Upgrade
- Small Souls
- Miscellaneous
```
This allows _all_ non-missable locations to have progression items, if you're in
for the long haul:
```yaml
Dark Souls III:
exclude_locations: []
```
## What if I don't want to do the whole game?
If you want a shorter DS3 randomizer experience, you can exclude entire regions
from containing progression items. The items and enemies from those regions will
still be included in the randomization pool, but none of them will be mandatory.
For example, the following configuration just requires you to play the game
through Irithyll of the Boreal Valley:
```yaml
Dark Souls III:
# Enable the DLC so it's included in the randomization pool
enable_dlc: true
exclude_locations:
# Exclude late-game and DLC regions
- Anor Londo
- Lothric Castle
- Consumed King's Garden
- Untended Graves
- Grand Archives
- Archdragon Peak
- Painted World of Ariandel
- Dreg Heap
- Ringed City
# Default exclusions
- Hidden
- Small Crystal Lizards
- Upgrade
- Small Souls
- Miscellaneous
```
## Where can I learn more about Dark Souls III locations?
Location names have to pack a lot of information into very little space. To
better understand them, check out the [location guide], which explains all the
names used in locations and provides more detailed descriptions for each
individual location.
[location guide]: /tutorial/Dark%20Souls%20III/locations/en
## Where can I learn more about Dark Souls III items?
Check out the [item guide], which explains the named groups available for items.
[item guide]: /tutorial/Dark%20Souls%20III/items/en
## What's new from 2.x.x?
Version 3.0.0 of the Dark Souls III Archipelago client has a number of
substantial differences with the older 2.x.x versions. Improvements include:
* Support for randomizing all item locations, not just unique items.
* Support for randomizing items in shops, starting loadouts, Path of the Dragon,
and more.
* Built-in integration with the enemy randomizer, including consistent seeding
for races.
* Support for the latest patch for Dark Souls III, 1.15.2. Older patches are
*not* supported.
* Optional smooth distribution for upgrade items, upgraded weapons, and soul
items so you're more likely to see weaker items earlier and more powerful
items later.
* More detailed location names that indicate where a location is, not just what
it replaces.
* Other players' item names are visible in DS3.
* If you pick up items while static, they'll still send once you reconnect.
However, 2.x.x YAMLs are not compatible with 3.0.0. You'll need to [generate a
new YAML configuration] for use with 3.x.x.
[generating a new YAML configuration]: /games/Dark%20Souls%20III/player-options
The following options have been removed:
* `enable_boss_locations` is now controlled by the `soul_locations` option.
* `enable_progressive_locations` was removed because all locations are now
individually randomized rather than replaced with a progressive list.
* `pool_type` has been removed. Since there are no longer any non-randomized
items in randomized categories, there's not a meaningful distinction between
"shuffle" and "various" mode.
* `enable_*_locations` options have all been removed. Instead, you can now add
[location group names] to the `exclude_locations` option to prevent them from
containing important items.
[location group names]: /tutorial/Dark%20Souls%20III/locations/en#location-groups
By default, the Hidden, Small Crystal Lizards, Upgrade, Small Souls, and
Miscellaneous groups are in `exclude_locations`. Once you've chosen your
excluded locations, you can set `excluded_locations: unrandomized` to preserve
the default vanilla item placements for all excluded locations.
* `guaranteed_items`: In almost all cases, all items from the base game are now
included somewhere in the multiworld.
In addition, the following options have changed:
* The location names used in options like `exclude_locations` have changed. See
the [location guide] for a full description.

View File

@@ -0,0 +1,24 @@
# Dark Souls III Items
[Game Page] | Items | [Locations]
[Game Page]: /games/Dark%20Souls%20III/info/en
[Locations]: /tutorial/Dark%20Souls%20III/locations/en
## Item Groups
The Dark Souls III randomizer supports a number of item group names, which can
be used in YAML options like `local_items` to refer to many items at once:
* **Progression:** Items which unlock locations.
* **Cinders:** All four Cinders of a Lord. Once you have these four, you can
fight Soul of Cinder and win the game.
* **Miscellaneous:** Generic stackable items, such as arrows, firebombs, buffs,
and so on.
* **Unique:** Items that are unique per NG cycle, such as scrolls, keys, ashes,
and so on. Doesn't include equipment, spells, or souls.
* **Boss Souls:** Souls that can be traded with Ludleth, including Soul of
Rosaria.
* **Small Souls:** Soul items, not including boss souls.
* **Upgrade:** Upgrade items, including titanite, gems, and Shriving Stones.
* **Healing:** Undead Bone Shards and Estus Shards.

Some files were not shown because too many files have changed in this diff Show More