mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00

" Here's a list of compiled changes for the next major release of the Rogue Legacy Randomizer. Ability to toggle (or randomize) whether you fight vanilla bosses or challenge bosses. Ability to change Architect settings (start with unlocked, normal, or disabled) Ability to adjust Architect's fees. Ability to combine chests or fairy chests into a single pool, similar to Risk of Rain 2's implementation. Ability to change blueprints acquirement to being progressive instead of random. Added additional classes that the player can start with and removed all other classes unlocked except for starting class. You must find them! Ability to tweak the item pool amounts for stat ups. Ability to define additional character names. Ability to get a new diary check every time you enter a newly generated castle. "
71 lines
3.1 KiB
Python
71 lines
3.1 KiB
Python
import typing
|
|
|
|
from BaseClasses import MultiWorld, Region, Entrance
|
|
from .Items import LegacyItem
|
|
from .Locations import LegacyLocation, diary_location_table, location_table, base_location_table
|
|
from .Names import LocationName, ItemName
|
|
|
|
|
|
def create_regions(world, player: int):
|
|
|
|
locations: typing.List[str] = []
|
|
|
|
# Add required locations.
|
|
locations += [location for location in base_location_table]
|
|
locations += [location for location in diary_location_table]
|
|
|
|
# Add chests per settings.
|
|
if world.universal_fairy_chests[player]:
|
|
fairies = int(world.fairy_chests_per_zone[player]) * 4
|
|
for i in range(0, fairies):
|
|
locations += [f"Fairy Chest {i + 1}"]
|
|
else:
|
|
fairies = int(world.fairy_chests_per_zone[player])
|
|
for i in range(0, fairies):
|
|
locations += [f"{LocationName.castle} - Fairy Chest {i + 1}"]
|
|
locations += [f"{LocationName.garden} - Fairy Chest {i + 1}"]
|
|
locations += [f"{LocationName.tower} - Fairy Chest {i + 1}"]
|
|
locations += [f"{LocationName.dungeon} - Fairy Chest {i + 1}"]
|
|
|
|
if world.universal_chests[player]:
|
|
chests = int(world.chests_per_zone[player]) * 4
|
|
for i in range(0, chests):
|
|
locations += [f"Chest {i + 1}"]
|
|
else:
|
|
chests = int(world.chests_per_zone[player])
|
|
for i in range(0, chests):
|
|
locations += [f"{LocationName.castle} - Chest {i + 1}"]
|
|
locations += [f"{LocationName.garden} - Chest {i + 1}"]
|
|
locations += [f"{LocationName.tower} - Chest {i + 1}"]
|
|
locations += [f"{LocationName.dungeon} - Chest {i + 1}"]
|
|
|
|
# Set up the regions correctly.
|
|
world.regions += [
|
|
create_region(world, player, "Menu", None, [LocationName.outside]),
|
|
create_region(world, player, LocationName.castle, locations),
|
|
]
|
|
|
|
# Connect entrances and set up events.
|
|
world.get_entrance(LocationName.outside, player).connect(world.get_region(LocationName.castle, player))
|
|
world.get_location(LocationName.castle, player).place_locked_item(LegacyItem(ItemName.boss_castle, True, None, player))
|
|
world.get_location(LocationName.garden, player).place_locked_item(LegacyItem(ItemName.boss_forest, True, None, player))
|
|
world.get_location(LocationName.tower, player).place_locked_item(LegacyItem(ItemName.boss_tower, True, None, player))
|
|
world.get_location(LocationName.dungeon, player).place_locked_item(LegacyItem(ItemName.boss_dungeon, True, None, player))
|
|
world.get_location(LocationName.fountain, player).place_locked_item(LegacyItem(ItemName.boss_fountain, True, None, player))
|
|
|
|
|
|
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
|
|
# Shamelessly stolen from the ROR2 definition, lol
|
|
ret = Region(name, None, name, player)
|
|
ret.world = world
|
|
if locations:
|
|
for location in locations:
|
|
loc_id = location_table.get(location, 0)
|
|
location = LegacyLocation(player, location, loc_id, ret)
|
|
ret.locations.append(location)
|
|
if exits:
|
|
for exit in exits:
|
|
ret.exits.append(Entrance(player, exit, ret))
|
|
|
|
return ret
|