TUNIC: Grass Randomizer (#3913)

* Fix certain items not being added to slot data

* Change where items get added to slot data

* Add initial grass randomizer stuff

* Fix rules

* Update grass.py

Improve location names

* Remove wand and gun from logic

* Update __init__.py

* Fix logic for two pieces of grass in atoll

* Make early bushes only contain grass

* Backport changes to grass rando (#20)

* Backport changes to grass rando

* add_rule instead of set_rule for the special cases, add special cases for back of swamp laurels area cause I should've made a new region for the swamp upper entrance

* Remove item name group for grass

* Update grass rando option descriptions

- Also ignore grass fill for single player games

* Ignore grass fill option for solo rando

* Update er_rules.py

* Fix pre fill issue

* Remove duplicate option

* Add excluded grass locations back

* Hide grass fill option from simple ui options page

* Check for start with sword before setting grass rules

* Update worlds/tunic/options.py

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

* Exclude grass from get_filler_item_name

- non-grass rando games were accidentally seeing grass items get shuffled in as filler, which is funny but probably shouldn't happen

* Update worlds/tunic/__init__.py

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

* Apply suggestions from code review

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

* change the rest of grass_fill to local_fill

* Filter out grass from filler_items

* remove -> discard

* Update worlds/tunic/__init__.py

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

* change has_stick to has_melee

* Update grass list with combat logic regions

* More fixes from combat logic merge

* Fix some dumb stuff (#21)

* Reorganize pre fill for grass

* Update option value passthrough

* Update __init__.py

* Fix region name

* Make separate pools for the grass and non-grass fills (#22)

* Make separate pools for the grass and non-grass fills

* Update worlds/tunic/__init__.py

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

* Fix those things in the PR (#23)

* Use excludable property

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

---------

Co-authored-by: Scipio Wright <scipiowright@gmail.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
Silent
2025-01-15 18:17:07 -05:00
committed by GitHub
parent 9dac7d9cc3
commit b7baaed391
8 changed files with 8156 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
from typing import Dict, NamedTuple, Set, Optional
from typing import Dict, NamedTuple, Set, Optional, List
from .grass import grass_location_table
class TunicLocationData(NamedTuple):
@@ -320,7 +321,27 @@ hexagon_locations: Dict[str, str] = {
"Blue Questagon": "Rooted Ziggurat Lower - Hexagon Blue",
}
location_name_to_id: Dict[str, int] = {name: location_base_id + index for index, name in enumerate(location_table)}
sphere_one: List[str] = [
"Overworld - [Central] Chest Across From Well",
"Overworld - [Northwest] Chest Near Quarry Gate",
"Overworld - [Northwest] Shadowy Corner Chest",
"Overworld - [Southwest] Chest Guarded By Turret",
"Overworld - [Southwest] South Chest Near Guard",
"Overworld - [Southwest] Obscured in Tunnel to Beach",
"Overworld - [Northwest] Chest Near Turret",
"Overworld - [Northwest] Page By Well",
"Overworld - [West] Chest Behind Moss Wall",
"Overworld - [Southwest] Key Pickup",
"Overworld - [West] Key Pickup",
"Overworld - [West] Obscured Behind Windmill",
"Overworld - [West] Obscured Near Well",
"Overworld - [West] Page On Teleporter"
]
standard_location_name_to_id: Dict[str, int] = {name: location_base_id + index for index, name in enumerate(location_table)}
all_locations = location_table.copy()
all_locations.update(grass_location_table)
location_name_groups: Dict[str, Set[str]] = {}
for loc_name, loc_data in location_table.items():