From 46ccfedcdcd35ad9a3bce5669977a8b7e8afced7 Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 2 Jun 2021 10:51:21 -0600 Subject: [PATCH] Blind Attic hint in crossed Hint default change to False, moved GUI checkbox --- CLI.py | 4 +-- Rom.py | 15 +++++++-- Utils.py | 29 ++++++------------ asm/drhooks.asm | 6 ++++ asm/overrides.asm | 7 +++++ data/base2current.bps | Bin 133035 -> 133067 bytes resources/app/gui/lang/en.json | 4 +-- .../gui/randomize/gameoptions/widgets.json | 4 --- resources/app/gui/randomize/item/widgets.json | 5 ++- source/classes/constants.py | 2 +- 10 files changed, 43 insertions(+), 33 deletions(-) diff --git a/CLI.py b/CLI.py index 9c15e4cb..ce230037 100644 --- a/CLI.py +++ b/CLI.py @@ -179,9 +179,7 @@ def parse_settings(): "names": "", "securerandom": False, - # Hints default to TRUE - "hints": True, - "no_hints": False, + "hints": False, "disablemusic": False, "quickswap": False, "heartcolor": "red", diff --git a/Rom.py b/Rom.py index 2227cbe9..60b40ab6 100644 --- a/Rom.py +++ b/Rom.py @@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'f8f1b851b091d50af2b87283ea79ed90' +RANDOMIZERBASEHASH = '56cf37536facb8e6b19d2ce516436f66' class JsonRom(object): @@ -2026,7 +2026,7 @@ def write_strings(rom, world, player, team): if world.doorShuffle[player] in ['crossed']: attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name this_hint = 'A cracked floor can be found in ' + attic_hint + '.' - if hint_locations[0] == 'telepathic_tile_thieves_town_upstairs': + if world.intensity[player] < 2 and hint_locations[0] == 'telepathic_tile_thieves_town_upstairs': tt[hint_locations.pop(1)] = this_hint else: tt[hint_locations.pop(0)] = this_hint @@ -2115,6 +2115,17 @@ def write_strings(rom, world, player, team): bombos_text = 'Some Hot Air' if bombositem is None else hint_text(bombositem, True) if bombositem.pedestal_hint_text is not None else 'Unknown Item' tt['tablet_bombos_book'] = bombos_text + # attic hint + if world.doorShuffle[player] in ['crossed']: + attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name + tt['blind_not_that_way'] = f'{attic_hint} is too bright for my eyes' + # see tagalog.asm tables at 957,967 or Follower_HandleTrigger in JPDASM + # also the baserom table at org $09A4C2 in hooks.asm (Escort text) + rom.write_byte(0x04a4be, 0xac) # change the room to blind's room + rom.write_byte(0x04a526, 0xb8) # y coordinate, shifted down + rom.write_byte(0x04a529, 0x19) # x tile shifted right a few tiles + rom.write_byte(0x04a52e, 0x06) # follower set to blind maiden + # inverted spawn menu changes if world.mode[player] == 'inverted': tt['menu_start_2'] = "{MENU}\n{SPEED0}\n≥@'s house\n Dark Chapel\n{CHOICE3}" diff --git a/Utils.py b/Utils.py index 06ccca62..cf3db3fb 100644 --- a/Utils.py +++ b/Utils.py @@ -294,29 +294,18 @@ def update_deprecated_args(args): if args: argVars = vars(args) truthy = [1, True, "True", "true"] - # Hints default to TRUE + # Hints default to FALSE # Don't do: Yes # Do: No if "no_hints" in argVars: - src = "no_hints" - if isinstance(argVars["hints"], dict): - tmp = {} - for idx in range(1, len(argVars["hints"]) + 1): - tmp[idx] = argVars[src] not in truthy # tmp = !src - args.hints = tmp # dest = tmp - else: - args.hints = args.no_hints not in truthy # dest = !src - # Don't do: No - # Do: Yes - if "hints" in argVars: - src = "hints" - if isinstance(argVars["hints"], dict): - tmp = {} - for idx in range(1, len(argVars["hints"]) + 1): - tmp[idx] = argVars[src] not in truthy # tmp = !src - args.no_hints = tmp # dest = tmp - else: - args.no_hints = args.hints not in truthy # dest = !src + if args.no_hints in truthy: + if isinstance(argVars["hints"], dict): + tmp = {} + for idx in range(1, len(argVars["hints"]) + 1): + tmp[idx] = False + args.hints = tmp + else: + args.hints = False # Spoiler defaults to TRUE # Don't do: Yes diff --git a/asm/drhooks.asm b/asm/drhooks.asm index 6739de34..2824771e 100644 --- a/asm/drhooks.asm +++ b/asm/drhooks.asm @@ -173,6 +173,12 @@ JSL RainPrevention : NOP #2 org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00) JSL StandardAgaDmg + +org $09a681 ; < - similar to talalong.asm : 1157 (JSL Main_ShowTextMessage) +JSL BlindsAtticHint : NOP #2 +org $1cfd69 +Main_ShowTextMessage: + ; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire ; IPBJ is common enough to consider not doing this. Mire is not a concern for vanilla - maybe glitched modes ; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds diff --git a/asm/overrides.asm b/asm/overrides.asm index 8f78bb5d..4ab5d3ca 100644 --- a/asm/overrides.asm +++ b/asm/overrides.asm @@ -148,3 +148,10 @@ StandardAgaDmg: LDA.b #$10 ; hurt him! + RTL ; A is zero if the AND results in zero and then Agahnim's invincible! +; note: this skips both maiden dialog triggers if the hole is open +BlindsAtticHint: + CMP.w #$0122 : BNE + + LDA $7EF0CA : AND.w #$0100 : BEQ + + SEP #$20 : RTL ; skip the dialog box if the hole is already open + + SEP #$20 : JML Main_ShowTextMessage + diff --git a/data/base2current.bps b/data/base2current.bps index 97c703b32d372808a204f8aa3af275183f0d3004..974762d1e3c6e359c0ae44064cf873a071890b28 100644 GIT binary patch delta 757 zcmWNLYe-XZ7{<^4oHMs_rP&3emH&C!oPn)O(4-3%eK0EtyFdm@sIc`Rx)-A7%$;n> zJZF2^j?*r#I^h)4I)u%dt{Z7ltRRZ0)(wiXc_gb(w$7*b{XOsVK0H0V?g_8!FGlpU z$kKAT6a`6gL7V)Rx=EoP*{eN6r5aqm>kPM~UN3&6E zu6V*Ox`>$mLS4G&C-n*2KjE6XDMK`=XmOjjlVm9T#XFi*GTTp1jjE~!mwHs~s0T;+ z5?iJXY65IO?_hK9_Xh6@>Sap6f57XLD6Z3)a(`MlLR*;FG>PUAUe?6Skm!qK^9&ze zE#QC7i>B+c@fLLbFk}|qdbvrED7^i&4et^pjQ0taH3Ys6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