mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Timespinner: New options from TS Rando v1.25 + Logic fix (#2090)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
@@ -39,9 +39,9 @@ class TimespinnerWorld(World):
|
||||
option_definitions = timespinner_options
|
||||
game = "Timespinner"
|
||||
topology_present = True
|
||||
data_version = 11
|
||||
data_version = 12
|
||||
web = TimespinnerWebWorld()
|
||||
required_client_version = (0, 3, 7)
|
||||
required_client_version = (0, 4, 2)
|
||||
|
||||
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
||||
location_name_to_id = {location.name: location.code for location in get_location_datas(None, None, None)}
|
||||
@@ -108,7 +108,9 @@ class TimespinnerWorld(World):
|
||||
slot_data["CastleMoat"] = self.precalculated_weights.flood_moat
|
||||
slot_data["CastleCourtyard"] = self.precalculated_weights.flood_courtyard
|
||||
slot_data["LakeDesolation"] = self.precalculated_weights.flood_lake_desolation
|
||||
slot_data["DryLakeSerene"] = self.precalculated_weights.dry_lake_serene
|
||||
slot_data["DryLakeSerene"] = not self.precalculated_weights.flood_lake_serene
|
||||
slot_data["LakeSereneBridge"] = self.precalculated_weights.flood_lake_serene_bridge
|
||||
slot_data["Lab"] = self.precalculated_weights.flood_lab
|
||||
|
||||
return slot_data
|
||||
|
||||
@@ -144,8 +146,12 @@ class TimespinnerWorld(World):
|
||||
flooded_areas.append("Castle Courtyard")
|
||||
if self.precalculated_weights.flood_lake_desolation:
|
||||
flooded_areas.append("Lake Desolation")
|
||||
if not self.precalculated_weights.dry_lake_serene:
|
||||
if self.precalculated_weights.flood_lake_serene:
|
||||
flooded_areas.append("Lake Serene")
|
||||
if self.precalculated_weights.flood_lake_serene_bridge:
|
||||
flooded_areas.append("Lake Serene Bridge")
|
||||
if self.precalculated_weights.flood_lab:
|
||||
flooded_areas.append("Lab")
|
||||
|
||||
if len(flooded_areas) == 0:
|
||||
flooded_areas_string: str = "None"
|
||||
@@ -220,15 +226,18 @@ class TimespinnerWorld(World):
|
||||
|
||||
def assign_starter_items(self, excluded_items: Set[str]) -> None:
|
||||
non_local_items: Set[str] = self.multiworld.non_local_items[self.player].value
|
||||
local_items: Set[str] = self.multiworld.local_items[self.player].value
|
||||
|
||||
local_starter_melee_weapons = tuple(item for item in starter_melee_weapons if item not in non_local_items)
|
||||
local_starter_melee_weapons = tuple(item for item in starter_melee_weapons if
|
||||
item in local_items or not item in non_local_items)
|
||||
if not local_starter_melee_weapons:
|
||||
if 'Plasma Orb' in non_local_items:
|
||||
raise Exception("Atleast one melee orb must be local")
|
||||
else:
|
||||
local_starter_melee_weapons = ('Plasma Orb',)
|
||||
|
||||
local_starter_spells = tuple(item for item in starter_spells if item not in non_local_items)
|
||||
local_starter_spells = tuple(item for item in starter_spells if
|
||||
item in local_items or not item in non_local_items)
|
||||
if not local_starter_spells:
|
||||
if 'Lightwall' in non_local_items:
|
||||
raise Exception("Atleast one spell must be local")
|
||||
|
Reference in New Issue
Block a user