diff --git a/ItemList.py b/ItemList.py index df75dabd..2ba05043 100644 --- a/ItemList.py +++ b/ItemList.py @@ -378,8 +378,11 @@ take_any_locations = [ def set_up_take_anys(world, player): - if world.mode[player] == 'inverted' and 'Dark Sanctuary Hint' in take_any_locations: - take_any_locations.remove('Dark Sanctuary Hint') + if world.mode[player] == 'inverted': + if 'Dark Sanctuary Hint' in take_any_locations: + take_any_locations.remove('Dark Sanctuary Hint') + if 'Archery Game' in take_any_locations: + take_any_locations.remove('Archery Game') regions = random.sample(take_any_locations, 5) diff --git a/Main.py b/Main.py index 143b9aaa..6fa74ede 100644 --- a/Main.py +++ b/Main.py @@ -27,7 +27,7 @@ from Fill import sell_potions, sell_keys, balance_multiworld_progression, balanc from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops from Utils import output_path, parse_player_names -__version__ = '0.4.0.0-u' +__version__ = '0.4.0.1-u' class EnemizerError(RuntimeError): diff --git a/Mystery.py b/Mystery.py index 52c20314..7ab7b735 100644 --- a/Mystery.py +++ b/Mystery.py @@ -8,6 +8,12 @@ import yaml from DungeonRandomizer import parse_cli from Main import main as DRMain from source.classes.BabelFish import BabelFish +from yaml.constructor import SafeConstructor + +def add_bool(self, node): + return self.construct_scalar(node) + +SafeConstructor.add_constructor(u'tag:yaml.org,2002:bool', add_bool) def main(): parser = argparse.ArgumentParser(add_help=False) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7161a8cc..36481d89 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -8,6 +8,20 @@ Thanks to qadan, cheuer, & compiling * 0.4.0.1 * Moved stonewall pre-opening to not happen in experimental + * Updated baserom + * Boss RNG perseved between files + * Vanilla prize pack fix + * Starting equipment fix + * Post-Aga world state option + * Code optimzation + * Bottle quickswap via double shoulder + * Credits update + * Accessibility option + * Sewer map/compass fix + * Fixed a standard bug where the exits to the ledge would be unavailable if the pyramid was pre-opened + * DR ASM optimization + * Removed Archery Game from Take-Any caves in inverted + * Fixed a problem with new YAML parser * 0.4.0.0 * Mystery yaml parser updated to a package maintained version (Thanks StructuralMike) * Bomb-logic and extend crystal switch logic (Thanks StructuralMike) diff --git a/Rom.py b/Rom.py index 4b4d0426..fead9137 100644 --- a/Rom.py +++ b/Rom.py @@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '2a9cd9b95c0ad118a3d58a77b7197eab' +RANDOMIZERBASEHASH = '0c27ed494039b6da016678b8741939ed' class JsonRom(object): @@ -782,17 +782,19 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): | (0x4 if world.retro[player] else 0)) rom.write_byte(0x140001, multiClientFlags) - write_int16(rom, 0x187010, credits_total) # dynamic credits + #write_int16(rom, 0x187010, credits_total) # dynamic credits if credits_total != 216: - # collection rate address: 238C37 + # collection rate address: + cr_address = 0x2391BE + cr_pc = cr_address - 0x120000 # convert to pc mid_top, mid_bot = credits_digit((credits_total // 10) % 10) last_top, last_bot = credits_digit(credits_total % 10) # top half - rom.write_byte(0x118C53, mid_top) - rom.write_byte(0x118C54, last_top) + rom.write_byte(cr_pc+0x1c, mid_top) + rom.write_byte(cr_pc+0x1d, last_top) # bottom half - rom.write_byte(0x118C71, mid_bot) - rom.write_byte(0x118C72, last_bot) + rom.write_byte(cr_pc+0x3a, mid_bot) + rom.write_byte(cr_pc+0x3b, last_bot) if world.keydropshuffle[player] or world.doorShuffle[player] != 'vanilla': gt = world.dungeon_layouts[player]['Ganons Tower'] @@ -800,16 +802,18 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): total = 0 for region in gt.master_sector.regions: total += count_locations_exclude_logic(region.locations, gt_logic) - rom.write_byte(0x187012, total) # dynamic credits - # gt big key address: 238B59 + # rom.write_byte(0x187012, total) # dynamic credits + # gt big key address: + gtbk_address = 0x2390E0 + gtbk_pc = gtbk_address - 0x120000 # convert to pc mid_top, mid_bot = credits_digit(total // 10) last_top, last_bot = credits_digit(total % 10) # top half - rom.write_byte(0x118B75, mid_top) - rom.write_byte(0x118B76, last_top) + rom.write_byte(gtbk_pc+0x1c, mid_top) + rom.write_byte(gtbk_pc+0x1d, last_top) # bottom half - rom.write_byte(0x118B93, mid_bot) - rom.write_byte(0x118B94, last_bot) + rom.write_byte(gtbk_pc+0x3a, mid_bot) + rom.write_byte(gtbk_pc+0x3b, last_bot) # patch medallion requirements if world.required_medallions[player][0] == 'Bombos': diff --git a/asm/hudadditions.asm b/asm/hudadditions.asm index 4568b12e..f5e4a119 100644 --- a/asm/hudadditions.asm +++ b/asm/hudadditions.asm @@ -82,8 +82,8 @@ DrHudDungeonItemsAdditions: - sta $1704, x : sta $170e, x : sta $1718, x inx #2 : cpx #$0008 : !blt - - lda !HUD_FLAG : and.w #$0020 : beq + : brl ++ : + - lda HUDDungeonItems : and.w #$0007 : bne + : brl ++ : + + lda !HUD_FLAG : and.w #$0020 : beq + : JMP ++ : + + lda HUDDungeonItems : and.w #$0007 : bne + : JMP ++ : + ; bk symbols lda.w #$2811 : sta $1606 : sta $1610 : sta $161a : sta $1624 ; sm symbols @@ -125,10 +125,10 @@ DrHudDungeonItemsAdditions: lda.w #$24f5 : sta $1644, y + ldx $00 - + inx #2 : cpx #$001b : bcs ++ : brl - + + inx #2 : cpx #$001b : bcs ++ : JMP - ++ - lda !HUD_FLAG : and.w #$0020 : bne + : brl ++ : + - lda HUDDungeonItems : and.w #$000c : bne + : brl ++ : + + lda !HUD_FLAG : and.w #$0020 : bne + : JMP ++ : + + lda HUDDungeonItems : and.w #$000c : bne + : JMP ++ : + ; map symbols (do I want these) ; note compass symbol is 2c20 lda.w #$2821 : sta $1606 : sta $1610 : sta $161a : sta $1624 ; blank out a couple thing from old hud @@ -159,7 +159,7 @@ DrHudDungeonItemsAdditions: .skipBlanks iny #2 cpx #$001a : beq + lda.w #$24f5 : sta $1644, y ; blank out spot - + inx #2 : cpx #$001b : !bge ++ : brl - + + inx #2 : cpx #$001b : !bge ++ : JMP - ++ plp : ply : plx : rtl } diff --git a/asm/keydropshuffle.asm b/asm/keydropshuffle.asm index 70e80047..253753af 100644 --- a/asm/keydropshuffle.asm +++ b/asm/keydropshuffle.asm @@ -173,7 +173,7 @@ KeyGetPlayer: LoadProperties_PreserveItemMaybe: { lda.l ShuffleKeyDrops : bne + - jsl Sprite_LoadProperties : rtl + JML Sprite_LoadProperties + lda $0e80, x : pha jsl Sprite_LoadProperties pla : sta $0e80, x diff --git a/asm/normal.asm b/asm/normal.asm index 56fee909..a8ab9597 100644 --- a/asm/normal.asm +++ b/asm/normal.asm @@ -399,8 +399,7 @@ StraightStairsTrapDoor: lda #$05 : sta $11 inc $0468 : stz $068e : stz $0690 ++ rtl - + jsl Dungeon_ApproachFixedColor ; what we wrote over - rtl + + JML Dungeon_ApproachFixedColor ; what we wrote over } InroomStairsTrapDoor: diff --git a/asm/overrides.asm b/asm/overrides.asm index 28eb7f91..8f78bb5d 100644 --- a/asm/overrides.asm +++ b/asm/overrides.asm @@ -64,8 +64,7 @@ FixShopCode: VitreousKeyReset: lda.l DRMode : beq + stz $0cba, x - + jsl $0db818 ;restore old code - rtl + + JML $0db818 ;restore old code GuruguruFix: lda $a0 : cmp #$df : !bge + @@ -134,7 +133,7 @@ RainPrevention: LDA.l $7EF3CC : AND #$00FF : CMP #$0001 : BEQ .done ; zelda is following LDA $00 : CMP #$02A1 : BNE .done PLA : LDA #$0008 : RTL - + LDA.l BlockCastleDoorsInRain : BEQ .done ;flagged + + LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged LDX #$FFFE - INX #2 : LDA.l RemoveRainDoorsRoom, X : CMP #$FFFF : BEQ .done CMP $A0 : BNE - diff --git a/asm/scroll.asm b/asm/scroll.asm index 8ee6e315..f66918c8 100644 --- a/asm/scroll.asm +++ b/asm/scroll.asm @@ -209,12 +209,10 @@ QuadrantLoadOrderBeforeScroll: lda $045f : beq .end lda #$08 : sta $045c ; start with opposite quadrant row .end - jsl $0091c4 ; what we overwrote - rtl + JML $0091c4 ; what we overwrote QuadrantLoadOrderAfterScroll: lda $045f : beq .end stz $045c : stz $045f ; draw other row and clear flag .end - jsl $0091c4 ; what we overwrote - rtl \ No newline at end of file + JML $0091c4 ; what we overwrote \ No newline at end of file diff --git a/asm/spiral.asm b/asm/spiral.asm index 2dd2ab8b..e73b5e16 100644 --- a/asm/spiral.asm +++ b/asm/spiral.asm @@ -182,7 +182,7 @@ InroomStairsWarp: { sta $02 stz $07 lda $01 : and #$10 : lsr #4 - brl .layer + JMP .layer .notEdge lda $01 : and #$03 : cmp #$03 : bne .normal txa : and #$06 : sta $07 diff --git a/data/base2current.bps b/data/base2current.bps index 4639a75e..8de8042a 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ