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