Archipelago/worlds/rogue_legacy/Locations.py

95 lines
5.4 KiB
Python
Raw Normal View History

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-30 03:15:06 +00:00
from typing import Dict, NamedTuple, Optional
2022-01-03 18:12:32 +00:00
from BaseClasses import Location
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-30 03:15:06 +00:00
class RLLocation(Location):
2022-01-03 18:12:32 +00:00
game: str = "Rogue Legacy"
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-30 03:15:06 +00:00
class RLLocationData(NamedTuple):
category: str
code: Optional[int] = None
def get_locations_by_category(category: str) -> Dict[str, RLLocationData]:
location_dict: Dict[str, RLLocationData] = {}
for name, data in location_table.items():
if data.category == category:
location_dict.setdefault(name, data)
return location_dict
2022-01-03 18:12:32 +00:00
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-30 03:15:06 +00:00
location_table: Dict[str, RLLocationData] = {
# Manor Renovation
"Manor - Ground Road": RLLocationData("Manor", 91_000),
"Manor - Main Base": RLLocationData("Manor", 91_001),
"Manor - Main Bottom Window": RLLocationData("Manor", 91_002),
"Manor - Main Top Window": RLLocationData("Manor", 91_003),
"Manor - Main Rooftop": RLLocationData("Manor", 91_004),
"Manor - Left Wing Base": RLLocationData("Manor", 91_005),
"Manor - Left Wing Window": RLLocationData("Manor", 91_006),
"Manor - Left Wing Rooftop": RLLocationData("Manor", 91_007),
"Manor - Left Big Base": RLLocationData("Manor", 91_008),
"Manor - Left Big Upper 1": RLLocationData("Manor", 91_009),
"Manor - Left Big Upper 2": RLLocationData("Manor", 91_010),
"Manor - Left Big Windows": RLLocationData("Manor", 91_011),
"Manor - Left Big Rooftop": RLLocationData("Manor", 91_012),
"Manor - Left Far Base": RLLocationData("Manor", 91_013),
"Manor - Left Far Roof": RLLocationData("Manor", 91_014),
"Manor - Left Extension": RLLocationData("Manor", 91_015),
"Manor - Left Tree 1": RLLocationData("Manor", 91_016),
"Manor - Left Tree 2": RLLocationData("Manor", 91_017),
"Manor - Right Wing Base": RLLocationData("Manor", 91_018),
"Manor - Right Wing Window": RLLocationData("Manor", 91_019),
"Manor - Right Wing Rooftop": RLLocationData("Manor", 91_020),
"Manor - Right Big Base": RLLocationData("Manor", 91_021),
"Manor - Right Big Upper": RLLocationData("Manor", 91_022),
"Manor - Right Big Rooftop": RLLocationData("Manor", 91_023),
"Manor - Right High Base": RLLocationData("Manor", 91_024),
"Manor - Right High Upper": RLLocationData("Manor", 91_025),
"Manor - Right High Tower": RLLocationData("Manor", 91_026),
"Manor - Right Extension": RLLocationData("Manor", 91_027),
"Manor - Right Tree": RLLocationData("Manor", 91_028),
"Manor - Observatory Base": RLLocationData("Manor", 91_029),
"Manor - Observatory Telescope": RLLocationData("Manor", 91_030),
# Boss Rewards
"Castle Hamson Boss Reward": RLLocationData("Boss", 91_100),
"Forest Abkhazia Boss Reward": RLLocationData("Boss", 91_102),
"The Maya Boss Reward": RLLocationData("Boss", 91_104),
"Land of Darkness Boss Reward": RLLocationData("Boss", 91_106),
2022-01-03 18:12:32 +00:00
# Special Locations
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-30 03:15:06 +00:00
"Jukebox": RLLocationData("Special", 91_200),
"Painting": RLLocationData("Special", 91_201),
"Cheapskate Elf's Game": RLLocationData("Special", 91_202),
"Carnival": RLLocationData("Special", 91_203),
2022-01-03 18:12:32 +00:00
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-30 03:15:06 +00:00
# Diaries
**{f"Diary {i+1}": RLLocationData("Diary", 91_300 + i) for i in range(0, 25)},
2022-01-03 18:12:32 +00:00
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-30 03:15:06 +00:00
# Chests
**{f"Castle Hamson - Chest {i+1}": RLLocationData("Chests", 91_600 + i) for i in range(0, 50)},
**{f"Forest Abkhazia - Chest {i+1}": RLLocationData("Chests", 91_700 + i) for i in range(0, 50)},
**{f"The Maya - Chest {i+1}": RLLocationData("Chests", 91_800 + i) for i in range(0, 50)},
**{f"Land of Darkness - Chest {i+1}": RLLocationData("Chests", 91_900 + i) for i in range(0, 50)},
**{f"Chest {i+1}": RLLocationData("Chests", 92_000 + i) for i in range(0, 200)},
2022-01-03 18:12:32 +00:00
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-30 03:15:06 +00:00
# Fairy Chests
**{f"Castle Hamson - Fairy Chest {i+1}": RLLocationData("Fairies", 91_400 + i) for i in range(0, 15)},
**{f"Forest Abkhazia - Fairy Chest {i+1}": RLLocationData("Fairies", 91_450 + i) for i in range(0, 15)},
**{f"The Maya - Fairy Chest {i+1}": RLLocationData("Fairies", 91_500 + i) for i in range(0, 15)},
**{f"Land of Darkness - Fairy Chest {i+1}": RLLocationData("Fairies", 91_550 + i) for i in range(0, 15)},
**{f"Fairy Chest {i+1}": RLLocationData("Fairies", 92_200 + i) for i in range(0, 60)},
2022-01-03 18:12:32 +00:00
}
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-30 03:15:06 +00:00
event_location_table: Dict[str, RLLocationData] = {
"Castle Hamson Boss Room": RLLocationData("Event"),
"Forest Abkhazia Boss Room": RLLocationData("Event"),
"The Maya Boss Room": RLLocationData("Event"),
"Land of Darkness Boss Room": RLLocationData("Event"),
"Fountain Room": RLLocationData("Event"),
2022-01-03 18:12:32 +00:00
}