Skip to content

Commit

Permalink
SA2B: v2.2 Content Update (ArchipelagoMW#1904)
Browse files Browse the repository at this point in the history
* Ice Trap Support

* Support Animalsanity

* Add option for controlling number of emblems in pool

* Support Slow Trap

* Support Cutscene Traps

* Support Voice Shuffle

* Handle Boss Rush goals

* Fix create item reference to self.multiworld

* Support Ringlink

* Reduce beep frequency to 20

* Add Boss Rush Chaos Emerald Hunt Goal

* Fix Eternal Engine - Pipe 1 logic

* Add Chao voice shuffle

* Remove unused option

* Adjust wording of Required Cannon's Core Missions

* Fix incorrect region assignment

* Fix incorrect animal logics

* Fix Chao Race tooltip

* Remove Green Hill Animal Location

* Add Location Count info to tooltips

* Don't allow M4 first if animalsanity is active

* Add Iron Boots to Standard Logic Egg Quarters 5

* Make Vanilla Boss Rush actually Vanilla

* Increment Mod Version

* Increment Data Package Version

---------

Co-authored-by: RaspberrySpaceJam <[email protected]>
  • Loading branch information
PoryGone and RaspberrySpace authored Jun 27, 2023
1 parent d51e0ec commit 1ced726
Show file tree
Hide file tree
Showing 10 changed files with 3,067 additions and 585 deletions.
42 changes: 42 additions & 0 deletions worlds/sa2b/GateBosses.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
king_boom_boo: 10,
}

extra_boss_rush_bosses_table = {
speed_characters_1: 11,
speed_characters_2: 12,
mech_characters_1: 13,
mech_characters_2: 14,
hunt_characters_1: 15,
}

all_gate_bosses_table = {
**gate_bosses_no_requirements_table,
**gate_bosses_with_requirements_table,
Expand All @@ -42,6 +50,9 @@ def get_boss_name(boss: int):
for key, value in gate_bosses_with_requirements_table.items():
if value == boss:
return key
for key, value in extra_boss_rush_bosses_table.items():
if value == boss:
return key


def boss_has_requirement(boss: int):
Expand All @@ -67,3 +78,34 @@ def get_gate_bosses(world, player: int):
bosses: typing.Dict[int, int] = dict(zip(boss_gates, selected_bosses))

return bosses


def get_boss_rush_bosses(multiworld, player: int):

if multiworld.boss_rush_shuffle[player] == 0:
boss_list_o = list(range(0, 16))
boss_list_s = [5, 2, 0, 10, 8, 4, 3, 1, 6, 13, 7, 11, 9, 15, 14, 12]

return dict(zip(boss_list_o, boss_list_s))
elif multiworld.boss_rush_shuffle[player] == 1:
boss_list_o = list(range(0, 16))
boss_list_s = boss_list_o.copy()
multiworld.random.shuffle(boss_list_s)

return dict(zip(boss_list_o, boss_list_s))
elif multiworld.boss_rush_shuffle[player] == 2:
boss_list_o = list(range(0, 16))
boss_list_s = [multiworld.random.choice(boss_list_o) for i in range(0, 16)]
if 10 not in boss_list_s:
boss_list_s[multiworld.random.randint(0, 15)] = 10

return dict(zip(boss_list_o, boss_list_s))
elif multiworld.boss_rush_shuffle[player] == 3:
boss_list_o = list(range(0, 16))
boss_list_s = [multiworld.random.choice(boss_list_o)] * len(boss_list_o)
if 10 not in boss_list_s:
boss_list_s[multiworld.random.randint(0, 15)] = 10

return dict(zip(boss_list_o, boss_list_s))
else:
return dict()
3 changes: 3 additions & 0 deletions worlds/sa2b/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def __init__(self, name, classification: ItemClassification, code: int = None, p
ItemName.gravity_trap: ItemData(0xFF0034, False, True),
ItemName.exposition_trap: ItemData(0xFF0035, False, True),
#ItemName.darkness_trap: ItemData(0xFF0036, False, True),
ItemName.ice_trap: ItemData(0xFF0037, False, True),
ItemName.slow_trap: ItemData(0xFF0038, False, True),
ItemName.cutscene_trap: ItemData(0xFF0039, False, True),

ItemName.pong_trap: ItemData(0xFF0050, False, True),
}
Expand Down
Loading

0 comments on commit 1ced726

Please sign in to comment.