From db63fc1a093472ebb5b7d5a75781037026bf2fe5 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 7 Oct 2017 15:15:47 +0200 Subject: [PATCH 1/7] battle message huge take off --- asm/battle_frontier_2.s | 4 +- asm/battle_link_817C95C.s | 14 +- asm/battle_message.s | 694 ----------- data/battle_message.s | 2083 ---------------------------------- include/battle.h | 2 +- include/battle_message.h | 16 +- include/battle_string_ids.h | 385 +++++++ ld_script.txt | 3 +- src/battle_2.c | 9 +- src/battle_message.c | 1428 +++++++++++++++++++++++ src/battle_script_commands.c | 27 +- sym_ewram.txt | 21 +- 12 files changed, 1857 insertions(+), 2829 deletions(-) delete mode 100644 data/battle_message.s create mode 100644 include/battle_string_ids.h create mode 100644 src/battle_message.c diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index de5617167..9e01d22d1 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -20577,7 +20577,7 @@ _081A5328: movs r0, 0x1 negs r0, r0 strb r0, [r1, 0x1] - ldr r0, =gText_JapaneseHonorific + ldr r0, =gText_PlayerMon1Name bl BattleStringExpandPlaceholdersToDisplayedString ldr r4, =gDisplayedStringBattle adds r0, r4, 0 @@ -20586,7 +20586,7 @@ _081A5328: ldr r0, =gText_Vs movs r1, 0x10 bl sub_814F9EC - ldr r0, =gText_RivalBuffer + ldr r0, =gText_OpponentMon1Name bl BattleStringExpandPlaceholdersToDisplayedString adds r0, r4, 0 movs r1, 0x11 diff --git a/asm/battle_link_817C95C.s b/asm/battle_link_817C95C.s index 39ae59d8b..ec5baadd9 100644 --- a/asm/battle_link_817C95C.s +++ b/asm/battle_link_817C95C.s @@ -665,7 +665,7 @@ _0817D16C: bl _0817DFAC .pool _0817D1B8: - ldr r1, =gUnknown_02022F5C + ldr r1, =gBattleTextBuff1 + 4 ldrb r0, [r1] cmp r0, 0 beq _0817D1C4 @@ -917,7 +917,7 @@ _0817D3C0: bne _0817D3CC bl _0817E0A6 _0817D3CC: - ldr r1, =gUnknown_02022F6A + ldr r1, =gBattleTextBuff2 + 2 ldrh r0, [r1] cmp r0, 0xD1 bne _0817D3E8 @@ -946,7 +946,7 @@ _0817D3FE: ldrb r1, [r1] cmp r0, r1 bne _0817D436 - ldr r1, =gUnknown_02022F6A + ldr r1, =gBattleTextBuff2 + 2 ldrh r0, [r1] cmp r0, 0xD1 bne _0817D42C @@ -988,7 +988,7 @@ _0817D45C: bne _0817D468 bl _0817E0A6 _0817D468: - ldr r1, =gUnknown_02022F6A + ldr r1, =gBattleTextBuff2 + 2 ldrh r0, [r1] cmp r0, 0xD3 bne _0817D484 @@ -2182,7 +2182,7 @@ _0817DE10: b _0817DFAA .pool _0817DE58: - ldr r1, =gUnknown_02022F5A + ldr r1, =gBattleTextBuff1 + 2 ldrh r0, [r1] cmp r0, 0x73 bne _0817DE82 @@ -2204,7 +2204,7 @@ _0817DE58: ands r0, r2 strb r0, [r1] _0817DE82: - ldr r2, =gUnknown_02022F5A + ldr r2, =gBattleTextBuff1 + 2 ldrh r0, [r2] cmp r0, 0x71 bne _0817DEAA @@ -2225,7 +2225,7 @@ _0817DE82: ands r0, r2 strb r0, [r1] _0817DEAA: - ldr r1, =gUnknown_02022F5A + ldr r1, =gBattleTextBuff1 + 2 ldrh r0, [r1] cmp r0, 0x36 beq _0817DEB4 diff --git a/asm/battle_message.s b/asm/battle_message.s index b114a36f8..9afa6e399 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -5,700 +5,6 @@ .text - thumb_func_start BufferStringBattle -BufferStringBattle: @ 814E0C4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 16 - lsrs r6, r0, 16 - movs r7, 0 - ldr r4, =gStringInfo - ldr r0, =gActiveBank - mov r8, r0 - ldrb r1, [r0] - lsls r1, 9 - ldr r0, =gBattleBufferA + 4 - adds r1, r0 - str r1, [r4] - ldr r2, =gLastUsedItem - ldrh r0, [r1, 0x4] - strh r0, [r2] - ldr r2, =gLastUsedAbility - ldrb r0, [r1, 0x6] - strb r0, [r2] - ldr r5, =gBattleScripting - ldrb r0, [r1, 0x7] - strb r0, [r5, 0x17] - ldr r3, =gBattleStruct - ldr r0, [r3] - adds r0, 0x52 - ldrb r1, [r1, 0x8] - strb r1, [r0] - ldr r0, [r3] - adds r0, 0xB1 - ldr r1, [r4] - ldrb r1, [r1, 0x9] - strb r1, [r0] - ldr r1, =gStringBank - ldr r2, [r4] - ldrb r0, [r2, 0xA] - strb r0, [r1] - ldr r0, [r3] - adds r0, 0x8E - ldrb r1, [r2, 0xB] - strb r1, [r0] - movs r2, 0 - mov r12, r8 - mov r9, r5 - ldr r1, =gBattleTextBuff1 - mov r10, r1 - ldr r3, =gAbilitiesPerBank -_0814E126: - adds r0, r2, r3 - ldr r1, [r4] - adds r1, 0xC - adds r1, r2 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x3 - ble _0814E126 - movs r2, 0 - ldr r0, =gBattleTextBuff1 - mov r8, r0 - ldr r3, =gStringInfo - ldr r5, =gBattleTextBuff2 - ldr r4, =gBattleTextBuff3 -_0814E144: - mov r0, r8 - adds r1, r2, r0 - ldr r0, [r3] - adds r0, 0x10 - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - adds r1, r2, r5 - ldr r0, [r3] - adds r0, 0x20 - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - adds r1, r2, r4 - ldr r0, [r3] - adds r0, 0x30 - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - adds r2, 0x1 - cmp r2, 0xF - ble _0814E144 - cmp r6, 0x5 - bls _0814E176 - b _0814E6B8 -_0814E176: - lsls r0, r6, 2 - ldr r1, =_0814E1B4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0814E1B4: - .4byte _0814E1CC - .4byte _0814E2AC - .4byte _0814E394 - .4byte _0814E430 - .4byte _0814E4F8 - .4byte _0814E55C -_0814E1CC: - ldr r0, =gBattleTypeFlags - ldr r2, [r0] - movs r0, 0x8 - ands r0, r2 - cmp r0, 0 - beq _0814E26C - ldr r0, =0x02000002 - ands r0, r2 - cmp r0, 0 - beq _0814E248 - movs r0, 0x80 - lsls r0, 16 - ands r0, r2 - cmp r0, 0 - bne _0814E260 - movs r0, 0x40 - ands r0, r2 - cmp r0, 0 - beq _0814E214 - movs r0, 0x80 - lsls r0, 17 - ands r2, r0 - ldr r7, =gText_TwoTrainersWantToBattle - cmp r2, 0 - bne _0814E200 - b _0814E6D8 -_0814E200: - ldr r7, =gText_TwoTrainersWantToBattle3 - b _0814E6D8 - .pool -_0814E214: - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0xC0 - lsls r0, 4 - cmp r1, r0 - bne _0814E22C - ldr r7, =gText_TrainerXYWantsToBattle - b _0814E6D8 - .pool -_0814E22C: - movs r0, 0x80 - lsls r0, 17 - ands r2, r0 - ldr r7, =gText_TrainerXWantsToBattle - cmp r2, 0 - bne _0814E23A - b _0814E6D8 -_0814E23A: - ldr r7, =gText_TrainerWantsToBattle - b _0814E6D8 - .pool -_0814E248: - movs r0, 0x80 - lsls r0, 15 - ands r0, r2 - cmp r0, 0 - bne _0814E260 - movs r0, 0x80 - lsls r0, 8 - ands r2, r0 - ldr r7, =gText_TrainerXYWantsToBattle - cmp r2, 0 - bne _0814E260 - b _0814E6D8 -_0814E260: - ldr r7, =gText_TwoTrainersWantToBattle2 - b _0814E6D8 - .pool -_0814E26C: - movs r0, 0x80 - lsls r0, 6 - ands r0, r2 - cmp r0, 0 - beq _0814E280 - ldr r7, =gText_WildPkmnAppeared2 - b _0814E6D8 - .pool -_0814E280: - movs r0, 0x1 - ands r0, r2 - cmp r0, 0 - beq _0814E290 - ldr r7, =gText_TwoWildPkmnAppeared - b _0814E6D8 - .pool -_0814E290: - movs r0, 0x80 - lsls r0, 2 - ands r2, r0 - ldr r7, =gText_WildPkmnAppeared - cmp r2, 0 - bne _0814E29E - b _0814E6D8 -_0814E29E: - ldr r7, =gText_WildPkmnAppearedPause - b _0814E6D8 - .pool -_0814E2AC: - mov r1, r12 - ldrb r0, [r1] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0814E310 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0814E308 - movs r0, 0x80 - lsls r0, 15 - ands r0, r1 - cmp r0, 0 - beq _0814E2DC - ldr r7, =gText_TrainerXYSentOutZGoN - b _0814E6D8 - .pool -_0814E2DC: - movs r0, 0x80 - lsls r0, 8 - ands r0, r1 - cmp r0, 0 - beq _0814E2F0 - ldr r7, =gText_GoTwoPkmn - b _0814E6D8 - .pool -_0814E2F0: - movs r0, 0x40 - ands r1, r0 - ldr r7, =gText_GoTwoPkmn - cmp r1, 0 - bne _0814E2FC - b _0814E6D8 -_0814E2FC: - ldr r7, =gText_EnemySentOutPkmnGoPkmn - b _0814E6D8 - .pool -_0814E308: - ldr r7, =gText_GoPkmn - b _0814E6D8 - .pool -_0814E310: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0814E368 - movs r0, 0x80 - lsls r0, 8 - ands r0, r1 - cmp r0, 0 - bne _0814E330 - movs r0, 0x80 - lsls r0, 16 - ands r0, r1 - cmp r0, 0 - beq _0814E33C -_0814E330: - ldr r7, =gText_TwoTrainersSentPkmn - b _0814E6D8 - .pool -_0814E33C: - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0814E34C - ldr r7, =gText_TwoTrainersSentOutPkmn - b _0814E6D8 - .pool -_0814E34C: - ldr r0, =0x02000002 - ands r1, r0 - ldr r7, =gText_TrainerXYSentOutTwoPkmn - cmp r1, 0 - bne _0814E358 - b _0814E6D8 -_0814E358: - ldr r7, =gText_TrainerXSentOutTwoPkmn - b _0814E6D8 - .pool -_0814E368: - ldr r0, =0x02000002 - ands r1, r0 - cmp r1, 0 - beq _0814E380 - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0xC0 - lsls r0, 4 - ldr r7, =gText_TrainerXSentOutPkmn - cmp r1, r0 - beq _0814E380 - b _0814E6D8 -_0814E380: - ldr r7, =gText_TrainerXYSentOutPkmn - b _0814E6D8 - .pool -_0814E394: - mov r1, r12 - ldrb r0, [r1] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0814E3EC - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xB1 - ldrb r2, [r0] - cmp r2, 0 - bne _0814E3BC - ldr r7, =gText_PkmnThatsEnough - b _0814E6D8 - .pool -_0814E3BC: - cmp r2, 0x1 - beq _0814E3CC - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0814E3D8 -_0814E3CC: - ldr r7, =gText_PkmnComeBack - b _0814E6D8 - .pool -_0814E3D8: - ldr r7, =gText_PkmnGoodComeBack - cmp r2, 0x2 - beq _0814E3E0 - b _0814E6D8 -_0814E3E0: - ldr r7, =gText_PkmnOkComeBack - b _0814E6D8 - .pool -_0814E3EC: - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0x80 - lsls r0, 4 - ldr r2, =gBattleTypeFlags - cmp r1, r0 - beq _0814E406 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 18 - ands r0, r1 - cmp r0, 0 - beq _0814E428 -_0814E406: - ldr r0, [r2] - movs r1, 0x40 - ands r0, r1 - ldr r7, =gText_TrainerXWithdrewPkmn - cmp r0, 0 - bne _0814E414 - b _0814E6D8 -_0814E414: - ldr r7, =gText_TrainerXWithdrewPkmn2 - b _0814E6D8 - .pool -_0814E428: - ldr r7, =gText_TrainerXYWithdrewPkmn - b _0814E6D8 - .pool -_0814E430: - mov r4, r9 - ldrb r0, [r4, 0x17] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0814E488 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xB1 - ldrb r2, [r0] - cmp r2, 0 - beq _0814E456 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0814E468 -_0814E456: - ldr r7, =gText_GoPkmn2 - b _0814E6D8 - .pool -_0814E468: - cmp r2, 0x1 - bne _0814E474 - ldr r7, =gText_DoItPkmn - b _0814E6D8 - .pool -_0814E474: - ldr r7, =gText_YourFoesWeakGetEmPkmn - cmp r2, 0x2 - beq _0814E47C - b _0814E6D8 -_0814E47C: - ldr r7, =gText_GoForItPkmn - b _0814E6D8 - .pool -_0814E488: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x02000002 - ands r0, r1 - cmp r0, 0 - beq _0814E4DC - movs r0, 0x80 - lsls r0, 16 - ands r0, r1 - cmp r0, 0 - beq _0814E4AC - ldrb r0, [r4, 0x17] - b _0814E4EA - .pool -_0814E4AC: - movs r0, 0x40 - ands r1, r0 - cmp r1, 0 - beq _0814E4BC - ldr r7, =gText_TrainerXSentOutPkmn3 - b _0814E6D8 - .pool -_0814E4BC: - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0xC0 - lsls r0, 4 - ldr r7, =gText_TrainerXSentOutPkmn2 - cmp r1, r0 - beq _0814E4CC - b _0814E6D8 -_0814E4CC: - ldr r7, =gText_TrainerXYSentOutPkmn2 - b _0814E6D8 - .pool -_0814E4DC: - movs r0, 0x80 - lsls r0, 8 - ands r1, r0 - cmp r1, 0 - beq _0814E4CC - mov r1, r9 - ldrb r0, [r1, 0x17] -_0814E4EA: - ldr r7, =gText_TrainerXYSentOutPkmn3 - cmp r0, 0x1 - beq _0814E4F2 - b _0814E6D8 -_0814E4F2: - b _0814E4CC - .pool -_0814E4F8: - mov r0, r10 - bl sub_814F8F8 - ldr r0, =gStringInfo - ldr r2, [r0] - ldrh r1, [r2] - movs r0, 0xB1 - lsls r0, 1 - cmp r1, r0 - bls _0814E534 - ldr r0, =gBattleTextBuff2 - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r1, 0x8E - ldrb r2, [r1] - lsls r1, r2, 4 - adds r1, r2 - ldr r2, =gText_UnknownMoveTypes - adds r1, r2 - bl StringCopy - b _0814E544 - .pool -_0814E534: - ldr r0, =gBattleTextBuff2 - ldrh r2, [r2] - movs r1, 0xD - muls r1, r2 - ldr r2, =gMoveNames - adds r1, r2 - bl StringCopy -_0814E544: - ldr r0, =gBattleTextBuff2 - bl sub_814F950 - ldr r7, =gText_XUsedY2 - b _0814E6D8 - .pool -_0814E55C: - ldr r4, =gBattleTextBuff1 - ldrb r1, [r4] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0814E5C4 - movs r0, 0x7F - ands r0, r1 - strb r0, [r4] - mov r1, r12 - ldrb r0, [r1] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0814E58A - ldrb r1, [r4] - cmp r1, 0x3 - beq _0814E58A - movs r0, 0x3 - eors r0, r1 - strb r0, [r4] -_0814E58A: - ldr r0, =gBattleTextBuff1 - ldrb r0, [r0] - subs r0, 0x2 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _0814E5A4 - ldr r7, =gText_GotAwaySafely - b _0814E6D8 - .pool -_0814E5A4: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - ldr r7, =gText_WildFled - cmp r0, 0 - bne _0814E5B4 - b _0814E6D8 -_0814E5B4: - ldr r7, =gText_TwoWildFled - b _0814E6D8 - .pool -_0814E5C4: - mov r1, r12 - ldrb r0, [r1] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0814E5E0 - ldrb r1, [r4] - cmp r1, 0x3 - beq _0814E5E0 - movs r0, 0x3 - eors r0, r1 - strb r0, [r4] -_0814E5E0: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0814E638 - ldr r0, =gBattleTextBuff1 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0814E628 - cmp r0, 0x2 - bgt _0814E608 - cmp r0, 0x1 - beq _0814E60E - b _0814E6D8 - .pool -_0814E608: - cmp r0, 0x3 - beq _0814E630 - b _0814E6D8 -_0814E60E: - movs r0, 0x80 - lsls r0, 16 - ands r1, r0 - ldr r7, =gText_PlayerBeatTwo - cmp r1, 0 - beq _0814E6D8 - ldr r7, =gText_TwoEnemiesDefeated - b _0814E6D8 - .pool -_0814E628: - ldr r7, =gText_PlayerLostToTwo - b _0814E6D8 - .pool -_0814E630: - ldr r7, =gText_PlayerBattledToDrawVsTwo - b _0814E6D8 - .pool -_0814E638: - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0xC0 - lsls r0, 4 - cmp r1, r0 - bne _0814E680 - ldr r0, =gBattleTextBuff1 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0814E670 - cmp r0, 0x2 - bgt _0814E660 - cmp r0, 0x1 - beq _0814E666 - b _0814E6D8 - .pool -_0814E660: - cmp r0, 0x3 - beq _0814E678 - b _0814E6D8 -_0814E666: - ldr r7, =gText_PlayerDefeatedXY - b _0814E6D8 - .pool -_0814E670: - ldr r7, =gText_PlayerLostAgainst2 - b _0814E6D8 - .pool -_0814E678: - ldr r7, =gText_PlayerBattledToDraw2 - b _0814E6D8 - .pool -_0814E680: - ldr r0, =gBattleTextBuff1 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0814E6A8 - cmp r0, 0x2 - bgt _0814E698 - cmp r0, 0x1 - beq _0814E69E - b _0814E6D8 - .pool -_0814E698: - cmp r0, 0x3 - beq _0814E6B0 - b _0814E6D8 -_0814E69E: - ldr r7, =gText_PlayerDefeated - b _0814E6D8 - .pool -_0814E6A8: - ldr r7, =gText_PlayerLostAgainst - b _0814E6D8 - .pool -_0814E6B0: - ldr r7, =gText_PlayerBattledToDraw - b _0814E6D8 - .pool -_0814E6B8: - movs r0, 0xBE - lsls r0, 1 - cmp r6, r0 - bls _0814E6CC - ldr r1, =gDisplayedStringBattle - movs r0, 0xFF - strb r0, [r1] - b _0814E6DE - .pool -_0814E6CC: - ldr r1, =gBattleStringsTable - adds r0, r6, 0 - subs r0, 0xC - lsls r0, 2 - adds r0, r1 - ldr r7, [r0] -_0814E6D8: - adds r0, r7, 0 - bl BattleStringExpandPlaceholdersToDisplayedString -_0814E6DE: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end BufferStringBattle - thumb_func_start BattleStringExpandPlaceholdersToDisplayedString BattleStringExpandPlaceholdersToDisplayedString: @ 814E6F0 push {lr} diff --git a/data/battle_message.s b/data/battle_message.s deleted file mode 100644 index 4c72557d8..000000000 --- a/data/battle_message.s +++ /dev/null @@ -1,2083 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gText_Buffer36:: @ 85C9B78 - .string "{STRING 36}$" - -gText_PkmnGainedEXP:: @ 85C9B7B - .string "{STRING 0} gained{PLAYER}\n{STRING 52} EXP. Points!\p$" - -gText_EmptyString4:: @ 85C9B98 - .string "$" - -gText_ABoosted:: @ 85C9B99 - .string " a boosted$" - -gText_PkmnGrewToLv:: @ 85C9BA4 - .string "{STRING 0} grew to\nLV. {PLAYER}!{UNKNOWN_A}\p$" - -gText_PkmnLearnedMove:: @ 85C9BBA - .string "{STRING 0} learned\n{PLAYER}!{UNKNOWN_A}\p$" - -gText_TryToLearnMove1:: @ 85C9BCC - .string "{STRING 0} is trying to\nlearn {PLAYER}.\p$" - -gText_TryToLearnMove2:: @ 85C9BE7 - .string "But, {STRING 0} can’t learn\nmore than four moves.\p$" - -gText_TryToLearnMove3:: @ 85C9C12 - .string "Delete a move to make\nroom for {PLAYER}?$" - -gText_PkmnForgotMove:: @ 85C9C35 - .string "{STRING 0} forgot\n{PLAYER}.\p$" - -gText_StopLearningMove:: @ 85C9C44 - .string "{PAUSE 32}Stop learning\n{PLAYER}?$" - -gText_DidNotLearnMove:: @ 85C9C59 - .string "{STRING 0} did not learn\n{PLAYER}.\p$" - -gText_UseNextPkmn:: @ 85C9C6F - .string "Use next POKéMON?$" - -gText_AttackMissed:: @ 85C9C81 - .string "{STRING 15}’s\nattack missed!$" - -gText_PkmnProtectedItself:: @ 85C9C95 - .string "{STRING 16}\nprotected itself!$" - -gText_AvoidedDamage:: @ 85C9CAA - .string "{STRING 16} avoided\ndamage with {STRING 25}!$" - -gText_PkmnMakesGroundMiss:: @ 85C9CC5 - .string "{STRING 16} makes GROUND\nmoves miss with {STRING 25}!$" - -gText_PkmnAvoidedAttack:: @ 85C9CE9 - .string "{STRING 16} avoided\nthe attack!$" - -gText_ItDoesntAffect:: @ 85C9D00 - .string "It doesn’t affect\n{STRING 16}…$" - -gText_PkmnFainted:: @ 85C9D16 - .string "{STRING 15}\nfainted!\p$" - -gText_PkmnFainted2:: @ 85C9D23 - .string "{STRING 16}\nfainted!\p$" - -gText_PlayerGotMoney:: @ 85C9D30 - .string "{STRING 35} got ¥{STRING 0}\nfor winning!\p$" - -gText_PlayerWhiteout:: @ 85C9D49 - .string "{STRING 35} is out of\nusable POKéMON!\p$" - -gText_PlayerWhiteout2:: @ 85C9D67 - .string "{STRING 35} whited out!{PAUSE_UNTIL_PRESS}$" - -gText_PreventsEscape:: @ 85C9D78 - .string "{STRING 19} prevents\nescape with {STRING 26}!\p$" - -gText_CantEscape2:: @ 85C9D95 - .string "Can’t escape!\p$" - -gText_PkmnCantEscape2:: @ 85C9DA4 - .string "{STRING 15} can’t escape!$" - -gText_HitXTimes:: @ 85C9DB5 - .string "Hit {STRING 0} time(s)!$" - -gText_PkmnFellAsleep:: @ 85C9DC5 - .string "{STRING 17}\nfell asleep!$" - -gText_PkmnMadeSleep:: @ 85C9DD5 - .string "{STRING 19}’s {STRING 26}\nmade {STRING 17} sleep!$" - -gText_PkmnAlreadyAsleep:: @ 85C9DEC - .string "{STRING 16} is\nalready asleep!$" - -gText_PkmnAlreadyAsleep2:: @ 85C9E02 - .string "{STRING 15} is\nalready asleep!$" - -gText_PkmnWasntAffected:: @ 85C9E18 - .string "{STRING 16}\nwasn’t affected!$" - -gText_PkmnWasPoisoned:: @ 85C9E2C - .string "{STRING 17}\nwas poisoned!$" - -gText_PkmnPoisonedBy:: @ 85C9E3D - .string "{STRING 19}’s {STRING 26}\npoisoned {STRING 17}!$" - -gText_PkmnHurtByPoison:: @ 85C9E52 - .string "{STRING 15} is hurt\nby poison!$" - -gText_PkmnAlreadyPoisoned:: @ 85C9E68 - .string "{STRING 16} is already\npoisoned.$" - -gText_PkmnBadlyPoisoned:: @ 85C9E80 - .string "{STRING 17} is badly\npoisoned!$" - -gText_PkmnEnergyDrained:: @ 85C9E96 - .string "{STRING 16} had its\nenergy drained!$" - -gText_PkmnWasBurned:: @ 85C9EB1 - .string "{STRING 17} was burned!$" - -gText_PkmnBurnedBy:: @ 85C9EC0 - .string "{STRING 19}’s {STRING 26}\nburned {STRING 17}!$" - -gText_PkmnHurtByBurn:: @ 85C9ED3 - .string "{STRING 15} is hurt\nby its burn!$" - -gText_PkmnAlreadyHasBurn:: @ 85C9EEB - .string "{STRING 16} already\nhas a burn.$" - -gText_PkmnWasFrozen:: @ 85C9F02 - .string "{STRING 17} was\nfrozen solid!$" - -gText_PkmnFrozenBy:: @ 85C9F17 - .string "{STRING 19}’s {STRING 26}\nfroze {STRING 17} solid!$" - -gText_PkmnIsFrozen:: @ 85C9F2F - .string "{STRING 15} is\nfrozen solid!$" - -gText_PkmnWasDefrosted:: @ 85C9F43 - .string "{STRING 16} was\ndefrosted!$" - -gText_PkmnWasDefrosted2:: @ 85C9F55 - .string "{STRING 15} was\ndefrosted!$" - -gText_PkmnWasDefrostedBy:: @ 85C9F67 - .string "{STRING 15} was\ndefrosted by {STRING 20}!$" - -gText_PkmnWasParalyzed:: @ 85C9F7F - .string "{STRING 17} is paralyzed!\nIt may be unable to move!$" - -gText_PkmnWasParalyzedBy:: @ 85C9FAA - .string "{STRING 19}’s {STRING 26}\nparalyzed {STRING 17}!\lIt may be unable to move!$" - -gText_PkmnIsParalyzed:: @ 85C9FDA - .string "{STRING 15} is paralyzed!\nIt can’t move!$" - -gText_PkmnIsAlreadyParalyzed:: @ 85C9FFA - .string "{STRING 16} is\nalready paralyzed!$" - -gText_PkmnHealedParalysis:: @ 85CA013 - .string "{STRING 16} was\nhealed of paralysis!$" - -gText_PkmnDreamEaten:: @ 85CA02F - .string "{STRING 16}’s\ndream was eaten!$" - -gText_StatsWontIncrease:: @ 85CA045 - .string "{STRING 15}’s {STRING 0}\nwon’t go higher!$" - -gText_StatsWontDecrease:: @ 85CA05E - .string "{STRING 16}’s {STRING 0}\nwon’t go lower!$" - -gText_TeamStoppedWorking:: @ 85CA076 - .string "Your team’s {STRING 0}\nstopped working!$" - -gText_FoeStoppedWorking:: @ 85CA096 - .string "The foe’s {STRING 0}\nstopped working!$" - -gText_PkmnIsConfused:: @ 85CA0B4 - .string "{STRING 15} is\nconfused!$" - -gText_PkmnHealedConfusion:: @ 85CA0C4 - .string "{STRING 15} snapped\nout of confusion!$" - -gText_PkmnWasConfused:: @ 85CA0E1 - .string "{STRING 17} became\nconfused!$" - -gText_PkmnAlreadyConfused:: @ 85CA0F5 - .string "{STRING 16} is\nalready confused!$" - -gText_PkmnFellInLove:: @ 85CA10D - .string "{STRING 16}\nfell in love!$" - -gText_PkmnInLove:: @ 85CA11E - .string "{STRING 15} is in love\nwith {STRING 19}!$" - -gText_PkmnImmobilizedByLove:: @ 85CA135 - .string "{STRING 15} is\nimmobilized by love!$" - -gText_PkmnBlownAway:: @ 85CA150 - .string "{STRING 16} was\nblown away!$" - -gText_PkmnChangedType:: @ 85CA163 - .string "{STRING 15} transformed\ninto the {STRING 0} type!$" - -gText_PkmnFlinched:: @ 85CA184 - .string "{STRING 15} flinched!$" - -gText_PkmnRegainedHealth:: @ 85CA191 - .string "{STRING 16} regained\nhealth!$" - -gText_PkmnHPFull:: @ 85CA1A5 - .string "{STRING 16}’s\nHP is full!$" - -gText_PkmnRaisedSpDef:: @ 85CA1B6 - .string "{STRING 42}’s {STRING 20}\nraised SP. DEF!$" - -gText_PkmnRaisedSpDefALittle:: @ 85CA1CE - .string "{STRING 42}’s {STRING 20}\nraised SP. DEF a little!$" - -gText_PkmnRaisedDef:: @ 85CA1EF - .string "{STRING 42}’s {STRING 20}\nraised DEFENSE!$" - -gText_PkmnRaisedDefALittle:: @ 85CA207 - .string "{STRING 42}’s {STRING 20}\nraised DEFENSE a little!$" - -gText_PkmnCoveredByVeil:: @ 85CA228 - .string "{STRING 42}’s party is covered\nby a veil!$" - -gText_PkmnUsedSafeguard:: @ 85CA249 - .string "{STRING 16}’s party is protected\nby SAFEGUARD!$" - -gText_PkmnSafeguardExpired:: @ 85CA26F - .string "{STRING 44}’s party is no longer\nprotected by SAFEGUARD!$" - -gText_PkmnWentToSleep:: @ 85CA29F - .string "{STRING 15} went\nto sleep!$" - -gText_PkmnSleptHealthy:: @ 85CA2B1 - .string "{STRING 15} slept and\nbecame healthy!$" - -gText_PkmnWhippedWhirlwind:: @ 85CA2CE - .string "{STRING 15} whipped\nup a whirlwind!$" - -gText_PkmnTookSunlight:: @ 85CA2E9 - .string "{STRING 15} took\nin sunlight!$" - -gText_PkmnLoweredHead:: @ 85CA2FE - .string "{STRING 15} lowered\nits head!$" - -gText_PkmnIsGlowing:: @ 85CA313 - .string "{STRING 15} is glowing!$" - -gText_PkmnFlewHigh:: @ 85CA322 - .string "{STRING 15} flew\nup high!$" - -gText_PkmnDugHole:: @ 85CA333 - .string "{STRING 15} dug a hole!$" - -gText_PkmnHidUnderwater:: @ 85CA342 - .string "{STRING 15} hid\nunderwater!$" - -gText_PkmnSprangUp:: @ 85CA355 - .string "{STRING 15} sprang up!$" - -gText_PkmnSqueezedByBind:: @ 85CA363 - .string "{STRING 16} was squeezed by\n{STRING 15}’s BIND!$" - -gText_PkmnTrappedInVortex:: @ 85CA381 - .string "{STRING 16} was trapped\nin the vortex!$" - -gText_PkmnTrappedBySandTomb:: @ 85CA39F - .string "{STRING 16} was trapped\nby SAND TOMB!$" - -gText_PkmnWrappedBy:: @ 85CA3BC - .string "{STRING 16} was WRAPPED by\n{STRING 15}!$" - -gText_PkmnClamped:: @ 85CA3D2 - .string "{STRING 15} CLAMPED\n{STRING 16}!$" - -gText_PkmnHurtBy:: @ 85CA3E1 - .string "{STRING 15} is hurt\nby {STRING 0}!$" - -gText_PkmnFreedFrom:: @ 85CA3F3 - .string "{STRING 15} was freed\nfrom {STRING 0}!$" - -gText_PkmnCrashed:: @ 85CA409 - .string "{STRING 15} kept going\nand crashed!$" - -gText_PkmnShroudedInMist:: @ 85CA424 - .string "{STRING 42} became\nshrouded in MIST!$" - -gText_PkmnProtectedByMist:: @ 85CA440 - .string "{STRING 19} is protected\nby MIST!$" - -gText_PkmnGettingPumped:: @ 85CA459 - .string "{STRING 15} is getting\npumped!$" - -gText_PkmnHitWithRecoil:: @ 85CA46F - .string "{STRING 15} is hit\nwith recoil!$" - -gText_PkmnProtectedItself2:: @ 85CA486 - .string "{STRING 15} protected\nitself!$" - -gText_PkmnBuffetedBySandstorm:: @ 85CA49B - .string "{STRING 15} is buffeted\nby the sandstorm!$" - -gText_PkmnPeltedByHail:: @ 85CA4BC - .string "{STRING 15} is pelted\nby HAIL!$" - -gText_PkmnsXWoreOff:: @ 85CA4D2 - .string "{STRING 40}’s {STRING 0}\nwore off!$" - -gText_PkmnSeeded:: @ 85CA4E4 - .string "{STRING 16} was seeded!$" - -gText_PkmnEvadedAttack:: @ 85CA4F3 - .string "{STRING 16} evaded\nthe attack!$" - -gText_PkmnSappedByLeechSeed:: @ 85CA509 - .string "{STRING 15}’s health is\nsapped by LEECH SEED!$" - -gText_PkmnFastAsleep:: @ 85CA52E - .string "{STRING 15} is fast\nasleep.$" - -gText_PkmnWokeUp:: @ 85CA541 - .string "{STRING 15} woke up!$" - -gText_PkmnUproarKeptAwake:: @ 85CA54D - .string "But {STRING 19}’s UPROAR\nkept it awake!$" - -gText_PkmnWokeUpInUproar:: @ 85CA56C - .string "{STRING 15} woke up\nin the UPROAR!$" - -gText_PkmnCausedUproar:: @ 85CA586 - .string "{STRING 15} caused\nan UPROAR!$" - -gText_PkmnMakingUproar:: @ 85CA59B - .string "{STRING 15} is making\nan UPROAR!$" - -gText_PkmnCalmedDown:: @ 85CA5B3 - .string "{STRING 15} calmed down.$" - -gText_PkmnCantSleepInUproar:: @ 85CA5C3 - .string "But {STRING 16} can’t\nsleep in an UPROAR!$" - -gText_PkmnStockpiled:: @ 85CA5E4 - .string "{STRING 15} STOCKPILED\n{STRING 0}!$" - -gText_PkmnCantStockpile:: @ 85CA5F6 - .string "{STRING 15} can’t\nSTOCKPILE any more!$" - -gText_PkmnCantSleepInUproar2:: @ 85CA613 - .string "But {STRING 16} can’t\nsleep in an UPROAR!$" - -gText_UproarKeptPkmnAwake:: @ 85CA634 - .string "But the UPROAR kept\n{STRING 16} awake!$" - -gText_PkmnStayedAwakeUsing:: @ 85CA652 - .string "{STRING 16} stayed awake\nusing its {STRING 25}!$" - -gText_PkmnStoringEnergy:: @ 85CA670 - .string "{STRING 15} is storing\nenergy!$" - -gText_PkmnUnleashedEnergy:: @ 85CA686 - .string "{STRING 15} unleashed\nenergy!$" - -gText_PkmnFatigueConfusion:: @ 85CA69B - .string "{STRING 15} became\nconfused due to fatigue!$" - -gText_PkmnPickedUpItem:: @ 85CA6BE - .string "{STRING 35} picked up\n¥{STRING 0}!\p$" - -gText_PkmnUnaffected:: @ 85CA6D1 - .string "{STRING 16} is\nunaffected!$" - -gText_PkmnTransformedInto:: @ 85CA6E3 - .string "{STRING 15} transformed\ninto {STRING 0}!$" - -gText_PkmnMadeSubstitute:: @ 85CA6FB - .string "{STRING 15} made\na SUBSTITUTE!$" - -gText_PkmnHasSubstitute:: @ 85CA711 - .string "{STRING 15} already\nhas a SUBSTITUTE!$" - -gText_SubstituteDamaged:: @ 85CA72E - .string "The SUBSTITUTE took damage\nfor {STRING 16}!\p$" - -gText_PkmnSubstituteFaded:: @ 85CA752 - .string "{STRING 16}’s\nSUBSTITUTE faded!\p$" - -gText_PkmnMustRecharge:: @ 85CA76A - .string "{STRING 15} must\nrecharge!$" - -gText_PkmnRageBuilding:: @ 85CA76C - .string "{STRING 16}’s RAGE\nis building!$" - -gText_PkmnMoveWasDisabled:: @ 85CA793 - .string "{STRING 16}’s {STRING 0}\nwas disabled!$" - -gText_PkmnMoveDisabledNoMore:: @ 85CA7A9 - .string "{STRING 15} is disabled\nno more!$" - -gText_PkmnGotEncore:: @ 85CA7C1 - .string "{STRING 16} got\nan ENCORE!$" - -gText_PkmnEncoreEnded:: @ 85CA7D3 - .string "{STRING 15}’s ENCORE\nended!$" - -gText_PkmnTookAim:: @ 85CA7E6 - .string "{STRING 15} took aim\nat {STRING 16}!$" - -gText_PkmnSketchedMove:: @ 85CA7F9 - .string "{STRING 15} SKETCHED\n{STRING 0}!$" - -gText_PkmnTryingToTakeFoe:: @ 85CA809 - .string "{STRING 15} is trying\nto take its foe with it!$" - -gText_PkmnTookFoe:: @ 85CA82F - .string "{STRING 16} took\n{STRING 15} with it!$" - -gText_PkmnReducedPP:: @ 85CA843 - .string "Reduced {STRING 16}’s\n{STRING 0} by {PLAYER}!$" - -gText_PkmnStoleItem:: @ 85CA85A - .string "{STRING 15} stole\n{STRING 16}’s {STRING 22}!$" - -gText_PkmnCantEscape:: @ 85CA86C - .string "{STRING 16} can’t\nescape now!$" - -gText_PkmnFellIntoNightmare:: @ 85CA881 - .string "{STRING 16} fell into\na NIGHTMARE!$" - -gText_PkmnLockedInNightmare:: @ 85CA89B - .string "{STRING 15} is locked\nin a NIGHTMARE!$" - -gText_PkmnLaidCurse:: @ 85CA8B8 - .string "{STRING 15} cut its own HP and\nlaid a CURSE on {STRING 16}!$" - -gText_PkmnAfflictedByCurse:: @ 85CA8E2 - .string "{STRING 15} is afflicted\nby the CURSE!$" - -gText_SpikesScattered:: @ 85CA900 - .string "SPIKES were scattered all around\nthe opponent’s side!$" - -gText_PkmnHurtBySpikes:: @ 85CA936 - .string "{STRING 19} is hurt\nby SPIKES!$" - -gText_PkmnIdentified:: @ 85CA94C - .string "{STRING 15} identified\n{STRING 16}!$" - -gText_PkmnPerishCountFell:: @ 85CA95E - .string "{STRING 15}’s PERISH count\nfell to {STRING 0}!$" - -gText_PkmnBracedItself:: @ 85CA97C - .string "{STRING 15} braced\nitself!$" - -gText_PkmnEnduredHit:: @ 85CA98E - .string "{STRING 16} ENDURED\nthe hit!$" - -gText_MagnitudeStrength:: @ 85CA9A2 - .string "MAGNITUDE {STRING 0}!$" - -gText_PkmnCutHPMaxedAttack:: @ 85CA9B0 - .string "{STRING 15} cut its own HP\nand maximized ATTACK!$" - -gText_PkmnCopiedStatChanges:: @ 85CA9D8 - .string "{STRING 15} copied\n{STRING 16}’s stat changes!$" - -gText_PkmnGotFree:: @ 85CA9F5 - .string "{STRING 15} got free of\n{STRING 16}’s {STRING 0}!$" - -gText_PkmnShedLeechSeed:: @ 85CAA0D - .string "{STRING 15} shed\nLEECH SEED!$" - -gText_PkmnBlewAwaySpikes:: @ 85CAA21 - .string "{STRING 15} blew away\nSPIKES!$" - -gText_PkmnFledFromBattle:: @ 85CAA36 - .string "{STRING 15} fled from\nbattle!$" - -gText_PkmnForesawAttack:: @ 85CAA4B - .string "{STRING 15} foresaw\nan attack!$" - -gText_PkmnTookAttack:: @ 85CAA61 - .string "{STRING 16} took the\n{STRING 0} attack!$" - -gText_PkmnChoseXAsDestiny:: @ 85CAA78 - .string "{STRING 15} chose\n{STRING 20} as its destiny!$" - -gText_PkmnAttack:: @ 85CAA94 - .string "{STRING 0}’s attack!$" - -gText_PkmnCenterAttention:: @ 85CAAA1 - .string "{STRING 15} became the\ncenter of attention!$" - -gText_PkmnChargingPower:: @ 85CAAC4 - .string "{STRING 15} began\ncharging power!$" - -gText_NaturePowerTurnedInto:: @ 85CAADD - .string "NATURE POWER turned into\n{STRING 20}!$" - -gText_PkmnStatusNormal:: @ 85CAAFA - .string "{STRING 15}’s status\nreturned to normal!$" - -gText_PkmnSubjectedToTorment:: @ 85CAB1A - .string "{STRING 16} was subjected\nto TORMENT!$" - -gText_PkmnTighteningFocus:: @ 85CAB37 - .string "{STRING 15} is tightening\nits focus!$" - -gText_PkmnFellForTaunt:: @ 85CAB53 - .string "{STRING 16} fell for\nthe TAUNT!$" - -gText_PkmnReadyToHelp:: @ 85CAB6A - .string "{STRING 15} is ready to\nhelp {STRING 16}!$" - -gText_PkmnSwitchedItems:: @ 85CAB82 - .string "{STRING 15} switched\nitems with its opponent!$" - -gText_PkmnObtainedX:: @ 85CABA7 - .string "{STRING 15} obtained\n{STRING 0}.$" - -gText_PkmnObtainedX2:: @ 85CABB7 - .string "{STRING 16} obtained\n{PLAYER}.$" - -gText_PkmnObtainedXYObtainedZ:: @ 85CABC7 - .string "{STRING 15} obtained\n{STRING 0}.\p{STRING 16} obtained\n{PLAYER}.$" - -gText_PkmnCopiedFoe:: @ 85CAB82 - .string "{STRING 15} copied\n{STRING 16}’s {STRING 25}!$" - -gText_PkmnMadeWish:: @ 85CABFA - .string "{STRING 15} made a WISH!$" - -gText_PkmnWishCameTrue:: @ 85CAC0A - .string "{STRING 0}’s WISH\ncame true!$" - -gText_PkmnPlantedRoots:: @ 85CAC1F - .string "{STRING 15} planted its roots!$" - -gText_PkmnAbsorbedNutrients:: @ 85CAC35 - .string "{STRING 15} absorbed\nnutrients with its roots!$" - -gText_PkmnAnchoredItself:: @ 85CAC5B - .string "{STRING 16} anchored\nitself with its roots!$" - -gText_PkmnWasMadeDrowsy:: @ 85CAC7E - .string "{STRING 15} made\n{STRING 16} drowsy!$" - -gText_PkmnKnockedOff:: @ 85CAC91 - .string "{STRING 15} knocked off\n{STRING 16}’s {STRING 22}!$" - -gText_PkmnSwappedAbilities:: @ 85CACA9 - .string "{STRING 15} swapped abilities\nwith its opponent!$" - -gText_PkmnSealedOpponentMove:: @ 85CACD1 - .string "{STRING 15} sealed the\nopponent’s move(s)!$" - -gText_PkmnWantsGrudge:: @ 85CACF3 - .string "{STRING 15} wants the\nopponent to bear a GRUDGE!$" - -gText_PkmnLostPPGrudge:: @ 85CAD1B - .string "{STRING 15}’s {STRING 0} lost\nall its PP due to the GRUDGE!$" - -gText_PkmnShroudedItself:: @ 85CAD46 - .string "{STRING 15} shrouded\nitself in {STRING 20}!$" - -gText_PkmnMoveBounced:: @ 85CAD60 - .string "{STRING 15}’s {STRING 20}\nwas bounced back by MAGIC COAT!$" - -gText_PkmnWaitsForTarget:: @ 85CAD88 - .string "{STRING 15} waits for a target\nto make a move!$" - -gText_PkmnSnatchedMove:: @ 85CADAE - .string "{STRING 16} SNATCHED\n{STRING 19}’s move!$" - -gText_ElectricityWeakened:: @ 85CADC5 - .string "Electricity’s power was\nweakened!$" - -gText_FireWeakened:: @ 85CADE7 - .string "Fire’s power was\nweakened!$" - -gText_XFoundOneY:: @ 85CAE02 - .string "{STRING 15} found\none {STRING 22}!$" - -gText_SoothingAroma:: @ 85CAE13 - .string "A soothing aroma wafted\nthrough the area!$" - -gText_ItemsCantBeUsedNow:: @ 85CAE3D - .string "Items can’t be used now.{PAUSE 64}$" - -gText_ForXCommaYZ:: @ 85CAE59 - .string "For {STRING 19},\n{STRING 22} {STRING 0}$" - -gText_PkmnUsedXToGetPumped:: @ 85CAE67 - .string "{STRING 19} used\n{STRING 22} to get pumped!$" - -gText_PkmnLostFocus:: @ 85CAE81 - .string "{STRING 15} lost its\nfocus and couldn’t move!$" - -gText_PkmnWasDraggedOut:: @ 85CAEA6 - .string "{STRING 16} was\ndragged out!\p$" - -gText_TheWallShattered:: @ 85CAEBB - .string "The wall shattered!$" - -gText_ButNoEffect:: @ 85CAECF - .string "But it had no effect!$" - -gText_PkmnHasNoMovesLeft:: @ 85CAEE5 - .string "{STRING 18} has no\nmoves left!\p$" - -gText_PkmnMoveIsDisabled:: @ 85CAEFC - .string "{STRING 18}’s {STRING 20}\nis disabled!\p$" - -gText_PkmnCantUseMoveTorment:: @ 85CAF12 - .string "{STRING 18} can’t use the same\nmove in a row due to the TORMENT!\p$" - -gText_PkmnCantUseMoveTaunt:: @ 85CAF4B - .string "{STRING 18} can’t use\n{STRING 20} after the TAUNT!\p$" - -gText_PkmnCantUseMoveSealed:: @ 85CAF6D - .string "{STRING 18} can’t use the\nsealed {STRING 20}!\p$" - -gText_PkmnMadeItRain:: @ 85CAF8A - .string "{STRING 19}’s {STRING 26}\nmade it rain!$" - -gText_PkmnRaisedSpeed:: @ 85CAFA0 - .string "{STRING 19}’s {STRING 26}\nraised its SPEED!$" - -gText_PkmnProtectedBy:: @ 85CAFBA - .string "{STRING 16} was protected\nby {STRING 25}!$" - -gText_PkmnPreventsUsage:: @ 85CAFD2 - .string "{STRING 16}’s {STRING 25}\nprevents {STRING 15}\lfrom using {STRING 20}!$" - -gText_PkmnRestoredHPUsing:: @ 85CAFF5 - .string "{STRING 16} restored HP\nusing its {STRING 25}!$" - -gText_PkmnsXMadeYUseless:: @ 85CB012 - .string "{STRING 16}’s {STRING 25}\nmade {STRING 20} useless!$" - -gText_PkmnChangedTypeWith:: @ 85CB02B - .string "{STRING 16}’s {STRING 25}\nmade it the {STRING 0} type!$" - -gText_PkmnPreventsParalysisWith:: @ 85CB048 - .string "{STRING 17}’s {STRING 25}\nprevents paralysis!$" - -gText_PkmnPreventsRomanceWith:: @ 85CB064 - .string "{STRING 16}’s {STRING 25}\nprevents romance!$" - -gText_PkmnPreventsPoisoningWith:: @ 85CB07E - .string "{STRING 17}’s {STRING 25}\nprevents poisoning!$" - -gText_PkmnPreventsConfusionWith:: @ 85CB09A - .string "{STRING 16}’s {STRING 25}\nprevents confusion!$" - -gText_PkmnRaisedFirePowerWith:: @ 85CB0B6 - .string "{STRING 16}’s {STRING 25}\nraised its FIRE power!$" - -gText_PkmnAnchorsItselfWith:: @ 85CB0D5 - .string "{STRING 16} anchors\nitself with {STRING 25}!$" - -gText_PkmnCutsAttackWith:: @ 85CB0F0 - .string "{STRING 19}’s {STRING 26}\ncuts {STRING 16}’s ATTACK!$" - -gText_PkmnPreventsStatLossWith:: @ 85CB10A - .string "{STRING 19}’s {STRING 26}\nprevents stat loss!$" - -gText_PkmnHurtsWith:: @ 85CB126 - .string "{STRING 16}’s {STRING 25}\nhurt {STRING 15}!$" - -gText_PkmnTraced:: @ 85CB137 - .string "{STRING 19} TRACED\n{STRING 0}’s {PLAYER}!$" - -gText_PkmnsXPreventsBurns:: @ 85CB14A - .string "{STRING 17}’s {STRING 27}\nprevents burns!$" - -gText_PkmnsXBlocksY:: @ 85CB162 - .string "{STRING 16}’s {STRING 25}\nblocks {STRING 20}!$" - -gText_PkmnsXBlocksY2:: @ 85CB175 - .string "{STRING 19}’s {STRING 26}\nblocks {STRING 20}!$" - -gText_PkmnsXRestoredHPALittle2:: @ 85CB188 - .string "{STRING 15}’s {STRING 24}\nrestored its HP a little!$" - -gText_PkmnsXWhippedUpSandstorm:: @ 85CB1AA - .string "{STRING 19}’s {STRING 26}\nwhipped up a sandstorm!$" - -gText_PkmnsXIntensifiedSun:: @ 85CB1CA - .string "{STRING 19}’s {STRING 26}\nintensified the sun’s rays!$" - -gText_PkmnsXPreventsYLoss:: @ 85CB1EE - .string "{STRING 19}’s {STRING 26}\nprevents {STRING 0} loss!$" - -gText_PkmnsXInfatuatedY:: @ 85CB208 - .string "{STRING 16}’s {STRING 25}\ninfatuated {STRING 15}!$" - -gText_PkmnsXMadeYIneffective:: @ 85CB21F - .string "{STRING 16}’s {STRING 25}\nmade {STRING 20} ineffective!$" - -gText_PkmnsXCuredYProblem:: @ 85CB23C - .string "{STRING 19}’s {STRING 26}\ncured its {STRING 0} problem!$" - -gText_ItSuckedLiquidOoze:: @ 85CB25A - .string "It sucked up the\nLIQUID OOZE!$" - -gText_PkmnTransformed:: @ 85CB278 - .string "{STRING 19} transformed!$" - -gText_PkmnsXTookAttack:: @ 85CB288 - .string "{STRING 16}’s {STRING 25}\ntook the attack!$" - -gText_PkmnsXPreventsSwitching:: @ 85CB2A1 - .string "{STRING 0}’s {STRING 23}\nprevents switching!\p$" - -gText_PreventedFromWorking:: @ 85CB2BE - .string "{STRING 16}’s {STRING 25}\nprevented {STRING 19}’s\l{STRING 0} from working!$" - -gText_PkmnsXMadeItIneffective:: @ 85CB2E6 - .string "{STRING 19}’s {STRING 26}\nmade it ineffective!$" - -gText_PkmnsXPreventsFlinching:: @ 85CB303 - .string "{STRING 17}’s {STRING 27}\nprevents flinching!$" - -gText_PkmnsXPreventsYsZ:: @ 85CB31F - .string "{STRING 15}’s {STRING 24}\nprevents {STRING 16}’s\l{STRING 25} from working!$" - -gText_PkmnsXCuredItsYProblem:: @ 85CB346 - .string "{STRING 19}’s {STRING 26}\ncured its {STRING 0} problem!$" - -gText_PkmnsXHadNoEffectOnY:: @ 85CB364 - .string "{STRING 19}’s {STRING 26}\nhad no effect on {STRING 17}!$" - -gText_StatSharply:: @ 85CB381 - .string "sharply $" - -gText_StatRose:: @ 85CB38A - .string "rose!$" - -gText_StatHarshly:: @ 85CB390 - .string "harshly $" - -gText_StatFell:: @ 85CB399 - .string "fell!$" - -gText_PkmnsStatChanged:: @ 85CB39F - .string "{STRING 15}’s {STRING 0}\n{PLAYER}$" - -gText_PkmnsStatChanged2:: @ 85CB3AA - .string "{STRING 16}’s {STRING 0}\n{PLAYER}$" - -gText_UsingXTheYOfZN:: @ 85CB3B5 - .string "Using {STRING 22}, the {STRING 0}\nof {STRING 19} {PLAYER}$" - -gText_PkmnsStatChanged3:: @ 85CB3CF - .string "{STRING 15}’s {STRING 0}\n{PLAYER}$" - -gText_PkmnsStatChanged4:: @ 85CB3DA - .string "{STRING 16}’s {STRING 0}\n{PLAYER}$" - -gText_StatsWontIncrease2:: @ 85CB3E5 - .string "{STRING 15}’s stats won’t\ngo any higher!$" - -gText_StatsWontDecrease2:: @ 85CB405 - .string "{STRING 16}’s stats won’t\ngo any lower!$" - -gText_CriticalHit:: @ 85CB424 - .string "A critical hit!$" - -gText_OneHitKO:: @ 85CB434 - .string "It’s a one-hit KO!$" - -gText_123Poof:: @ 85CB447 - .string "{PAUSE 32}1, {PAUSE 15}2, and{PAUSE 15}… {PAUSE 15}… {PAUSE 15}… {PAUSE 15}{PLAY_SE 0x0038}Poof!\p$" - -gText_AndEllipsis:: @ 85CB473 - .string "And…\p$" - -gText_HMMovesCantBeForgotten:: @ 85CB479 - .string "HM moves can’t be\nforgotten now.\p$" - -gText_NotVeryEffective:: @ 85CB49B - .string "It’s not very effective…$" - -gText_SuperEffective:: @ 85CB4B4 - .string "It’s super effective!$" - -gText_GotAwaySafely:: @ 85CB4CA - .string "{PLAY_SE 0x0011}Got away safely!\p$" - -gText_PkmnFledUsingIts:: @ 85CB4E0 - .string "{PLAY_SE 0x0011}{STRING 15} fled\nusing its {STRING 22}!\p$" - -gText_PkmnFledUsing:: @ 85CB4FB - .string "{PLAY_SE 0x0011}{STRING 15} fled\nusing {STRING 24}!\p$" - -gText_WildPkmnFled:: @ 85CB512 - .string "{PLAY_SE 0x0011}Wild {STRING 0} fled!$" - -gText_PlayerDefeated:: @ 85CB524 - .string "Player defeated\n{STRING 32}!$" - -gText_PlayerBeatTwo:: @ 85CB538 - .string "Player beat {STRING 32}\nand {STRING 33}!$" - -gText_PlayerLostAgainst:: @ 85CB54F - .string "Player lost against\n{STRING 32}!$" - -gText_PlayerLostToTwo:: @ 85CB567 - .string "Player lost to {STRING 32}\nand {STRING 33}!$" - -gText_PlayerBattledToDraw:: @ 85CB581 - .string "Player battled to a draw against\n{STRING 32}!$" - -gText_PlayerBattledToDrawVsTwo:: @ 85CB5A6 - .string "Player battled to a draw against\n{STRING 32} and {STRING 33}!$" - -gText_WildFled:: @ 85CB5D2 - .string "{PLAY_SE 0x0011}{STRING 32} fled!$" - -gText_TwoWildFled:: @ 85CB5DF - .string "{PLAY_SE 0x0011}{STRING 32} and\n{STRING 33} fled!$" - -gText_NoRunningFromTrainers:: @ 85CB5F3 - .string "No! There’s no running\nfrom a TRAINER battle!\p$" - -gText_CantEscape:: @ 85CB622 - .string "Can’t escape!\p$" - -gText_DontLeaveBirch:: @ 85CB631 - .string "PROF. BIRCH: Don’t leave me like this!\p$" - -gText_ButNothingHappened:: @ 85CB659 - .string "But nothing happened!$" - -gText_ButItFailed:: @ 85CB66F - .string "But it failed!$" - -gText_ItHurtConfusion:: @ 85CB67E - .string "It hurt itself in its\nconfusion!$" - -gText_MirrorMoveFailed:: @ 85CB69F - .string "The MIRROR MOVE failed!$" - -gText_StartedToRain:: @ 85CB6B7 - .string "It started to rain!$" - -gText_DownpourStarted:: @ 85CB6CB - .string "A downpour started!$" - -gText_RainContinues:: @ 85CB6DF - .string "Rain continues to fall.$" - -gText_DownpourContinues:: @ 85CB6F7 - .string "The downpour continues.$" - -gText_RainStopped:: @ 85CB70F - .string "The rain stopped.$" - -gText_SandstormBrewed:: @ 85CB721 - .string "A sandstorm brewed!$" - -gText_SandstormRages:: @ 85CB735 - .string "The sandstorm rages.$" - -gText_SandstormSubsided:: @ 85CB74A - .string "The sandstorm subsided.$" - -gText_SunlightGotBright:: @ 85CB762 - .string "The sunlight got bright!$" - -gText_SunlightStrong:: @ 85CB77B - .string "The sunlight is strong.$" - -gText_SunlightFaded:: @ 85CB793 - .string "The sunlight faded.$" - -gText_StartedHail:: @ 85CB7A7 - .string "It started to hail!$" - -gText_HailContinues:: @ 85CB7BB - .string "Hail continues to fall.$" - -gText_HailStopped:: @ 85CB7D3 - .string "The hail stopped.$" - -gText_FailedToSpitUp:: @ 85CB7E5 - .string "But it failed to SPIT UP\na thing!$" - -gText_FailedToSwallow:: @ 85CB807 - .string "But it failed to SWALLOW\na thing!$" - -gText_WindBecameHeatWave:: @ 85CB829 - .string "The wind turned into a\nHEAT WAVE!$" - -gText_StatChangesGone:: @ 85CB84B - .string "All stat changes were\neliminated!$" - -gText_CoinsScattered:: @ 85CB86D - .string "Coins scattered everywhere!$" - -gText_TooWeakForSubstitute:: @ 85CB889 - .string "It was too weak to make\na SUBSTITUTE!$" - -gText_SharedPain:: @ 85CB8AF - .string "The battlers shared\ntheir pain!$" - -gText_BellChimed:: @ 85CB8CF - .string "A bell chimed!$" - -gText_FaintInThree:: @ 85CB8DE - .string "All affected POKéMON will\nfaint in three turns!$" - -gText_NoPPLeft:: @ 85CB90E - .string "There’s no PP left for\nthis move!\p$" - -gText_ButNoPPLeft:: @ 85CB931 - .string "But there was no PP left\nfor the move!$" - -gText_PkmnIgnoresAsleep:: @ 85CB958 - .string "{STRING 15} ignored\norders while asleep!$" - -gText_PkmnIgnoredOrders:: @ 85CB978 - .string "{STRING 15} ignored\norders!$" - -gText_PkmnBeganToNap:: @ 85CB98B - .string "{STRING 15} began to nap!$" - -gText_PkmnLoafing:: @ 85CB99C - .string "{STRING 15} is\nloafing around!$" - -gText_PkmnWontObey:: @ 85CB9B2 - .string "{STRING 15} won’t\nobey!$" - -gText_PkmnTurnedAway:: @ 85CB9C1 - .string "{STRING 15} turned away!$" - -gText_PkmnPretendNotNotice:: @ 85CB9D1 - .string "{STRING 15} pretended\nnot to notice!$" - -gText_EnemyAboutToSwitchPkmn:: @ 85CB9ED - .string "{STRING 28} {STRING 29} is\nabout to use {PLAYER}.\pWill {STRING 35} change\nPOKéMON?$" - -gText_PkmnLearnedMove2:: @ 85CBA1F - .string "{STRING 15} learned\n{STRING 0}!$" - -gText_PlayerDefeatedXY:: @ 85CBA2E - .string "Player defeated\n{STRING 28} {STRING 29}!\p$" - -gText_CreptCloser:: @ 85CBA46 - .string "{STRING 35} crept closer to\n{RIVAL}!$" - -gText_CantGetCloser:: @ 85CBA5D - .string "{STRING 35} can’t get any closer!$" - -gText_PkmnWatchingCarefully:: @ 85CBA76 - .string "{RIVAL} is watching\ncarefully!$" - -gText_PkmnCuriousAboutX:: @ 85CBA90 - .string "{RIVAL} is curious about\nthe {STRING 0}!$" - -gText_PkmnEnthralledByX:: @ 85CBAAC - .string "{RIVAL} is enthralled by\nthe {STRING 0}!$" - -gText_PkmnIgnoredX:: @ 85CBAC8 - .string "{RIVAL} completely ignored\nthe {STRING 0}!$" - -gText_ThrewPokeblockAtPkmn:: @ 85CBAE6 - .string "{STRING 35} threw a {POKEBLOCK}\nat the {RIVAL}!$" - -gText_OutOfSafariBalls:: @ 85CBB02 - .string "{PLAY_SE 0x0049}ANNOUNCER: You’re out of\nSAFARI BALLS! Game over!\p$" - - .string "{RIVAL} appeared!\p$" - -gText_WildPkmnAppeared:: @ 85CBB47 - .string "Wild {RIVAL} appeared!\p$" - -gText_WildPkmnAppeared2:: @ 85CBB5A - .string "Wild {RIVAL} appeared!\p$" - -gText_WildPkmnAppearedPause:: @ 85CBB6D - .string "Wild {RIVAL} appeared!{PAUSE 127}$" - -gText_TwoWildPkmnAppeared:: @ 85CBB82 - .string "Wild {RIVAL} and\n{AQUA} appeared!\p$" - -gText_TrainerXYWantsToBattle:: @ 85CBB9C - .string "{STRING 28} {STRING 29}\nwould like to battle!\p$" - -gText_TrainerXWantsToBattle:: @ 85CBBB9 - .string "{STRING 32}\nwants to battle!$" - -gText_TwoTrainersWantToBattle:: @ 85CBBCD - .string "{STRING 32} and {STRING 33}\nwant to battle!$" - -gText_TrainerXYSentOutPkmn:: @ 85CBBE7 - .string "{STRING 28} {STRING 29} sent\nout {RIVAL}!$" - -gText_TrainerXYSentOutTwoPkmn:: @ 85CBBFA - .string "{STRING 28} {STRING 29} sent\nout {RIVAL} and {AQUA}!$" - -gText_TrainerXYSentOutPkmn2:: @ 85CBC14 - .string "{STRING 28} {STRING 29} sent\nout {STRING 0}!$" - -gText_TrainerXSentOutPkmn:: @ 85CBC27 - .string "{STRING 32} sent out\n{RIVAL}!$" - -gText_TrainerXSentOutTwoPkmn:: @ 85CBC37 - .string "{STRING 32} sent out\n{RIVAL} and {AQUA}!$" - -gText_TwoTrainersSentOutPkmn:: @ 85CBC4E - .string "{STRING 32} sent out {STRING 10}!\n{STRING 33} sent out {STRING 12}!$" - -gText_TrainerXSentOutPkmn2:: @ 85CBC6E - .string "{STRING 32} sent out\n{STRING 0}!$" - -gText_TrainerXSentOutPkmn3:: @ 85CBC7E - .string "{STRING 34} sent out\n{STRING 0}!$" - -gText_GoPkmn:: @ 85CBC8E - .string "Go! {STRING 5}!$" - -gText_GoTwoPkmn:: @ 85CBC96 - .string "Go! {STRING 5} and\n{VERSION}!$" - -gText_GoPkmn2:: @ 85CBCA5 - .string "Go! {STRING 0}!$" - -gText_DoItPkmn:: @ 85CBCAD - .string "Do it! {STRING 0}!$" - -gText_GoForItPkmn:: @ 85CBCB8 - .string "Go for it, {STRING 0}!$" - -gText_YourFoesWeakGetEmPkmn:: @ 85CBCC7 - .string "Your foe’s weak!\nGet ’em, {STRING 0}!$" - -gText_EnemySentOutPkmnGoPkmn:: @ 85CBCE5 - .string "{STRING 31} sent out {STRING 11}!\nGo! {STRING 9}!$" - -gText_PkmnThatsEnough:: @ 85CBCFD - .string "{STRING 0}, that’s enough!\nCome back!$" - -gText_PkmnComeBack:: @ 85CBD1B - .string "{STRING 0}, come back!$" - -gText_PkmnOkComeBack:: @ 85CBD2A - .string "{STRING 0}, OK!\nCome back!$" - -gText_PkmnGoodComeBack:: @ 85CBD3D - .string "{STRING 0}, good!\nCome back!$" - -gText_TrainerXYWithdrewPkmn:: @ 85CBD52 - .string "{STRING 28} {STRING 29}\nwithdrew {STRING 0}!$" - -gText_TrainerXWithdrewPkmn:: @ 85CBD65 - .string "{STRING 32} withdrew\n{STRING 0}!$" - -gText_TrainerXWithdrewPkmn2:: @ 85CBD75 - .string "{STRING 34} withdrew\n{STRING 0}!$" - -gText_WildPkmnPrefix:: @ 85CBD85 - .string "Wild $" - -gText_FoePkmnPrefix:: @ 85CBD8B - .string "Foe $" - - .string "$" - -gText_FoePkmnPrefix2:: @ 85CBD91 - .string "Foe$" - -gText_AllyPkmnPrefix:: @ 85CBD95 - .string "Ally$" - -gText_FoePkmnPrefix3:: @ 85CBD9A - .string "Foe$" - -gText_AllyPkmnPrefix2:: @ 85CBD9E - .string "Ally$" - -gText_FoePkmnPrefix4:: @ 85CBDA3 - .string "Foe$" - -gText_AllyPkmnPrefix3:: @ 85CBDA7 - .string "Ally$" - -gText_XUsedY2:: @ 85CBDAC - .string "{STRING 15} used\n{PLAYER}$" - -gText_ExclamationMark:: @ 85CBDB7 - .string "!$" - -gText_ExclamationMark2:: @ 85CBDB9 - .string "!$" - -gText_ExclamationMark3:: @ 85CBDBB - .string "!$" - -gText_ExclamationMark4:: @ 85CBDBD - .string "!$" - -gText_ExclamationMark5:: @ 85CBDBF - .string "!$" - -gText_HP2:: @ 85CBDC1 - .string "HP$" - -gText_Attack2:: @ 85CBDC4 - .string "ATTACK$" - -gText_Defense2:: @ 85CBDCB - .string "DEFENSE$" - -gText_Speed:: @ 85CBDD3 - .string "SPEED$" - -gText_SpAtk2:: @ 85CBDD9 - .string "SP. ATK$" - -gText_SpDef2:: @ 85CBDE1 - .string "SP. DEF$" - -gText_Accuracy:: @ 85CBDE9 - .string "accuracy$" - -gText_Evasiveness:: @ 85CBDF2 - .string "evasiveness$" - - .align 2 -gStatNamesTable:: @ 85CBE00 - .4byte gText_HP2 - .4byte gText_Attack2 - .4byte gText_Defense2 - .4byte gText_Speed - .4byte gText_SpAtk2 - .4byte gText_SpDef2 - .4byte gText_Accuracy - .4byte gText_Evasiveness - -gText_PokeblockWasTooSpicy:: @ 85CBE20 - .string "was too spicy!$" - -gText_PokeblockWasTooDry:: @ 85CBE2F - .string "was too dry!$" - -gText_PokeblockWasTooSweet:: @ 85CBE3C - .string "was too sweet!$" - -gText_PokeblockWasTooBitter:: @ 85CBE4B - .string "was too bitter!$" - -gText_PokeblockWasTooSour:: @ 85CBE5B - .string "was too sour!$" - - .align 2 -gPokeblockWasTooXStringTable:: @ 85CBE6C - .4byte gText_PokeblockWasTooSpicy - .4byte gText_PokeblockWasTooDry - .4byte gText_PokeblockWasTooSweet - .4byte gText_PokeblockWasTooBitter - .4byte gText_PokeblockWasTooSour - -gText_XUsedY:: @ 85CBE80 - .string "{STRING 35} used\n{STRING 22}!$" - -gText_WallyUsedY:: @ 85CBE8C - .string "WALLY used\n{STRING 22}!$" - -gText_XYUsedZ:: @ 85CBE9B - .string "{STRING 28} {STRING 29}\nused {STRING 22}!$" - -gText_TrainerBlockedBall:: @ 85CBEAA - .string "The TRAINER blocked the BALL!$" - -gText_DontBeAThief:: @ 85CBEC8 - .string "Don’t be a thief!$" - -gText_ItDodgedBall:: @ 85CBEDA - .string "It dodged the thrown BALL!\nThis POKéMON can’t be caught!$" - -gText_YouMissedPkmn:: @ 85CBF13 - .string "You missed the POKéMON!$" - -gText_PkmnBrokeFree:: @ 85CBF2B - .string "Oh, no!\nThe POKéMON broke free!$" - -gText_ItAppearedCaught:: @ 85CBF4B - .string "Aww!\nIt appeared to be caught!$" - -gText_AarghAlmostHadIt:: @ 85CBF6A - .string "Aargh!\nAlmost had it!$" - -gText_ShootSoClose:: @ 85CBF80 - .string "Shoot!\nIt was so close, too!$" - -gText_GotchaPkmnCaught:: @ 85CBF9D - .string "Gotcha!\n{RIVAL} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}\p$" - -gText_GotchaPkmnCaught2:: @ 85CBFBB - .string "Gotcha!\n{RIVAL} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}{PAUSE 127}$" - -gText_GiveNicknameCaptured:: @ 85CBFDB - .string "Give a nickname to the\ncaptured {RIVAL}?$" - -gText_PkmnSentToPC:: @ 85CBFFF - .string "{RIVAL} was sent to\n{STRING 39} PC.$" - -gText_Someones:: @ 85CC015 - .string "someone’s$" - -gText_Lanettes:: @ 85CC01F - .string "LANETTE’s$" - -gText_PkmnDataAddedToDex:: @ 85CC029 - .string "{RIVAL}’s data was\nadded to the POKéDEX.\p$" - -gText_ItIsRaining:: @ 85CC04E - .string "It is raining.$" - -gText_SandstormIsRaging:: @ 85CC05D - .string "A sandstorm is raging.$" - -gText_BoxIsFull:: @ 85CC074 - .string "The BOX is full!\nYou can’t catch any more!\p$" - -gText_EnigmaBerry:: @ 85CC0A0 - .string "ENIGMA BERRY$" - -gText_BerrySuffix:: @ 85CC0AD - .string " BERRY$" - -gText_PkmnsXCuredParalysis:: @ 85CC0B4 - .string "{STRING 19}’s {STRING 22}\ncured paralysis!$" - -gText_PkmnsXCuredPoison:: @ 85CC0CD - .string "{STRING 19}’s {STRING 22}\ncured poison!$" - -gText_PkmnsXHealedBurn:: @ 85CC0E3 - .string "{STRING 19}’s {STRING 22}\nhealed its burn!$" - -gText_PkmnsXDefrostedIt:: @ 85CC0FC - .string "{STRING 19}’s {STRING 22}\ndefrosted it!$" - -gText_PkmnsXWokeIt:: @ 85CC112 - .string "{STRING 19}’s {STRING 22}\nwoke it from its sleep!$" - -gText_PkmnsXSnappedOut:: @ 85CC132 - .string "{STRING 19}’s {STRING 22}\nsnapped it out of confusion!$" - -gText_PkmnsXCuredProblem:: @ 85CC157 - .string "{STRING 19}’s {STRING 22}\ncured its {STRING 0} problem!$" - -gText_PkmnsXNormalizedStatus:: @ 85CC175 - .string "{STRING 19}’s {STRING 22}\nnormalized its status!$" - -gText_PkmnsXRestoredHealth:: @ 85CC194 - .string "{STRING 19}’s {STRING 22}\nrestored health!$" - -gText_PkmnsXRestoredPP:: @ 85CC1AD - .string "{STRING 19}’s {STRING 22}\nrestored {STRING 0}’s PP!$" - -gText_PkmnsXRestoredStatus:: @ 85CC1C7 - .string "{STRING 19}’s {STRING 22}\nrestored its status!$" - -gText_PkmnsXRestoredHPALittle:: @ 85CC1E4 - .string "{STRING 19}’s {STRING 22}\nrestored its HP a little!$" - -gText_XAllowsOnlyY:: @ 85CC206 - .string "{STRING 22} allows the\nuse of only {STRING 20}!\p$" - -gText_PkmnHungOnWithX:: @ 85CC225 - .string "{STRING 16} hung on\nusing its {STRING 22}!$" - -gText_EmptyString3:: @ 85CC23E - .string "$" - -gText_YouThrowABallNowRight:: @ 85CC23F - .string "You throw a BALL now, right?\nI… I’ll do my best!$" - - .align 2 -gBattleStringsTable:: @ 85CC270 - .4byte gText_Buffer36 - .4byte gText_PkmnGainedEXP - .4byte gText_PkmnGrewToLv - .4byte gText_PkmnLearnedMove - .4byte gText_TryToLearnMove1 - .4byte gText_TryToLearnMove2 - .4byte gText_TryToLearnMove3 - .4byte gText_PkmnForgotMove - .4byte gText_StopLearningMove - .4byte gText_DidNotLearnMove - .4byte gText_PkmnLearnedMove2 - .4byte gText_AttackMissed - .4byte gText_PkmnProtectedItself - .4byte gText_StatsWontIncrease2 - .4byte gText_AvoidedDamage - .4byte gText_ItDoesntAffect - .4byte gText_PkmnFainted - .4byte gText_PkmnFainted2 - .4byte gText_PlayerGotMoney - .4byte gText_PlayerWhiteout - .4byte gText_PlayerWhiteout2 - .4byte gText_PreventsEscape - .4byte gText_HitXTimes - .4byte gText_PkmnFellAsleep - .4byte gText_PkmnMadeSleep - .4byte gText_PkmnAlreadyAsleep - .4byte gText_PkmnAlreadyAsleep2 - .4byte gText_PkmnWasntAffected - .4byte gText_PkmnWasPoisoned - .4byte gText_PkmnPoisonedBy - .4byte gText_PkmnHurtByPoison - .4byte gText_PkmnAlreadyPoisoned - .4byte gText_PkmnBadlyPoisoned - .4byte gText_PkmnEnergyDrained - .4byte gText_PkmnWasBurned - .4byte gText_PkmnBurnedBy - .4byte gText_PkmnHurtByBurn - .4byte gText_PkmnWasFrozen - .4byte gText_PkmnFrozenBy - .4byte gText_PkmnIsFrozen - .4byte gText_PkmnWasDefrosted - .4byte gText_PkmnWasDefrosted2 - .4byte gText_PkmnWasDefrostedBy - .4byte gText_PkmnWasParalyzed - .4byte gText_PkmnWasParalyzedBy - .4byte gText_PkmnIsParalyzed - .4byte gText_PkmnIsAlreadyParalyzed - .4byte gText_PkmnHealedParalysis - .4byte gText_PkmnDreamEaten - .4byte gText_StatsWontIncrease - .4byte gText_StatsWontDecrease - .4byte gText_TeamStoppedWorking - .4byte gText_FoeStoppedWorking - .4byte gText_PkmnIsConfused - .4byte gText_PkmnHealedConfusion - .4byte gText_PkmnWasConfused - .4byte gText_PkmnAlreadyConfused - .4byte gText_PkmnFellInLove - .4byte gText_PkmnInLove - .4byte gText_PkmnImmobilizedByLove - .4byte gText_PkmnBlownAway - .4byte gText_PkmnChangedType - .4byte gText_PkmnFlinched - .4byte gText_PkmnRegainedHealth - .4byte gText_PkmnHPFull - .4byte gText_PkmnRaisedSpDef - .4byte gText_PkmnRaisedDef - .4byte gText_PkmnCoveredByVeil - .4byte gText_PkmnUsedSafeguard - .4byte gText_PkmnSafeguardExpired - .4byte gText_PkmnWentToSleep - .4byte gText_PkmnSleptHealthy - .4byte gText_PkmnWhippedWhirlwind - .4byte gText_PkmnTookSunlight - .4byte gText_PkmnLoweredHead - .4byte gText_PkmnIsGlowing - .4byte gText_PkmnFlewHigh - .4byte gText_PkmnDugHole - .4byte gText_PkmnSqueezedByBind - .4byte gText_PkmnTrappedInVortex - .4byte gText_PkmnWrappedBy - .4byte gText_PkmnClamped - .4byte gText_PkmnHurtBy - .4byte gText_PkmnFreedFrom - .4byte gText_PkmnCrashed - .4byte gText_PkmnShroudedInMist - .4byte gText_PkmnProtectedByMist - .4byte gText_PkmnGettingPumped - .4byte gText_PkmnHitWithRecoil - .4byte gText_PkmnProtectedItself2 - .4byte gText_PkmnBuffetedBySandstorm - .4byte gText_PkmnPeltedByHail - .4byte gText_PkmnSeeded - .4byte gText_PkmnEvadedAttack - .4byte gText_PkmnSappedByLeechSeed - .4byte gText_PkmnFastAsleep - .4byte gText_PkmnWokeUp - .4byte gText_PkmnUproarKeptAwake - .4byte gText_PkmnWokeUpInUproar - .4byte gText_PkmnCausedUproar - .4byte gText_PkmnMakingUproar - .4byte gText_PkmnCalmedDown - .4byte gText_PkmnCantSleepInUproar - .4byte gText_PkmnStockpiled - .4byte gText_PkmnCantStockpile - .4byte gText_PkmnCantSleepInUproar2 - .4byte gText_UproarKeptPkmnAwake - .4byte gText_PkmnStayedAwakeUsing - .4byte gText_PkmnStoringEnergy - .4byte gText_PkmnUnleashedEnergy - .4byte gText_PkmnFatigueConfusion - .4byte gText_PkmnPickedUpItem - .4byte gText_PkmnUnaffected - .4byte gText_PkmnTransformedInto - .4byte gText_PkmnMadeSubstitute - .4byte gText_PkmnHasSubstitute - .4byte gText_SubstituteDamaged - .4byte gText_PkmnSubstituteFaded - .4byte gText_PkmnMustRecharge - .4byte gText_PkmnRageBuilding - .4byte gText_PkmnMoveWasDisabled - .4byte gText_PkmnMoveIsDisabled - .4byte gText_PkmnMoveDisabledNoMore - .4byte gText_PkmnGotEncore - .4byte gText_PkmnEncoreEnded - .4byte gText_PkmnTookAim - .4byte gText_PkmnSketchedMove - .4byte gText_PkmnTryingToTakeFoe - .4byte gText_PkmnTookFoe - .4byte gText_PkmnReducedPP - .4byte gText_PkmnStoleItem - .4byte gText_PkmnCantEscape - .4byte gText_PkmnFellIntoNightmare - .4byte gText_PkmnLockedInNightmare - .4byte gText_PkmnLaidCurse - .4byte gText_PkmnAfflictedByCurse - .4byte gText_SpikesScattered - .4byte gText_PkmnHurtBySpikes - .4byte gText_PkmnIdentified - .4byte gText_PkmnPerishCountFell - .4byte gText_PkmnBracedItself - .4byte gText_PkmnEnduredHit - .4byte gText_MagnitudeStrength - .4byte gText_PkmnCutHPMaxedAttack - .4byte gText_PkmnCopiedStatChanges - .4byte gText_PkmnGotFree - .4byte gText_PkmnShedLeechSeed - .4byte gText_PkmnBlewAwaySpikes - .4byte gText_PkmnFledFromBattle - .4byte gText_PkmnForesawAttack - .4byte gText_PkmnTookAttack - .4byte gText_PkmnAttack - .4byte gText_PkmnCenterAttention - .4byte gText_PkmnChargingPower - .4byte gText_NaturePowerTurnedInto - .4byte gText_PkmnStatusNormal - .4byte gText_PkmnHasNoMovesLeft - .4byte gText_PkmnSubjectedToTorment - .4byte gText_PkmnCantUseMoveTorment - .4byte gText_PkmnTighteningFocus - .4byte gText_PkmnFellForTaunt - .4byte gText_PkmnCantUseMoveTaunt - .4byte gText_PkmnReadyToHelp - .4byte gText_PkmnSwitchedItems - .4byte gText_PkmnCopiedFoe - .4byte gText_PkmnMadeWish - .4byte gText_PkmnWishCameTrue - .4byte gText_PkmnPlantedRoots - .4byte gText_PkmnAbsorbedNutrients - .4byte gText_PkmnAnchoredItself - .4byte gText_PkmnWasMadeDrowsy - .4byte gText_PkmnKnockedOff - .4byte gText_PkmnSwappedAbilities - .4byte gText_PkmnSealedOpponentMove - .4byte gText_PkmnCantUseMoveSealed - .4byte gText_PkmnWantsGrudge - .4byte gText_PkmnLostPPGrudge - .4byte gText_PkmnShroudedItself - .4byte gText_PkmnMoveBounced - .4byte gText_PkmnWaitsForTarget - .4byte gText_PkmnSnatchedMove - .4byte gText_PkmnMadeItRain - .4byte gText_PkmnRaisedSpeed - .4byte gText_PkmnProtectedBy - .4byte gText_PkmnPreventsUsage - .4byte gText_PkmnRestoredHPUsing - .4byte gText_PkmnChangedTypeWith - .4byte gText_PkmnPreventsParalysisWith - .4byte gText_PkmnPreventsRomanceWith - .4byte gText_PkmnPreventsPoisoningWith - .4byte gText_PkmnPreventsConfusionWith - .4byte gText_PkmnRaisedFirePowerWith - .4byte gText_PkmnAnchorsItselfWith - .4byte gText_PkmnCutsAttackWith - .4byte gText_PkmnPreventsStatLossWith - .4byte gText_PkmnHurtsWith - .4byte gText_PkmnTraced - .4byte gText_StatSharply - .4byte gText_StatRose - .4byte gText_StatHarshly - .4byte gText_StatFell - .4byte gText_PkmnsStatChanged - .4byte gText_PkmnsStatChanged2 - .4byte gText_PkmnsStatChanged3 - .4byte gText_PkmnsStatChanged4 - .4byte gText_CriticalHit - .4byte gText_OneHitKO - .4byte gText_123Poof - .4byte gText_AndEllipsis - .4byte gText_NotVeryEffective - .4byte gText_SuperEffective - .4byte gText_GotAwaySafely - .4byte gText_WildPkmnFled - .4byte gText_NoRunningFromTrainers - .4byte gText_CantEscape - .4byte gText_DontLeaveBirch - .4byte gText_ButNothingHappened - .4byte gText_ButItFailed - .4byte gText_ItHurtConfusion - .4byte gText_MirrorMoveFailed - .4byte gText_StartedToRain - .4byte gText_DownpourStarted - .4byte gText_RainContinues - .4byte gText_DownpourContinues - .4byte gText_RainStopped - .4byte gText_SandstormBrewed - .4byte gText_SandstormRages - .4byte gText_SandstormSubsided - .4byte gText_SunlightGotBright - .4byte gText_SunlightStrong - .4byte gText_SunlightFaded - .4byte gText_StartedHail - .4byte gText_HailContinues - .4byte gText_HailStopped - .4byte gText_FailedToSpitUp - .4byte gText_FailedToSwallow - .4byte gText_WindBecameHeatWave - .4byte gText_StatChangesGone - .4byte gText_CoinsScattered - .4byte gText_TooWeakForSubstitute - .4byte gText_SharedPain - .4byte gText_BellChimed - .4byte gText_FaintInThree - .4byte gText_NoPPLeft - .4byte gText_ButNoPPLeft - .4byte gText_XUsedY - .4byte gText_WallyUsedY - .4byte gText_TrainerBlockedBall - .4byte gText_DontBeAThief - .4byte gText_ItDodgedBall - .4byte gText_YouMissedPkmn - .4byte gText_PkmnBrokeFree - .4byte gText_ItAppearedCaught - .4byte gText_AarghAlmostHadIt - .4byte gText_ShootSoClose - .4byte gText_GotchaPkmnCaught - .4byte gText_GotchaPkmnCaught2 - .4byte gText_GiveNicknameCaptured - .4byte gText_PkmnSentToPC - .4byte gText_PkmnDataAddedToDex - .4byte gText_ItIsRaining - .4byte gText_SandstormIsRaging - .4byte gText_CantEscape2 - .4byte gText_PkmnIgnoresAsleep - .4byte gText_PkmnIgnoredOrders - .4byte gText_PkmnBeganToNap - .4byte gText_PkmnLoafing - .4byte gText_PkmnWontObey - .4byte gText_PkmnTurnedAway - .4byte gText_PkmnPretendNotNotice - .4byte gText_EnemyAboutToSwitchPkmn - .4byte gText_CreptCloser - .4byte gText_CantGetCloser - .4byte gText_PkmnWatchingCarefully - .4byte gText_PkmnCuriousAboutX - .4byte gText_PkmnEnthralledByX - .4byte gText_PkmnIgnoredX - .4byte gText_ThrewPokeblockAtPkmn - .4byte gText_OutOfSafariBalls - .4byte gText_PkmnsXCuredParalysis - .4byte gText_PkmnsXCuredPoison - .4byte gText_PkmnsXHealedBurn - .4byte gText_PkmnsXDefrostedIt - .4byte gText_PkmnsXWokeIt - .4byte gText_PkmnsXSnappedOut - .4byte gText_PkmnsXCuredProblem - .4byte gText_PkmnsXRestoredHealth - .4byte gText_PkmnsXRestoredPP - .4byte gText_PkmnsXRestoredStatus - .4byte gText_PkmnsXRestoredHPALittle - .4byte gText_XAllowsOnlyY - .4byte gText_PkmnHungOnWithX - .4byte gText_EmptyString3 - .4byte gText_PkmnsXPreventsBurns - .4byte gText_PkmnsXBlocksY - .4byte gText_PkmnsXRestoredHPALittle2 - .4byte gText_PkmnsXWhippedUpSandstorm - .4byte gText_PkmnsXPreventsYLoss - .4byte gText_PkmnsXInfatuatedY - .4byte gText_PkmnsXMadeYIneffective - .4byte gText_PkmnsXCuredYProblem - .4byte gText_ItSuckedLiquidOoze - .4byte gText_PkmnTransformed - .4byte gText_ElectricityWeakened - .4byte gText_FireWeakened - .4byte gText_PkmnHidUnderwater - .4byte gText_PkmnSprangUp - .4byte gText_HMMovesCantBeForgotten - .4byte gText_XFoundOneY - .4byte gText_PlayerDefeatedXY - .4byte gText_SoothingAroma - .4byte gText_ItemsCantBeUsedNow - .4byte gText_ForXCommaYZ - .4byte gText_UsingXTheYOfZN - .4byte gText_PkmnUsedXToGetPumped - .4byte gText_PkmnsXMadeYUseless - .4byte gText_PkmnTrappedBySandTomb - .4byte gText_EmptyString4 - .4byte gText_ABoosted - .4byte gText_PkmnsXIntensifiedSun - .4byte gText_PkmnMakesGroundMiss - .4byte gText_YouThrowABallNowRight - .4byte gText_PkmnsXTookAttack - .4byte gText_PkmnChoseXAsDestiny - .4byte gText_PkmnLostFocus - .4byte gText_UseNextPkmn - .4byte gText_PkmnFledUsingIts - .4byte gText_PkmnFledUsing - .4byte gText_PkmnWasDraggedOut - .4byte gText_PreventedFromWorking - .4byte gText_PkmnsXNormalizedStatus - .4byte gText_XYUsedZ - .4byte gText_BoxIsFull - .4byte gText_PkmnAvoidedAttack - .4byte gText_PkmnsXMadeItIneffective - .4byte gText_PkmnsXPreventsFlinching - .4byte gText_PkmnAlreadyHasBurn - .4byte gText_StatsWontDecrease2 - .4byte gText_PkmnsXBlocksY2 - .4byte gText_PkmnsXWoreOff - .4byte gText_PkmnRaisedDefALittle - .4byte gText_PkmnRaisedSpDefALittle - .4byte gText_TheWallShattered - .4byte gText_PkmnsXPreventsYsZ - .4byte gText_PkmnsXCuredItsYProblem - .4byte gText_PkmnCantEscape2 - .4byte gText_PkmnObtainedX - .4byte gText_PkmnObtainedX2 - .4byte gText_PkmnObtainedXYObtainedZ - .4byte gText_ButNoEffect - .4byte gText_PkmnsXHadNoEffectOnY - .4byte gText_TwoEnemiesDefeated - .4byte gText_String48 - .4byte gText_PkmnIncapableOfPower - .4byte gText_GlintAppearsInEye - .4byte gText_PkmnGettingIntoPosition - .4byte gText_PkmnBeganGrowlingDeeply - .4byte gText_PkmnEagerForMore - .4byte gText_DefeatedOpponentByReferee - .4byte gText_LostToOpponentByReferee - .4byte gText_TiedOpponentByReferee - .4byte gText_QuestionForfeitMatch - .4byte gText_ForfeitedMatch - .4byte gText_PkmnTransferredSomeonesPC - .4byte gText_PkmnTransferredLanettesPC - .4byte gText_PkmnBoxSomeonesPCFull - .4byte gText_PkmnBoxLanettesPCFull - .4byte gText_String37 - .4byte gText_String49 - - .align 2 -gMissStringIds:: @ 85CC834 - .2byte 0x0017, 0x0018, 0x0159, 0x001a, 0x014c - -gUnknown_085CC83E:: @ 85CC83E - .2byte 0x00e2, 0x00e3, 0x0021 - .2byte 0x0112, 0x0165, 0x00e8, 0x00e9, 0x00e5, 0x00ed, 0x00f0, 0x00f3 - .2byte 0x00ee, 0x00f4, 0x0066, 0x0067, 0x00ef, 0x00f5, 0x00ea, 0x00eb - .2byte 0x00ec, 0x0065, 0x0098, 0x00e5, 0x00e5, 0x004e, 0x0160, 0x004d - .2byte 0x0161, 0x004f, 0x0068, 0x0069, 0x001b, 0x006a, 0x0139, 0x0052 - .2byte 0x0053, 0x0070, 0x0071, 0x0073, 0x0074, 0x006c, 0x006e, 0x00f7 - .2byte 0x004c, 0x0075, 0x0076, 0x0077, 0x00d5, 0x00d6, 0x003d, 0x0130 - .2byte 0x0145, 0x0146, 0x00d7, 0x00d8, 0x003e, 0x0130, 0x0054, 0x0055 - .2byte 0x0056, 0x0057, 0x0058, 0x0059, 0x013d, 0x013e, 0x005a, 0x005c - .2byte 0x005b, 0x005d, 0x005b, 0x0148, 0x0061, 0x00e5, 0x0063, 0x00e5 - .2byte 0x007d, 0x00e5, 0x007e, 0x00fb, 0x0028, 0x0029, 0x0037, 0x0038 - .2byte 0x0023, 0x0024, 0x002e, 0x002f, 0x0031, 0x0032, 0x0035, 0x0036 - .2byte 0x0017, 0x007c, 0x0045, 0x0136, 0x002d, 0x0139, 0x013b, 0x013c - .2byte 0x00fd, 0x00fd, 0x00fd, 0x00fd, 0x0142, 0x00a1, 0x014f, 0x0107 - .2byte 0x0108, 0x0109, 0x010a, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110 - .2byte 0x0110, 0x0110, 0x0110, 0x0111, 0x0110, 0x0110, 0x0110, 0x00f1 - .2byte 0x0110, 0x0110, 0x0110, 0x0116, 0x0117, 0x0118, 0x0119, 0x016d - .2byte 0x011b, 0x011c, 0x011e, 0x011f, 0x0120, 0x0128, 0x0123, 0x0126 - .2byte 0x0125, 0x0124, 0x0127, 0x0129, 0x0156, 0x0131, 0x0163, 0x016a - .2byte 0x00c7, 0x0163, 0x016a, 0x00c9, 0x0163, 0x016a, 0x0166, 0x0167 - .2byte 0x0168, 0x00cb, 0x0137, 0x0177, 0x0178, 0x0179, 0x017a - -gTrappingMoves:: @ 85CC982 - .2byte MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, 0xffff - -gText_PkmnIsEvolving:: @ 85CC990 - .string "What?\n{STR_VAR_1} is evolving!$" - -gText_CongratsPkmnEvolved:: @ 85CC9A6 - .string "Congratulations! Your {STR_VAR_1}\nevolved into {STR_VAR_2}!{UNKNOWN_A}\p$" - -gText_PkmnStoppedEvolving:: @ 85CC9D3 - .string "Huh? {STR_VAR_1}\nstopped evolving!\p$" - -gText_EllipsisQuestionMark:: @ 85CC9EE - .string "……?\p$" - -gText_WhatWillPkmnDo:: @ 85CC9F3 - .string "What will\n{STRING 18} do?$" - -gText_WhatWillPkmnDo2:: @ 85CCA04 - .string "What will\n{STRING 35} do?$" - -gText_WhatWillWallyDo:: @ 85CCA15 - .string "What will\nWALLY do?$" - -gText_LinkStandby:: @ 85CCA29 - .string "{PAUSE 16}Link standby…$" - -gText_BattleMenu:: @ 85CCA3A - .string "FIGHT{CLEAR_TO 56}BAG\nPOKéMON{CLEAR_TO 56}RUN$" - -gText_SafariZoneMenu:: @ 85CCA54 - .string "BALL{CLEAR_TO 56}{POKEBLOCK}\nGO NEAR{CLEAR_TO 56}RUN$" - -gText_MoveInterfacePP:: @ 85CCA6F - .string "PP $" - -gText_MoveInterfaceType:: @ 85CCA73 - .string "TYPE/$" - - .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}PP\nTYPE/$" - .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}$" - .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Which move should\nbe forgotten?$" - -gText_BattleYesNoChoice:: @ 85CCABB - .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Yes\nNo$" - -gText_BattleSwitchWhich:: @ 85CCACA - .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Switch\nwhich?$" - - .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}$" - .string "{UP_ARROW}$" - .string "{ESCAPE 4}$" - .string "-$" - -gText_HP:: @ 85CCAF1 - .string "HP$" - -gText_Attack:: @ 85CCAF4 - .string "ATTACK$" - -gText_Defense:: @ 85CCAFB - .string "DEFENSE$" - -gText_SpAtk:: @ 85CCB03 - .string "SP. ATK$" - -gText_SpDef:: @ 85CCB0B - .string "SP. DEF$" - - .align 2 - .4byte gText_HP - .4byte gText_SpAtk - .4byte gText_Attack - .4byte gText_SpDef - .4byte gText_Defense - .4byte gText_Speed - -gText_SafariBalls:: @ 85CCB2C - .string "{HIGHLIGHT DARK_GREY}SAFARI BALLS$" - -gText_SafariBallLeft:: @ 85CCB3C - .string "{HIGHLIGHT DARK_GREY}Left: $" - .string "{HIGHLIGHT DARK_GREY}$" -gText_Sleep:: - .string "sleep$" -gText_Poison:: - .string "poison$" -gText_Burn:: - .string "burn$" -gText_Paralysis:: - .string "paralysis$" -gText_Ice:: - .string "ice$" -gText_Confusion:: - .string "confusion$" -gText_Love:: - .string "love$" - -gText_SpaceAndSpace:: @ 85CCB79 - .string " and $" - -gText_CommaSpace:: @ 85CCB7F - .string ", $" - -gText_Space2:: @ 85CCB82 - .string " $" - -gText_ScrollTextUp:: @ 85CCB84 - .string "\l$" - -gText_NewLine:: @ 85CCB86 - .string "\n$" - -gText_Are:: @ 85CCB88 - .string "are$" - -gText_Are2:: @ 85CCB8C - .string "are$" - -gText_BadEgg:: @ 85CCB90 - .string "Bad EGG$" - -gText_BattleWallyName:: @ 85CCB98 - .string "WALLY$" - -gText_Win:: @ 85CCB9E - .string "{HIGHLIGHT TRANSPARENT}Win$" - -gText_Loss:: @ 85CCBA5 - .string "{HIGHLIGHT TRANSPARENT}Loss$" - -gText_Draw:: @ 85CCBAD - .string "{HIGHLIGHT TRANSPARENT}Draw$" - -gText_SpaceIs:: @ 85CCBB5 - .string " is$" - -gText_ApostropheS:: @ 85CCBB9 - .string "’s$" - -gText_UnknownMoveTypes:: @ 85CCBBC - .string "a NORMAL move$ " - .string "a FIGHTING move$ " - .string "a FLYING move$ " - .string "a POISON move$ " - .string "a GROUND move$ " - .string "a ROCK move$ " - .string "a BUG move$ " - .string "a GHOST move$ " - .string "a STEEL move$ " - .string "a ??? move$ " - .string "a FIRE move$ " - .string "a WATER move$ " - .string "a GRASS move$ " - .string "an ELECTRIC move$" - .string "a PSYCHIC move$ " - .string "an ICE move$ " - .string "a DRAGON move$ " - .string "a DARK move$ " - -gText_BattleTourney:: @ 85CCCEE - .string "BATTLE TOURNEY$" - -gText_Round1:: @ 85CCCFD - .string "Round 1$" - -gText_Round2:: @ 85CCD05 - .string "Round 2$" - -gText_Semifinal:: @ 85CCC0D - .string "Semifinal$" - -gText_Final:: @ 85CCD17 - .string "Final$" - - .align 2 -gRoundsStringTable:: @ 85CCD20 - .4byte gText_Round1 - .4byte gText_Round2 - .4byte gText_Semifinal - .4byte gText_Final - - .string "The great new hope!\p$" - .string "Will the championship dream come true?!\p$" - .string "A former CHAMPION!\p$" - .string "The previous CHAMPION!\p$" - .string "The unbeaten CHAMPION!\p$" - -gText_JapaneseHonorific:: @ 85CCDB2 - .string "{KUN}$" - -gText_Vs:: @ 85CCDB5 - .string "VS$" - -gText_RivalBuffer:: @ 85CCDB8 - .string "{RIVAL}$" - -gText_Mind:: @ 85CCDBB - .string "Mind$" - -gText_Skill:: @ 85CCDC0 - .string "Skill$" - -gText_Body:: @ 85CCDC6 - .string "Body$" - -gText_Judgement:: @ 85CCDCB - .string "{STRING 0}{CLEAR 13}Judgment{CLEAR 13}{PLAYER}$" - -gText_TwoTrainersSentPkmn:: @ 85CCDDE - .string "{STRING 28} {STRING 29} sent\nout {RIVAL}!\p{STRING 46} {STRING 47} sent\nout {AQUA}!$" - -gText_TrainerXYSentOutPkmn3:: @ 85CCE04 - .string "{STRING 46} {STRING 47} sent\nout {STRING 0}!$" - -gText_TwoTrainersWantToBattle2:: @ 85CCE17 - .string "{STRING 28} {STRING 29} and\n{STRING 46} {STRING 47}\lwant to battle!\p$" - -gText_TrainerXYSentOutZGoN:: @ 85CCE38 - .string "{STRING 50} {STRING 51} sent\nout {VERSION}!\lGo, {STRING 5}!$" - -gText_TwoEnemiesDefeated:: @ 85CCE53 - .string "{STRING 28} {STRING 29} and\n{STRING 46} {STRING 47}\lwere defeated!\p$" - -gText_String48:: @ 85CCE73 - .string "{STRING 48}$" - -gText_PkmnIncapableOfPower:: @ 85CCE76 - .string "{STRING 15} appears incapable\nof using its power!$" - -gText_GlintAppearsInEye:: @ 85CCE9F - .string "A glint appears in\n{STRING 19}’s eyes!$" - -gText_PkmnGettingIntoPosition:: @ 85CCEBD - .string "{STRING 19} is getting into\nposition!$" - -gText_PkmnBeganGrowlingDeeply:: @ 85CCEDA - .string "{STRING 19} began growling deeply!$" - -gText_PkmnEagerForMore:: @ 85CCEF4 - .string "{STRING 19} is eager for more!$" - -gUnknown_085CCF0A:: @ 85CCF0A - .2byte 0x016E, 0x016F, 0x0170, 0x0171 - -gText_RefIfNothingIsDecided:: @ 85CCF12 - .string "REFEREE: If nothing is decided in\n3 turns, we will go to judging!$" - -gText_RefThatsIt:: @ 85CCF54 - .string "REFEREE: That’s it! We will now go to\njudging to determine the winner!$" - -gText_RefJudgeMind:: @ 85CCF9B - .string "REFEREE: Judging category 1, Mind!\nThe POKéMON showing the most guts!\p$" - -gText_RefJudgeSkill:: @ 85CCFE2 - .string "REFEREE: Judging category 2, Skill!\nThe POKéMON using moves the best!\p$" - -gText_RefJudgeBody:: @ 85CD029 - .string "REFEREE: Judging category 3, Body!\nThe POKéMON with the most vitality!\p$" - -gText_RefJudgement1:: @ 85CD071 - .string "REFEREE: Judgment: {STRING 0} to {PLAYER}!\nThe winner is {STRING 35}’s {STRING 5}!\p$" - -gText_RefJudgement2:: @ 85CD0A6 - .string "REFEREE: Judgment: {STRING 0} to {PLAYER}!\nThe winner is {STRING 29}’s {RIVAL}!\p$" - -gText_RefJudgement3:: @ 85CD0DB - .string "REFEREE: Judgment: 3 to 3!\nWe have a draw!\p$" - -gText_DefeatedOpponentByReferee:: @ 85CD107 - .string "{STRING 5} defeated the opponent\n{RIVAL} in a REFEREE’s decision!$" - -gText_LostToOpponentByReferee:: @ 85CD13C - .string "{STRING 5} lost to the opponent\n{RIVAL} in a REFEREE’s decision!$" - -gText_TiedOpponentByReferee:: @ 85CD170 - .string "{STRING 5} tied the opponent\n{RIVAL} in a REFEREE’s decision!$" - -gText_RefCommenceBattle:: @ 85CD1A1 - .string "REFEREE: {STRING 5} VS {RIVAL}!\nCommence battling!$" - - .align 2 -gRefereeStringsTable:: @ 85CD1C8 - .4byte gText_RefIfNothingIsDecided - .4byte gText_RefThatsIt - .4byte gText_RefJudgeMind - .4byte gText_RefJudgeSkill - .4byte gText_RefJudgeBody - .4byte gText_RefJudgement1 - .4byte gText_RefJudgement2 - .4byte gText_RefJudgement3 - .4byte gText_RefCommenceBattle - -gText_QuestionForfeitMatch:: @ 85CD1EC - .string "Would you like to forfeit the match\nand quit now?$" - -gText_ForfeitedMatch:: @ 85CD21E - .string "{STRING 35} forfeited the match!$" - -gText_String37:: @ 85CD236 - .string "{STRING 37}$" - -gText_String49:: @ 85CD239 - .string "{STRING 49}$" - - .string "{PLAY_SE 0x0011}{STRING 28} {STRING 29} fled!$" - -gText_PlayerLostAgainst2:: @ 85CD24C - .string "Player lost against\n{STRING 28} {STRING 29}!$" - -gText_PlayerBattledToDraw2:: @ 85CD267 - .string "Player battled to a draw against\n{STRING 28} {STRING 29}!$" - -gText_RecordBattleToPass:: @ 85CD28F - .string "Would you like to record your battle\non your FRONTIER PASS?$" - -gText_BattleRecordedOnPass:: @ 85CD2CB - .string "{STRING 35}’s battle result was recorded\non the FRONTIER PASS.$" - -gText_TrainerWantsToBattle:: @ 85CD301 - .string "{STRING 32}\nwants to battle!{PAUSE 49}$" - -gText_TwoTrainersWantToBattle3:: @ 85CD318 - .string "{STRING 32} and {STRING 33}\nwant to battle!{PAUSE 49}$" - - .align 1 -gUnknown_085CD336:: @ 85CD336 - .2byte 0x000e, 0x0046, 0x004a, 0x006a, 0x006b, 0x006c, 0x006e, 0x006f - .2byte 0x0079, 0x007b, 0x007d, 0x0094, 0x0096, 0x0097, 0x009b, 0x009c - .2byte 0x009f, 0x00a4, 0x00aa, 0x00ad, 0x00b6, 0x00bf, 0x00cb, 0x00cd - .2byte 0x00cf, 0x00d6, 0x00ed, 0x00f4, 0x00f5, 0x010a, 0x010f, 0x0112 - .2byte 0x0113, 0x011a, 0x0125, 0x0136, 0x013c, 0x0140, 0x0149, 0x014a - .2byte 0x014e, 0x0154, 0x0000, 0x0064, 0x0069, 0x0075, 0x0085, 0x00af - .2byte 0x010d, 0x0153, 0x0000, 0x0060, 0x0061, 0x0066, 0x0068, 0x008c - .2byte 0x0090, 0x00a5, 0x00b8, 0x010c, 0x0111, 0x0118, 0x0119, 0x0129 - .2byte 0x012a, 0x012c, 0x0139, 0x015a, 0x015b, 0x0000, 0x0001, 0x000a - .2byte 0x000b, 0x0011, 0x0013, 0x0014, 0x0015, 0x001e, 0x0023, 0x0025 - .2byte 0x0027, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, 0x0040, 0x0047 - .2byte 0x0051, 0x0059, 0x005a, 0x005b, 0x005c, 0x0067, 0x0076, 0x007a - .2byte 0x0080, 0x0084, 0x008b, 0x0091, 0x00a3, 0x00a9, 0x00ab, 0x00ae - .2byte 0x00c1, 0x00cc, 0x00d5, 0x00f9, 0x00fd, 0x00ff, 0x0100, 0x0103 - .2byte 0x0104, 0x0110, 0x011b, 0x0141, 0x0157, 0x0000 - -gUnknown_085CD422:: @ 85CD422 - .byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - - .align 2 -gUnknown_085CD42C:: @ 85CD42C - .2byte 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101 - .2byte 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 - .2byte 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100 - .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000 - .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102 - .2byte 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 - .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100 - .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100 - .2byte 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000 - .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff - .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000 - .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x01ff - .2byte 0x0000, 0x0100, 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100 - .2byte 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100, 0x0600, 0x0000 - - .align 2 -gUnknown_085CD54C:: @ 85C54C - .2byte 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101 - .2byte 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 - .2byte 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100 - .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000 - .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102 - .2byte 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 - .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100 - .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100 - .2byte 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0100, 0x0f0e, 0x0000 - .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff - .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00 - .2byte 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000 - .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff - .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0111, 0x0100, 0x0000, 0x0201 - .2byte 0x0301, 0x0000 - - .align 2 -gUnknown_085CD660:: @ 85CD660 - .4byte gUnknown_085CD42C - .4byte gUnknown_085CD54C - - .align 2 -gUnknown_085CD668:: @ 85CD668 - .byte 0x08, 0x04, 0x01, 0x00 diff --git a/include/battle.h b/include/battle.h index d41702396..bb61c7043 100644 --- a/include/battle.h +++ b/include/battle.h @@ -604,7 +604,7 @@ struct BattleStruct u8 field_8B; u8 field_8C; u8 field_8D; - u8 field_8E; + u8 stringMoveType; u8 expGetterBank; u8 field_90; u8 field_91; diff --git a/include/battle_message.h b/include/battle_message.h index 3bc7117bb..1884c9e37 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -206,11 +206,19 @@ u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src); u32 BattleStringExpandPlaceholders(const u8* src, u8* dst); void sub_814F9EC(const u8* text, u8 arg1); -extern u8 gBattleTextBuff1[]; -extern u8 gBattleTextBuff2[]; -extern u8 gBattleTextBuff3[]; -extern u8 gDisplayedStringBattle[]; +#define TEXT_BUFF_ARRAY_COUNT 16 +extern u8 gDisplayedStringBattle[300]; +extern u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT]; +extern u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT]; +extern u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT]; + +extern const u8* const gStatNamesTable[]; +extern const u8* const gPokeblockWasTooXStringTable[]; extern const u8* const gRefereeStringsTable[]; +extern const u8* const gStatNamesTable2[]; + +extern const u16 gMissStringIds[]; +extern const u16 gTrappingMoves[]; #endif // GUARD_BATTLE_MESSAGE_H diff --git a/include/battle_string_ids.h b/include/battle_string_ids.h new file mode 100644 index 000000000..546cb2e46 --- /dev/null +++ b/include/battle_string_ids.h @@ -0,0 +1,385 @@ +#ifndef GUARD_BATTLE_STRING_IDS_H +#define GUARD_BATTLE_STRING_IDS_H + +#define BATTLESTRINGS_COUNT 369 + +#define BATTLESTRINGS_ID_ADDER 12 // all battlestrings have its ID + 12, because first 5 are reserved + +#define STRINGID_INTROMSG 0 +#define STRINGID_INTROSENDOUT 1 +#define STRINGID_RETURNMON 2 +#define STRINGID_SWITCHINMON 3 +#define STRINGID_USEDMOVE 4 +#define STRINGID_BATTLEEND 5 + +#define STRINGID_TRAINER1LOSETEXT 12 +#define STRINGID_PKMNGAINEDEXP 13 +#define STRINGID_PKMNGREWTOLV 14 +#define STRINGID_PKMNLEARNEDMOVE 15 +#define STRINGID_TRYTOLEARNMOVE1 16 +#define STRINGID_TRYTOLEARNMOVE2 17 +#define STRINGID_TRYTOLEARNMOVE3 18 +#define STRINGID_PKMNFORGOTMOVE 19 +#define STRINGID_STOPLEARNINGMOVE 20 +#define STRINGID_DIDNOTLEARNMOVE 21 +#define STRINGID_PKMNLEARNEDMOVE2 22 +#define STRINGID_ATTACKMISSED 23 +#define STRINGID_PKMNPROTECTEDITSELF 24 +#define STRINGID_STATSWONTINCREASE2 25 +#define STRINGID_AVOIDEDDAMAGE 26 +#define STRINGID_ITDOESNTAFFECT 27 +#define STRINGID_PKMNFAINTED 28 +#define STRINGID_PKMNFAINTED2 29 +#define STRINGID_PLAYERGOTMONEY 30 +#define STRINGID_PLAYERWHITEOUT 31 +#define STRINGID_PLAYERWHITEOUT2 32 +#define STRINGID_PREVENTSESCAPE 33 +#define STRINGID_HITXTIMES 34 +#define STRINGID_PKMNFELLASLEEP 35 +#define STRINGID_PKMNMADESLEEP 36 +#define STRINGID_PKMNALREADYASLEEP 37 +#define STRINGID_PKMNALREADYASLEEP2 38 +#define STRINGID_PKMNWASNTAFFECTED 39 +#define STRINGID_PKMNWASPOISONED 40 +#define STRINGID_PKMNPOISONEDBY 41 +#define STRINGID_PKMNHURTBYPOISON 42 +#define STRINGID_PKMNALREADYPOISONED 43 +#define STRINGID_PKMNBADLYPOISONED 44 +#define STRINGID_PKMNENERGYDRAINED 45 +#define STRINGID_PKMNWASBURNED 46 +#define STRINGID_PKMNBURNEDBY 47 +#define STRINGID_PKMNHURTBYBURN 48 +#define STRINGID_PKMNWASFROZEN 49 +#define STRINGID_PKMNFROZENBY 50 +#define STRINGID_PKMNISFROZEN 51 +#define STRINGID_PKMNWASDEFROSTED 52 +#define STRINGID_PKMNWASDEFROSTED2 53 +#define STRINGID_PKMNWASDEFROSTEDBY 54 +#define STRINGID_PKMNWASPARALYZED 55 +#define STRINGID_PKMNWASPARALYZEDBY 56 +#define STRINGID_PKMNISPARALYZED 57 +#define STRINGID_PKMNISALREADYPARALYZED 58 +#define STRINGID_PKMNHEALEDPARALYSIS 59 +#define STRINGID_PKMNDREAMEATEN 60 +#define STRINGID_STATSWONTINCREASE 61 +#define STRINGID_STATSWONTDECREASE 62 +#define STRINGID_TEAMSTOPPEDWORKING 63 +#define STRINGID_FOESTOPPEDWORKING 64 +#define STRINGID_PKMNISCONFUSED 65 +#define STRINGID_PKMNHEALEDCONFUSION 66 +#define STRINGID_PKMNWASCONFUSED 67 +#define STRINGID_PKMNALREADYCONFUSED 68 +#define STRINGID_PKMNFELLINLOVE 69 +#define STRINGID_PKMNINLOVE 70 +#define STRINGID_PKMNIMMOBILIZEDBYLOVE 71 +#define STRINGID_PKMNBLOWNAWAY 72 +#define STRINGID_PKMNCHANGEDTYPE 73 +#define STRINGID_PKMNFLINCHED 74 +#define STRINGID_PKMNREGAINEDHEALTH 75 +#define STRINGID_PKMNHPFULL 76 +#define STRINGID_PKMNRAISEDSPDEF 77 +#define STRINGID_PKMNRAISEDDEF 78 +#define STRINGID_PKMNCOVEREDBYVEIL 79 +#define STRINGID_PKMNUSEDSAFEGUARD 80 +#define STRINGID_PKMNSAFEGUARDEXPIRED 81 +#define STRINGID_PKMNWENTTOSLEEP 82 +#define STRINGID_PKMNSLEPTHEALTHY 83 +#define STRINGID_PKMNWHIPPEDWHIRLWIND 84 +#define STRINGID_PKMNTOOKSUNLIGHT 85 +#define STRINGID_PKMNLOWEREDHEAD 86 +#define STRINGID_PKMNISGLOWING 87 +#define STRINGID_PKMNFLEWHIGH 88 +#define STRINGID_PKMNDUGHOLE 89 +#define STRINGID_PKMNSQUEEZEDBYBIND 90 +#define STRINGID_PKMNTRAPPEDINVORTEX 91 +#define STRINGID_PKMNWRAPPEDBY 92 +#define STRINGID_PKMNCLAMPED 93 +#define STRINGID_PKMNHURTBY 94 +#define STRINGID_PKMNFREEDFROM 95 +#define STRINGID_PKMNCRASHED 96 +#define STRINGID_PKMNSHROUDEDINMIST 97 +#define STRINGID_PKMNPROTECTEDBYMIST 98 +#define STRINGID_PKMNGETTINGPUMPED 99 +#define STRINGID_PKMNHITWITHRECOIL 100 +#define STRINGID_PKMNPROTECTEDITSELF2 101 +#define STRINGID_PKMNBUFFETEDBYSANDSTORM 102 +#define STRINGID_PKMNPELTEDBYHAIL 103 +#define STRINGID_PKMNSEEDED 104 +#define STRINGID_PKMNEVADEDATTACK 105 +#define STRINGID_PKMNSAPPEDBYLEECHSEED 106 +#define STRINGID_PKMNFASTASLEEP 107 +#define STRINGID_PKMNWOKEUP 108 +#define STRINGID_PKMNUPROARKEPTAWAKE 109 +#define STRINGID_PKMNWOKEUPINUPROAR 110 +#define STRINGID_PKMNCAUSEDUPROAR 111 +#define STRINGID_PKMNMAKINGUPROAR 112 +#define STRINGID_PKMNCALMEDDOWN 113 +#define STRINGID_PKMNCANTSLEEPINUPROAR 114 +#define STRINGID_PKMNSTOCKPILED 115 +#define STRINGID_PKMNCANTSTOCKPILE 116 +#define STRINGID_PKMNCANTSLEEPINUPROAR2 117 +#define STRINGID_UPROARKEPTPKMNAWAKE 118 +#define STRINGID_PKMNSTAYEDAWAKEUSING 119 +#define STRINGID_PKMNSTORINGENERGY 120 +#define STRINGID_PKMNUNLEASHEDENERGY 121 +#define STRINGID_PKMNFATIGUECONFUSION 122 +#define STRINGID_PKMNPICKEDUPITEM 123 +#define STRINGID_PKMNUNAFFECTED 124 +#define STRINGID_PKMNTRANSFORMEDINTO 125 +#define STRINGID_PKMNMADESUBSTITUTE 126 +#define STRINGID_PKMNHASSUBSTITUTE 127 +#define STRINGID_SUBSTITUTEDAMAGED 128 +#define STRINGID_PKMNSUBSTITUTEFADED 129 +#define STRINGID_PKMNMUSTRECHARGE 130 +#define STRINGID_PKMNRAGEBUILDING 131 +#define STRINGID_PKMNMOVEWASDISABLED 132 +#define STRINGID_PKMNMOVEISDISABLED 133 +#define STRINGID_PKMNMOVEDISABLEDNOMORE 134 +#define STRINGID_PKMNGOTENCORE 135 +#define STRINGID_PKMNENCOREENDED 136 +#define STRINGID_PKMNTOOKAIM 137 +#define STRINGID_PKMNSKETCHEDMOVE 138 +#define STRINGID_PKMNTRYINGTOTAKEFOE 139 +#define STRINGID_PKMNTOOKFOE 140 +#define STRINGID_PKMNREDUCEDPP 141 +#define STRINGID_PKMNSTOLEITEM 142 +#define STRINGID_PKMNCANTESCAPE 143 +#define STRINGID_PKMNFELLINTONIGHTMARE 144 +#define STRINGID_PKMNLOCKEDINNIGHTMARE 145 +#define STRINGID_PKMNLAIDCURSE 146 +#define STRINGID_PKMNAFFLICTEDBYCURSE 147 +#define STRINGID_SPIKESSCATTERED 148 +#define STRINGID_PKMNHURTBYSPIKES 149 +#define STRINGID_PKMNIDENTIFIED 150 +#define STRINGID_PKMNPERISHCOUNTFELL 151 +#define STRINGID_PKMNBRACEDITSELF 152 +#define STRINGID_PKMNENDUREDHIT 153 +#define STRINGID_MAGNITUDESTRENGTH 154 +#define STRINGID_PKMNCUTHPMAXEDATTACK 155 +#define STRINGID_PKMNCOPIEDSTATCHANGES 156 +#define STRINGID_PKMNGOTFREE 157 +#define STRINGID_PKMNSHEDLEECHSEED 158 +#define STRINGID_PKMNBLEWAWAYSPIKES 159 +#define STRINGID_PKMNFLEDFROMBATTLE 160 +#define STRINGID_PKMNFORESAWATTACK 161 +#define STRINGID_PKMNTOOKATTACK 162 +#define STRINGID_PKMNATTACK 163 +#define STRINGID_PKMNCENTERATTENTION 164 +#define STRINGID_PKMNCHARGINGPOWER 165 +#define STRINGID_NATUREPOWERTURNEDINTO 166 +#define STRINGID_PKMNSTATUSNORMAL 167 +#define STRINGID_PKMNHASNOMOVESLEFT 168 +#define STRINGID_PKMNSUBJECTEDTOTORMENT 169 +#define STRINGID_PKMNCANTUSEMOVETORMENT 170 +#define STRINGID_PKMNTIGHTENINGFOCUS 171 +#define STRINGID_PKMNFELLFORTAUNT 172 +#define STRINGID_PKMNCANTUSEMOVETAUNT 173 +#define STRINGID_PKMNREADYTOHELP 174 +#define STRINGID_PKMNSWITCHEDITEMS 175 +#define STRINGID_PKMNCOPIEDFOE 176 +#define STRINGID_PKMNMADEWISH 177 +#define STRINGID_PKMNWISHCAMETRUE 178 +#define STRINGID_PKMNPLANTEDROOTS 179 +#define STRINGID_PKMNABSORBEDNUTRIENTS 180 +#define STRINGID_PKMNANCHOREDITSELF 181 +#define STRINGID_PKMNWASMADEDROWSY 182 +#define STRINGID_PKMNKNOCKEDOFF 183 +#define STRINGID_PKMNSWAPPEDABILITIES 184 +#define STRINGID_PKMNSEALEDOPPONENTMOVE 185 +#define STRINGID_PKMNCANTUSEMOVESEALED 186 +#define STRINGID_PKMNWANTSGRUDGE 187 +#define STRINGID_PKMNLOSTPPGRUDGE 188 +#define STRINGID_PKMNSHROUDEDITSELF 189 +#define STRINGID_PKMNMOVEBOUNCED 190 +#define STRINGID_PKMNWAITSFORTARGET 191 +#define STRINGID_PKMNSNATCHEDMOVE 192 +#define STRINGID_PKMNMADEITRAIN 193 +#define STRINGID_PKMNRAISEDSPEED 194 +#define STRINGID_PKMNPROTECTEDBY 195 +#define STRINGID_PKMNPREVENTSUSAGE 196 +#define STRINGID_PKMNRESTOREDHPUSING 197 +#define STRINGID_PKMNCHANGEDTYPEWITH 198 +#define STRINGID_PKMNPREVENTSPARALYSISWITH 199 +#define STRINGID_PKMNPREVENTSROMANCEWITH 200 +#define STRINGID_PKMNPREVENTSPOISONINGWITH 201 +#define STRINGID_PKMNPREVENTSCONFUSIONWITH 202 +#define STRINGID_PKMNRAISEDFIREPOWERWITH 203 +#define STRINGID_PKMNANCHORSITSELFWITH 204 +#define STRINGID_PKMNCUTSATTACKWITH 205 +#define STRINGID_PKMNPREVENTSSTATLOSSWITH 206 +#define STRINGID_PKMNHURTSWITH 207 +#define STRINGID_PKMNTRACED 208 +#define STRINGID_STATSHARPLY 209 +#define STRINGID_STATROSE 210 +#define STRINGID_STATHARSHLY 211 +#define STRINGID_STATFELL 212 +#define STRINGID_PKMNSSTATCHANGED 213 +#define STRINGID_PKMNSSTATCHANGED2 214 +#define STRINGID_PKMNSSTATCHANGED3 215 +#define STRINGID_PKMNSSTATCHANGED4 216 +#define STRINGID_CRITICALHIT 217 +#define STRINGID_ONEHITKO 218 +#define STRINGID_123POOF 219 +#define STRINGID_ANDELLIPSIS 220 +#define STRINGID_NOTVERYEFFECTIVE 221 +#define STRINGID_SUPEREFFECTIVE 222 +#define STRINGID_GOTAWAYSAFELY 223 +#define STRINGID_WILDPKMNFLED 224 +#define STRINGID_NORUNNINGFROMTRAINERS 225 +#define STRINGID_CANTESCAPE 226 +#define STRINGID_DONTLEAVEBIRCH 227 +#define STRINGID_BUTNOTHINGHAPPENED 228 +#define STRINGID_BUTITFAILED 229 +#define STRINGID_ITHURTCONFUSION 230 +#define STRINGID_MIRRORMOVEFAILED 231 +#define STRINGID_STARTEDTORAIN 232 +#define STRINGID_DOWNPOURSTARTED 233 +#define STRINGID_RAINCONTINUES 234 +#define STRINGID_DOWNPOURCONTINUES 235 +#define STRINGID_RAINSTOPPED 236 +#define STRINGID_SANDSTORMBREWED 237 +#define STRINGID_SANDSTORMRAGES 238 +#define STRINGID_SANDSTORMSUBSIDED 239 +#define STRINGID_SUNLIGHTGOTBRIGHT 240 +#define STRINGID_SUNLIGHTSTRONG 241 +#define STRINGID_SUNLIGHTFADED 242 +#define STRINGID_STARTEDHAIL 243 +#define STRINGID_HAILCONTINUES 244 +#define STRINGID_HAILSTOPPED 245 +#define STRINGID_FAILEDTOSPITUP 246 +#define STRINGID_FAILEDTOSWALLOW 247 +#define STRINGID_WINDBECAMEHEATWAVE 248 +#define STRINGID_STATCHANGESGONE 249 +#define STRINGID_COINSSCATTERED 250 +#define STRINGID_TOOWEAKFORSUBSTITUTE 251 +#define STRINGID_SHAREDPAIN 252 +#define STRINGID_BELLCHIMED 253 +#define STRINGID_FAINTINTHREE 254 +#define STRINGID_NOPPLEFT 255 +#define STRINGID_BUTNOPPLEFT 256 +#define STRINGID_PLAYERUSEDITEM 257 +#define STRINGID_WALLYUSEDITEM 258 +#define STRINGID_TRAINERBLOCKEDBALL 259 +#define STRINGID_DONTBEATHIEF 260 +#define STRINGID_ITDODGEDBALL 261 +#define STRINGID_YOUMISSEDPKMN 262 +#define STRINGID_PKMNBROKEFREE 263 +#define STRINGID_ITAPPEAREDCAUGHT 264 +#define STRINGID_AARGHALMOSTHADIT 265 +#define STRINGID_SHOOTSOCLOSE 266 +#define STRINGID_GOTCHAPKMNCAUGHT 267 +#define STRINGID_GOTCHAPKMNCAUGHT2 268 +#define STRINGID_GIVENICKNAMECAPTURED 269 +#define STRINGID_PKMNSENTTOPC 270 +#define STRINGID_PKMNDATAADDEDTODEX 271 +#define STRINGID_ITISRAINING 272 +#define STRINGID_SANDSTORMISRAGING 273 +#define STRINGID_CANTESCAPE2 274 +#define STRINGID_PKMNIGNORESASLEEP 275 +#define STRINGID_PKMNIGNOREDORDERS 276 +#define STRINGID_PKMNBEGANTONAP 277 +#define STRINGID_PKMNLOAFING 278 +#define STRINGID_PKMNWONTOBEY 279 +#define STRINGID_PKMNTURNEDAWAY 280 +#define STRINGID_PKMNPRETENDNOTNOTICE 281 +#define STRINGID_ENEMYABOUTTOSWITCHPKMN 282 +#define STRINGID_CREPTCLOSER 283 +#define STRINGID_CANTGETCLOSER 284 +#define STRINGID_PKMNWATCHINGCAREFULLY 285 +#define STRINGID_PKMNCURIOUSABOUTX 286 +#define STRINGID_PKMNENTHRALLEDBYX 287 +#define STRINGID_PKMNIGNOREDX 288 +#define STRINGID_THREWPOKEBLOCKATPKMN 289 +#define STRINGID_OUTOFSAFARIBALLS 290 +#define STRINGID_PKMNSITEMCUREDPARALYSIS 291 +#define STRINGID_PKMNSITEMCUREDPOISON 292 +#define STRINGID_PKMNSITEMHEALEDBURN 293 +#define STRINGID_PKMNSITEMDEFROSTEDIT 294 +#define STRINGID_PKMNSITEMWOKEIT 295 +#define STRINGID_PKMNSITEMSNAPPEDOUT 296 +#define STRINGID_PKMNSITEMCUREDPROBLEM 297 +#define STRINGID_PKMNSITEMRESTOREDHEALTH 298 +#define STRINGID_PKMNSITEMRESTOREDPP 299 +#define STRINGID_PKMNSITEMRESTOREDSTATUS 300 +#define STRINGID_PKMNSITEMRESTOREDHPALITTLE 301 +#define STRINGID_ITEMALLOWSONLYYMOVE 302 +#define STRINGID_PKMNHUNGONWITHX 303 +#define STRINGID_EMPTYSTRING3 304 +#define STRINGID_PKMNSXPREVENTSBURNS 305 +#define STRINGID_PKMNSXBLOCKSY 306 +#define STRINGID_PKMNSXRESTOREDHPALITTLE2 307 +#define STRINGID_PKMNSXWHIPPEDUPSANDSTORM 308 +#define STRINGID_PKMNSXPREVENTSYLOSS 309 +#define STRINGID_PKMNSXINFATUATEDY 310 +#define STRINGID_PKMNSXMADEYINEFFECTIVE 311 +#define STRINGID_PKMNSXCUREDYPROBLEM 312 +#define STRINGID_ITSUCKEDLIQUIDOOZE 313 +#define STRINGID_PKMNTRANSFORMED 314 +#define STRINGID_ELECTRICITYWEAKENED 315 +#define STRINGID_FIREWEAKENED 316 +#define STRINGID_PKMNHIDUNDERWATER 317 +#define STRINGID_PKMNSPRANGUP 318 +#define STRINGID_HMMOVESCANTBEFORGOTTEN 319 +#define STRINGID_XFOUNDONEY 320 +#define STRINGID_PLAYERDEFEATEDTRAINER1 321 +#define STRINGID_SOOTHINGAROMA 322 +#define STRINGID_ITEMSCANTBEUSEDNOW 323 +#define STRINGID_FORXCOMMAYZ 324 +#define STRINGID_USINGXTHEYOFZN 325 +#define STRINGID_PKMNUSEDXTOGETPUMPED 326 +#define STRINGID_PKMNSXMADEYUSELESS 327 +#define STRINGID_PKMNTRAPPEDBYSANDTOMB 328 +#define STRINGID_EMPTYSTRING4 329 +#define STRINGID_ABOOSTED 330 +#define STRINGID_PKMNSXINTENSIFIEDSUN 331 +#define STRINGID_PKMNMAKESGROUNDMISS 332 +#define STRINGID_YOUTHROWABALLNOWRIGHT 333 +#define STRINGID_PKMNSXTOOKATTACK 334 +#define STRINGID_PKMNCHOSEXASDESTINY 335 +#define STRINGID_PKMNLOSTFOCUS 336 +#define STRINGID_USENEXTPKMN 337 +#define STRINGID_PKMNFLEDUSINGITS 338 +#define STRINGID_PKMNFLEDUSING 339 +#define STRINGID_PKMNWASDRAGGEDOUT 340 +#define STRINGID_PREVENTEDFROMWORKING 341 +#define STRINGID_PKMNSITEMNORMALIZEDSTATUS 342 +#define STRINGID_TRAINER1USEDITEM 343 +#define STRINGID_BOXISFULL 344 +#define STRINGID_PKMNAVOIDEDATTACK 345 +#define STRINGID_PKMNSXMADEITINEFFECTIVE 346 +#define STRINGID_PKMNSXPREVENTSFLINCHING 347 +#define STRINGID_PKMNALREADYHASBURN 348 +#define STRINGID_STATSWONTDECREASE2 349 +#define STRINGID_PKMNSXBLOCKSY2 350 +#define STRINGID_PKMNSXWOREOFF 351 +#define STRINGID_PKMNRAISEDDEFALITTLE 352 +#define STRINGID_PKMNRAISEDSPDEFALITTLE 353 +#define STRINGID_THEWALLSHATTERED 354 +#define STRINGID_PKMNSXPREVENTSYSZ 355 +#define STRINGID_PKMNSXCUREDITSYPROBLEM 356 +#define STRINGID_PKMNCANTESCAPE2 357 +#define STRINGID_PKMNOBTAINEDX 358 +#define STRINGID_PKMNOBTAINEDX2 359 +#define STRINGID_PKMNOBTAINEDXYOBTAINEDZ 360 +#define STRINGID_BUTNOEFFECT 361 +#define STRINGID_PKMNSXHADNOEFFECTONY 362 +#define STRINGID_TWOENEMIESDEFEATED 363 +#define STRINGID_TRAINER2LOSETEXT 364 +#define STRINGID_PKMNINCAPABLEOFPOWER 365 +#define STRINGID_GLINTAPPEARSINEYE 366 +#define STRINGID_PKMNGETTINGINTOPOSITION 367 +#define STRINGID_PKMNBEGANGROWLINGDEEPLY 368 +#define STRINGID_PKMNEAGERFORMORE 369 +#define STRINGID_DEFEATEDOPPONENTBYREFEREE 370 +#define STRINGID_LOSTTOOPPONENTBYREFEREE 371 +#define STRINGID_TIEDOPPONENTBYREFEREE 372 +#define STRINGID_QUESTIONFORFEITMATCH 373 +#define STRINGID_FORFEITEDMATCH 374 +#define STRINGID_PKMNTRANSFERREDSOMEONESPC 375 +#define STRINGID_PKMNTRANSFERREDLANETTESPC 376 +#define STRINGID_PKMNBOXSOMEONESPCFULL 377 +#define STRINGID_PKMNBOXLANETTESPCFULL 378 +#define STRINGID_TRAINER1WINTEXT 379 +#define STRINGID_TRAINER2WINTEXT 380 + +#endif // GUARD_BATTLE_STRING_IDS_H diff --git a/ld_script.txt b/ld_script.txt index de6ba62f1..20ec4d145 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -190,6 +190,7 @@ SECTIONS { asm/fldeff_strength.o(.text); asm/battle_transition.o(.text); asm/battle_controller_linkpartner.o(.text); + src/battle_message.o(.text); asm/battle_message.o(.text); asm/cable_car.o(.text); asm/math_util.o(.text); @@ -411,7 +412,7 @@ SECTIONS { src/battle_ai_script_commands.o(.rodata); data/data4.o(.rodata); data/battle_controller_link_partner.o(.rodata); - data/battle_message.o(.rodata); + src/battle_message.o(.rodata); data/cable_car.o(.rodata); data/save.o(.rodata); data/field_effect_helpers.o(.rodata); diff --git a/src/battle_2.c b/src/battle_2.c index fd7cf6863..0fc7e8ffd 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -41,6 +41,7 @@ #include "evolution_scene.h" #include "roamer.h" #include "safari_zone.h" +#include "battle_string_ids.h" struct UnknownStruct6 { @@ -3299,7 +3300,7 @@ static void BattleIntroPrintTrainerWantsToBattle(void) if (gBattleExecBuffer == 0) { gActiveBank = GetBankByIdentity(IDENTITY_OPPONENT_MON1); - PrepareStringBattle(0, gActiveBank); + PrepareStringBattle(STRINGID_INTROMSG, gActiveBank); gBattleMainFunc = BattleIntroPrintOpponentSendsOut; } } @@ -3309,7 +3310,7 @@ static void BattleIntroPrintWildMonAttacked(void) if (gBattleExecBuffer == 0) { gBattleMainFunc = BattleIntroPrintPlayerSendsOut; - PrepareStringBattle(0, 0); + PrepareStringBattle(STRINGID_INTROMSG, 0); } } @@ -3332,7 +3333,7 @@ static void BattleIntroPrintOpponentSendsOut(void) else identity = IDENTITY_OPPONENT_MON1; - PrepareStringBattle(1, GetBankByIdentity(identity)); + PrepareStringBattle(STRINGID_INTROSENDOUT, GetBankByIdentity(identity)); gBattleMainFunc = BattleIntroOpponent1SendsOutMonAnimation; } @@ -3535,7 +3536,7 @@ static void BattleIntroPrintPlayerSendsOut(void) identity = IDENTITY_PLAYER_MON1; if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI)) - PrepareStringBattle(1, GetBankByIdentity(identity)); + PrepareStringBattle(STRINGID_INTROSENDOUT, GetBankByIdentity(identity)); gBattleMainFunc = BattleIntroPlayer1SendsOutMonAnimation; } diff --git a/src/battle_message.c b/src/battle_message.c new file mode 100644 index 000000000..aaaf23fae --- /dev/null +++ b/src/battle_message.c @@ -0,0 +1,1428 @@ +#include "global.h" +#include "battle.h" +#include "battle_message.h" +#include "battle_string_ids.h" +#include "moves.h" +#include "text.h" +#include "string_util.h" + +extern u16 gLastUsedItem; +extern u8 gLastUsedAbility; +extern u8 gActiveBank; +extern u8 gBankAttacker; +extern u8 gBankTarget; +extern u8 gStringBank; +extern u8 gEffectBank; +extern u8 gAbilitiesPerBank[BATTLE_BANKS_COUNT]; +extern u32 gBattleTypeFlags; +extern u16 gTrainerBattleOpponent_A; +extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; +extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; +extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200]; + +extern const u8 gMoveNames[LAST_MOVE_INDEX + 1][13]; + +// strings +extern const u8 gText_PkmnBoxSomeonesPCFull[]; +extern const u8 gText_PkmnBoxLanettesPCFull[]; +extern const u8 gText_PkmnTransferredSomeonesPC[]; +extern const u8 gText_PkmnTransferredLanettesPC[]; + +// this file's functions +void sub_814F8F8(u8 *txtPtr); +void sub_814F950(u8 *txtPtr); + +// ewram variables +EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; +EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0}; +EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; +EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0}; + +// const rom data + +const u8 gText_Trainer1LoseText[] = _("{B_TRAINER1_LOSE_TEXT}"); +const u8 gText_PkmnGainedEXP[] = _("{B_BUFF1} gained{B_BUFF2}\n{B_BUFF3} EXP. Points!\p"); +const u8 gText_EmptyString4[] = _(""); +const u8 gText_ABoosted[] = _(" a boosted"); +const u8 gText_PkmnGrewToLv[] = _("{B_BUFF1} grew to\nLV. {B_BUFF2}!{UNKNOWN_A}\p"); +const u8 gText_PkmnLearnedMove[] = _("{B_BUFF1} learned\n{B_BUFF2}!{UNKNOWN_A}\p"); +const u8 gText_TryToLearnMove1[] = _("{B_BUFF1} is trying to\nlearn {B_BUFF2}.\p"); +const u8 gText_TryToLearnMove2[] = _("But, {B_BUFF1} can’t learn\nmore than four moves.\p"); +const u8 gText_TryToLearnMove3[] = _("Delete a move to make\nroom for {B_BUFF2}?"); +const u8 gText_PkmnForgotMove[] = _("{B_BUFF1} forgot\n{B_BUFF2}.\p"); +const u8 gText_StopLearningMove[] = _("{PAUSE 32}Stop learning\n{B_BUFF2}?"); +const u8 gText_DidNotLearnMove[] = _("{B_BUFF1} did not learn\n{B_BUFF2}.\p"); +const u8 gText_UseNextPkmn[] = _("Use next POKéMON?"); +const u8 gText_AttackMissed[] = _("{B_ATK_NAME_WITH_PREFIX}’s\nattack missed!"); +const u8 gText_PkmnProtectedItself[] = _("{B_DEF_NAME_WITH_PREFIX}\nprotected itself!"); +const u8 gText_AvoidedDamage[] = _("{B_DEF_NAME_WITH_PREFIX} avoided\ndamage with {B_DEF_ABILITY}!"); +const u8 gText_PkmnMakesGroundMiss[] = _("{B_DEF_NAME_WITH_PREFIX} makes GROUND\nmoves miss with {B_DEF_ABILITY}!"); +const u8 gText_PkmnAvoidedAttack[] = _("{B_DEF_NAME_WITH_PREFIX} avoided\nthe attack!"); +const u8 gText_ItDoesntAffect[] = _("It doesn’t affect\n{B_DEF_NAME_WITH_PREFIX}…"); +const u8 gText_PkmnFainted[] = _("{B_ATK_NAME_WITH_PREFIX}\nfainted!\p"); +const u8 gText_PkmnFainted2[] = _("{B_DEF_NAME_WITH_PREFIX}\nfainted!\p"); +const u8 gText_PlayerGotMoney[] = _("{B_PLAYER_NAME} got ¥{B_BUFF1}\nfor winning!\p"); +const u8 gText_PlayerWhiteout[] = _("{B_PLAYER_NAME} is out of\nusable POKéMON!\p"); +const u8 gText_PlayerWhiteout2[] = _("{B_PLAYER_NAME} whited out!{PAUSE_UNTIL_PRESS}"); +const u8 gText_PreventsEscape[] = _("{B_ACTIVE_NAME_WITH_PREFIX} prevents\nescape with {B_SCR_ACTIVE_ABILITY}!\p"); +const u8 gText_CantEscape2[] = _("Can’t escape!\p"); +const u8 gText_PkmnCantEscape2[] = _("{B_ATK_NAME_WITH_PREFIX} can’t escape!"); +const u8 gText_HitXTimes[] = _("Hit {B_BUFF1} time(s)!"); +const u8 gText_PkmnFellAsleep[] = _("{B_EFF_NAME_WITH_PREFIX}\nfell asleep!"); +const u8 gText_PkmnMadeSleep[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade {B_EFF_NAME_WITH_PREFIX} sleep!"); +const u8 gText_PkmnAlreadyAsleep[] = _("{B_DEF_NAME_WITH_PREFIX} is\nalready asleep!"); +const u8 gText_PkmnAlreadyAsleep2[] = _("{B_ATK_NAME_WITH_PREFIX} is\nalready asleep!"); +const u8 gText_PkmnWasntAffected[] = _("{B_DEF_NAME_WITH_PREFIX}\nwasn’t affected!"); +const u8 gText_PkmnWasPoisoned[] = _("{B_EFF_NAME_WITH_PREFIX}\nwas poisoned!"); +const u8 gText_PkmnPoisonedBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\npoisoned {B_EFF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnHurtByPoison[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby poison!"); +const u8 gText_PkmnAlreadyPoisoned[] = _("{B_DEF_NAME_WITH_PREFIX} is already\npoisoned."); +const u8 gText_PkmnBadlyPoisoned[] = _("{B_EFF_NAME_WITH_PREFIX} is badly\npoisoned!"); +const u8 gText_PkmnEnergyDrained[] = _("{B_DEF_NAME_WITH_PREFIX} had its\nenergy drained!"); +const u8 gText_PkmnWasBurned[] = _("{B_EFF_NAME_WITH_PREFIX} was burned!"); +const u8 gText_PkmnBurnedBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nburned {B_EFF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnHurtByBurn[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby its burn!"); +const u8 gText_PkmnAlreadyHasBurn[] = _("{B_DEF_NAME_WITH_PREFIX} already\nhas a burn."); +const u8 gText_PkmnWasFrozen[] = _("{B_EFF_NAME_WITH_PREFIX} was\nfrozen solid!"); +const u8 gText_PkmnFrozenBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nfroze {B_EFF_NAME_WITH_PREFIX} solid!"); +const u8 gText_PkmnIsFrozen[] = _("{B_ATK_NAME_WITH_PREFIX} is\nfrozen solid!"); +const u8 gText_PkmnWasDefrosted[] = _("{B_DEF_NAME_WITH_PREFIX} was\ndefrosted!"); +const u8 gText_PkmnWasDefrosted2[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted!"); +const u8 gText_PkmnWasDefrostedBy[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted by {B_CURRENT_MOVE}!"); +const u8 gText_PkmnWasParalyzed[] = _("{B_EFF_NAME_WITH_PREFIX} is paralyzed!\nIt may be unable to move!"); +const u8 gText_PkmnWasParalyzedBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nparalyzed {B_EFF_NAME_WITH_PREFIX}!\lIt may be unable to move!"); +const u8 gText_PkmnIsParalyzed[] = _("{B_ATK_NAME_WITH_PREFIX} is paralyzed!\nIt can’t move!"); +const u8 gText_PkmnIsAlreadyParalyzed[] = _("{B_DEF_NAME_WITH_PREFIX} is\nalready paralyzed!"); +const u8 gText_PkmnHealedParalysis[] = _("{B_DEF_NAME_WITH_PREFIX} was\nhealed of paralysis!"); +const u8 gText_PkmnDreamEaten[] = _("{B_DEF_NAME_WITH_PREFIX}’s\ndream was eaten!"); +const u8 gText_StatsWontIncrease[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_BUFF1}\nwon’t go higher!"); +const u8 gText_StatsWontDecrease[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}\nwon’t go lower!"); +const u8 gText_TeamStoppedWorking[] = _("Your team’s {B_BUFF1}\nstopped working!"); +const u8 gText_FoeStoppedWorking[] = _("The foe’s {B_BUFF1}\nstopped working!"); +const u8 gText_PkmnIsConfused[] = _("{B_ATK_NAME_WITH_PREFIX} is\nconfused!"); +const u8 gText_PkmnHealedConfusion[] = _("{B_ATK_NAME_WITH_PREFIX} snapped\nout of confusion!"); +const u8 gText_PkmnWasConfused[] = _("{B_EFF_NAME_WITH_PREFIX} became\nconfused!"); +const u8 gText_PkmnAlreadyConfused[] = _("{B_DEF_NAME_WITH_PREFIX} is\nalready confused!"); +const u8 gText_PkmnFellInLove[] = _("{B_DEF_NAME_WITH_PREFIX}\nfell in love!"); +const u8 gText_PkmnInLove[] = _("{B_ATK_NAME_WITH_PREFIX} is in love\nwith {B_ACTIVE_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnImmobilizedByLove[] = _("{B_ATK_NAME_WITH_PREFIX} is\nimmobilized by love!"); +const u8 gText_PkmnBlownAway[] = _("{B_DEF_NAME_WITH_PREFIX} was\nblown away!"); +const u8 gText_PkmnChangedType[] = _("{B_ATK_NAME_WITH_PREFIX} transformed\ninto the {B_BUFF1} type!"); +const u8 gText_PkmnFlinched[] = _("{B_ATK_NAME_WITH_PREFIX} flinched!"); +const u8 gText_PkmnRegainedHealth[] = _("{B_DEF_NAME_WITH_PREFIX} regained\nhealth!"); +const u8 gText_PkmnHPFull[] = _("{B_DEF_NAME_WITH_PREFIX}’s\nHP is full!"); +const u8 gText_PkmnRaisedSpDef[] = _("{B_ATK_PREFIX2}’s {B_CURRENT_MOVE}\nraised SP. DEF!"); +const u8 gText_PkmnRaisedSpDefALittle[] = _("{B_ATK_PREFIX2}’s {B_CURRENT_MOVE}\nraised SP. DEF a little!"); +const u8 gText_PkmnRaisedDef[] = _("{B_ATK_PREFIX2}’s {B_CURRENT_MOVE}\nraised DEFENSE!"); +const u8 gText_PkmnRaisedDefALittle[] = _("{B_ATK_PREFIX2}’s {B_CURRENT_MOVE}\nraised DEFENSE a little!"); +const u8 gText_PkmnCoveredByVeil[] = _("{B_ATK_PREFIX2}’s party is covered\nby a veil!"); +const u8 gText_PkmnUsedSafeguard[] = _("{B_DEF_NAME_WITH_PREFIX}’s party is protected\nby SAFEGUARD!"); +const u8 gText_PkmnSafeguardExpired[] = _("{B_ATK_PREFIX3}’s party is no longer\nprotected by SAFEGUARD!"); +const u8 gText_PkmnWentToSleep[] = _("{B_ATK_NAME_WITH_PREFIX} went\nto sleep!"); +const u8 gText_PkmnSleptHealthy[] = _("{B_ATK_NAME_WITH_PREFIX} slept and\nbecame healthy!"); +const u8 gText_PkmnWhippedWhirlwind[] = _("{B_ATK_NAME_WITH_PREFIX} whipped\nup a whirlwind!"); +const u8 gText_PkmnTookSunlight[] = _("{B_ATK_NAME_WITH_PREFIX} took\nin sunlight!"); +const u8 gText_PkmnLoweredHead[] = _("{B_ATK_NAME_WITH_PREFIX} lowered\nits head!"); +const u8 gText_PkmnIsGlowing[] = _("{B_ATK_NAME_WITH_PREFIX} is glowing!"); +const u8 gText_PkmnFlewHigh[] = _("{B_ATK_NAME_WITH_PREFIX} flew\nup high!"); +const u8 gText_PkmnDugHole[] = _("{B_ATK_NAME_WITH_PREFIX} dug a hole!"); +const u8 gText_PkmnHidUnderwater[] = _("{B_ATK_NAME_WITH_PREFIX} hid\nunderwater!"); +const u8 gText_PkmnSprangUp[] = _("{B_ATK_NAME_WITH_PREFIX} sprang up!"); +const u8 gText_PkmnSqueezedByBind[] = _("{B_DEF_NAME_WITH_PREFIX} was squeezed by\n{B_ATK_NAME_WITH_PREFIX}’s BIND!"); +const u8 gText_PkmnTrappedInVortex[] = _("{B_DEF_NAME_WITH_PREFIX} was trapped\nin the vortex!"); +const u8 gText_PkmnTrappedBySandTomb[] = _("{B_DEF_NAME_WITH_PREFIX} was trapped\nby SAND TOMB!"); +const u8 gText_PkmnWrappedBy[] = _("{B_DEF_NAME_WITH_PREFIX} was WRAPPED by\n{B_ATK_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnClamped[] = _("{B_ATK_NAME_WITH_PREFIX} CLAMPED\n{B_DEF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnHurtBy[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby {B_BUFF1}!"); +const u8 gText_PkmnFreedFrom[] = _("{B_ATK_NAME_WITH_PREFIX} was freed\nfrom {B_BUFF1}!"); +const u8 gText_PkmnCrashed[] = _("{B_ATK_NAME_WITH_PREFIX} kept going\nand crashed!"); +const u8 gText_PkmnShroudedInMist[] = _("{B_ATK_PREFIX2} became\nshrouded in MIST!"); +const u8 gText_PkmnProtectedByMist[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is protected\nby MIST!"); +const u8 gText_PkmnGettingPumped[] = _("{B_ATK_NAME_WITH_PREFIX} is getting\npumped!"); +const u8 gText_PkmnHitWithRecoil[] = _("{B_ATK_NAME_WITH_PREFIX} is hit\nwith recoil!"); +const u8 gText_PkmnProtectedItself2[] = _("{B_ATK_NAME_WITH_PREFIX} protected\nitself!"); +const u8 gText_PkmnBuffetedBySandstorm[] = _("{B_ATK_NAME_WITH_PREFIX} is buffeted\nby the sandstorm!"); +const u8 gText_PkmnPeltedByHail[] = _("{B_ATK_NAME_WITH_PREFIX} is pelted\nby HAIL!"); +const u8 gText_PkmnsXWoreOff[] = _("{B_ATK_PREFIX1}’s {B_BUFF1}\nwore off!"); +const u8 gText_PkmnSeeded[] = _("{B_DEF_NAME_WITH_PREFIX} was seeded!"); +const u8 gText_PkmnEvadedAttack[] = _("{B_DEF_NAME_WITH_PREFIX} evaded\nthe attack!"); +const u8 gText_PkmnSappedByLeechSeed[] = _("{B_ATK_NAME_WITH_PREFIX}’s health is\nsapped by LEECH SEED!"); +const u8 gText_PkmnFastAsleep[] = _("{B_ATK_NAME_WITH_PREFIX} is fast\nasleep."); +const u8 gText_PkmnWokeUp[] = _("{B_ATK_NAME_WITH_PREFIX} woke up!"); +const u8 gText_PkmnUproarKeptAwake[] = _("But {B_ACTIVE_NAME_WITH_PREFIX}’s UPROAR\nkept it awake!"); +const u8 gText_PkmnWokeUpInUproar[] = _("{B_ATK_NAME_WITH_PREFIX} woke up\nin the UPROAR!"); +const u8 gText_PkmnCausedUproar[] = _("{B_ATK_NAME_WITH_PREFIX} caused\nan UPROAR!"); +const u8 gText_PkmnMakingUproar[] = _("{B_ATK_NAME_WITH_PREFIX} is making\nan UPROAR!"); +const u8 gText_PkmnCalmedDown[] = _("{B_ATK_NAME_WITH_PREFIX} calmed down."); +const u8 gText_PkmnCantSleepInUproar[] = _("But {B_DEF_NAME_WITH_PREFIX} can’t\nsleep in an UPROAR!"); +const u8 gText_PkmnStockpiled[] = _("{B_ATK_NAME_WITH_PREFIX} STOCKPILED\n{B_BUFF1}!"); +const u8 gText_PkmnCantStockpile[] = _("{B_ATK_NAME_WITH_PREFIX} can’t\nSTOCKPILE any more!"); +const u8 gText_PkmnCantSleepInUproar2[] = _("But {B_DEF_NAME_WITH_PREFIX} can’t\nsleep in an UPROAR!"); +const u8 gText_UproarKeptPkmnAwake[] = _("But the UPROAR kept\n{B_DEF_NAME_WITH_PREFIX} awake!"); +const u8 gText_PkmnStayedAwakeUsing[] = _("{B_DEF_NAME_WITH_PREFIX} stayed awake\nusing its {B_DEF_ABILITY}!"); +const u8 gText_PkmnStoringEnergy[] = _("{B_ATK_NAME_WITH_PREFIX} is storing\nenergy!"); +const u8 gText_PkmnUnleashedEnergy[] = _("{B_ATK_NAME_WITH_PREFIX} unleashed\nenergy!"); +const u8 gText_PkmnFatigueConfusion[] = _("{B_ATK_NAME_WITH_PREFIX} became\nconfused due to fatigue!"); +const u8 gText_PkmnPickedUpItem[] = _("{B_PLAYER_NAME} picked up\n¥{B_BUFF1}!\p"); +const u8 gText_PkmnUnaffected[] = _("{B_DEF_NAME_WITH_PREFIX} is\nunaffected!"); +const u8 gText_PkmnTransformedInto[] = _("{B_ATK_NAME_WITH_PREFIX} transformed\ninto {B_BUFF1}!"); +const u8 gText_PkmnMadeSubstitute[] = _("{B_ATK_NAME_WITH_PREFIX} made\na SUBSTITUTE!"); +const u8 gText_PkmnHasSubstitute[] = _("{B_ATK_NAME_WITH_PREFIX} already\nhas a SUBSTITUTE!"); +const u8 gText_SubstituteDamaged[] = _("The SUBSTITUTE took damage\nfor {B_DEF_NAME_WITH_PREFIX}!\p"); +const u8 gText_PkmnSubstituteFaded[] = _("{B_DEF_NAME_WITH_PREFIX}’s\nSUBSTITUTE faded!\p"); +const u8 gText_PkmnMustRecharge[] = _("{B_ATK_NAME_WITH_PREFIX} must\nrecharge!"); +const u8 gText_PkmnRageBuilding[] = _("{B_DEF_NAME_WITH_PREFIX}’s RAGE\nis building!"); +const u8 gText_PkmnMoveWasDisabled[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}\nwas disabled!"); +const u8 gText_PkmnMoveDisabledNoMore[] = _("{B_ATK_NAME_WITH_PREFIX} is disabled\nno more!"); +const u8 gText_PkmnGotEncore[] = _("{B_DEF_NAME_WITH_PREFIX} got\nan ENCORE!"); +const u8 gText_PkmnEncoreEnded[] = _("{B_ATK_NAME_WITH_PREFIX}’s ENCORE\nended!"); +const u8 gText_PkmnTookAim[] = _("{B_ATK_NAME_WITH_PREFIX} took aim\nat {B_DEF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnSketchedMove[] = _("{B_ATK_NAME_WITH_PREFIX} SKETCHED\n{B_BUFF1}!"); +const u8 gText_PkmnTryingToTakeFoe[] = _("{B_ATK_NAME_WITH_PREFIX} is trying\nto take its foe with it!"); +const u8 gText_PkmnTookFoe[] = _("{B_DEF_NAME_WITH_PREFIX} took\n{B_ATK_NAME_WITH_PREFIX} with it!"); +const u8 gText_PkmnReducedPP[] = _("Reduced {B_DEF_NAME_WITH_PREFIX}’s\n{B_BUFF1} by {B_BUFF2}!"); +const u8 gText_PkmnStoleItem[] = _("{B_ATK_NAME_WITH_PREFIX} stole\n{B_DEF_NAME_WITH_PREFIX}’s {B_LAST_ITEM}!"); +const u8 gText_PkmnCantEscape[] = _("{B_DEF_NAME_WITH_PREFIX} can’t\nescape now!"); +const u8 gText_PkmnFellIntoNightmare[] = _("{B_DEF_NAME_WITH_PREFIX} fell into\na NIGHTMARE!"); +const u8 gText_PkmnLockedInNightmare[] = _("{B_ATK_NAME_WITH_PREFIX} is locked\nin a NIGHTMARE!"); +const u8 gText_PkmnLaidCurse[] = _("{B_ATK_NAME_WITH_PREFIX} cut its own HP and\nlaid a CURSE on {B_DEF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnAfflictedByCurse[] = _("{B_ATK_NAME_WITH_PREFIX} is afflicted\nby the CURSE!"); +const u8 gText_SpikesScattered[] = _("SPIKES were scattered all around\nthe opponent’s side!"); +const u8 gText_PkmnHurtBySpikes[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is hurt\nby SPIKES!"); +const u8 gText_PkmnIdentified[] = _("{B_ATK_NAME_WITH_PREFIX} identified\n{B_DEF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnPerishCountFell[] = _("{B_ATK_NAME_WITH_PREFIX}’s PERISH count\nfell to {B_BUFF1}!"); +const u8 gText_PkmnBracedItself[] = _("{B_ATK_NAME_WITH_PREFIX} braced\nitself!"); +const u8 gText_PkmnEnduredHit[] = _("{B_DEF_NAME_WITH_PREFIX} ENDURED\nthe hit!"); +const u8 gText_MagnitudeStrength[] = _("MAGNITUDE {B_BUFF1}!"); +const u8 gText_PkmnCutHPMaxedAttack[] = _("{B_ATK_NAME_WITH_PREFIX} cut its own HP\nand maximized ATTACK!"); +const u8 gText_PkmnCopiedStatChanges[] = _("{B_ATK_NAME_WITH_PREFIX} copied\n{B_DEF_NAME_WITH_PREFIX}’s stat changes!"); +const u8 gText_PkmnGotFree[] = _("{B_ATK_NAME_WITH_PREFIX} got free of\n{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}!"); +const u8 gText_PkmnShedLeechSeed[] = _("{B_ATK_NAME_WITH_PREFIX} shed\nLEECH SEED!"); +const u8 gText_PkmnBlewAwaySpikes[] = _("{B_ATK_NAME_WITH_PREFIX} blew away\nSPIKES!"); +const u8 gText_PkmnFledFromBattle[] = _("{B_ATK_NAME_WITH_PREFIX} fled from\nbattle!"); +const u8 gText_PkmnForesawAttack[] = _("{B_ATK_NAME_WITH_PREFIX} foresaw\nan attack!"); +const u8 gText_PkmnTookAttack[] = _("{B_DEF_NAME_WITH_PREFIX} took the\n{B_BUFF1} attack!"); +const u8 gText_PkmnChoseXAsDestiny[] = _("{B_ATK_NAME_WITH_PREFIX} chose\n{B_CURRENT_MOVE} as its destiny!"); +const u8 gText_PkmnAttack[] = _("{B_BUFF1}’s attack!"); +const u8 gText_PkmnCenterAttention[] = _("{B_ATK_NAME_WITH_PREFIX} became the\ncenter of attention!"); +const u8 gText_PkmnChargingPower[] = _("{B_ATK_NAME_WITH_PREFIX} began\ncharging power!"); +const u8 gText_NaturePowerTurnedInto[] = _("NATURE POWER turned into\n{B_CURRENT_MOVE}!"); +const u8 gText_PkmnStatusNormal[] = _("{B_ATK_NAME_WITH_PREFIX}’s status\nreturned to normal!"); +const u8 gText_PkmnSubjectedToTorment[] = _("{B_DEF_NAME_WITH_PREFIX} was subjected\nto TORMENT!"); +const u8 gText_PkmnTighteningFocus[] = _("{B_ATK_NAME_WITH_PREFIX} is tightening\nits focus!"); +const u8 gText_PkmnFellForTaunt[] = _("{B_DEF_NAME_WITH_PREFIX} fell for\nthe TAUNT!"); +const u8 gText_PkmnReadyToHelp[] = _("{B_ATK_NAME_WITH_PREFIX} is ready to\nhelp {B_DEF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnSwitchedItems[] = _("{B_ATK_NAME_WITH_PREFIX} switched\nitems with its opponent!"); +const u8 gText_PkmnObtainedX[] = _("{B_ATK_NAME_WITH_PREFIX} obtained\n{B_BUFF1}."); +const u8 gText_PkmnObtainedX2[] = _("{B_DEF_NAME_WITH_PREFIX} obtained\n{B_BUFF2}."); +const u8 gText_PkmnObtainedXYObtainedZ[] = _("{B_ATK_NAME_WITH_PREFIX} obtained\n{B_BUFF1}.\p{B_DEF_NAME_WITH_PREFIX} obtained\n{B_BUFF2}."); +const u8 gText_PkmnCopiedFoe[] = _("{B_ATK_NAME_WITH_PREFIX} copied\n{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}!"); +const u8 gText_PkmnMadeWish[] = _("{B_ATK_NAME_WITH_PREFIX} made a WISH!"); +const u8 gText_PkmnWishCameTrue[] = _("{B_BUFF1}’s WISH\ncame true!"); +const u8 gText_PkmnPlantedRoots[] = _("{B_ATK_NAME_WITH_PREFIX} planted its roots!"); +const u8 gText_PkmnAbsorbedNutrients[] = _("{B_ATK_NAME_WITH_PREFIX} absorbed\nnutrients with its roots!"); +const u8 gText_PkmnAnchoredItself[] = _("{B_DEF_NAME_WITH_PREFIX} anchored\nitself with its roots!"); +const u8 gText_PkmnWasMadeDrowsy[] = _("{B_ATK_NAME_WITH_PREFIX} made\n{B_DEF_NAME_WITH_PREFIX} drowsy!"); +const u8 gText_PkmnKnockedOff[] = _("{B_ATK_NAME_WITH_PREFIX} knocked off\n{B_DEF_NAME_WITH_PREFIX}’s {B_LAST_ITEM}!"); +const u8 gText_PkmnSwappedAbilities[] = _("{B_ATK_NAME_WITH_PREFIX} swapped abilities\nwith its opponent!"); +const u8 gText_PkmnSealedOpponentMove[] = _("{B_ATK_NAME_WITH_PREFIX} sealed the\nopponent’s move(s)!"); +const u8 gText_PkmnWantsGrudge[] = _("{B_ATK_NAME_WITH_PREFIX} wants the\nopponent to bear a GRUDGE!"); +const u8 gText_PkmnLostPPGrudge[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_BUFF1} lost\nall its PP due to the GRUDGE!"); +const u8 gText_PkmnShroudedItself[] = _("{B_ATK_NAME_WITH_PREFIX} shrouded\nitself in {B_CURRENT_MOVE}!"); +const u8 gText_PkmnMoveBounced[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_CURRENT_MOVE}\nwas bounced back by MAGIC COAT!"); +const u8 gText_PkmnWaitsForTarget[] = _("{B_ATK_NAME_WITH_PREFIX} waits for a target\nto make a move!"); +const u8 gText_PkmnSnatchedMove[] = _("{B_DEF_NAME_WITH_PREFIX} SNATCHED\n{B_ACTIVE_NAME_WITH_PREFIX}’s move!"); +const u8 gText_ElectricityWeakened[] = _("Electricity’s power was\nweakened!"); +const u8 gText_FireWeakened[] = _("Fire’s power was\nweakened!"); +const u8 gText_XFoundOneY[] = _("{B_ATK_NAME_WITH_PREFIX} found\none {B_LAST_ITEM}!"); +const u8 gText_SoothingAroma[] = _("A soothing aroma wafted\nthrough the area!"); +const u8 gText_ItemsCantBeUsedNow[] = _("Items can’t be used now.{PAUSE 64}"); +const u8 gText_ForXCommaYZ[] = _("For {B_ACTIVE_NAME_WITH_PREFIX},\n{B_LAST_ITEM} {B_BUFF1}"); +const u8 gText_PkmnUsedXToGetPumped[] = _("{B_ACTIVE_NAME_WITH_PREFIX} used\n{B_LAST_ITEM} to get pumped!"); +const u8 gText_PkmnLostFocus[] = _("{B_ATK_NAME_WITH_PREFIX} lost its\nfocus and couldn’t move!"); +const u8 gText_PkmnWasDraggedOut[] = _("{B_DEF_NAME_WITH_PREFIX} was\ndragged out!\p"); +const u8 gText_TheWallShattered[] = _("The wall shattered!"); +const u8 gText_ButNoEffect[] = _("But it had no effect!"); +const u8 gText_PkmnHasNoMovesLeft[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} has no\nmoves left!\p"); +const u8 gText_PkmnMoveIsDisabled[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_CURRENT_MOVE}\nis disabled!\p"); +const u8 gText_PkmnCantUseMoveTorment[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can’t use the same\nmove in a row due to the TORMENT!\p"); +const u8 gText_PkmnCantUseMoveTaunt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can’t use\n{B_CURRENT_MOVE} after the TAUNT!\p"); +const u8 gText_PkmnCantUseMoveSealed[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can’t use the\nsealed {B_CURRENT_MOVE}!\p"); +const u8 gText_PkmnMadeItRain[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade it rain!"); +const u8 gText_PkmnRaisedSpeed[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nraised its SPEED!"); +const u8 gText_PkmnProtectedBy[] = _("{B_DEF_NAME_WITH_PREFIX} was protected\nby {B_DEF_ABILITY}!"); +const u8 gText_PkmnPreventsUsage[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevents {B_ATK_NAME_WITH_PREFIX}\lfrom using {B_CURRENT_MOVE}!"); +const u8 gText_PkmnRestoredHPUsing[] = _("{B_DEF_NAME_WITH_PREFIX} restored HP\nusing its {B_DEF_ABILITY}!"); +const u8 gText_PkmnsXMadeYUseless[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nmade {B_CURRENT_MOVE} useless!"); +const u8 gText_PkmnChangedTypeWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nmade it the {B_BUFF1} type!"); +const u8 gText_PkmnPreventsParalysisWith[] = _("{B_EFF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevents paralysis!"); +const u8 gText_PkmnPreventsRomanceWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevents romance!"); +const u8 gText_PkmnPreventsPoisoningWith[] = _("{B_EFF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevents poisoning!"); +const u8 gText_PkmnPreventsConfusionWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevents confusion!"); +const u8 gText_PkmnRaisedFirePowerWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nraised its FIRE power!"); +const u8 gText_PkmnAnchorsItselfWith[] = _("{B_DEF_NAME_WITH_PREFIX} anchors\nitself with {B_DEF_ABILITY}!"); +const u8 gText_PkmnCutsAttackWith[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncuts {B_DEF_NAME_WITH_PREFIX}’s ATTACK!"); +const u8 gText_PkmnPreventsStatLossWith[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents stat loss!"); +const u8 gText_PkmnHurtsWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nhurt {B_ATK_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnTraced[] = _("{B_ACTIVE_NAME_WITH_PREFIX} TRACED\n{B_BUFF1}’s {B_BUFF2}!"); +const u8 gText_PkmnsXPreventsBurns[] = _("{B_EFF_NAME_WITH_PREFIX}’s {STRING 27}\nprevents burns!"); +const u8 gText_PkmnsXBlocksY[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nblocks {B_CURRENT_MOVE}!"); +const u8 gText_PkmnsXBlocksY2[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nblocks {B_CURRENT_MOVE}!"); +const u8 gText_PkmnsXRestoredHPALittle2[] = _("{B_ATK_NAME_WITH_PREFIX}’s {STRING 24}\nrestored its HP a little!"); +const u8 gText_PkmnsXWhippedUpSandstorm[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nwhipped up a sandstorm!"); +const u8 gText_PkmnsXIntensifiedSun[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nintensified the sun’s rays!"); +const u8 gText_PkmnsXPreventsYLoss[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents {B_BUFF1} loss!"); +const u8 gText_PkmnsXInfatuatedY[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\ninfatuated {B_ATK_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnsXMadeYIneffective[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nmade {B_CURRENT_MOVE} ineffective!"); +const u8 gText_PkmnsXCuredYProblem[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); +const u8 gText_ItSuckedLiquidOoze[] = _("It sucked up the\nLIQUID OOZE!"); +const u8 gText_PkmnTransformed[] = _("{B_ACTIVE_NAME_WITH_PREFIX} transformed!"); +const u8 gText_PkmnsXTookAttack[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\ntook the attack!"); +const u8 gText_PkmnsXPreventsSwitching[] = _("{B_BUFF1}’s {STRING 23}\nprevents switching!\p"); +const u8 gText_PreventedFromWorking[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevented {B_ACTIVE_NAME_WITH_PREFIX}’s\l{B_BUFF1} from working!"); +const u8 gText_PkmnsXMadeItIneffective[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade it ineffective!"); +const u8 gText_PkmnsXPreventsFlinching[] = _("{B_EFF_NAME_WITH_PREFIX}’s {STRING 27}\nprevents flinching!"); +const u8 gText_PkmnsXPreventsYsZ[] = _("{B_ATK_NAME_WITH_PREFIX}’s {STRING 24}\nprevents {B_DEF_NAME_WITH_PREFIX}’s\l{B_DEF_ABILITY} from working!"); +const u8 gText_PkmnsXCuredItsYProblem[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); +const u8 gText_PkmnsXHadNoEffectOnY[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nhad no effect on {B_EFF_NAME_WITH_PREFIX}!"); +const u8 gText_StatSharply[] = _("sharply "); +const u8 gText_StatRose[] = _("rose!"); +const u8 gText_StatHarshly[] = _("harshly "); +const u8 gText_StatFell[] = _("fell!"); +const u8 gText_PkmnsStatChanged[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); +const u8 gText_PkmnsStatChanged2[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); +const u8 gText_UsingXTheYOfZN[] = _("Using {B_LAST_ITEM}, the {B_BUFF1}\nof {B_ACTIVE_NAME_WITH_PREFIX} {B_BUFF2}"); +const u8 gText_PkmnsStatChanged3[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); +const u8 gText_PkmnsStatChanged4[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); +const u8 gText_StatsWontIncrease2[] = _("{B_ATK_NAME_WITH_PREFIX}’s stats won’t\ngo any higher!"); +const u8 gText_StatsWontDecrease2[] = _("{B_DEF_NAME_WITH_PREFIX}’s stats won’t\ngo any lower!"); +const u8 gText_CriticalHit[] = _("A critical hit!"); +const u8 gText_OneHitKO[] = _("It’s a one-hit KO!"); +const u8 gText_123Poof[] = _("{PAUSE 32}1, {PAUSE 15}2, and{PAUSE 15}… {PAUSE 15}… {PAUSE 15}… {PAUSE 15}{PLAY_SE 0x0038}Poof!\p"); +const u8 gText_AndEllipsis[] = _("And…\p"); +const u8 gText_HMMovesCantBeForgotten[] = _("HM moves can’t be\nforgotten now.\p"); +const u8 gText_NotVeryEffective[] = _("It’s not very effective…"); +const u8 gText_SuperEffective[] = _("It’s super effective!"); +const u8 gText_GotAwaySafely[] = _("{PLAY_SE 0x0011}Got away safely!\p"); +const u8 gText_PkmnFledUsingIts[] = _("{PLAY_SE 0x0011}{B_ATK_NAME_WITH_PREFIX} fled\nusing its {B_LAST_ITEM}!\p"); +const u8 gText_PkmnFledUsing[] = _("{PLAY_SE 0x0011}{B_ATK_NAME_WITH_PREFIX} fled\nusing {STRING 24}!\p"); +const u8 gText_WildPkmnFled[] = _("{PLAY_SE 0x0011}Wild {B_BUFF1} fled!"); +const u8 gText_PlayerDefeatedLinkTrainer[] = _("Player defeated\n{B_20}!"); +const u8 gText_TwoLinkTrainersDefeated[] = _("Player beat {B_20}\nand {B_21}!"); +const u8 gText_PlayerLostAgainstLinkTrainer[] = _("Player lost against\n{B_20}!"); +const u8 gText_PlayerLostToTwo[] = _("Player lost to {B_20}\nand {B_21}!"); +const u8 gText_PlayerBattledToDrawLinkTrainer[] = _("Player battled to a draw against\n{B_20}!"); +const u8 gText_PlayerBattledToDrawVsTwo[] = _("Player battled to a draw against\n{B_20} and {B_21}!"); +const u8 gText_WildFled[] = _("{PLAY_SE 0x0011}{B_20} fled!"); +const u8 gText_TwoWildFled[] = _("{PLAY_SE 0x0011}{B_20} and\n{B_21} fled!"); +const u8 gText_NoRunningFromTrainers[] = _("No! There’s no running\nfrom a TRAINER battle!\p"); +const u8 gText_CantEscape[] = _("Can’t escape!\p"); +const u8 gText_DontLeaveBirch[] = _("PROF. BIRCH: Don’t leave me like this!\p"); +const u8 gText_ButNothingHappened[] = _("But nothing happened!"); +const u8 gText_ButItFailed[] = _("But it failed!"); +const u8 gText_ItHurtConfusion[] = _("It hurt itself in its\nconfusion!"); +const u8 gText_MirrorMoveFailed[] = _("The MIRROR MOVE failed!"); +const u8 gText_StartedToRain[] = _("It started to rain!"); +const u8 gText_DownpourStarted[] = _("A downpour started!"); +const u8 gText_RainContinues[] = _("Rain continues to fall."); +const u8 gText_DownpourContinues[] = _("The downpour continues."); +const u8 gText_RainStopped[] = _("The rain stopped."); +const u8 gText_SandstormBrewed[] = _("A sandstorm brewed!"); +const u8 gText_SandstormRages[] = _("The sandstorm rages."); +const u8 gText_SandstormSubsided[] = _("The sandstorm subsided."); +const u8 gText_SunlightGotBright[] = _("The sunlight got bright!"); +const u8 gText_SunlightStrong[] = _("The sunlight is strong."); +const u8 gText_SunlightFaded[] = _("The sunlight faded."); +const u8 gText_StartedHail[] = _("It started to hail!"); +const u8 gText_HailContinues[] = _("Hail continues to fall."); +const u8 gText_HailStopped[] = _("The hail stopped."); +const u8 gText_FailedToSpitUp[] = _("But it failed to SPIT UP\na thing!"); +const u8 gText_FailedToSwallow[] = _("But it failed to SWALLOW\na thing!"); +const u8 gText_WindBecameHeatWave[] = _("The wind turned into a\nHEAT WAVE!"); +const u8 gText_StatChangesGone[] = _("All stat changes were\neliminated!"); +const u8 gText_CoinsScattered[] = _("Coins scattered everywhere!"); +const u8 gText_TooWeakForSubstitute[] = _("It was too weak to make\na SUBSTITUTE!"); +const u8 gText_SharedPain[] = _("The battlers shared\ntheir pain!"); +const u8 gText_BellChimed[] = _("A bell chimed!"); +const u8 gText_FaintInThree[] = _("All affected POKéMON will\nfaint in three turns!"); +const u8 gText_NoPPLeft[] = _("There’s no PP left for\nthis move!\p"); +const u8 gText_ButNoPPLeft[] = _("But there was no PP left\nfor the move!"); +const u8 gText_PkmnIgnoresAsleep[] = _("{B_ATK_NAME_WITH_PREFIX} ignored\norders while asleep!"); +const u8 gText_PkmnIgnoredOrders[] = _("{B_ATK_NAME_WITH_PREFIX} ignored\norders!"); +const u8 gText_PkmnBeganToNap[] = _("{B_ATK_NAME_WITH_PREFIX} began to nap!"); +const u8 gText_PkmnLoafing[] = _("{B_ATK_NAME_WITH_PREFIX} is\nloafing around!"); +const u8 gText_PkmnWontObey[] = _("{B_ATK_NAME_WITH_PREFIX} won’t\nobey!"); +const u8 gText_PkmnTurnedAway[] = _("{B_ATK_NAME_WITH_PREFIX} turned away!"); +const u8 gText_PkmnPretendNotNotice[] = _("{B_ATK_NAME_WITH_PREFIX} pretended\nnot to notice!"); +const u8 gText_EnemyAboutToSwitchPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} is\nabout to use {B_BUFF2}.\pWill {B_PLAYER_NAME} change\nPOKéMON?"); +const u8 gText_PkmnLearnedMove2[] = _("{B_ATK_NAME_WITH_PREFIX} learned\n{B_BUFF1}!"); +const u8 gText_PlayerDefeatedLinkTrainerTrainer1[] = _("Player defeated\n{B_TRAINER1_CLASS} {B_TRAINER1_NAME}!\p"); +const u8 gText_CreptCloser[] = _("{B_PLAYER_NAME} crept closer to\n{B_OPPONENT_MON1_NAME}!"); +const u8 gText_CantGetCloser[] = _("{B_PLAYER_NAME} can’t get any closer!"); +const u8 gText_PkmnWatchingCarefully[] = _("{B_OPPONENT_MON1_NAME} is watching\ncarefully!"); +const u8 gText_PkmnCuriousAboutX[] = _("{B_OPPONENT_MON1_NAME} is curious about\nthe {B_BUFF1}!"); +const u8 gText_PkmnEnthralledByX[] = _("{B_OPPONENT_MON1_NAME} is enthralled by\nthe {B_BUFF1}!"); +const u8 gText_PkmnIgnoredX[] = _("{B_OPPONENT_MON1_NAME} completely ignored\nthe {B_BUFF1}!"); +const u8 gText_ThrewPokeblockAtPkmn[] = _("{B_PLAYER_NAME} threw a {POKEBLOCK}\nat the {B_OPPONENT_MON1_NAME}!"); +const u8 gText_OutOfSafariBalls[] = _("{PLAY_SE 0x0049}ANNOUNCER: You’re out of\nSAFARI BALLS! Game over!\p"); +const u8 gText_OpponentMon1Appeared[] = _("{B_OPPONENT_MON1_NAME} appeared!\p"); +const u8 gText_WildPkmnAppeared[] = _("Wild {B_OPPONENT_MON1_NAME} appeared!\p"); +const u8 gText_WildPkmnAppeared2[] = _("Wild {B_OPPONENT_MON1_NAME} appeared!\p"); +const u8 gText_WildPkmnAppearedPause[] = _("Wild {B_OPPONENT_MON1_NAME} appeared!{PAUSE 127}"); +const u8 gText_TwoWildPkmnAppeared[] = _("Wild {B_OPPONENT_MON1_NAME} and\n{B_OPPONENT_MON2_NAME} appeared!\p"); +const u8 gText_Trainer1WantsToBattle[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nwould like to battle!\p"); +const u8 gText_LinkTrainerWantsToBattle[] = _("{B_20}\nwants to battle!"); +const u8 gText_TwoLinkTrainersWantToBattle[] = _("{B_20} and {B_21}\nwant to battle!"); +const u8 gText_Trainer1SentOutPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_OPPONENT_MON1_NAME}!"); +const u8 gText_Trainer1SentOutTwoPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_OPPONENT_MON1_NAME} and {B_OPPONENT_MON2_NAME}!"); +const u8 gText_Trainer1SentOutPkmn2[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_BUFF1}!"); +const u8 gText_LinkTrainerSentOutPkmn[] = _("{B_20} sent out\n{B_OPPONENT_MON1_NAME}!"); +const u8 gText_LinkTrainerSentOutTwoPkmn[] = _("{B_20} sent out\n{B_OPPONENT_MON1_NAME} and {B_OPPONENT_MON2_NAME}!"); +const u8 gText_TwoLinkTrainersSentOutPkmn[] = _("{B_20} sent out {B_LINK_OPPONENT_MON1_NAME}!\n{B_21} sent out {B_LINK_OPPONENT_MON2_NAME}!"); +const u8 gText_LinkTrainerSentOutPkmn2[] = _("{B_20} sent out\n{B_BUFF1}!"); +const u8 gText_LinkTrainerMultiSentOutPkmn[] = _("{B_22} sent out\n{B_BUFF1}!"); +const u8 gText_GoPkmn[] = _("Go! {B_PLAYER_MON1_NAME}!"); +const u8 gText_GoTwoPkmn[] = _("Go! {B_PLAYER_MON1_NAME} and\n{B_PLAYER_MON2_NAME}!"); +const u8 gText_GoPkmn2[] = _("Go! {B_BUFF1}!"); +const u8 gText_DoItPkmn[] = _("Do it! {B_BUFF1}!"); +const u8 gText_GoForItPkmn[] = _("Go for it, {B_BUFF1}!"); +const u8 gText_YourFoesWeakGetEmPkmn[] = _("Your foe’s weak!\nGet ’em, {B_BUFF1}!"); +const u8 gText_LinkPartnerSentOutPkmnGoPkmn[] = _("{B_1F} sent out {B_LINK_PLAYER_MON2_NAME}!\nGo! {B_LINK_PLAYER_MON1_NAME}!"); +const u8 gText_PkmnThatsEnough[] = _("{B_BUFF1}, that’s enough!\nCome back!"); +const u8 gText_PkmnComeBack[] = _("{B_BUFF1}, come back!"); +const u8 gText_PkmnOkComeBack[] = _("{B_BUFF1}, OK!\nCome back!"); +const u8 gText_PkmnGoodComeBack[] = _("{B_BUFF1}, good!\nCome back!"); +const u8 gText_Trainer1WithdrewPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nwithdrew {B_BUFF1}!"); +const u8 gText_LinkTrainer1WithdrewPkmn[] = _("{B_20} withdrew\n{B_BUFF1}!"); +const u8 gText_LinkTrainer2WithdrewPkmn[] = _("{B_22} withdrew\n{B_BUFF1}!"); +const u8 gText_WildPkmnPrefix[] = _("Wild "); +const u8 gText_FoePkmnPrefix[] = _("Foe "); +const u8 gText_EmptyString8[] = _( ""); +const u8 gText_FoePkmnPrefix2[] = _("Foe"); +const u8 gText_AllyPkmnPrefix[] = _("Ally"); +const u8 gText_FoePkmnPrefix3[] = _("Foe"); +const u8 gText_AllyPkmnPrefix2[] = _("Ally"); +const u8 gText_FoePkmnPrefix4[] = _("Foe"); +const u8 gText_AllyPkmnPrefix3[] = _("Ally"); +const u8 gText_AttackerUsedX[] = _("{B_ATK_NAME_WITH_PREFIX} used\n{B_BUFF2}"); +const u8 gText_ExclamationMark[] = _("!"); +const u8 gText_ExclamationMark2[] = _("!"); +const u8 gText_ExclamationMark3[] = _("!"); +const u8 gText_ExclamationMark4[] = _("!"); +const u8 gText_ExclamationMark5[] = _("!"); +const u8 gText_HP2[] = _("HP"); +const u8 gText_Attack2[] = _("ATTACK"); +const u8 gText_Defense2[] = _("DEFENSE"); +const u8 gText_Speed[] = _("SPEED"); +const u8 gText_SpAtk2[] = _("SP. ATK"); +const u8 gText_SpDef2[] = _("SP. DEF"); +const u8 gText_Accuracy[] = _("accuracy"); +const u8 gText_Evasiveness[] = _("evasiveness"); + +const u8 * const gStatNamesTable[] = +{ + gText_HP2, gText_Attack2, gText_Defense2, + gText_Speed, gText_SpAtk2, gText_SpDef2, + gText_Accuracy, gText_Evasiveness +}; + +const u8 gText_PokeblockWasTooSpicy[] = _("was too spicy!"); +const u8 gText_PokeblockWasTooDry[] = _("was too dry!"); +const u8 gText_PokeblockWasTooSweet[] = _("was too sweet!"); +const u8 gText_PokeblockWasTooBitter[] = _("was too bitter!"); +const u8 gText_PokeblockWasTooSour[] = _("was too sour!"); + +const u8 * const gPokeblockWasTooXStringTable[] = +{ + gText_PokeblockWasTooSpicy, gText_PokeblockWasTooDry, + gText_PokeblockWasTooSweet, gText_PokeblockWasTooBitter, + gText_PokeblockWasTooSour +}; + +const u8 gText_PlayerUsedItem[] = _("{B_PLAYER_NAME} used\n{B_LAST_ITEM}!"); +const u8 gText_WallyUsedItem[] = _("WALLY used\n{B_LAST_ITEM}!"); +const u8 gText_Trainer1UsedItem[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nused {B_LAST_ITEM}!"); +const u8 gText_TrainerBlockedBall[] = _("The TRAINER blocked the BALL!"); +const u8 gText_DontBeAThief[] = _("Don’t be a thief!"); +const u8 gText_ItDodgedBall[] = _("It dodged the thrown BALL!\nThis POKéMON can’t be caught!"); +const u8 gText_YouMissedPkmn[] = _("You missed the POKéMON!"); +const u8 gText_PkmnBrokeFree[] = _("Oh, no!\nThe POKéMON broke free!"); +const u8 gText_ItAppearedCaught[] = _("Aww!\nIt appeared to be caught!"); +const u8 gText_AarghAlmostHadIt[] = _("Aargh!\nAlmost had it!"); +const u8 gText_ShootSoClose[] = _("Shoot!\nIt was so close, too!"); +const u8 gText_GotchaPkmnCaught[] = _("Gotcha!\n{B_OPPONENT_MON1_NAME} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}\p"); +const u8 gText_GotchaPkmnCaught2[] = _("Gotcha!\n{B_OPPONENT_MON1_NAME} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}{PAUSE 127}"); +const u8 gText_GiveNicknameCaptured[] = _("Give a nickname to the\ncaptured {B_OPPONENT_MON1_NAME}?"); +const u8 gText_PkmnSentToPC[] = _("{B_OPPONENT_MON1_NAME} was sent to\n{B_PC_CREATOR_NAME} PC."); +const u8 gText_Someones[] = _("someone’s"); +const u8 gText_Lanettes[] = _("LANETTE’s"); +const u8 gText_PkmnDataAddedToDex[] = _("{B_OPPONENT_MON1_NAME}’s data was\nadded to the POKéDEX.\p"); +const u8 gText_ItIsRaining[] = _("It is raining."); +const u8 gText_SandstormIsRaging[] = _("A sandstorm is raging."); +const u8 gText_BoxIsFull[] = _("The BOX is full!\nYou can’t catch any more!\p"); +const u8 gText_EnigmaBerry[] = _("ENIGMA BERRY"); +const u8 gText_BerrySuffix[] = _(" BERRY"); +const u8 gText_PkmnsItemCuredParalysis[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured paralysis!"); +const u8 gText_PkmnsItemCuredPoison[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured poison!"); +const u8 gText_PkmnsItemHealedBurn[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nhealed its burn!"); +const u8 gText_PkmnsItemDefrostedIt[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ndefrosted it!"); +const u8 gText_PkmnsItemWokeIt[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nwoke it from its sleep!"); +const u8 gText_PkmnsItemSnappedOut[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nsnapped it out of confusion!"); +const u8 gText_PkmnsItemCuredProblem[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured its {B_BUFF1} problem!"); +const u8 gText_PkmnsItemNormalizedStatus[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nnormalized its status!"); +const u8 gText_PkmnsItemRestoredHealth[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored health!"); +const u8 gText_PkmnsItemRestoredPP[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored {B_BUFF1}’s PP!"); +const u8 gText_PkmnsItemRestoredStatus[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored its status!"); +const u8 gText_PkmnsItemRestoredHPALittle[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored its HP a little!"); +const u8 gText_ItemAllowsOnlyYMove[] = _("{B_LAST_ITEM} allows the\nuse of only {B_CURRENT_MOVE}!\p"); +const u8 gText_PkmnHungOnWithX[] = _("{B_DEF_NAME_WITH_PREFIX} hung on\nusing its {B_LAST_ITEM}!"); +const u8 gText_EmptyString3[] = _(""); +const u8 gText_YouThrowABallNowRight[] = _("You throw a BALL now, right?\nI… I’ll do my best!"); + +// early declaration of strings +const u8 gText_PkmnIncapableOfPower[]; +const u8 gText_GlintAppearsInEye[]; +const u8 gText_PkmnGettingIntoPosition[]; +const u8 gText_PkmnBeganGrowlingDeeply[]; +const u8 gText_PkmnEagerForMore[]; +const u8 gText_DefeatedOpponentByReferee[]; +const u8 gText_LostToOpponentByReferee[]; +const u8 gText_TiedOpponentByReferee[]; +const u8 gText_QuestionForfeitMatch[]; +const u8 gText_ForfeitedMatch[]; +const u8 gText_Trainer1WinText[]; +const u8 gText_Trainer2WinText[]; +const u8 gText_TwoInGameTrainersDefeated[]; +const u8 gText_Trainer2LoseText[]; + +const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = +{ + gText_Trainer1LoseText, + gText_PkmnGainedEXP, + gText_PkmnGrewToLv, + gText_PkmnLearnedMove, + gText_TryToLearnMove1, + gText_TryToLearnMove2, + gText_TryToLearnMove3, + gText_PkmnForgotMove, + gText_StopLearningMove, + gText_DidNotLearnMove, + gText_PkmnLearnedMove2, + gText_AttackMissed, + gText_PkmnProtectedItself, + gText_StatsWontIncrease2, + gText_AvoidedDamage, + gText_ItDoesntAffect, + gText_PkmnFainted, + gText_PkmnFainted2, + gText_PlayerGotMoney, + gText_PlayerWhiteout, + gText_PlayerWhiteout2, + gText_PreventsEscape, + gText_HitXTimes, + gText_PkmnFellAsleep, + gText_PkmnMadeSleep, + gText_PkmnAlreadyAsleep, + gText_PkmnAlreadyAsleep2, + gText_PkmnWasntAffected, + gText_PkmnWasPoisoned, + gText_PkmnPoisonedBy, + gText_PkmnHurtByPoison, + gText_PkmnAlreadyPoisoned, + gText_PkmnBadlyPoisoned, + gText_PkmnEnergyDrained, + gText_PkmnWasBurned, + gText_PkmnBurnedBy, + gText_PkmnHurtByBurn, + gText_PkmnWasFrozen, + gText_PkmnFrozenBy, + gText_PkmnIsFrozen, + gText_PkmnWasDefrosted, + gText_PkmnWasDefrosted2, + gText_PkmnWasDefrostedBy, + gText_PkmnWasParalyzed, + gText_PkmnWasParalyzedBy, + gText_PkmnIsParalyzed, + gText_PkmnIsAlreadyParalyzed, + gText_PkmnHealedParalysis, + gText_PkmnDreamEaten, + gText_StatsWontIncrease, + gText_StatsWontDecrease, + gText_TeamStoppedWorking, + gText_FoeStoppedWorking, + gText_PkmnIsConfused, + gText_PkmnHealedConfusion, + gText_PkmnWasConfused, + gText_PkmnAlreadyConfused, + gText_PkmnFellInLove, + gText_PkmnInLove, + gText_PkmnImmobilizedByLove, + gText_PkmnBlownAway, + gText_PkmnChangedType, + gText_PkmnFlinched, + gText_PkmnRegainedHealth, + gText_PkmnHPFull, + gText_PkmnRaisedSpDef, + gText_PkmnRaisedDef, + gText_PkmnCoveredByVeil, + gText_PkmnUsedSafeguard, + gText_PkmnSafeguardExpired, + gText_PkmnWentToSleep, + gText_PkmnSleptHealthy, + gText_PkmnWhippedWhirlwind, + gText_PkmnTookSunlight, + gText_PkmnLoweredHead, + gText_PkmnIsGlowing, + gText_PkmnFlewHigh, + gText_PkmnDugHole, + gText_PkmnSqueezedByBind, + gText_PkmnTrappedInVortex, + gText_PkmnWrappedBy, + gText_PkmnClamped, + gText_PkmnHurtBy, + gText_PkmnFreedFrom, + gText_PkmnCrashed, + gText_PkmnShroudedInMist, + gText_PkmnProtectedByMist, + gText_PkmnGettingPumped, + gText_PkmnHitWithRecoil, + gText_PkmnProtectedItself2, + gText_PkmnBuffetedBySandstorm, + gText_PkmnPeltedByHail, + gText_PkmnSeeded, + gText_PkmnEvadedAttack, + gText_PkmnSappedByLeechSeed, + gText_PkmnFastAsleep, + gText_PkmnWokeUp, + gText_PkmnUproarKeptAwake, + gText_PkmnWokeUpInUproar, + gText_PkmnCausedUproar, + gText_PkmnMakingUproar, + gText_PkmnCalmedDown, + gText_PkmnCantSleepInUproar, + gText_PkmnStockpiled, + gText_PkmnCantStockpile, + gText_PkmnCantSleepInUproar2, + gText_UproarKeptPkmnAwake, + gText_PkmnStayedAwakeUsing, + gText_PkmnStoringEnergy, + gText_PkmnUnleashedEnergy, + gText_PkmnFatigueConfusion, + gText_PkmnPickedUpItem, + gText_PkmnUnaffected, + gText_PkmnTransformedInto, + gText_PkmnMadeSubstitute, + gText_PkmnHasSubstitute, + gText_SubstituteDamaged, + gText_PkmnSubstituteFaded, + gText_PkmnMustRecharge, + gText_PkmnRageBuilding, + gText_PkmnMoveWasDisabled, + gText_PkmnMoveIsDisabled, + gText_PkmnMoveDisabledNoMore, + gText_PkmnGotEncore, + gText_PkmnEncoreEnded, + gText_PkmnTookAim, + gText_PkmnSketchedMove, + gText_PkmnTryingToTakeFoe, + gText_PkmnTookFoe, + gText_PkmnReducedPP, + gText_PkmnStoleItem, + gText_PkmnCantEscape, + gText_PkmnFellIntoNightmare, + gText_PkmnLockedInNightmare, + gText_PkmnLaidCurse, + gText_PkmnAfflictedByCurse, + gText_SpikesScattered, + gText_PkmnHurtBySpikes, + gText_PkmnIdentified, + gText_PkmnPerishCountFell, + gText_PkmnBracedItself, + gText_PkmnEnduredHit, + gText_MagnitudeStrength, + gText_PkmnCutHPMaxedAttack, + gText_PkmnCopiedStatChanges, + gText_PkmnGotFree, + gText_PkmnShedLeechSeed, + gText_PkmnBlewAwaySpikes, + gText_PkmnFledFromBattle, + gText_PkmnForesawAttack, + gText_PkmnTookAttack, + gText_PkmnAttack, + gText_PkmnCenterAttention, + gText_PkmnChargingPower, + gText_NaturePowerTurnedInto, + gText_PkmnStatusNormal, + gText_PkmnHasNoMovesLeft, + gText_PkmnSubjectedToTorment, + gText_PkmnCantUseMoveTorment, + gText_PkmnTighteningFocus, + gText_PkmnFellForTaunt, + gText_PkmnCantUseMoveTaunt, + gText_PkmnReadyToHelp, + gText_PkmnSwitchedItems, + gText_PkmnCopiedFoe, + gText_PkmnMadeWish, + gText_PkmnWishCameTrue, + gText_PkmnPlantedRoots, + gText_PkmnAbsorbedNutrients, + gText_PkmnAnchoredItself, + gText_PkmnWasMadeDrowsy, + gText_PkmnKnockedOff, + gText_PkmnSwappedAbilities, + gText_PkmnSealedOpponentMove, + gText_PkmnCantUseMoveSealed, + gText_PkmnWantsGrudge, + gText_PkmnLostPPGrudge, + gText_PkmnShroudedItself, + gText_PkmnMoveBounced, + gText_PkmnWaitsForTarget, + gText_PkmnSnatchedMove, + gText_PkmnMadeItRain, + gText_PkmnRaisedSpeed, + gText_PkmnProtectedBy, + gText_PkmnPreventsUsage, + gText_PkmnRestoredHPUsing, + gText_PkmnChangedTypeWith, + gText_PkmnPreventsParalysisWith, + gText_PkmnPreventsRomanceWith, + gText_PkmnPreventsPoisoningWith, + gText_PkmnPreventsConfusionWith, + gText_PkmnRaisedFirePowerWith, + gText_PkmnAnchorsItselfWith, + gText_PkmnCutsAttackWith, + gText_PkmnPreventsStatLossWith, + gText_PkmnHurtsWith, + gText_PkmnTraced, + gText_StatSharply, + gText_StatRose, + gText_StatHarshly, + gText_StatFell, + gText_PkmnsStatChanged, + gText_PkmnsStatChanged2, + gText_PkmnsStatChanged3, + gText_PkmnsStatChanged4, + gText_CriticalHit, + gText_OneHitKO, + gText_123Poof, + gText_AndEllipsis, + gText_NotVeryEffective, + gText_SuperEffective, + gText_GotAwaySafely, + gText_WildPkmnFled, + gText_NoRunningFromTrainers, + gText_CantEscape, + gText_DontLeaveBirch, + gText_ButNothingHappened, + gText_ButItFailed, + gText_ItHurtConfusion, + gText_MirrorMoveFailed, + gText_StartedToRain, + gText_DownpourStarted, + gText_RainContinues, + gText_DownpourContinues, + gText_RainStopped, + gText_SandstormBrewed, + gText_SandstormRages, + gText_SandstormSubsided, + gText_SunlightGotBright, + gText_SunlightStrong, + gText_SunlightFaded, + gText_StartedHail, + gText_HailContinues, + gText_HailStopped, + gText_FailedToSpitUp, + gText_FailedToSwallow, + gText_WindBecameHeatWave, + gText_StatChangesGone, + gText_CoinsScattered, + gText_TooWeakForSubstitute, + gText_SharedPain, + gText_BellChimed, + gText_FaintInThree, + gText_NoPPLeft, + gText_ButNoPPLeft, + gText_PlayerUsedItem, + gText_WallyUsedItem, + gText_TrainerBlockedBall, + gText_DontBeAThief, + gText_ItDodgedBall, + gText_YouMissedPkmn, + gText_PkmnBrokeFree, + gText_ItAppearedCaught, + gText_AarghAlmostHadIt, + gText_ShootSoClose, + gText_GotchaPkmnCaught, + gText_GotchaPkmnCaught2, + gText_GiveNicknameCaptured, + gText_PkmnSentToPC, + gText_PkmnDataAddedToDex, + gText_ItIsRaining, + gText_SandstormIsRaging, + gText_CantEscape2, + gText_PkmnIgnoresAsleep, + gText_PkmnIgnoredOrders, + gText_PkmnBeganToNap, + gText_PkmnLoafing, + gText_PkmnWontObey, + gText_PkmnTurnedAway, + gText_PkmnPretendNotNotice, + gText_EnemyAboutToSwitchPkmn, + gText_CreptCloser, + gText_CantGetCloser, + gText_PkmnWatchingCarefully, + gText_PkmnCuriousAboutX, + gText_PkmnEnthralledByX, + gText_PkmnIgnoredX, + gText_ThrewPokeblockAtPkmn, + gText_OutOfSafariBalls, + gText_PkmnsItemCuredParalysis, + gText_PkmnsItemCuredPoison, + gText_PkmnsItemHealedBurn, + gText_PkmnsItemDefrostedIt, + gText_PkmnsItemWokeIt, + gText_PkmnsItemSnappedOut, + gText_PkmnsItemCuredProblem, + gText_PkmnsItemRestoredHealth, + gText_PkmnsItemRestoredPP, + gText_PkmnsItemRestoredStatus, + gText_PkmnsItemRestoredHPALittle, + gText_ItemAllowsOnlyYMove, + gText_PkmnHungOnWithX, + gText_EmptyString3, + gText_PkmnsXPreventsBurns, + gText_PkmnsXBlocksY, + gText_PkmnsXRestoredHPALittle2, + gText_PkmnsXWhippedUpSandstorm, + gText_PkmnsXPreventsYLoss, + gText_PkmnsXInfatuatedY, + gText_PkmnsXMadeYIneffective, + gText_PkmnsXCuredYProblem, + gText_ItSuckedLiquidOoze, + gText_PkmnTransformed, + gText_ElectricityWeakened, + gText_FireWeakened, + gText_PkmnHidUnderwater, + gText_PkmnSprangUp, + gText_HMMovesCantBeForgotten, + gText_XFoundOneY, + gText_PlayerDefeatedLinkTrainerTrainer1, + gText_SoothingAroma, + gText_ItemsCantBeUsedNow, + gText_ForXCommaYZ, + gText_UsingXTheYOfZN, + gText_PkmnUsedXToGetPumped, + gText_PkmnsXMadeYUseless, + gText_PkmnTrappedBySandTomb, + gText_EmptyString4, + gText_ABoosted, + gText_PkmnsXIntensifiedSun, + gText_PkmnMakesGroundMiss, + gText_YouThrowABallNowRight, + gText_PkmnsXTookAttack, + gText_PkmnChoseXAsDestiny, + gText_PkmnLostFocus, + gText_UseNextPkmn, + gText_PkmnFledUsingIts, + gText_PkmnFledUsing, + gText_PkmnWasDraggedOut, + gText_PreventedFromWorking, + gText_PkmnsItemNormalizedStatus, + gText_Trainer1UsedItem, + gText_BoxIsFull, + gText_PkmnAvoidedAttack, + gText_PkmnsXMadeItIneffective, + gText_PkmnsXPreventsFlinching, + gText_PkmnAlreadyHasBurn, + gText_StatsWontDecrease2, + gText_PkmnsXBlocksY2, + gText_PkmnsXWoreOff, + gText_PkmnRaisedDefALittle, + gText_PkmnRaisedSpDefALittle, + gText_TheWallShattered, + gText_PkmnsXPreventsYsZ, + gText_PkmnsXCuredItsYProblem, + gText_PkmnCantEscape2, + gText_PkmnObtainedX, + gText_PkmnObtainedX2, + gText_PkmnObtainedXYObtainedZ, + gText_ButNoEffect, + gText_PkmnsXHadNoEffectOnY, + gText_TwoInGameTrainersDefeated, + gText_Trainer2LoseText, + gText_PkmnIncapableOfPower, + gText_GlintAppearsInEye, + gText_PkmnGettingIntoPosition, + gText_PkmnBeganGrowlingDeeply, + gText_PkmnEagerForMore, + gText_DefeatedOpponentByReferee, + gText_LostToOpponentByReferee, + gText_TiedOpponentByReferee, + gText_QuestionForfeitMatch, + gText_ForfeitedMatch, + gText_PkmnTransferredSomeonesPC, + gText_PkmnTransferredLanettesPC, + gText_PkmnBoxSomeonesPCFull, + gText_PkmnBoxLanettesPCFull, + gText_Trainer1WinText, + gText_Trainer2WinText, +}; + +const u16 gMissStringIds[] = +{ + STRINGID_ATTACKMISSED, STRINGID_PKMNPROTECTEDITSELF, + STRINGID_PKMNAVOIDEDATTACK, STRINGID_AVOIDEDDAMAGE, + STRINGID_PKMNMAKESGROUNDMISS +}; + +// todo: change values to string Ids +const u16 gUnknown_085CC83E[] = +{ + 0x00e2, 0x00e3, 0x0021, + 0x0112, 0x0165, 0x00e8, 0x00e9, 0x00e5, 0x00ed, 0x00f0, 0x00f3, + 0x00ee, 0x00f4, 0x0066, 0x0067, 0x00ef, 0x00f5, 0x00ea, 0x00eb, + 0x00ec, 0x0065, 0x0098, 0x00e5, 0x00e5, 0x004e, 0x0160, 0x004d, + 0x0161, 0x004f, 0x0068, 0x0069, 0x001b, 0x006a, 0x0139, 0x0052, + 0x0053, 0x0070, 0x0071, 0x0073, 0x0074, 0x006c, 0x006e, 0x00f7, + 0x004c, 0x0075, 0x0076, 0x0077, 0x00d5, 0x00d6, 0x003d, 0x0130, + 0x0145, 0x0146, 0x00d7, 0x00d8, 0x003e, 0x0130, 0x0054, 0x0055, + 0x0056, 0x0057, 0x0058, 0x0059, 0x013d, 0x013e, 0x005a, 0x005c, + 0x005b, 0x005d, 0x005b, 0x0148, 0x0061, 0x00e5, 0x0063, 0x00e5, + 0x007d, 0x00e5, 0x007e, 0x00fb, 0x0028, 0x0029, 0x0037, 0x0038, + 0x0023, 0x0024, 0x002e, 0x002f, 0x0031, 0x0032, 0x0035, 0x0036, + 0x0017, 0x007c, 0x0045, 0x0136, 0x002d, 0x0139, 0x013b, 0x013c, + 0x00fd, 0x00fd, 0x00fd, 0x00fd, 0x0142, 0x00a1, 0x014f, 0x0107, + 0x0108, 0x0109, 0x010a, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, + 0x0110, 0x0110, 0x0110, 0x0111, 0x0110, 0x0110, 0x0110, 0x00f1, + 0x0110, 0x0110, 0x0110, 0x0116, 0x0117, 0x0118, 0x0119, 0x016d, + 0x011b, 0x011c, 0x011e, 0x011f, 0x0120, 0x0128, 0x0123, 0x0126, + 0x0125, 0x0124, 0x0127, 0x0129, 0x0156, 0x0131, 0x0163, 0x016a, + 0x00c7, 0x0163, 0x016a, 0x00c9, 0x0163, 0x016a, 0x0166, 0x0167, + 0x0168, 0x00cb, 0x0137, 0x0177, 0x0178, 0x0179, 0x017a, +}; + +const u16 gTrappingMoves[] = +{ + MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, 0xFFFF +}; + +const u8 gText_PkmnIsEvolving[] = _("What?\n{STR_VAR_1} is evolving!"); +const u8 gText_CongratsPkmnEvolved[] = _("Congratulations! Your {STR_VAR_1}\nevolved into {STR_VAR_2}!{UNKNOWN_A}\p"); +const u8 gText_PkmnStoppedEvolving[] = _("Huh? {STR_VAR_1}\nstopped evolving!\p"); +const u8 gText_EllipsisQuestionMark[] = _("……?\p"); +const u8 gText_WhatWillPkmnDo[] = _("What will\n{B_SCR_ACTIVE_NAME_WITH_PREFIX} do?"); +const u8 gText_WhatWillPkmnDo2[] = _("What will\n{B_PLAYER_NAME} do?"); +const u8 gText_WhatWillWallyDo[] = _("What will\nWALLY do?"); +const u8 gText_LinkStandby[] = _("{PAUSE 16}Link standby…"); +const u8 gText_BattleMenu[] = _("FIGHT{CLEAR_TO 56}BAG\nPOKéMON{CLEAR_TO 56}RUN"); +const u8 gText_SafariZoneMenu[] = _("BALL{CLEAR_TO 56}{POKEBLOCK}\nGO NEAR{CLEAR_TO 56}RUN"); +const u8 gText_MoveInterfacePP[] = _("PP "); +const u8 gText_MoveInterfaceType[] = _("TYPE/"); +const u8 gText_MoveInterfacePpType[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}PP\nTYPE/"); +const u8 gText_MoveInterfaceDynamicColors[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}"); +const u8 gText_WhichMoveToForget4[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Which move should\nbe forgotten?"); +const u8 gText_BattleYesNoChoice[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Yes\nNo"); +const u8 gText_BattleSwitchWhich[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Switch\nwhich?"); +const u8 gText_BattleSwitchWhich2[] = _("{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}"); +const u8 gText_BattleSwitchWhich3[] = _("{UP_ARROW}"); +const u8 gText_BattleSwitchWhich4[] = _("{ESCAPE 4}"); +const u8 gText_BattleSwitchWhich5[] = _("-"); + +const u8 gText_HP[] = _("HP"); +const u8 gText_Attack[] = _("ATTACK"); +const u8 gText_Defense[] = _("DEFENSE"); +const u8 gText_SpAtk[] = _("SP. ATK"); +const u8 gText_SpDef[] = _("SP. DEF"); + +const u8 * const gStatNamesTable2[] = +{ + gText_HP, gText_SpAtk, gText_Attack, + gText_SpDef, gText_Defense, gText_Speed +}; + +const u8 gText_SafariBalls[] = _("{HIGHLIGHT DARK_GREY}SAFARI BALLS"); +const u8 gText_SafariBallLeft[] = _("{HIGHLIGHT DARK_GREY}Left: $" "{HIGHLIGHT DARK_GREY}");const u8 gText_Sleep[] = _( "sleep");const u8 gText_Poison[] = _( "poison");const u8 gText_Burn[] = _( "burn");const u8 gText_Paralysis[] = _( "paralysis");const u8 gText_Ice[] = _( "ice");const u8 gText_Confusion[] = _( "confusion");const u8 gText_Love[] = _( "love"); +const u8 gText_SpaceAndSpace[] = _(" and "); +const u8 gText_CommaSpace[] = _(", "); +const u8 gText_Space2[] = _(" "); +const u8 gText_ScrollTextUp[] = _("\l"); +const u8 gText_NewLine[] = _("\n"); +const u8 gText_Are[] = _("are"); +const u8 gText_Are2[] = _("are"); +const u8 gText_BadEgg[] = _("Bad EGG"); +const u8 gText_BattleWallyName[] = _("WALLY"); +const u8 gText_Win[] = _("{HIGHLIGHT TRANSPARENT}Win"); +const u8 gText_Loss[] = _("{HIGHLIGHT TRANSPARENT}Loss"); +const u8 gText_Draw[] = _("{HIGHLIGHT TRANSPARENT}Draw"); +const u8 gText_SpaceIs[] = _(" is"); +const u8 gText_ApostropheS[] = _("’s"); + +const u8 gText_UnknownMoveTypes[][17] = +{ + _("a NORMAL move"), + _("a FIGHTING move"), + _("a FLYING move"), + _("a POISON move"), + _("a GROUND move"), + _("a ROCK move"), + _("a BUG move"), + _("a GHOST move"), + _("a STEEL move"), + _("a ??? move"), + _("a FIRE move"), + _("a WATER move"), + _("a GRASS move"), + _("an ELECTRIC move"), + _("a PSYCHIC move"), + _("an ICE move"), + _("a DRAGON move"), + _("a DARK move") +}; + +const u8 gText_BattleTourney[] = _("BATTLE TOURNEY"); +const u8 gText_Round1[] = _("Round 1"); +const u8 gText_Round2[] = _("Round 2"); +const u8 gText_Semifinal[] = _("Semifinal"); +const u8 gText_Final[] = _("Final"); + +const u8 * const gRoundsStringTable[] = +{ + gText_Round1, + gText_Round2, + gText_Semifinal, + gText_Final +}; + +const u8 gText_TheGreatNewHope[] = _("The great new hope!\p"); +const u8 gText_WillChampinshipDreamComeTrue[] = _("Will the championship dream come true?!\p"); +const u8 gText_AFormerChampion[] = _("A former CHAMPION!\p"); +const u8 gText_ThePreviousChampion[] = _("The previous CHAMPION!\p"); +const u8 gText_TheUnbeatenChampion[] = _("The unbeaten CHAMPION!\p"); + +const u8 gText_PlayerMon1Name[] = _("{B_PLAYER_MON1_NAME}"); +const u8 gText_Vs[] = _("VS"); +const u8 gText_OpponentMon1Name[] = _("{B_OPPONENT_MON1_NAME}"); +const u8 gText_Mind[] = _("Mind"); +const u8 gText_Skill[] = _("Skill"); +const u8 gText_Body[] = _("Body"); +const u8 gText_Judgement[] = _("{B_BUFF1}{CLEAR 13}Judgment{CLEAR 13}{B_BUFF2}"); +const u8 gText_TwoTrainersSentPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_OPPONENT_MON1_NAME}!\p{B_TRAINER2_CLASS} {B_TRAINER2_NAME} sent\nout {B_OPPONENT_MON2_NAME}!"); +const u8 gText_Trainer2SentOutPkmn[] = _("{B_TRAINER2_CLASS} {B_TRAINER2_NAME} sent\nout {B_BUFF1}!"); +const u8 gText_TwoTrainersWantToBattle[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} and\n{B_TRAINER2_CLASS} {B_TRAINER2_NAME}\lwant to battle!\p"); +const u8 gText_InGamePartnerSentOutZGoN[] = _("{B_PARTNER_CLASS} {B_PARTNER_NAME} sent\nout {B_PLAYER_MON2_NAME}!\lGo, {B_PLAYER_MON1_NAME}!"); +const u8 gText_TwoInGameTrainersDefeated[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} and\n{B_TRAINER2_CLASS} {B_TRAINER2_NAME}\lwere defeated!\p"); +const u8 gText_Trainer2LoseText[] = _("{B_TRAINER2_LOSE_TEXT}"); +const u8 gText_PkmnIncapableOfPower[] = _("{B_ATK_NAME_WITH_PREFIX} appears incapable\nof using its power!"); +const u8 gText_GlintAppearsInEye[] = _("A glint appears in\n{B_ACTIVE_NAME_WITH_PREFIX}’s eyes!"); +const u8 gText_PkmnGettingIntoPosition[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is getting into\nposition!"); +const u8 gText_PkmnBeganGrowlingDeeply[] = _("{B_ACTIVE_NAME_WITH_PREFIX} began growling deeply!"); +const u8 gText_PkmnEagerForMore[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is eager for more!"); + +const u16 gUnknown_085CCF0A[] = +{ + 0x016E, 0x016F, 0x0170, 0x0171 +}; + +const u8 gText_RefIfNothingIsDecided[] = _("REFEREE: If nothing is decided in\n3 turns, we will go to judging!"); +const u8 gText_RefThatsIt[] = _("REFEREE: That’s it! We will now go to\njudging to determine the winner!"); +const u8 gText_RefJudgeMind[] = _("REFEREE: Judging category 1, Mind!\nThe POKéMON showing the most guts!\p"); +const u8 gText_RefJudgeSkill[] = _("REFEREE: Judging category 2, Skill!\nThe POKéMON using moves the best!\p"); +const u8 gText_RefJudgeBody[] = _("REFEREE: Judging category 3, Body!\nThe POKéMON with the most vitality!\p"); +const u8 gText_RefJudgement1[] = _("REFEREE: Judgment: {B_BUFF1} to {B_BUFF2}!\nThe winner is {B_PLAYER_NAME}’s {B_PLAYER_MON1_NAME}!\p"); +const u8 gText_RefJudgement2[] = _("REFEREE: Judgment: {B_BUFF1} to {B_BUFF2}!\nThe winner is {B_TRAINER1_NAME}’s {B_OPPONENT_MON1_NAME}!\p"); +const u8 gText_RefJudgement3[] = _("REFEREE: Judgment: 3 to 3!\nWe have a draw!\p"); +const u8 gText_DefeatedOpponentByReferee[] = _("{B_PLAYER_MON1_NAME} defeated the opponent\n{B_OPPONENT_MON1_NAME} in a REFEREE’s decision!"); +const u8 gText_LostToOpponentByReferee[] = _("{B_PLAYER_MON1_NAME} lost to the opponent\n{B_OPPONENT_MON1_NAME} in a REFEREE’s decision!"); +const u8 gText_TiedOpponentByReferee[] = _("{B_PLAYER_MON1_NAME} tied the opponent\n{B_OPPONENT_MON1_NAME} in a REFEREE’s decision!"); +const u8 gText_RefCommenceBattle[] = _("REFEREE: {B_PLAYER_MON1_NAME} VS {B_OPPONENT_MON1_NAME}!\nCommence battling!"); + +const u8 * const gRefereeStringsTable[] = +{ + gText_RefIfNothingIsDecided, + gText_RefThatsIt, + gText_RefJudgeMind, + gText_RefJudgeSkill, + gText_RefJudgeBody, + gText_RefJudgement1, + gText_RefJudgement2, + gText_RefJudgement3, + gText_RefCommenceBattle, +}; + +const u8 gText_QuestionForfeitMatch[] = _("Would you like to forfeit the match\nand quit now?"); +const u8 gText_ForfeitedMatch[] = _("{B_PLAYER_NAME} forfeited the match!"); +const u8 gText_Trainer1WinText[] = _("{B_TRAINER1_WIN_TEXT}"); +const u8 gText_Trainer2WinText[] = _("{B_TRAINER2_WIN_TEXT}"); +const u8 gText_Trainer1Fled[] = _( "{PLAY_SE 0x0011}{B_TRAINER1_CLASS} {B_TRAINER1_NAME} fled!"); +const u8 gText_PlayerLostAgainstTrainer1[] = _("Player lost against\n{B_TRAINER1_CLASS} {B_TRAINER1_NAME}!"); +const u8 gText_PlayerBattledToDrawTrainer1[] = _("Player battled to a draw against\n{B_TRAINER1_CLASS} {B_TRAINER1_NAME}!"); +const u8 gText_RecordBattleToPass[] = _("Would you like to record your battle\non your FRONTIER PASS?"); +const u8 gText_BattleRecordedOnPass[] = _("{B_PLAYER_NAME}’s battle result was recorded\non the FRONTIER PASS."); +const u8 gText_LinkTrainerWantsToBattlePause[] = _("{B_20}\nwants to battle!{PAUSE 49}"); +const u8 gText_TwoLinkTrainersWantToBattlePause[] = _("{B_20} and {B_21}\nwant to battle!{PAUSE 49}"); + +const u16 gUnknown_085CD336[] = +{ + 0x000e, 0x0046, 0x004a, 0x006a, 0x006b, 0x006c, 0x006e, 0x006f, + 0x0079, 0x007b, 0x007d, 0x0094, 0x0096, 0x0097, 0x009b, 0x009c, + 0x009f, 0x00a4, 0x00aa, 0x00ad, 0x00b6, 0x00bf, 0x00cb, 0x00cd, + 0x00cf, 0x00d6, 0x00ed, 0x00f4, 0x00f5, 0x010a, 0x010f, 0x0112, + 0x0113, 0x011a, 0x0125, 0x0136, 0x013c, 0x0140, 0x0149, 0x014a, + 0x014e, 0x0154, 0x0000, 0x0064, 0x0069, 0x0075, 0x0085, 0x00af, + 0x010d, 0x0153, 0x0000, 0x0060, 0x0061, 0x0066, 0x0068, 0x008c, + 0x0090, 0x00a5, 0x00b8, 0x010c, 0x0111, 0x0118, 0x0119, 0x0129, + 0x012a, 0x012c, 0x0139, 0x015a, 0x015b, 0x0000, 0x0001, 0x000a, + 0x000b, 0x0011, 0x0013, 0x0014, 0x0015, 0x001e, 0x0023, 0x0025, + 0x0027, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, 0x0040, 0x0047, + 0x0051, 0x0059, 0x005a, 0x005b, 0x005c, 0x0067, 0x0076, 0x007a, + 0x0080, 0x0084, 0x008b, 0x0091, 0x00a3, 0x00a9, 0x00ab, 0x00ae, + 0x00c1, 0x00cc, 0x00d5, 0x00f9, 0x00fd, 0x00ff, 0x0100, 0x0103, + 0x0104, 0x0110, 0x011b, 0x0141, 0x0157, 0x0000, +}; + +const u8 gUnknown_085CD422[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0}; + +const u16 gUnknown_085CD42C[] = +{ + 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101, + 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, + 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, + 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000, + 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102, + 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, + 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100, + 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100, + 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, + 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, + 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, + 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x01ff, + 0x0000, 0x0100, 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100, + 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100, 0x0600, 0x0000, +}; + +const u16 gUnknown_085CD54C[] = +{ + 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101, + 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, + 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, + 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000, + 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102, + 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, + 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100, + 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100, + 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0100, 0x0f0e, 0x0000, + 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, + 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, + 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, + 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, + 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0111, 0x0100, 0x0000, 0x0201, + 0x0301, 0x0000 +}; + +const u16 * const gUnknown_085CD660[] = +{ + gUnknown_085CD42C, gUnknown_085CD54C +}; + +const u8 gUnknown_085CD668[] = {8, 4, 1, 0}; + +extern struct StringInfoBattle *gStringInfo; + +void BufferStringBattle(u16 stringID) +{ + s32 i; + const u8* stringPtr = NULL; + + gStringInfo = (struct StringInfoBattle*)(&gBattleBufferA[gActiveBank][4]); + gLastUsedItem = gStringInfo->lastItem; + gLastUsedAbility = gStringInfo->lastAbility; + gBattleScripting.bank = gStringInfo->scrActive; + *(&gBattleStruct->field_52) = gStringInfo->unk1605E; + *(&gBattleStruct->hpScale) = gStringInfo->hpScale; + gStringBank = gStringInfo->StringBank; + *(&gBattleStruct->stringMoveType) = gStringInfo->moveType; + + for (i = 0; i < BATTLE_BANKS_COUNT; i++) + { + gAbilitiesPerBank[i] = gStringInfo->abilities[i]; + } + for (i = 0; i < TEXT_BUFF_ARRAY_COUNT; i++) + { + gBattleTextBuff1[i] = gStringInfo->textBuffs[0][i]; + gBattleTextBuff2[i] = gStringInfo->textBuffs[1][i]; + gBattleTextBuff3[i] = gStringInfo->textBuffs[2][i]; + } + + switch (stringID) + { + case STRINGID_INTROMSG: // first battle msg + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + if (gBattleTypeFlags & BATTLE_TYPE_x800000) + { + stringPtr = gText_TwoTrainersWantToBattle; + } + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) + stringPtr = gText_TwoLinkTrainersWantToBattlePause; + else + stringPtr = gText_TwoLinkTrainersWantToBattle; + } + else + { + if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00) + stringPtr = gText_Trainer1WantsToBattle; + else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) + stringPtr = gText_LinkTrainerWantsToBattlePause; + else + stringPtr = gText_LinkTrainerWantsToBattle; + } + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + stringPtr = gText_TwoTrainersWantToBattle; + else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + stringPtr = gText_TwoTrainersWantToBattle; + else + stringPtr = gText_Trainer1WantsToBattle; + } + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY) + stringPtr = gText_WildPkmnAppeared2; + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) // interesting, looks like they had something planned for wild double battles + stringPtr = gText_TwoWildPkmnAppeared; + else if (gBattleTypeFlags & BATTLE_TYPE_WALLY_TUTORIAL) + stringPtr = gText_WildPkmnAppearedPause; + else + stringPtr = gText_WildPkmnAppeared; + } + break; + case STRINGID_INTROSENDOUT: // poke first send-out + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + { + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + stringPtr = gText_InGamePartnerSentOutZGoN; + else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + stringPtr = gText_GoTwoPkmn; + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + stringPtr = gText_LinkPartnerSentOutPkmnGoPkmn; + else + stringPtr = gText_GoTwoPkmn; + } + else + { + stringPtr = gText_GoPkmn; + } + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + stringPtr = gText_TwoTrainersSentPkmn; + else if (gBattleTypeFlags & BATTLE_TYPE_x800000) + stringPtr = gText_TwoTrainersSentPkmn; + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + stringPtr = gText_TwoLinkTrainersSentOutPkmn; + else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + stringPtr = gText_LinkTrainerSentOutTwoPkmn; + else + stringPtr = gText_Trainer1SentOutTwoPkmn; + } + else + { + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))) + stringPtr = gText_Trainer1SentOutPkmn; + else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00) + stringPtr = gText_Trainer1SentOutPkmn; + else + stringPtr = gText_LinkTrainerSentOutPkmn; + } + } + break; + case STRINGID_RETURNMON: // sending poke to ball msg + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + { + if (*(&gBattleStruct->hpScale) == 0) + stringPtr = gText_PkmnThatsEnough; + else if (*(&gBattleStruct->hpScale) == 1 || gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + stringPtr = gText_PkmnComeBack; + else if (*(&gBattleStruct->hpScale) == 2) + stringPtr = gText_PkmnOkComeBack; + else + stringPtr = gText_PkmnGoodComeBack; + } + else + { + if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_800 || gBattleTypeFlags & BATTLE_TYPE_x2000000) + { + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + stringPtr = gText_LinkTrainer2WithdrewPkmn; + else + stringPtr = gText_LinkTrainer1WithdrewPkmn; + } + else + { + stringPtr = gText_Trainer1WithdrewPkmn; + } + } + break; + case STRINGID_SWITCHINMON: // switch-in msg + if (GetBankSide(gBattleScripting.bank) == SIDE_PLAYER) + { + if (*(&gBattleStruct->hpScale) == 0 || gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + stringPtr = gText_GoPkmn2; + else if (*(&gBattleStruct->hpScale) == 1) + stringPtr = gText_DoItPkmn; + else if (*(&gBattleStruct->hpScale) == 2) + stringPtr = gText_GoForItPkmn; + else + stringPtr = gText_YourFoesWeakGetEmPkmn; + } + else + { + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + if (gBattleTypeFlags & BATTLE_TYPE_x800000) + { + if (gBattleScripting.bank == 1) + stringPtr = gText_Trainer1SentOutPkmn2; + else + stringPtr = gText_Trainer2SentOutPkmn; + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + stringPtr = gText_LinkTrainerMultiSentOutPkmn; + else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00) + stringPtr = gText_Trainer1SentOutPkmn2; + else + stringPtr = gText_LinkTrainerSentOutPkmn2; + } + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + { + if (gBattleScripting.bank == 1) + stringPtr = gText_Trainer1SentOutPkmn2; + else + stringPtr = gText_Trainer2SentOutPkmn; + } + else + { + stringPtr = gText_Trainer1SentOutPkmn2; + } + } + } + break; + case STRINGID_USEDMOVE: // pokemon used a move msg + sub_814F8F8(gBattleTextBuff1); + + if (gStringInfo->currentMove > LAST_MOVE_INDEX) + StringCopy(gBattleTextBuff2, gText_UnknownMoveTypes[*(&gBattleStruct->stringMoveType)]); + else + StringCopy(gBattleTextBuff2, gMoveNames[gStringInfo->currentMove]); + + sub_814F950(gBattleTextBuff2); + stringPtr = gText_AttackerUsedX; + break; + case STRINGID_BATTLEEND: // battle end + if (gBattleTextBuff1[0] & BATTLE_OUTCOME_BIT_x80) + { + gBattleTextBuff1[0] &= ~(BATTLE_OUTCOME_BIT_x80); + if (GetBankSide(gActiveBank) == SIDE_OPPONENT && gBattleTextBuff1[0] != BATTLE_DREW) + gBattleTextBuff1[0] ^= (BATTLE_LOST | BATTLE_WON); + + if (gBattleTextBuff1[0] == BATTLE_LOST || gBattleTextBuff1[0] == BATTLE_DREW) + stringPtr = gText_GotAwaySafely; + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + stringPtr = gText_TwoWildFled; + else + stringPtr = gText_WildFled; + } + else + { + if (GetBankSide(gActiveBank) == SIDE_OPPONENT && gBattleTextBuff1[0] != BATTLE_DREW) + gBattleTextBuff1[0] ^= (BATTLE_LOST | BATTLE_WON); + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + switch (gBattleTextBuff1[0]) + { + case BATTLE_WON: + if (gBattleTypeFlags & BATTLE_TYPE_x800000) + stringPtr = gText_TwoInGameTrainersDefeated; + else + stringPtr = gText_TwoLinkTrainersDefeated; + break; + case BATTLE_LOST: + stringPtr = gText_PlayerLostToTwo; + break; + case BATTLE_DREW: + stringPtr = gText_PlayerBattledToDrawVsTwo; + break; + } + } + else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00) + { + switch (gBattleTextBuff1[0]) + { + case BATTLE_WON: + stringPtr = gText_PlayerDefeatedLinkTrainerTrainer1; + break; + case BATTLE_LOST: + stringPtr = gText_PlayerLostAgainstTrainer1; + break; + case BATTLE_DREW: + stringPtr = gText_PlayerBattledToDrawTrainer1; + break; + } + } + else + { + switch (gBattleTextBuff1[0]) + { + case BATTLE_WON: + stringPtr = gText_PlayerDefeatedLinkTrainer; + break; + case BATTLE_LOST: + stringPtr = gText_PlayerLostAgainstLinkTrainer; + break; + case BATTLE_DREW: + stringPtr = gText_PlayerBattledToDrawLinkTrainer; + break; + } + } + } + break; + default: // load a string from the table + if (stringID >= BATTLESTRINGS_COUNT + BATTLESTRINGS_ID_ADDER) + { + gDisplayedStringBattle[0] = EOS; + return; + } + else + { + stringPtr = gBattleStringsTable[stringID - BATTLESTRINGS_ID_ADDER]; + } + break; + } + + BattleStringExpandPlaceholdersToDisplayedString(stringPtr); +} diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e53292442..17b0e2ff9 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -34,6 +34,7 @@ #include "pokemon_storage_system.h" #include "task.h" #include "naming_screen.h" +#include "battle_string_ids.h" // variables @@ -1375,7 +1376,7 @@ static void atk02_attackstring(void) return; if (!(gHitMarker & (HITMARKER_NO_ATTACKSTRING | HITMARKER_ATTACKSTRING_PRINTED))) { - PrepareStringBattle(4, gBankAttacker); + PrepareStringBattle(STRINGID_USEDMOVE, gBankAttacker); gHitMarker |= HITMARKER_ATTACKSTRING_PRINTED; } gBattlescriptCurrInstr++; @@ -2000,7 +2001,7 @@ static void atk0B_healthbarupdate(void) if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) { - PrepareStringBattle(0x80, gActiveBank); + PrepareStringBattle(STRINGID_SUBSTITUTEDAMAGED, gActiveBank); } else { @@ -2157,7 +2158,7 @@ static void atk0D_critmessage(void) { if (gCritMultiplier == 2 && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) { - PrepareStringBattle(0xD9, gBankAttacker); + PrepareStringBattle(STRINGID_CRITICALHIT, gBankAttacker); gBattleCommunication[MSG_DISPLAY] = 1; } gBattlescriptCurrInstr++; @@ -2229,22 +2230,22 @@ static void atk0F_resultmessage(void) switch (gBattleMoveFlags & (u8)(~(MOVESTATUS_MISSED))) { case MOVESTATUS_SUPEREFFECTIVE: - stringId = 0xDE; + stringId = STRINGID_SUPEREFFECTIVE; break; case MOVESTATUS_NOTVERYEFFECTIVE: - stringId = 0xDD; + stringId = STRINGID_NOTVERYEFFECTIVE; break; case MOVESTATUS_ONEHITKO: - stringId = 0xDA; + stringId = STRINGID_ONEHITKO; break; case MOVESTATUS_ENDURED: - stringId = 0x99; + stringId = STRINGID_PKMNENDUREDHIT; break; case MOVESTATUS_FAILED: - stringId = 0xE5; + stringId = STRINGID_BUTITFAILED; break; case MOVESTATUS_NOTAFFECTED: - stringId = 0x1B; + stringId = STRINGID_ITDOESNTAFFECT; break; case MOVESTATUS_HUNGON: gLastUsedItem = gBattleMons[gBankTarget].item; @@ -2256,7 +2257,7 @@ static void atk0F_resultmessage(void) default: if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) { - stringId = 0x1B; + stringId = STRINGID_ITDOESNTAFFECT; } else if (gBattleMoveFlags & MOVESTATUS_ONEHITKO) { @@ -2285,7 +2286,7 @@ static void atk0F_resultmessage(void) } else if (gBattleMoveFlags & MOVESTATUS_FAILED) { - stringId = 0xE5; + stringId = STRINGID_BUTITFAILED; } else { @@ -3592,7 +3593,7 @@ static void atk23_getexp(void) PREPARE_WORD_NUMBER_BUFFER(gBattleTextBuff3, 5, gBattleMoveDamage) - PrepareStringBattle(0xD, gBattleStruct->expGetterBank); + PrepareStringBattle(STRINGID_PKMNGAINEDEXP, gBattleStruct->expGetterBank); MonGainEVs(&gPlayerParty[gBattleStruct->expGetterId], gBattleMons[gBank1].species); } gBattleStruct->sentInPokes >>= 1; @@ -6181,7 +6182,7 @@ static void atk5A_yesnoboxlearnmove(void) u16 moveId = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_MOVE1 + movePosition); if (IsHMMove2(moveId)) { - PrepareStringBattle(0x13F, gActiveBank); + PrepareStringBattle(STRINGID_HMMOVESCANTBEFORGOTTEN, gActiveBank); gBattleScripting.learnMoveState = 6; } else diff --git a/sym_ewram.txt b/sym_ewram.txt index b1572bf25..0299dad2e 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -238,26 +238,7 @@ gBattle_WIN1H: @ 2022E28 gBattle_WIN1V: @ 2022E2A .space 0x2 -gDisplayedStringBattle: @ 2022E2C - .space 0x12C - -gBattleTextBuff1: @ 2022F58 - .space 0x2 - -gUnknown_02022F5A: @ 2022F5A - .space 0x2 - -gUnknown_02022F5C: @ 2022F5C - .space 0xC - -gBattleTextBuff2: @ 2022F68 - .space 0x2 - -gUnknown_02022F6A: @ 2022F6A - .space 0xE - -gBattleTextBuff3: @ 2022F78 - .space 0x10 + .include "src/battle_message.o" gUnknown_02022F88: @ 2022F88 .space 0x64 From 7552caaadc3b5ec64bc4ea8c6927d6d452238730 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 7 Oct 2017 19:59:41 +0200 Subject: [PATCH 2/7] placeholders for battle strings are done --- asm/battle_message.s | 1954 -------------------------------------- asm/battle_setup.s | 12 +- asm/battle_tower.s | 12 +- asm/rom6.s | 2 +- charmap.txt | 6 +- include/battle_2.h | 2 +- include/battle_message.h | 106 +-- include/global.h | 37 +- src/battle_2.c | 2 +- src/battle_message.c | 745 ++++++++++++++- 10 files changed, 783 insertions(+), 2095 deletions(-) diff --git a/asm/battle_message.s b/asm/battle_message.s index 9afa6e399..d78167a26 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -5,1960 +5,6 @@ .text - thumb_func_start BattleStringExpandPlaceholdersToDisplayedString -BattleStringExpandPlaceholdersToDisplayedString: @ 814E6F0 - push {lr} - ldr r1, =gDisplayedStringBattle - bl BattleStringExpandPlaceholders - pop {r1} - bx r1 - .pool - thumb_func_end BattleStringExpandPlaceholdersToDisplayedString - - thumb_func_start AppendStatusString -AppendStatusString: @ 814E700 - push {r4,r5,lr} - sub sp, 0x8 - adds r4, r0, 0 - ldr r1, =gUnknown_085CD422 - mov r0, sp - movs r2, 0x8 - bl memcpy - mov r2, sp - movs r3, 0 - b _0814E728 - .pool -_0814E71C: - strb r1, [r2] - adds r4, 0x1 - adds r2, 0x1 - adds r3, 0x1 - cmp r3, 0x7 - bhi _0814E730 -_0814E728: - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814E71C -_0814E730: - ldr r5, [sp] - ldr r4, [sp, 0x4] - movs r3, 0 - ldr r2, =gStatusConditionStringsTable -_0814E738: - ldr r1, [r2] - ldr r0, [r1] - cmp r5, r0 - bne _0814E750 - ldr r0, [r1, 0x4] - cmp r4, r0 - bne _0814E750 - ldr r0, [r2, 0x4] - b _0814E75A - .pool -_0814E750: - adds r2, 0x8 - adds r3, 0x1 - cmp r3, 0x6 - bls _0814E738 - movs r0, 0 -_0814E75A: - add sp, 0x8 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end AppendStatusString - - thumb_func_start BattleStringExpandPlaceholders - BattleStringExpandPlaceholders: @ 814E764 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x20 - mov r9, r0 - mov r8, r1 - movs r6, 0 - movs r4, 0 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 18 - ands r0, r1 - cmp r0, 0 - beq _0814E794 - ldr r0, =gUnknown_0203C7B4 - ldrb r7, [r0] - b _0814E79C - .pool -_0814E794: - bl GetMultiplayerId - lsls r0, 24 - lsrs r7, r0, 24 -_0814E79C: - mov r0, r9 - ldrb r1, [r0] - bl _0814F620 -_0814E7A4: - cmp r1, 0xFD - beq _0814E7AC - bl _0814F610 -_0814E7AC: - movs r1, 0x1 - add r9, r1 - mov r2, r9 - ldrb r0, [r2] - cmp r0, 0x34 - bls _0814E7BC - bl _0814F5C0 -_0814E7BC: - lsls r0, 2 - ldr r1, =_0814E7CC - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0814E7CC: - .4byte _0814E8A0 - .4byte _0814E8CE - .4byte _0814E90A - .4byte _0814E914 - .4byte _0814E920 - .4byte _0814E92C - .4byte _0814E960 - .4byte _0814E994 - .4byte _0814E9C8 - .4byte _0814E9FC - .4byte _0814EA38 - .4byte _0814EA78 - .4byte _0814EAB8 - .4byte _0814EAF8 - .4byte _0814EBB0 - .4byte _0814EC38 - .4byte _0814ECD4 - .4byte _0814ED70 - .4byte _0814EE0C - .4byte _0814EEA8 - .4byte _0814EF44 - .4byte _0814EF5C - .4byte _0814EF98 - .4byte _0814F080 - .4byte _0814F088 - .4byte _0814F098 - .4byte _0814F0A8 - .4byte _0814F0B8 - .4byte _0814F0D8 - .4byte _0814F164 - .4byte _0814F220 - .4byte _0814F230 - .4byte _0814F244 - .4byte _0814F258 - .4byte _0814F27C - .4byte _0814F298 - .4byte _0814F2C0 - .4byte _0814F300 - .4byte _0814F330 - .4byte _0814F3C4 - .4byte _0814F410 - .4byte _0814F418 - .4byte _0814F3E4 - .4byte _0814F3EC - .4byte _0814F43C - .4byte _0814F444 - .4byte _0814F468 - .4byte _0814F4B8 - .4byte _0814F508 - .4byte _0814F548 - .4byte _0814F594 - .4byte _0814F5B4 - .4byte _0814E8E4 -_0814E8A0: - ldr r5, =gBattleTextBuff1 - ldrb r0, [r5] - cmp r0, 0xFD - bne _0814E8B8 - ldr r4, =gStringVar1 - adds r0, r5, 0 - b _0814E8F0 - .pool -_0814E8B8: - adds r0, r5, 0 - bl AppendStatusString - adds r4, r0, 0 - cmp r4, 0 - beq _0814E8C8 - bl _0814F5C0 -_0814E8C8: - adds r4, r5, 0 - bl _0814F5C0 -_0814E8CE: - ldr r1, =gBattleTextBuff2 - ldrb r0, [r1] - cmp r0, 0xFD - bne _0814E904 - ldr r4, =gStringVar2 - b _0814E8EE - .pool -_0814E8E4: - ldr r1, =gBattleTextBuff3 - ldrb r0, [r1] - cmp r0, 0xFD - bne _0814E904 - ldr r4, =gStringVar3 -_0814E8EE: - adds r0, r1, 0 -_0814E8F0: - adds r1, r4, 0 - bl ExpandBattleTextBuffPlaceholders - bl _0814F5C0 - .pool -_0814E904: - adds r4, r1, 0 - bl _0814F5C0 -_0814E90A: - ldr r4, =gStringVar1 - bl _0814F5C0 - .pool -_0814E914: - ldr r4, =gStringVar2 - bl _0814F5C0 - .pool -_0814E920: - ldr r4, =gStringVar3 - bl _0814F5C0 - .pool -_0814E92C: - movs r0, 0 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814E960: - movs r0, 0x1 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814E994: - movs r0, 0x2 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814E9C8: - movs r0, 0x3 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814E9FC: - ldr r2, =gBattlePartyID - ldr r1, =gLinkPlayers - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r1 - ldrh r0, [r0, 0x18] - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814EA38: - ldr r2, =gBattlePartyID - ldr r1, =gLinkPlayers - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r1 - ldrh r1, [r0, 0x18] - movs r0, 0x1 - eors r0, r1 - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814EA78: - ldr r2, =gBattlePartyID - ldr r1, =gLinkPlayers - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r1 - ldrh r1, [r0, 0x18] - movs r0, 0x2 - eors r0, r1 - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814EAB8: - ldr r2, =gBattlePartyID - ldr r1, =gLinkPlayers - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r1 - ldrh r1, [r0, 0x18] - movs r0, 0x3 - eors r0, r1 - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814EAF8: - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - adds r2, r4, 0 - cmp r0, 0 - beq _0814EB74 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r1, r0 - ldr r4, =gText_WildPkmnPrefix - cmp r1, 0 - beq _0814EB36 - ldr r4, =gText_FoePkmnPrefix - b _0814EB36 - .pool -_0814EB2C: - mov r3, r8 - adds r0, r3, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 -_0814EB36: - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814EB2C - ldrb r0, [r2] - bl GetBankIdentity - adds r1, r0, 0 - movs r0, 0x1 - ands r0, r1 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814EB9E - .pool -_0814EB74: - ldrb r0, [r2] - bl GetBankIdentity - adds r1, r0, 0 - movs r0, 0x1 - ands r0, r1 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814EB9E: - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814EBB0: - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0814EBF8 - ldrb r0, [r4] - bl GetBankIdentity - adds r1, r0, 0 - movs r0, 0x1 - ands r0, r1 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, 0x4 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814EC24 - .pool -_0814EBF8: - ldrb r0, [r4] - bl GetBankIdentity - adds r1, r0, 0 - movs r0, 0x1 - ands r0, r1 - bl GetBankByIdentity - ldr r1, =gBattlePartyID - lsls r0, 24 - lsrs r0, 23 - adds r0, 0x4 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814EC24: - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814EC38: - ldr r5, =gBankAttacker - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _0814ECA8 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r1, r0 - ldr r4, =gText_WildPkmnPrefix - cmp r1, 0 - beq _0814EC56 - ldr r4, =gText_FoePkmnPrefix -_0814EC56: - ldrb r1, [r4] - adds r0, r1, 0 - ldr r3, =gBattlePartyID - ldr r2, =gEnemyParty - mov r12, r2 - adds r2, r5, 0 - cmp r0, 0xFF - beq _0814EC78 -_0814EC66: - mov r5, r8 - adds r0, r5, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814EC66 -_0814EC78: - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - add r0, r12 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814ECC2 - .pool -_0814ECA8: - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814ECC2: - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814ECD4: - ldr r5, =gBankTarget - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _0814ED44 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r1, r0 - ldr r4, =gText_WildPkmnPrefix - cmp r1, 0 - beq _0814ECF2 - ldr r4, =gText_FoePkmnPrefix -_0814ECF2: - ldrb r1, [r4] - adds r0, r1, 0 - ldr r3, =gBattlePartyID - ldr r2, =gEnemyParty - mov r12, r2 - adds r2, r5, 0 - cmp r0, 0xFF - beq _0814ED14 -_0814ED02: - mov r5, r8 - adds r0, r5, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814ED02 -_0814ED14: - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - add r0, r12 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814ED5E - .pool -_0814ED44: - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814ED5E: - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814ED70: - ldr r5, =gEffectBank - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _0814EDE0 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r1, r0 - ldr r4, =gText_WildPkmnPrefix - cmp r1, 0 - beq _0814ED8E - ldr r4, =gText_FoePkmnPrefix -_0814ED8E: - ldrb r1, [r4] - adds r0, r1, 0 - ldr r3, =gBattlePartyID - ldr r2, =gEnemyParty - mov r12, r2 - adds r2, r5, 0 - cmp r0, 0xFF - beq _0814EDB0 -_0814ED9E: - mov r5, r8 - adds r0, r5, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814ED9E -_0814EDB0: - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - add r0, r12 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814EDFA - .pool -_0814EDE0: - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814EDFA: - mov r0, sp - bl StringGetEnd10 - bl _0814F5BE - .pool -_0814EE0C: - ldr r5, =gActiveBank - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _0814EE7C - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r1, r0 - ldr r4, =gText_WildPkmnPrefix - cmp r1, 0 - beq _0814EE2A - ldr r4, =gText_FoePkmnPrefix -_0814EE2A: - ldrb r1, [r4] - adds r0, r1, 0 - ldr r3, =gBattlePartyID - ldr r2, =gEnemyParty - mov r12, r2 - adds r2, r5, 0 - cmp r0, 0xFF - beq _0814EE4C -_0814EE3A: - mov r5, r8 - adds r0, r5, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814EE3A -_0814EE4C: - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - add r0, r12 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814EE96 - .pool -_0814EE7C: - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814EE96: - mov r0, sp - bl StringGetEnd10 - b _0814F5BE - .pool -_0814EEA8: - ldr r5, =gBattleScripting - ldrb r0, [r5, 0x17] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _0814EF18 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r1, r0 - ldr r4, =gText_WildPkmnPrefix - cmp r1, 0 - beq _0814EEC6 - ldr r4, =gText_FoePkmnPrefix -_0814EEC6: - ldrb r1, [r4] - adds r0, r1, 0 - ldr r3, =gBattlePartyID - ldr r2, =gEnemyParty - mov r12, r2 - adds r2, r5, 0 - cmp r0, 0xFF - beq _0814EEE8 -_0814EED6: - mov r5, r8 - adds r0, r5, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814EED6 -_0814EEE8: - ldrb r0, [r2, 0x17] - lsls r0, 1 - adds r0, r3 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - add r0, r12 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814EF32 - .pool -_0814EF18: - ldr r1, =gBattlePartyID - ldrb r0, [r5, 0x17] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814EF32: - mov r0, sp - bl StringGetEnd10 - b _0814F5BE - .pool -_0814EF44: - ldr r0, =gStringInfo - ldr r2, [r0] - ldrh r1, [r2] - movs r0, 0xB1 - lsls r0, 1 - cmp r1, r0 - bhi _0814EF6A - ldrh r1, [r2] - b _0814EF8A - .pool -_0814EF5C: - ldr r0, =gStringInfo - ldr r2, [r0] - ldrh r1, [r2, 0x2] - movs r0, 0xB1 - lsls r0, 1 - cmp r1, r0 - bls _0814EF88 -_0814EF6A: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x8E - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - ldr r1, =gText_UnknownMoveTypes - adds r4, r0, r1 - b _0814F5C0 - .pool -_0814EF88: - ldrh r1, [r2, 0x2] -_0814EF8A: - movs r0, 0xD - muls r1, r0 - ldr r0, =gMoveNames - adds r4, r1, r0 - b _0814F5C0 - .pool -_0814EF98: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x02000002 - ands r0, r1 - cmp r0, 0 - beq _0814F06E - ldr r2, =gLastUsedItem - ldrh r0, [r2] - cmp r0, 0xAF - bne _0814F064 - movs r0, 0x40 - ands r1, r0 - cmp r1, 0 - bne _0814F014 - ldr r0, =gBattleScripting - adds r0, 0x25 - ldrb r0, [r0] - cmp r0, 0 - beq _0814EFE0 - ldr r2, =gStringBank - ldrb r1, [r2] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0814EFEC - b _0814F05C - .pool -_0814EFE0: - ldr r2, =gStringBank - ldrb r1, [r2] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0814F05C -_0814EFEC: - ldrb r0, [r2] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - ldr r0, =gEnigmaBerries - adds r1, r0 - mov r0, sp - bl StringCopy - ldr r1, =gText_BerrySuffix - mov r0, sp - bl StringAppend - b _0814F5BE - .pool -_0814F014: - ldr r2, =gLinkPlayers - ldr r0, =gBattleScripting - adds r0, 0x25 - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r1, =gStringBank - ldrb r2, [r1] - ldrh r0, [r0, 0x18] - cmp r0, r2 - bne _0814F05C - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - ldr r0, =gEnigmaBerries - adds r1, r0 - mov r0, sp - bl StringCopy - ldr r1, =gText_BerrySuffix - mov r0, sp - bl StringAppend - b _0814F5BE - .pool -_0814F05C: - ldr r4, =gText_EnigmaBerry - b _0814F5C0 - .pool -_0814F064: - ldrh r0, [r2] - mov r1, sp - bl CopyItemName - b _0814F5BE -_0814F06E: - ldr r0, =gLastUsedItem - ldrh r0, [r0] - mov r1, sp - bl CopyItemName - b _0814F5BE - .pool -_0814F080: - ldr r0, =gLastUsedAbility - b _0814F0C0 - .pool -_0814F088: - ldr r1, =gAbilitiesPerBank - ldr r0, =gBankAttacker - b _0814F0BC - .pool -_0814F098: - ldr r1, =gAbilitiesPerBank - ldr r0, =gBankTarget - b _0814F0BC - .pool -_0814F0A8: - ldr r1, =gAbilitiesPerBank - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x17] - b _0814F0BE - .pool -_0814F0B8: - ldr r1, =gAbilitiesPerBank - ldr r0, =gEffectBank -_0814F0BC: - ldrb r0, [r0] -_0814F0BE: - adds r0, r1 -_0814F0C0: - ldrb r1, [r0] - movs r0, 0xD - muls r1, r0 - ldr r0, =gAbilityNames - adds r4, r1, r0 - b _0814F5C0 - .pool -_0814F0D8: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 20 - ands r0, r1 - cmp r0, 0 - beq _0814F0F0 - bl GetSecretBaseTrainerNameIndex - b _0814F59C - .pool -_0814F0F0: - ldr r3, =gTrainerBattleOpponent_A - ldrh r2, [r3] - movs r0, 0xC0 - lsls r0, 4 - cmp r2, r0 - bne _0814F10C - bl sub_8068BB0 - lsls r0, 16 - lsrs r0, 16 - b _0814F5A0 - .pool -_0814F10C: - ldr r0, =0x000003fe - cmp r2, r0 - bne _0814F11C - bl sub_81A4D00 - b _0814F59C - .pool -_0814F11C: - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F12C - ldrh r0, [r3] - b _0814F598 - .pool -_0814F12C: - movs r0, 0x80 - lsls r0, 19 - ands r0, r1 - cmp r0, 0 - beq _0814F13E - ldrh r0, [r3] - bl sub_81D5530 - b _0814F59C -_0814F13E: - movs r0, 0x80 - lsls r0, 4 - ands r1, r0 - cmp r1, 0 - beq _0814F14E - bl sub_8165264 - b _0814F59C -_0814F14E: - ldr r2, =gTrainers - ldrh r1, [r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldrb r1, [r0, 0x1] - movs r0, 0xD - b _0814F5A2 - .pool -_0814F164: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 20 - ands r0, r1 - cmp r0, 0 - beq _0814F1AC - movs r2, 0 - ldr r4, =gBattleResources - ldr r3, [r4] -_0814F178: - mov r1, sp - adds r0, r1, r2 - ldr r1, [r3] - adds r1, 0x2 - adds r1, r2 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x6 - ble _0814F178 - mov r3, sp - adds r1, r3, r2 - movs r0, 0xFF - strb r0, [r1] - ldr r0, [r4] - ldr r0, [r0] - ldrb r1, [r0, 0xD] - mov r0, sp - bl ConvertInternationalString - b _0814F5BE - .pool -_0814F1AC: - ldr r3, =gTrainerBattleOpponent_A - ldrh r2, [r3] - movs r0, 0xC0 - lsls r0, 4 - cmp r2, r0 - bne _0814F1C4 - movs r1, 0x1 - adds r0, r7, 0 - eors r0, r1 - b _0814F284 - .pool -_0814F1C4: - ldr r0, =0x000003fe - cmp r2, r0 - bne _0814F1D8 - mov r0, sp - bl sub_81A4D50 - b _0814F5BE - .pool -_0814F1D8: - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F1E8 - ldrh r1, [r3] - b _0814F5B8 - .pool -_0814F1E8: - movs r0, 0x80 - lsls r0, 19 - ands r0, r1 - cmp r0, 0 - beq _0814F1FC - ldrh r1, [r3] - mov r0, sp - bl sub_81D5554 - b _0814F5BE -_0814F1FC: - movs r0, 0x80 - lsls r0, 4 - ands r1, r0 - cmp r1, 0 - beq _0814F20E - mov r0, sp - bl sub_8165284 - b _0814F5BE -_0814F20E: - ldrh r0, [r3] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTrainers + 0x4 @ name offset - adds r4, r1, r0 - b _0814F5C0 - .pool -_0814F220: - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - ldr r1, =gLinkPlayers + 8 - adds r4, r0, r1 - b _0814F5C0 - .pool -_0814F230: - ldr r4, =gLinkPlayers - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r4 - ldrh r1, [r0, 0x18] - movs r0, 0x2 - b _0814F266 - .pool -_0814F244: - ldr r4, =gLinkPlayers - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r4 - ldrh r1, [r0, 0x18] - movs r0, 0x1 - b _0814F266 - .pool -_0814F258: - ldr r4, =gLinkPlayers - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r4 - ldrh r1, [r0, 0x18] - movs r0, 0x3 -_0814F266: - eors r0, r1 - bl sub_806D864 - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r4, 0x8 - adds r4, r1, r4 - b _0814F5C0 - .pool -_0814F27C: - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x17] - bl sub_806D864 -_0814F284: - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - ldr r0, =gLinkPlayers + 8 - adds r4, r1, r0 - b _0814F5C0 - .pool -_0814F298: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - beq _0814F2B4 - ldr r4, =gLinkPlayers + 8 - b _0814F5C0 - .pool -_0814F2B4: - ldr r0, =gSaveBlock2Ptr - ldr r4, [r0] - b _0814F5C0 - .pool -_0814F2C0: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F2E0 - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0x2 - b _0814F55A - .pool -_0814F2E0: - movs r0, 0x80 - lsls r0, 19 - ands r1, r0 - cmp r1, 0 - beq _0814F2F8 - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0x4 - b _0814F584 - .pool -_0814F2F8: - bl sub_80B1CA4 - adds r4, r0, 0 - b _0814F5C0 -_0814F300: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F31C - ldr r0, =gTrainerBattleOpponent_A - b _0814F556 - .pool -_0814F31C: - movs r0, 0x80 - lsls r0, 19 - ands r1, r0 - cmp r1, 0 - bne _0814F328 - b _0814F5C0 -_0814F328: - ldr r0, =gTrainerBattleOpponent_A - b _0814F580 - .pool -_0814F330: - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x17] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _0814F39C - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r1, r0 - ldr r4, =gText_WildPkmnPrefix - cmp r1, 0 - beq _0814F34E - ldr r4, =gText_FoePkmnPrefix -_0814F34E: - ldrb r1, [r4] - adds r0, r1, 0 - ldr r5, =gEnemyParty - mov r12, r5 - ldr r2, =gBattleStruct - cmp r0, 0xFF - beq _0814F36E -_0814F35C: - mov r3, r8 - adds r0, r3, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814F35C -_0814F36E: - ldr r0, [r2] - adds r0, 0x52 - ldrb r1, [r0] - movs r0, 0x64 - muls r0, r1 - add r0, r12 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814F3B4 - .pool -_0814F39C: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x52 - ldrb r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814F3B4: - mov r0, sp - bl StringGetEnd10 - b _0814F5BE - .pool -_0814F3C4: - ldr r0, =0x000008ab - bl FlagGet - lsls r0, 24 - ldr r4, =gText_Someones - cmp r0, 0 - bne _0814F3D4 - b _0814F5C0 -_0814F3D4: - ldr r4, =gText_Lanettes - b _0814F5C0 - .pool -_0814F3E4: - ldr r0, =gBankAttacker - b _0814F3EE - .pool -_0814F3EC: - ldr r0, =gBankTarget -_0814F3EE: - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - ldr r4, =gText_FoePkmnPrefix3 - cmp r0, 0 - beq _0814F3FE - b _0814F5C0 -_0814F3FE: - ldr r4, =gText_AllyPkmnPrefix2 - b _0814F5C0 - .pool -_0814F410: - ldr r0, =gBankAttacker - b _0814F41A - .pool -_0814F418: - ldr r0, =gBankTarget -_0814F41A: - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - ldr r4, =gText_FoePkmnPrefix2 - cmp r0, 0 - beq _0814F42A - b _0814F5C0 -_0814F42A: - ldr r4, =gText_AllyPkmnPrefix - b _0814F5C0 - .pool -_0814F43C: - ldr r0, =gBankAttacker - b _0814F446 - .pool -_0814F444: - ldr r0, =gBankTarget -_0814F446: - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - ldr r4, =gText_FoePkmnPrefix4 - cmp r0, 0 - beq _0814F456 - b _0814F5C0 -_0814F456: - ldr r4, =gText_AllyPkmnPrefix3 - b _0814F5C0 - .pool -_0814F468: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F484 - ldr r0, =gTrainerBattleOpponent_B - b _0814F596 - .pool -_0814F484: - movs r0, 0x80 - lsls r0, 19 - ands r1, r0 - cmp r1, 0 - beq _0814F49C - ldr r0, =gTrainerBattleOpponent_B - ldrh r0, [r0] - bl sub_81D5530 - b _0814F59C - .pool -_0814F49C: - ldr r2, =gTrainers - ldr r0, =gTrainerBattleOpponent_B - ldrh r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldrb r1, [r0, 0x1] - movs r0, 0xD - b _0814F5A2 - .pool -_0814F4B8: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F4D4 - ldr r0, =gTrainerBattleOpponent_B - b _0814F5B6 - .pool -_0814F4D4: - movs r0, 0x80 - lsls r0, 19 - ands r1, r0 - cmp r1, 0 - beq _0814F4F0 - ldr r0, =gTrainerBattleOpponent_B - ldrh r1, [r0] - mov r0, sp - bl sub_81D5554 - b _0814F5BE - .pool -_0814F4F0: - ldr r0, =gTrainerBattleOpponent_B - ldrh r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - ldr r1, =gTrainers + 0x4 @ name offset - adds r4, r0, r1 - b _0814F5C0 - .pool -_0814F508: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F528 - ldr r0, =gTrainerBattleOpponent_B - ldrh r1, [r0] - movs r0, 0x2 - b _0814F55A - .pool -_0814F528: - movs r0, 0x80 - lsls r0, 19 - ands r1, r0 - cmp r1, 0 - beq _0814F540 - ldr r0, =gTrainerBattleOpponent_B - ldrh r1, [r0] - movs r0, 0x4 - b _0814F584 - .pool -_0814F540: - bl sub_80B1CE0 - adds r4, r0, 0 - b _0814F5C0 -_0814F548: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _0814F574 - ldr r0, =gTrainerBattleOpponent_B -_0814F556: - ldrh r1, [r0] - movs r0, 0x1 -_0814F55A: - bl sub_81A36D0 - ldr r4, =gStringVar4 - b _0814F5C0 - .pool -_0814F574: - movs r0, 0x80 - lsls r0, 19 - ands r1, r0 - cmp r1, 0 - beq _0814F5C0 - ldr r0, =gTrainerBattleOpponent_B -_0814F580: - ldrh r1, [r0] - movs r0, 0x3 -_0814F584: - bl sub_81D572C - ldr r4, =gStringVar4 - b _0814F5C0 - .pool -_0814F594: - ldr r0, =gPartnerTrainerId -_0814F596: - ldrh r0, [r0] -_0814F598: - bl GetFrontierOpponentClass -_0814F59C: - lsls r0, 24 - lsrs r0, 24 -_0814F5A0: - movs r1, 0xD -_0814F5A2: - muls r1, r0 - ldr r0, =gTrainerClassNames - adds r4, r1, r0 - b _0814F5C0 - .pool -_0814F5B4: - ldr r0, =gPartnerTrainerId -_0814F5B6: - ldrh r1, [r0] -_0814F5B8: - mov r0, sp - bl GetFrontierTrainerName -_0814F5BE: - mov r4, sp -_0814F5C0: - ldrb r1, [r4] - adds r0, r1, 0 - mov r5, r9 - ldrb r2, [r5] - mov r3, r9 - adds r3, 0x1 - cmp r0, 0xFF - beq _0814F5E2 -_0814F5D0: - mov r5, r8 - adds r0, r5, r6 - strb r1, [r0] - adds r6, 0x1 - adds r4, 0x1 - ldrb r1, [r4] - adds r0, r1, 0 - cmp r0, 0xFF - bne _0814F5D0 -_0814F5E2: - lsls r0, r2, 24 - lsrs r0, 24 - cmp r0, 0x24 - beq _0814F5F6 - cmp r0, 0x30 - beq _0814F5F6 - cmp r0, 0x25 - beq _0814F5F6 - cmp r0, 0x31 - bne _0814F61C -_0814F5F6: - mov r0, r8 - adds r1, r0, r6 - movs r0, 0xFC - strb r0, [r1] - adds r6, 0x1 - mov r2, r8 - adds r1, r2, r6 - movs r0, 0x9 - strb r0, [r1] - adds r6, 0x1 - b _0814F61C - .pool -_0814F610: - mov r3, r8 - adds r0, r3, r6 - strb r1, [r0] - adds r6, 0x1 - mov r3, r9 - adds r3, 0x1 -_0814F61C: - mov r9, r3 - ldrb r1, [r3] -_0814F620: - adds r0, r1, 0 - cmp r0, 0xFF - beq _0814F62A - bl _0814E7A4 -_0814F62A: - mov r5, r8 - adds r1, r5, r6 - mov r2, r9 - ldrb r0, [r2] - strb r0, [r1] - adds r6, 0x1 - adds r0, r6, 0 - add sp, 0x20 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end BattleStringExpandPlaceholders - - thumb_func_start ExpandBattleTextBuffPlaceholders -ExpandBattleTextBuffPlaceholders: @ 814F648 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0xC - adds r7, r0, 0 - adds r6, r1, 0 - movs r5, 0x1 - movs r0, 0 - mov r8, r0 - movs r0, 0xFF - strb r0, [r6] - ldrb r0, [r7, 0x1] - cmp r0, 0xFF - bne _0814F666 - b _0814F8EA -_0814F666: - adds r0, r7, r5 - ldrb r1, [r0] - adds r4, r0, 0 - cmp r1, 0xA - bls _0814F672 - b _0814F8E0 -_0814F672: - lsls r0, r1, 2 - ldr r1, =_0814F680 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0814F680: - .4byte _0814F6AC - .4byte _0814F6C8 - .4byte _0814F71C - .4byte _0814F734 - .4byte _0814F744 - .4byte _0814F7BC - .4byte _0814F7D0 - .4byte _0814F7E2 - .4byte _0814F828 - .4byte _0814F83C - .4byte _0814F858 -_0814F6AC: - adds r0, r5, r7 - ldrb r1, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r1, r0 - ldr r0, =gBattleStringsTable - subs r1, 0xC - lsls r1, 2 - adds r1, r0 - ldr r1, [r1] - b _0814F8BE - .pool -_0814F6C8: - ldrb r0, [r4, 0x1] - cmp r0, 0x2 - beq _0814F6E4 - cmp r0, 0x2 - bgt _0814F6D8 - cmp r0, 0x1 - beq _0814F6DE - b _0814F706 -_0814F6D8: - cmp r0, 0x4 - beq _0814F6EC - b _0814F706 -_0814F6DE: - ldrb r4, [r4, 0x3] - mov r8, r4 - b _0814F706 -_0814F6E4: - ldrb r1, [r4, 0x3] - ldrb r0, [r4, 0x4] - lsls r0, 8 - b _0814F702 -_0814F6EC: - ldrb r0, [r4, 0x3] - mov r8, r0 - ldrb r0, [r4, 0x4] - lsls r0, 8 - mov r1, r8 - orrs r1, r0 - ldrb r0, [r4, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r4, 0x6] - lsls r0, 24 -_0814F702: - orrs r1, r0 - mov r8, r1 -_0814F706: - adds r4, r5, r7 - ldrb r3, [r4, 0x2] - adds r0, r6, 0 - mov r1, r8 - movs r2, 0 - bl ConvertIntToDecimalStringN - adds r0, r5, 0x3 - ldrb r4, [r4, 0x1] - adds r5, r0, r4 - b _0814F8E0 -_0814F71C: - adds r0, r5, r7 - ldrb r1, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r1, r0 - movs r0, 0xD - muls r1, r0 - ldr r0, =gMoveNames - adds r1, r0 - b _0814F8BE - .pool -_0814F734: - adds r0, r5, r7 - ldrb r0, [r0, 0x1] - lsls r1, r0, 3 - subs r1, r0 - ldr r0, =gTypeNames - b _0814F846 - .pool -_0814F744: - ldrb r0, [r4, 0x1] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0814F768 - ldrb r1, [r4, 0x2] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - b _0814F7A4 - .pool -_0814F768: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0814F788 - ldr r1, =gText_FoePkmnPrefix - adds r0, r6, 0 - bl StringAppend - b _0814F790 - .pool -_0814F788: - ldr r1, =gText_WildPkmnPrefix - adds r0, r6, 0 - bl StringAppend -_0814F790: - adds r0, r5, r7 - ldrb r1, [r0, 0x2] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData -_0814F7A4: - mov r0, sp - bl StringGetEnd10 - adds r0, r6, 0 - mov r1, sp - bl StringAppend - b _0814F8DE - .pool -_0814F7BC: - ldr r1, =gStatNamesTable - adds r0, r5, r7 - ldrb r0, [r0, 0x1] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - b _0814F848 - .pool -_0814F7D0: - adds r0, r5, r7 - ldrb r1, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r1, r0 - adds r0, r6, 0 - bl GetSpeciesName - b _0814F8DE -_0814F7E2: - adds r4, r5, r7 - ldrb r0, [r4, 0x1] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0814F808 - ldrb r1, [r4, 0x2] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x2 - adds r2, r6, 0 - bl GetMonData - b _0814F81A - .pool -_0814F808: - ldrb r1, [r4, 0x2] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x2 - adds r2, r6, 0 - bl GetMonData -_0814F81A: - adds r0, r6, 0 - bl StringGetEnd10 - b _0814F8DE - .pool -_0814F828: - ldr r1, =gPokeblockWasTooXStringTable - adds r0, r5, r7 - ldrb r0, [r0, 0x1] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - b _0814F848 - .pool -_0814F83C: - adds r0, r5, r7 - ldrb r1, [r0, 0x1] - movs r0, 0xD - muls r1, r0 - ldr r0, =gAbilityNames -_0814F846: - adds r1, r0 -_0814F848: - adds r0, r6, 0 - bl StringAppend - adds r5, 0x2 - b _0814F8E0 - .pool -_0814F858: - adds r0, r5, r7 - ldrb r2, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r2, r0 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x02000002 - ands r0, r1 - cmp r0, 0 - beq _0814F8D6 - cmp r2, 0xAF - bne _0814F8CC - ldr r2, =gLinkPlayers - ldr r0, =gBattleScripting - adds r0, 0x25 - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r1, =gStringBank - ldrb r2, [r1] - ldrh r0, [r0, 0x18] - cmp r0, r2 - bne _0814F8BC - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - ldr r0, =gEnigmaBerries - adds r1, r0 - adds r0, r6, 0 - bl StringCopy - ldr r1, =gText_BerrySuffix - b _0814F8BE - .pool -_0814F8BC: - ldr r1, =gText_EnigmaBerry -_0814F8BE: - adds r0, r6, 0 - bl StringAppend - b _0814F8DE - .pool -_0814F8CC: - adds r0, r2, 0 - adds r1, r6, 0 - bl CopyItemName - b _0814F8DE -_0814F8D6: - adds r0, r2, 0 - adds r1, r6, 0 - bl CopyItemName -_0814F8DE: - adds r5, 0x3 -_0814F8E0: - adds r0, r7, r5 - ldrb r0, [r0] - cmp r0, 0xFF - beq _0814F8EA - b _0814F666 -_0814F8EA: - add sp, 0xC - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end ExpandBattleTextBuffPlaceholders thumb_func_start sub_814F8F8 sub_814F8F8: @ 814F8F8 diff --git a/asm/battle_setup.s b/asm/battle_setup.s index fcc0de95b..fbedfff2f 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -2617,8 +2617,8 @@ _080B1C96: .pool thumb_func_end sub_80B1C7C - thumb_func_start sub_80B1CA4 -sub_80B1CA4: @ 80B1CA4 + thumb_func_start GetTrainer1LoseText +GetTrainer1LoseText: @ 80B1CA4 push {r4,lr} ldr r0, =gTrainerBattleOpponent_A ldrh r1, [r0] @@ -2643,10 +2643,10 @@ _080B1CC0: pop {r1} bx r1 .pool - thumb_func_end sub_80B1CA4 + thumb_func_end GetTrainer1LoseText - thumb_func_start sub_80B1CE0 -sub_80B1CE0: @ 80B1CE0 + thumb_func_start GetTrainer2LoseText +GetTrainer2LoseText: @ 80B1CE0 push {r4,lr} ldr r4, =gStringVar4 ldr r0, =gUnknown_02038BE0 @@ -2660,7 +2660,7 @@ sub_80B1CE0: @ 80B1CE0 pop {r1} bx r1 .pool - thumb_func_end sub_80B1CE0 + thumb_func_end GetTrainer2LoseText thumb_func_start sub_80B1D04 sub_80B1D04: @ 80B1D04 diff --git a/asm/battle_tower.s b/asm/battle_tower.s index eb91121ae..59971c5d2 100755 --- a/asm/battle_tower.s +++ b/asm/battle_tower.s @@ -5857,8 +5857,8 @@ sub_8165244: @ 8165244 .pool thumb_func_end sub_8165244 - thumb_func_start sub_8165264 -sub_8165264: @ 8165264 + thumb_func_start GetEreaderTrainerClassId +GetEreaderTrainerClassId: @ 8165264 ldr r1, =gTrainerClassToNameIndex ldr r0, =gSaveBlock2Ptr ldr r0, [r0] @@ -5869,10 +5869,10 @@ sub_8165264: @ 8165264 ldrb r0, [r0] bx lr .pool - thumb_func_end sub_8165264 + thumb_func_end GetEreaderTrainerClassId - thumb_func_start sub_8165284 -sub_8165284: @ 8165284 + thumb_func_start GetEreaderTrainerName +GetEreaderTrainerName: @ 8165284 push {r4,lr} adds r3, r0, 0 movs r2, 0 @@ -5896,7 +5896,7 @@ _08165294: pop {r0} bx r0 .pool - thumb_func_end sub_8165284 + thumb_func_end GetEreaderTrainerName thumb_func_start sub_81652B4 sub_81652B4: @ 81652B4 diff --git a/asm/rom6.s b/asm/rom6.s index c53e6fe6e..0b35ab0e8 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -7347,7 +7347,7 @@ sub_8139228: @ 8139228 sub_8139238: @ 8139238 push {lr} ldr r0, =gStringVar1 - bl sub_8165284 + bl GetEreaderTrainerName pop {r0} bx r0 .pool diff --git a/charmap.txt b/charmap.txt index 8fe4147cc..05eff3012 100644 --- a/charmap.txt +++ b/charmap.txt @@ -355,12 +355,12 @@ B_LINK_OPPONENT_MON1_NAME = FD 0A B_LINK_PLAYER_MON2_NAME = FD 0B B_LINK_OPPONENT_MON2_NAME = FD 0C B_ATK_NAME_WITH_PREFIX_MON1 = FD 0D -B_ATK_NAME = FD 0E +B_ATK_PARTNER_NAME = FD 0E B_ATK_NAME_WITH_PREFIX = FD 0F B_DEF_NAME_WITH_PREFIX = FD 10 B_EFF_NAME_WITH_PREFIX = FD 11 @ EFF = short for gEffectBank -B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 12 -B_ACTIVE_NAME_WITH_PREFIX = FD 13 +B_ACTIVE_NAME_WITH_PREFIX = FD 12 +B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 13 B_CURRENT_MOVE = FD 14 B_LAST_MOVE = FD 15 B_LAST_ITEM = FD 16 diff --git a/include/battle_2.h b/include/battle_2.h index edd6b6ef3..ab5068446 100644 --- a/include/battle_2.h +++ b/include/battle_2.h @@ -25,6 +25,6 @@ extern const u8 gStatusConditionString_IceJpn[8]; extern const u8 gStatusConditionString_ConfusionJpn[8]; extern const u8 gStatusConditionString_LoveJpn[8]; -extern const u8 * const gStatusConditionStringsTable[][2]; +extern const u8 * const gStatusConditionStringsTable[7][2]; #endif // GUARD_BATTLE_2_H diff --git a/include/battle_message.h b/include/battle_message.h index 1884c9e37..be2aca9b2 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -3,59 +3,59 @@ // for 0xFD -#define B_TXT_BUFF1 00 -#define B_TXT_BUFF2 01 -#define B_TXT_COPY_VAR_1 02 -#define B_TXT_COPY_VAR_2 03 -#define B_TXT_COPY_VAR_3 04 -#define B_TXT_PLAYER_MON1_NAME 05 -#define B_TXT_OPPONENT_MON1_NAME 06 -#define B_TXT_PLAYER_MON2_NAME 07 -#define B_TXT_OPPONENT_MON2_NAME 08 -#define B_TXT_LINK_PLAYER_MON1_NAME 09 -#define B_TXT_LINK_OPPONENT_MON1_NAME 0A -#define B_TXT_LINK_PLAYER_MON2_NAME 0B -#define B_TXT_LINK_OPPONENT_MON2_NAME 0C -#define B_TXT_ATK_NAME_WITH_PREFIX_MON1 0D -#define B_TXT_ATK_NAME 0E -#define B_TXT_ATK_NAME_WITH_PREFIX 0F -#define B_TXT_DEF_NAME_WITH_PREFIX 10 -#define B_TXT_EFF_NAME_WITH_PREFIX 11 // EFF = short for gEffectBank -#define B_TXT_SCR_ACTIVE_NAME_WITH_PREFIX 12 -#define B_TXT_ACTIVE_NAME_WITH_PREFIX 13 -#define B_TXT_CURRENT_MOVE 14 -#define B_TXT_LAST_MOVE 15 -#define B_TXT_LAST_ITEM 16 -#define B_TXT_LAST_ABILITY 17 -#define B_TXT_ATK_ABILITY 18 -#define B_TXT_DEF_ABILITY 19 -#define B_TXT_SCR_ACTIVE_ABILITY 1A -#define B_TXT_EFF_ABILITY 1B -#define B_TXT_TRAINER1_CLASS 1C -#define B_TXT_TRAINER1_NAME 1D -#define B_TXT_1E 1E // trainer name for a link player -#define B_TXT_1F 1F // trainer name for a link player -#define B_TXT_20 20 // trainer name for a link player -#define B_TXT_21 21 // trainer name for a link player -#define B_TXT_22 22 // trainer name for a link player -#define B_TXT_PLAYER_NAME 23 -#define B_TXT_TRAINER1_LOSE_TEXT 24 -#define B_TXT_TRAINER1_WIN_TEXT 25 -#define B_TXT_26 26 -#define B_TXT_PC_CREATOR_NAME 27 -#define B_TXT_ATK_PREFIX1 28 -#define B_TXT_DEF_PREFIX1 29 -#define B_TXT_ATK_PREFIX2 2A -#define B_TXT_DEF_PREFIX2 2B -#define B_TXT_ATK_PREFIX3 2C -#define B_TXT_DEF_PREFIX3 2D -#define B_TXT_TRAINER2_CLASS 2E -#define B_TXT_TRAINER2_NAME 2F -#define B_TXT_TRAINER2_LOSE_TEXT 30 -#define B_TXT_TRAINER2_WIN_TEXT 31 -#define B_TXT_PARTNER_CLASS 32 -#define B_TXT_PARTNER_NAME 33 -#define B_TXT_BUFF3 34 +#define B_TXT_BUFF1 0x0 +#define B_TXT_BUFF2 0x1 +#define B_TXT_COPY_VAR_1 0x2 +#define B_TXT_COPY_VAR_2 0x3 +#define B_TXT_COPY_VAR_3 0x4 +#define B_TXT_PLAYER_MON1_NAME 0x5 +#define B_TXT_OPPONENT_MON1_NAME 0x6 +#define B_TXT_PLAYER_MON2_NAME 0x7 +#define B_TXT_OPPONENT_MON2_NAME 0x8 +#define B_TXT_LINK_PLAYER_MON1_NAME 0x9 +#define B_TXT_LINK_OPPONENT_MON1_NAME 0xA +#define B_TXT_LINK_PLAYER_MON2_NAME 0xB +#define B_TXT_LINK_OPPONENT_MON2_NAME 0xC +#define B_TXT_ATK_NAME_WITH_PREFIX_MON1 0xD +#define B_TXT_ATK_PARTNER_NAME 0xE +#define B_TXT_ATK_NAME_WITH_PREFIX 0xF +#define B_TXT_DEF_NAME_WITH_PREFIX 0x10 +#define B_TXT_EFF_NAME_WITH_PREFIX 0x11 // EFF = short for gEffectBank +#define B_TXT_ACTIVE_NAME_WITH_PREFIX 0x12 +#define B_TXT_SCR_ACTIVE_NAME_WITH_PREFIX 0x13 +#define B_TXT_CURRENT_MOVE 0x14 +#define B_TXT_LAST_MOVE 0x15 +#define B_TXT_LAST_ITEM 0x16 +#define B_TXT_LAST_ABILITY 0x17 +#define B_TXT_ATK_ABILITY 0x18 +#define B_TXT_DEF_ABILITY 0x19 +#define B_TXT_SCR_ACTIVE_ABILITY 0x1A +#define B_TXT_EFF_ABILITY 0x1B +#define B_TXT_TRAINER1_CLASS 0x1C +#define B_TXT_TRAINER1_NAME 0x1D +#define B_TXT_1E 0x1E // trainer name for a link player +#define B_TXT_1F 0x1F // trainer name for a link player +#define B_TXT_20 0x20 // trainer name for a link player +#define B_TXT_21 0x21 // trainer name for a link player +#define B_TXT_22 0x22 // trainer name for a link player +#define B_TXT_PLAYER_NAME 0x23 +#define B_TXT_TRAINER1_LOSE_TEXT 0x24 +#define B_TXT_TRAINER1_WIN_TEXT 0x25 +#define B_TXT_26 0x26 +#define B_TXT_PC_CREATOR_NAME 0x27 +#define B_TXT_ATK_PREFIX1 0x28 +#define B_TXT_DEF_PREFIX1 0x29 +#define B_TXT_ATK_PREFIX2 0x2A +#define B_TXT_DEF_PREFIX2 0x2B +#define B_TXT_ATK_PREFIX3 0x2C +#define B_TXT_DEF_PREFIX3 0x2D +#define B_TXT_TRAINER2_CLASS 0x2E +#define B_TXT_TRAINER2_NAME 0x2F +#define B_TXT_TRAINER2_LOSE_TEXT 0x30 +#define B_TXT_TRAINER2_WIN_TEXT 0x31 +#define B_TXT_PARTNER_CLASS 0x32 +#define B_TXT_PARTNER_NAME 0x33 +#define B_TXT_BUFF3 0x34 // for B_TXT_BUFF1, B_TXT_BUFF2 and B_TXT_BUFF3 diff --git a/include/global.h b/include/global.h index e0c09d29a..e98b01ee2 100644 --- a/include/global.h +++ b/include/global.h @@ -225,24 +225,25 @@ extern struct SaveBlock2 *gSaveBlock2Ptr; struct SecretBaseRecord { - /*ID?*/ /*0x1A08*/ u8 sbr_field_0; - /*0x1A09*/ u8 sbr_field_1_0:4; - /*0x1A09*/ u8 gender:1; - /*0x1A09*/ u8 sbr_field_1_5:1; - /*0x1A09*/ u8 sbr_field_1_6:2; - /*0x1A0A*/ u8 sbr_field_2[7]; // 0xFF bytes? - /*0x1A12*/ u8 trainerId[4]; // byte 0 is used for determining trainer class - /*0x1A16*/ u16 sbr_field_e; - /*0x1A18*/ u8 sbr_field_10; - /*0x1A19*/ u8 sbr_field_11; - /*0x1A1A*/ u8 decorations[16]; - /*0x1A2A*/ u8 decorationPos[16]; - /*0x1A3A*/ u32 partyPersonality[6]; - /*0x1A54*/ u16 partyMoves[6 * 4]; - /*0x1A84*/ u16 partySpecies[6]; - /*0x1A90*/ u16 partyHeldItems[6]; - /*0x1A9C*/ u8 partyLevels[6]; - /*0x1AA2*/ u8 partyEVs[6]; + u8 sbr_field_0; + u8 sbr_field_1_0:4; + u8 gender:1; + u8 sbr_field_1_5:1; + u8 sbr_field_1_6:2; + u8 trainerName[7]; + u8 trainerId[4]; // byte 0 is used for determining trainer class + u8 language; + u16 sbr_field_e; + u8 sbr_field_10; + u8 sbr_field_11; + u8 decorations[16]; + u8 decorationPos[16]; + u32 partyPersonality[6]; + u16 partyMoves[6 * 4]; + u16 partySpecies[6]; + u16 partyHeldItems[6]; + u8 partyLevels[6]; + u8 partyEVs[6]; }; #include "game_stat.h" diff --git a/src/battle_2.c b/src/battle_2.c index 0fc7e8ffd..8e48f3ed6 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -344,7 +344,7 @@ const u8 gStatusConditionString_IceJpn[8] = _("こおり$$$$"); const u8 gStatusConditionString_ConfusionJpn[8] = _("こんらん$$$"); const u8 gStatusConditionString_LoveJpn[8] = _("メロメロ$$$"); -const u8 * const gStatusConditionStringsTable[][2] = +const u8 * const gStatusConditionStringsTable[7][2] = { {gStatusConditionString_PoisonJpn, gText_Poison}, {gStatusConditionString_SleepJpn, gText_Sleep}, diff --git a/src/battle_message.c b/src/battle_message.c index aaaf23fae..510b8a581 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -5,6 +5,10 @@ #include "moves.h" #include "text.h" #include "string_util.h" +#include "items.h" +#include "event_data.h" +#include "link.h" +#include "item.h" extern u16 gLastUsedItem; extern u8 gLastUsedAbility; @@ -16,11 +20,16 @@ extern u8 gEffectBank; extern u8 gAbilitiesPerBank[BATTLE_BANKS_COUNT]; extern u32 gBattleTypeFlags; extern u16 gTrainerBattleOpponent_A; +extern u16 gTrainerBattleOpponent_B; +extern u16 gPartnerTrainerId; extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200]; extern const u8 gMoveNames[LAST_MOVE_INDEX + 1][13]; +extern const u8 gAbilityNames[][13]; +extern const u8 gTrainerClassNames[][13]; +extern const u8 gTypeNames[][7]; // strings extern const u8 gText_PkmnBoxSomeonesPCFull[]; @@ -28,9 +37,24 @@ extern const u8 gText_PkmnBoxLanettesPCFull[]; extern const u8 gText_PkmnTransferredSomeonesPC[]; extern const u8 gText_PkmnTransferredLanettesPC[]; +extern u16 sub_8068BB0(void); // pokemon_1 +extern u8 sub_81A4D00(void); // battle_frontier_2 +extern u8 GetFrontierOpponentClass(u16 trainerId); // battle_tower +extern u8 sub_81D5530(u16 trainerId); // pokenav +extern u8 GetEreaderTrainerClassId(void); // battle_tower +extern void sub_81A4D50(u8 *txtPtr); // battle_frontier_2 +extern void sub_81D5554(u8 *txtPtr, u16 trainerId); // pokenav +extern void GetEreaderTrainerName(u8 *txtPtr); +extern void sub_81A36D0(u8 arg0, u16 trainerId); // battle_frontier_2 +extern void sub_81D572C(u8 arg0, u16 trainerId); // pokenav +extern const u8* GetTrainer1LoseText(void); // battle_setup +extern const u8* GetTrainer2LoseText(void); // battle_setup +extern void GetFrontierTrainerName(u8 *dst, u16 trainerId); + // this file's functions void sub_814F8F8(u8 *txtPtr); void sub_814F950(u8 *txtPtr); +static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst); // ewram variables EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; @@ -64,33 +88,33 @@ const u8 gText_PkmnFainted2[] = _("{B_DEF_NAME_WITH_PREFIX}\nfainted!\p"); const u8 gText_PlayerGotMoney[] = _("{B_PLAYER_NAME} got ¥{B_BUFF1}\nfor winning!\p"); const u8 gText_PlayerWhiteout[] = _("{B_PLAYER_NAME} is out of\nusable POKéMON!\p"); const u8 gText_PlayerWhiteout2[] = _("{B_PLAYER_NAME} whited out!{PAUSE_UNTIL_PRESS}"); -const u8 gText_PreventsEscape[] = _("{B_ACTIVE_NAME_WITH_PREFIX} prevents\nescape with {B_SCR_ACTIVE_ABILITY}!\p"); +const u8 gText_PreventsEscape[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} prevents\nescape with {B_SCR_ACTIVE_ABILITY}!\p"); const u8 gText_CantEscape2[] = _("Can’t escape!\p"); const u8 gText_PkmnCantEscape2[] = _("{B_ATK_NAME_WITH_PREFIX} can’t escape!"); const u8 gText_HitXTimes[] = _("Hit {B_BUFF1} time(s)!"); const u8 gText_PkmnFellAsleep[] = _("{B_EFF_NAME_WITH_PREFIX}\nfell asleep!"); -const u8 gText_PkmnMadeSleep[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade {B_EFF_NAME_WITH_PREFIX} sleep!"); +const u8 gText_PkmnMadeSleep[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade {B_EFF_NAME_WITH_PREFIX} sleep!"); const u8 gText_PkmnAlreadyAsleep[] = _("{B_DEF_NAME_WITH_PREFIX} is\nalready asleep!"); const u8 gText_PkmnAlreadyAsleep2[] = _("{B_ATK_NAME_WITH_PREFIX} is\nalready asleep!"); const u8 gText_PkmnWasntAffected[] = _("{B_DEF_NAME_WITH_PREFIX}\nwasn’t affected!"); const u8 gText_PkmnWasPoisoned[] = _("{B_EFF_NAME_WITH_PREFIX}\nwas poisoned!"); -const u8 gText_PkmnPoisonedBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\npoisoned {B_EFF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnPoisonedBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\npoisoned {B_EFF_NAME_WITH_PREFIX}!"); const u8 gText_PkmnHurtByPoison[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby poison!"); const u8 gText_PkmnAlreadyPoisoned[] = _("{B_DEF_NAME_WITH_PREFIX} is already\npoisoned."); const u8 gText_PkmnBadlyPoisoned[] = _("{B_EFF_NAME_WITH_PREFIX} is badly\npoisoned!"); const u8 gText_PkmnEnergyDrained[] = _("{B_DEF_NAME_WITH_PREFIX} had its\nenergy drained!"); const u8 gText_PkmnWasBurned[] = _("{B_EFF_NAME_WITH_PREFIX} was burned!"); -const u8 gText_PkmnBurnedBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nburned {B_EFF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnBurnedBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nburned {B_EFF_NAME_WITH_PREFIX}!"); const u8 gText_PkmnHurtByBurn[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby its burn!"); const u8 gText_PkmnAlreadyHasBurn[] = _("{B_DEF_NAME_WITH_PREFIX} already\nhas a burn."); const u8 gText_PkmnWasFrozen[] = _("{B_EFF_NAME_WITH_PREFIX} was\nfrozen solid!"); -const u8 gText_PkmnFrozenBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nfroze {B_EFF_NAME_WITH_PREFIX} solid!"); +const u8 gText_PkmnFrozenBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nfroze {B_EFF_NAME_WITH_PREFIX} solid!"); const u8 gText_PkmnIsFrozen[] = _("{B_ATK_NAME_WITH_PREFIX} is\nfrozen solid!"); const u8 gText_PkmnWasDefrosted[] = _("{B_DEF_NAME_WITH_PREFIX} was\ndefrosted!"); const u8 gText_PkmnWasDefrosted2[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted!"); const u8 gText_PkmnWasDefrostedBy[] = _("{B_ATK_NAME_WITH_PREFIX} was\ndefrosted by {B_CURRENT_MOVE}!"); const u8 gText_PkmnWasParalyzed[] = _("{B_EFF_NAME_WITH_PREFIX} is paralyzed!\nIt may be unable to move!"); -const u8 gText_PkmnWasParalyzedBy[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nparalyzed {B_EFF_NAME_WITH_PREFIX}!\lIt may be unable to move!"); +const u8 gText_PkmnWasParalyzedBy[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nparalyzed {B_EFF_NAME_WITH_PREFIX}!\lIt may be unable to move!"); const u8 gText_PkmnIsParalyzed[] = _("{B_ATK_NAME_WITH_PREFIX} is paralyzed!\nIt can’t move!"); const u8 gText_PkmnIsAlreadyParalyzed[] = _("{B_DEF_NAME_WITH_PREFIX} is\nalready paralyzed!"); const u8 gText_PkmnHealedParalysis[] = _("{B_DEF_NAME_WITH_PREFIX} was\nhealed of paralysis!"); @@ -104,7 +128,7 @@ const u8 gText_PkmnHealedConfusion[] = _("{B_ATK_NAME_WITH_PREFIX} snapped\nout const u8 gText_PkmnWasConfused[] = _("{B_EFF_NAME_WITH_PREFIX} became\nconfused!"); const u8 gText_PkmnAlreadyConfused[] = _("{B_DEF_NAME_WITH_PREFIX} is\nalready confused!"); const u8 gText_PkmnFellInLove[] = _("{B_DEF_NAME_WITH_PREFIX}\nfell in love!"); -const u8 gText_PkmnInLove[] = _("{B_ATK_NAME_WITH_PREFIX} is in love\nwith {B_ACTIVE_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnInLove[] = _("{B_ATK_NAME_WITH_PREFIX} is in love\nwith {B_SCR_ACTIVE_NAME_WITH_PREFIX}!"); const u8 gText_PkmnImmobilizedByLove[] = _("{B_ATK_NAME_WITH_PREFIX} is\nimmobilized by love!"); const u8 gText_PkmnBlownAway[] = _("{B_DEF_NAME_WITH_PREFIX} was\nblown away!"); const u8 gText_PkmnChangedType[] = _("{B_ATK_NAME_WITH_PREFIX} transformed\ninto the {B_BUFF1} type!"); @@ -137,7 +161,7 @@ const u8 gText_PkmnHurtBy[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt\nby {B_BUFF1}! const u8 gText_PkmnFreedFrom[] = _("{B_ATK_NAME_WITH_PREFIX} was freed\nfrom {B_BUFF1}!"); const u8 gText_PkmnCrashed[] = _("{B_ATK_NAME_WITH_PREFIX} kept going\nand crashed!"); const u8 gText_PkmnShroudedInMist[] = _("{B_ATK_PREFIX2} became\nshrouded in MIST!"); -const u8 gText_PkmnProtectedByMist[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is protected\nby MIST!"); +const u8 gText_PkmnProtectedByMist[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is protected\nby MIST!"); const u8 gText_PkmnGettingPumped[] = _("{B_ATK_NAME_WITH_PREFIX} is getting\npumped!"); const u8 gText_PkmnHitWithRecoil[] = _("{B_ATK_NAME_WITH_PREFIX} is hit\nwith recoil!"); const u8 gText_PkmnProtectedItself2[] = _("{B_ATK_NAME_WITH_PREFIX} protected\nitself!"); @@ -149,7 +173,7 @@ const u8 gText_PkmnEvadedAttack[] = _("{B_DEF_NAME_WITH_PREFIX} evaded\nthe atta const u8 gText_PkmnSappedByLeechSeed[] = _("{B_ATK_NAME_WITH_PREFIX}’s health is\nsapped by LEECH SEED!"); const u8 gText_PkmnFastAsleep[] = _("{B_ATK_NAME_WITH_PREFIX} is fast\nasleep."); const u8 gText_PkmnWokeUp[] = _("{B_ATK_NAME_WITH_PREFIX} woke up!"); -const u8 gText_PkmnUproarKeptAwake[] = _("But {B_ACTIVE_NAME_WITH_PREFIX}’s UPROAR\nkept it awake!"); +const u8 gText_PkmnUproarKeptAwake[] = _("But {B_SCR_ACTIVE_NAME_WITH_PREFIX}’s UPROAR\nkept it awake!"); const u8 gText_PkmnWokeUpInUproar[] = _("{B_ATK_NAME_WITH_PREFIX} woke up\nin the UPROAR!"); const u8 gText_PkmnCausedUproar[] = _("{B_ATK_NAME_WITH_PREFIX} caused\nan UPROAR!"); const u8 gText_PkmnMakingUproar[] = _("{B_ATK_NAME_WITH_PREFIX} is making\nan UPROAR!"); @@ -188,7 +212,7 @@ const u8 gText_PkmnLockedInNightmare[] = _("{B_ATK_NAME_WITH_PREFIX} is locked\n const u8 gText_PkmnLaidCurse[] = _("{B_ATK_NAME_WITH_PREFIX} cut its own HP and\nlaid a CURSE on {B_DEF_NAME_WITH_PREFIX}!"); const u8 gText_PkmnAfflictedByCurse[] = _("{B_ATK_NAME_WITH_PREFIX} is afflicted\nby the CURSE!"); const u8 gText_SpikesScattered[] = _("SPIKES were scattered all around\nthe opponent’s side!"); -const u8 gText_PkmnHurtBySpikes[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is hurt\nby SPIKES!"); +const u8 gText_PkmnHurtBySpikes[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is hurt\nby SPIKES!"); const u8 gText_PkmnIdentified[] = _("{B_ATK_NAME_WITH_PREFIX} identified\n{B_DEF_NAME_WITH_PREFIX}!"); const u8 gText_PkmnPerishCountFell[] = _("{B_ATK_NAME_WITH_PREFIX}’s PERISH count\nfell to {B_BUFF1}!"); const u8 gText_PkmnBracedItself[] = _("{B_ATK_NAME_WITH_PREFIX} braced\nitself!"); @@ -231,25 +255,25 @@ const u8 gText_PkmnLostPPGrudge[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_BUFF1} lo const u8 gText_PkmnShroudedItself[] = _("{B_ATK_NAME_WITH_PREFIX} shrouded\nitself in {B_CURRENT_MOVE}!"); const u8 gText_PkmnMoveBounced[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_CURRENT_MOVE}\nwas bounced back by MAGIC COAT!"); const u8 gText_PkmnWaitsForTarget[] = _("{B_ATK_NAME_WITH_PREFIX} waits for a target\nto make a move!"); -const u8 gText_PkmnSnatchedMove[] = _("{B_DEF_NAME_WITH_PREFIX} SNATCHED\n{B_ACTIVE_NAME_WITH_PREFIX}’s move!"); +const u8 gText_PkmnSnatchedMove[] = _("{B_DEF_NAME_WITH_PREFIX} SNATCHED\n{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s move!"); const u8 gText_ElectricityWeakened[] = _("Electricity’s power was\nweakened!"); const u8 gText_FireWeakened[] = _("Fire’s power was\nweakened!"); const u8 gText_XFoundOneY[] = _("{B_ATK_NAME_WITH_PREFIX} found\none {B_LAST_ITEM}!"); const u8 gText_SoothingAroma[] = _("A soothing aroma wafted\nthrough the area!"); const u8 gText_ItemsCantBeUsedNow[] = _("Items can’t be used now.{PAUSE 64}"); -const u8 gText_ForXCommaYZ[] = _("For {B_ACTIVE_NAME_WITH_PREFIX},\n{B_LAST_ITEM} {B_BUFF1}"); -const u8 gText_PkmnUsedXToGetPumped[] = _("{B_ACTIVE_NAME_WITH_PREFIX} used\n{B_LAST_ITEM} to get pumped!"); +const u8 gText_ForXCommaYZ[] = _("For {B_SCR_ACTIVE_NAME_WITH_PREFIX},\n{B_LAST_ITEM} {B_BUFF1}"); +const u8 gText_PkmnUsedXToGetPumped[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} used\n{B_LAST_ITEM} to get pumped!"); const u8 gText_PkmnLostFocus[] = _("{B_ATK_NAME_WITH_PREFIX} lost its\nfocus and couldn’t move!"); const u8 gText_PkmnWasDraggedOut[] = _("{B_DEF_NAME_WITH_PREFIX} was\ndragged out!\p"); const u8 gText_TheWallShattered[] = _("The wall shattered!"); const u8 gText_ButNoEffect[] = _("But it had no effect!"); -const u8 gText_PkmnHasNoMovesLeft[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} has no\nmoves left!\p"); -const u8 gText_PkmnMoveIsDisabled[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_CURRENT_MOVE}\nis disabled!\p"); -const u8 gText_PkmnCantUseMoveTorment[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can’t use the same\nmove in a row due to the TORMENT!\p"); -const u8 gText_PkmnCantUseMoveTaunt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can’t use\n{B_CURRENT_MOVE} after the TAUNT!\p"); -const u8 gText_PkmnCantUseMoveSealed[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can’t use the\nsealed {B_CURRENT_MOVE}!\p"); -const u8 gText_PkmnMadeItRain[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade it rain!"); -const u8 gText_PkmnRaisedSpeed[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nraised its SPEED!"); +const u8 gText_PkmnHasNoMovesLeft[] = _("{B_ACTIVE_NAME_WITH_PREFIX} has no\nmoves left!\p"); +const u8 gText_PkmnMoveIsDisabled[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_CURRENT_MOVE}\nis disabled!\p"); +const u8 gText_PkmnCantUseMoveTorment[] = _("{B_ACTIVE_NAME_WITH_PREFIX} can’t use the same\nmove in a row due to the TORMENT!\p"); +const u8 gText_PkmnCantUseMoveTaunt[] = _("{B_ACTIVE_NAME_WITH_PREFIX} can’t use\n{B_CURRENT_MOVE} after the TAUNT!\p"); +const u8 gText_PkmnCantUseMoveSealed[] = _("{B_ACTIVE_NAME_WITH_PREFIX} can’t use the\nsealed {B_CURRENT_MOVE}!\p"); +const u8 gText_PkmnMadeItRain[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade it rain!"); +const u8 gText_PkmnRaisedSpeed[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nraised its SPEED!"); const u8 gText_PkmnProtectedBy[] = _("{B_DEF_NAME_WITH_PREFIX} was protected\nby {B_DEF_ABILITY}!"); const u8 gText_PkmnPreventsUsage[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevents {B_ATK_NAME_WITH_PREFIX}\lfrom using {B_CURRENT_MOVE}!"); const u8 gText_PkmnRestoredHPUsing[] = _("{B_DEF_NAME_WITH_PREFIX} restored HP\nusing its {B_DEF_ABILITY}!"); @@ -261,37 +285,37 @@ const u8 gText_PkmnPreventsPoisoningWith[] = _("{B_EFF_NAME_WITH_PREFIX}’s {B_ const u8 gText_PkmnPreventsConfusionWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevents confusion!"); const u8 gText_PkmnRaisedFirePowerWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nraised its FIRE power!"); const u8 gText_PkmnAnchorsItselfWith[] = _("{B_DEF_NAME_WITH_PREFIX} anchors\nitself with {B_DEF_ABILITY}!"); -const u8 gText_PkmnCutsAttackWith[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncuts {B_DEF_NAME_WITH_PREFIX}’s ATTACK!"); -const u8 gText_PkmnPreventsStatLossWith[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents stat loss!"); +const u8 gText_PkmnCutsAttackWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncuts {B_DEF_NAME_WITH_PREFIX}’s ATTACK!"); +const u8 gText_PkmnPreventsStatLossWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents stat loss!"); const u8 gText_PkmnHurtsWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nhurt {B_ATK_NAME_WITH_PREFIX}!"); -const u8 gText_PkmnTraced[] = _("{B_ACTIVE_NAME_WITH_PREFIX} TRACED\n{B_BUFF1}’s {B_BUFF2}!"); +const u8 gText_PkmnTraced[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} TRACED\n{B_BUFF1}’s {B_BUFF2}!"); const u8 gText_PkmnsXPreventsBurns[] = _("{B_EFF_NAME_WITH_PREFIX}’s {STRING 27}\nprevents burns!"); const u8 gText_PkmnsXBlocksY[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nblocks {B_CURRENT_MOVE}!"); -const u8 gText_PkmnsXBlocksY2[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nblocks {B_CURRENT_MOVE}!"); +const u8 gText_PkmnsXBlocksY2[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nblocks {B_CURRENT_MOVE}!"); const u8 gText_PkmnsXRestoredHPALittle2[] = _("{B_ATK_NAME_WITH_PREFIX}’s {STRING 24}\nrestored its HP a little!"); -const u8 gText_PkmnsXWhippedUpSandstorm[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nwhipped up a sandstorm!"); -const u8 gText_PkmnsXIntensifiedSun[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nintensified the sun’s rays!"); -const u8 gText_PkmnsXPreventsYLoss[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents {B_BUFF1} loss!"); +const u8 gText_PkmnsXWhippedUpSandstorm[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nwhipped up a sandstorm!"); +const u8 gText_PkmnsXIntensifiedSun[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nintensified the sun’s rays!"); +const u8 gText_PkmnsXPreventsYLoss[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents {B_BUFF1} loss!"); const u8 gText_PkmnsXInfatuatedY[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\ninfatuated {B_ATK_NAME_WITH_PREFIX}!"); const u8 gText_PkmnsXMadeYIneffective[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nmade {B_CURRENT_MOVE} ineffective!"); -const u8 gText_PkmnsXCuredYProblem[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); +const u8 gText_PkmnsXCuredYProblem[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); const u8 gText_ItSuckedLiquidOoze[] = _("It sucked up the\nLIQUID OOZE!"); -const u8 gText_PkmnTransformed[] = _("{B_ACTIVE_NAME_WITH_PREFIX} transformed!"); +const u8 gText_PkmnTransformed[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} transformed!"); const u8 gText_PkmnsXTookAttack[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\ntook the attack!"); const u8 gText_PkmnsXPreventsSwitching[] = _("{B_BUFF1}’s {STRING 23}\nprevents switching!\p"); -const u8 gText_PreventedFromWorking[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevented {B_ACTIVE_NAME_WITH_PREFIX}’s\l{B_BUFF1} from working!"); -const u8 gText_PkmnsXMadeItIneffective[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade it ineffective!"); +const u8 gText_PreventedFromWorking[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevented {B_SCR_ACTIVE_NAME_WITH_PREFIX}’s\l{B_BUFF1} from working!"); +const u8 gText_PkmnsXMadeItIneffective[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade it ineffective!"); const u8 gText_PkmnsXPreventsFlinching[] = _("{B_EFF_NAME_WITH_PREFIX}’s {STRING 27}\nprevents flinching!"); const u8 gText_PkmnsXPreventsYsZ[] = _("{B_ATK_NAME_WITH_PREFIX}’s {STRING 24}\nprevents {B_DEF_NAME_WITH_PREFIX}’s\l{B_DEF_ABILITY} from working!"); -const u8 gText_PkmnsXCuredItsYProblem[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); -const u8 gText_PkmnsXHadNoEffectOnY[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nhad no effect on {B_EFF_NAME_WITH_PREFIX}!"); +const u8 gText_PkmnsXCuredItsYProblem[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); +const u8 gText_PkmnsXHadNoEffectOnY[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nhad no effect on {B_EFF_NAME_WITH_PREFIX}!"); const u8 gText_StatSharply[] = _("sharply "); const u8 gText_StatRose[] = _("rose!"); const u8 gText_StatHarshly[] = _("harshly "); const u8 gText_StatFell[] = _("fell!"); const u8 gText_PkmnsStatChanged[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); const u8 gText_PkmnsStatChanged2[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); -const u8 gText_UsingXTheYOfZN[] = _("Using {B_LAST_ITEM}, the {B_BUFF1}\nof {B_ACTIVE_NAME_WITH_PREFIX} {B_BUFF2}"); +const u8 gText_UsingXTheYOfZN[] = _("Using {B_LAST_ITEM}, the {B_BUFF1}\nof {B_SCR_ACTIVE_NAME_WITH_PREFIX} {B_BUFF2}"); const u8 gText_PkmnsStatChanged3[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); const u8 gText_PkmnsStatChanged4[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}\n{B_BUFF2}"); const u8 gText_StatsWontIncrease2[] = _("{B_ATK_NAME_WITH_PREFIX}’s stats won’t\ngo any higher!"); @@ -462,18 +486,18 @@ const u8 gText_SandstormIsRaging[] = _("A sandstorm is raging."); const u8 gText_BoxIsFull[] = _("The BOX is full!\nYou can’t catch any more!\p"); const u8 gText_EnigmaBerry[] = _("ENIGMA BERRY"); const u8 gText_BerrySuffix[] = _(" BERRY"); -const u8 gText_PkmnsItemCuredParalysis[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured paralysis!"); -const u8 gText_PkmnsItemCuredPoison[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured poison!"); -const u8 gText_PkmnsItemHealedBurn[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nhealed its burn!"); -const u8 gText_PkmnsItemDefrostedIt[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ndefrosted it!"); -const u8 gText_PkmnsItemWokeIt[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nwoke it from its sleep!"); -const u8 gText_PkmnsItemSnappedOut[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nsnapped it out of confusion!"); -const u8 gText_PkmnsItemCuredProblem[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured its {B_BUFF1} problem!"); -const u8 gText_PkmnsItemNormalizedStatus[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nnormalized its status!"); -const u8 gText_PkmnsItemRestoredHealth[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored health!"); -const u8 gText_PkmnsItemRestoredPP[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored {B_BUFF1}’s PP!"); -const u8 gText_PkmnsItemRestoredStatus[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored its status!"); -const u8 gText_PkmnsItemRestoredHPALittle[] = _("{B_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored its HP a little!"); +const u8 gText_PkmnsItemCuredParalysis[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured paralysis!"); +const u8 gText_PkmnsItemCuredPoison[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured poison!"); +const u8 gText_PkmnsItemHealedBurn[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nhealed its burn!"); +const u8 gText_PkmnsItemDefrostedIt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ndefrosted it!"); +const u8 gText_PkmnsItemWokeIt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nwoke it from its sleep!"); +const u8 gText_PkmnsItemSnappedOut[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nsnapped it out of confusion!"); +const u8 gText_PkmnsItemCuredProblem[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\ncured its {B_BUFF1} problem!"); +const u8 gText_PkmnsItemNormalizedStatus[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nnormalized its status!"); +const u8 gText_PkmnsItemRestoredHealth[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored health!"); +const u8 gText_PkmnsItemRestoredPP[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored {B_BUFF1}’s PP!"); +const u8 gText_PkmnsItemRestoredStatus[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored its status!"); +const u8 gText_PkmnsItemRestoredHPALittle[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_LAST_ITEM}\nrestored its HP a little!"); const u8 gText_ItemAllowsOnlyYMove[] = _("{B_LAST_ITEM} allows the\nuse of only {B_CURRENT_MOVE}!\p"); const u8 gText_PkmnHungOnWithX[] = _("{B_DEF_NAME_WITH_PREFIX} hung on\nusing its {B_LAST_ITEM}!"); const u8 gText_EmptyString3[] = _(""); @@ -910,7 +934,7 @@ const u8 gText_PkmnIsEvolving[] = _("What?\n{STR_VAR_1} is evolving!"); const u8 gText_CongratsPkmnEvolved[] = _("Congratulations! Your {STR_VAR_1}\nevolved into {STR_VAR_2}!{UNKNOWN_A}\p"); const u8 gText_PkmnStoppedEvolving[] = _("Huh? {STR_VAR_1}\nstopped evolving!\p"); const u8 gText_EllipsisQuestionMark[] = _("……?\p"); -const u8 gText_WhatWillPkmnDo[] = _("What will\n{B_SCR_ACTIVE_NAME_WITH_PREFIX} do?"); +const u8 gText_WhatWillPkmnDo[] = _("What will\n{B_ACTIVE_NAME_WITH_PREFIX} do?"); const u8 gText_WhatWillPkmnDo2[] = _("What will\n{B_PLAYER_NAME} do?"); const u8 gText_WhatWillWallyDo[] = _("What will\nWALLY do?"); const u8 gText_LinkStandby[] = _("{PAUSE 16}Link standby…"); @@ -1013,10 +1037,10 @@ const u8 gText_InGamePartnerSentOutZGoN[] = _("{B_PARTNER_CLASS} {B_PARTNER_NAME const u8 gText_TwoInGameTrainersDefeated[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} and\n{B_TRAINER2_CLASS} {B_TRAINER2_NAME}\lwere defeated!\p"); const u8 gText_Trainer2LoseText[] = _("{B_TRAINER2_LOSE_TEXT}"); const u8 gText_PkmnIncapableOfPower[] = _("{B_ATK_NAME_WITH_PREFIX} appears incapable\nof using its power!"); -const u8 gText_GlintAppearsInEye[] = _("A glint appears in\n{B_ACTIVE_NAME_WITH_PREFIX}’s eyes!"); -const u8 gText_PkmnGettingIntoPosition[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is getting into\nposition!"); -const u8 gText_PkmnBeganGrowlingDeeply[] = _("{B_ACTIVE_NAME_WITH_PREFIX} began growling deeply!"); -const u8 gText_PkmnEagerForMore[] = _("{B_ACTIVE_NAME_WITH_PREFIX} is eager for more!"); +const u8 gText_GlintAppearsInEye[] = _("A glint appears in\n{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s eyes!"); +const u8 gText_PkmnGettingIntoPosition[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is getting into\nposition!"); +const u8 gText_PkmnBeganGrowlingDeeply[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} began growling deeply!"); +const u8 gText_PkmnEagerForMore[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is eager for more!"); const u16 gUnknown_085CCF0A[] = { @@ -1080,7 +1104,7 @@ const u16 gUnknown_085CD336[] = 0x0104, 0x0110, 0x011b, 0x0141, 0x0157, 0x0000, }; -const u8 gUnknown_085CD422[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0}; +static const u8 sDummyWeirdStatusString[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0}; const u16 gUnknown_085CD42C[] = { @@ -1426,3 +1450,620 @@ void BufferStringBattle(u16 stringID) BattleStringExpandPlaceholdersToDisplayedString(stringPtr); } + +u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src) +{ + BattleStringExpandPlaceholders(src, gDisplayedStringBattle); +} + +static const u8* TryGetStatusString(u8* src) +{ + u32 i; + u8 status[8]; + u32 chars1, chars2; + u8* statusPtr; + + memcpy(status, sDummyWeirdStatusString, 8); + + statusPtr = status; + for (i = 0; i < 8; i++) + { + if (*src == EOS) + break; + *statusPtr = *src; + src++; + statusPtr++; + } + + chars1 = *(u32*)(&status[0]); + chars2 = *(u32*)(&status[4]); + + for (i = 0; i < ARRAY_COUNT(gStatusConditionStringsTable); i++) + { + if (chars1 == *(u32*)(&gStatusConditionStringsTable[i][0][0]) + && chars2 == *(u32*)(&gStatusConditionStringsTable[i][0][4])) + return gStatusConditionStringsTable[i][1]; + } + return NULL; +} + +#define HANDLE_NICKNAME_STRING_CASE(bank, monIndex) \ + if (GetBankSide(bank) != SIDE_PLAYER) \ + { \ + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) \ + toCpy = gText_FoePkmnPrefix; \ + else \ + toCpy = gText_WildPkmnPrefix; \ + while (*toCpy != EOS) \ + { \ + dst[dstID] = *toCpy; \ + dstID++; \ + toCpy++; \ + } \ + GetMonData(&gEnemyParty[monIndex], MON_DATA_NICKNAME, text); \ + } \ + else \ + { \ + GetMonData(&gPlayerParty[monIndex], MON_DATA_NICKNAME, text); \ + } \ + StringGetEnd10(text); \ + toCpy = text; + +extern u8 gUnknown_0203C7B4; + +u32 BattleStringExpandPlaceholders(const u8* src, u8* dst) +{ + u32 dstID = 0; // if they used dstID, why not use srcID as well? + const u8* toCpy = NULL; + u8 text[30]; + u8 multiplayerID; + s32 i; + + if (gBattleTypeFlags & BATTLE_TYPE_x2000000) + multiplayerID = gUnknown_0203C7B4; + else + multiplayerID = GetMultiplayerId(); + + while (*src != EOS) + { + if (*src == PLACEHOLDER_BEGIN) + { + src++; + switch (*src) + { + case B_TXT_BUFF1: + if (gBattleTextBuff1[0] == B_BUFF_PLACEHOLDER_BEGIN) + { + ExpandBattleTextBuffPlaceholders(gBattleTextBuff1, gStringVar1); + toCpy = gStringVar1; + } + else + { + toCpy = TryGetStatusString(gBattleTextBuff1); + if (toCpy == NULL) + toCpy = gBattleTextBuff1; + } + break; + case B_TXT_BUFF2: + if (gBattleTextBuff2[0] == B_BUFF_PLACEHOLDER_BEGIN) + { + ExpandBattleTextBuffPlaceholders(gBattleTextBuff2, gStringVar2); + toCpy = gStringVar2; + } + else + toCpy = gBattleTextBuff2; + break; + case B_TXT_BUFF3: + if (gBattleTextBuff3[0] == B_BUFF_PLACEHOLDER_BEGIN) + { + ExpandBattleTextBuffPlaceholders(gBattleTextBuff3, gStringVar3); + toCpy = gStringVar3; + } + else + toCpy = gBattleTextBuff3; + break; + case B_TXT_COPY_VAR_1: + toCpy = gStringVar1; + break; + case B_TXT_COPY_VAR_2: + toCpy = gStringVar2; + break; + case B_TXT_COPY_VAR_3: + toCpy = gStringVar3; + break; + case B_TXT_PLAYER_MON1_NAME: // first player poke name + GetMonData(&gPlayerParty[gBattlePartyID[GetBankByIdentity(IDENTITY_PLAYER_MON1)]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_OPPONENT_MON1_NAME: // first enemy poke name + GetMonData(&gEnemyParty[gBattlePartyID[GetBankByIdentity(IDENTITY_OPPONENT_MON1)]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_PLAYER_MON2_NAME: // second player poke name + GetMonData(&gPlayerParty[gBattlePartyID[GetBankByIdentity(IDENTITY_PLAYER_MON2)]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_OPPONENT_MON2_NAME: // second enemy poke name + GetMonData(&gEnemyParty[gBattlePartyID[GetBankByIdentity(IDENTITY_OPPONENT_MON2)]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_LINK_PLAYER_MON1_NAME: // link first player poke name + GetMonData(&gPlayerParty[gBattlePartyID[gLinkPlayers[multiplayerID].lp_field_18]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_LINK_OPPONENT_MON1_NAME: // link first opponent poke name + GetMonData(&gEnemyParty[gBattlePartyID[gLinkPlayers[multiplayerID].lp_field_18 ^ 1]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_LINK_PLAYER_MON2_NAME: // link second player poke name + GetMonData(&gPlayerParty[gBattlePartyID[gLinkPlayers[multiplayerID].lp_field_18 ^ 2]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_LINK_OPPONENT_MON2_NAME: // link second opponent poke name + GetMonData(&gEnemyParty[gBattlePartyID[gLinkPlayers[multiplayerID].lp_field_18 ^ 3]], + MON_DATA_NICKNAME, text); + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_ATK_NAME_WITH_PREFIX_MON1: // attacker name with prefix, only bank 0/1 + HANDLE_NICKNAME_STRING_CASE(gBankAttacker, + gBattlePartyID[GetBankByIdentity(GET_BANK_SIDE(gBankAttacker))]) + break; + case B_TXT_ATK_PARTNER_NAME: // attacker partner name + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + GetMonData(&gPlayerParty[gBattlePartyID[GetBankByIdentity(GET_BANK_SIDE(gBankAttacker)) + 2]], MON_DATA_NICKNAME, text); + else + GetMonData(&gEnemyParty[gBattlePartyID[GetBankByIdentity(GET_BANK_SIDE(gBankAttacker)) + 2]], MON_DATA_NICKNAME, text); + + StringGetEnd10(text); + toCpy = text; + break; + case B_TXT_ATK_NAME_WITH_PREFIX: // attacker name with prefix + HANDLE_NICKNAME_STRING_CASE(gBankAttacker, gBattlePartyID[gBankAttacker]) + break; + case B_TXT_DEF_NAME_WITH_PREFIX: // target name with prefix + HANDLE_NICKNAME_STRING_CASE(gBankTarget, gBattlePartyID[gBankTarget]) + break; + case B_TXT_EFF_NAME_WITH_PREFIX: // effect bank name with prefix + HANDLE_NICKNAME_STRING_CASE(gEffectBank, gBattlePartyID[gEffectBank]) + break; + case B_TXT_ACTIVE_NAME_WITH_PREFIX: // active bank name with prefix + HANDLE_NICKNAME_STRING_CASE(gActiveBank, gBattlePartyID[gActiveBank]) + break; + case B_TXT_SCR_ACTIVE_NAME_WITH_PREFIX: // scripting active bank name with prefix + HANDLE_NICKNAME_STRING_CASE(gBattleScripting.bank, gBattlePartyID[gBattleScripting.bank]) + break; + case B_TXT_CURRENT_MOVE: // current move name + if (gStringInfo->currentMove > LAST_MOVE_INDEX) + toCpy = gText_UnknownMoveTypes[gBattleStruct->stringMoveType]; + else + toCpy = gMoveNames[gStringInfo->currentMove]; + break; + case B_TXT_LAST_MOVE: // last used move name + if (gStringInfo->lastMove > LAST_MOVE_INDEX) + toCpy = gText_UnknownMoveTypes[gBattleStruct->stringMoveType]; + else + toCpy = gMoveNames[gStringInfo->lastMove]; + break; + case B_TXT_LAST_ITEM: // last used item + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + if (gLastUsedItem == ITEM_ENIGMA_BERRY) + { + if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) + { + if ((gBattleScripting.multiplayerId != 0 && (gStringBank & BIT_SIDE)) + || (gBattleScripting.multiplayerId == 0 && !(gStringBank & BIT_SIDE))) + { + StringCopy(text, gEnigmaBerries[gStringBank].name); + StringAppend(text, gText_BerrySuffix); + toCpy = text; + } + else + { + toCpy = gText_EnigmaBerry; + } + } + else + { + if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 == gStringBank) + { + StringCopy(text, gEnigmaBerries[gStringBank].name); + StringAppend(text, gText_BerrySuffix); + toCpy = text; + } + else + toCpy = gText_EnigmaBerry; + } + } + else + { + CopyItemName(gLastUsedItem, text); + toCpy = text; + } + } + else + { + CopyItemName(gLastUsedItem, text); + toCpy = text; + } + break; + case B_TXT_LAST_ABILITY: // last used ability + toCpy = gAbilityNames[gLastUsedAbility]; + break; + case B_TXT_ATK_ABILITY: // attacker ability + toCpy = gAbilityNames[gAbilitiesPerBank[gBankAttacker]]; + break; + case B_TXT_DEF_ABILITY: // target ability + toCpy = gAbilityNames[gAbilitiesPerBank[gBankTarget]]; + break; + case B_TXT_SCR_ACTIVE_ABILITY: // scripting active ability + toCpy = gAbilityNames[gAbilitiesPerBank[gBattleScripting.bank]]; + break; + case B_TXT_EFF_ABILITY: // effect bank ability + toCpy = gAbilityNames[gAbilitiesPerBank[gEffectBank]]; + break; + case B_TXT_TRAINER1_CLASS: // trainer class name + if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE) + toCpy = gTrainerClassNames[GetSecretBaseTrainerNameIndex()]; + else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00) + toCpy = gTrainerClassNames[sub_8068BB0()]; + else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_3FE) + toCpy = gTrainerClassNames[sub_81A4D00()]; + else if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + toCpy = gTrainerClassNames[GetFrontierOpponentClass(gTrainerBattleOpponent_A)]; + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + toCpy = gTrainerClassNames[sub_81D5530(gTrainerBattleOpponent_A)]; + else if (gBattleTypeFlags & BATTLE_TYPE_EREADER_TRAINER) + toCpy = gTrainerClassNames[GetEreaderTrainerClassId()]; + else + toCpy = gTrainerClassNames[gTrainers[gTrainerBattleOpponent_A].trainerClass]; + break; + case B_TXT_TRAINER1_NAME: // trainer1 name + if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE) + { + for (i = 0; i < (s32) ARRAY_COUNT(gBattleResources->secretBase->trainerName); i++) + text[i] = gBattleResources->secretBase->trainerName[i]; + text[i] = EOS; + ConvertInternationalString(text, gBattleResources->secretBase->language); + toCpy = text; + } + else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00) + { + toCpy = gLinkPlayers[multiplayerID ^ BIT_SIDE].name; + } + else if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_3FE) + { + sub_81A4D50(text); + toCpy = text; + } + else if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + GetFrontierTrainerName(text, gTrainerBattleOpponent_A); + toCpy = text; + } + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + sub_81D5554(text, gTrainerBattleOpponent_A); + toCpy = text; + } + else if (gBattleTypeFlags & BATTLE_TYPE_EREADER_TRAINER) + { + GetEreaderTrainerName(text); + toCpy = text; + } + else + { + toCpy = gTrainers[gTrainerBattleOpponent_A].trainerName; + } + break; + case B_TXT_1E: // link player name? + toCpy = gLinkPlayers[multiplayerID].name; + break; + case B_TXT_1F: // link partner name? + toCpy = gLinkPlayers[sub_806D864(2 ^ gLinkPlayers[multiplayerID].lp_field_18)].name; + break; + case B_TXT_20: // link opponent 1 name? + toCpy = gLinkPlayers[sub_806D864(1 ^ gLinkPlayers[multiplayerID].lp_field_18)].name; + break; + case B_TXT_21: // link opponent 2 name? + toCpy = gLinkPlayers[sub_806D864(3 ^ gLinkPlayers[multiplayerID].lp_field_18)].name; + break; + case B_TXT_22: // link scripting active name + toCpy = gLinkPlayers[sub_806D864(gBattleScripting.bank)].name; + break; + case B_TXT_PLAYER_NAME: // player name + if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) + toCpy = gLinkPlayers[0].name; + else + toCpy = gSaveBlock2Ptr->playerName; + break; + case B_TXT_TRAINER1_LOSE_TEXT: // trainerA lose text + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + sub_81A36D0(2, gTrainerBattleOpponent_A); + toCpy = gStringVar4; + } + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + sub_81D572C(4, gTrainerBattleOpponent_A); + toCpy = gStringVar4; + } + else + { + toCpy = GetTrainer1LoseText(); + } + break; + case B_TXT_TRAINER1_WIN_TEXT: // trainerA win text + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + sub_81A36D0(1, gTrainerBattleOpponent_A); + toCpy = gStringVar4; + } + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + sub_81D572C(3, gTrainerBattleOpponent_A); + toCpy = gStringVar4; + } + break; + case B_TXT_26: // ? + HANDLE_NICKNAME_STRING_CASE(gBattleScripting.bank, *(&gBattleStruct->field_52)) + break; + case B_TXT_PC_CREATOR_NAME: // lanette pc + if (FlagGet(SYS_PC_LANETTE)) + toCpy = gText_Lanettes; + else + toCpy = gText_Someones; + break; + case B_TXT_ATK_PREFIX2: + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + toCpy = gText_AllyPkmnPrefix2; + else + toCpy = gText_FoePkmnPrefix3; + break; + case B_TXT_DEF_PREFIX2: + if (GetBankSide(gBankTarget) == SIDE_PLAYER) + toCpy = gText_AllyPkmnPrefix2; + else + toCpy = gText_FoePkmnPrefix3; + break; + case B_TXT_ATK_PREFIX1: + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + toCpy = gText_AllyPkmnPrefix; + else + toCpy = gText_FoePkmnPrefix2; + break; + case B_TXT_DEF_PREFIX1: + if (GetBankSide(gBankTarget) == SIDE_PLAYER) + toCpy = gText_AllyPkmnPrefix; + else + toCpy = gText_FoePkmnPrefix2; + break; + case B_TXT_ATK_PREFIX3: + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + toCpy = gText_AllyPkmnPrefix3; + else + toCpy = gText_FoePkmnPrefix4; + break; + case B_TXT_DEF_PREFIX3: + if (GetBankSide(gBankTarget) == SIDE_PLAYER) + toCpy = gText_AllyPkmnPrefix3; + else + toCpy = gText_FoePkmnPrefix4; + break; + case B_TXT_TRAINER2_CLASS: + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + toCpy = gTrainerClassNames[GetFrontierOpponentClass(gTrainerBattleOpponent_B)]; + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + toCpy = gTrainerClassNames[sub_81D5530(gTrainerBattleOpponent_B)]; + else + toCpy = gTrainerClassNames[gTrainers[gTrainerBattleOpponent_B].trainerClass]; + break; + case B_TXT_TRAINER2_NAME: + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + GetFrontierTrainerName(text, gTrainerBattleOpponent_B); + toCpy = text; + } + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + sub_81D5554(text, gTrainerBattleOpponent_B); + toCpy = text; + } + else + { + toCpy = gTrainers[gTrainerBattleOpponent_B].trainerName; + } + break; + case B_TXT_TRAINER2_LOSE_TEXT: + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + sub_81A36D0(2, gTrainerBattleOpponent_B); + toCpy = gStringVar4; + } + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + sub_81D572C(4, gTrainerBattleOpponent_B); + toCpy = gStringVar4; + } + else + { + toCpy = GetTrainer2LoseText(); + } + break; + case B_TXT_TRAINER2_WIN_TEXT: + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + sub_81A36D0(1, gTrainerBattleOpponent_B); + toCpy = gStringVar4; + } + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + sub_81D572C(3, gTrainerBattleOpponent_B); + toCpy = gStringVar4; + } + break; + case B_TXT_PARTNER_CLASS: + toCpy = gTrainerClassNames[GetFrontierOpponentClass(gPartnerTrainerId)]; + break; + case B_TXT_PARTNER_NAME: + GetFrontierTrainerName(text, gPartnerTrainerId); + toCpy = text; + break; + } + + // missing if (toCpy != NULL) check + while (*toCpy != EOS) + { + dst[dstID] = *toCpy; + dstID++; + toCpy++; + } + if (*src == B_TXT_TRAINER1_LOSE_TEXT || *src == B_TXT_TRAINER2_LOSE_TEXT + || *src == B_TXT_TRAINER1_WIN_TEXT || *src == B_TXT_TRAINER2_WIN_TEXT) + { + dst[dstID] = EXT_CTRL_CODE_BEGIN; + dstID++; + dst[dstID] = 9; + dstID++; + } + } + else + { + dst[dstID] = *src; + dstID++; + } + src++; + } + + dst[dstID] = *src; + dstID++; + + return dstID; +} + +// TODO: move these to a general header like util.h +#define ByteRead16(ptr) ((ptr)[0] | ((ptr)[1] << 8)) +#define ByteRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) + +static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) +{ + u32 srcID = 1; + u32 value = 0; + u8 text[12]; + u16 hword; + + *dst = EOS; + while (src[srcID] != B_BUFF_EOS) + { + switch (src[srcID]) + { + case B_BUFF_STRING: // battle string + hword = ByteRead16(&src[srcID + 1]); + StringAppend(dst, gBattleStringsTable[hword - BATTLESTRINGS_ID_ADDER]); + srcID += 3; + break; + case B_BUFF_NUMBER: // int to string + switch (src[srcID + 1]) + { + case 1: + value = src[srcID + 3]; + break; + case 2: + value = ByteRead16(&src[srcID + 3]); + break; + case 4: + value = ByteRead32(&src[srcID + 3]); + break; + } + ConvertIntToDecimalStringN(dst, value, 0, src[srcID + 2]); + srcID += src[srcID + 1] + 3; + break; + case B_BUFF_MOVE: // move name + StringAppend(dst, gMoveNames[ByteRead16(&src[srcID + 1])]); + srcID += 3; + break; + case B_BUFF_TYPE: // type name + StringAppend(dst, gTypeNames[src[srcID + 1]]); + srcID += 2; + break; + case B_BUFF_MON_NICK_WITH_PREFIX: // poke nick with prefix + if (GetBankSide(src[srcID + 1]) == SIDE_PLAYER) + { + GetMonData(&gPlayerParty[src[srcID + 2]], MON_DATA_NICKNAME, text); + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + StringAppend(dst, gText_FoePkmnPrefix); + else + StringAppend(dst, gText_WildPkmnPrefix); + + GetMonData(&gEnemyParty[src[srcID + 2]], MON_DATA_NICKNAME, text); + } + StringGetEnd10(text); + StringAppend(dst, text); + srcID += 3; + break; + case B_BUFF_STAT: // stats + StringAppend(dst, gStatNamesTable[src[srcID + 1]]); + srcID += 2; + break; + case B_BUFF_SPECIES: // species name + GetSpeciesName(dst, ByteRead16(&src[srcID + 1])); + srcID += 3; + break; + case B_BUFF_MON_NICK: // poke nick without prefix + if (GetBankSide(src[srcID + 1]) == SIDE_PLAYER) + GetMonData(&gPlayerParty[src[srcID + 2]], MON_DATA_NICKNAME, dst); + else + GetMonData(&gEnemyParty[src[srcID + 2]], MON_DATA_NICKNAME, dst); + StringGetEnd10(dst); + srcID += 3; + break; + case B_BUFF_NEGATIVE_FLAVOUR: // flavour table + StringAppend(dst, gPokeblockWasTooXStringTable[src[srcID + 1]]); + srcID += 2; + break; + case B_BUFF_ABILITY: // ability names + StringAppend(dst, gAbilityNames[src[srcID + 1]]); + srcID += 2; + break; + case B_BUFF_ITEM: // item name + hword = ByteRead16(&src[srcID + 1]); + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + if (hword == ITEM_ENIGMA_BERRY) + { + if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 == gStringBank) + { + StringCopy(dst, gEnigmaBerries[gStringBank].name); + StringAppend(dst, gText_BerrySuffix); + } + else + StringAppend(dst, gText_EnigmaBerry); + } + else + CopyItemName(hword, dst); + } + else + CopyItemName(hword, dst); + srcID += 3; + break; + } + } +} From 95e4ae06ceacc583ecd7678adda2f19675be507d Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 8 Oct 2017 14:54:51 +0200 Subject: [PATCH 3/7] battle message decompiled and dumped --- asm/battle_controller_player.s | 2 +- asm/battle_message.s | 441 ------------------------------- asm/pokemon_summary_screen.s | 2 +- include/battle_2.h | 1 + include/battle_controllers.h | 4 +- include/battle_message.h | 2 + include/battle_string_ids.h | 10 +- include/text.h | 2 +- ld_script.txt | 1 - src/battle_2.c | 4 +- src/battle_message.c | 468 ++++++++++++++++++++++++++------- 11 files changed, 382 insertions(+), 555 deletions(-) delete mode 100644 asm/battle_message.s diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index 1ea1bb5f2..73601e84c 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -4401,7 +4401,7 @@ sub_8059B3C: @ 8059B3C ldrb r0, [r0] cmp r0, 0x1 beq _08059B98 - bl sub_814FBAC + bl SetPpNumbersPaletteInMoveSelection ldrb r1, [r7] lsls r4, r1, 9 adds r0, r5, 0x4 diff --git a/asm/battle_message.s b/asm/battle_message.s deleted file mode 100644 index d78167a26..000000000 --- a/asm/battle_message.s +++ /dev/null @@ -1,441 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start sub_814F8F8 -sub_814F8F8: @ 814F8F8 - push {r4,r5,lr} - adds r4, r0, 0 - movs r2, 0 - ldr r5, =gStringInfo - ldr r3, =gUnknown_085CD336 -_0814F902: - cmp r2, 0x4 - beq _0814F918 - ldrh r1, [r3] - cmp r1, 0 - bne _0814F90E - adds r2, 0x1 -_0814F90E: - ldr r0, [r5] - adds r3, 0x2 - ldrh r0, [r0] - cmp r1, r0 - bne _0814F902 -_0814F918: - cmp r2, 0 - blt _0814F944 - cmp r2, 0x2 - bgt _0814F938 - ldr r1, =gText_SpaceIs - adds r0, r4, 0 - bl StringCopy - b _0814F944 - .pool -_0814F938: - cmp r2, 0x4 - bgt _0814F944 - ldr r1, =gText_ApostropheS - adds r0, r4, 0 - bl StringCopy -_0814F944: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_814F8F8 - - thumb_func_start sub_814F950 -sub_814F950: @ 814F950 - push {r4,r5,lr} - adds r3, r0, 0 - movs r4, 0 - b _0814F95A -_0814F958: - adds r3, 0x1 -_0814F95A: - ldrb r0, [r3] - cmp r0, 0xFF - bne _0814F958 - ldr r1, =gUnknown_085CD336 - ldr r5, =gStringInfo - movs r0, 0 - lsls r0, 1 - adds r2, r0, r1 -_0814F96A: - cmp r4, 0x4 - beq _0814F984 - ldrh r1, [r2] - cmp r1, 0 - bne _0814F976 - adds r4, 0x1 -_0814F976: - ldr r0, [r5] - adds r2, 0x2 - ldrh r0, [r0] - cmp r1, r0 - bne _0814F96A - cmp r4, 0x4 - bhi _0814F9E0 -_0814F984: - lsls r0, r4, 2 - ldr r1, =_0814F99C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0814F99C: - .4byte _0814F9B0 - .4byte _0814F9B8 - .4byte _0814F9C0 - .4byte _0814F9C8 - .4byte _0814F9D8 -_0814F9B0: - ldr r1, =gText_ExclamationMark - b _0814F9CA - .pool -_0814F9B8: - ldr r1, =gText_ExclamationMark2 - b _0814F9CA - .pool -_0814F9C0: - ldr r1, =gText_ExclamationMark3 - b _0814F9CA - .pool -_0814F9C8: - ldr r1, =gText_ExclamationMark4 -_0814F9CA: - adds r0, r3, 0 - bl StringCopy - b _0814F9E0 - .pool -_0814F9D8: - ldr r1, =gText_ExclamationMark5 - adds r0, r3, 0 - bl StringCopy -_0814F9E0: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_814F950 - - thumb_func_start sub_814F9EC -sub_814F9EC: @ 814F9EC - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x10 - adds r4, r0, 0 - lsls r1, 24 - lsrs r7, r1, 24 - ldr r1, =gUnknown_085CD660 - ldr r0, =gBattleScripting - adds r0, 0x24 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - mov r8, r0 - movs r0, 0x80 - ands r0, r7 - cmp r0, 0 - beq _0814FA24 - movs r0, 0x7F - ands r7, r0 - movs r0, 0 - b _0814FA36 - .pool -_0814FA24: - lsls r0, r7, 1 - adds r0, r7 - lsls r0, 2 - add r0, r8 - ldrb r1, [r0] - adds r0, r7, 0 - bl FillWindowPixelBuffer - movs r0, 0x1 -_0814FA36: - mov r9, r0 - str r4, [sp] - mov r0, sp - strb r7, [r0, 0x4] - mov r1, sp - lsls r6, r7, 1 - adds r3, r6, r7 - lsls r3, 2 - add r3, r8 - ldrb r0, [r3, 0x1] - strb r0, [r1, 0x5] - ldrb r0, [r3, 0x2] - strb r0, [r1, 0x6] - ldrb r0, [r3, 0x3] - strb r0, [r1, 0x7] - mov r0, sp - ldrb r0, [r0, 0x6] - strb r0, [r1, 0x8] - mov r0, sp - ldrb r0, [r0, 0x7] - strb r0, [r1, 0x9] - ldrb r0, [r3, 0x4] - strb r0, [r1, 0xA] - ldrb r0, [r3, 0x5] - strb r0, [r1, 0xB] - mov r4, sp - ldrb r2, [r4, 0xC] - movs r1, 0x10 - negs r1, r1 - adds r0, r1, 0 - ands r0, r2 - strb r0, [r4, 0xC] - mov r2, sp - ldrb r0, [r3, 0x7] - lsls r0, 4 - movs r5, 0xF - strb r0, [r2, 0xC] - ldrb r2, [r3, 0x8] - adds r0, r5, 0 - ands r0, r2 - ldrb r2, [r4, 0xD] - ands r1, r2 - orrs r1, r0 - strb r1, [r4, 0xD] - mov r2, sp - ldrb r0, [r3, 0x9] - lsls r0, 4 - ands r1, r5 - orrs r1, r0 - strb r1, [r2, 0xD] - mov r0, sp - ldrb r0, [r0, 0x6] - cmp r0, 0xFF - bne _0814FAC6 - ldr r0, =gBattleScripting - adds r0, 0x24 - ldrb r0, [r0] - adds r1, r7, 0 - bl sub_80397C4 - adds r2, r0, 0 - mov r0, sp - ldrb r0, [r0, 0x5] - ldr r1, [sp] - mov r3, sp - ldrb r3, [r3, 0xA] - bl GetStringCenterAlignXOffsetWithLetterSpacing - mov r2, sp - mov r1, sp - strb r0, [r1, 0x8] - strb r0, [r2, 0x6] -_0814FAC6: - cmp r7, 0x16 - bne _0814FAE0 - ldr r0, =gTextFlags - ldrb r2, [r0] - movs r1, 0x3 - negs r1, r1 - ands r1, r2 - b _0814FAE8 - .pool -_0814FAE0: - ldr r0, =gTextFlags - ldrb r1, [r0] - movs r2, 0x2 - orrs r1, r2 -_0814FAE8: - strb r1, [r0] - adds r3, r0, 0 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r2, =0x01000002 - ands r1, r2 - adds r2, r0, 0 - cmp r1, 0 - beq _0814FB10 - ldrb r0, [r3] - movs r1, 0x4 - orrs r0, r1 - b _0814FB18 - .pool -_0814FB10: - ldrb r1, [r3] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 -_0814FB18: - strb r0, [r3] - cmp r7, 0 - beq _0814FB22 - cmp r7, 0x16 - bne _0814FB6C -_0814FB22: - ldr r1, [r2] - ldr r0, =0x02000002 - ands r0, r1 - cmp r0, 0 - beq _0814FB34 - movs r6, 0x1 - b _0814FB5C - .pool -_0814FB34: - movs r0, 0x80 - lsls r0, 17 - ands r1, r0 - cmp r1, 0 - beq _0814FB54 - ldr r4, =gUnknown_085CD668 - bl sub_8185FC4 - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - ldrb r6, [r0] - b _0814FB5C - .pool -_0814FB54: - bl sav2_get_text_speed - lsls r0, 24 - lsrs r6, r0, 24 -_0814FB5C: - ldr r0, =gTextFlags - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] - b _0814FB7E - .pool -_0814FB6C: - adds r0, r6, r7 - lsls r0, 2 - add r0, r8 - ldrb r6, [r0, 0x6] - ldrb r1, [r3] - movs r0, 0x2 - negs r0, r0 - ands r0, r1 - strb r0, [r3] -_0814FB7E: - mov r0, sp - adds r1, r6, 0 - movs r2, 0 - bl AddTextPrinter - mov r0, r9 - cmp r0, 0 - beq _0814FB9C - adds r0, r7, 0 - bl PutWindowTilemap - adds r0, r7, 0 - movs r1, 0x3 - bl CopyWindowToVram -_0814FB9C: - add sp, 0x10 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_814F9EC - - thumb_func_start sub_814FBAC -sub_814FBAC: @ 814FBAC - push {r4,r5,lr} - ldr r0, =gActiveBank - ldrb r2, [r0] - lsls r1, r2, 9 - ldr r0, =gBattleBufferA + 4 - adds r1, r0 - ldr r4, =gUnknown_08D85620 - ldr r0, =gMoveSelectionCursor - adds r2, r0 - ldrb r2, [r2] - adds r0, r1, 0 - adds r0, 0x8 - adds r0, r2 - ldrb r0, [r0] - adds r1, 0xC - adds r1, r2 - ldrb r1, [r1] - bl sub_814FC20 - lsls r0, 24 - ldr r5, =gPlttBufferUnfaded - lsrs r0, 22 - adds r0, r4 - ldrh r1, [r0] - adds r2, r5, 0 - adds r2, 0xB8 - strh r1, [r2] - ldrh r0, [r0, 0x2] - adds r5, 0xB6 - strh r0, [r5] - ldr r4, =gPlttBufferFaded + 0xB8 - adds r0, r2, 0 - adds r1, r4, 0 - movs r2, 0x1 - bl CpuSet - subs r4, 0x2 - adds r0, r5, 0 - adds r1, r4, 0 - movs r2, 0x1 - bl CpuSet - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_814FBAC - - thumb_func_start sub_814FC20 -sub_814FC20: @ 814FC20 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - adds r3, r2, 0 - lsls r1, 24 - lsrs r0, r1, 24 - cmp r0, r2 - beq _0814FC68 - cmp r0, 0x2 - bhi _0814FC3A - cmp r2, 0x1 - bhi _0814FC68 - b _0814FC42 -_0814FC3A: - cmp r0, 0x7 - bhi _0814FC4C - cmp r2, 0x2 - bhi _0814FC68 -_0814FC42: - movs r0, 0x2 - subs r0, r2 - lsls r0, 24 - lsrs r0, 24 - b _0814FC6A -_0814FC4C: - cmp r2, 0 - bne _0814FC54 - movs r0, 0x2 - b _0814FC6A -_0814FC54: - lsrs r0, r1, 26 - cmp r2, r0 - bhi _0814FC5E - movs r0, 0x1 - b _0814FC6A -_0814FC5E: - lsrs r0, r1, 25 - cmp r3, r0 - bhi _0814FC68 - movs r0, 0 - b _0814FC6A -_0814FC68: - movs r0, 0x3 -_0814FC6A: - pop {r1} - bx r1 - thumb_func_end sub_814FC20 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s index bcc52c172..e1a5e4e4c 100755 --- a/asm/pokemon_summary_screen.s +++ b/asm/pokemon_summary_screen.s @@ -7571,7 +7571,7 @@ sub_81C3B08: @ 81C3B08 adds r7, r4, 0 ldrb r0, [r5] adds r1, r6, 0 - bl sub_814FC20 + bl GetCurrentPpToMaxPpState lsls r0, 24 lsrs r0, 24 adds r5, r0, 0 diff --git a/include/battle_2.h b/include/battle_2.h index ab5068446..677bf0505 100644 --- a/include/battle_2.h +++ b/include/battle_2.h @@ -15,6 +15,7 @@ void SwapTurnOrder(u8 id1, u8 id2); void BattleTurnPassed(void); void RunBattleScriptCommands_PopCallbacksStack(void); void RunBattleScriptCommands(void); +u32 sub_80397C4(u32 setId, u32 tableId); void sub_8039E9C(struct Sprite *sprite); extern const u8 gStatusConditionString_PoisonJpn[8]; diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 2281fdaff..eea544b55 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -39,8 +39,8 @@ struct MovePpInfo struct ChooseMoveStruct { u16 moves[4]; - u8 ppNumbers[4]; - u8 ppWithBonusNumbers[4]; + u8 currentPp[4]; + u8 maxPp[4]; u16 species; u8 monType1; u8 monType2; diff --git a/include/battle_message.h b/include/battle_message.h index be2aca9b2..3b154c5a6 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -205,6 +205,8 @@ void BufferStringBattle(u16 stringID); u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src); u32 BattleStringExpandPlaceholders(const u8* src, u8* dst); void sub_814F9EC(const u8* text, u8 arg1); +void SetPpNumbersPaletteInMoveSelection(void); +u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp); #define TEXT_BUFF_ARRAY_COUNT 16 diff --git a/include/battle_string_ids.h b/include/battle_string_ids.h index 546cb2e46..f242284b0 100644 --- a/include/battle_string_ids.h +++ b/include/battle_string_ids.h @@ -12,6 +12,8 @@ #define STRINGID_USEDMOVE 4 #define STRINGID_BATTLEEND 5 + +// todo: make some of those names less vague: attacker/target vs pkmn, etc. #define STRINGID_TRAINER1LOSETEXT 12 #define STRINGID_PKMNGAINEDEXP 13 #define STRINGID_PKMNGREWTOLV 14 @@ -28,8 +30,8 @@ #define STRINGID_STATSWONTINCREASE2 25 #define STRINGID_AVOIDEDDAMAGE 26 #define STRINGID_ITDOESNTAFFECT 27 -#define STRINGID_PKMNFAINTED 28 -#define STRINGID_PKMNFAINTED2 29 +#define STRINGID_ATTACKERFAINTED 28 +#define STRINGID_TARGETFAINTED 29 #define STRINGID_PLAYERGOTMONEY 30 #define STRINGID_PLAYERWHITEOUT 31 #define STRINGID_PLAYERWHITEOUT2 32 @@ -143,7 +145,7 @@ #define STRINGID_PKMNTOOKFOE 140 #define STRINGID_PKMNREDUCEDPP 141 #define STRINGID_PKMNSTOLEITEM 142 -#define STRINGID_PKMNCANTESCAPE 143 +#define STRINGID_TARGETCANTESCAPENOW 143 #define STRINGID_PKMNFELLINTONIGHTMARE 144 #define STRINGID_PKMNLOCKEDINNIGHTMARE 145 #define STRINGID_PKMNLAIDCURSE 146 @@ -357,7 +359,7 @@ #define STRINGID_THEWALLSHATTERED 354 #define STRINGID_PKMNSXPREVENTSYSZ 355 #define STRINGID_PKMNSXCUREDITSYPROBLEM 356 -#define STRINGID_PKMNCANTESCAPE2 357 +#define STRINGID_ATTACKERCANTESCAPE 357 #define STRINGID_PKMNOBTAINEDX 358 #define STRINGID_PKMNOBTAINEDX2 359 #define STRINGID_PKMNOBTAINEDXYOBTAINEDZ 360 diff --git a/include/text.h b/include/text.h index 217de0687..c09b41ad3 100644 --- a/include/text.h +++ b/include/text.h @@ -103,7 +103,7 @@ struct TextPrinterSubStruct struct TextSubPrinter // TODO: Better name { - u8* current_text_offset; + const u8* current_text_offset; u8 windowId; u8 fontId; u8 x; diff --git a/ld_script.txt b/ld_script.txt index 20ec4d145..12815bcd5 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -191,7 +191,6 @@ SECTIONS { asm/battle_transition.o(.text); asm/battle_controller_linkpartner.o(.text); src/battle_message.o(.text); - asm/battle_message.o(.text); asm/cable_car.o(.text); asm/math_util.o(.text); asm/roulette_util.o(.text); diff --git a/src/battle_2.c b/src/battle_2.c index 8e48f3ed6..be0d0be72 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -4007,8 +4007,8 @@ static void HandleTurnActionSelectionState(void) for (i = 0; i < 4; i++) { moveInfo.moves[i] = gBattleMons[gActiveBank].moves[i]; - moveInfo.ppNumbers[i] = gBattleMons[gActiveBank].pp[i]; - moveInfo.ppWithBonusNumbers[i] = CalculatePPWithBonus( + moveInfo.currentPp[i] = gBattleMons[gActiveBank].pp[i]; + moveInfo.maxPp[i] = CalculatePPWithBonus( gBattleMons[gActiveBank].moves[i], gBattleMons[gActiveBank].ppBonuses, i); diff --git a/src/battle_message.c b/src/battle_message.c index 510b8a581..77a461544 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -9,6 +9,9 @@ #include "event_data.h" #include "link.h" #include "item.h" +#include "window.h" +#include "palette.h" +#include "battle_controllers.h" extern u16 gLastUsedItem; extern u8 gLastUsedAbility; @@ -25,11 +28,15 @@ extern u16 gPartnerTrainerId; extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200]; +extern u8 gMoveSelectionCursor[BATTLE_BANKS_COUNT]; +extern u8 gUnknown_0203C7B4; +extern struct StringInfoBattle *gStringInfo; extern const u8 gMoveNames[LAST_MOVE_INDEX + 1][13]; extern const u8 gAbilityNames[][13]; extern const u8 gTrainerClassNames[][13]; extern const u8 gTypeNames[][7]; +extern const u16 gUnknown_08D85620[]; // strings extern const u8 gText_PkmnBoxSomeonesPCFull[]; @@ -50,10 +57,13 @@ extern void sub_81D572C(u8 arg0, u16 trainerId); // pokenav extern const u8* GetTrainer1LoseText(void); // battle_setup extern const u8* GetTrainer2LoseText(void); // battle_setup extern void GetFrontierTrainerName(u8 *dst, u16 trainerId); +extern s32 GetStringCenterAlignXOffsetWithLetterSpacing(u8 fontId, const u8 *str, s32 totalWidth, s16 letterSpacing); +extern u8 sub_8185FC4(void); +extern u8 sav2_get_text_speed(void); // this file's functions -void sub_814F8F8(u8 *txtPtr); -void sub_814F950(u8 *txtPtr); +static void sub_814F8F8(u8 *textPtr); +static void sub_814F950(u8 *dst); static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst); // ewram variables @@ -63,6 +73,7 @@ EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0}; // const rom data +// todo: make some of those names less vague: attacker/target vs pkmn, etc. const u8 gText_Trainer1LoseText[] = _("{B_TRAINER1_LOSE_TEXT}"); const u8 gText_PkmnGainedEXP[] = _("{B_BUFF1} gained{B_BUFF2}\n{B_BUFF3} EXP. Points!\p"); @@ -83,14 +94,14 @@ const u8 gText_AvoidedDamage[] = _("{B_DEF_NAME_WITH_PREFIX} avoided\ndamage wit const u8 gText_PkmnMakesGroundMiss[] = _("{B_DEF_NAME_WITH_PREFIX} makes GROUND\nmoves miss with {B_DEF_ABILITY}!"); const u8 gText_PkmnAvoidedAttack[] = _("{B_DEF_NAME_WITH_PREFIX} avoided\nthe attack!"); const u8 gText_ItDoesntAffect[] = _("It doesn’t affect\n{B_DEF_NAME_WITH_PREFIX}…"); -const u8 gText_PkmnFainted[] = _("{B_ATK_NAME_WITH_PREFIX}\nfainted!\p"); -const u8 gText_PkmnFainted2[] = _("{B_DEF_NAME_WITH_PREFIX}\nfainted!\p"); +const u8 gText_AttackerFainted[] = _("{B_ATK_NAME_WITH_PREFIX}\nfainted!\p"); +const u8 gText_TargetFainted[] = _("{B_DEF_NAME_WITH_PREFIX}\nfainted!\p"); const u8 gText_PlayerGotMoney[] = _("{B_PLAYER_NAME} got ¥{B_BUFF1}\nfor winning!\p"); const u8 gText_PlayerWhiteout[] = _("{B_PLAYER_NAME} is out of\nusable POKéMON!\p"); const u8 gText_PlayerWhiteout2[] = _("{B_PLAYER_NAME} whited out!{PAUSE_UNTIL_PRESS}"); const u8 gText_PreventsEscape[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} prevents\nescape with {B_SCR_ACTIVE_ABILITY}!\p"); const u8 gText_CantEscape2[] = _("Can’t escape!\p"); -const u8 gText_PkmnCantEscape2[] = _("{B_ATK_NAME_WITH_PREFIX} can’t escape!"); +const u8 gText_AttackerCantEscape[] = _("{B_ATK_NAME_WITH_PREFIX} can’t escape!"); const u8 gText_HitXTimes[] = _("Hit {B_BUFF1} time(s)!"); const u8 gText_PkmnFellAsleep[] = _("{B_EFF_NAME_WITH_PREFIX}\nfell asleep!"); const u8 gText_PkmnMadeSleep[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade {B_EFF_NAME_WITH_PREFIX} sleep!"); @@ -206,7 +217,7 @@ const u8 gText_PkmnTryingToTakeFoe[] = _("{B_ATK_NAME_WITH_PREFIX} is trying\nto const u8 gText_PkmnTookFoe[] = _("{B_DEF_NAME_WITH_PREFIX} took\n{B_ATK_NAME_WITH_PREFIX} with it!"); const u8 gText_PkmnReducedPP[] = _("Reduced {B_DEF_NAME_WITH_PREFIX}’s\n{B_BUFF1} by {B_BUFF2}!"); const u8 gText_PkmnStoleItem[] = _("{B_ATK_NAME_WITH_PREFIX} stole\n{B_DEF_NAME_WITH_PREFIX}’s {B_LAST_ITEM}!"); -const u8 gText_PkmnCantEscape[] = _("{B_DEF_NAME_WITH_PREFIX} can’t\nescape now!"); +const u8 gText_TargetCantEscapeNow[] = _("{B_DEF_NAME_WITH_PREFIX} can’t\nescape now!"); const u8 gText_PkmnFellIntoNightmare[] = _("{B_DEF_NAME_WITH_PREFIX} fell into\na NIGHTMARE!"); const u8 gText_PkmnLockedInNightmare[] = _("{B_ATK_NAME_WITH_PREFIX} is locked\nin a NIGHTMARE!"); const u8 gText_PkmnLaidCurse[] = _("{B_ATK_NAME_WITH_PREFIX} cut its own HP and\nlaid a CURSE on {B_DEF_NAME_WITH_PREFIX}!"); @@ -289,10 +300,10 @@ const u8 gText_PkmnCutsAttackWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_ const u8 gText_PkmnPreventsStatLossWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents stat loss!"); const u8 gText_PkmnHurtsWith[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nhurt {B_ATK_NAME_WITH_PREFIX}!"); const u8 gText_PkmnTraced[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} TRACED\n{B_BUFF1}’s {B_BUFF2}!"); -const u8 gText_PkmnsXPreventsBurns[] = _("{B_EFF_NAME_WITH_PREFIX}’s {STRING 27}\nprevents burns!"); +const u8 gText_PkmnsXPreventsBurns[] = _("{B_EFF_NAME_WITH_PREFIX}’s {B_EFF_ABILITY}\nprevents burns!"); const u8 gText_PkmnsXBlocksY[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nblocks {B_CURRENT_MOVE}!"); const u8 gText_PkmnsXBlocksY2[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nblocks {B_CURRENT_MOVE}!"); -const u8 gText_PkmnsXRestoredHPALittle2[] = _("{B_ATK_NAME_WITH_PREFIX}’s {STRING 24}\nrestored its HP a little!"); +const u8 gText_PkmnsXRestoredHPALittle2[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_ATK_ABILITY}\nrestored its HP a little!"); const u8 gText_PkmnsXWhippedUpSandstorm[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nwhipped up a sandstorm!"); const u8 gText_PkmnsXIntensifiedSun[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nintensified the sun’s rays!"); const u8 gText_PkmnsXPreventsYLoss[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nprevents {B_BUFF1} loss!"); @@ -302,11 +313,11 @@ const u8 gText_PkmnsXCuredYProblem[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B const u8 gText_ItSuckedLiquidOoze[] = _("It sucked up the\nLIQUID OOZE!"); const u8 gText_PkmnTransformed[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} transformed!"); const u8 gText_PkmnsXTookAttack[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\ntook the attack!"); -const u8 gText_PkmnsXPreventsSwitching[] = _("{B_BUFF1}’s {STRING 23}\nprevents switching!\p"); +const u8 gText_PkmnsXPreventsSwitching[] = _("{B_BUFF1}’s {B_LAST_ABILITY}\nprevents switching!\p"); const u8 gText_PreventedFromWorking[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_DEF_ABILITY}\nprevented {B_SCR_ACTIVE_NAME_WITH_PREFIX}’s\l{B_BUFF1} from working!"); const u8 gText_PkmnsXMadeItIneffective[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nmade it ineffective!"); -const u8 gText_PkmnsXPreventsFlinching[] = _("{B_EFF_NAME_WITH_PREFIX}’s {STRING 27}\nprevents flinching!"); -const u8 gText_PkmnsXPreventsYsZ[] = _("{B_ATK_NAME_WITH_PREFIX}’s {STRING 24}\nprevents {B_DEF_NAME_WITH_PREFIX}’s\l{B_DEF_ABILITY} from working!"); +const u8 gText_PkmnsXPreventsFlinching[] = _("{B_EFF_NAME_WITH_PREFIX}’s {B_EFF_ABILITY}\nprevents flinching!"); +const u8 gText_PkmnsXPreventsYsZ[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_ATK_ABILITY}\nprevents {B_DEF_NAME_WITH_PREFIX}’s\l{B_DEF_ABILITY} from working!"); const u8 gText_PkmnsXCuredItsYProblem[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); const u8 gText_PkmnsXHadNoEffectOnY[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}’s {B_SCR_ACTIVE_ABILITY}\nhad no effect on {B_EFF_NAME_WITH_PREFIX}!"); const u8 gText_StatSharply[] = _("sharply "); @@ -329,7 +340,7 @@ const u8 gText_NotVeryEffective[] = _("It’s not very effective…"); const u8 gText_SuperEffective[] = _("It’s super effective!"); const u8 gText_GotAwaySafely[] = _("{PLAY_SE 0x0011}Got away safely!\p"); const u8 gText_PkmnFledUsingIts[] = _("{PLAY_SE 0x0011}{B_ATK_NAME_WITH_PREFIX} fled\nusing its {B_LAST_ITEM}!\p"); -const u8 gText_PkmnFledUsing[] = _("{PLAY_SE 0x0011}{B_ATK_NAME_WITH_PREFIX} fled\nusing {STRING 24}!\p"); +const u8 gText_PkmnFledUsing[] = _("{PLAY_SE 0x0011}{B_ATK_NAME_WITH_PREFIX} fled\nusing {B_ATK_ABILITY}!\p"); const u8 gText_WildPkmnFled[] = _("{PLAY_SE 0x0011}Wild {B_BUFF1} fled!"); const u8 gText_PlayerDefeatedLinkTrainer[] = _("Player defeated\n{B_20}!"); const u8 gText_TwoLinkTrainersDefeated[] = _("Player beat {B_20}\nand {B_21}!"); @@ -537,8 +548,8 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = gText_StatsWontIncrease2, gText_AvoidedDamage, gText_ItDoesntAffect, - gText_PkmnFainted, - gText_PkmnFainted2, + gText_AttackerFainted, + gText_TargetFainted, gText_PlayerGotMoney, gText_PlayerWhiteout, gText_PlayerWhiteout2, @@ -652,7 +663,7 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = gText_PkmnTookFoe, gText_PkmnReducedPP, gText_PkmnStoleItem, - gText_PkmnCantEscape, + gText_TargetCantEscapeNow, gText_PkmnFellIntoNightmare, gText_PkmnLockedInNightmare, gText_PkmnLaidCurse, @@ -866,7 +877,7 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = gText_TheWallShattered, gText_PkmnsXPreventsYsZ, gText_PkmnsXCuredItsYProblem, - gText_PkmnCantEscape2, + gText_AttackerCantEscape, gText_PkmnObtainedX, gText_PkmnObtainedX2, gText_PkmnObtainedXYObtainedZ, @@ -899,30 +910,80 @@ const u16 gMissStringIds[] = STRINGID_PKMNMAKESGROUNDMISS }; -// todo: change values to string Ids -const u16 gUnknown_085CC83E[] = +const u16 gNoEscapeStringIds[] = { - 0x00e2, 0x00e3, 0x0021, - 0x0112, 0x0165, 0x00e8, 0x00e9, 0x00e5, 0x00ed, 0x00f0, 0x00f3, - 0x00ee, 0x00f4, 0x0066, 0x0067, 0x00ef, 0x00f5, 0x00ea, 0x00eb, - 0x00ec, 0x0065, 0x0098, 0x00e5, 0x00e5, 0x004e, 0x0160, 0x004d, - 0x0161, 0x004f, 0x0068, 0x0069, 0x001b, 0x006a, 0x0139, 0x0052, - 0x0053, 0x0070, 0x0071, 0x0073, 0x0074, 0x006c, 0x006e, 0x00f7, - 0x004c, 0x0075, 0x0076, 0x0077, 0x00d5, 0x00d6, 0x003d, 0x0130, - 0x0145, 0x0146, 0x00d7, 0x00d8, 0x003e, 0x0130, 0x0054, 0x0055, - 0x0056, 0x0057, 0x0058, 0x0059, 0x013d, 0x013e, 0x005a, 0x005c, - 0x005b, 0x005d, 0x005b, 0x0148, 0x0061, 0x00e5, 0x0063, 0x00e5, - 0x007d, 0x00e5, 0x007e, 0x00fb, 0x0028, 0x0029, 0x0037, 0x0038, - 0x0023, 0x0024, 0x002e, 0x002f, 0x0031, 0x0032, 0x0035, 0x0036, - 0x0017, 0x007c, 0x0045, 0x0136, 0x002d, 0x0139, 0x013b, 0x013c, - 0x00fd, 0x00fd, 0x00fd, 0x00fd, 0x0142, 0x00a1, 0x014f, 0x0107, - 0x0108, 0x0109, 0x010a, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, - 0x0110, 0x0110, 0x0110, 0x0111, 0x0110, 0x0110, 0x0110, 0x00f1, - 0x0110, 0x0110, 0x0110, 0x0116, 0x0117, 0x0118, 0x0119, 0x016d, - 0x011b, 0x011c, 0x011e, 0x011f, 0x0120, 0x0128, 0x0123, 0x0126, - 0x0125, 0x0124, 0x0127, 0x0129, 0x0156, 0x0131, 0x0163, 0x016a, - 0x00c7, 0x0163, 0x016a, 0x00c9, 0x0163, 0x016a, 0x0166, 0x0167, - 0x0168, 0x00cb, 0x0137, 0x0177, 0x0178, 0x0179, 0x017a, + STRINGID_CANTESCAPE, STRINGID_DONTLEAVEBIRCH, STRINGID_PREVENTSESCAPE, + STRINGID_CANTESCAPE2, STRINGID_ATTACKERCANTESCAPE +}; + +const u16 gMoveWeatherChangeStringIds[] = +{ + STRINGID_STARTEDTORAIN, STRINGID_DOWNPOURSTARTED, STRINGID_BUTITFAILED, + STRINGID_SANDSTORMBREWED, STRINGID_SUNLIGHTGOTBRIGHT, STRINGID_STARTEDHAIL +}; + +const u16 gSandStormHailContinuesStringIds[] = +{ + STRINGID_SANDSTORMRAGES, STRINGID_HAILCONTINUES +}; + +const u16 gSandStormHailDmgStringIds[] = +{ + STRINGID_PKMNBUFFETEDBYSANDSTORM, STRINGID_PKMNPELTEDBYHAIL +}; + +// todo once battlescripts are dumped +const u16 gTooLazyToSplitThemStringIds[] = +{ + STRINGID_SANDSTORMSUBSIDED, STRINGID_HAILSTOPPED, STRINGID_RAINCONTINUES, STRINGID_DOWNPOURCONTINUES, + STRINGID_RAINSTOPPED, STRINGID_PKMNPROTECTEDITSELF2, STRINGID_PKMNBRACEDITSELF, + STRINGID_BUTITFAILED, STRINGID_BUTITFAILED, STRINGID_PKMNRAISEDDEF, + STRINGID_PKMNRAISEDDEFALITTLE, STRINGID_PKMNRAISEDSPDEF, STRINGID_PKMNRAISEDSPDEFALITTLE, + STRINGID_PKMNCOVEREDBYVEIL, STRINGID_PKMNSEEDED, STRINGID_PKMNEVADEDATTACK, + STRINGID_ITDOESNTAFFECT, STRINGID_PKMNSAPPEDBYLEECHSEED, STRINGID_ITSUCKEDLIQUIDOOZE, + STRINGID_PKMNWENTTOSLEEP, STRINGID_PKMNSLEPTHEALTHY, STRINGID_PKMNMAKINGUPROAR, + STRINGID_PKMNCALMEDDOWN, STRINGID_PKMNSTOCKPILED, STRINGID_PKMNCANTSTOCKPILE, + STRINGID_PKMNWOKEUP, STRINGID_PKMNWOKEUPINUPROAR, STRINGID_FAILEDTOSWALLOW, + STRINGID_PKMNHPFULL, STRINGID_PKMNCANTSLEEPINUPROAR2, STRINGID_UPROARKEPTPKMNAWAKE, + STRINGID_PKMNSTAYEDAWAKEUSING, STRINGID_PKMNSSTATCHANGED, STRINGID_PKMNSSTATCHANGED2, + STRINGID_STATSWONTINCREASE, STRINGID_EMPTYSTRING3, STRINGID_USINGXTHEYOFZN, + STRINGID_PKMNUSEDXTOGETPUMPED, STRINGID_PKMNSSTATCHANGED3, STRINGID_PKMNSSTATCHANGED4, + STRINGID_STATSWONTDECREASE, STRINGID_EMPTYSTRING3, STRINGID_PKMNWHIPPEDWHIRLWIND, + STRINGID_PKMNTOOKSUNLIGHT, STRINGID_PKMNLOWEREDHEAD, STRINGID_PKMNISGLOWING, + STRINGID_PKMNFLEWHIGH, STRINGID_PKMNDUGHOLE, STRINGID_PKMNHIDUNDERWATER, + STRINGID_PKMNSPRANGUP, STRINGID_PKMNSQUEEZEDBYBIND, STRINGID_PKMNWRAPPEDBY, + STRINGID_PKMNTRAPPEDINVORTEX, STRINGID_PKMNCLAMPED, STRINGID_PKMNTRAPPEDINVORTEX, + STRINGID_PKMNTRAPPEDBYSANDTOMB, STRINGID_PKMNSHROUDEDINMIST, STRINGID_BUTITFAILED, + STRINGID_PKMNGETTINGPUMPED, STRINGID_BUTITFAILED, STRINGID_PKMNTRANSFORMEDINTO, + STRINGID_BUTITFAILED, STRINGID_PKMNMADESUBSTITUTE, STRINGID_TOOWEAKFORSUBSTITUTE, + STRINGID_PKMNWASPOISONED, STRINGID_PKMNPOISONEDBY, STRINGID_PKMNWASPARALYZED, + STRINGID_PKMNWASPARALYZEDBY, STRINGID_PKMNFELLASLEEP, STRINGID_PKMNMADESLEEP, + STRINGID_PKMNWASBURNED, STRINGID_PKMNBURNEDBY, STRINGID_PKMNWASFROZEN, + STRINGID_PKMNFROZENBY, STRINGID_PKMNWASDEFROSTED2, STRINGID_PKMNWASDEFROSTEDBY, + STRINGID_ATTACKMISSED, STRINGID_PKMNUNAFFECTED, STRINGID_PKMNFELLINLOVE, + STRINGID_PKMNSXINFATUATEDY, STRINGID_PKMNENERGYDRAINED, STRINGID_ITSUCKEDLIQUIDOOZE, + STRINGID_ELECTRICITYWEAKENED, STRINGID_FIREWEAKENED, STRINGID_BELLCHIMED, + STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, + STRINGID_SOOTHINGAROMA, STRINGID_PKMNFORESAWATTACK, STRINGID_PKMNCHOSEXASDESTINY, + STRINGID_PKMNBROKEFREE, STRINGID_ITAPPEAREDCAUGHT, STRINGID_AARGHALMOSTHADIT, + STRINGID_SHOOTSOCLOSE, STRINGID_ITISRAINING, STRINGID_ITISRAINING, + STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING, + STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING, + STRINGID_SANDSTORMISRAGING, STRINGID_ITISRAINING, STRINGID_ITISRAINING, + STRINGID_ITISRAINING, STRINGID_SUNLIGHTSTRONG, STRINGID_ITISRAINING, + STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_PKMNLOAFING, + STRINGID_PKMNWONTOBEY, STRINGID_PKMNTURNEDAWAY, STRINGID_PKMNPRETENDNOTNOTICE, + STRINGID_PKMNINCAPABLEOFPOWER, STRINGID_CREPTCLOSER, STRINGID_CANTGETCLOSER, + STRINGID_PKMNCURIOUSABOUTX, STRINGID_PKMNENTHRALLEDBYX, STRINGID_PKMNIGNOREDX, + STRINGID_PKMNSITEMSNAPPEDOUT, STRINGID_PKMNSITEMCUREDPARALYSIS, STRINGID_PKMNSITEMDEFROSTEDIT, + STRINGID_PKMNSITEMHEALEDBURN, STRINGID_PKMNSITEMCUREDPOISON, STRINGID_PKMNSITEMWOKEIT, + STRINGID_PKMNSITEMCUREDPROBLEM, STRINGID_PKMNSITEMNORMALIZEDSTATUS, STRINGID_PKMNSXPREVENTSBURNS, + STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY, STRINGID_PKMNPREVENTSPARALYSISWITH, + STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY, STRINGID_PKMNPREVENTSPOISONINGWITH, + STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY, STRINGID_PKMNOBTAINEDX, + STRINGID_PKMNOBTAINEDX2, STRINGID_PKMNOBTAINEDXYOBTAINEDZ, STRINGID_PKMNRAISEDFIREPOWERWITH, + STRINGID_PKMNSXMADEYINEFFECTIVE, STRINGID_PKMNTRANSFERREDSOMEONESPC, STRINGID_PKMNTRANSFERREDLANETTESPC, + STRINGID_PKMNBOXSOMEONESPCFULL, STRINGID_PKMNBOXLANETTESPCFULL, }; const u16 gTrappingMoves[] = @@ -1022,7 +1083,6 @@ const u8 gText_WillChampinshipDreamComeTrue[] = _("Will the championship dream c const u8 gText_AFormerChampion[] = _("A former CHAMPION!\p"); const u8 gText_ThePreviousChampion[] = _("The previous CHAMPION!\p"); const u8 gText_TheUnbeatenChampion[] = _("The unbeaten CHAMPION!\p"); - const u8 gText_PlayerMon1Name[] = _("{B_PLAYER_MON1_NAME}"); const u8 gText_Vs[] = _("VS"); const u8 gText_OpponentMon1Name[] = _("{B_OPPONENT_MON1_NAME}"); @@ -1085,79 +1145,104 @@ const u8 gText_BattleRecordedOnPass[] = _("{B_PLAYER_NAME}’s battle result was const u8 gText_LinkTrainerWantsToBattlePause[] = _("{B_20}\nwants to battle!{PAUSE 49}"); const u8 gText_TwoLinkTrainersWantToBattlePause[] = _("{B_20} and {B_21}\nwant to battle!{PAUSE 49}"); -const u16 gUnknown_085CD336[] = +static const u16 sUnknownMoveTable[] = { - 0x000e, 0x0046, 0x004a, 0x006a, 0x006b, 0x006c, 0x006e, 0x006f, - 0x0079, 0x007b, 0x007d, 0x0094, 0x0096, 0x0097, 0x009b, 0x009c, - 0x009f, 0x00a4, 0x00aa, 0x00ad, 0x00b6, 0x00bf, 0x00cb, 0x00cd, - 0x00cf, 0x00d6, 0x00ed, 0x00f4, 0x00f5, 0x010a, 0x010f, 0x0112, - 0x0113, 0x011a, 0x0125, 0x0136, 0x013c, 0x0140, 0x0149, 0x014a, - 0x014e, 0x0154, 0x0000, 0x0064, 0x0069, 0x0075, 0x0085, 0x00af, - 0x010d, 0x0153, 0x0000, 0x0060, 0x0061, 0x0066, 0x0068, 0x008c, - 0x0090, 0x00a5, 0x00b8, 0x010c, 0x0111, 0x0118, 0x0119, 0x0129, - 0x012a, 0x012c, 0x0139, 0x015a, 0x015b, 0x0000, 0x0001, 0x000a, - 0x000b, 0x0011, 0x0013, 0x0014, 0x0015, 0x001e, 0x0023, 0x0025, - 0x0027, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, 0x0040, 0x0047, - 0x0051, 0x0059, 0x005a, 0x005b, 0x005c, 0x0067, 0x0076, 0x007a, - 0x0080, 0x0084, 0x008b, 0x0091, 0x00a3, 0x00a9, 0x00ab, 0x00ae, - 0x00c1, 0x00cc, 0x00d5, 0x00f9, 0x00fd, 0x00ff, 0x0100, 0x0103, - 0x0104, 0x0110, 0x011b, 0x0141, 0x0157, 0x0000, + MOVE_SWORDS_DANCE, MOVE_STRENGTH, MOVE_GROWTH, + MOVE_HARDEN, MOVE_MINIMIZE, MOVE_SMOKESCREEN, + MOVE_WITHDRAW, MOVE_DEFENSE_CURL, MOVE_EGG_BOMB, + MOVE_SMOG, MOVE_BONE_CLUB, MOVE_FLASH, MOVE_SPLASH, + MOVE_ACID_ARMOR, MOVE_BONEMERANG, MOVE_REST, MOVE_SHARPEN, + MOVE_SUBSTITUTE, MOVE_MIND_READER, MOVE_SNORE, + MOVE_PROTECT, MOVE_SPIKES, MOVE_ENDURE, MOVE_ROLLOUT, + MOVE_SWAGGER, MOVE_SLEEP_TALK, MOVE_HIDDEN_POWER, + MOVE_PSYCH_UP, MOVE_EXTREME_SPEED, MOVE_FOLLOW_ME, + MOVE_TRICK, MOVE_ASSIST, MOVE_INGRAIN, MOVE_KNOCK_OFF, + MOVE_CAMOUFLAGE, MOVE_ASTONISH, MOVE_ODOR_SLEUTH, + MOVE_GRASS_WHISTLE, MOVE_SHEER_COLD, MOVE_MUDDY_WATER, + MOVE_IRON_DEFENSE, MOVE_BOUNCE, MOVE_NONE, + + MOVE_TELEPORT, MOVE_RECOVER, MOVE_BIDE, MOVE_AMNESIA, + MOVE_FLAIL, MOVE_TAUNT, MOVE_BULK_UP, MOVE_NONE, + + MOVE_MEDITATE, MOVE_AGILITY, MOVE_MIMIC, MOVE_DOUBLE_TEAM, + MOVE_BARRAGE, MOVE_TRANSFORM, MOVE_STRUGGLE, MOVE_SCARY_FACE, + MOVE_CHARGE, MOVE_WISH, MOVE_BRICK_BREAK, MOVE_YAWN, + MOVE_FEATHER_DANCE, MOVE_TEETER_DANCE, MOVE_MUD_SPORT, + MOVE_FAKE_TEARS, MOVE_WATER_SPORT, MOVE_CALM_MIND, MOVE_NONE, + + MOVE_POUND, MOVE_SCRATCH, MOVE_VICE_GRIP, + MOVE_WING_ATTACK, MOVE_FLY, MOVE_BIND, MOVE_SLAM, + MOVE_HORN_ATTACK, MOVE_WRAP, MOVE_THRASH, MOVE_TAIL_WHIP, + MOVE_LEER, MOVE_BITE, MOVE_GROWL, MOVE_ROAR, + MOVE_SING, MOVE_PECK, MOVE_ABSORB, MOVE_STRING_SHOT, + MOVE_EARTHQUAKE, MOVE_FISSURE, MOVE_DIG, MOVE_TOXIC, + MOVE_SCREECH, MOVE_METRONOME, MOVE_LICK, MOVE_CLAMP, + MOVE_CONSTRICT, MOVE_POISON_GAS, MOVE_BUBBLE, + MOVE_SLASH, MOVE_SPIDER_WEB, MOVE_NIGHTMARE, MOVE_CURSE, + MOVE_FORESIGHT, MOVE_CHARM, MOVE_ATTRACT, MOVE_ROCK_SMASH, + MOVE_UPROAR, MOVE_SPIT_UP, MOVE_SWALLOW, MOVE_TORMENT, + MOVE_FLATTER, MOVE_ROLE_PLAY, MOVE_ENDEAVOR, MOVE_TICKLE, + MOVE_COVET, MOVE_NONE }; -static const u8 sDummyWeirdStatusString[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0}; +static const u8 sDummyWeirdStatusString[] = {EOS, EOS, EOS, EOS, EOS, EOS, EOS, EOS, 0, 0}; -const u16 gUnknown_085CD42C[] = +static const u8 gUnknown_085CD42C[] = { - 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101, - 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, - 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, - 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000, - 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102, - 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, - 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100, - 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100, - 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, - 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, - 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, - 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x01ff, - 0x0000, 0x0100, 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100, - 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100, 0x0600, 0x0000, + 0xFF, 1, 0, 1, 0, 0, 1, 1, 0xF, 6, 0, 0, 0xFF, 1, + 1, 1, 0, 0, 0, 1, 0xF, 6, 0, 0, 0xEE, 1, 0, 1, 0, + 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, + 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, + 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, + 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, + 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, + 0xEE, 1, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, + 1, 2, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, 0xEE, 7, 0, + 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, + 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, + 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, 0xD, + 0xE, 0xF, 0, 0, 0, 1, 0x20, 1, 0, 0, 0, 1, 0, 2, + 0, 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, + 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, + 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, + 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, + 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0xFF, + 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0, 1, 0xFF, 1, 0, + 0, 0, 1, 0, 6, 0, 0, 0, 1, 0xFF, 1, 0, 0, 0, 1, 0, + 6, 0, 0, 0, 1, 0xFF, 1, 0, 0, 0, 1, 0, 6, 0, 0 }; -const u16 gUnknown_085CD54C[] = +static const u8 gUnknown_085CD54C[] = { - 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101, - 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, - 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, - 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000, - 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102, - 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, - 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100, - 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100, - 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0100, 0x0f0e, 0x0000, - 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, - 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, - 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, - 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, - 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0111, 0x0100, 0x0000, 0x0201, - 0x0301, 0x0000 + 0xFF, 1, 0, 1, 0, 0, 1, 1, 0xF, 6, 0, 0, 0xFF, 1, + 1, 1, 0, 0, 0, 1, 0xF, 6, 0, 0, 0xEE, 1, 0, 1, 0, + 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, + 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, + 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, + 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, + 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, + 0xEE, 1, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, + 1, 2, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, 0xEE, 7, 0, + 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, + 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, + 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, 0xD, + 0xE, 0xF, 0, 0, 0, 1, 0x20, 1, 0, 0, 0, 1, 0, 2, + 0, 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 1, 0xE, 0xF, 0, + 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, + 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, + 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, + 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0xFF, + 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0xFF, 1, + 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0x11, 1, 0, 1, 0, 0, + 1, 2, 1, 3, 0, 0 }; -const u16 * const gUnknown_085CD660[] = +static const u8 * const gUnknown_085CD660[] = { gUnknown_085CD42C, gUnknown_085CD54C }; -const u8 gUnknown_085CD668[] = {8, 4, 1, 0}; - -extern struct StringInfoBattle *gStringInfo; +static const u8 sRecordedBattleTextSpeeds[] = {8, 4, 1, 0}; void BufferStringBattle(u16 stringID) { @@ -1356,7 +1441,7 @@ void BufferStringBattle(u16 stringID) } break; case STRINGID_USEDMOVE: // pokemon used a move msg - sub_814F8F8(gBattleTextBuff1); + sub_814F8F8(gBattleTextBuff1); // buff1 doesn't appear in the string, leftover from japanese move names? if (gStringInfo->currentMove > LAST_MOVE_INDEX) StringCopy(gBattleTextBuff2, gText_UnknownMoveTypes[*(&gBattleStruct->stringMoveType)]); @@ -1509,8 +1594,6 @@ static const u8* TryGetStatusString(u8* src) StringGetEnd10(text); \ toCpy = text; -extern u8 gUnknown_0203C7B4; - u32 BattleStringExpandPlaceholders(const u8* src, u8* dst) { u32 dstID = 0; // if they used dstID, why not use srcID as well? @@ -2067,3 +2150,184 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) } } } + +static void sub_814F8F8(u8* textBuff) +{ + s32 counter = 0; + u32 i = 0; + + while (counter != 4) + { + if (sUnknownMoveTable[i] == MOVE_NONE) + counter++; + if (sUnknownMoveTable[i++] == gStringInfo->currentMove) + break; + } + + if (counter >= 0) + { + if (counter <= 2) + StringCopy(textBuff, gText_SpaceIs); // is + else if (counter <= 4) + StringCopy(textBuff, gText_ApostropheS); // 's + } +} + +static void sub_814F950(u8* dst) +{ + s32 counter = 0; + s32 i = 0; + + while (*dst != EOS) + dst++; + + while (counter != 4) + { + if (sUnknownMoveTable[i] == MOVE_NONE) + counter++; + if (sUnknownMoveTable[i++] == gStringInfo->currentMove) + break; + } + + switch (counter) + { + case 0: + StringCopy(dst, gText_ExclamationMark); + break; + case 1: + StringCopy(dst, gText_ExclamationMark2); + break; + case 2: + StringCopy(dst, gText_ExclamationMark3); + break; + case 3: + StringCopy(dst, gText_ExclamationMark4); + break; + case 4: + StringCopy(dst, gText_ExclamationMark5); + break; + } +} + +void sub_814F9EC(const u8 *text, u8 arg1) +{ + const u8 *r8 = gUnknown_085CD660[gBattleScripting.field_24]; + bool32 r9; + struct TextSubPrinter textSubPrinter; + u8 speed; + + if (arg1 & 0x80) + { + arg1 &= ~(0x80); + r9 = FALSE; + } + else + { + FillWindowPixelBuffer(arg1, r8[12 * arg1]); + r9 = TRUE; + } + + textSubPrinter.current_text_offset = text; + textSubPrinter.windowId = arg1; + textSubPrinter.fontId = r8[(12 * arg1) + 1]; + textSubPrinter.x = r8[(12 * arg1) + 2]; + textSubPrinter.y = r8[(12 * arg1) + 3]; + textSubPrinter.currentX = textSubPrinter.x; + textSubPrinter.currentY = textSubPrinter.y; + textSubPrinter.letterSpacing = r8[(12 * arg1) + 4]; + textSubPrinter.lineSpacing = r8[(12 * arg1) + 5]; + textSubPrinter.fontColor_l = 0; + textSubPrinter.fontColor_h = r8[(12 * arg1) + 7]; + textSubPrinter.bgColor = r8[(12 * arg1) + 8]; + textSubPrinter.shadowColor = r8[(12 * arg1) + 9]; + + if (textSubPrinter.x == 0xFF) + { + s32 var2; + u32 var = sub_80397C4(gBattleScripting.field_24, arg1); + var2 = GetStringCenterAlignXOffsetWithLetterSpacing(textSubPrinter.fontId, textSubPrinter.current_text_offset, var, textSubPrinter.letterSpacing); + textSubPrinter.x = textSubPrinter.currentX = var2; + } + + if (arg1 == 0x16) + gTextFlags.flag_1 = 0; + else + gTextFlags.flag_1 = 1; + + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED)) + gTextFlags.flag_2 = 1; + else + gTextFlags.flag_2 = 0; + + if (arg1 == 0 || arg1 == 0x16) + { + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + speed = 1; + else if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) + speed = sRecordedBattleTextSpeeds[sub_8185FC4()]; + else + speed = sav2_get_text_speed(); + + gTextFlags.flag_0 = 1; + } + else + { + speed = r8[(12 * arg1) + 6]; + gTextFlags.flag_0 = 0; + } + + AddTextPrinter(&textSubPrinter, speed, NULL); + + if (r9) + { + PutWindowTilemap(arg1); + CopyWindowToVram(arg1, 3); + } +} + +void SetPpNumbersPaletteInMoveSelection(void) +{ + struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBank][4]); + const u16 *palPtr = gUnknown_08D85620; + u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBank]], + chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBank]]); + + gPlttBufferUnfaded[92] = palPtr[(var * 2) + 0]; + gPlttBufferUnfaded[91] = palPtr[(var * 2) + 1]; + + CpuCopy16(&gPlttBufferUnfaded[92], &gPlttBufferFaded[92], sizeof(u16)); + CpuCopy16(&gPlttBufferUnfaded[91], &gPlttBufferFaded[91], sizeof(u16)); +} + +u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp) +{ + if (maxPp == currentPp) + { + return 3; + } + else if (maxPp <= 2) + { + if (currentPp > 1) + return 3; + else + return 2 - currentPp; + } + else if (maxPp <= 7) + { + if (currentPp > 2) + return 3; + else + return 2 - currentPp; + } + else + { + if (currentPp == 0) + return 2; + if (currentPp <= maxPp / 4) + return 1; + if (currentPp > maxPp / 2) + return 3; + } + + return 0; +} From 6941be8e338ed842352d3984b69a9051517df7b0 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 9 Oct 2017 13:41:07 +0200 Subject: [PATCH 4/7] match and clean up ai script commands --- src/battle_ai_script_commands.c | 840 +++++--------------------------- 1 file changed, 115 insertions(+), 725 deletions(-) diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 92126e40c..bba66983b 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -7,11 +7,13 @@ #include "rng.h" #include "item.h" #include "battle_move_effects.h" +#include "moves.h" +#include "util.h" #define AIScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) #define AIScriptRead16(ptr) ((ptr)[0] | (ptr)[1] << 8) #define AIScriptRead8(ptr) ((ptr)[0]) -#define AIScriptReadPtr(ptr) (u8*) AIScriptRead32(ptr) +#define AIScriptReadPtr(ptr) (const u8*) AIScriptRead32(ptr) #define AI_ACTION_DONE 0x0001 #define AI_ACTION_FLEE 0x0002 @@ -52,16 +54,16 @@ AI scripts. extern u32 gBattleTypeFlags; extern u8 gActiveBank; -extern struct BattlePokemon gBattleMons[4]; +extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT]; extern u16 gCurrentMove; extern u8 gBankTarget; extern u8 gAbsentBankFlags; -extern u16 gLastUsedMovesByBanks[4]; +extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; extern u16 gTrainerBattleOpponent_A; extern u16 gTrainerBattleOpponent_B; -extern u32 gStatuses3[4]; +extern u32 gStatuses3[BATTLE_BANKS_COUNT]; extern u16 gSideAffecting[2]; -extern u16 gBattlePartyID[4]; +extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; extern u16 gDynamicBasePower; extern u8 gBattleMoveFlags; extern s32 gBattleMoveDamage; @@ -70,13 +72,8 @@ extern u16 gBattleWeather; extern const struct BattleMove gBattleMoves[]; extern const struct BaseStats gBaseStats[]; -extern const u32 gBitTable[]; -extern u8 * const gBattleAI_ScriptsTable[]; +extern const u8 * const gBattleAI_ScriptsTable[]; -extern u8 GetWhoStrikesFirst(u8, u8, u8); -extern void AI_CalcDmg(u8, u8); - -extern u8 CheckMoveLimitations(); extern u32 GetAiScriptsInRecordedBattle(); extern u32 GetAiScriptsInBattleFactory(); @@ -116,8 +113,8 @@ static void BattleAICmd_if_move(void); static void BattleAICmd_if_not_move(void); static void BattleAICmd_if_in_bytes(void); static void BattleAICmd_if_not_in_bytes(void); -static void BattleAICmd_if_in_words(void); -static void BattleAICmd_if_not_in_words(void); +static void BattleAICmd_if_in_hwords(void); +static void BattleAICmd_if_not_in_hwords(void); static void BattleAICmd_if_user_can_damage(void); static void BattleAICmd_if_user_cant_damage(void); static void BattleAICmd_get_turn_count(void); @@ -227,8 +224,8 @@ static const BattleAICmdFunc sBattleAICmdTable[] = BattleAICmd_if_not_move, // 0x1A BattleAICmd_if_in_bytes, // 0x1B BattleAICmd_if_not_in_bytes, // 0x1C - BattleAICmd_if_in_words, // 0x1D - BattleAICmd_if_not_in_words, // 0x1E + BattleAICmd_if_in_hwords, // 0x1D + BattleAICmd_if_not_in_hwords, // 0x1E BattleAICmd_if_user_can_damage, // 0x1F BattleAICmd_if_user_cant_damage, // 0x20 BattleAICmd_get_turn_count, // 0x21 @@ -472,13 +469,11 @@ static u8 BattleAI_ChooseMoveOrAction_Singles(void) return consideredMoveArray[Random() % numOfBestMoves]; } -#ifdef NONMATCHING static u8 BattleAI_ChooseMoveOrAction_Doubles(void) { s32 i; s32 j; s32 scriptsToRun; - s16 mostMovePoints; s16 bestMovePointsForTarget[4]; s8 mostViableTargetsArray[4]; u8 actionOrMoveIndex[4]; @@ -486,27 +481,27 @@ static u8 BattleAI_ChooseMoveOrAction_Doubles(void) u8 mostViableMovesIndices[4]; s32 mostViableTargetsNo; s32 mostViableMovesNo; + s16 mostMovePoints; - for (i = 0; i < 4; i++) //08130D14 + for (i = 0; i < 4; i++) { if (i == sBank_AI || gBattleMons[i].hp == 0) { - //_08130D2E actionOrMoveIndex[i] = -1; bestMovePointsForTarget[i] = -1; } - //_08130D48 else { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) BattleAI_SetupAIData(gBattleStruct->field_92 >> 4); else BattleAI_SetupAIData(0xF); - //_08130D76 + gBankTarget = i; - if ((i & 1) != (sBank_AI & 1)) + + if ((i & BIT_SIDE) != (sBank_AI & BIT_SIDE)) RecordLastUsedMoveByTarget(); - //_08130D90 + AI_THINKING_STRUCT->aiLogicId = 0; AI_THINKING_STRUCT->movesetIndex = 0; scriptsToRun = AI_THINKING_STRUCT->aiFlags; @@ -521,14 +516,12 @@ static u8 BattleAI_ChooseMoveOrAction_Doubles(void) AI_THINKING_STRUCT->aiLogicId++; AI_THINKING_STRUCT->movesetIndex = 0; } - //_08130DD8 if (AI_THINKING_STRUCT->aiAction & AI_ACTION_FLEE) actionOrMoveIndex[i] = 4; else if (AI_THINKING_STRUCT->aiAction & AI_ACTION_WATCH) actionOrMoveIndex[i] = 5; else { - //_08130E10 mostViableMovesScores[0] = AI_THINKING_STRUCT->score[0]; mostViableMovesIndices[0] = 0; mostViableMovesNo = 1; @@ -555,17 +548,20 @@ static u8 BattleAI_ChooseMoveOrAction_Doubles(void) bestMovePointsForTarget[i] = mostViableMovesScores[0]; // don't use a move against ally if it has less than 100 pts - if (i == (sBank_AI ^ 2) && bestMovePointsForTarget[i] < 100) + if (i == (sBank_AI ^ BIT_MON) && bestMovePointsForTarget[i] < 100) + { bestMovePointsForTarget[i] = -1; + mostViableMovesScores[0] = mostViableMovesScores[0]; // needed to match + } + } } - //_08130EAE } - //08130EC4 mostMovePoints = bestMovePointsForTarget[0]; mostViableTargetsArray[0] = 0; mostViableTargetsNo = 1; + for (i = 1; i < 4; i++) { //_08130EDA @@ -582,305 +578,10 @@ static u8 BattleAI_ChooseMoveOrAction_Doubles(void) mostViableTargetsNo = 1; } } + gBankTarget = mostViableTargetsArray[Random() % mostViableTargetsNo]; return actionOrMoveIndex[gBankTarget]; } -#else -__attribute__((naked)) -static u8 BattleAI_ChooseMoveOrAction_Doubles(void) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x24\n\ - movs r0, 0\n\ - mov r8, r0\n\ - mov r1, sp\n\ - adds r1, 0xC\n\ - str r1, [sp, 0x1C]\n\ - mov r2, sp\n\ - adds r2, 0x8\n\ - str r2, [sp, 0x18]\n\ - str r1, [sp, 0x20]\n\ - mov r10, sp\n\ -_08130D14:\n\ - ldr r0, =sBank_AI\n\ - ldrb r0, [r0]\n\ - cmp r8, r0\n\ - beq _08130D2E\n\ - movs r0, 0x58\n\ - mov r7, r8\n\ - muls r7, r0\n\ - adds r0, r7, 0\n\ - ldr r1, =gBattleMons\n\ - adds r0, r1\n\ - ldrh r0, [r0, 0x28]\n\ - cmp r0, 0\n\ - bne _08130D48\n\ -_08130D2E:\n\ - movs r0, 0xFF\n\ - ldr r2, [sp, 0x20]\n\ - strb r0, [r2]\n\ - ldr r0, =0x0000ffff\n\ - mov r7, r10\n\ - strh r0, [r7]\n\ - b _08130EAE\n\ - .pool\n\ -_08130D48:\n\ - ldr r0, =gBattleTypeFlags\n\ - ldr r0, [r0]\n\ - movs r1, 0x80\n\ - lsls r1, 10\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _08130D70\n\ - ldr r0, =gBattleStruct\n\ - ldr r0, [r0]\n\ - adds r0, 0x92\n\ - ldrb r0, [r0]\n\ - lsrs r0, 4\n\ - bl BattleAI_SetupAIData\n\ - b _08130D76\n\ - .pool\n\ -_08130D70:\n\ - movs r0, 0xF\n\ - bl BattleAI_SetupAIData\n\ -_08130D76:\n\ - ldr r0, =gBankTarget\n\ - mov r1, r8\n\ - strb r1, [r0]\n\ - movs r1, 0x1\n\ - mov r2, r8\n\ - ands r2, r1\n\ - ldr r0, =sBank_AI\n\ - ldrb r0, [r0]\n\ - ands r1, r0\n\ - cmp r2, r1\n\ - beq _08130D90\n\ - bl RecordLastUsedMoveByTarget\n\ -_08130D90:\n\ - ldr r2, =gBattleResources\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - movs r1, 0\n\ - strb r1, [r0, 0x11]\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - strb r1, [r0, 0x1]\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - ldr r4, [r0, 0xC]\n\ - mov r9, r2\n\ - cmp r4, 0\n\ - beq _08130DD8\n\ - mov r5, r9\n\ - movs r6, 0\n\ -_08130DB0:\n\ - movs r0, 0x1\n\ - ands r0, r4\n\ - cmp r0, 0\n\ - beq _08130DC2\n\ - ldr r0, [r5]\n\ - ldr r0, [r0, 0x14]\n\ - strb r6, [r0]\n\ - bl BattleAI_DoAIProcessing\n\ -_08130DC2:\n\ - asrs r4, 1\n\ - ldr r0, [r5]\n\ - ldr r1, [r0, 0x14]\n\ - ldrb r0, [r1, 0x11]\n\ - adds r0, 0x1\n\ - strb r0, [r1, 0x11]\n\ - ldr r0, [r5]\n\ - ldr r0, [r0, 0x14]\n\ - strb r6, [r0, 0x1]\n\ - cmp r4, 0\n\ - bne _08130DB0\n\ -_08130DD8:\n\ - mov r2, r9\n\ - ldr r0, [r2]\n\ - ldr r3, [r0, 0x14]\n\ - ldrb r1, [r3, 0x10]\n\ - movs r0, 0x2\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _08130DFC\n\ - movs r0, 0x4\n\ - ldr r7, [sp, 0x20]\n\ - strb r0, [r7]\n\ - b _08130EAE\n\ - .pool\n\ -_08130DFC:\n\ - movs r0, 0x4\n\ - ands r0, r1\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r2, 0\n\ - beq _08130E10\n\ - movs r0, 0x5\n\ - ldr r1, [sp, 0x20]\n\ - strb r0, [r1]\n\ - b _08130EAE\n\ -_08130E10:\n\ - add r1, sp, 0x10\n\ - ldrb r0, [r3, 0x4]\n\ - strb r0, [r1]\n\ - add r0, sp, 0x14\n\ - strb r2, [r0]\n\ - movs r5, 0x1\n\ - movs r3, 0x1\n\ - adds r6, r1, 0\n\ - ldr r0, =sBank_AI\n\ - ldrb r1, [r0]\n\ - movs r0, 0x58\n\ - muls r0, r1\n\ - ldr r2, =gBattleMons + 0xC\n\ - adds r0, r2\n\ - adds r4, r0, 0x2\n\ - add r7, sp, 0x14\n\ -_08130E30:\n\ - ldrh r0, [r4]\n\ - cmp r0, 0\n\ - beq _08130E72\n\ - ldrb r1, [r6]\n\ - mov r2, r9\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - adds r0, 0x4\n\ - adds r2, r0, r3\n\ - movs r0, 0\n\ - ldrsb r0, [r2, r0]\n\ - cmp r1, r0\n\ - bne _08130E56\n\ - adds r0, r6, r5\n\ - ldrb r1, [r2]\n\ - strb r1, [r0]\n\ - adds r0, r7, r5\n\ - strb r3, [r0]\n\ - adds r5, 0x1\n\ -_08130E56:\n\ - ldrb r1, [r6]\n\ - mov r2, r9\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - adds r0, 0x4\n\ - adds r2, r0, r3\n\ - movs r0, 0\n\ - ldrsb r0, [r2, r0]\n\ - cmp r1, r0\n\ - bge _08130E72\n\ - ldrb r0, [r2]\n\ - strb r0, [r6]\n\ - strb r3, [r7]\n\ - movs r5, 0x1\n\ -_08130E72:\n\ - adds r4, 0x2\n\ - adds r3, 0x1\n\ - cmp r3, 0x3\n\ - ble _08130E30\n\ - bl Random\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - adds r1, r5, 0\n\ - bl __modsi3\n\ - add r0, sp\n\ - adds r0, 0x14\n\ - ldrb r0, [r0]\n\ - ldr r7, [sp, 0x20]\n\ - strb r0, [r7]\n\ - ldrb r2, [r6]\n\ - mov r0, r10\n\ - strh r2, [r0]\n\ - ldr r0, =sBank_AI\n\ - ldrb r1, [r0]\n\ - movs r0, 0x2\n\ - eors r0, r1\n\ - cmp r8, r0\n\ - bne _08130EAE\n\ - cmp r2, 0x63\n\ - bgt _08130EAE\n\ - ldr r0, =0x0000ffff\n\ - mov r1, r10\n\ - strh r0, [r1]\n\ -_08130EAE:\n\ - ldr r2, [sp, 0x20]\n\ - adds r2, 0x1\n\ - str r2, [sp, 0x20]\n\ - movs r7, 0x2\n\ - add r10, r7\n\ - movs r0, 0x1\n\ - add r8, r0\n\ - mov r1, r8\n\ - cmp r1, 0x3\n\ - bgt _08130EC4\n\ - b _08130D14\n\ -_08130EC4:\n\ - mov r0, sp\n\ - ldrh r5, [r0]\n\ - movs r0, 0\n\ - ldr r2, [sp, 0x18]\n\ - strb r0, [r2]\n\ - movs r4, 0x1\n\ - mov r8, r4\n\ - ldr r6, =gBankTarget\n\ - ldr r3, [sp, 0x18]\n\ - mov r1, sp\n\ - adds r1, 0x2\n\ -_08130EDA:\n\ - lsls r0, r5, 16\n\ - asrs r2, r0, 16\n\ - movs r7, 0\n\ - ldrsh r0, [r1, r7]\n\ - cmp r2, r0\n\ - bne _08130EEE\n\ - adds r0, r3, r4\n\ - mov r7, r8\n\ - strb r7, [r0]\n\ - adds r4, 0x1\n\ -_08130EEE:\n\ - movs r7, 0\n\ - ldrsh r0, [r1, r7]\n\ - cmp r2, r0\n\ - bge _08130EFE\n\ - ldrh r5, [r1]\n\ - mov r0, r8\n\ - strb r0, [r3]\n\ - movs r4, 0x1\n\ -_08130EFE:\n\ - adds r1, 0x2\n\ - movs r2, 0x1\n\ - add r8, r2\n\ - mov r7, r8\n\ - cmp r7, 0x3\n\ - ble _08130EDA\n\ - bl Random\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - adds r1, r4, 0\n\ - bl __modsi3\n\ - ldr r1, [sp, 0x18]\n\ - adds r0, r1, r0\n\ - ldrb r0, [r0]\n\ - strb r0, [r6]\n\ - ldrb r0, [r6]\n\ - ldr r2, [sp, 0x1C]\n\ - adds r0, r2, r0\n\ - ldrb r0, [r0]\n\ - add sp, 0x24\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r1}\n\ - bx r1\n\ - .pool\n\ - .syntax divided\n"); -} -#endif static void BattleAI_DoAIProcessing(void) { @@ -888,7 +589,7 @@ static void BattleAI_DoAIProcessing(void) { switch (AI_THINKING_STRUCT->aiState) { - case AIState_DoNotProcess: //Needed to match. + case AIState_DoNotProcess: // Needed to match. break; case AIState_SettingUp: gAIScriptPtr = gBattleAI_ScriptsTable[AI_THINKING_STRUCT->aiLogicId]; // set AI ptr to logic ID. @@ -904,7 +605,7 @@ static void BattleAI_DoAIProcessing(void) break; case AIState_Processing: if (AI_THINKING_STRUCT->moveConsidered != 0) - sBattleAICmdTable[*gAIScriptPtr](); // run AI command. + sBattleAICmdTable[*gAIScriptPtr](); // Run AI command. else { AI_THINKING_STRUCT->score[AI_THINKING_STRUCT->movesetIndex] = 0; @@ -934,7 +635,7 @@ static void RecordLastUsedMoveByTarget(void) { if (gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] == gLastUsedMovesByBanks[gBankTarget]) break; - if (gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] != gLastUsedMovesByBanks[gBankTarget] //HACK: This redundant condition is a hack to make the asm match. + if (gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] != gLastUsedMovesByBanks[gBankTarget] // HACK: This redundant condition is a hack to make the asm match. && gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] == 0) { gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] = gLastUsedMovesByBanks[gBankTarget]; @@ -1261,7 +962,7 @@ static void BattleAICmd_if_not_equal(void) static void BattleAICmd_if_less_than_32(void) { - u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); if (AI_THINKING_STRUCT->funcResult < *temp) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); @@ -1271,7 +972,7 @@ static void BattleAICmd_if_less_than_32(void) static void BattleAICmd_if_more_than_32(void) { - u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); if (AI_THINKING_STRUCT->funcResult > *temp) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); @@ -1281,7 +982,7 @@ static void BattleAICmd_if_more_than_32(void) static void BattleAICmd_if_equal_32(void) { - u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); if (AI_THINKING_STRUCT->funcResult == *temp) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); @@ -1291,7 +992,7 @@ static void BattleAICmd_if_equal_32(void) static void BattleAICmd_if_not_equal_32(void) { - u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); if (AI_THINKING_STRUCT->funcResult != *temp) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); @@ -1321,7 +1022,7 @@ static void BattleAICmd_if_not_move(void) static void BattleAICmd_if_in_bytes(void) { - u8 *ptr = AIScriptReadPtr(gAIScriptPtr + 1); + const u8 *ptr = AIScriptReadPtr(gAIScriptPtr + 1); while (*ptr != 0xFF) { @@ -1337,7 +1038,7 @@ static void BattleAICmd_if_in_bytes(void) static void BattleAICmd_if_not_in_bytes(void) { - u8 *ptr = AIScriptReadPtr(gAIScriptPtr + 1); + const u8 *ptr = AIScriptReadPtr(gAIScriptPtr + 1); while (*ptr != 0xFF) { @@ -1351,9 +1052,9 @@ static void BattleAICmd_if_not_in_bytes(void) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); } -static void BattleAICmd_if_in_words(void) +static void BattleAICmd_if_in_hwords(void) { - u16 *ptr = (u16 *)AIScriptReadPtr(gAIScriptPtr + 1); + const u16 *ptr = (const u16 *)AIScriptReadPtr(gAIScriptPtr + 1); while (*ptr != 0xFFFF) { @@ -1367,9 +1068,9 @@ static void BattleAICmd_if_in_words(void) gAIScriptPtr += 9; } -static void BattleAICmd_if_not_in_words(void) +static void BattleAICmd_if_not_in_hwords(void) { - u16 *ptr = (u16 *)AIScriptReadPtr(gAIScriptPtr + 1); + const u16 *ptr = (u16 *)AIScriptReadPtr(gAIScriptPtr + 1); while (*ptr != 0xFFFF) { @@ -1456,9 +1157,9 @@ static u8 BattleAI_GetWantedBank(u8 index) default: return gBankTarget; case AI_USER_PARTNER: - return sBank_AI ^ 2; + return sBank_AI ^ BIT_MON; case AI_TARGET_PARTNER: - return gBankTarget ^ 2; + return gBankTarget ^ BIT_MON; } } @@ -1484,248 +1185,68 @@ static void BattleAICmd_get_last_used_bank_move_power(void) gAIScriptPtr += 1; } -__attribute__((naked)) // not even going to try. if it doesnt match in ruby, it wont match in emerald (yet). static void BattleAICmd_is_most_powerful_move(void) { - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x14\n\ - movs r3, 0\n\ - ldr r0, =sDiscouragedPowerfulMoveEffects\n\ - ldrh r1, [r0]\n\ - ldr r5, =0x0000ffff\n\ - ldr r6, =gBattleMoves\n\ - ldr r2, =gBattleResources\n\ - cmp r1, r5\n\ - beq _08131F86\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - ldrh r1, [r0, 0x2]\n\ - lsls r0, r1, 1\n\ - adds r0, r1\n\ - lsls r0, 2\n\ - adds r0, r6\n\ - ldrb r4, [r0]\n\ - ldr r1, =sDiscouragedPowerfulMoveEffects\n\ -_08131F76:\n\ - ldrh r0, [r1]\n\ - cmp r4, r0\n\ - beq _08131F86\n\ - adds r1, 0x2\n\ - adds r3, 0x1\n\ - ldrh r0, [r1]\n\ - cmp r0, r5\n\ - bne _08131F76\n\ -_08131F86:\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - ldrh r1, [r0, 0x2]\n\ - lsls r0, r1, 1\n\ - adds r0, r1\n\ - lsls r0, 2\n\ - adds r0, r6\n\ - ldrb r0, [r0, 0x1]\n\ - cmp r0, 0x1\n\ - bhi _08131F9C\n\ - b _08132126\n\ -_08131F9C:\n\ - lsls r0, r3, 1\n\ - ldr r1, =sDiscouragedPowerfulMoveEffects\n\ - adds r0, r1\n\ - ldrh r3, [r0]\n\ - ldr r0, =0x0000ffff\n\ - cmp r3, r0\n\ - beq _08131FAC\n\ - b _08132126\n\ -_08131FAC:\n\ - ldr r0, =gDynamicBasePower\n\ - movs r1, 0\n\ - strh r1, [r0]\n\ - ldr r0, =gBattleStruct\n\ - ldr r0, [r0]\n\ - strb r1, [r0, 0x13]\n\ - ldr r0, =gBattleScripting\n\ - movs r2, 0x1\n\ - strb r2, [r0, 0xE]\n\ - ldr r0, =gBattleMoveFlags\n\ - strb r1, [r0]\n\ - ldr r0, =gCritMultiplier\n\ - strb r2, [r0]\n\ - movs r6, 0\n\ - mov r9, r3\n\ - ldr r2, =sDiscouragedPowerfulMoveEffects\n\ - ldrh r2, [r2]\n\ - str r2, [sp, 0x10]\n\ -_08131FD0:\n\ - movs r3, 0\n\ - ldr r5, =gBattleMons\n\ - lsls r4, r6, 1\n\ - ldr r7, =sBank_AI\n\ - lsls r0, r6, 2\n\ - mov r8, r0\n\ - adds r1, r6, 0x1\n\ - mov r10, r1\n\ - ldr r2, [sp, 0x10]\n\ - cmp r2, r9\n\ - beq _08132014\n\ - ldr r2, =gBattleMoves\n\ - ldrb r1, [r7]\n\ - movs r0, 0x58\n\ - muls r0, r1\n\ - adds r0, r4, r0\n\ - adds r1, r5, 0\n\ - adds r1, 0xC\n\ - adds r0, r1\n\ - ldrh r1, [r0]\n\ - lsls r0, r1, 1\n\ - adds r0, r1\n\ - lsls r0, 2\n\ - adds r0, r2\n\ - ldrb r2, [r0]\n\ - ldr r1, =sDiscouragedPowerfulMoveEffects\n\ -_08132004:\n\ - ldrh r0, [r1]\n\ - cmp r2, r0\n\ - beq _08132014\n\ - adds r1, 0x2\n\ - adds r3, 0x1\n\ - ldrh r0, [r1]\n\ - cmp r0, r9\n\ - bne _08132004\n\ -_08132014:\n\ - ldrb r1, [r7]\n\ - movs r0, 0x58\n\ - muls r0, r1\n\ - adds r0, r4, r0\n\ - adds r1, r5, 0\n\ - adds r1, 0xC\n\ - adds r1, r0, r1\n\ - ldrh r0, [r1]\n\ - cmp r0, 0\n\ - beq _081320C0\n\ - lsls r0, r3, 1\n\ - ldr r2, =sDiscouragedPowerfulMoveEffects\n\ - adds r0, r2\n\ - ldrh r0, [r0]\n\ - cmp r0, r9\n\ - bne _081320C0\n\ - ldr r0, =gBattleMoves\n\ - ldrh r2, [r1]\n\ - lsls r1, r2, 1\n\ - adds r1, r2\n\ - lsls r1, 2\n\ - adds r1, r0\n\ - ldrb r0, [r1, 0x1]\n\ - cmp r0, 0x1\n\ - bls _081320C0\n\ - ldr r5, =gCurrentMove\n\ - strh r2, [r5]\n\ - ldrb r0, [r7]\n\ - ldr r4, =gBankTarget\n\ - ldrb r1, [r4]\n\ - bl AI_CalcDmg\n\ - ldrh r0, [r5]\n\ - ldrb r1, [r7]\n\ - ldrb r2, [r4]\n\ - bl TypeCalc\n\ - mov r4, sp\n\ - add r4, r8\n\ - ldr r2, =gBattleMoveDamage\n\ - ldr r0, =gBattleResources\n\ - ldr r0, [r0]\n\ - ldr r0, [r0, 0x14]\n\ - adds r0, 0x18\n\ - adds r0, r6\n\ - ldrb r1, [r0]\n\ - ldr r0, [r2]\n\ - muls r0, r1\n\ - movs r1, 0x64\n\ - bl __divsi3\n\ - str r0, [r4]\n\ - cmp r0, 0\n\ - bne _081320C8\n\ - movs r0, 0x1\n\ - str r0, [r4]\n\ - b _081320C8\n\ - .pool\n\ -_081320C0:\n\ - mov r1, sp\n\ - add r1, r8\n\ - movs r0, 0\n\ - str r0, [r1]\n\ -_081320C8:\n\ - mov r6, r10\n\ - cmp r6, 0x3\n\ - bgt _081320D0\n\ - b _08131FD0\n\ -_081320D0:\n\ - movs r6, 0\n\ - ldr r2, =gBattleResources\n\ - ldr r0, [r2]\n\ - ldr r0, [r0, 0x14]\n\ - ldrb r0, [r0, 0x1]\n\ - lsls r0, 2\n\ - add r0, sp\n\ - ldr r1, [sp]\n\ - ldr r0, [r0]\n\ - ldr r5, =gAIScriptPtr\n\ - cmp r1, r0\n\ - bgt _08132106\n\ - adds r4, r2, 0\n\ - mov r3, sp\n\ -_081320EC:\n\ - adds r3, 0x4\n\ - adds r6, 0x1\n\ - cmp r6, 0x3\n\ - bgt _08132106\n\ - ldr r0, [r4]\n\ - ldr r0, [r0, 0x14]\n\ - ldrb r0, [r0, 0x1]\n\ - lsls r0, 2\n\ - add r0, sp\n\ - ldr r1, [r3]\n\ - ldr r0, [r0]\n\ - cmp r1, r0\n\ - ble _081320EC\n\ -_08132106:\n\ - cmp r6, 0x4\n\ - bne _0813211C\n\ - ldr r0, [r2]\n\ - ldr r1, [r0, 0x14]\n\ - movs r0, 0x2\n\ - str r0, [r1, 0x8]\n\ - b _08132130\n\ - .pool\n\ -_0813211C:\n\ - ldr r0, [r2]\n\ - ldr r1, [r0, 0x14]\n\ - movs r0, 0x1\n\ - str r0, [r1, 0x8]\n\ - b _08132130\n\ -_08132126:\n\ - ldr r0, [r2]\n\ - ldr r1, [r0, 0x14]\n\ - movs r0, 0\n\ - str r0, [r1, 0x8]\n\ - ldr r5, =gAIScriptPtr\n\ -_08132130:\n\ - ldr r0, [r5]\n\ - adds r0, 0x1\n\ - str r0, [r5]\n\ - add sp, 0x14\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); + s32 i, checkedMove; + s32 moveDmgs[4]; + + for (i = 0; sDiscouragedPowerfulMoveEffects[i] != 0xFFFF; i++) + { + if (gBattleMoves[AI_THINKING_STRUCT->moveConsidered].effect == sDiscouragedPowerfulMoveEffects[i]) + break; + } + + if (gBattleMoves[AI_THINKING_STRUCT->moveConsidered].power > 1 + && sDiscouragedPowerfulMoveEffects[i] == 0xFFFF) + { + gDynamicBasePower = 0; + *(&gBattleStruct->dynamicMoveType) = 0; + gBattleScripting.dmgMultiplier = 1; + gBattleMoveFlags = 0; + gCritMultiplier = 1; + + for (checkedMove = 0; checkedMove < 4; checkedMove++) + { + for (i = 0; sDiscouragedPowerfulMoveEffects[i] != 0xFFFF; i++) + { + if (gBattleMoves[gBattleMons[sBank_AI].moves[checkedMove]].effect == sDiscouragedPowerfulMoveEffects[i]) + break; + } + + if (gBattleMons[sBank_AI].moves[checkedMove] != MOVE_NONE + && sDiscouragedPowerfulMoveEffects[i] == 0xFFFF + && gBattleMoves[gBattleMons[sBank_AI].moves[checkedMove]].power > 1) + { + gCurrentMove = gBattleMons[sBank_AI].moves[checkedMove]; + AI_CalcDmg(sBank_AI, gBankTarget); + TypeCalc(gCurrentMove, sBank_AI, gBankTarget); + moveDmgs[checkedMove] = gBattleMoveDamage * AI_THINKING_STRUCT->simulatedRNG[checkedMove] / 100; + if (moveDmgs[checkedMove] == 0) + moveDmgs[checkedMove] = 1; + } + else + { + moveDmgs[checkedMove] = 0; + } + } + + for (checkedMove = 0; checkedMove < 4; checkedMove++) + { + if (moveDmgs[checkedMove] > moveDmgs[AI_THINKING_STRUCT->movesetIndex]) + break; + } + + if (checkedMove == 4) + AI_THINKING_STRUCT->funcResult = 2; // is the most powerful + else + AI_THINKING_STRUCT->funcResult = 1; // not most powerful + } + else + { + AI_THINKING_STRUCT->funcResult = 0; // highly discouraged in terms of power + } + + gAIScriptPtr++; } static void BattleAICmd_get_last_used_bank_move(void) @@ -1756,7 +1277,7 @@ static void BattleAICmd_if_arg_not_equal(void) static void BattleAICmd_if_would_go_first(void) { - if (GetWhoStrikesFirst(sBank_AI, gBankTarget, 1) == gAIScriptPtr[1]) + if (GetWhoStrikesFirst(sBank_AI, gBankTarget, TRUE) == gAIScriptPtr[1]) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); else gAIScriptPtr += 6; @@ -1764,7 +1285,7 @@ static void BattleAICmd_if_would_go_first(void) static void BattleAICmd_if_would_not_go_first(void) { - if (GetWhoStrikesFirst(sBank_AI, gBankTarget, 1) != gAIScriptPtr[1]) + if (GetWhoStrikesFirst(sBank_AI, gBankTarget, TRUE) != gAIScriptPtr[1]) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); else gAIScriptPtr += 6; @@ -1792,7 +1313,7 @@ static void BattleAICmd_count_alive_pokemon(void) else index = gBankTarget; - if (GetBankSide(index) == 0) + if (GetBankSide(index) == SIDE_PLAYER) party = gPlayerParty; else party = gEnemyParty; @@ -1896,11 +1417,10 @@ static void BattleAICmd_get_ability(void) gAIScriptPtr += 2; } -#ifdef NONMATCHING static void BattleAICmd_check_ability(void) { - u8 bank = BattleAI_GetWantedBank(gAIScriptPtr[1]); - u8 ability = gAIScriptPtr[2]; + u32 bank = BattleAI_GetWantedBank(gAIScriptPtr[1]); + u32 ability = gAIScriptPtr[2]; if (gAIScriptPtr[1] == AI_TARGET || gAIScriptPtr[1] == AI_TARGET_PARTNER) { @@ -1920,8 +1440,9 @@ static void BattleAICmd_check_ability(void) { if (gBaseStats[gBattleMons[bank].species].ability2 != ABILITY_NONE) { - if (gBaseStats[gBattleMons[bank].species].ability1 != ability - && gBaseStats[gBattleMons[bank].species].ability2 != ability) + u8 abilityDummyVariable = ability; // needed to match + if (gBaseStats[gBattleMons[bank].species].ability1 != abilityDummyVariable + && gBaseStats[gBattleMons[bank].species].ability2 != abilityDummyVariable) { ability = gBaseStats[gBattleMons[bank].species].ability1; } @@ -1957,137 +1478,6 @@ static void BattleAICmd_check_ability(void) } gAIScriptPtr += 3; } -#else -__attribute__((naked)) -static void BattleAICmd_check_ability(void) -{ - asm(".syntax unified\n\ - push {r4-r6,lr}\n\ - ldr r4, =gAIScriptPtr\n\ - ldr r0, [r4]\n\ - ldrb r0, [r0, 0x1]\n\ - bl BattleAI_GetWantedBank\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - ldr r0, [r4]\n\ - ldrb r3, [r0, 0x2]\n\ - ldrb r0, [r0, 0x1]\n\ - cmp r0, 0\n\ - beq _0813253A\n\ - cmp r0, 0x2\n\ - bne _081325BC\n\ -_0813253A:\n\ - ldr r0, =gBattleResources\n\ - ldr r4, [r0]\n\ - ldr r1, [r4, 0x18]\n\ - adds r1, 0x40\n\ - adds r2, r1, r5\n\ - ldrb r1, [r2]\n\ - adds r6, r0, 0\n\ - cmp r1, 0\n\ - beq _0813255C\n\ - adds r3, r1, 0\n\ - ldr r0, [r4, 0x14]\n\ - str r3, [r0, 0x8]\n\ - b _081325CA\n\ - .pool\n\ -_0813255C:\n\ - ldr r1, =gBattleMons\n\ - movs r0, 0x58\n\ - muls r0, r5\n\ - adds r4, r0, r1\n\ - adds r0, r4, 0\n\ - adds r0, 0x20\n\ - ldrb r0, [r0]\n\ - cmp r0, 0x17\n\ - beq _08132576\n\ - cmp r0, 0x2A\n\ - beq _08132576\n\ - cmp r0, 0x47\n\ - bne _08132588\n\ -_08132576:\n\ - movs r0, 0x58\n\ - muls r0, r5\n\ - adds r0, r1\n\ - adds r0, 0x20\n\ - ldrb r3, [r0]\n\ - b _081325CA\n\ - .pool\n\ -_08132588:\n\ - ldr r2, =gBaseStats\n\ - ldrh r1, [r4]\n\ - lsls r0, r1, 3\n\ - subs r0, r1\n\ - lsls r0, 2\n\ - adds r1, r0, r2\n\ - ldrb r4, [r1, 0x16]\n\ - cmp r4, 0\n\ - beq _081325B8\n\ - ldrb r2, [r1, 0x17]\n\ - cmp r2, 0\n\ - beq _081325B4\n\ - adds r0, r3, 0\n\ - cmp r4, r0\n\ - beq _081325CE\n\ - cmp r2, r0\n\ - beq _081325CE\n\ - adds r3, r4, 0\n\ - b _081325CA\n\ - .pool\n\ -_081325B4:\n\ - ldrb r3, [r1, 0x16]\n\ - b _081325CA\n\ -_081325B8:\n\ - ldrb r3, [r1, 0x17]\n\ - b _081325CA\n\ -_081325BC:\n\ - ldr r1, =gBattleMons\n\ - movs r0, 0x58\n\ - muls r0, r5\n\ - adds r0, r1\n\ - adds r0, 0x20\n\ - ldrb r3, [r0]\n\ - ldr r6, =gBattleResources\n\ -_081325CA:\n\ - cmp r3, 0\n\ - bne _081325E8\n\ -_081325CE:\n\ - ldr r0, [r6]\n\ - ldr r1, [r0, 0x14]\n\ - movs r0, 0x2\n\ - str r0, [r1, 0x8]\n\ - ldr r2, =gAIScriptPtr\n\ - b _08132608\n\ - .pool\n\ -_081325E8:\n\ - ldr r0, =gAIScriptPtr\n\ - ldr r1, [r0]\n\ - adds r2, r0, 0\n\ - ldrb r1, [r1, 0x2]\n\ - cmp r3, r1\n\ - bne _08132600\n\ - ldr r0, [r6]\n\ - ldr r1, [r0, 0x14]\n\ - movs r0, 0x1\n\ - b _08132606\n\ - .pool\n\ -_08132600:\n\ - ldr r0, [r6]\n\ - ldr r1, [r0, 0x14]\n\ - movs r0, 0\n\ -_08132606:\n\ - str r0, [r1, 0x8]\n\ -_08132608:\n\ - ldr r0, [r2]\n\ - adds r0, 0x3\n\ - str r0, [r2]\n\ - pop {r4-r6}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); -} -#endif static void BattleAICmd_get_highest_type_effectiveness(void) { @@ -2184,7 +1574,7 @@ static void BattleAICmd_if_status_in_party(void) switch(gAIScriptPtr[1]) { - case 1: + case AI_USER: index = sBank_AI; break; default: @@ -2397,7 +1787,7 @@ static void BattleAICmd_if_cant_faint(void) static void BattleAICmd_if_has_move(void) { int i; - u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2); + const u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2); switch(gAIScriptPtr[1]) { @@ -2464,7 +1854,7 @@ static void BattleAICmd_if_has_move(void) static void BattleAICmd_if_dont_have_move(void) { int i; - u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2); + const u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2); switch(gAIScriptPtr[1]) { @@ -2631,7 +2021,7 @@ static void BattleAICmd_if_curr_move_disabled_or_encored(void) static void BattleAICmd_flee(void) { - AI_THINKING_STRUCT->aiAction |= (AI_ACTION_DONE | AI_ACTION_FLEE | AI_ACTION_DO_NOT_ATTACK); // what matters is UNK2 being enabled. + AI_THINKING_STRUCT->aiAction |= (AI_ACTION_DONE | AI_ACTION_FLEE | AI_ACTION_DO_NOT_ATTACK); } static void BattleAICmd_if_random_100(void) @@ -2646,7 +2036,7 @@ static void BattleAICmd_if_random_100(void) static void BattleAICmd_watch(void) { - AI_THINKING_STRUCT->aiAction |= (AI_ACTION_DONE | AI_ACTION_WATCH | AI_ACTION_DO_NOT_ATTACK); // what matters is UNK3 being enabled. + AI_THINKING_STRUCT->aiAction |= (AI_ACTION_DONE | AI_ACTION_WATCH | AI_ACTION_DO_NOT_ATTACK); } static void BattleAICmd_get_hold_effect(void) @@ -2675,7 +2065,7 @@ static void BattleAICmd_if_holds_item(void) u16 item; u8 var1, var2; - if ((bank & 1) == (sBank_AI & 1)) + if ((bank & BIT_SIDE) == (sBank_AI & BIT_SIDE)) item = gBattleMons[bank].item; else item = BATTLE_HISTORY->itemEffects[bank]; @@ -2752,7 +2142,7 @@ static void BattleAICmd_get_used_held_item(void) #ifdef NONMATCHING AI_THINKING_STRUCT->funcResult = gBattleStruct->usedHeldItems[bank]; #else - AI_THINKING_STRUCT->funcResult = *(u8*)((u8*)(gBattleStruct) + 0xB8 + (bank * 2)); + AI_THINKING_STRUCT->funcResult = *(u8*)((u8*)(gBattleStruct) + offsetof(struct BattleStruct, usedHeldItems) + (bank * 2)); #endif // NONMATCHING gAIScriptPtr += 2; From 7b690dbe3a71f800b7e112a75559e9db6ac1e8bc Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 9 Oct 2017 13:48:41 +0200 Subject: [PATCH 5/7] add save location header, change static names --- include/save_location.h | 9 +++++++++ src/save_location.c | 13 +++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 include/save_location.h diff --git a/include/save_location.h b/include/save_location.h new file mode 100644 index 000000000..95b3a7d7d --- /dev/null +++ b/include/save_location.h @@ -0,0 +1,9 @@ +#ifndef GUARD_SAVE_LOCATION_H +#define GUARD_SAVE_LOCATION_H + +bool32 sub_81AFCEC(void); +void TrySetMapSaveWarpStatus(void); +void sub_81AFDA0(void); +void sub_81AFDD0(void); + +#endif // GUARD_SAVE_LOCATION_H diff --git a/src/save_location.c b/src/save_location.c index 87067e14d..61a5fd30d 100755 --- a/src/save_location.c +++ b/src/save_location.c @@ -1,4 +1,5 @@ #include "global.h" +#include "save_location.h" #include "map_constants.h" // used to make the list defines a little less ugly. @@ -26,7 +27,7 @@ static bool32 IsCurMapInLocationList(const u16 *list) } // TODO: Not require a packed u16 array for these lists -static const u16 gSaveLocationPokeCenterList[] = +static const u16 sSaveLocationPokeCenterList[] = { MAP(OLDALE_TOWN_POKEMON_CENTER_1F), MAP(OLDALE_TOWN_POKEMON_CENTER_2F), @@ -71,10 +72,10 @@ static const u16 gSaveLocationPokeCenterList[] = static bool32 IsCurMapPokeCenter(void) { - return IsCurMapInLocationList(gSaveLocationPokeCenterList); + return IsCurMapInLocationList(sSaveLocationPokeCenterList); } -static const u16 gSaveLocationReloadLocList[] = // there's only 1 location, and it's presumed its for the save reload feature for battle tower +static const u16 sSaveLocationReloadLocList[] = // there's only 1 location, and it's presumed its for the save reload feature for battle tower { MAP(BATTLE_TOWER_LOBBY), 0xFFFF, @@ -82,18 +83,18 @@ static const u16 gSaveLocationReloadLocList[] = // there's only 1 location, and static bool32 IsCurMapReloadLocation(void) { - return IsCurMapInLocationList(gSaveLocationReloadLocList); + return IsCurMapInLocationList(sSaveLocationReloadLocList); } // nulled out list. unknown what this would have been -static const u16 gUnknown_0861440E[] = +static const u16 sUnknown_0861440E[] = { 0xFFFF, }; bool32 sub_81AFCEC(void) { - return IsCurMapInLocationList(gUnknown_0861440E); + return IsCurMapInLocationList(sUnknown_0861440E); } static void TrySetPokeCenterWarpStatus(void) From beab7a10d2dbb5f1385b8cac2e630f82cebb3387 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 9 Oct 2017 23:33:41 +0200 Subject: [PATCH 6/7] table to hex --- src/battle_message.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/battle_message.c b/src/battle_message.c index 77a461544..2c622f06d 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1189,27 +1189,27 @@ static const u8 sDummyWeirdStatusString[] = {EOS, EOS, EOS, EOS, EOS, EOS, EOS, static const u8 gUnknown_085CD42C[] = { - 0xFF, 1, 0, 1, 0, 0, 1, 1, 0xF, 6, 0, 0, 0xFF, 1, - 1, 1, 0, 0, 0, 1, 0xF, 6, 0, 0, 0xEE, 1, 0, 1, 0, - 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, - 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, - 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, - 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, - 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, - 0xEE, 1, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, - 1, 2, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, 0xEE, 7, 0, - 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, - 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, - 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, 0xD, - 0xE, 0xF, 0, 0, 0, 1, 0x20, 1, 0, 0, 0, 1, 0, 2, - 0, 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, - 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, - 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, - 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, - 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0xFF, - 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0, 1, 0xFF, 1, 0, - 0, 0, 1, 0, 6, 0, 0, 0, 1, 0xFF, 1, 0, 0, 0, 1, 0, - 6, 0, 0, 0, 1, 0xFF, 1, 0, 0, 0, 1, 0, 6, 0, 0 + 0xFF, 0x1, 0x0, 0x1, 0x0, 0x0, 0x1, 0x1, 0xF, 0x6, 0x0, 0x0, 0xFF, 0x1, + 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0xF, 0x6, 0x0, 0x0, 0xEE, 0x1, 0x0, 0x1, 0x0, + 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, + 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, + 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, + 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, + 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xC, 0xE, 0xB, 0x0, 0x0, + 0xEE, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, + 0x1, 0x2, 0x1, 0x0, 0x0, 0x0, 0xC, 0xE, 0xB, 0x0, 0x0, 0xEE, 0x7, 0x0, + 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, + 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, + 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, + 0xE, 0xF, 0x0, 0x0, 0x0, 0x1, 0x20, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x2, + 0x0, 0x0, 0xEE, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, + 0x0, 0xEE, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, + 0xEE, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, + 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, + 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, 0xFF, + 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0x0, 0x1, 0xFF, 0x1, 0x0, + 0x0, 0x0, 0x1, 0x0, 0x6, 0x0, 0x0, 0x0, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, + 0x6, 0x0, 0x0, 0x0, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x6, 0x0, 0x0 }; static const u8 gUnknown_085CD54C[] = From b6ec90db6192c8405c9fe952aae7f356bcd1b0c3 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 9 Oct 2017 23:38:40 +0200 Subject: [PATCH 7/7] secod table to hex --- src/battle_message.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/battle_message.c b/src/battle_message.c index 2c622f06d..aeff721d6 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1214,27 +1214,27 @@ static const u8 gUnknown_085CD42C[] = static const u8 gUnknown_085CD54C[] = { - 0xFF, 1, 0, 1, 0, 0, 1, 1, 0xF, 6, 0, 0, 0xFF, 1, - 1, 1, 0, 0, 0, 1, 0xF, 6, 0, 0, 0xEE, 1, 0, 1, 0, - 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, - 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, - 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, - 0xF, 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, - 0, 0, 0xEE, 7, 0, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, - 0xEE, 1, 0, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, - 1, 2, 1, 0, 0, 0, 0xC, 0xE, 0xB, 0, 0, 0xEE, 7, 0, - 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 7, 0, 1, 0, - 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, - 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0, 1, 0, 0, 0, 0xD, - 0xE, 0xF, 0, 0, 0, 1, 0x20, 1, 0, 0, 0, 1, 0, 2, - 0, 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 1, 0xE, 0xF, 0, - 0, 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, - 0xEE, 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, - 1, 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, - 0xFF, 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0xFF, - 1, 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0xEE, 1, 0xFF, 1, - 0, 0, 0, 0xD, 0xE, 0xF, 0, 0, 0x11, 1, 0, 1, 0, 0, - 1, 2, 1, 3, 0, 0 + 0xFF, 0x1, 0x0, 0x1, 0x0, 0x0, 0x1, 0x1, 0xF, 0x6, 0x0, 0x0, 0xFF, 0x1, + 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0xF, 0x6, 0x0, 0x0, 0xEE, 0x1, 0x0, 0x1, 0x0, + 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, + 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, + 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, + 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, + 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0xC, 0xE, 0xB, 0x0, 0x0, + 0xEE, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, + 0x1, 0x2, 0x1, 0x0, 0x0, 0x0, 0xC, 0xE, 0xB, 0x0, 0x0, 0xEE, 0x7, 0x0, + 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x7, 0x0, 0x1, 0x0, + 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, + 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0xD, + 0xE, 0xF, 0x0, 0x0, 0x0, 0x1, 0x20, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x2, + 0x0, 0x0, 0xEE, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0x1, 0xE, 0xF, 0x0, + 0x0, 0xEE, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, + 0xEE, 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, + 0x1, 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, + 0xFF, 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, 0xFF, + 0x1, 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0xEE, 0x1, 0xFF, 0x1, + 0x0, 0x0, 0x0, 0xD, 0xE, 0xF, 0x0, 0x0, 0x11, 0x1, 0x0, 0x1, 0x0, 0x0, + 0x1, 0x2, 0x1, 0x3, 0x0, 0x0 }; static const u8 * const gUnknown_085CD660[] =