Commit Graph

245 Commits

Author SHA1 Message Date
Fabian Dill 2f37bedc92
Tests: ensure item name groups do not collide with item names (#1074) 2023-01-18 15:45:48 +01:00
alwaysintreble b8abe9f980
Tests: add a test to check for dupe locations (#1378) 2023-01-15 20:18:32 +01:00
Fabian Dill 94c6562f82 Tests: make sure DB overwrite actually takes 2023-01-02 20:23:00 +01:00
Fabian Dill 2dcfbff751
Tests: now autoload tests from /worlds/*/test (#1318)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-12-11 13:15:23 +01:00
Fabian Dill 78d4da53a7
Tests: verify and fix host.yaml/Utils.py match (#1302) 2022-12-08 02:06:34 +01:00
Fabian Dill 32b8f9f9f3
WebHost: restore old silent ignore of mimetypes in json getting (#1292)
* WebHost: restore old silent ignore of mimetypes in json getting of /api/generate

* Tests: add tests for /api/generate
2022-12-05 22:27:15 +01:00
espeon65536 edd1fff4b7
Core: make early_items internal only (#1177)
Co-authored-by: beauxq <beauxq@yahoo.com>
2022-11-16 17:32:33 +01:00
espeon65536 4e5c10ad66
OoT: make Bottles and Adult Trade Item hintable groups (#1222)
* OoT: make Bottles and Adult Trade Item hintable groups
2022-11-09 22:07:14 +01:00
Doug Hoskisson c933fa7e34
Core: optimize early items and add unit test (#1197)
* optimize early items and add unit test

* move sorting list init closer to sorting
2022-11-04 17:56:47 +01:00
Doug Hoskisson 962e48c078
Zillion: fix unreproducible seeds (#1166)
* fix zillion unreproducible seeds

* world to multiworld merge
2022-11-01 14:45:17 +01:00
alwaysintreble 2af510328e
Core: rename `world` to `multiworld` (#931)
* rename references to `Multiworld` in core to `multiworld` instead of `world`

* fix smz3

* fix oot

* fix low hanging fruit

* revert mysteriously broken spacing in world api.md

* fix more randomly broken spacing

* hate

* that better be all of it

* begrudgingly move over smw

* ._.

* missed some worlds

* this is getting tedious now

* Missed some self.world definitions

Co-authored-by: espeon65536 <espeon65536@gmail.com>
Co-authored-by: Zach Parks <zach@alliware.com>
2022-10-31 21:41:21 -05:00
Zach Parks 1cad51b1af
Rogue Legacy: World folder clean up and generation improvements. (#1148)
* Minor cleanup and renaming of some files/functions.

* Rename `LegacyWorld` and `LegacyWeb` to RLWorld and RLWeb.

* Undo accidental change to comment.

* Undo accidental change to comment.

* Restructure Items.py format and combine all tables into one.

* Restructure Locations.py format and combine all tables into one.

* Split boss event items into separate boss entries.

* Remove definitions folder.

* Reformatted __init__.py for Rogue Legacy.

* Allow fairy chests to be disabled.

* Add working prefill logic for early vendors.

* Re-introduce Early Architect setting.

* Revamped rules and regions and can now generate games.

* Fix normal vendors breaking everything.

* Fix early vendor logic and add fairy chest logic to require Dragons or Enchantress + runes.

* Fix issue with duplicate items being created.

* Move event placement into __init__.py and fix duplicate Vendors.

* Tweak weights and spacing.

* Update documentation and include bug report link.

* Fix relative link for template file.

* Increase amount of chest locations in `location_table`.

* Correct a refactor rename gone wrong.

* Remove unused reference in imports.

* Tweak mistake in boss name in place_events.

* English is hard.

* Tweak some lines in __init__.py to use `.settings()` method.

* Add unique id tests for Rogue Legacy.

IDs are mixed around, so let's try to avoid accidentally using the same identifier twice.

* Fix typo in doc.

* Simplify `fill_slot_data`.

* Change prefix on `_place_events` to maintain convention.

* Remove items that are **not** progression from rules.
2022-10-29 22:15:06 -05:00
Doug Hoskisson 09d8c4b912
MultiServer: fix case sensitivity in server commands (#1156)
* fix case sensitivity in server commands

* improve ambiguous match breakout

* worried about accidentally swapping team and slot

* Remove now unused import
2022-10-30 00:41:07 +02:00
AkumaGath17 e6c6b00109
Minecraft: Two by two logical requirement fix (#1152)
* [Minecraft] Two by two logical requirement fix

* Two by two update

* Two by Two logical fix [Description in order]

* Two by Two fix [Bucket only= False]

Along with the others isolated items checks
2022-10-28 10:34:46 +02:00
beauxq ad445629bd Zillion: fix unit tests
previous fix was incorrect
2022-10-24 01:28:06 +02:00
Doug Hoskisson 24105ac249
Tests: fix random failures on Zillion tests (#1128)
* tests: fix random failures on Zillion tests

Normally there's a low probably that the game doesn't require a power-up that it usually requires.
This makes sure it always has that requirement for tests.

* better type narrowing
2022-10-22 03:42:16 +02:00
Doug Hoskisson 265ee7098a
New Game: Zillion (#1081)
* Option RangeWithSpecialMax

* amendment to typing in web options

* compare string with number

* lots of work on zillion

* fix zillion fill logic

* fix a few more issues in zillion fill logic

* can make zillion patch and use it

* put multi items in zillion rom

* work on ZillionClient

* logging and auth in client

* work on sending and receiving items

* implement item_handling flag

* fix locations ids to NuktiServer package

* use rewrite of zri

* cache logic rule data for performance

* use new id maps

* fix some problems with the big recent merge

* ZillionClient: use new context manager for Memory class

* fix ItemClassification for Zillion items
and some debug statements for asserts,
documentation on running scripts for manual testing
type correction in CommonContext

* fix some issues in client, start on docs, put rescue and item ram addresses in slot data

* use new location name system
fix item locations getting out of sync in progression balancing

* zillion client can read slot name from game

* zillion: new item names

* remove extra unneeded import

* newer options (room gen and starting cards)

* update comment in zillion patch

* zillion non static regions

* change some logging, update some comments

* allow ZillionClient to exit in certain situations

* todo note to fix options doc strings

* don't force auto forfeit

* rework validation of floppy requirement and item counts
and fix race condition in generate_output

* reorganize Zillion component structure
with System class

* documentation updates for Zillion

* attempt inno_setup.iss

* remove todo comment for something done

* update comment

* rework item count zillion options
and some small cleanups

* fix location check count

* data package version 1

* Zillion can pass unit tests without rom

* fix freeze if closing ZillionClient while it's waiting for server login

* specify commit hash for zilliandomizer package

* some changes to options validation

* Zillion doors saved on multiworld server

* add missing function in inno_setup
and name of vanilla continues in options

* rework zillion sync task and context

* Apply documentation suggestions from SoldierofOrder

Co-authored-by: SoldierofOrder <107806872+SoldierofOrder@users.noreply.github.com>

* update zillion package

* workaround for asyncio udp bug

There is a bug in Python in Windows
https://github.com/python/cpython/issues/91227
that makes it so if I look for RetroArch before it's ready, it breaks the asyncio udp transport system.

As a workaround, we don't look for RetroArch until the user asks for it with /sms

* a few of the smaller suggestions from review

* logic only looks at my locations
instead of all the multiworld locations

* some adjustments from pull request discussion
and some unit tests

* patch webhost changes from pull request discussion

* zillion logic tests

* better vblr test

* test interaction of character rescue items with logic

* move unit tests to new worlds folder

* comment improvements

* fix minor logic issue
and add memory read timeout

* capitalization in option display names
Opa-Opa is a proper noun

* redirect zz stdout to debug

* fix option validation bug making unbeatable seeds

* remove line that does nothing

* attach logic cache to world

Co-authored-by: SoldierofOrder <107806872+SoldierofOrder@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <doughoskisson@novuslabs.com>
2022-10-20 19:41:11 +02:00
Doug Hoskisson f12b73f487
Tests: world test base class (#1116)
* world test base class

* game not instance property

* I would have guessed that this only collected 1.

* game property

* move SoE tests into worlds

* don't force auto world setup
2022-10-18 18:54:41 +02:00
black-sliver 49ae79e5ce
Tests: add fill tests for #1109 and #1114 (#1115)
* Test: for fill issues fixed in PR #1109

* Test: for double sweep collect fixed in PR #1114
2022-10-18 10:20:57 +02:00
Fabian Dill b533ffb9e8
Locality: rewrite for linear memory consumption, from quadratic (#1091) 2022-10-17 03:22:02 +02:00
black-sliver 097ac189e4
SoE: add tests ... (#1097)
* SoE: add tests ...

... for goals, bronze axe and bronze spear+

* SoE: fix tests
2022-10-14 19:35:53 +02:00
toasterparty 7f3f886e41
Overcooked! 2: Implementation (#1046)
Overcooked! 2 is a couch co-op arcade game with a very high skill ceiling. It has a small but occult following, and the community craves a reason to keep coming back besides just grinding high scores. as such, this PR represents 3 major milestones in one:

 * The launch of OC2 Modding, a modding framework which is the first public mod for the game beyond simple RAM trainers
 * The launch of OC2 Randomizer
 * The integration of OC2 Randomizer in Archipelago
2022-10-13 19:57:50 +02:00
Jarno e708bea819
[Sudoku] Added new BK mode game (#910)
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
Co-authored-by: SoldierofOrder <107806872+SoldierofOrder@users.noreply.github.com>
2022-10-13 07:55:00 +02:00
alwaysintreble f909576813
core: Generic boss plando handler (#1044)
* fix some blunders i made when implementing this

* move generic functions to core class

* move lttp specific stuff out and split up from_text a bit for more modularity

* slightly optimize from_text call order

* don't make changes on github apparently. reading hard

* Metaclass Magic

* do a check against the base class

* copy paste strikes again

* use option default instead of hardcoded "none". check locations and bosses aren't reused.

* throw dupe location error for lttp

* generic singularity support with a bool

* forgot to enable it for lttp

* better error handling

* PlandoBosses: fix inheritance of singularity

* Tests: PlandoBosses

* fix case insensitive tests

* Tests: cleanup PlandoBosses tests

* f in the chat

* oop

* split location into a different variable

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

* pass the list of options as `option_list`

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

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-10-12 20:28:32 +02:00
Fabian Dill 060a04700d
Core: allow generic access to indirect_connections (#1056) 2022-09-30 04:58:19 +02:00
Doug Hoskisson c96b6d7b95
Core: some typing and docs in various parts of the interface (#1060)
* some typing and docs in various parts of the interface

* fix whitespace in docstring

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

* suggested changes from discussion

* remove redundant import

* adjust type for json messages

* for options module detection:
 module.lower().endswith("options")

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-09-28 23:54:10 +02:00
black-sliver 809bda02d1 Test: item/location name must not be numeric 2022-09-20 18:38:16 +02:00
Alchav 9daa64741b
New, smarter fast_fill function (#646)
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2022-09-17 02:06:25 +02:00
Fabian Dill af11fa5150
Core: auto alias (#1022)
* Test: check that default templates can be parsed into Option objects
2022-09-16 00:32:30 +02:00
toasterparty 8aad75ed23
Tests: Check for Holes in the Item Pool (#992)
* test for holes in the item pool

* Update test/general/TestItems.py

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

* Update test/general/TestItems.py

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

* Update test/general/TestItems.py

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

* Update test/general/TestItems.py

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

Co-authored-by: alwaysintreble <mmmcheese158@gmail.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-09-05 10:02:40 +02:00
Fabian Dill e413619c26
Tests: verify that a world doesn't use the same ID multiple times (#985) 2022-09-01 21:25:06 +02:00
Fabian Dill c390801c4c
Test: verify file webhost file creations work to some degree (#953)
WebHost: fix some file creation paths
2022-08-23 01:07:17 +02:00
alwaysintreble 81cf1508e0
Core: Refactor Autoworld.options to Autoworld.option_definitions (#906)
* refactor `world.options` -> `world.option_definitions`

* rename world api reference

* missed some self.options
2022-08-15 23:46:59 +02:00
black-sliver b8ca41b45f
Utils: SI: fix rounding problems (#895)
* Utils: SI: fix rounding problems

999.999 would give 1000.00 instead of 1.00k

* Tests: add Utils: SI tests
2022-08-12 00:46:11 +02:00
Fabian Dill 21f7c6c0ad
Core: optimize away Item.world (#840)
* Core: optimize away Item.world

* Update test/general/TestFill.py

* Test: undo unnecessary changes

* lttp: remove two more Item.world writes

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-08-05 17:09:21 +02:00
Fabian Dill 6c525e1fe6
Core: move multiple Item properties into a single Flag (#638) 2022-06-17 03:23:27 +02:00
Fabian Dill 5be00e28dd Tests: always display all warnings
WebHost: fix a warning about new cache names
2022-06-17 03:22:43 +02:00
Fabian Dill ff608b72a2
Tests: add test to check for typo'd item name group definitions (#594)
* Tests: add test to check for typo'd item name group definitions
Factorio: item *name* group was pointing to IDs instead.
Server: prevent crash when using Event-filled item name group

* Server: prevent crash when /hint'ing for an item name group with events
2022-06-01 08:25:40 -07:00
alwaysintreble c93eeb3607
tests: implement test to check for game_info file (#531) 2022-05-19 00:08:29 +02:00
Doug Hoskisson c085ee47ed
variable-progression-balancing (#356) 2022-05-11 09:13:21 +02:00
Fabian Dill a5ca118bbf
Test: rename (#499) 2022-05-10 23:51:18 -07:00
Fabian Dill a56340663c Test: check that all_state can complete game 2022-05-10 19:20:15 -07:00
Fabian Dill e3900e9f99 Test: fix wrong name 2022-05-10 19:20:15 -07:00
Fabian Dill e8b1362172 Test: check for working completion condition 2022-05-10 19:20:15 -07:00
Fabian Dill 7fad0b0f51
Test: introduce test for every game has a tutorial (#478) 2022-05-03 22:14:03 +02:00
black-sliver 4f10dbb896 Test: add missing cleanup in TestGenerate
fixes a warning on some systems
2022-04-24 19:32:08 +02:00
black-sliver fe4a26d034 CI: add Generate.py tests
* allows ModuleUpdate to be run outside of local_dir
* adds windows-latest to the unittest matrix
2022-04-01 06:16:13 +02:00
Fabian Dill 65864e273b Fix bugs 2022-04-01 03:54:30 +02:00
espeon65536 1b73bacde1 Minecraft: add death_link attr to test world 2022-02-23 02:44:47 +01:00
jtoyoda cdc0b7a649 Fixing unit tests for FFR by excluding tests that use Default settings as FFR logic is controlled by the original randomizer 2022-02-21 00:01:27 +01:00
Fabian Dill daea0f3e5e Core: provide a way to add to CollectionState init and copy
SM: use that way
OoT: use that way
2022-02-17 07:07:34 +01:00
black-sliver a4eea3325f Document id range for items and locations 2022-02-12 03:00:09 +01:00
Brad Humphrey 2361f8f9d3 Use logic when placing non-excluded items 2022-02-01 16:35:18 +01:00
Brad Humphrey 814851ba60 Don't require every item to fill 2022-01-31 19:17:06 +01:00
Fabian Dill 6210630ce2 Core: increment version 2022-01-30 03:45:21 +01:00
Fabian Dill e5af7d11cc Tests: add ID range checks 2022-01-29 16:10:42 +01:00
Brad Humphrey dd61d0d395
Don't swap items that reduce access (#247) 2022-01-28 05:40:08 +01:00
Brad Humphrey 65a92746d1 Sort before distribute to preserve seed integrity 2022-01-28 05:39:34 +01:00
Brad Humphrey 00ccecac9c Allow fill_hook to remove things from the pool 2022-01-22 04:40:24 +01:00
Brad Humphrey ec95ce8329
Allow locations to be prioritized for progress item placement (#189) 2022-01-20 04:19:07 +01:00
Fabian Dill 80b3a5b1d4 WebHost: fix is_zipfile check for flask FileStorage objects
- and assorted cleanup
2022-01-06 06:09:15 +01:00
Brad Humphrey d437f0105a Test remaining locations after swapping 2021-12-30 19:06:03 +01:00
Brad Humphrey 3d65719170 Remove dependency on pytest 2021-12-30 16:55:08 +01:00
Brad Humphrey 18d262c1ae Add test for minimal accessibility 2021-12-30 16:55:08 +01:00
Brad Humphrey e5fedb90a6 Process swaped items last 2021-12-30 16:55:08 +01:00
Brad Humphrey d719eb356f Don't allow items to swap infinitly 2021-12-30 16:55:08 +01:00
Brad Humphrey 6a34fe5184 Add fallback item swap for unreachable items 2021-12-30 16:55:08 +01:00
Brad Humphrey 461961c3be Add test locations to region 2021-12-30 16:55:08 +01:00
Brad Humphrey 39869bcdc5 Add basic fill test cases 2021-12-30 16:55:08 +01:00
espeon65536 3fa253bac5
MC: 1.17 support (#120)
* MC: add death_link option

* Minecraft: 1.17 advancements and logic support

* Update Minecraft tracker to 1.17

* Minecraft: add tests for new advancements

* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install

* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion

* fix docstring for PostgameAdvancements

* Minecraft: add starting_items
List of dicts: item, amount, nbt

* Update descriptions for AdvancementGoal and EggShardsRequired

* Minecraft: fix tests for required_bosses attribute

* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not

* Minecraft client: ignore prereleases unless --prerelease flag is on

* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install

* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.

Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
2021-12-01 02:37:11 +01:00
Fabian Dill ec9ef21cc0 Tests: add create_item test 2021-11-11 00:06:51 +01:00
espeon65536 aa87b78dde Overpowered is no longer hard, instead requires Bastion Remnant + iron pick + basic combat to get gold blocks 2021-11-06 19:59:49 +00:00
Fabian Dill 1c2c1f286f Some cleanup 2021-10-21 21:06:38 +02:00
Fabian Dill 050927008a Tests: add "EmptyStateCanReachSomething" 2021-10-21 20:23:13 +02:00
Fabian Dill e66a2a7c30 Core: change precollected_items to dict-style
Core: make sure there are enough threads available during generate_output to prevent deadlocks if event waiting is used
2021-10-10 16:50:08 +02:00
Fabian Dill f5afc84cd2 Tests: remove a breakpoint condition that was left ;P 2021-10-06 11:41:57 +02:00
Fabian Dill 1217179f8a Tests: Implement generic default options reachability test
Tests: remove duplicate TestDeathMountain.py
LttP: Move er_seeds out of Main
OriBF: Fix Mapstone typo
2021-10-06 11:32:49 +02:00
Fabian Dill 916ba2ea41 Test: test against item/location ID overlap 2021-10-06 02:12:05 +02:00
Fabian Dill a82bf1bb32 Options: raise Exception if per-game options are in root
Options: implement progression balancing and accessibility on new system
Options: implement the notion of "common" and "per_game_common" options in various systems
Options: centralize item and location name checking
Spoiler: prettier print some lists, sets and dicts
WebHost: add common options into /templates
2021-09-17 00:17:54 +02:00
Fabian Dill e76c870c09 Unittest: fix TestInvertedBombRules 2021-08-30 16:38:21 +02:00
espeon65536 0241d6f443 fix minecraft tests for egg shards 2021-08-07 00:44:57 +00:00
espeon65536 381e9c744a fix tests for progressive resource crafting 2021-08-07 00:44:57 +00:00
espeon65536 9aa4bb3f4b fix tests for bee traps 2021-08-07 00:44:57 +00:00
espeon65536 e79a918c03
Minecraft updates (#29)
* Implement excluded locations

* Update Minecraft to use exclusion_rules for its exclusion pools

* Flag the enchanted books as advancement so they don't go on excluded locations (particularly the Infinity book)

* update playerSettings for exclusion

* new items: 32 Arrows, Saddle, structure compasses for overworld structures

* move structure linking to create_regions instead of generate_basic

* Update Minecraft to use LogicMixin

* add separate can_exclude property, so non-progression items can be marked non-excluded

* separate fill step for nonadvancement nonexcluded items

* made Saddle not a progression item, but also nonexcluded

* fix missing player arg

* remove higher xp amounts from pool, leaving only 50 XP

* fix new Minecraft item IDs

* added shulker box item for starting inventory

* increment client and data version

* change client_version to int instead of tuple

* make saddle a progression item

* added structure compass option and appropriate logic for all compasses

* Update playerSettings.yaml with MC options

* update minecraft tests

* update exclusion procedure for clarity
2021-07-24 01:28:16 +02:00
Fabian Dill df9bad75ea fix unittests 2021-07-22 15:59:37 +02:00
Fabian Dill 7d5b20ccfc Remove temporary solution "OptionSets" in favor of AutoWorld's Options 2021-07-04 16:18:21 +02:00
espeon65536 5943c8975a fixing the tests for bees again 2021-07-03 01:55:47 +00:00
espeon65536 92c21de61d Merge branch 'main' of https://github.com/ArchipelagoMW/Archipelago into minecraft 2021-06-28 14:45:20 -05:00
espeon65536 43e17f82b0 Updated HK test to use autoworld 2021-06-27 23:26:24 +00:00
espeon65536 75891b2d38 fix tests again 2021-06-25 19:59:44 -05:00
espeon65536 44943f6bf8 Merge branch 'main' of https://github.com/ArchipelagoMW/Archipelago into minecraft 2021-06-25 19:44:15 -05:00
Fabian Dill 43e3c84635 fix the Hollow Knight Unittest. Yes, the one test. 2021-06-25 23:39:22 +02:00
Fabian Dill 7f8bb10fc5 Move Factorio, Hollow Knight and Minecraft Options into AutoWorld 2021-06-25 23:32:13 +02:00
espeon65536 fd811bfd1b fix minecraft tests 2021-06-25 13:02:45 -05:00
espeon65536 6211760922 Merge branch 'main' of https://github.com/ArchipelagoMW/Archipelago into minecraft 2021-06-15 16:58:28 -05:00
Fabian Dill 1e414dd370 fix tests 2021-06-08 22:14:56 +02:00
espeon65536 6e33181f05 Changed advancement_goal to a Range option 2021-06-08 08:58:16 -05:00
espeon65536 48c3d1fa4a Added campfire for Sticky Situation, by popular demand 2021-06-06 15:10:45 +00:00
espeon65536 a55bcae3ec Minecraft logic improvements
- Very Very Frightening now properly accounts for getting a villager into the overworld by curing a zombie villager
- Hot Tourist Destinations no longer requires striders, since no one was using them anyway
- Saddles are now also obtainable from raids by killing a ravager (100% drop rate)
2021-06-06 15:10:45 +00:00
espeon65536 685de847c4
Minecraft updates (#13)
* Minecraft locations, items, and generation without logic

* added id lookup for minecraft

* typing import fix in minecraft/Items.py

* fix 2

* implementing Minecraft options and hard/postgame advancement exclusion

* first logic pass (75/80)

* logic pass 2 and proper completion conditions

* added insane difficulty pool, modified method of excluding item pools for easier extension

* bump network_data_package version

* minecraft testing framework

* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item

* Testing now functions, split tests up by advancement pane, added some story tests

* Newer testing framework: every advancement gets its own function, for ease of testing

* fixed logic for The End... Again...

* changed option names to "include_hard_advancements" etc.

* village/pillager-related advancements now require can_adventure: weapon + food

* a few minecraft tests

* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name

* additional MC tests

* more tests, mostly nether-related tests

* more tests, removed anvil path for Two Birds One Arrow

* include Minecraft slot data, and a world seed for each Minecraft player slot

* Added new items: ender pearls, lapis, porkchops

* All remaining Minecraft tests

* formatting of Minecraft tests and logic for better readability

* require Wither kill for Monsters Hunted

* properly removed 8 Emeralds item from item pool

* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill

* Added 12 new advancements (ported from old achievement system)

* renamed "On a Rail" for consistency with modern advancements

* tests for the new advancements

* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data

* output minecraft options in the spoiler log

* modified advancement goal values for new advancements

* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars

* fixed glowstone block logic for Not Quite Nine Lives

* setup for shuffling MC structures: building ER world and shuffling regions/entrances

* ensured Nether Fortresses can't be placed in the End

* finished logic for structure randomization

* fixed nonnative items always showing up as Hammers in ALttP shops

* output minecraft structure info in the spoiler

* generate .apmc file for communication with MC client

* fixed structure rando always using the same seed

* move stuff to worlds/minecraft/Regions.py

* make output apmc file have consistent name with other files

* added minecraft bottle macro; fixed tests imports

* generalizing MC region generation

* restructured structure shuffling in preparation for structure plando

* only output structure rando info in spoiler if they are shuffled

* Force structure rando to always be off, for the stable release

* added Minecraft options to player settings

* formally added combat_difficulty as an option

* Added Ender Dragon into playthrough, cleaned up goal map

* Added new difficulties: Easy, Normal, Hard combat

* moved .apmc generation time to prevent outputs on failed generation

* updated tests for new combat logic

* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix

* moved all MC-specific functions into gen_minecraft

* renamed "logic_version" to "client_version"

* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures

* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching

* added seed_name, player_name, client_version to apmc file

* reenabled structure shuffle

* added entrance tests for minecraft

* Minecraft logic updates
Wither kill now considers nether fortresses as a valid source of soul sand
A Furious Cocktail now requires beacons for resistance and village access for carrots
Uneasy Alliance now requires fishing rod to pull the ghast through the portal
On a Rail now requires iron pickaxe to make powered rails
Overkill now may require strength II without stone axe, which needs nether access

* embed all apmc info into slot_data

* updated MC tests for logic changes

* put apmc into zipfile

Co-authored-by: achuang <alexander.w.chuang@gmail.com>
2021-05-16 00:49:58 +02:00
espeon65536 2f7e532f4f
Minecraft Randomizer
Squash merge, original Commits:

* Minecraft locations, items, and generation without logic

* added id lookup for minecraft

* typing import fix in minecraft/Items.py

* fix 2

* implementing Minecraft options and hard/postgame advancement exclusion

* first logic pass (75/80)

* logic pass 2 and proper completion conditions

* added insane difficulty pool, modified method of excluding item pools for easier extension

* bump network_data_package version

* minecraft testing framework

* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item

* Testing now functions, split tests up by advancement pane, added some story tests

* Newer testing framework: every advancement gets its own function, for ease of testing

* fixed logic for The End... Again...

* changed option names to "include_hard_advancements" etc.

* village/pillager-related advancements now require can_adventure: weapon + food

* a few minecraft tests

* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name

* additional MC tests

* more tests, mostly nether-related tests

* more tests, removed anvil path for Two Birds One Arrow

* include Minecraft slot data, and a world seed for each Minecraft player slot

* Added new items: ender pearls, lapis, porkchops

* All remaining Minecraft tests

* formatting of Minecraft tests and logic for better readability

* require Wither kill for Monsters Hunted

* properly removed 8 Emeralds item from item pool

* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill

* Added 12 new advancements (ported from old achievement system)

* renamed "On a Rail" for consistency with modern advancements

* tests for the new advancements

* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data

* output minecraft options in the spoiler log

* modified advancement goal values for new advancements

* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars

* fixed glowstone block logic for Not Quite Nine Lives

* setup for shuffling MC structures: building ER world and shuffling regions/entrances

* ensured Nether Fortresses can't be placed in the End

* finished logic for structure randomization

* fixed nonnative items always showing up as Hammers in ALttP shops

* output minecraft structure info in the spoiler

* generate .apmc file for communication with MC client

* fixed structure rando always using the same seed

* move stuff to worlds/minecraft/Regions.py

* make output apmc file have consistent name with other files

* added minecraft bottle macro; fixed tests imports

* generalizing MC region generation

* restructured structure shuffling in preparation for structure plando

* only output structure rando info in spoiler if they are shuffled

* Force structure rando to always be off, for the stable release

* added Minecraft options to player settings

* formally added combat_difficulty as an option

* Added Ender Dragon into playthrough, cleaned up goal map

* Added new difficulties: Easy, Normal, Hard combat

* moved .apmc generation time to prevent outputs on failed generation

* updated tests for new combat logic

* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix

* moved all MC-specific functions into gen_minecraft

* renamed "logic_version" to "client_version"

* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures

* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching

* added seed_name, player_name, client_version to apmc file

* reenabled structure shuffle

* added entrance tests for minecraft

Co-authored-by: achuang <alexander.w.chuang@gmail.com>
2021-05-08 13:38:57 +02:00
Fabian Dill e7a746c06c fix unittest local path 2021-04-15 04:01:25 +02:00
Fabian Dill 5e776f45fc set all Hollow Knight items to be randomized in Unittest 2021-03-21 05:26:15 +01:00
Fabian Dill ce3804038e Focus cursed-only location is now removed 2021-03-21 05:21:57 +01:00
Fabian Dill 3d93f659e3 some option updates 2021-03-14 08:38:02 +01:00
Fabian Dill c9fc446d13 Hollow Knight logic tests (just some samples) 2021-02-25 18:23:19 +01:00
Fabian Dill 8a395a3021 update guis 2021-02-21 20:37:43 +01:00
Fabian Dill 122e360ec8 Merge branch 'main' into breaking_changes
# Conflicts:
#	MultiClient.py
#	Utils.py
#	worlds/alttp/ItemPool.py
#	worlds/alttp/Main.py
#	worlds/alttp/Shops.py
2021-02-19 13:45:50 +01:00
Fabian Dill fcbaa35cc5 new inverted logic, accounting for dark world flute activation 2021-02-02 11:24:17 +01:00
Fabian Dill 3d81f0cca7 update after merge from /main 2021-01-30 23:43:15 +01:00
Fabian Dill a646594f08 Merge branch 'main' into breaking_changes
# Conflicts:
#	BaseClasses.py
#	Fill.py
#	MultiClient.py
#	MultiServer.py
#	Utils.py
#	test/dungeons/TestDungeon.py
#	test/inverted/TestInverted.py
#	test/inverted_minor_glitches/TestInvertedMinor.py
#	test/inverted_owg/TestInvertedOWG.py
#	test/minor_glitches/TestMinor.py
#	test/owg/TestVanillaOWG.py
#	test/vanilla/TestVanilla.py
#	worlds/alttp/ItemPool.py
#	worlds/alttp/Main.py
#	worlds/alttp/Rom.py
2021-01-30 23:29:32 +01:00
Fabian Dill 1385fb1894 add test for unique sram offsets for shops
doubles as a way to print them out for debugging
2021-01-22 20:53:48 +01:00
Fabian Dill f3e686ba9a Move Shop related stuff to a Shops module 2021-01-16 02:23:23 +01:00
Fabian Dill 6bb7631382 fix unit tests 2021-01-03 17:16:07 +01:00
Fabian Dill 08ca4245c1 Merge branch 'main' into breaking_changes
# Conflicts:
#	Adjuster.py
#	AdjusterMain.py
#	BaseClasses.py
#	MultiClient.py
#	MultiServer.py
#	Mystery.py
#	Utils.py
#	WebHostLib/downloads.py
#	WebHostLib/generate.py
#	dumpSprites.py
#	test/TestBase.py
#	worlds/alttp/EntranceRandomizer.py
#	worlds/alttp/Main.py
#	worlds/alttp/Rom.py
2021-01-03 13:13:59 +01:00
Fabian Dill d91f1e6c4d Add minor glitches unittests 2020-12-21 00:44:31 +01:00
Fabian Dill bd24b8c39c using qirn jump Catfish and Pyramid can be reached without flippers 2020-12-19 22:43:50 +01:00
Fabian Dill e5aaa5af52 Merge branch 'qirnjump' into main
# Conflicts:
#	test/inverted_owg/TestDungeons.py
2020-12-19 22:40:08 +01:00
Fabian Dill ecbd4cf948 Review OWG tests
Thanks to stunseed for glitches information
2020-12-19 22:35:25 +01:00
Fabian Dill e4619276c6 Move partial reach into regular subtest, instead of sub-sub-test
Confuses Pycharm less when running "only failed tests"
2020-12-19 21:13:35 +01:00
Fabian Dill ecbb52a70d Review OWG Inverted Rules
Thanks to el0 for glitch information
2020-12-19 21:12:53 +01:00
Fabian Dill 634e142216 Review Inverted Tests 2020-12-19 20:33:10 +01:00
Fabian Dill db627be170 Merge branch 'expanded_tests' into qirnjump 2020-12-05 18:15:58 +01:00
Fabian Dill c1d7b33b4f More test fixes 2020-12-05 16:07:15 +01:00
Fabian Dill 770f01190b Don't need glove to swim to Pyramid 2020-12-05 15:25:55 +01:00
Fabian Dill 7ab4d187af expand UnitTests to check for reachability with incomplete requirements 2020-12-05 14:59:48 +01:00
Fabian Dill e5e21775c7 qirn jump 2020-12-05 14:51:53 +01:00
Fabian Dill 1d58f54101 move ALTTP to its own world folder 2020-10-24 05:38:56 +02:00
Fabian Dill 8852ec9a18 make all output paths host.yaml settable
rename itemlist to itempool, as the actual item listing is in items.py
change pedestal text of book of mudora from paradox to hylian for dingusses
2020-08-20 15:43:22 +02:00
CaitSith2 f06986bffb Fix item tests 2020-08-04 09:39:43 -07:00
Fabian Dill 01ace95c32 Various Item pool fixes
* Pedestal goal always left a spare item in the pool, unless vanilla swords was also selected
* extra items for the pool can now be given dynamically based on items still needed.
* easy item pool + swordless gets 4 bows, not 2 (weird combo, but ok)
* add some item pool unittests
* add easy item pool to CLI and GUI
2020-08-01 16:49:46 +02:00
Fabian Dill d3d68fcba2 Rename Escape Dungeon to Hyrule Castle by vote on discord 2020-06-24 16:22:49 +02:00
compiling 2199f18f16 Split mirror glitches into clips and offsets, with different rules (offsets need boots).
Fix inverted mirror rules - DM Descent is a mirror offset, East DM access is a mirror wrap (not in logic).
Add mirror clip to Desert East entrance (from east Mire Shed).
Add inverted mirror offset to hyrule castle ledge (placing a portal on the houlihan exit).
2020-06-13 15:39:58 +10:00
compiling d6dc559ed6 Update dungeon tests to work with the new exploration algorithm 2020-05-10 19:54:40 +10:00
compiling e812c8a3f7 Make Pyramid Fairy offset mirror require access to Hyrule Castle Courtyard through the secret passage entrance (the normal route is not possible if you killed Agahnim). 2020-05-08 19:32:04 +10:00
compiling e7a3637cc9 Add OWG clip to dark world floating island. 2020-05-08 18:23:55 +10:00
compiling 441f59d6ea Refactor OWG rules to keep them separate from no glitches.
Add logic for superbunny access to Sahasrahla's closet (with boots)
Add logic for superbunny through Two Brother's House (with boots)
Fix superbunny logic for spiral cave and mini moldorm cave - requires a sword
Add logic for waterwalking into Waterfall Cave
Add clip to Ice Palace entrance (requires boots, pearl and flippers)
Add extra clips to inverted owg logic - PoD and Dark Lake Hylia Ledge are now in logic with just boots
Add clip to flute point 6 into inverted owg logic - some light world locations are now accessible with boots and mitts, but no pearl or mirror.
2020-05-07 18:07:53 +10:00
compiling 444dd5b46b Modify TR key rules:
* Front to Middle requires 3 keys, or only 2 if the back is inaccessible
* Middle to Front requires 4 keys, or only 2 if the back is inaccessible and the TR Big Key is in the front
* Back to Middle requires 0 keys
* Middle to Back requires 3 keys
TR will violate 100% locations accessibility if it is only accessible via the middle section - this is required to have enough keys for the rest of the dungeon.
2020-04-30 00:19:49 +10:00
compiling 4851a905cf
OWG fixes (#79)
* Fix Waterfall entrance being inaccessible with the flippers.
Fix Spectacle Rock and Bombos Tablet requiring moon pearl

* Inverted - make the blacksmith, purple chest, bottle merchant and master sword pedestal accessible without the moon pearl.

* Fix moon pearl checks to avoid requiring moon pearl for mirror accessible locations.

* Dark Desert Teleporter requires the mitts

* Fix OWG bunny rules

* Fix another bunny rule bug.

* Separate superbunny cave into 2 regions.
For OWG, allow superbunny in superbunny cave with no mirror when entering from the bottom
Fix boots clip logic to desert teleporter ledge and TR teleporter
Fix mirror wrap logic for pyramid fairy
For insanity shuffle, exiting Superbunny Cave bottom is now in logic.

* Always require pearl for Swamp (Superbunny cannot do anything)

* Allow clipping into the GT entrance

* Add OWG tests from vt_randomizer

* Add some extra vanilla test cases

* Allow superbunny into the Blind's Hideout entrance.

* More moon pearl / superbunny fixes
Use the Catfish region properly, so Catfish Descent works.

* Allow superbunny into tavern
Fix inverted Kings Grave logic

* Inverted OWG tests

* Update unit tests for King's Tomb clip.

* All superbunny to spiral cave item (with sword)

* Bunny revive is not possible in Sanctuary.

* More inverted tests

* Add/fix test cases

* Fix logic for Magic Bat

* Fix merge to multiworld

* Fix Floodgate superbunny rule

* Require bunny revival for all dungeons except for Swamp/TR Main/Hera/Sanctuary, which have extra requirements

* Require a weapon for Castle Tower.

* Test case fixes

* Update test case - superbunny into Kakariko Tavern is in logic
2020-04-28 17:34:30 +02:00
Fabian Dill c5fbaeb51c re-rename all ocarinas and fix one inverted rule that way 2020-04-26 00:47:57 +02:00
compiling 7199c375d7 Fix inverted TR tests - ER requires access to Witches Hut for potions. 2020-04-05 21:12:25 +10:00
compiling b8f81ade67 Remove Spectacle Rock Cave ledges from inverted bomb shop locations, not normal bomb shop locations.
Update inverted bomb shop tests
2020-04-05 21:12:25 +10:00
compiling b3e84cc559 Basic test that inverted bomb shop logic covers all entrances. 2020-03-19 21:55:26 +11:00
compiling 6263c0d709 Update pyramid fairy tests 2020-03-17 23:19:23 +11:00
compiling 053aec4f26 Add unit tests for vanilla inverted layout, and dungeon logic. 2020-03-16 17:39:54 +11:00