mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
[OC2] Colored Ramp Button Items (#1466)
Before: 1 item activates all 4 After: 7 items activate 7 buttons, creating more divergent routes Also, I consolidated the 6 filler emotes into a single "Emote Wheel" item to make space in the item pool. I bumped my data version and min AP version to indicate this change. The corresponding oc2-modding update is **v1.6.0**
This commit is contained in:
@@ -8,13 +8,16 @@ def has_requirements_for_level_access(state: CollectionState, level_name: str, p
|
||||
required_star_count: int, player: int) -> bool:
|
||||
# Check if the ramps in the overworld are set correctly
|
||||
if level_name in ramp_logic:
|
||||
if not state.has("Ramp Button", player):
|
||||
return False # need the item to use ramps
|
||||
(ramp_reqs, level_reqs) = ramp_logic[level_name]
|
||||
|
||||
for req in ramp_logic[level_name]:
|
||||
for req in level_reqs:
|
||||
if not state.has(req + " Level Complete", player):
|
||||
return False # This level needs another to be beaten first
|
||||
|
||||
for req in ramp_reqs:
|
||||
if not state.has(req + " Ramp", player):
|
||||
return False # The player doesn't have the pre-requisite ramp button
|
||||
|
||||
# Kevin Levels Need to have the corresponding items
|
||||
if level_name.startswith("K"):
|
||||
return state.has(level_name, player)
|
||||
@@ -78,7 +81,7 @@ def is_item_progression(item_name, level_mapping, include_kevin):
|
||||
if item_name.endswith("Emote"):
|
||||
return False
|
||||
|
||||
if "Kevin" in item_name or item_name in ["Ramp Button"]:
|
||||
if "Kevin" in item_name or "Ramp" in item_name:
|
||||
return True # always progression
|
||||
|
||||
def item_in_logic(shortname, _item_name):
|
||||
@@ -216,23 +219,23 @@ def is_completable_no_items(level: Overcooked2GenericLevel) -> bool:
|
||||
#
|
||||
# If empty, a ramp is required to access, but the ramp button is garunteed accessible
|
||||
#
|
||||
# If populated, a ramp is required to access and the button requires all levels in the
|
||||
# If populated, ramp(s) are required to access and the button requires all levels in the
|
||||
# list to be compelted before it can be pressed
|
||||
#
|
||||
ramp_logic = {
|
||||
"1-5": [],
|
||||
"2-2": [],
|
||||
"3-1": [],
|
||||
"5-2": [],
|
||||
"6-1": [],
|
||||
"6-2": ["5-1"], # 5-1 spawns blue button, blue button gets you to red button
|
||||
"Kevin-1": [],
|
||||
"Kevin-7": ["5-1"], # 5-1 spawns blue button,
|
||||
# press blue button,
|
||||
# climb blue ramp,
|
||||
# jump the gap,
|
||||
# climb wood ramps
|
||||
"Kevin-8": ["5-1", "6-2"], # Same as above, but 6-2 spawns the ramp to K8
|
||||
"1-5": (["Yellow"], []),
|
||||
"2-2": (["Green"], []),
|
||||
"3-1": (["Blue"], []),
|
||||
"5-2": (["Purple"], []),
|
||||
"6-1": (["Pink"], []),
|
||||
"6-2": (["Red", "Purple"], ["5-1"]), # 5-1 spawns blue button, blue button gets you to red button
|
||||
"Kevin-1": (["Dark Green"], []),
|
||||
"Kevin-7": (["Purple"], ["5-1"]), # 5-1 spawns blue button,
|
||||
# press blue button,
|
||||
# climb blue ramp,
|
||||
# jump the gap,
|
||||
# climb wood ramps
|
||||
"Kevin-8": (["Red", "Blue"], ["5-1", "6-2"]), # Same as above, but 6-2 spawns the ramp to K8
|
||||
}
|
||||
|
||||
horde_logic = { # Additive
|
||||
|
||||
Reference in New Issue
Block a user