diff --git a/DoorShuffle.py b/DoorShuffle.py index 8e65a4cc..d05899ea 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -1814,7 +1814,8 @@ def shuffle_door_types(door_type_pools, paths, world, player): for dungeon, doors in custom_dict.items(): all_custom[dungeon].extend(doors) - world.paired_doors[player].clear() + for pd in world.paired_doors[player]: + pd.pair = False used_doors = shuffle_trap_doors(door_type_pools, paths, start_regions_map, all_custom, world, player) # big keys used_doors = shuffle_big_key_doors(door_type_pools, used_doors, start_regions_map, all_custom, world, player) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index dc6e6fd4..bc754b89 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -2740,7 +2740,7 @@ ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Lost Woods Gamble': (0x240, 0x080), 'Fortune Teller (Light)': (0x2c0, 0x4c0), 'Snitch Lady (East)': (0x310, 0x7a0), - 'Snitch Lady (West)': (0x800, 0x7a0), + 'Snitch Lady (West)': (0x080, 0x7a0), 'Bush Covered House': (0x2e0, 0x880), 'Tavern (Front)': (0x270, 0x980), 'Light World Bomb Hut': (0x070, 0x980), diff --git a/Fill.py b/Fill.py index d549e969..0c1033b2 100644 --- a/Fill.py +++ b/Fill.py @@ -670,9 +670,10 @@ def sell_potions(world, player): for potion in ['Green Potion', 'Blue Potion', 'Red Potion']: location = random.choice(filter_locations(ItemFactory(potion, player), locations, world, potion=True)) locations.remove(location) - p_item = next(item for item in world.itempool if item.name == potion and item.player == player) - world.push_item(location, p_item, collect=False) - world.itempool.remove(p_item) + p_item = next((item for item in world.itempool if item.name == potion and item.player == player), None) + if p_item: + world.push_item(location, p_item, collect=False) + world.itempool.remove(p_item) def sell_keys(world, player): diff --git a/Main.py b/Main.py index 08cd7ff0..4c89f5ad 100644 --- a/Main.py +++ b/Main.py @@ -36,7 +36,9 @@ from source.overworld.EntranceShuffle2 import link_entrances_new from source.tools.BPS import create_bps_from_data from source.classes.CustomSettings import CustomSettings -__version__ = '1.2.0.12u' +version_number = '1.2.0.13' +version_branch = '-u' +__version__ = f'{version_number}{version_branch}' from source.classes.BabelFish import BabelFish @@ -265,6 +267,7 @@ def main(args, seed=None, fish=None): set_rules(world, player) district_item_pool_config(world) + fill_specific_items(world) for player in range(1, world.players + 1): if world.shopsanity[player]: sell_potions(world, player) @@ -277,8 +280,6 @@ def main(args, seed=None, fish=None): if args.print_custom_yaml: world.settings.record_item_pool(world) dungeon_tracking(world) - fill_specific_items(world) - logger.info(world.fish.translate("cli", "cli", "placing.dungeon.prizes")) fill_prizes(world) diff --git a/MultiServer.py b/MultiServer.py index 4108b8dd..a9f9e9e2 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -46,6 +46,9 @@ class Context: self.lookup_name_to_id = {} self.lookup_id_to_name = {} + self.disable_client_forfeit = False + + async def send_msgs(websocket, msgs): if not websocket or not websocket.open or websocket.closed: return @@ -281,7 +284,10 @@ async def process_client_cmd(ctx : Context, client : Client, cmd, args): if args.startswith('!players'): notify_all(ctx, get_connected_players_string(ctx)) if args.startswith('!forfeit'): - forfeit_player(ctx, client.team, client.slot) + if ctx.disable_client_forfeit: + notify_client(client, 'Client-initiated forfeits are disabled. Please ask the host of this game to forfeit on your behalf.') + else: + forfeit_player(ctx, client.team, client.slot) if args.startswith('!countdown'): try: timer = int(args.split()[1]) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 317db6b2..e2c23a11 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -108,6 +108,14 @@ These are now independent of retro mode and have three options: None, Random, an * Bonk Fairy (Dark) # Bug Fixes and Notes + +* 1.2.0.13u + * Allow green/blue potion refills to be customized + * OW Map showing dungeon entrance at Snitch Lady (West) fixed (instead of @ HC Courtyard) + * Standing item data is cleared on transition to overworld (enemy drops won't bleed to overworld sprites) + * Escape assist won't give you a free quiver in retro bow mode + * Fixed an issue where a door would be opened magically (due to original pairing) + * MultiServer can now disable forfeits if desired * 1.2.0.12u * Fix for mirror portal in inverted * Yet another fix for blocked door in Standard ER diff --git a/Rom.py b/Rom.py index f351d017..bfe4d259 100644 --- a/Rom.py +++ b/Rom.py @@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'c27bdd316ea8312214643e0a4ea32c10' +RANDOMIZERBASEHASH = 'baa1135c06e1e38d4005ba3c7acb977b' class JsonRom(object): @@ -1716,6 +1716,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): rom.name.extend([0] * (21 - len(rom.name))) rom.write_bytes(0x7FC0, rom.name) + rom.write_bytes(0x138010, bytearray(__version__, 'utf8')) + # set player names for p in range(1, min(world.players, 255) + 1): rom.write_bytes(0x195FFC + ((p - 1) * 32), hud_format_text(world.player_names[p][team])) diff --git a/asm/owrando.asm b/asm/owrando.asm index 627b5503..7b51e697 100644 --- a/asm/owrando.asm +++ b/asm/owrando.asm @@ -11,9 +11,11 @@ OWMode: dw 0 OWFlags: dw 0 -org $aa8010 OWReserved: dw 0 +org $aa8010 +OWVersionInfo: +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 ;Hooks org $02a929 @@ -40,10 +42,6 @@ JSL OWAdjustExitPosition org $02c1a9 JSL OWEndScrollTransition -; org $09AFFB -; jsl OWDestroyDuplicateSprites : nop #2 ; LDA.w $0C9A,X : CMP.w $040A -; db $B0 ; changing following opcode to BCS - org $04E881 Overworld_LoadSpecialOverworld_RoomId: org $04E8B4 @@ -244,25 +242,16 @@ OWWhirlpoolEnd: OWDestroyItemSprites: { - LDX.b #$0F + PHX : LDX.b #$0F .nextSprite LDA.w $0E20,X - CPY.b #$D8 : BCC .continue - CPY.b #$EC : BCS .continue + CMP.b #$D8 : BCC .continue + CMP.b #$EC : BCS .continue .killSprite ; need to kill sprites from D8 to EB on screen transition STZ.w $0DD0,X .continue DEX : BPL .nextSprite - RTL - ; LDA.w $0C9A,X : CMP.w $040A ; what we wrote over - ; BNE .killSprite - ; ; need to kill sprites from D8 to EB - ; CPY.b #$D8 : BCC .keepSprite - ; CPY.b #$EC : BCS .keepSprite - ; .killSprite - ; CLC : RTL - ; .keepSprite - ; SEC : RTL + PLX : RTL } OWMirrorSpriteOnMap: { @@ -674,10 +663,7 @@ OWBonkSpritePrep: org $aa9000 OWDetectEdgeTransition: { - PHY : PHX JSL OWDestroyItemSprites - PLX : PLY - STZ.w $06FC LDA.l OWMode : ORA.l OWMode+1 : BEQ .vanilla JSR OWShuffle diff --git a/data/base2current.bps b/data/base2current.bps index 6905656b..6c525c07 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ