SA2B: v2.1 Content Update (#1563)

Changelog:

Features:
- New goal
  - Grand Prix
    - Complete all of the Kart Races to win!
- New optional Location Checks
  - Omosanity (Activating Omochao)
  - Kart Race Mode
- Ring Loss option
  - `Classic` - lose all rings on hit
  - `Modern` - lose 20 rings on hit
  - `OHKO` - instantly die on hit, regardless of ring count (shields still protect you)
- New Trap
  - Pong Trap

Quality of Life:
- SA2B is now distributed as an `.apworld`
- Maximum possible number of Emblems in item pool is increased from 180 to 250
- An indicator now shows on the Stage Select screen when `Cannon's Core` is available
- Certain traps (`Exposition` and `Pong`) are now possible to receive on `Route 101` and `Route 280`
- Certain traps (`Confusion`, `Chaos Control`, `Exposition` and `Pong`) are now possible to receive on `FinalHazard`

Bug Fixes:
- Actually swap Intermediate and Expert Chao Races correctly
- Don't always grant double score for killing Gold Beetles anymore
- Ensure upgrades are applied properly, even when received while dying
- Fix the Message Queue getting disordered when receiving many messages in quick succession
- Fix Logic errors
  - `City Escape - 3` (Hard Logic) now requires no upgrades
  - `Mission Street - Pipe 2` (Hard Logic) now requires no upgrades
  - `Crazy Gadget - Pipe 3` (Hard Logic) now requires no upgrades
  - `Egg Quarters - 3` (Hard Logic) now requires only `Rouge - Mystic Melody`
  - `Mad Space - 5` (Hard Logic) now requires no upgrades

Co-authored-by: RaspberrySpaceJam <tyler.summers@gmail.com>
This commit is contained in:
PoryGone
2023-03-21 16:26:13 -04:00
committed by GitHub
parent 2fb9176511
commit 21a3c74783
11 changed files with 1394 additions and 221 deletions

View File

@@ -194,48 +194,52 @@ stage_name_prefixes: typing.List[str] = [
]
def get_mission_count_table(multiworld: MultiWorld, player: int):
speed_active_missions = 1
mech_active_missions = 1
hunt_active_missions = 1
kart_active_missions = 1
cannons_core_active_missions = 1
for i in range(2,6):
if getattr(multiworld, "speed_mission_" + str(i), None)[player]:
speed_active_missions += 1
if getattr(multiworld, "mech_mission_" + str(i), None)[player]:
mech_active_missions += 1
if getattr(multiworld, "hunt_mission_" + str(i), None)[player]:
hunt_active_missions += 1
if getattr(multiworld, "kart_mission_" + str(i), None)[player]:
kart_active_missions += 1
if getattr(multiworld, "cannons_core_mission_" + str(i), None)[player]:
cannons_core_active_missions += 1
speed_active_missions = min(speed_active_missions, multiworld.speed_mission_count[player].value)
mech_active_missions = min(mech_active_missions, multiworld.mech_mission_count[player].value)
hunt_active_missions = min(hunt_active_missions, multiworld.hunt_mission_count[player].value)
kart_active_missions = min(kart_active_missions, multiworld.kart_mission_count[player].value)
cannons_core_active_missions = min(cannons_core_active_missions, multiworld.cannons_core_mission_count[player].value)
active_missions: typing.List[typing.List[int]] = [
speed_active_missions,
mech_active_missions,
hunt_active_missions,
kart_active_missions,
cannons_core_active_missions
]
mission_count_table: typing.Dict[int, int] = {}
for level in range(31):
level_style = level_styles[level]
level_mission_count = active_missions[level_style]
mission_count_table[level] = level_mission_count
if multiworld.goal[player] == 3:
for level in range(31):
mission_count_table[level] = 0
else:
speed_active_missions = 1
mech_active_missions = 1
hunt_active_missions = 1
kart_active_missions = 1
cannons_core_active_missions = 1
for i in range(2,6):
if getattr(multiworld, "speed_mission_" + str(i), None)[player]:
speed_active_missions += 1
if getattr(multiworld, "mech_mission_" + str(i), None)[player]:
mech_active_missions += 1
if getattr(multiworld, "hunt_mission_" + str(i), None)[player]:
hunt_active_missions += 1
if getattr(multiworld, "kart_mission_" + str(i), None)[player]:
kart_active_missions += 1
if getattr(multiworld, "cannons_core_mission_" + str(i), None)[player]:
cannons_core_active_missions += 1
speed_active_missions = min(speed_active_missions, multiworld.speed_mission_count[player].value)
mech_active_missions = min(mech_active_missions, multiworld.mech_mission_count[player].value)
hunt_active_missions = min(hunt_active_missions, multiworld.hunt_mission_count[player].value)
kart_active_missions = min(kart_active_missions, multiworld.kart_mission_count[player].value)
cannons_core_active_missions = min(cannons_core_active_missions, multiworld.cannons_core_mission_count[player].value)
active_missions: typing.List[typing.List[int]] = [
speed_active_missions,
mech_active_missions,
hunt_active_missions,
kart_active_missions,
cannons_core_active_missions
]
for level in range(31):
level_style = level_styles[level]
level_mission_count = active_missions[level_style]
mission_count_table[level] = level_mission_count
return mission_count_table
@@ -243,73 +247,77 @@ def get_mission_count_table(multiworld: MultiWorld, player: int):
def get_mission_table(multiworld: MultiWorld, player: int):
mission_table: typing.Dict[int, int] = {}
speed_active_missions: typing.List[int] = [1]
mech_active_missions: typing.List[int] = [1]
hunt_active_missions: typing.List[int] = [1]
kart_active_missions: typing.List[int] = [1]
cannons_core_active_missions: typing.List[int] = [1]
if multiworld.goal[player] == 3:
for level in range(31):
mission_table[level] = 0
else:
speed_active_missions: typing.List[int] = [1]
mech_active_missions: typing.List[int] = [1]
hunt_active_missions: typing.List[int] = [1]
kart_active_missions: typing.List[int] = [1]
cannons_core_active_missions: typing.List[int] = [1]
# Add included missions
for i in range(2,6):
if getattr(multiworld, "speed_mission_" + str(i), None)[player]:
speed_active_missions.append(i)
if getattr(multiworld, "mech_mission_" + str(i), None)[player]:
mech_active_missions.append(i)
if getattr(multiworld, "hunt_mission_" + str(i), None)[player]:
hunt_active_missions.append(i)
if getattr(multiworld, "kart_mission_" + str(i), None)[player]:
kart_active_missions.append(i)
if getattr(multiworld, "cannons_core_mission_" + str(i), None)[player]:
cannons_core_active_missions.append(i)
active_missions: typing.List[typing.List[int]] = [
speed_active_missions,
mech_active_missions,
hunt_active_missions,
kart_active_missions,
cannons_core_active_missions
]
for level in range(31):
level_style = level_styles[level]
level_active_missions: typing.List[int] = copy.deepcopy(active_missions[level_style])
level_chosen_missions: typing.List[int] = []
# The first mission must be M1, M2, or M4
first_mission = 1
if multiworld.mission_shuffle[player]:
first_mission = multiworld.random.choice([mission for mission in level_active_missions if mission in [1, 2, 3, 4]])
level_active_missions.remove(first_mission)
# Place Active Missions in the chosen mission list
for mission in level_active_missions:
if mission not in level_chosen_missions:
level_chosen_missions.append(mission)
if multiworld.mission_shuffle[player]:
multiworld.random.shuffle(level_chosen_missions)
level_chosen_missions.insert(0, first_mission)
# Fill in the non-included missions
# Add included missions
for i in range(2,6):
if i not in level_chosen_missions:
level_chosen_missions.append(i)
if getattr(multiworld, "speed_mission_" + str(i), None)[player]:
speed_active_missions.append(i)
# Determine which mission order index we have, for conveying to the mod
for i in range(len(mission_orders)):
if mission_orders[i] == level_chosen_missions:
level_mission_index = i
break
if getattr(multiworld, "mech_mission_" + str(i), None)[player]:
mech_active_missions.append(i)
mission_table[level] = level_mission_index
if getattr(multiworld, "hunt_mission_" + str(i), None)[player]:
hunt_active_missions.append(i)
if getattr(multiworld, "kart_mission_" + str(i), None)[player]:
kart_active_missions.append(i)
if getattr(multiworld, "cannons_core_mission_" + str(i), None)[player]:
cannons_core_active_missions.append(i)
active_missions: typing.List[typing.List[int]] = [
speed_active_missions,
mech_active_missions,
hunt_active_missions,
kart_active_missions,
cannons_core_active_missions
]
for level in range(31):
level_style = level_styles[level]
level_active_missions: typing.List[int] = copy.deepcopy(active_missions[level_style])
level_chosen_missions: typing.List[int] = []
# The first mission must be M1, M2, M3, or M4
first_mission = 1
if multiworld.mission_shuffle[player]:
first_mission = multiworld.random.choice([mission for mission in level_active_missions if mission in [1, 2, 3, 4]])
level_active_missions.remove(first_mission)
# Place Active Missions in the chosen mission list
for mission in level_active_missions:
if mission not in level_chosen_missions:
level_chosen_missions.append(mission)
if multiworld.mission_shuffle[player]:
multiworld.random.shuffle(level_chosen_missions)
level_chosen_missions.insert(0, first_mission)
# Fill in the non-included missions
for i in range(2,6):
if i not in level_chosen_missions:
level_chosen_missions.append(i)
# Determine which mission order index we have, for conveying to the mod
for i in range(len(mission_orders)):
if mission_orders[i] == level_chosen_missions:
level_mission_index = i
break
mission_table[level] = level_mission_index
return mission_table