RoR2: bug fixes (#1891)
* adding back parens that got deleted by accident. * Void Locus and The Planetarium ids backwards * change required client version * beads of fealty was missing for A Moment, whole victory * found another logic bug * Update worlds/ror2/__init__.py Co-authored-by: Zach Parks <zach@alliware.com> * Remove unnecessary comment --------- Co-authored-by: Zach Parks <zach@alliware.com>
This commit is contained in:
parent
125ee8b198
commit
a7bc8846cd
|
@ -20,7 +20,8 @@ item_table: Dict[str, int] = {
|
||||||
"Item Scrap, Green": 37009,
|
"Item Scrap, Green": 37009,
|
||||||
"Item Scrap, Red": 37010,
|
"Item Scrap, Red": 37010,
|
||||||
"Item Scrap, Yellow": 37011,
|
"Item Scrap, Yellow": 37011,
|
||||||
"Void Item": 37012
|
"Void Item": 37012,
|
||||||
|
"Beads of Fealty": 37013
|
||||||
}
|
}
|
||||||
|
|
||||||
# 37700 - 37699
|
# 37700 - 37699
|
||||||
|
|
|
@ -92,7 +92,6 @@ def create_regions(multiworld: MultiWorld, player: int):
|
||||||
non_dlc_regions["Menu"].region_exits.append("Siphoned Forest")
|
non_dlc_regions["Menu"].region_exits.append("Siphoned Forest")
|
||||||
other_regions["OrderedStage_2"].region_exits.append("Aphelian Sanctuary")
|
other_regions["OrderedStage_2"].region_exits.append("Aphelian Sanctuary")
|
||||||
other_regions["OrderedStage_3"].region_exits.append("Sulfur Pools")
|
other_regions["OrderedStage_3"].region_exits.append("Sulfur Pools")
|
||||||
other_regions["Commencement"].region_exits.append("The Planetarium")
|
|
||||||
other_regions["Void Fields"].region_exits.append("Void Locus")
|
other_regions["Void Fields"].region_exits.append("Void Locus")
|
||||||
regions_pool: Dict = {**all_location_regions, **other_regions, **dlc_other_regions}
|
regions_pool: Dict = {**all_location_regions, **other_regions, **dlc_other_regions}
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,8 @@ environment_sotv_simulacrum_table: Dict[str, int] = {
|
||||||
}
|
}
|
||||||
|
|
||||||
environment_sotv_special_table: Dict[str, int] = {
|
environment_sotv_special_table: Dict[str, int] = {
|
||||||
"Void Locus": 45, # voidstage
|
"Void Locus": 46, # voidstage
|
||||||
"The Planetarium": 46, # voidraid
|
"The Planetarium": 45, # voidraid
|
||||||
}
|
}
|
||||||
|
|
||||||
X = TypeVar("X")
|
X = TypeVar("X")
|
||||||
|
|
|
@ -31,10 +31,11 @@ def check_location(state, environment: str, player: int, item_number: int, item_
|
||||||
# unlock event to next set of stages
|
# unlock event to next set of stages
|
||||||
def get_stage_event(multiworld: MultiWorld, player: int, stage_number: int):
|
def get_stage_event(multiworld: MultiWorld, player: int, stage_number: int):
|
||||||
if not multiworld.dlc_sotv[player]:
|
if not multiworld.dlc_sotv[player]:
|
||||||
environment_name = multiworld.random.choices(list(environment_vanilla_orderedstages_table[stage_number].keys()), k=1)
|
environment_name = multiworld.random.choices(list(environment_vanilla_orderedstages_table[stage_number].keys()),
|
||||||
|
k=1)
|
||||||
else:
|
else:
|
||||||
environment_name = multiworld.random.choices(list(environment_orderedstages_table[stage_number].keys()), k=1)
|
environment_name = multiworld.random.choices(list(environment_orderedstages_table[stage_number].keys()), k=1)
|
||||||
multiworld.get_location(f"Stage_{stage_number+1}", player).access_rule = \
|
multiworld.get_location(f"Stage_{stage_number + 1}", player).access_rule = \
|
||||||
lambda state: get_one_of_the_stages(state, environment_name[0], player)
|
lambda state: get_one_of_the_stages(state, environment_name[0], player)
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +44,6 @@ def get_one_of_the_stages(state: CollectionState, stage: str, player: int):
|
||||||
|
|
||||||
|
|
||||||
def set_rules(multiworld: MultiWorld, player: int) -> None:
|
def set_rules(multiworld: MultiWorld, player: int) -> None:
|
||||||
|
|
||||||
if multiworld.goal[player] == "classic":
|
if multiworld.goal[player] == "classic":
|
||||||
# classic mode
|
# classic mode
|
||||||
total_locations = multiworld.total_locations[player].value # total locations for current player
|
total_locations = multiworld.total_locations[player].value # total locations for current player
|
||||||
|
@ -72,7 +72,8 @@ def set_rules(multiworld: MultiWorld, player: int) -> None:
|
||||||
event_loc = multiworld.get_location(f"Pickup{i * event_location_step}", player)
|
event_loc = multiworld.get_location(f"Pickup{i * event_location_step}", player)
|
||||||
set_rule(event_loc,
|
set_rule(event_loc,
|
||||||
lambda state, i=i: state.can_reach(f"ItemPickup{i * event_location_step - 1}", "Location", player))
|
lambda state, i=i: state.can_reach(f"ItemPickup{i * event_location_step - 1}", "Location", player))
|
||||||
for n in range(i * event_location_step, (i + 1) * event_location_step + 1): # we want to create a rule for each of the 25 locations per division
|
# we want to create a rule for each of the 25 locations per division
|
||||||
|
for n in range(i * event_location_step, (i + 1) * event_location_step + 1):
|
||||||
if n > total_locations:
|
if n > total_locations:
|
||||||
break
|
break
|
||||||
if n == i * event_location_step:
|
if n == i * event_location_step:
|
||||||
|
@ -140,11 +141,13 @@ def set_rules(multiworld: MultiWorld, player: int) -> None:
|
||||||
has_location_access_rule(multiworld, environment_name, player, newt, "Newt Altar")
|
has_location_access_rule(multiworld, environment_name, player, newt, "Newt Altar")
|
||||||
if i > 0:
|
if i > 0:
|
||||||
has_entrance_access_rule(multiworld, f"Stage_{i}", environment_name, player)
|
has_entrance_access_rule(multiworld, f"Stage_{i}", environment_name, player)
|
||||||
has_entrance_access_rule(multiworld, f"Hidden Realm: A Moment, Fractured", "Hidden Realm: A Moment, Whole", player)
|
has_entrance_access_rule(multiworld, f"Hidden Realm: A Moment, Fractured", "Hidden Realm: A Moment, Whole",
|
||||||
|
player)
|
||||||
has_entrance_access_rule(multiworld, f"Stage_1", "Hidden Realm: Bazaar Between Time", player)
|
has_entrance_access_rule(multiworld, f"Stage_1", "Hidden Realm: Bazaar Between Time", player)
|
||||||
has_entrance_access_rule(multiworld, f"Hidden Realm: Bazaar Between Time", "Void Fields", player)
|
has_entrance_access_rule(multiworld, f"Hidden Realm: Bazaar Between Time", "Void Fields", player)
|
||||||
has_entrance_access_rule(multiworld, f"Stage_5", "Commencement", player)
|
has_entrance_access_rule(multiworld, f"Stage_5", "Commencement", player)
|
||||||
has_entrance_access_rule(multiworld, f"Stage_5", "Hidden Realm: A Moment, Fractured", player)
|
has_entrance_access_rule(multiworld, f"Stage_5", "Hidden Realm: A Moment, Fractured", player)
|
||||||
|
has_entrance_access_rule(multiworld, "Beads of Fealty", "Hidden Realm: A Moment, Whole", player)
|
||||||
if multiworld.dlc_sotv[player]:
|
if multiworld.dlc_sotv[player]:
|
||||||
has_entrance_access_rule(multiworld, f"Stage_5", "Void Locus", player)
|
has_entrance_access_rule(multiworld, f"Stage_5", "Void Locus", player)
|
||||||
has_entrance_access_rule(multiworld, f"Void Locus", "The Planetarium", player)
|
has_entrance_access_rule(multiworld, f"Void Locus", "The Planetarium", player)
|
||||||
|
|
|
@ -35,8 +35,8 @@ class RiskOfRainWorld(World):
|
||||||
item_name_to_id = item_table
|
item_name_to_id = item_table
|
||||||
location_name_to_id = item_pickups
|
location_name_to_id = item_pickups
|
||||||
|
|
||||||
data_version = 6
|
data_version = 7
|
||||||
required_client_version = (0, 3, 7)
|
required_client_version = (0, 4, 2)
|
||||||
web = RiskOfWeb()
|
web = RiskOfWeb()
|
||||||
total_revivals: int
|
total_revivals: int
|
||||||
|
|
||||||
|
@ -113,22 +113,22 @@ class RiskOfRainWorld(World):
|
||||||
}
|
}
|
||||||
|
|
||||||
# remove lunar items from the pool if they're disabled in the yaml unless lunartic is rolled
|
# remove lunar items from the pool if they're disabled in the yaml unless lunartic is rolled
|
||||||
if not self.multiworld.enable_lunar[self.player] or pool_option == ItemWeights.option_lunartic:
|
if not (self.multiworld.enable_lunar[self.player] or pool_option == ItemWeights.option_lunartic):
|
||||||
junk_pool.pop("Lunar Item")
|
junk_pool.pop("Lunar Item")
|
||||||
# remove void items from the pool
|
# remove void items from the pool
|
||||||
if not self.multiworld.dlc_sotv[self.player] or pool_option == ItemWeights.option_void:
|
if not (self.multiworld.dlc_sotv[self.player] or pool_option == ItemWeights.option_void):
|
||||||
junk_pool.pop("Void Item")
|
junk_pool.pop("Void Item")
|
||||||
|
|
||||||
# Generate item pool
|
# Generate item pool
|
||||||
itempool: List = []
|
itempool: List = []
|
||||||
# Add revive items for the player
|
# Add revive items for the player
|
||||||
itempool += ["Dio's Best Friend"] * self.total_revivals
|
itempool += ["Dio's Best Friend"] * self.total_revivals
|
||||||
|
itempool += ["Beads of Fealty"]
|
||||||
|
|
||||||
for env_name, _ in environments_pool.items():
|
for env_name, _ in environments_pool.items():
|
||||||
itempool += [env_name]
|
itempool += [env_name]
|
||||||
|
|
||||||
# precollected environments are popped from the pool so counting like this is valid
|
nonjunk_item_count = len(itempool)
|
||||||
nonjunk_item_count = self.total_revivals + len(environments_pool)
|
|
||||||
if self.multiworld.goal[self.player] == "classic":
|
if self.multiworld.goal[self.player] == "classic":
|
||||||
# classic mode
|
# classic mode
|
||||||
total_locations = self.multiworld.total_locations[self.player].value
|
total_locations = self.multiworld.total_locations[self.player].value
|
||||||
|
@ -205,7 +205,7 @@ class RiskOfRainWorld(World):
|
||||||
def create_item(self, name: str) -> Item:
|
def create_item(self, name: str) -> Item:
|
||||||
item_id = item_table[name]
|
item_id = item_table[name]
|
||||||
classification = ItemClassification.filler
|
classification = ItemClassification.filler
|
||||||
if name == "Dio's Best Friend":
|
if name in {"Dio's Best Friend", "Beads of Fealty"}:
|
||||||
classification = ItemClassification.progression
|
classification = ItemClassification.progression
|
||||||
elif name in {"Legendary Item", "Boss Item"}:
|
elif name in {"Legendary Item", "Boss Item"}:
|
||||||
classification = ItemClassification.useful
|
classification = ItemClassification.useful
|
||||||
|
|
Loading…
Reference in New Issue