* Fix it so item linked locations are correct in slot data
* List -> Set
* Cache the locations instead
* Just loop the multiworld once
* Move it all to fill slot data and pretend we're doing a stage
* Move groups up so it doesn't loop over the multiworld locations if no item links are present
* Update worlds/tunic/__init__.py
Co-authored-by: Mysteryem <Mysteryem@users.noreply.github.com>
---------
Co-authored-by: Mysteryem <Mysteryem@users.noreply.github.com>
Reconnecting an act in a telescope to a time rift removes the entrances
to the time rift from its access regions because it will be accessible
from the telescope instead.
By doing so early on, as a starting act with insanity act randomizer or
as a plando-ed act, this can happen before the time rift itself has been
reconnected to an act or other time rift. In which case, when later
attempting to connect that time rift to an act or other time rift, the
entrances from the rift access regions will no longer exist, so must be
re-created. The original code was mistakenly re-creating the entrances
from the time rift being reconnected, instead of from the rift access
regions.
* Removes explicit indirect conditions
* Changes special rules function add rule instead of setting, and call it unconditionally
* Fixes issues in rule generation that have been around but unused the whole time
* Finally moves rules out into a separate file. Fixes level-related logic
* Removes redundant max skill level checks on canoes, since they're in the skill training rules now
* For some reason, canoe logic assumed you could always walk from lumbridge to south varrock without farms. This has been fixed
* Apply suggestions from code review
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
* Quests now respect skill limits and can be excluded. Tasks that take multiple skills how actually check all skills
* Adds alternative route for cooking that doesn't require fishing
* Remove debug code
---------
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
* Aquaria: Remove BaseException handling from create_item
Catching `BaseException` without re-raising the exception should almost
never be done because `BaseException` includes exit exceptions, such as
`SystemExit` and `KeyboardInterrupt`.
Ideally, the caught exception types should be as narrow as possible to
not mask bugs from catching unexpected exceptions. Having narrow
exception types can also help indicate to other developers what
exceptions are expected to be raisable by the code within the `try`
clause.
Similarly, the `try` clause should ideally contain the minimum code
necessary, to avoid masking bugs in the case that code within the `try`
clause that is not expected to raise an exception does so.
In this case, the only expected exception that can occur appears to be
`item_table[name]` that can raise a `KeyError` when `create_item()` is
passed an unexpected `name` argument. So this patch moves the other code
out of the `try` clause and changes the caught exception types to only
`KeyError`.
* Remove try-except
The KeyError that would be raised will be propagated as-is rather than
raising a new exception in its place.
* Remove extra newline
The original code did not have this newline, so it has been removed.
* Add missing connection to the furnace entry by west garden
* Add missing connection to the furnace entry by west garden
* Add missing hard ls for ruined passage door
* Allow shield for LS
* Split PR into two
* Split PR into two
* Split PR into two
* Add dark tomb ice grapple through the wall
* move special cases to be outside strict
* Update text.py
* fix wily machine edge case, incorrect weapons, and time stopper failsafe
* bump world version
* weakness checking is inclusive
* Update __init__.py
* add air shooter to edge case validation
* TLOZ: Assorded Logic Fixes
- Add needing arrows for Pols Voice rule. Not super necessary at the moment since wooden arrows are always accessible in one of the opening shops, but future proofing for future plans
- Create Gohma Locations and make sure all Gohma blocked locations have the required rule (was missing at least one location before)
- Remove the rule requiring Bow for all locations of level 8 (not sure why that was there, it's theoretically redundant now that Gohma and Pols Voice are properly marked)
- Make sure Digdogger locations properly require Recorder, and clean up redundant Level 7 rules as level 7 currently requires Recorder to access the entrance
* Update worlds/tloz/Rules.py
forgor that has_any exists
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
* Remove world = multiworld
---------
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
* improve energy link performance on large surfaces
* Add Energy link bridge storage table to initialization.
* Fix event based energy link for Factorio 2.0
* Adjust energy link bridge for quality.
If a world uses a `Location` or `Entrance` subclass that overrides the
`item_rule`/`access_rule` class attribute, then
`spot.__class__.item_rule`/`spot.__class__.access_rule` will get the
overridden rule, which may not be an empty rule.
Uses of `spot.__class__` have been replaced with getting the class
attribute rule belonging to the `Location` or `Entrance` class.
This will make it easier for players to understand when they have a
mismatch between their DS3 apworld and their local randomizer version,
mitigating a common source of confusion and support requests.
* Core: Detect and account for apworlds being downloaded with a (1) in their name
* Reword comment
* Always use internal module name
* Requested changes from black-silver
* Landstalker: remove global ref to multiworld
`cached_spheres` holds a reference to the multiworld, which leaks the multiworld if multidata is skipped. Instead of making it a class variable, give a reference to each matching world.
* Switch to using `get_game_worlds`
- removed tutorialization (Craft/Do X to unlock tech)
- start with everything needed for power, electric mining drills, science lab and automation science already unlocked
- updated world gen
- updated mod api use
- updated fluid boxes (CaitSith2)
- new option: free sample quality (needs quality mod)
- removed old gruft, faster gen speed, faster load time
- lists space age as explicitly not supported, so it prevents the game from trying to load both
- fixes Y offset of traps being wrong (way higher than intended)
- client now has a 5 second timeout to communicate with the bound factorio server, so it aborts actions if the server died
- savegames are now stored in write_data_directory -> saves -> Archipelago
- add cargo-landing-pad handling
- starting rocket silo and cargo landing pad respect free sample quality
- supports Factorio 2.0
---------
Co-authored-by: CaitSith2 <d_good@caitsith2.com>
* TUNIC: Add Shop indirect condition
The `Overworld -> Cube Cave Entrance Region` Entrance checks
`can_shop()` which checks for being able to reach the "Shop" Region, so
the Entrance requires an indirect condition of reaching the "Shop"
Region.
* Rename entrance variable to cube_entrance
Co-authored-by: Scipio Wright <scipiowright@gmail.com>
---------
Co-authored-by: Scipio Wright <scipiowright@gmail.com>
stage_post_fill iterates sets of locations, so the iteration order is
non-deterministic, resulting in different items being converted from
Progression to Useful when generating with the same seed.
This patch makes stage_post_fill deterministic by sorting the duplicate
pokemon locations in each sphere before choosing which of the duplicates
should remain as progression.
ALttP makes common use of entrances with access rules that require
another entrance to be accessible. This results in requiring an indirect
condition to be registered for the other entrance's `.parent_region`,
but this indirect condition is often missing.
There are so many missing indirect conditions, and due to the complexity
of some of the chained rules, it is simply not realistic to add all the
missing indirect conditions.
This patch changes ALttP to use automatic indirect conditions instead of
explicit indirect conditions and removes the places that were
registering indirect conditions.
Without this patch, the missing indirect conditions almost never have an
effect on generating with default options, but enabling certain options,
such as `glitches_required` or `entrance_shuffle` can result in
frequently checking entrances that are missing indirect conditions.
Examples of complex chained rules:
`get_rule_to_add()` in `Rules.set_bunny_rules()` can create
rules on entrances that require access to any of a number of different
other entrances, which should require the parent regions of all of those
other entrances to be registered as indirect conditions.
There are entrance access rules that check
`StateHelpers.can_kill_most_things()` (e.g. `Turtle Rock Second Section
Bomb Wall`), which can check `can_extend_magic()`, which checks for
being able to buy unlimited `Blue Potion`, which checks for being able
to reach a shop that sells unlimited `Blue Potion`. This is usually
`Potion Shop`, but there is a yaml option that shuffles shop
inventories, so the shop that sells unlimited `Blue Potion` can be
randomized, meaning that the region that should be registered as an
indirect condition can also be randomized.
Example of many missing indirect conditions:
With `small_key_shuffle: universal`, every single
`ALttPLogic._lttp_has_key()` checks for being able to reach shops that
sell an unlimited number of universal Small Keys. Meaning that every
entrance access rule that uses `_lttp_has_key()` should register all
shop regions that sell unlimited universal small keys as indirect
conditions.