SA2B: Logic Fixes and Black Market Trap Name Improvements (#5427)

* Logic fixes and more Chao and Fake Item names

* Fix typo

* Overhaul Shop Trap Item names
This commit is contained in:
PoryGone
2025-09-08 21:29:31 -04:00
committed by GitHub
parent 17dad8313e
commit 18ac9210cb
3 changed files with 280 additions and 90 deletions

View File

@@ -170,126 +170,309 @@ sample_chao_names = [
"Portia", "Portia",
"Graves", "Graves",
"Kaycee", "Kaycee",
"Ghandi",
"Medli",
"Jak",
"Wario",
"Theo",
] ]
totally_real_item_names = [ totally_real_item_names: dict[str, list[str]] = {
"Mallet", "Bumper Stickers": [
"Lava Rod", "Bonus Score",
"Master Knife", "Boosting Bumper",
"Slippers", ],
"Spade",
"Progressive Car Upgrade", "Castlevania 64": [
"Bonus Token", "Earth card",
"Venus card",
"Ax",
"Storehouse Key",
],
"Shortnail", "Celeste 64": [
"Runmaster", "Blueberry",
"Side Flip",
"Triple Dash Refills",
"Swap Blocks",
"Dream Blocks",
],
"Courage Form", "Celeste (Open World)": [
"Auto Courage", "Green Boosters",
"Donald Defender", "Triple Dash Refills",
"Goofy Blizzard", "Rising Platforms",
"Ultimate Weapon", "Red Bubbles",
"Granny's Car Keys",
"Blueberry",
],
"Song of the Sky Whale", "Civilization VI": [
"Gryphon Shoes", "Advanced Trebuchets",
"Wing Key", "The Wheel 2",
"Strength Anklet", "NFTs",
],
"Hairclip", "Donkey Kong Country 3": [
"Progressive Car Upgrade",
"Bonus Token",
],
"Key of Wisdom", "Factorio": [
"logistic-ai",
"progressive-militia",
"progressive-stronger-explosives",
"uranium-food",
],
"Baking", "A Hat in Time": [
"Progressive Block Mining", "Fire Hat",
"69 Pons",
"Relic (Green Canyon)",
"Relic (Cooler Cow)",
"Time Fragment",
],
"Jar", "Hollow Knight": [
"Whistle of Space", "Shortnail",
"Rito Tunic", "Runmaster",
],
"Kitchen Sink", "Jak and Daxter The Precursor Legacy": [
"69 Precursor Orbs",
"Jump Roll",
"Roll Kick",
],
"Rock Badge", "Kirby's Dream Land 3": [
"Key Card", "CooCoo",
"Pikachu", ],
"Eevee",
"HM02 Strength",
"Progressive Astromancers", "Kingdom Hearts 2": [
"Progressive Chefs", "Courage Form",
"The Living Safe", "Auto Courage",
"Lady Quinn", "Donald Defender",
"Goofy Blizzard",
"Ultimate Weapon",
],
"Dio's Worst Enemy", "Lingo": [
"Art Gallery (First Floor)",
"Color Hunt - Pink Barrier",
],
"Pink Chaos Emerald", "A Link to the Past": [
"Black Chaos Emerald", "Mallet",
"Tails - Large Cannon", "Lava Rod",
"Eggman - Bazooka", "Master Knife",
"Eggman - Booster", "Slippers",
"Knuckles - Shades", "Spade",
"Sonic - Magic Shoes", "Big Key (Dark Palace)",
"Shadow - Bounce Bracelet", "Big Key (Hera Tower)",
"Rouge - Air Necklace", ],
"Big Key (Eggman's Pyramid)",
"Sensor Bunker", "Links Awakening DX": [
"Phantom", "Song of the Sky Whale",
"Soldier", "Gryphon Shoes",
"Wing Key",
"Strength Anklet",
],
"Plasma Suit", "Mario & Luigi Superstar Saga": [
"Gravity Beam", "Mega Nut",
"Hi-Jump Ball", ],
"Cannon Unlock LLL", "The Messenger": [
"Feather Cap", "Key of Anger",
"Time Shard (69)",
"Hydro",
],
"Progressive Yoshi", "Muse Dash": [
"Purple Switch Palace", "U.N. Owen Was Her",
"Cape Feather", "Renai Circulation",
"Flyers",
],
"Cane of Bryan", "Noita": [
"Gold (69)",
"Sphere",
"Melee Die",
],
"Van Repair", "Ocarina of Time": [
"Autumn", "Jar",
"Galaxy Knife", "Whistle of Space",
"Green Cabbage Seeds", "Rito Tunic",
"Boss Key (Forest Haven)",
"Boss Key (Swamp Palace)",
"Boss Key (Great Bay Temple)",
],
"Timespinner Cog 1", "Old School Runescape": [
"Area: Taverly",
"Area: Meiyerditch",
"Fire Cape",
],
"Ladder", "Overcooked! 2": [
"Kitchen Sink",
],
"Visible Dots", "Paint": [
"AI Enhance",
"Paint Bucket",
"Pen",
],
"CooCoo", "Pokemon Red and Blue": [
"Rock Badge",
"Key Card",
"Pikachu",
"Eevee",
"HM02 Strength",
"HM05 Fly",
"HM01 Surf",
"Card Key 12F",
],
"Blueberry", "Risk of Rain 2": [
"Dio's Worst Enemy",
"Stage 5",
"Mythical Item",
],
"Ear of Luigi", "Rogue Legacy": [
"Progressive Astromancers",
"Progressive Chefs",
"The Living Safe",
"Lady Quinn",
],
"Mega Nut", "Saving Princess": [
"Fire Spreadshot",
"Volcano Key",
"Frozen Key",
],
"DUELIST ALLIANCE", "Secret of Evermore": [
"DUEL OVERLOAD", "Mantis Claw",
"POWER OF THE ELEMENTS", "Progressive pants",
"S:P Little Knight", "Deflect",
"Red-Eyes Dark Dragoon", ],
"Fire Hat", "shapez": [
"Spinner",
"Toggle",
"Slicer",
"Splitter",
],
"Area: Taverly", "SMZ3": [
"Area: Meiyerditch", "Cane of Bryan",
"Fire Cape", ],
"Donald Zeta Flare", "Sonic Adventure 2 Battle": [
"Pink Chaos Emerald",
"Black Chaos Emerald",
"Tails - Large Cannon",
"Eggman - Bazooka",
"Eggman - Booster",
"Knuckles - Shades",
"Sonic - Magic Shoes",
"Shadow - Bounce Bracelet",
"Rouge - Air Necklace",
"Big Key (Eggman's Pyramid)",
],
"Category One of a Kind", "Starcraft 2": [
"Category Fuller House", "Sensor Bunker",
"Phantom",
"Soldier",
],
"Passive Camoflage", "Stardew Valley": [
"Van Repair",
"Ship Repair",
"Autumn",
"Galaxy Knife",
"Green Cabbage Seeds",
"Casket",
"Pet Moonlight Jelly",
"Adventurer's Guild Key",
],
"Earth Card", "Super Mario Land 2": [
] "Luigi Coin",
"Luigi Zone Progression",
"Hard Mode",
],
"Super Metroid": [
"Plasma Suit",
"Gravity Beam",
"Hi-Jump Ball",
],
"Super Mario 64": [
"Cannon Unlock LLL",
"Feather Cap",
],
"Super Mario World": [
"Progressive Yoshi",
"Purple Switch Palace",
"Cape Feather",
"Fire Flower",
"Cling",
"Twirl Jump",
],
"Timespinner": [
"Timespinner Cog 1",
"Leg Cannon",
],
"TUNIC": [
"Ladder To West Forest",
"Money x69",
"Page 69",
"Master Sword",
],
"The Wind Waker": [
"Ballad of Storms",
"Wind God's Song",
"Earth God's Song",
"Ordon's Pearl",
],
"The Witness": [
"Visible Dots",
],
"Yacht Dice": [
"Category One of a Kind",
"Category Fuller House",
],
"Yoshi's Island": [
"Ear of Luigi",
"+69 Stars",
"Water Melon",
"World 7 Gate",
"Small Spring Ball",
],
"Yu-Gi-Oh! 2006": [
"DUELIST ALLIANCE",
"DUEL OVERLOAD",
"POWER OF THE ELEMENTS",
"S:P Little Knight",
"Red-Eyes Dark Dragoon",
"Maxx C"
],
}
all_exits = [ all_exits = [
0x00, # Lobby to Neutral 0x00, # Lobby to Neutral

View File

@@ -1406,7 +1406,8 @@ def set_mission_upgrade_rules_standard(multiworld: MultiWorld, world: World, pla
lambda state: (state.has(ItemName.rouge_mystic_melody, player) and lambda state: (state.has(ItemName.rouge_mystic_melody, player) and
state.has(ItemName.rouge_treasure_scope, player))) state.has(ItemName.rouge_treasure_scope, player)))
add_rule(multiworld.get_location(LocationName.white_jungle_lifebox_2, player), add_rule(multiworld.get_location(LocationName.white_jungle_lifebox_2, player),
lambda state: state.has(ItemName.shadow_flame_ring, player)) lambda state: (state.has(ItemName.shadow_flame_ring, player) and
state.has(ItemName.shadow_air_shoes, player)))
add_rule(multiworld.get_location(LocationName.metal_harbor_lifebox_3, player), add_rule(multiworld.get_location(LocationName.metal_harbor_lifebox_3, player),
lambda state: state.has(ItemName.sonic_light_shoes, player)) lambda state: state.has(ItemName.sonic_light_shoes, player))
@@ -2062,6 +2063,8 @@ def set_mission_upgrade_rules_standard(multiworld: MultiWorld, world: World, pla
add_rule(multiworld.get_location(LocationName.mad_space_big, player), add_rule(multiworld.get_location(LocationName.mad_space_big, player),
lambda state: state.has(ItemName.rouge_iron_boots, player)) lambda state: state.has(ItemName.rouge_iron_boots, player))
add_rule(multiworld.get_location(LocationName.cannon_core_big_1, player),
lambda state: state.has(ItemName.tails_booster, player))
add_rule(multiworld.get_location(LocationName.cannon_core_big_2, player), add_rule(multiworld.get_location(LocationName.cannon_core_big_2, player),
lambda state: state.has(ItemName.tails_booster, player) and lambda state: state.has(ItemName.tails_booster, player) and
state.has(ItemName.eggman_jet_engine, player)) state.has(ItemName.eggman_jet_engine, player))

View File

@@ -613,7 +613,8 @@ class SA2BWorld(World):
self.options.chao_stats.value > 0 or \ self.options.chao_stats.value > 0 or \
self.options.chao_animal_parts or \ self.options.chao_animal_parts or \
self.options.chao_kindergarten or \ self.options.chao_kindergarten or \
self.options.black_market_slots.value > 0: self.options.black_market_slots.value > 0 or \
self.options.goal.value == 7:
return True; return True;
return False return False
@@ -757,13 +758,16 @@ class SA2BWorld(World):
item_names = [] item_names = []
player_names = [] player_names = []
progression_flags = [] progression_flags = []
totally_real_item_names_copy = totally_real_item_names.copy()
location_names = [(LocationName.chao_black_market_base + str(i)) for i in range(1, self.options.black_market_slots.value + 1)] location_names = [(LocationName.chao_black_market_base + str(i)) for i in range(1, self.options.black_market_slots.value + 1)]
locations = [self.multiworld.get_location(location_name, self.player) for location_name in location_names] locations = [self.multiworld.get_location(location_name, self.player) for location_name in location_names]
for location in locations: for location in locations:
if location.item.classification & ItemClassification.trap: if location.item.classification & ItemClassification.trap:
item_name = self.random.choice(totally_real_item_names_copy) item_name = ""
totally_real_item_names_copy.remove(item_name) if location.item.game in totally_real_item_names:
item_name = self.random.choice(totally_real_item_names[location.item.game])
else:
random_game_names: list[str] = self.random.choice(list(totally_real_item_names.values()))
item_name = self.random.choice(random_game_names)
item_names.append(item_name) item_names.append(item_name)
else: else:
item_names.append(location.item.name) item_names.append(location.item.name)