jevsnes.git / third-party / c / patches / 0005-green-pendant-is-bit-4.patch
0005-green-pendant-is-bit-4.patch17 lines · 882 B · raw
1diff --git a/third-party/c/zbanks-alttp/ap_req.c b/third-party/c/zbanks-alttp/ap_req.c
2--- a/third-party/c/zbanks-alttp/ap_req.c
3+++ b/third-party/c/zbanks-alttp/ap_req.c
4@@ -55,7 +55,12 @@
5         // XXX how to handle this across dungeons
6         reqmask_set(&current_reqmask, REQUIREMENT_KEY);
7     }
8-    if (*ap_ram.sram_pendants & 0x01) {
9+    // Carried patch (jev): the green pendant (Courage) is bit 0x04 of
10+    // $7EF374 ("- - - - - g b r"); 0x01 is the red one. Sahasrahla tests
11+    // 0x04 in vanilla (usdasm bank_05.asm:20560-20562) and in the Randomizer
12+    // (z3randomizer dialog.asm:355), so with 0x01 his goal was unsatisfiable
13+    // after the Eastern Palace, which gives the green pendant.
14+    if (*ap_ram.sram_pendants & 0x04) {
15         reqmask_set(&current_reqmask, REQUIREMENT_GREEN_PENDANT);
16     }
17     if ((*ap_ram.sram_pendants & 0x07) == 0x07) {