From 2a6c2604bd8dda1f6a087931ff511f209d1f16bb Mon Sep 17 00:00:00 2001 From: Thorn Avery Date: Mon, 18 Dec 2023 17:11:30 +1100 Subject: [PATCH 1/5] WIP Battle Tent Fix --- scripts/BattleTent.asm | 74 +++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/scripts/BattleTent.asm b/scripts/BattleTent.asm index a3bc4649..4104077e 100644 --- a/scripts/BattleTent.asm +++ b/scripts/BattleTent.asm @@ -249,12 +249,17 @@ BattleTent_InitPhase: call DisplayTextID ld a, $ff ld [wJoyIgnore], a - ld a, [wBTStreakCnt] - cp 11 + ld a, [wBTStreakCnt] ; 0 = continue, 1 = lost, 2 = exit, FF = initial + cp 0 ; continue + jr z, .cont + cp $FF ; initial + jr z, .cont + ld a, 8 + jr .done +.cont ld a, 4 - jr nz, .skip - ld a, 8 ; TEH URN! -.skip + jr .done +.done ld [wBattleTentCurScript], a ret @@ -324,6 +329,19 @@ BattleTent_AfterBattle: ld [$ff8c], a ld de, BattleTentMovement_3 call MoveSprite + ld a, [wBattleResult] + and a + jp nz, .skip ; if not zero, we lost / drew + xor a ; continue battle tent + ld [wBTStreakCnt], a + jr .skip2 +.skip + ld a, 1 ; lost last match + ld [wBTStreakCnt], a + ld a, 8 + ld [wBattleTentCurScript], a + ret +.skip2 ld a, 7 ld [wBattleTentCurScript], a ret @@ -332,22 +350,12 @@ BattleTent_Heal: ld a, [wNPCNumScriptedSteps] and a ret nz - ld a, [wBattleResult] - cp 1 - jr nz, .stillTehUrn - ; rip - ld a, 8 - ld [wBattleTentCurScript], a - ret -.stillTehUrn - ld hl, wBTStreakCnt - inc [hl] + ld a, [wBTStreakCnt] + cp 1 ; lost, dont show healing dialogue + jr z, .skip ld a, 2 ld [wPlayerMovingDirection], a call Delay3 - ld a, [hl] - cp 11 - jr z, .skip ; No need to heal the party, let's just say that the player wins predef HealParty ld a, $fc ld [wJoyIgnore], a @@ -560,6 +568,8 @@ BattleTentGuy: call BattleTent_LoadTeam ld hl, BattleTentLetsGo call PrintText + ld a, $FF ; first battle + ld [wBTStreakCnt], a ld a, 1 ld [wBattleTentCurScript], a jp TextScriptEnd @@ -570,7 +580,7 @@ BTReward: BattleTentGuy_After: db $8 ld a, [wBTStreakCnt] - cp 11 + cp 2 ; voluntarily exited ld hl, BattleTentLost jr nz, .skip ; Not Teh Urn BibleThump ld a, $03 ; NO REVERTING THIS CODE PIGU IM SICK OF YOU BREAKING IT! @@ -606,22 +616,9 @@ BattleTentGuy_After: BattleTentGuy2: db $8 ld a, [wBTStreakCnt] ; The streak counter is still used for message continuity. - and a - - ; Old System -; ld hl, BattleTentGuy2_Streak -; jr nz, .skip -; inc a -; ld [wBTStreakCnt], a -; ld hl, BattleTentGuy2_Init -; jr .skip2 -;.skip -; cp 11 -; jr nz, .skip2 - - ; New System + cp $FF ; very first initial battle + jr z, .init ld hl, BattleTentGuy2_Streak ; The message has been changed appropriately down below. - jr z, .skip2 xor a ; The D-Pad is locked at this point, so blank out wJoyIgnore to allow manual option selection. ld [wJoyIgnore], a ld hl, BattleTentGuy2_Continue ; Continue prompt. @@ -630,18 +627,15 @@ BattleTentGuy2: ld a, [wCurrentMenuItem] and a jr nz, .refused ; If 0, move to refused. -.cont +.init ld hl, BattleTentGuy2_Init ; Load the next battle. - ; fallthrough -.skip2 ; This handles BattleTentGuy2_Streak and BattleTentGuy2_Init at once. call PrintText jr .done .refused ld hl, BattleTentGuy2_Win call PrintText - ld a, 9 ; Load BattleTent_PlayerWalkBack, which takes it from here. - ld [wBattleTentCurScript], a ; For some reason, this isn't working properly, even if jp'd. - ; fallthrough + ld a, 2 ; 2 = quit + ld [wBTStreakCnt], a .done jp TextScriptEnd From ce2d9ec06c003061b1710574fc4c6685f597c045 Mon Sep 17 00:00:00 2001 From: Thorn Avery Date: Mon, 18 Dec 2023 19:04:33 +1100 Subject: [PATCH 2/5] WIP Battle Tent: win counter --- ram/wram.asm | 5 +++-- scripts/BattleTent.asm | 22 +++++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ram/wram.asm b/ram/wram.asm index 74cce97a..748ad659 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -2125,7 +2125,7 @@ UNION ; Surely this position will not cause any issues at all. ;battle tent data wBTOrder:: dw -wBTStreakCnt:: db +wBTCont:: db wBTClass:: db wBTDataEnd:: wStringBuffer1:: ; cf5f @@ -2140,6 +2140,7 @@ NEXTU wChannel7:: channel_struct wChannel7 wChannel8:: channel_struct wChannel8 ENDU +wBTStreakCnt:: db wObtainedHiddenItemsFlags:: flag_array 112 @@ -2448,4 +2449,4 @@ SECTION "Stack", WRAM0 ; the stack grows downward ds $99 - 1 -wStack:: db \ No newline at end of file +wStack:: db diff --git a/scripts/BattleTent.asm b/scripts/BattleTent.asm index 4104077e..f764251a 100644 --- a/scripts/BattleTent.asm +++ b/scripts/BattleTent.asm @@ -249,7 +249,7 @@ BattleTent_InitPhase: call DisplayTextID ld a, $ff ld [wJoyIgnore], a - ld a, [wBTStreakCnt] ; 0 = continue, 1 = lost, 2 = exit, FF = initial + ld a, [wBTCont] ; 0 = continue, 1 = lost, 2 = exit, FF = initial cp 0 ; continue jr z, .cont cp $FF ; initial @@ -333,11 +333,17 @@ BattleTent_AfterBattle: and a jp nz, .skip ; if not zero, we lost / drew xor a ; continue battle tent - ld [wBTStreakCnt], a + ld [wBTCont], a + ld a, [wBTStreakCnt] + cp $FF + jr z, .max ; cap out at 255 wins + inc a +.max + ld [wBTStreakCnt], a ; increment win counter jr .skip2 .skip ld a, 1 ; lost last match - ld [wBTStreakCnt], a + ld [wBTCont], a ld a, 8 ld [wBattleTentCurScript], a ret @@ -350,7 +356,7 @@ BattleTent_Heal: ld a, [wNPCNumScriptedSteps] and a ret nz - ld a, [wBTStreakCnt] + ld a, [wBTCont] cp 1 ; lost, dont show healing dialogue jr z, .skip ld a, 2 @@ -569,6 +575,8 @@ BattleTentGuy: ld hl, BattleTentLetsGo call PrintText ld a, $FF ; first battle + ld [wBTCont], a + xor a ; initialise counter ld [wBTStreakCnt], a ld a, 1 ld [wBattleTentCurScript], a @@ -579,7 +587,7 @@ BTReward: BattleTentGuy_After: db $8 - ld a, [wBTStreakCnt] + ld a, [wBTCont] cp 2 ; voluntarily exited ld hl, BattleTentLost jr nz, .skip ; Not Teh Urn BibleThump @@ -615,7 +623,7 @@ BattleTentGuy_After: ; Arguably a better system, but I do wish the counter incremented... BattleTentGuy2: db $8 - ld a, [wBTStreakCnt] ; The streak counter is still used for message continuity. + ld a, [wBTCont] ; The streak counter is still used for message continuity. cp $FF ; very first initial battle jr z, .init ld hl, BattleTentGuy2_Streak ; The message has been changed appropriately down below. @@ -635,7 +643,7 @@ BattleTentGuy2: ld hl, BattleTentGuy2_Win call PrintText ld a, 2 ; 2 = quit - ld [wBTStreakCnt], a + ld [wBTCont], a .done jp TextScriptEnd From 86ede20d971e1118f907a0fbf4848db67b51a8b6 Mon Sep 17 00:00:00 2001 From: Thorn Avery Date: Mon, 18 Dec 2023 19:45:24 +1100 Subject: [PATCH 3/5] WIP Battle Tent: win counter displayed text --- scripts/BattleTent.asm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/BattleTent.asm b/scripts/BattleTent.asm index f764251a..f90f91cd 100644 --- a/scripts/BattleTent.asm +++ b/scripts/BattleTent.asm @@ -835,8 +835,10 @@ BattleTentGuy2_Win: ;text "Congratulations!" text "Well done!" - ;para "You have defeated" - ;line "all 10 opponents!" + para "You have defeated" + line "@" + text_decimal wBTStreakCnt, 1, 3 + text " opponents!" para "Please go back to" line "the counter to" From 12b5fb8f8ea4a91a8e00f9cb99b83f6878fb911a Mon Sep 17 00:00:00 2001 From: Thorn Avery Date: Mon, 18 Dec 2023 20:01:57 +1100 Subject: [PATCH 4/5] WIP Battle Tent: win counter on each battle --- scripts/BattleTent.asm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/BattleTent.asm b/scripts/BattleTent.asm index f90f91cd..de140d0c 100644 --- a/scripts/BattleTent.asm +++ b/scripts/BattleTent.asm @@ -626,7 +626,6 @@ BattleTentGuy2: ld a, [wBTCont] ; The streak counter is still used for message continuity. cp $FF ; very first initial battle jr z, .init - ld hl, BattleTentGuy2_Streak ; The message has been changed appropriately down below. xor a ; The D-Pad is locked at this point, so blank out wJoyIgnore to allow manual option selection. ld [wJoyIgnore], a ld hl, BattleTentGuy2_Continue ; Continue prompt. @@ -635,6 +634,8 @@ BattleTentGuy2: ld a, [wCurrentMenuItem] and a jr nz, .refused ; If 0, move to refused. + ld hl, BattleTentGuy2_Streak ; The message has been changed appropriately down below. + jr .done .init ld hl, BattleTentGuy2_Init ; Load the next battle. call PrintText @@ -815,7 +816,7 @@ BattleTentGuy2_Init: ; Cut in favour of a different system. BattleTentGuy2_Streak: ; text "Opponent No.@" ; could be a №? -; text_decimal wBTStreakCnt, 1, 2 +; text_decimal wBTStreakCnt, 1, 3 ; text_start ; line "is up next." ; para "Good luck!" @@ -826,6 +827,11 @@ BattleTentGuy2_Streak: BattleTentGuy2_Continue: text "Congratulations!" + + para "You're at" + line "@" + text_decimal wBTStreakCnt, 1, 3 + text " win(s)!" para "Do you want to" line "continue?" @@ -835,10 +841,10 @@ BattleTentGuy2_Win: ;text "Congratulations!" text "Well done!" - para "You have defeated" + para "You defeated" line "@" text_decimal wBTStreakCnt, 1, 3 - text " opponents!" + text " opponent(s)!" para "Please go back to" line "the counter to" From 080ca3866ba952e7cd963d8eeef5afc79c69ed5e Mon Sep 17 00:00:00 2001 From: Martha Schilling Date: Mon, 18 Dec 2023 11:51:01 +0000 Subject: [PATCH 5/5] Update gorillaimo.png I meant to include this in the last commit but I forgor --- gfx/pokemon/front/gorillaimo.png | Bin 981 -> 987 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gfx/pokemon/front/gorillaimo.png b/gfx/pokemon/front/gorillaimo.png index 03e8d3aee1de28facff0b1a255eb2b8def124e7f..94e96ac70ab2594ae387c13781a0f05bc1f6f8de 100644 GIT binary patch delta 712 zcmV;(0yq8D2ipgbdk7K>F%!1KS^|-SDikoD=;uRFfb#Mj7yQh9Y{D- zF)=zcIXW>oD=;uRFfdZjH1_}i04Q`tSaf7zbY(hpX>Db5bYX3905UK#Gc7SPEipJ$ zF)=zcIXW>pD=;uRFfgO79-NaV0cn3XNklRb$bQ^t=E704Q`tSaf7zbY(hpX>Db5bYX3905UK#Gc7SPEipD! zF*!OlHaamjD=;uRFfbqC&;FAp0cn3RNklqHuyin!DtF*3F?!hFkI{L=iIxQqkOSS!z-)y?cwRC>T*xjDylitKguBWC%4w zlz6%4`~A|SZ@Ld(?)Q7|-7(xi^CZrTO{4Sp>+FK)Y~!ST%$L1*2=xV{$Nztx!p?%F z)giz=bNT2fkk!G%`YcUCcnKaNzMb*C^Wd+uiTI?hSZmc{uZhFKj$-{s58GS#4E7Xt z#5gdY4-LeN8)(<90SS&|M^EUnX