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.
This commit is contained in:
Zach Parks
2022-10-29 22:15:06 -05:00
committed by GitHub
parent 09d8c4b912
commit 1cad51b1af
14 changed files with 636 additions and 728 deletions

View File

@@ -1,6 +1,6 @@
import typing
from typing import Dict
from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList, OptionSet
from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionSet
class StartingGender(Choice):
@@ -63,9 +63,9 @@ class FairyChestsPerZone(Range):
bonuses can be found in Fairy Chests.
"""
display_name = "Fairy Chests Per Zone"
range_start = 5
range_start = 0
range_end = 15
default = 5
default = 1
class ChestsPerZone(Range):
@@ -74,9 +74,9 @@ class ChestsPerZone(Range):
gold or stat bonuses can be found in Chests.
"""
display_name = "Chests Per Zone"
range_start = 15
range_end = 30
default = 15
range_start = 20
range_end = 50
default = 20
class UniversalFairyChests(Toggle):
@@ -111,8 +111,10 @@ class Architect(Choice):
"""
display_name = "Architect"
option_start_unlocked = 0
option_normal = 2
option_early = 1
option_anywhere = 2
option_disabled = 3
alias_normal = 2
default = 2
@@ -173,7 +175,7 @@ class NumberOfChildren(Range):
default = 3
class AdditionalNames(OptionList):
class AdditionalNames(OptionSet):
"""
Set of additional names your potential offspring can have. If Allow Default Names is disabled, this is the only list
of names your children can have. The first value will also be your initial character's name depending on Starting
@@ -337,7 +339,8 @@ class AvailableClasses(OptionSet):
default = {"Knight", "Mage", "Barbarian", "Knave", "Shinobi", "Miner", "Spellthief", "Lich", "Dragon", "Traitor"}
valid_keys = {"Knight", "Mage", "Barbarian", "Knave", "Shinobi", "Miner", "Spellthief", "Lich", "Dragon", "Traitor"}
legacy_options: typing.Dict[str, type(Option)] = {
rl_options: Dict[str, type(Option)] = {
"starting_gender": StartingGender,
"starting_class": StartingClass,
"available_classes": AvailableClasses,