diff --git a/asm/battle_anim_effects_3.s b/asm/battle_anim_effects_3.s index 4b94667869..cfcfb93f96 100644 --- a/asm/battle_anim_effects_3.s +++ b/asm/battle_anim_effects_3.s @@ -5,50 +5,6 @@ .text - thumb_func_start AnimTask_GetReturnPowerLevel -AnimTask_GetReturnPowerLevel: @ 815F8A0 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r3, =gBattleAnimArgs - movs r2, 0 - strh r2, [r3, 0xE] - ldr r1, =gAnimFriendship - ldrb r0, [r1] - ldrb r1, [r1] - adds r0, r1, 0 - subs r0, 0x3D - lsls r0, 24 - lsrs r0, 24 - adds r2, r1, 0 - cmp r0, 0x1E - bhi _0815F8C4 - movs r0, 0x1 - strh r0, [r3, 0xE] -_0815F8C4: - adds r0, r2, 0 - subs r0, 0x5C - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x6C - bhi _0815F8D4 - movs r0, 0x2 - strh r0, [r3, 0xE] -_0815F8D4: - lsls r0, r1, 24 - lsrs r0, 24 - cmp r0, 0xC8 - bls _0815F8E0 - movs r0, 0x3 - strh r0, [r3, 0xE] -_0815F8E0: - adds r0, r4, 0 - bl DestroyAnimVisualTask - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end AnimTask_GetReturnPowerLevel thumb_func_start sub_815F8F4 sub_815F8F4: @ 815F8F4 diff --git a/asm/dark.s b/asm/dark.s deleted file mode 100644 index bb46b0fa9a..0000000000 --- a/asm/dark.s +++ /dev/null @@ -1,2199 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_81136E8 -sub_81136E8: @ 81136E8 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r1 - ldr r1, =gBattleAnimArgs - ldrh r1, [r1] - strh r1, [r0, 0x8] - ldr r1, =gBattleAnimAttacker - ldrb r4, [r1] - movs r1, 0x10 - strh r1, [r0, 0xA] - movs r0, 0x52 - bl SetGpuReg - adds r0, r4, 0 - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08113734 - ldr r1, =0x00003f42 - movs r0, 0x50 - bl SetGpuReg - b _0811373C - .pool -_08113734: - ldr r1, =0x00003f44 - movs r0, 0x50 - bl SetGpuReg -_0811373C: - ldr r0, =gTasks - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r0 - ldr r0, =sub_811375C - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81136E8 - - thumb_func_start sub_811375C -sub_811375C: @ 811375C - push {r4-r7,lr} - lsls r0, 24 - lsrs r7, r0, 24 - ldr r1, =gTasks - lsls r0, r7, 2 - adds r0, r7 - lsls r0, 3 - adds r6, r0, r1 - ldrh r0, [r6, 0xA] - lsrs r4, r0, 8 - lsls r0, 24 - lsrs r1, r0, 24 - movs r2, 0xC - ldrsh r0, [r6, r2] - ldrb r2, [r6, 0x8] - cmp r0, r2 - bne _081137D8 - adds r4, 0x1 - lsls r4, 24 - lsrs r4, 24 - subs r0, r1, 0x1 - lsls r0, 24 - lsrs r0, 24 - lsls r1, r4, 8 - orrs r1, r0 - movs r5, 0 - strh r1, [r6, 0xA] - ldrh r1, [r6, 0xA] - movs r0, 0x52 - bl SetGpuReg - strh r5, [r6, 0xC] - cmp r4, 0x10 - bne _081137DE - ldr r2, =gSprites - ldr r1, =gBattlerSpriteIds - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - adds r0, r1 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - adds r0, 0x3E - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] - adds r0, r7, 0 - bl DestroyAnimVisualTask - b _081137DE - .pool -_081137D8: - ldrh r0, [r6, 0xC] - adds r0, 0x1 - strh r0, [r6, 0xC] -_081137DE: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_811375C - - thumb_func_start sub_81137E4 -sub_81137E4: @ 81137E4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gTasks - lsls r2, r0, 2 - adds r2, r0 - lsls r2, 3 - adds r2, r1 - ldr r0, =gBattleAnimArgs - ldrh r0, [r0] - strh r0, [r2, 0x8] - movs r1, 0x80 - lsls r1, 5 - strh r1, [r2, 0xA] - ldr r0, =sub_811381C - str r0, [r2] - movs r0, 0x52 - bl SetGpuReg - pop {r0} - bx r0 - .pool - thumb_func_end sub_81137E4 - - thumb_func_start sub_811381C -sub_811381C: @ 811381C - push {r4-r7,lr} - lsls r0, 24 - lsrs r7, r0, 24 - ldr r1, =gTasks - lsls r0, r7, 2 - adds r0, r7 - lsls r0, 3 - adds r6, r0, r1 - ldrh r0, [r6, 0xA] - lsrs r4, r0, 8 - lsls r0, 24 - lsrs r1, r0, 24 - movs r2, 0xC - ldrsh r0, [r6, r2] - ldrb r2, [r6, 0x8] - cmp r0, r2 - bne _0811387C - subs r4, 0x1 - lsls r4, 24 - lsrs r4, 24 - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r0, 24 - lsls r1, r4, 8 - orrs r1, r0 - movs r5, 0 - strh r1, [r6, 0xA] - ldrh r1, [r6, 0xA] - movs r0, 0x52 - bl SetGpuReg - strh r5, [r6, 0xC] - cmp r4, 0 - bne _08113882 - movs r0, 0x50 - movs r1, 0 - bl SetGpuReg - movs r0, 0x52 - movs r1, 0 - bl SetGpuReg - adds r0, r7, 0 - bl DestroyAnimVisualTask - b _08113882 - .pool -_0811387C: - ldrh r0, [r6, 0xC] - adds r0, 0x1 - strh r0, [r6, 0xC] -_08113882: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_811381C - - thumb_func_start sub_8113888 -sub_8113888: @ 8113888 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - movs r1, 0x80 - lsls r1, 5 - movs r0, 0x52 - bl SetGpuReg - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _081138BC - ldr r1, =0x00003f42 - movs r0, 0x50 - bl SetGpuReg - b _081138C4 - .pool -_081138BC: - ldr r1, =0x00003f44 - movs r0, 0x50 - bl SetGpuReg -_081138C4: - adds r0, r4, 0 - bl DestroyAnimVisualTask - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8113888 - - thumb_func_start sub_81138D4 -sub_81138D4: @ 81138D4 - push {r4-r6,lr} - adds r4, r0, 0 - ldr r6, =gBattleAnimTarget - ldrb r0, [r6] - movs r1, 0x2 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x30] - ldr r5, =gBattleAnimAttacker - ldrb r0, [r5] - movs r1, 0x2 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x32] - ldrb r0, [r6] - movs r1, 0x3 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x34] - ldrb r0, [r5] - movs r1, 0x3 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x36] - movs r0, 0x7E - strh r0, [r4, 0x2E] - adds r0, r4, 0 - bl InitSpriteDataForLinearTranslation - ldrh r0, [r4, 0x30] - negs r0, r0 - strh r0, [r4, 0x34] - ldrh r0, [r4, 0x32] - negs r0, r0 - strh r0, [r4, 0x36] - ldr r0, =0x0000ffd8 - strh r0, [r4, 0x3A] - ldr r1, =sub_8113950 - str r1, [r4, 0x1C] - adds r0, r4, 0 - bl _call_via_r1 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81138D4 - - thumb_func_start sub_8113950 -sub_8113950: @ 8113950 - push {r4-r6,lr} - adds r4, r0, 0 - ldrh r5, [r4, 0x30] - ldrh r0, [r4, 0x34] - adds r2, r5, r0 - strh r2, [r4, 0x34] - ldrh r3, [r4, 0x32] - ldrh r6, [r4, 0x36] - adds r1, r3, r6 - strh r1, [r4, 0x36] - lsls r0, r2, 16 - asrs r0, 24 - strh r0, [r4, 0x24] - lsls r0, r1, 16 - asrs r0, 24 - strh r0, [r4, 0x26] - movs r6, 0x3C - ldrsh r0, [r4, r6] - cmp r0, 0 - bne _08113992 - adds r0, r2, r5 - strh r0, [r4, 0x34] - adds r1, r3 - strh r1, [r4, 0x36] - lsls r0, 16 - asrs r0, 24 - strh r0, [r4, 0x24] - lsls r1, 16 - asrs r1, 24 - strh r1, [r4, 0x26] - ldrh r0, [r4, 0x2E] - subs r0, 0x1 - strh r0, [r4, 0x2E] -_08113992: - movs r1, 0x38 - ldrsh r0, [r4, r1] - movs r2, 0x3A - ldrsh r1, [r4, r2] - bl Sin - ldrh r6, [r4, 0x26] - adds r0, r6 - strh r0, [r4, 0x26] - ldrh r0, [r4, 0x38] - adds r0, 0x3 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x38] - cmp r0, 0x7F - ble _081139C2 - movs r0, 0 - strh r0, [r4, 0x38] - ldrh r0, [r4, 0x3A] - adds r0, 0x14 - strh r0, [r4, 0x3A] - ldrh r0, [r4, 0x3C] - adds r0, 0x1 - strh r0, [r4, 0x3C] -_081139C2: - ldrh r0, [r4, 0x2E] - subs r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - cmp r0, 0 - bne _081139D4 - adds r0, r4, 0 - bl DestroyAnimSprite -_081139D4: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8113950 - - thumb_func_start sub_81139DC -sub_81139DC: @ 81139DC - push {r4,r5,lr} - adds r4, r0, 0 - ldr r5, =gBattleAnimArgs - ldrh r0, [r5] - ldrh r1, [r4, 0x20] - adds r0, r1 - strh r0, [r4, 0x20] - ldrh r0, [r5, 0x2] - ldrh r1, [r4, 0x22] - adds r0, r1 - strh r0, [r4, 0x22] - ldrb r1, [r5, 0x4] - adds r0, r4, 0 - bl StartSpriteAffineAnim - ldrh r0, [r5, 0x6] - strh r0, [r4, 0x2E] - ldrh r0, [r5, 0x8] - strh r0, [r4, 0x30] - ldrh r0, [r5, 0xA] - strh r0, [r4, 0x32] - ldr r0, =sub_8113A18 - str r0, [r4, 0x1C] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81139DC - - thumb_func_start sub_8113A18 -sub_8113A18: @ 8113A18 - push {lr} - adds r2, r0, 0 - ldrh r0, [r2, 0x2E] - ldrh r1, [r2, 0x36] - adds r0, r1 - strh r0, [r2, 0x36] - ldrh r1, [r2, 0x30] - ldrh r3, [r2, 0x38] - adds r1, r3 - strh r1, [r2, 0x38] - lsls r0, 16 - asrs r0, 24 - strh r0, [r2, 0x24] - lsls r1, 16 - asrs r1, 24 - strh r1, [r2, 0x26] - ldrh r0, [r2, 0x34] - adds r0, 0x1 - strh r0, [r2, 0x34] - lsls r0, 16 - asrs r0, 16 - movs r3, 0x32 - ldrsh r1, [r2, r3] - cmp r0, r1 - bne _08113A4E - ldr r0, =sub_8113A58 - str r0, [r2, 0x1C] -_08113A4E: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8113A18 - - thumb_func_start sub_8113A58 -sub_8113A58: @ 8113A58 - push {lr} - adds r3, r0, 0 - ldrh r1, [r3, 0x36] - ldrh r0, [r3, 0x2E] - subs r1, r0 - strh r1, [r3, 0x36] - ldrh r0, [r3, 0x38] - ldrh r2, [r3, 0x30] - subs r0, r2 - strh r0, [r3, 0x38] - lsls r1, 16 - asrs r1, 24 - strh r1, [r3, 0x24] - lsls r0, 16 - asrs r0, 24 - strh r0, [r3, 0x26] - ldrh r0, [r3, 0x34] - subs r0, 0x1 - strh r0, [r3, 0x34] - lsls r0, 16 - cmp r0, 0 - bne _08113A8A - adds r0, r3, 0 - bl DestroySpriteAndMatrix -_08113A8A: - pop {r0} - bx r0 - thumb_func_end sub_8113A58 - - thumb_func_start sub_8113A90 -sub_8113A90: @ 8113A90 - push {r4-r7,lr} - adds r4, r0, 0 - ldr r0, =gBattleAnimArgs - movs r2, 0 - ldrsh r1, [r0, r2] - adds r3, r0, 0 - cmp r1, 0 - bne _08113AAC - ldr r0, =gBattleAnimAttacker - b _08113AAE - .pool -_08113AAC: - ldr r0, =gBattleAnimTarget -_08113AAE: - ldrb r5, [r0] - movs r6, 0x14 - ldrh r2, [r4, 0x4] - lsls r1, r2, 22 - lsrs r1, 22 - adds r1, 0x4 - ldr r7, =0x000003ff - adds r0, r7, 0 - ands r1, r0 - ldr r0, =0xfffffc00 - ands r0, r2 - orrs r0, r1 - strh r0, [r4, 0x4] - movs r1, 0x2 - ldrsh r0, [r3, r1] - cmp r0, 0x1 - beq _08113B0C - cmp r0, 0x1 - bgt _08113AE8 - cmp r0, 0 - beq _08113AF2 - b _08113B60 - .pool -_08113AE8: - cmp r0, 0x2 - beq _08113B26 - cmp r0, 0x3 - beq _08113B3E - b _08113B60 -_08113AF2: - adds r0, r5, 0 - movs r1, 0x5 - bl sub_80A861C - subs r0, 0x8 - strh r0, [r4, 0x20] - adds r0, r5, 0 - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x8 - strh r0, [r4, 0x22] - b _08113B60 -_08113B0C: - adds r0, r5, 0 - movs r1, 0x5 - bl sub_80A861C - subs r0, 0xE - strh r0, [r4, 0x20] - adds r0, r5, 0 - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x10 - strh r0, [r4, 0x22] - b _08113B60 -_08113B26: - adds r0, r5, 0 - movs r1, 0x4 - bl sub_80A861C - adds r0, 0x8 - strh r0, [r4, 0x20] - adds r0, r5, 0 - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x8 - b _08113B54 -_08113B3E: - adds r0, r5, 0 - movs r1, 0x4 - bl sub_80A861C - adds r0, 0xE - strh r0, [r4, 0x20] - adds r0, r5, 0 - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x10 -_08113B54: - strh r0, [r4, 0x22] - adds r0, r4, 0 - movs r1, 0x1 - bl StartSpriteAffineAnim - movs r6, 0xEC -_08113B60: - movs r0, 0x20 - strh r0, [r4, 0x2E] - lsls r0, r6, 24 - asrs r0, 24 - ldrh r2, [r4, 0x20] - adds r0, r2 - strh r0, [r4, 0x32] - ldrh r0, [r4, 0x22] - adds r0, 0xC - strh r0, [r4, 0x36] - ldr r0, =0x0000fff4 - strh r0, [r4, 0x38] - adds r0, r4, 0 - bl InitAnimArcTranslation - ldr r0, =sub_8113B90 - str r0, [r4, 0x1C] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8113A90 - - thumb_func_start sub_8113B90 -sub_8113B90: @ 8113B90 - push {r4,lr} - adds r4, r0, 0 - bl TranslateAnimArc - lsls r0, 24 - cmp r0, 0 - beq _08113BA4 - adds r0, r4, 0 - bl DestroySpriteAndMatrix -_08113BA4: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8113B90 - - thumb_func_start sub_8113BAC -sub_8113BAC: @ 8113BAC - push {r4-r7,lr} - sub sp, 0x1C - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTasks - adds r5, r1, r0 - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x1 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - adds r0, 0x1F - movs r6, 0 - strh r0, [r5, 0x16] - ldrb r0, [r4] - movs r1, 0x2 - bl sub_80A861C - subs r0, 0x7 - strh r0, [r5, 0x14] - ldrh r1, [r5, 0x16] - strh r1, [r5, 0x12] - strh r0, [r5, 0x10] - subs r1, r0 - lsls r1, 8 - strh r1, [r5, 0x22] - ldrb r0, [r4] - movs r1, 0 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - adds r1, r0, 0 - subs r1, 0x20 - strh r1, [r5, 0x24] - adds r0, 0x20 - strh r0, [r5, 0x26] - ldrb r0, [r4] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - bne _08113C1C - ldr r0, =0x0000fff4 - b _08113C1E - .pool -_08113C1C: - ldr r0, =0x0000ffc0 -_08113C1E: - strh r0, [r5, 0x18] - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0xE] - cmp r0, 0x1 - bne _08113C80 - add r4, sp, 0xC - adds r0, r4, 0 - bl sub_80A6B30 - ldr r0, =gBattle_BG1_Y - ldrh r0, [r0] - strh r0, [r5, 0x1C] - ldr r1, =0x00003f42 - movs r0, 0x50 - bl SetGpuReg - ldrb r1, [r4, 0x8] - lsls r1, 4 - movs r0, 0 - movs r2, 0x20 - bl FillPalette - ldr r0, =0x04000016 - str r0, [sp] - movs r7, 0x2 - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _08113CB0 - ldr r1, =gBattle_BG2_X - b _08113CAA - .pool -_08113C80: - ldr r0, =gBattle_BG2_Y - ldrh r0, [r0] - strh r0, [r5, 0x1C] - ldr r1, =0x00003f44 - movs r0, 0x50 - bl SetGpuReg - movs r0, 0 - movs r1, 0x90 - movs r2, 0x20 - bl FillPalette - ldr r0, =0x0400001a - str r0, [sp] - movs r7, 0x4 - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _08113CB0 - ldr r1, =gBattle_BG1_X -_08113CAA: - ldrh r0, [r1] - adds r0, 0xF0 - strh r0, [r1] -_08113CB0: - ldr r0, =0xa2600001 - str r0, [sp, 0x4] - mov r2, sp - movs r1, 0 - movs r0, 0x1 - strb r0, [r2, 0x8] - mov r0, sp - strb r1, [r0, 0x9] - strh r1, [r5, 0x1E] - movs r0, 0x10 - strh r0, [r5, 0x20] - strh r1, [r5, 0x8] - strh r1, [r5, 0xA] - strh r1, [r5, 0xC] - movs r0, 0x3 - bl sub_8114374 - movs r3, 0 - ldr r4, =gScanlineEffectRegBuffers - movs r0, 0xF0 - lsls r0, 3 - adds r6, r4, r0 -_08113CDC: - lsls r1, r3, 1 - adds r2, r1, r4 - ldrh r0, [r5, 0x1C] - strh r0, [r2] - adds r1, r6 - ldrh r0, [r5, 0x1C] - strh r0, [r1] - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x6F - bls _08113CDC - ldr r0, [sp] - ldr r1, [sp, 0x4] - ldr r2, [sp, 0x8] - bl ScanlineEffect_SetParams - movs r0, 0x3F - eors r7, r0 - movs r1, 0xFC - lsls r1, 6 - adds r0, r1, 0 - orrs r7, r0 - movs r0, 0x4A - adds r1, r7, 0 - bl SetGpuReg - ldr r1, =0x00003f3f - movs r0, 0x48 - bl SetGpuReg - ldr r2, =gBattle_WIN0H - ldrh r0, [r5, 0x24] - lsls r0, 8 - ldrh r1, [r5, 0x26] - orrs r0, r1 - strh r0, [r2] - ldr r1, =gBattle_WIN0V - movs r0, 0xA0 - strh r0, [r1] - ldr r0, =sub_8113D60 - str r0, [r5] - add sp, 0x1C - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8113BAC - - thumb_func_start sub_8113D60 -sub_8113D60: @ 8113D60 - push {r4,lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - ldr r1, =gTasks - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x4 - bls _08113D7A - b _08113E72 -_08113D7A: - lsls r0, 2 - ldr r1, =_08113D8C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08113D8C: - .4byte _08113DA0 - .4byte _08113E02 - .4byte _08113E1C - .4byte _08113E58 - .4byte _08113E6C -_08113DA0: - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1 - ble _08113E72 - movs r0, 0 - strh r0, [r4, 0xA] - ldrh r0, [r4, 0xC] - adds r0, 0x1 - strh r0, [r4, 0xC] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08113DD0 - ldrh r1, [r4, 0x1E] - movs r2, 0x1E - ldrsh r0, [r4, r2] - cmp r0, 0xC - beq _08113DDE - adds r0, r1, 0x1 - strh r0, [r4, 0x1E] - b _08113DDE -_08113DD0: - ldrh r1, [r4, 0x20] - movs r2, 0x20 - ldrsh r0, [r4, r2] - cmp r0, 0x8 - beq _08113DDE - subs r0, r1, 0x1 - strh r0, [r4, 0x20] -_08113DDE: - ldrh r1, [r4, 0x20] - lsls r1, 8 - ldrh r0, [r4, 0x1E] - orrs r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x52 - bl SetGpuReg - movs r1, 0x1E - ldrsh r0, [r4, r1] - cmp r0, 0xC - bne _08113E72 - movs r2, 0x20 - ldrsh r0, [r4, r2] - cmp r0, 0x8 - bne _08113E72 - b _08113E5E -_08113E02: - ldrh r0, [r4, 0x10] - subs r0, 0x8 - strh r0, [r4, 0x10] - adds r0, r4, 0 - bl sub_8114244 - movs r0, 0x10 - ldrsh r1, [r4, r0] - movs r2, 0x18 - ldrsh r0, [r4, r2] - cmp r1, r0 - bge _08113E72 - b _08113E5E -_08113E1C: - ldrh r0, [r4, 0x10] - subs r0, 0x8 - strh r0, [r4, 0x10] - adds r0, r4, 0 - bl sub_8114244 - ldrh r1, [r4, 0x24] - adds r1, 0x4 - strh r1, [r4, 0x24] - ldrh r0, [r4, 0x26] - subs r2, r0, 0x4 - strh r2, [r4, 0x26] - lsls r1, 16 - lsls r0, r2, 16 - cmp r1, r0 - blt _08113E3E - strh r2, [r4, 0x24] -_08113E3E: - ldr r3, =gBattle_WIN0H - ldrh r2, [r4, 0x24] - lsls r0, r2, 8 - ldrh r1, [r4, 0x26] - orrs r0, r1 - strh r0, [r3] - lsls r2, 16 - lsls r1, 16 - cmp r2, r1 - bne _08113E72 - b _08113E5E - .pool -_08113E58: - ldr r1, =gScanlineEffect - movs r0, 0x3 - strb r0, [r1, 0x15] -_08113E5E: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _08113E72 - .pool -_08113E6C: - adds r0, r2, 0 - bl DestroyAnimVisualTask -_08113E72: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8113D60 - - thumb_func_start sub_8113E78 -sub_8113E78: @ 8113E78 - push {r4-r7,lr} - sub sp, 0x1C - lsls r0, 24 - lsrs r6, r0, 24 - lsls r0, r6, 2 - adds r0, r6 - lsls r0, 3 - ldr r1, =gTasks - adds r5, r0, r1 - movs r1, 0x8 - ldrsh r0, [r5, r1] - cmp r0, 0x4 - bls _08113E94 - b _081140A6 -_08113E94: - lsls r0, 2 - ldr r1, =_08113EA8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08113EA8: - .4byte _08113EBC - .4byte _08113F40 - .4byte _08113F84 - .4byte _08113FF0 - .4byte _08114058 -_08113EBC: - bl IsContest - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08113EF8 - ldr r0, =gBattle_WIN0H - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattle_WIN0V - strh r1, [r0] - ldr r4, =0x00003f3f - movs r0, 0x48 - adds r1, r4, 0 - bl SetGpuReg - movs r0, 0x4A - adds r1, r4, 0 - bl SetGpuReg - adds r0, r6, 0 - bl DestroyAnimVisualTask - b _081140A6 - .pool -_08113EF8: - ldr r0, =gBattleAnimTarget - ldrb r0, [r0] - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0xE] - cmp r0, 0x1 - bne _08113F24 - ldr r1, =0x00003f42 - movs r0, 0x50 - bl SetGpuReg - ldr r1, =gBattle_BG2_X - b _08113F2E - .pool -_08113F24: - ldr r1, =0x00003f44 - movs r0, 0x50 - bl SetGpuReg - ldr r1, =gBattle_BG1_X -_08113F2E: - ldrh r0, [r1] - adds r0, 0xF0 - strh r0, [r1] - b _08114044 - .pool -_08113F40: - movs r1, 0xE - ldrsh r0, [r5, r1] - cmp r0, 0x1 - bne _08113F68 - mov r0, sp - bl sub_80A6B30 - ldr r0, =gBattle_BG1_Y - ldrh r0, [r0] - strh r0, [r5, 0x1C] - mov r0, sp - ldrb r1, [r0, 0x8] - lsls r1, 4 - movs r0, 0 - movs r2, 0x20 - bl FillPalette - b _08113F78 - .pool -_08113F68: - ldr r0, =gBattle_BG2_Y - ldrh r0, [r0] - strh r0, [r5, 0x1C] - movs r0, 0 - movs r1, 0x90 - movs r2, 0x20 - bl FillPalette -_08113F78: - movs r0, 0x3 - bl sub_8114374 - b _08114044 - .pool -_08113F84: - ldr r4, =gBattleAnimTarget - ldrb r0, [r4] - movs r1, 0x1 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - adds r0, 0x1F - movs r6, 0 - strh r0, [r5, 0x16] - ldrb r0, [r4] - movs r1, 0x2 - bl sub_80A861C - subs r0, 0x7 - strh r0, [r5, 0x14] - ldrh r1, [r5, 0x16] - subs r1, r0 - lsls r1, 8 - strh r1, [r5, 0x22] - ldrb r0, [r4] - movs r1, 0 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - subs r1, r0, 0x4 - strh r1, [r5, 0x24] - adds r0, 0x4 - strh r0, [r5, 0x26] - ldrb r0, [r4] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - bne _08113FD8 - ldr r0, =0x0000fff4 - b _08113FDA - .pool -_08113FD8: - ldr r0, =0x0000ffc0 -_08113FDA: - strh r0, [r5, 0x18] - ldrh r0, [r5, 0x18] - strh r0, [r5, 0x10] - strh r0, [r5, 0x12] - movs r0, 0xC - strh r0, [r5, 0x1E] - movs r0, 0x8 - strh r0, [r5, 0x20] - b _08114044 - .pool -_08113FF0: - movs r1, 0xE - ldrsh r0, [r5, r1] - cmp r0, 0x1 - bne _08114000 - ldr r0, =0x04000016 - b _08114002 - .pool -_08114000: - ldr r0, =0x0400001a -_08114002: - str r0, [sp, 0x10] - movs r3, 0 - add r4, sp, 0x10 - ldr r6, =gScanlineEffectRegBuffers - movs r0, 0xF0 - lsls r0, 3 - adds r7, r6, r0 -_08114010: - lsls r1, r3, 1 - adds r2, r1, r6 - ldrh r0, [r5, 0x1C] - adds r0, 0x9F - subs r0, r3 - strh r0, [r2] - adds r1, r7 - ldrh r0, [r5, 0x1C] - adds r0, 0x9F - subs r0, r3 - strh r0, [r1] - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x6F - bls _08114010 - ldr r1, =0xa2600001 - str r1, [r4, 0x4] - movs r2, 0 - movs r0, 0x1 - strb r0, [r4, 0x8] - strb r2, [r4, 0x9] - ldr r0, [sp, 0x10] - ldr r2, [r4, 0x8] - bl ScanlineEffect_SetParams -_08114044: - ldrh r0, [r5, 0x8] - adds r0, 0x1 - strh r0, [r5, 0x8] - b _081140A6 - .pool -_08114058: - movs r1, 0xE - ldrsh r0, [r5, r1] - cmp r0, 0x1 - bne _08114070 - ldr r1, =0x00003f3d - movs r0, 0x4A - bl SetGpuReg - b _08114078 - .pool -_08114070: - ldr r1, =0x00003f3b - movs r0, 0x4A - bl SetGpuReg -_08114078: - ldr r1, =0x00003f3f - movs r0, 0x48 - bl SetGpuReg - ldr r2, =gBattle_WIN0H - ldrh r0, [r5, 0x24] - lsls r0, 8 - ldrh r1, [r5, 0x26] - orrs r0, r1 - strh r0, [r2] - ldr r1, =gBattle_WIN0V - movs r0, 0xA0 - strh r0, [r1] - movs r0, 0 - strh r0, [r5, 0x8] - strh r0, [r5, 0xA] - strh r0, [r5, 0xC] - ldr r1, =0x0000080c - movs r0, 0x52 - bl SetGpuReg - ldr r0, =sub_81140C8 - str r0, [r5] -_081140A6: - add sp, 0x1C - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8113E78 - - thumb_func_start sub_81140C8 -sub_81140C8: @ 81140C8 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, =gTasks - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x4 - bls _081140E2 - b _08114232 -_081140E2: - lsls r0, 2 - ldr r1, =_081140F4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081140F4: - .4byte _08114108 - .4byte _08114134 - .4byte _0811419C - .4byte _081141FE - .4byte _08114210 -_08114108: - ldrh r0, [r4, 0x12] - adds r0, 0x8 - strh r0, [r4, 0x12] - lsls r0, 16 - asrs r0, 16 - ldrh r2, [r4, 0x16] - movs r3, 0x16 - ldrsh r1, [r4, r3] - cmp r0, r1 - blt _0811411E - strh r2, [r4, 0x12] -_0811411E: - adds r0, r4, 0 - bl sub_8114244 - movs r0, 0x12 - ldrsh r1, [r4, r0] - movs r2, 0x16 - ldrsh r0, [r4, r2] - cmp r1, r0 - beq _08114132 - b _08114232 -_08114132: - b _08114204 -_08114134: - movs r3, 0x26 - ldrsh r0, [r4, r3] - movs r2, 0x24 - ldrsh r1, [r4, r2] - subs r0, r1 - cmp r0, 0x3F - bgt _08114150 - ldrh r0, [r4, 0x24] - subs r0, 0x4 - strh r0, [r4, 0x24] - ldrh r0, [r4, 0x26] - adds r0, 0x4 - strh r0, [r4, 0x26] - b _08114154 -_08114150: - movs r0, 0x1 - strh r0, [r4, 0xA] -_08114154: - ldr r2, =gBattle_WIN0H - ldrh r0, [r4, 0x24] - lsls r0, 8 - ldrh r1, [r4, 0x26] - orrs r0, r1 - strh r0, [r2] - ldrh r0, [r4, 0x10] - adds r0, 0x8 - strh r0, [r4, 0x10] - lsls r0, 16 - asrs r0, 16 - ldrh r2, [r4, 0x14] - movs r3, 0x14 - ldrsh r1, [r4, r3] - cmp r0, r1 - blt _08114176 - strh r2, [r4, 0x10] -_08114176: - adds r0, r4, 0 - bl sub_8114244 - movs r0, 0x10 - ldrsh r1, [r4, r0] - movs r2, 0x14 - ldrsh r0, [r4, r2] - cmp r1, r0 - bne _08114232 - movs r3, 0xA - ldrsh r0, [r4, r3] - cmp r0, 0 - beq _08114232 - movs r0, 0 - strh r0, [r4, 0xA] - b _08114204 - .pool -_0811419C: - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1 - ble _08114232 - movs r0, 0 - strh r0, [r4, 0xA] - ldrh r0, [r4, 0xC] - adds r0, 0x1 - strh r0, [r4, 0xC] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _081141CC - ldrh r1, [r4, 0x1E] - movs r2, 0x1E - ldrsh r0, [r4, r2] - cmp r0, 0 - beq _081141DA - subs r0, r1, 0x1 - strh r0, [r4, 0x1E] - b _081141DA -_081141CC: - ldrh r1, [r4, 0x20] - movs r3, 0x20 - ldrsh r0, [r4, r3] - cmp r0, 0xF - bgt _081141DA - adds r0, r1, 0x1 - strh r0, [r4, 0x20] -_081141DA: - ldrh r1, [r4, 0x20] - lsls r1, 8 - ldrh r0, [r4, 0x1E] - orrs r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x52 - bl SetGpuReg - movs r1, 0x1E - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _08114232 - movs r2, 0x20 - ldrsh r0, [r4, r2] - cmp r0, 0x10 - bne _08114232 - b _08114204 -_081141FE: - ldr r1, =gScanlineEffect - movs r0, 0x3 - strb r0, [r1, 0x15] -_08114204: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _08114232 - .pool -_08114210: - ldr r0, =gBattle_WIN0H - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattle_WIN0V - strh r1, [r0] - ldr r4, =0x00003f3f - movs r0, 0x48 - adds r1, r4, 0 - bl SetGpuReg - movs r0, 0x4A - adds r1, r4, 0 - bl SetGpuReg - adds r0, r5, 0 - bl DestroyAnimVisualTask -_08114232: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81140C8 - - thumb_func_start sub_8114244 -sub_8114244: @ 8114244 - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r6, r0, 0 - ldrh r0, [r6, 0x12] - ldrh r4, [r6, 0x10] - subs r0, r4 - lsls r0, 16 - asrs r1, r0, 16 - cmp r1, 0 - beq _08114338 - movs r2, 0x22 - ldrsh r0, [r6, r2] - bl __divsi3 - mov r8, r0 - movs r3, 0x14 - ldrsh r0, [r6, r3] - lsls r5, r0, 8 - lsls r0, r4, 16 - movs r4, 0 - cmp r0, 0 - ble _081142A4 - ldr r0, =gScanlineEffectRegBuffers - mov r12, r0 - ldr r7, =gScanlineEffect -_08114278: - lsls r2, r4, 16 - asrs r2, 16 - lsls r3, r2, 1 - ldrb r1, [r7, 0x14] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 7 - adds r3, r0 - add r3, r12 - adds r1, r2, 0 - subs r1, 0x9F - ldrh r0, [r6, 0x1C] - subs r0, r1 - strh r0, [r3] - adds r2, 0x1 - lsls r2, 16 - lsrs r4, r2, 16 - asrs r2, 16 - movs r1, 0x10 - ldrsh r0, [r6, r1] - cmp r2, r0 - blt _08114278 -_081142A4: - ldrh r4, [r6, 0x10] - lsls r3, r4, 16 - asrs r1, r3, 16 - movs r2, 0x12 - ldrsh r0, [r6, r2] - cmp r1, r0 - bgt _081142EE - ldr r0, =gScanlineEffectRegBuffers - mov r12, r0 - ldr r7, =gScanlineEffect -_081142B8: - asrs r4, r3, 16 - cmp r4, 0 - blt _081142DA - asrs r1, r5, 8 - subs r1, r4 - lsls r3, r4, 1 - ldrb r2, [r7, 0x14] - lsls r0, r2, 4 - subs r0, r2 - lsls r0, 7 - adds r3, r0 - add r3, r12 - lsls r1, 16 - asrs r1, 16 - ldrh r2, [r6, 0x1C] - adds r1, r2 - strh r1, [r3] -_081142DA: - add r5, r8 - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - lsls r3, r4, 16 - asrs r1, r3, 16 - movs r2, 0x12 - ldrsh r0, [r6, r2] - cmp r1, r0 - ble _081142B8 -_081142EE: - movs r3, 0x1C - ldrsh r0, [r6, r3] - adds r0, 0x9F - lsls r2, r4, 16 - asrs r1, r2, 16 - subs r5, r0, r1 - movs r3, 0x16 - ldrsh r0, [r6, r3] - cmp r1, r0 - bge _08114366 - ldr r7, =gScanlineEffectRegBuffers - ldr r4, =gScanlineEffect -_08114306: - asrs r3, r2, 16 - cmp r3, 0 - blt _0811431E - lsls r2, r3, 1 - ldrb r1, [r4, 0x14] - lsls r0, r1, 4 - subs r0, r1 - lsls r0, 7 - adds r2, r0 - adds r2, r7 - strh r5, [r2] - subs r5, 0x1 -_0811431E: - adds r0, r3, 0x1 - lsls r2, r0, 16 - asrs r1, r2, 16 - movs r3, 0x16 - ldrsh r0, [r6, r3] - cmp r1, r0 - blt _08114306 - b _08114366 - .pool -_08114338: - movs r1, 0x1C - ldrsh r0, [r6, r1] - adds r5, r0, 0 - adds r5, 0x9F - movs r4, 0 - ldr r3, =gScanlineEffectRegBuffers - movs r2, 0xF0 - lsls r2, 3 - adds r6, r3, r2 -_0811434A: - lsls r0, r4, 16 - asrs r0, 16 - lsls r2, r0, 1 - adds r1, r2, r3 - strh r5, [r1] - adds r2, r6 - strh r5, [r2] - subs r5, 0x1 - adds r0, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - asrs r0, 16 - cmp r0, 0x6F - ble _0811434A -_08114366: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8114244 - - thumb_func_start sub_8114374 -sub_8114374: @ 8114374 - push {r4-r7,lr} - lsls r0, 24 - lsrs r0, 24 - movs r4, 0 - ldr r7, =gSprites - movs r1, 0x3 - ands r0, r1 - lsls r5, r0, 2 - movs r0, 0xD - negs r0, r0 - adds r6, r0, 0 -_0811438A: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetAnimBattlerSpriteId - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - beq _081143AA - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r7 - ldrb r0, [r1, 0x5] - ands r0, r6 - orrs r0, r5 - strb r0, [r1, 0x5] -_081143AA: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0x3 - bls _0811438A - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8114374 - - thumb_func_start sub_81143C0 -sub_81143C0: @ 81143C0 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r6, =gBattleAnimAttacker - ldrb r0, [r6] - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - eors r0, r1 - negs r1, r0 - orrs r1, r0 - lsrs r4, r1, 31 - ldrb r0, [r6] - adds r1, r4, 0 - movs r2, 0x1 - bl sub_80A438C - ldr r0, =gSprites - mov r9, r0 - ldr r0, =gBattlerSpriteIds - mov r8, r0 - ldrb r0, [r6] - add r0, r8 - ldrb r0, [r0] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - add r1, r9 - adds r1, 0x3E - ldrb r2, [r1] - movs r7, 0x5 - negs r7, r7 - adds r0, r7, 0 - ands r0, r2 - strb r0, [r1] - ldrb r0, [r6] - movs r5, 0x2 - eors r0, r5 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0811444E - ldrb r0, [r6] - eors r0, r5 - movs r1, 0x1 - eors r4, r1 - adds r1, r4, 0 - movs r2, 0x1 - bl sub_80A438C - ldrb r0, [r6] - eors r0, r5 - add r0, r8 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - add r0, r9 - adds r0, 0x3E - ldrb r2, [r0] - adds r1, r7, 0 - ands r1, r2 - strb r1, [r0] -_0811444E: - mov r0, r10 - bl DestroyAnimVisualTask - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81143C0 - - thumb_func_start sub_8114470 -sub_8114470: @ 8114470 - push {r4-r6,lr} - lsls r0, 24 - lsrs r6, r0, 24 - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - eors r0, r1 - negs r1, r0 - orrs r1, r0 - lsrs r5, r1, 31 - adds r0, r5, 0 - bl sub_80A477C - ldrb r1, [r4] - movs r0, 0x2 - eors r0, r1 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _081144AC - movs r0, 0x1 - eors r5, r0 - adds r0, r5, 0 - bl sub_80A477C -_081144AC: - adds r0, r6, 0 - bl DestroyAnimVisualTask - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8114470 - - thumb_func_start sub_81144BC -sub_81144BC: @ 81144BC - push {r4,lr} - adds r4, r0, 0 - ldr r1, =gBattleAnimArgs - ldrh r0, [r1] - ldrh r2, [r4, 0x20] - adds r0, r2 - strh r0, [r4, 0x20] - ldrh r0, [r1, 0x2] - ldrh r2, [r4, 0x22] - adds r0, r2 - strh r0, [r4, 0x22] - ldrb r1, [r1, 0x4] - adds r0, r4, 0 - bl StartSpriteAnim - ldr r0, =RunStoredCallbackWhenAnimEnds - str r0, [r4, 0x1C] - ldr r1, =DestroyAnimSprite - adds r0, r4, 0 - bl StoreSpriteCallbackInData6 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81144BC - - thumb_func_start sub_81144F8 -sub_81144F8: @ 81144F8 - push {r4-r7,lr} - sub sp, 0x10 - lsls r0, 24 - lsrs r7, r0, 24 - movs r6, 0 - ldr r0, =gBattle_WIN0H - strh r6, [r0] - ldr r0, =gBattle_WIN0V - strh r6, [r0] - ldr r1, =0x00003f3f - movs r0, 0x48 - bl SetGpuReg - ldr r1, =0x00003f3d - movs r0, 0x4A - bl SetGpuReg - movs r1, 0x80 - lsls r1, 8 - movs r0, 0 - bl SetGpuRegBits - ldr r1, =0x00003f42 - movs r0, 0x50 - bl SetGpuReg - ldr r1, =0x00000c08 - movs r0, 0x52 - bl SetGpuReg - movs r0, 0x1 - movs r1, 0x4 - movs r2, 0 - bl SetAnimBgAttribute - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl SetAnimBgAttribute - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _0811455C - movs r0, 0x1 - movs r1, 0x3 - movs r2, 0x1 - bl SetAnimBgAttribute -_0811455C: - bl IsDoubleBattle - lsls r0, 24 - cmp r0, 0 - beq _081145D6 - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _081145D6 - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - bl GetBattlerPosition - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - beq _0811458C - ldrb r0, [r4] - bl GetBattlerPosition - lsls r0, 24 - cmp r0, 0 - bne _081145D6 -_0811458C: - ldrb r0, [r4] - movs r5, 0x2 - eors r0, r5 - bl IsBattlerSpriteVisible - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _081145D6 - ldr r3, =gSprites - ldr r1, =gBattlerSpriteIds - ldrb r0, [r4] - eors r0, r5 - adds r0, r1 - ldrb r0, [r0] - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - adds r2, r3 - ldrb r3, [r2, 0x5] - lsls r1, r3, 28 - lsrs r1, 30 - subs r1, 0x1 - movs r0, 0x3 - ands r1, r0 - lsls r1, 2 - movs r0, 0xD - negs r0, r0 - ands r0, r3 - orrs r0, r1 - strb r0, [r2, 0x5] - movs r0, 0x1 - movs r1, 0x4 - movs r2, 0x1 - bl SetAnimBgAttribute - movs r6, 0x1 -_081145D6: - bl IsContest - lsls r0, 24 - cmp r0, 0 - beq _08114614 - ldr r0, =gContestResources - ldr r0, [r0] - ldr r0, [r0, 0x18] - ldrh r5, [r0] - b _0811465C - .pool -_08114614: - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - beq _08114640 - ldr r1, =gBattlerPartyIndexes - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - b _08114650 - .pool -_08114640: - ldr r1, =gBattlerPartyIndexes - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty -_08114650: - adds r0, r1 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 -_0811465C: - movs r0, 0 - bl GetAnimBattlerSpriteId - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_80A89C8 - lsls r0, 24 - lsrs r5, r0, 24 - mov r0, sp - bl sub_80A6B30 - mov r0, sp - ldrb r0, [r0, 0x9] - ldr r1, =gUnknown_08C1D210 - bl sub_80A6D48 - mov r0, sp - ldrb r0, [r0, 0x9] - ldr r1, =gUnknown_08C1D0AC - mov r2, sp - ldrh r2, [r2, 0xA] - bl sub_80A6CC0 - ldr r0, =gUnknown_08C1D1E8 - mov r1, sp - ldrb r1, [r1, 0x8] - lsls r1, 4 - movs r2, 0x20 - bl LoadCompressedPalette - ldr r2, =gBattle_BG1_X - ldr r0, =gSprites - lsls r1, r4, 4 - adds r1, r4 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r1, 0x20] - negs r0, r0 - adds r0, 0x60 - strh r0, [r2] - ldr r2, =gBattle_BG1_Y - ldrh r0, [r1, 0x22] - negs r0, r0 - adds r0, 0x20 - strh r0, [r2] - ldrb r0, [r1, 0x5] - lsrs r0, 4 - adds r0, 0x10 - adds r1, r0, 0 - ldr r2, =gBattleAnimArgs - movs r3, 0x2 - ldrsh r0, [r2, r3] - cmp r0, 0 - bne _08114708 - adds r0, r1, 0 - movs r1, 0 - bl SetGreyscaleOrOriginalPalette - b _08114714 - .pool -_08114708: - lsls r0, r1, 4 - ldrh r3, [r2, 0x4] - movs r1, 0x10 - movs r2, 0xB - bl BlendPalette -_08114714: - ldr r1, =gTasks - lsls r0, r7, 2 - adds r0, r7 - lsls r0, 3 - adds r0, r1 - strh r5, [r0, 0x8] - ldr r2, =gBattleAnimArgs - ldrh r1, [r2] - strh r1, [r0, 0xA] - ldrh r1, [r2, 0x2] - strh r1, [r0, 0xC] - ldrh r1, [r2, 0x4] - strh r1, [r0, 0xE] - strh r6, [r0, 0x14] - ldr r1, =sub_8114748 - str r1, [r0] - add sp, 0x10 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81144F8 - - thumb_func_start sub_8114748 -sub_8114748: @ 8114748 - push {r4-r6,lr} - sub sp, 0x10 - lsls r0, 24 - lsrs r0, 24 - adds r6, r0, 0 - ldr r1, =gTasks - lsls r0, r6, 2 - adds r0, r6 - lsls r0, 3 - adds r4, r0, r1 - ldrh r0, [r4, 0x1C] - adds r0, 0x4 - movs r5, 0 - strh r0, [r4, 0x1C] - ldr r2, =gBattle_BG1_X - ldrh r3, [r2] - subs r1, r3, 0x4 - strh r1, [r2] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x80 - beq _08114776 - b _08114886 -_08114776: - strh r5, [r4, 0x1C] - adds r0, r3, 0 - adds r0, 0x7C - strh r0, [r2] - ldrh r0, [r4, 0x1E] - adds r0, 0x1 - strh r0, [r4, 0x1E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x2 - bne _08114824 - movs r0, 0 - bl GetAnimBattlerSpriteId - lsls r0, 24 - lsrs r0, 24 - ldr r5, =gSprites - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - ldrb r0, [r1, 0x5] - lsrs r0, 4 - adds r0, 0x10 - adds r1, r0, 0 - movs r2, 0xA - ldrsh r0, [r4, r2] - cmp r0, 0 - bne _081147B8 - adds r0, r1, 0 - movs r1, 0x1 - bl SetGreyscaleOrOriginalPalette -_081147B8: - movs r0, 0x8 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - bl DestroySprite - mov r0, sp - bl sub_80A6B30 - mov r0, sp - ldrb r0, [r0, 0x9] - bl sub_80A6C68 - movs r1, 0x14 - ldrsh r0, [r4, r1] - cmp r0, 0x1 - bne _08114886 - ldr r2, =gBattlerSpriteIds - ldr r0, =gBattleAnimAttacker - ldrb r1, [r0] - movs r0, 0x2 - eors r0, r1 - adds r0, r2 - ldrb r0, [r0] - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - adds r2, r5 - ldrb r3, [r2, 0x5] - lsls r1, r3, 28 - lsrs r1, 30 - adds r1, 0x1 - movs r0, 0x3 - ands r1, r0 - lsls r1, 2 - movs r0, 0xD - negs r0, r0 - ands r0, r3 - orrs r0, r1 - strb r0, [r2, 0x5] - b _08114886 - .pool -_08114824: - cmp r0, 0x3 - bne _08114886 - ldr r0, =gBattle_WIN0H - strh r5, [r0] - ldr r0, =gBattle_WIN0V - strh r5, [r0] - ldr r4, =0x00003f3f - movs r0, 0x48 - adds r1, r4, 0 - bl SetGpuReg - movs r0, 0x4A - adds r1, r4, 0 - bl SetGpuReg - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _08114856 - movs r0, 0x1 - movs r1, 0x3 - movs r2, 0 - bl SetAnimBgAttribute -_08114856: - movs r0, 0 - bl GetGpuReg - adds r1, r0, 0 - movs r2, 0x80 - lsls r2, 8 - adds r0, r2, 0 - eors r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0 - bl SetGpuReg - movs r0, 0x50 - movs r1, 0 - bl SetGpuReg - movs r0, 0x52 - movs r1, 0 - bl SetGpuReg - adds r0, r6, 0 - bl DestroyAnimVisualTask -_08114886: - add sp, 0x10 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8114748 - - thumb_func_start sub_811489C -sub_811489C: @ 811489C - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - ldr r0, =gBattleAnimArgs - movs r2, 0 - ldrsh r1, [r0, r2] - adds r2, r0, 0 - cmp r1, 0x7 - bhi _08114900 - lsls r0, r1, 2 - ldr r1, =_081148C4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081148C4: - .4byte _081148E4 - .4byte _081148E4 - .4byte _081148E4 - .4byte _081148E4 - .4byte _081148F0 - .4byte _081148F4 - .4byte _081148F8 - .4byte _081148FC -_081148E4: - ldrb r0, [r2] - bl GetAnimBattlerSpriteId - lsls r0, 24 - lsrs r2, r0, 24 - b _08114902 -_081148F0: - movs r4, 0 - b _08114908 -_081148F4: - movs r4, 0x2 - b _08114908 -_081148F8: - movs r4, 0x1 - b _08114908 -_081148FC: - movs r4, 0x3 - b _08114908 -_08114900: - movs r2, 0xFF -_08114902: - movs r0, 0 - cmp r0, 0 - beq _0811492E -_08114908: - adds r0, r4, 0 - bl GetBattlerAtPosition - lsls r0, 24 - lsrs r4, r0, 24 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0811492C - ldr r0, =gBattlerSpriteIds - adds r0, r4, r0 - ldrb r2, [r0] - b _0811492E - .pool -_0811492C: - movs r2, 0xFF -_0811492E: - cmp r2, 0xFF - beq _0811494A - ldr r1, =gSprites - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x5] - lsrs r0, 4 - adds r0, 0x10 - ldr r1, =gBattleAnimArgs - ldrb r1, [r1, 0x2] - bl SetGreyscaleOrOriginalPalette -_0811494A: - adds r0, r5, 0 - bl DestroyAnimVisualTask - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_811489C - - thumb_func_start sub_8114960 -sub_8114960: @ 8114960 - push {lr} - lsls r0, 24 - lsrs r3, r0, 24 - ldr r2, =gAnimMoveTurn - ldrb r0, [r2] - cmp r0, 0x1 - bhi _08114974 - ldr r1, =gBattleAnimArgs - movs r0, 0 - strh r0, [r1, 0xE] -_08114974: - ldrb r0, [r2] - cmp r0, 0x2 - bne _08114980 - ldr r1, =gBattleAnimArgs - movs r0, 0x1 - strh r0, [r1, 0xE] -_08114980: - adds r0, r3, 0 - bl DestroyAnimVisualTask - pop {r0} - bx r0 - .pool - thumb_func_end sub_8114960 - - .align 2, 0 diff --git a/asm/psychic.s b/asm/psychic.s deleted file mode 100644 index a900d3fccc..0000000000 --- a/asm/psychic.s +++ /dev/null @@ -1,2172 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_810F1EC -sub_810F1EC: @ 810F1EC - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r5, r0, 0 - bl IsContest - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - beq _0810F212 - mov r0, r8 - cmp r0, 0 - beq _0810F22E -_0810F212: - ldrb r1, [r5, 0x5] - movs r0, 0xD - negs r0, r0 - ands r0, r1 - movs r1, 0x8 - orrs r0, r1 - strb r0, [r5, 0x5] - adds r1, r5, 0 - adds r1, 0x43 - movs r0, 0xC8 - strb r0, [r1] - mov r1, r8 - cmp r1, 0 - bne _0810F2B8 -_0810F22E: - movs r0, 0x1 - bl GetBattlerAtPosition - lsls r0, 24 - lsrs r4, r0, 24 - adds r7, r4, 0 - adds r0, r4, 0 - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - eors r0, r1 - negs r1, r0 - orrs r1, r0 - lsrs r6, r1, 31 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F264 - adds r0, r4, 0 - adds r1, r6, 0 - movs r2, 0 - bl sub_80A438C -_0810F264: - movs r0, 0x2 - adds r4, r0, 0 - eors r4, r7 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F284 - movs r0, 0x1 - eors r6, r0 - adds r0, r4, 0 - adds r1, r6, 0 - movs r2, 0 - bl sub_80A438C -_0810F284: - mov r0, r8 - cmp r0, 0 - bne _0810F2B8 - bl IsDoubleBattle - lsls r0, 24 - cmp r0, 0 - beq _0810F2B8 - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - bne _0810F2B0 - movs r0, 0x48 - strh r0, [r5, 0x20] - movs r0, 0x50 - b _0810F2F2 - .pool -_0810F2B0: - movs r0, 0xB0 - strh r0, [r5, 0x20] - movs r0, 0x28 - b _0810F2F2 -_0810F2B8: - ldr r6, =gBattleAnimAttacker - ldrb r0, [r6] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - beq _0810F2CE - ldr r1, =gBattleAnimArgs - ldrh r0, [r1] - negs r0, r0 - strh r0, [r1] -_0810F2CE: - ldrb r0, [r6] - movs r1, 0 - bl GetBattlerSpriteCoord - lsls r0, 24 - ldr r4, =gBattleAnimArgs - lsrs r0, 24 - ldrh r1, [r4] - adds r0, r1 - strh r0, [r5, 0x20] - ldrb r0, [r6] - movs r1, 0x1 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - ldrh r4, [r4, 0x2] - adds r0, r4 -_0810F2F2: - strh r0, [r5, 0x22] - ldr r0, =gBattleAnimArgs - ldrh r0, [r0, 0x4] - bl IndexOfSpritePaletteTag - lsls r0, 24 - lsrs r0, 20 - movs r1, 0x80 - lsls r1, 1 - adds r0, r1 - strh r0, [r5, 0x2E] - mov r0, r8 - cmp r0, 0 - beq _0810F32C - ldrh r0, [r5, 0x22] - adds r0, 0x9 - strh r0, [r5, 0x22] - ldr r1, =sub_810F3C8 - str r1, [r5, 0x1C] - adds r0, r5, 0 - bl _call_via_r1 - b _0810F330 - .pool -_0810F32C: - ldr r0, =sub_810F340 - str r0, [r5, 0x1C] -_0810F330: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F1EC -@ - - thumb_func_start sub_810F340 -sub_810F340: @ 810F340 - push {r4,r5,lr} - adds r5, r0, 0 - movs r0, 0x1 - bl GetBattlerAtPosition - lsls r0, 24 - lsrs r4, r0, 24 - movs r1, 0x3C - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _0810F35C - movs r0, 0x1 - strh r0, [r5, 0x3C] - b _0810F3B6 -_0810F35C: - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F382 - ldr r2, =gSprites - ldr r0, =gBattlerSpriteIds - adds r0, r4, r0 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - adds r0, 0x3E - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] -_0810F382: - movs r0, 0x2 - eors r4, r0 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F3AC - ldr r2, =gSprites - ldr r0, =gBattlerSpriteIds - adds r0, r4, r0 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - adds r0, 0x3E - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] -_0810F3AC: - ldr r1, =sub_810F3C8 - str r1, [r5, 0x1C] - adds r0, r5, 0 - bl _call_via_r1 -_0810F3B6: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F340 - - thumb_func_start sub_810F3C8 -sub_810F3C8: @ 810F3C8 - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x34] - movs r1, 0x10 - subs r1, r0 - lsls r1, 8 - orrs r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x52 - bl SetGpuReg - ldrh r1, [r4, 0x34] - movs r2, 0x34 - ldrsh r0, [r4, r2] - cmp r0, 0xD - bne _0810F3F4 - ldr r0, =sub_810F400 - str r0, [r4, 0x1C] - b _0810F3F8 - .pool -_0810F3F4: - adds r0, r1, 0x1 - strh r0, [r4, 0x34] -_0810F3F8: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_810F3C8 - - thumb_func_start sub_810F400 -sub_810F400: @ 810F400 - push {r4-r7,lr} - adds r3, r0, 0 - ldrh r0, [r3, 0x30] - adds r0, 0x1 - strh r0, [r3, 0x30] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x2 - bne _0810F45E - movs r0, 0 - strh r0, [r3, 0x30] - ldrh r4, [r3, 0x2E] - ldr r1, =gPlttBufferFaded - adds r0, r4, 0 - adds r0, 0x8 - lsls r0, 1 - adds r0, r1 - ldrh r7, [r0] - movs r5, 0x8 - adds r6, r1, 0 - adds r1, r4, 0x7 - lsls r0, r4, 1 - adds r0, r6 - adds r2, r0, 0 - adds r2, 0x10 - lsls r1, 1 - adds r1, r6 -_0810F436: - ldrh r0, [r1] - strh r0, [r2] - subs r1, 0x2 - subs r2, 0x2 - subs r5, 0x1 - cmp r5, 0 - bgt _0810F436 - adds r0, r4, 0x1 - lsls r0, 1 - adds r0, r6 - strh r7, [r0] - ldrh r0, [r3, 0x32] - adds r0, 0x1 - strh r0, [r3, 0x32] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x10 - bne _0810F45E - ldr r0, =sub_810F46C - str r0, [r3, 0x1C] -_0810F45E: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F400 - - thumb_func_start sub_810F46C -sub_810F46C: @ 810F46C - push {r4-r6,lr} - adds r5, r0, 0 - ldrh r0, [r5, 0x34] - movs r1, 0x10 - subs r1, r0 - lsls r1, 8 - orrs r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x52 - bl SetGpuReg - ldrh r0, [r5, 0x34] - subs r0, 0x1 - strh r0, [r5, 0x34] - lsls r0, 16 - asrs r0, 16 - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - bne _0810F512 - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _0810F502 - movs r0, 0x1 - bl GetBattlerAtPosition - lsls r0, 24 - lsrs r4, r0, 24 - adds r6, r4, 0 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F4D4 - ldr r2, =gSprites - ldr r0, =gBattlerSpriteIds - adds r0, r4, r0 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - adds r0, 0x3E - ldrb r2, [r0] - movs r1, 0x5 - negs r1, r1 - ands r1, r2 - strb r1, [r0] -_0810F4D4: - movs r0, 0x2 - adds r4, r0, 0 - eors r4, r6 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F502 - ldr r2, =gSprites - ldr r0, =gBattlerSpriteIds - adds r0, r4, r0 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - adds r0, 0x3E - ldrb r2, [r0] - movs r1, 0x5 - negs r1, r1 - ands r1, r2 - strb r1, [r0] -_0810F502: - adds r2, r5, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - ldr r0, =sub_810F524 - str r0, [r5, 0x1C] -_0810F512: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F46C - - thumb_func_start sub_810F524 -sub_810F524: @ 810F524 - push {r4-r6,lr} - adds r6, r0, 0 - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _0810F57C - movs r0, 0x1 - bl GetBattlerAtPosition - lsls r0, 24 - lsrs r0, 24 - adds r4, r0, 0 - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - eors r0, r1 - negs r1, r0 - orrs r1, r0 - lsrs r5, r1, 31 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F562 - adds r0, r5, 0 - bl sub_80A477C -_0810F562: - movs r0, 0x2 - eors r4, r0 - adds r0, r4, 0 - bl IsBattlerSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _0810F57C - movs r0, 0x1 - eors r5, r0 - adds r0, r5, 0 - bl sub_80A477C -_0810F57C: - ldr r0, =DestroyAnimSprite - str r0, [r6, 0x1C] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F524 - - thumb_func_start sub_810F58C -sub_810F58C: @ 810F58C - push {r4-r6,lr} - adds r4, r0, 0 - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _0810F618 - ldr r5, =gBattleAnimArgs - movs r1, 0x6 - ldrsh r0, [r5, r1] - movs r6, 0 - cmp r0, 0 - bne _0810F5A6 - movs r6, 0x1 -_0810F5A6: - bl IsContest - lsls r0, 24 - cmp r0, 0 - bne _0810F5EE - bl IsDoubleBattle - lsls r0, 24 - cmp r0, 0 - beq _0810F5EE - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - bne _0810F5E0 - ldrh r0, [r5] - movs r1, 0x48 - subs r1, r0 - strh r1, [r4, 0x20] - ldrh r0, [r5, 0x2] - adds r0, 0x50 - strh r0, [r4, 0x22] - b _0810F610 - .pool -_0810F5E0: - ldrh r0, [r5] - adds r0, 0xB0 - strh r0, [r4, 0x20] - ldrh r0, [r5, 0x2] - adds r0, 0x28 - strh r0, [r4, 0x22] - b _0810F610 -_0810F5EE: - ldr r0, =gBattleAnimArgs - movs r1, 0x4 - ldrsh r0, [r0, r1] - cmp r0, 0 - bne _0810F608 - adds r0, r4, 0 - adds r1, r6, 0 - bl InitSpritePosToAnimAttacker - b _0810F610 - .pool -_0810F608: - adds r0, r4, 0 - adds r1, r6, 0 - bl InitSpritePosToAnimTarget -_0810F610: - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - b _0810F62C -_0810F618: - adds r0, r4, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x30 - ands r0, r1 - cmp r0, 0 - beq _0810F62C - adds r0, r4, 0 - bl DestroySpriteAndMatrix -_0810F62C: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_810F58C - - thumb_func_start sub_810F634 -sub_810F634: @ 810F634 - push {r4,r5,lr} - adds r5, r0, 0 - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x2 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - ldrb r0, [r4] - movs r1, 0x3 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x22] - ldrb r0, [r4] - bl GetBattlerSide - lsls r0, 24 - cmp r0, 0 - beq _0810F684 - adds r0, r5, 0 - movs r1, 0x1 - bl StartSpriteAnim - ldrh r0, [r5, 0x20] - subs r0, 0x28 - strh r0, [r5, 0x20] - ldrh r0, [r5, 0x22] - adds r0, 0xA - strh r0, [r5, 0x22] - ldr r0, =0x0000ffff - b _0810F692 - .pool -_0810F684: - ldrh r0, [r5, 0x20] - adds r0, 0x28 - strh r0, [r5, 0x20] - ldrh r0, [r5, 0x22] - subs r0, 0xA - strh r0, [r5, 0x22] - movs r0, 0x1 -_0810F692: - strh r0, [r5, 0x30] - ldr r1, =DestroyAnimSprite - adds r0, r5, 0 - bl StoreSpriteCallbackInData6 - ldr r0, =RunStoredCallbackWhenAnimEnds - str r0, [r5, 0x1C] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F634 - - thumb_func_start sub_810F6B0 -sub_810F6B0: @ 810F6B0 - push {r4-r7,lr} - adds r5, r0, 0 - ldr r6, =gBattleAnimAttacker - ldrb r0, [r6] - movs r1, 0x1 - bl sub_80A861C - lsls r0, 16 - asrs r1, r0, 16 - lsrs r0, 31 - adds r1, r0 - lsls r1, 15 - lsrs r4, r1, 16 - ldrb r0, [r6] - movs r1, 0 - bl sub_80A861C - lsls r0, 16 - asrs r1, r0, 16 - lsrs r0, 31 - adds r1, r0 - asrs r1, 1 - negs r1, r1 - lsls r1, 16 - lsrs r7, r1, 16 - ldrb r0, [r6] - bl GetBattlerSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0810F6F6 - lsls r0, r4, 16 - negs r0, r0 - lsrs r4, r0, 16 -_0810F6F6: - ldrb r0, [r6] - movs r1, 0x2 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - strh r0, [r5, 0x20] - ldrb r0, [r6] - movs r1, 0x3 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - adds r0, r7 - strh r0, [r5, 0x22] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0xF - bgt _0810F722 - movs r0, 0x10 - strh r0, [r5, 0x22] -_0810F722: - ldr r1, =sub_810F740 - adds r0, r5, 0 - bl StoreSpriteCallbackInData6 - ldr r0, =RunStoredCallbackWhenAnimEnds - str r0, [r5, 0x1C] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F6B0 - - thumb_func_start sub_810F740 -sub_810F740: @ 810F740 - push {r4,lr} - adds r4, r0, 0 - ldrb r1, [r4, 0x1] - movs r0, 0x4 - negs r0, r0 - ands r0, r1 - movs r1, 0x1 - orrs r0, r1 - strb r0, [r4, 0x1] - ldr r0, =gUnknown_08596740 - str r0, [r4, 0x10] - movs r0, 0 - strh r0, [r4, 0x2E] - adds r0, r4, 0 - bl InitSpriteAffineAnim - ldr r0, =sub_810F774 - str r0, [r4, 0x1C] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F740 - - thumb_func_start sub_810F774 -sub_810F774: @ 810F774 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _0810F786 - cmp r0, 0x1 - beq _0810F7B4 - b _0810F7CC -_0810F786: - adds r0, r4, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _0810F7CC - ldrb r0, [r4, 0x3] - lsls r0, 26 - lsrs r0, 27 - bl FreeOamMatrix - ldrb r1, [r4, 0x1] - movs r0, 0x4 - negs r0, r0 - ands r0, r1 - strb r0, [r4, 0x1] - movs r0, 0x12 - strh r0, [r4, 0x30] - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - b _0810F7CC -_0810F7B4: - ldrh r0, [r4, 0x30] - subs r0, 0x1 - strh r0, [r4, 0x30] - lsls r0, 16 - asrs r0, 16 - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - bne _0810F7CC - adds r0, r4, 0 - bl DestroyAnimSprite -_0810F7CC: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F774 - - thumb_func_start sub_810F7D4 -sub_810F7D4: @ 810F7D4 - push {r4,lr} - lsls r0, 24 - lsrs r0, 24 - lsls r4, r0, 2 - adds r4, r0 - lsls r4, 3 - ldr r0, =gTasks - adds r4, r0 - movs r0, 0 - bl GetAnimBattlerSpriteId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - strh r1, [r4, 0x8] - ldr r2, =gUnknown_0859675C - adds r0, r4, 0 - bl PrepareAffineAnimInTaskData - ldr r0, =sub_810F810 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F7D4 - - thumb_func_start sub_810F810 -sub_810F810: @ 810F810 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - ldr r1, =gTasks - adds r0, r1 - bl RunAffineAnimFromTaskData - lsls r0, 24 - cmp r0, 0 - bne _0810F830 - adds r0, r4, 0 - bl DestroyAnimVisualTask -_0810F830: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F810 - - thumb_func_start sub_810F83C -sub_810F83C: @ 810F83C - push {r4,lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTasks - adds r4, r1, r0 - movs r0, 0 - bl GetAnimBattlerSpriteId - lsls r0, 24 - lsrs r0, 24 - movs r1, 0 - strh r0, [r4, 0x8] - strh r1, [r4, 0xA] - strh r1, [r4, 0xC] - ldr r0, =gBattleAnimAttacker - ldrb r0, [r0] - bl GetBattlerSide - lsls r0, 24 - movs r1, 0x8 - cmp r0, 0 - beq _0810F870 - movs r1, 0x4 -_0810F870: - strh r1, [r4, 0xE] - ldrb r1, [r4, 0x8] - ldr r2, =gUnknown_0859677C - adds r0, r4, 0 - bl PrepareAffineAnimInTaskData - ldr r0, =sub_810F898 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F83C - - thumb_func_start sub_810F898 -sub_810F898: @ 810F898 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, =gTasks - adds r4, r0, r1 - movs r1, 0xA - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _0810F8BC - cmp r0, 0x1 - beq _0810F8D8 - b _0810F936 - .pool -_0810F8BC: - adds r0, r4, 0 - bl RunAffineAnimFromTaskData - ldrh r0, [r4, 0xC] - adds r0, 0x1 - strh r0, [r4, 0xC] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x13 - ble _0810F936 - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] - b _0810F936 -_0810F8D8: - movs r1, 0xE - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _0810F900 - ldr r2, =gSprites - movs r0, 0x8 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrh r1, [r0, 0x26] - subs r1, 0x8 - strh r1, [r0, 0x26] - ldrh r0, [r4, 0xE] - subs r0, 0x1 - strh r0, [r4, 0xE] - b _0810F936 - .pool -_0810F900: - ldr r3, =gSprites - movs r0, 0x8 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - adds r0, 0x3E - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] - movs r0, 0x8 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - movs r1, 0x88 - lsls r1, 1 - strh r1, [r0, 0x20] - ldrb r0, [r4, 0x8] - bl ResetSpriteRotScale - adds r0, r5, 0 - bl DestroyAnimVisualTask -_0810F936: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F898 - - thumb_func_start sub_810F940 -sub_810F940: @ 810F940 - push {r4-r6,lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTasks - adds r5, r1, r0 - movs r1, 0 - movs r0, 0x10 - strh r0, [r5, 0xE] - strh r1, [r5, 0x10] - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x2 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x22] - ldrb r0, [r4] - movs r1, 0x3 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x24] - ldrb r0, [r4] - movs r1, 0x1 - bl sub_80A861C - lsls r0, 16 - asrs r0, 16 - movs r1, 0x3 - bl __divsi3 - lsls r0, 16 - lsrs r6, r0, 16 - ldrb r0, [r4] - movs r1, 0 - bl sub_80A861C - lsls r0, 16 - asrs r0, 16 - movs r1, 0x3 - bl __divsi3 - lsls r0, 16 - lsrs r0, 16 - adds r1, r0, 0 - cmp r0, r6 - bcs _0810F9AA - adds r1, r6, 0 -_0810F9AA: - strh r1, [r5, 0x20] - movs r1, 0xFD - lsls r1, 6 - movs r0, 0x50 - bl SetGpuReg - movs r0, 0x52 - movs r1, 0x10 - bl SetGpuReg - ldr r0, =sub_810F9D4 - str r0, [r5] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810F940 - - thumb_func_start sub_810F9D4 -sub_810F9D4: @ 810F9D4 - push {r4-r6,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, =gTasks - adds r4, r0, r1 - movs r0, 0x8 - ldrsh r1, [r4, r0] - cmp r1, 0x1 - beq _0810FAD4 - cmp r1, 0x1 - bgt _0810F9FC - cmp r1, 0 - beq _0810FA0A - b _0810FB5A - .pool -_0810F9FC: - cmp r1, 0x2 - bne _0810FA02 - b _0810FB36 -_0810FA02: - cmp r1, 0x3 - bne _0810FA08 - b _0810FB44 -_0810FA08: - b _0810FB5A -_0810FA0A: - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x8 - bgt _0810FA1A - b _0810FB5A -_0810FA1A: - strh r1, [r4, 0xA] - ldr r0, =gUnknown_08596794 - movs r2, 0x22 - ldrsh r1, [r4, r2] - movs r3, 0x24 - ldrsh r2, [r4, r3] - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r2, r0, 24 - movs r0, 0xC - ldrsh r1, [r4, r0] - adds r1, 0x8 - lsls r1, 1 - adds r0, r4, 0 - adds r0, 0x8 - adds r0, r1 - strh r2, [r0] - cmp r2, 0x40 - beq _0810FABE - movs r1, 0xC - ldrsh r0, [r4, r1] - cmp r0, 0x1 - beq _0810FA78 - cmp r0, 0x1 - bgt _0810FA5C - cmp r0, 0 - beq _0810FA66 - b _0810FABE - .pool -_0810FA5C: - cmp r0, 0x2 - beq _0810FA90 - cmp r0, 0x3 - beq _0810FAA8 - b _0810FABE -_0810FA66: - ldr r0, =gSprites - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r4, 0x20] - b _0810FAB6 - .pool -_0810FA78: - ldr r0, =gSprites - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r4, 0x20] - negs r0, r0 - strh r0, [r1, 0x24] - ldrh r0, [r4, 0x20] - b _0810FABC - .pool -_0810FA90: - ldr r1, =gSprites - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r1 - ldrh r1, [r4, 0x20] - strh r1, [r0, 0x24] - ldrh r1, [r4, 0x20] - strh r1, [r0, 0x26] - b _0810FABE - .pool -_0810FAA8: - ldr r0, =gSprites - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r4, 0x20] - negs r0, r0 -_0810FAB6: - strh r0, [r1, 0x24] - ldrh r0, [r4, 0x20] - negs r0, r0 -_0810FABC: - strh r0, [r1, 0x26] -_0810FABE: - ldrh r0, [r4, 0xC] - adds r0, 0x1 - strh r0, [r4, 0xC] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x5 - bne _0810FB5A - b _0810FB36 - .pool -_0810FAD4: - ldrh r0, [r4, 0xA] - ands r1, r0 - cmp r1, 0 - beq _0810FAE4 - ldrh r0, [r4, 0xE] - subs r0, 0x1 - strh r0, [r4, 0xE] - b _0810FAEA -_0810FAE4: - ldrh r0, [r4, 0x10] - adds r0, 0x1 - strh r0, [r4, 0x10] -_0810FAEA: - ldrh r1, [r4, 0x10] - lsls r1, 8 - ldrh r0, [r4, 0xE] - orrs r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x52 - bl SetGpuReg - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x20 - bne _0810FB5A - movs r5, 0x8 - adds r6, r4, 0 - adds r6, 0x8 -_0810FB10: - lsls r0, r5, 1 - adds r1, r6, r0 - movs r2, 0 - ldrsh r0, [r1, r2] - cmp r0, 0x40 - beq _0810FB2C - adds r1, r0, 0 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - bl DestroySprite -_0810FB2C: - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, 0xC - bls _0810FB10 -_0810FB36: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _0810FB5A - .pool -_0810FB44: - movs r0, 0x52 - movs r1, 0 - bl SetGpuReg - movs r0, 0x50 - movs r1, 0 - bl SetGpuReg - adds r0, r5, 0 - bl DestroyAnimVisualTask -_0810FB5A: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_810F9D4 - - - thumb_func_start sub_810FB60 -sub_810FB60: @ 810FB60 - push {r4,lr} - adds r4, r0, 0 - movs r0, 0x30 - ldrsh r1, [r4, r0] - movs r2, 0x2E - ldrsh r0, [r4, r2] - subs r0, 0xA - cmp r1, r0 - ble _0810FB8A - ldrh r0, [r4, 0x30] - movs r1, 0x1 - ands r1, r0 - adds r3, r4, 0 - adds r3, 0x3E - lsls r1, 2 - ldrb r2, [r3] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3] -_0810FB8A: - movs r0, 0x30 - ldrsh r1, [r4, r0] - movs r2, 0x2E - ldrsh r0, [r4, r2] - cmp r1, r0 - bne _0810FB9C - adds r0, r4, 0 - bl DestroyAnimSprite -_0810FB9C: - ldrh r0, [r4, 0x30] - adds r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_810FB60 - - thumb_func_start sub_810FBA8 -sub_810FBA8: @ 810FBA8 - push {r4-r6,lr} - adds r5, r0, 0 - ldr r6, =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r6, r1] - cmp r0, 0 - bne _0810FBD4 - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x2 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - ldrb r0, [r4] - movs r1, 0x3 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x22] -_0810FBD4: - ldrh r0, [r6, 0x2] - strh r0, [r5, 0x2E] - ldr r0, =sub_810FB60 - str r0, [r5, 0x1C] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810FBA8 - - thumb_func_start sub_810FBF0 -sub_810FBF0: @ 810FBF0 - push {r4,r5,lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTasks - adds r5, r1, r0 - bl IsContest - lsls r0, 24 - cmp r0, 0 - beq _0810FC94 - ldr r0, =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0x1 - bne _0810FC60 - ldr r0, =0x0000fff6 - strh r0, [r5, 0x1C] - ldr r4, =gBattleAnimTarget - ldrb r0, [r4] - movs r1, 0x5 - bl sub_80A861C - subs r0, 0x8 - strh r0, [r5, 0x1E] - ldrb r0, [r4] - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x8 - strh r0, [r5, 0x20] - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x5 - bl sub_80A861C - subs r0, 0x8 - strh r0, [r5, 0x22] - ldrb r0, [r4] - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x8 - b _0810FD1E - .pool -_0810FC60: - movs r0, 0xA - strh r0, [r5, 0x1C] - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x4 - bl sub_80A861C - adds r0, 0x8 - strh r0, [r5, 0x1E] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_80A861C - subs r0, 0x8 - strh r0, [r5, 0x20] - ldr r4, =gBattleAnimTarget - ldrb r0, [r4] - movs r1, 0x4 - bl sub_80A861C - adds r0, 0x8 - b _0810FD12 - .pool -_0810FC94: - ldr r0, =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0x1 - bne _0810FCE8 - ldr r0, =0x0000fff6 - strh r0, [r5, 0x1C] - ldr r4, =gBattleAnimTarget - ldrb r0, [r4] - movs r1, 0x4 - bl sub_80A861C - adds r0, 0x8 - strh r0, [r5, 0x1E] - ldrb r0, [r4] - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x8 - strh r0, [r5, 0x20] - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x4 - bl sub_80A861C - adds r0, 0x8 - strh r0, [r5, 0x22] - ldrb r0, [r4] - movs r1, 0x2 - bl sub_80A861C - adds r0, 0x8 - b _0810FD1E - .pool -_0810FCE8: - movs r0, 0xA - strh r0, [r5, 0x1C] - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0x5 - bl sub_80A861C - subs r0, 0x8 - strh r0, [r5, 0x1E] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_80A861C - subs r0, 0x8 - strh r0, [r5, 0x20] - ldr r4, =gBattleAnimTarget - ldrb r0, [r4] - movs r1, 0x5 - bl sub_80A861C - subs r0, 0x8 -_0810FD12: - strh r0, [r5, 0x22] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_80A861C - subs r0, 0x8 -_0810FD1E: - strh r0, [r5, 0x24] - movs r0, 0x6 - strh r0, [r5, 0xA] - ldr r0, =sub_810FD3C - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810FBF0 - - thumb_func_start sub_810FD3C -sub_810FD3C: @ 810FD3C - push {r4,r5,lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - ldr r1, =gTasks - adds r5, r0, r1 - movs r0, 0x8 - ldrsh r1, [r5, r0] - cmp r1, 0 - beq _0810FD60 - cmp r1, 0x1 - beq _0810FDD4 - b _0810FDE8 - .pool -_0810FD60: - ldrh r0, [r5, 0xA] - adds r0, 0x1 - strh r0, [r5, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x6 - ble _0810FDE8 - strh r1, [r5, 0xA] - ldr r0, =gUnknown_08596864 - movs r2, 0x1E - ldrsh r1, [r5, r2] - movs r3, 0x20 - ldrsh r2, [r5, r3] - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x40 - beq _0810FDB4 - ldr r0, =gSprites - lsls r4, r1, 4 - adds r4, r1 - lsls r4, 2 - adds r4, r0 - movs r0, 0x10 - strh r0, [r4, 0x2E] - ldrh r0, [r5, 0x22] - strh r0, [r4, 0x32] - ldrh r0, [r5, 0x24] - strh r0, [r4, 0x36] - ldrh r0, [r5, 0x1C] - strh r0, [r4, 0x38] - adds r0, r4, 0 - bl InitAnimArcTranslation - ldrb r0, [r5, 0xC] - movs r1, 0x3 - ands r1, r0 - adds r0, r4, 0 - bl StartSpriteAffineAnim -_0810FDB4: - ldrh r0, [r5, 0xC] - adds r0, 0x1 - strh r0, [r5, 0xC] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0xC - bne _0810FDE8 - ldrh r0, [r5, 0x8] - adds r0, 0x1 - strh r0, [r5, 0x8] - b _0810FDE8 - .pool -_0810FDD4: - ldrh r0, [r5, 0xA] - adds r0, 0x1 - strh r0, [r5, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x11 - ble _0810FDE8 - adds r0, r2, 0 - bl DestroyAnimVisualTask -_0810FDE8: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_810FD3C - - thumb_func_start sub_810FDF0 -sub_810FDF0: @ 810FDF0 - push {r4,lr} - adds r4, r0, 0 - bl TranslateAnimArc - lsls r0, 24 - cmp r0, 0 - beq _0810FE0E - ldrb r0, [r4, 0x3] - lsls r0, 26 - lsrs r0, 27 - bl FreeOamMatrix - adds r0, r4, 0 - bl DestroySprite -_0810FE0E: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_810FDF0 - - thumb_func_start sub_810FE14 -sub_810FE14: @ 810FE14 - push {r4-r6,lr} - sub sp, 0xC - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTasks - adds r4, r1, r0 - ldr r0, =gBattleAnimTarget - ldrb r0, [r0] - bl GetBattlerYCoordWithElevation - lsls r0, 24 - lsrs r1, r0, 24 - adds r0, r1, 0 - subs r0, 0x20 - strh r0, [r4, 0x24] - ldr r0, =gBattleAnimArgs - movs r2, 0 - ldrsh r0, [r0, r2] - cmp r0, 0x1 - beq _0810FE6A - cmp r0, 0x1 - bgt _0810FE58 - cmp r0, 0 - beq _0810FE5E - b _0810FE86 - .pool -_0810FE58: - cmp r0, 0x2 - beq _0810FE76 - b _0810FE86 -_0810FE5E: - movs r0, 0x2 - strh r0, [r4, 0x1E] - movs r0, 0x5 - strh r0, [r4, 0x20] - movs r0, 0x40 - b _0810FE7E -_0810FE6A: - movs r0, 0x2 - strh r0, [r4, 0x1E] - movs r0, 0x5 - strh r0, [r4, 0x20] - movs r0, 0xC0 - b _0810FE7E -_0810FE76: - movs r0, 0x4 - strh r0, [r4, 0x1E] - strh r0, [r4, 0x20] - movs r0, 0 -_0810FE7E: - strh r0, [r4, 0x22] - adds r0, r1, 0 - adds r0, 0x20 - strh r0, [r4, 0x26] -_0810FE86: - movs r1, 0x24 - ldrsh r0, [r4, r1] - cmp r0, 0 - bge _0810FE92 - movs r0, 0 - strh r0, [r4, 0x24] -_0810FE92: - ldr r0, =gBattleAnimTarget - ldrb r0, [r0] - bl GetBattlerSpriteBGPriorityRank - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0810FEB8 - ldr r0, =gBattle_BG1_X - ldrh r0, [r0] - strh r0, [r4, 0x1C] - ldr r0, =0x04000014 - b _0810FEC0 - .pool -_0810FEB8: - ldr r0, =gBattle_BG2_X - ldrh r0, [r0] - strh r0, [r4, 0x1C] - ldr r0, =0x04000018 -_0810FEC0: - str r0, [sp] - ldrh r1, [r4, 0x24] - lsls r3, r1, 16 - asrs r1, r3, 16 - movs r2, 0x24 - ldrsh r0, [r4, r2] - adds r0, 0x40 - cmp r1, r0 - bgt _0810FEFA - ldr r5, =gScanlineEffectRegBuffers - movs r0, 0xF0 - lsls r0, 3 - adds r6, r5, r0 -_0810FEDA: - asrs r3, 16 - lsls r1, r3, 1 - adds r2, r1, r5 - ldrh r0, [r4, 0x1C] - strh r0, [r2] - adds r1, r6 - ldrh r0, [r4, 0x1C] - strh r0, [r1] - adds r3, 0x1 - lsls r3, 16 - asrs r1, r3, 16 - movs r2, 0x24 - ldrsh r0, [r4, r2] - adds r0, 0x40 - cmp r1, r0 - ble _0810FEDA -_0810FEFA: - ldr r0, =0xa2600001 - str r0, [sp, 0x4] - mov r1, sp - movs r2, 0 - movs r0, 0x1 - strb r0, [r1, 0x8] - mov r0, sp - strb r2, [r0, 0x9] - ldr r0, [sp] - ldr r1, [sp, 0x4] - ldr r2, [sp, 0x8] - bl ScanlineEffect_SetParams - ldr r0, =sub_810FF34 - str r0, [r4] - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_810FE14 - - thumb_func_start sub_810FF34 -sub_810FF34: @ 810FF34 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - ldr r1, =gTasks - adds r5, r0, r1 - movs r1, 0x8 - ldrsh r0, [r5, r1] - cmp r0, 0x1 - beq _0811000E - cmp r0, 0x1 - bgt _0810FF60 - cmp r0, 0 - beq _0810FF66 - b _08110026 - .pool -_0810FF60: - cmp r0, 0x2 - beq _08110020 - b _08110026 -_0810FF66: - ldrh r3, [r5, 0x22] - ldrh r4, [r5, 0x24] - movs r2, 0x24 - ldrsh r1, [r5, r2] - movs r2, 0x26 - ldrsh r0, [r5, r2] - cmp r1, r0 - bgt _0810FFFE - ldr r0, =gSineTable - mov r9, r0 - movs r7, 0x3 - ldr r1, =gScanlineEffectRegBuffers - mov r12, r1 - movs r2, 0xF0 - lsls r2, 3 - add r2, r12 - mov r8, r2 -_0810FF88: - lsls r2, r3, 16 - asrs r0, r2, 15 - add r0, r9 - movs r3, 0 - ldrsh r0, [r0, r3] - movs r3, 0x20 - ldrsh r1, [r5, r3] - asrs r0, r1 - lsls r0, 16 - lsrs r1, r0, 16 - asrs r3, r0, 16 - adds r6, r2, 0 - cmp r3, 0 - ble _0810FFB8 - ldrh r1, [r5, 0xA] - adds r0, r7, 0 - ands r0, r1 - adds r0, r3, r0 - b _0810FFC4 - .pool -_0810FFB8: - cmp r3, 0 - bge _0810FFC8 - ldrh r1, [r5, 0xA] - adds r0, r7, 0 - ands r0, r1 - subs r0, r3, r0 -_0810FFC4: - lsls r0, 16 - lsrs r1, r0, 16 -_0810FFC8: - lsls r2, r4, 16 - asrs r2, 16 - lsls r3, r2, 1 - mov r0, r12 - adds r4, r3, r0 - ldrh r0, [r5, 0x1C] - lsls r1, 16 - asrs r1, 16 - adds r0, r1, r0 - strh r0, [r4] - add r3, r8 - ldrh r0, [r5, 0x1C] - adds r1, r0 - strh r1, [r3] - asrs r0, r6, 16 - ldrh r1, [r5, 0x1E] - adds r0, r1 - lsls r0, 16 - lsrs r3, r0, 16 - adds r2, 0x1 - lsls r2, 16 - lsrs r4, r2, 16 - asrs r2, 16 - movs r1, 0x26 - ldrsh r0, [r5, r1] - cmp r2, r0 - ble _0810FF88 -_0810FFFE: - ldrh r0, [r5, 0xA] - adds r0, 0x1 - strh r0, [r5, 0xA] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x17 - ble _08110026 - b _08110014 -_0811000E: - ldr r1, =gScanlineEffect - movs r0, 0x3 - strb r0, [r1, 0x15] -_08110014: - ldrh r0, [r5, 0x8] - adds r0, 0x1 - strh r0, [r5, 0x8] - b _08110026 - .pool -_08110020: - adds r0, r2, 0 - bl DestroyAnimVisualTask -_08110026: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_810FF34 - - thumb_func_start sub_8110034 -sub_8110034: @ 8110034 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r4, r0, 24 - mov r8, r4 - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - ldr r1, =gTasks - adds r7, r0, r1 - bl AllocOamMatrix - lsls r0, 24 - lsrs r5, r0, 24 - mov r10, r5 - adds r6, r5, 0 - cmp r6, 0xFF - bne _0811006C - adds r0, r4, 0 - bl DestroyAnimVisualTask - b _08110116 - .pool -_0811006C: - ldr r1, =gBattleAnimArgs - ldrb r0, [r1] - bl CloneBattlerSpriteWithBlend - lsls r0, 16 - lsrs r1, r0, 16 - mov r9, r1 - asrs r0, 16 - cmp r0, 0 - bge _08110094 - adds r0, r5, 0 - bl FreeOamMatrix - mov r0, r8 - bl DestroyAnimVisualTask - b _08110116 - .pool -_08110094: - ldr r2, =gSprites - lsls r4, r0, 4 - adds r4, r0 - lsls r4, 2 - adds r0, r2, 0 - adds r0, 0x1C - adds r0, r4, r0 - ldr r1, =SpriteCallbackDummy - str r1, [r0] - adds r4, r2 - ldrb r0, [r4, 0x1] - movs r1, 0x3 - orrs r0, r1 - strb r0, [r4, 0x1] - movs r0, 0x1F - ands r6, r0 - lsls r2, r6, 1 - ldrb r1, [r4, 0x3] - movs r0, 0x3F - negs r0, r0 - ands r0, r1 - orrs r0, r2 - strb r0, [r4, 0x3] - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - adds r1, r4, 0 - adds r1, 0x43 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r1, r9 - lsls r0, r1, 24 - lsrs r0, 24 - movs r2, 0x80 - lsls r2, 1 - adds r1, r2, 0 - movs r3, 0 - bl SetSpriteRotScale - ldrb r3, [r4, 0x1] - lsrs r1, r3, 6 - ldrb r2, [r4, 0x3] - lsrs r2, 6 - lsls r3, 30 - lsrs r3, 30 - adds r0, r4, 0 - bl CalcCenterToCornerVec - ldr r1, =gBattleAnimArgs - ldrb r0, [r1] - bl GetAnimBattlerSpriteId - lsls r0, 24 - lsrs r0, 24 - strh r0, [r7, 0x22] - mov r0, r10 - strh r0, [r7, 0x24] - mov r1, r9 - strh r1, [r7, 0x26] - ldr r0, =sub_8110134 - str r0, [r7] -_08110116: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8110034 - - thumb_func_start sub_8110134 -sub_8110134: @ 8110134 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, =gTasks - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x1 - beq _081101B8 - cmp r0, 0x1 - bgt _0811015C - cmp r0, 0 - beq _08110166 - b _08110238 - .pool -_0811015C: - cmp r0, 0x2 - beq _08110208 - cmp r0, 0x3 - beq _08110228 - b _08110238 -_08110166: - ldrh r0, [r4, 0xA] - adds r0, 0x4 - strh r0, [r4, 0xA] - ldr r1, =gSineTable - movs r2, 0xA - ldrsh r0, [r4, r2] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - lsls r1, 16 - asrs r1, 17 - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - subs r0, r1 - strh r0, [r4, 0xC] - ldrh r0, [r4, 0x26] - lsls r0, 24 - lsrs r0, 24 - movs r1, 0xC - ldrsh r2, [r4, r1] - adds r1, r2, 0 - movs r3, 0 - bl SetSpriteRotScale - ldrh r0, [r4, 0x26] - lsls r0, 24 - lsrs r0, 24 - ldrh r1, [r4, 0x22] - lsls r1, 24 - lsrs r1, 24 - bl SetBattlerSpriteYOffsetFromOtherYScale - movs r2, 0xA - ldrsh r0, [r4, r2] - cmp r0, 0x30 - bne _08110238 - b _0811021A - .pool -_081101B8: - ldrh r0, [r4, 0xA] - subs r0, 0x4 - strh r0, [r4, 0xA] - ldr r1, =gSineTable - movs r2, 0xA - ldrsh r0, [r4, r2] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - lsls r1, 16 - asrs r1, 17 - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - subs r0, r1 - strh r0, [r4, 0xC] - ldrh r0, [r4, 0x26] - lsls r0, 24 - lsrs r0, 24 - movs r1, 0xC - ldrsh r2, [r4, r1] - adds r1, r2, 0 - movs r3, 0 - bl SetSpriteRotScale - ldrh r0, [r4, 0x26] - lsls r0, 24 - lsrs r0, 24 - ldrh r1, [r4, 0x22] - lsls r1, 24 - lsrs r1, 24 - bl SetBattlerSpriteYOffsetFromOtherYScale - movs r2, 0xA - ldrsh r0, [r4, r2] - cmp r0, 0 - bne _08110238 - b _0811021A - .pool -_08110208: - movs r0, 0x26 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - bl obj_delete_but_dont_free_vram -_0811021A: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _08110238 - .pool -_08110228: - ldrh r0, [r4, 0x24] - lsls r0, 24 - lsrs r0, 24 - bl FreeOamMatrix - adds r0, r5, 0 - bl DestroyAnimVisualTask -_08110238: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8110134 -@*/ - - thumb_func_start sub_8110240 -sub_8110240: @ 8110240 - push {r4,r5,lr} - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0x1 - beq _081102B8 - cmp r0, 0x1 - bgt _08110256 - cmp r0, 0 - beq _08110260 - b _08110360 -_08110256: - cmp r0, 0x2 - beq _081102EA - cmp r0, 0x3 - beq _0811034A - b _08110360 -_08110260: - ldr r4, =gBattleAnimAttacker - ldrb r0, [r4] - movs r1, 0 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - ldrb r0, [r4] - movs r1, 0x1 - bl GetBattlerSpriteCoord - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x22] - bl IsContest - lsls r0, 24 - cmp r0, 0 - beq _0811028E - ldrh r0, [r5, 0x22] - adds r0, 0xC - strh r0, [r5, 0x22] -_0811028E: - movs r0, 0x8 - strh r0, [r5, 0x30] - movs r1, 0xFD - lsls r1, 6 - movs r0, 0x50 - bl SetGpuReg - ldrh r0, [r5, 0x30] - movs r1, 0x10 - subs r1, r0 - lsls r1, 8 - orrs r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x52 - bl SetGpuReg - b _081102E2 - .pool -_081102B8: - adds r0, r5, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08110360 - movs r0, 0x40 - negs r0, r0 - bl BattleAnimAdjustPanning - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 24 - movs r0, 0xCB - bl PlaySE12WithPanning - adds r0, r5, 0 - movs r1, 0x1 - bl ChangeSpriteAffineAnim -_081102E2: - ldrh r0, [r5, 0x2E] - adds r0, 0x1 - strh r0, [r5, 0x2E] - b _08110360 -_081102EA: - ldrh r0, [r5, 0x32] - adds r1, r0, 0x1 - strh r1, [r5, 0x32] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1 - ble _0811032E - movs r0, 0 - strh r0, [r5, 0x32] - ldrh r1, [r5, 0x30] - subs r1, 0x1 - strh r1, [r5, 0x30] - movs r0, 0x10 - subs r0, r1 - lsls r0, 8 - orrs r1, r0 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x52 - bl SetGpuReg - movs r1, 0x30 - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _0811032E - ldrh r0, [r5, 0x2E] - adds r0, 0x1 - strh r0, [r5, 0x2E] - adds r2, r5, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] -_0811032E: - movs r0, 0xE0 - lsls r0, 2 - adds r2, r0, 0 - ldrh r1, [r5, 0x34] - adds r2, r1 - lsls r1, r2, 16 - asrs r1, 24 - ldrh r0, [r5, 0x26] - subs r0, r1 - strh r0, [r5, 0x26] - movs r0, 0xFF - ands r2, r0 - strh r2, [r5, 0x34] - b _08110360 -_0811034A: - movs r0, 0x50 - movs r1, 0 - bl SetGpuReg - movs r0, 0x52 - movs r1, 0 - bl SetGpuReg - adds r0, r5, 0 - bl DestroyAnimSprite -_08110360: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8110240 - - .align 2, 0 diff --git a/data/event_scripts.s b/data/event_scripts.s index 1bccdbc576..92b0d504d4 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -11,6 +11,7 @@ #include "constants/species.h" #include "constants/trainers.h" #include "constants/vars.h" +#include "constants/weather.h" .include "asm/macros.inc" .include "asm/macros/event.inc" .include "constants/constants.inc" @@ -1087,7 +1088,7 @@ EventScript_2715DE:: @ 82715DE setflag FLAG_HIDE_SOOTOPOLIS_CITY_ARCHIE setflag FLAG_HIDE_SOOTOPOLIS_CITY_MAXIE setflag FLAG_HIDE_ROUTE_111_DESERT_FOSSIL - setflag FLAG_HIDE_ROUTE_111_DESERT_RIVAL + setflag FLAG_HIDE_ROUTE_111_PLAYER_DESCENT setflag FLAG_HIDE_DESERT_UNDERPASS_FOSSIL setflag FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA @@ -1798,11 +1799,11 @@ RustboroCity_EventScript_271ED7:: @ 8271ED7 end RustboroCity_EventScript_271EEF:: @ 8271EEF - setvar VAR_OBJ_GFX_ID_0, 105 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return RustboroCity_EventScript_271EF5:: @ 8271EF5 - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return LavaridgeTown_EventScript_271EFB:: @ 8271EFB @@ -1816,11 +1817,11 @@ Route119_EventScript_271EFB:: @ 8271EFB end LavaridgeTown_EventScript_271F13:: @ 8271F13 - setvar VAR_OBJ_GFX_ID_3, 106 + setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_MAY_MACH_BIKE return LavaridgeTown_EventScript_271F19:: @ 8271F19 - setvar VAR_OBJ_GFX_ID_3, 101 + setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_BRENDAN_MACH_BIKE return EventScript_271F1F:: @ 8271F1F @@ -1832,11 +1833,11 @@ EventScript_271F1F:: @ 8271F1F end EventScript_271F37:: @ 8271F37 - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return EventScript_271F3D:: @ 8271F3D - setvar VAR_OBJ_GFX_ID_0, 105 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return DewfordTown_Gym_EventScript_271F43:: @ 8271F43 @@ -8976,8 +8977,8 @@ BattleFrontier_BattlePikeRandomRoom1_MapScript2_2C3EDE: @ 82C3EDE .2byte 0 BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EE8:: @ 82C3EE8 - setvar VAR_OBJ_GFX_ID_1, 28 - setvar VAR_OBJ_GFX_ID_0, 28 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LINK_RECEPTIONIST + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_LINK_RECEPTIONIST setvar VAR_0x8004, 5 special CallBattlePikeFunction compare VAR_RESULT, 3 diff --git a/data/layouts.inc b/data/layouts.inc index e69d50f3e7..97b3b97c8e 100755 --- a/data/layouts.inc +++ b/data/layouts.inc @@ -389,7 +389,7 @@ .include "data/layouts/DesertUnderpass/layout.inc" .include "data/layouts/BattleFrontier_BattleTowerMultiBattleRoom/layout.inc" .include "data/layouts/BattleFrontier_BattleTowerCorridor2/layout.inc" - .include "data/layouts/UnknownMap_08470BD8/layout.inc" + .include "data/layouts/Route111_NoMirageTower/layout.inc" .include "data/layouts/UnionRoom/layout.inc" .include "data/layouts/SafariZone_Northeast/layout.inc" .include "data/layouts/SafariZone_Southeast/layout.inc" diff --git a/data/layouts/UnknownMap_08470BD8/border.bin b/data/layouts/Route111_NoMirageTower/border.bin similarity index 100% rename from data/layouts/UnknownMap_08470BD8/border.bin rename to data/layouts/Route111_NoMirageTower/border.bin diff --git a/data/layouts/Route111_NoMirageTower/layout.inc b/data/layouts/Route111_NoMirageTower/layout.inc new file mode 100644 index 0000000000..acd390ada8 --- /dev/null +++ b/data/layouts/Route111_NoMirageTower/layout.inc @@ -0,0 +1,14 @@ +Route111_NoMirageTower_MapBorder:: + .incbin "data/layouts/Route111_NoMirageTower/border.bin" + +Route111_NoMirageTower_MapBlockdata:: + .incbin "data/layouts/Route111_NoMirageTower/map.bin" + + .align 2 +Route111_NoMirageTower_Layout:: + .4byte 0x28 + .4byte 0x8C + .4byte Route111_NoMirageTower_MapBorder + .4byte Route111_NoMirageTower_MapBlockdata + .4byte gTileset_General + .4byte gTileset_Mauville diff --git a/data/layouts/UnknownMap_08470BD8/map.bin b/data/layouts/Route111_NoMirageTower/map.bin similarity index 100% rename from data/layouts/UnknownMap_08470BD8/map.bin rename to data/layouts/Route111_NoMirageTower/map.bin diff --git a/data/layouts/UnknownMap_08470BD8/layout.inc b/data/layouts/UnknownMap_08470BD8/layout.inc deleted file mode 100644 index 671127587d..0000000000 --- a/data/layouts/UnknownMap_08470BD8/layout.inc +++ /dev/null @@ -1,15 +0,0 @@ -UnknownMap_08470BD8_MapBorder:: - .incbin "data/layouts/UnknownMap_08470BD8/border.bin" - -UnknownMap_08470BD8_MapBlockdata:: - .incbin "data/layouts/UnknownMap_08470BD8/map.bin" - - .align 2 -UnknownMap_08470BD8_Layout:: - .4byte 0x28 - .4byte 0x8C - .4byte UnknownMap_08470BD8_MapBorder - .4byte UnknownMap_08470BD8_MapBlockdata - .4byte gTileset_General - .4byte gTileset_Mauville - diff --git a/data/layouts_table.inc b/data/layouts_table.inc index bd67fb6f97..ab55784383 100644 --- a/data/layouts_table.inc +++ b/data/layouts_table.inc @@ -391,7 +391,7 @@ gMapLayouts:: .4byte DesertUnderpass_Layout .4byte BattleFrontier_BattleTowerMultiBattleRoom_Layout .4byte BattleFrontier_BattleTowerCorridor2_Layout - .4byte UnknownMap_08470BD8_Layout + .4byte Route111_NoMirageTower_Layout .4byte UnionRoom_Layout .4byte SafariZone_Northeast_Layout .4byte SafariZone_Southeast_Layout diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index 4e25289e65..c6f06631c1 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -24,11 +24,11 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_2574AE:: @ 82574AE return BattleFrontier_BattleArenaBattleRoom_EventScript_2574C6:: @ 82574C6 - setvar VAR_OBJ_GFX_ID_1, 100 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return BattleFrontier_BattleArenaBattleRoom_EventScript_2574CC:: @ 82574CC - setvar VAR_OBJ_GFX_ID_1, 105 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return BattleFrontier_BattleArenaBattleRoom_MapScript2_2574D2: @ 82574D2 diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index 2f6b158230..2c53b7ed65 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -9,7 +9,7 @@ BattleFrontier_BattleArenaLobby_MapScript2_255C41: @ 8255C41 BattleFrontier_BattleArenaLobby_EventScript_255C4B:: @ 8255C4B setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattleArenaLobby_MapScript2_255C55: @ 8255C55 diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 986d450731..ab0736581e 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -27,11 +27,11 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24BCDC:: @ 824BCDC return BattleFrontier_BattleDomeBattleRoom_EventScript_24BCF4:: @ 824BCF4 - setvar VAR_OBJ_GFX_ID_1, 100 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return BattleFrontier_BattleDomeBattleRoom_EventScript_24BCFA:: @ 824BCFA - setvar VAR_OBJ_GFX_ID_1, 105 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return BattleFrontier_BattleDomeBattleRoom_MapScript2_24BD00: @ 824BD00 diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index 3717e24184..35c32c3fa4 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -16,7 +16,7 @@ BattleFrontier_BattlePyramidLobby_MapScript2_2497FB: @ 82497FB BattleFrontier_BattleDomeLobby_EventScript_249805:: @ 8249805 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattleDomeLobby_MapScript2_24980F: @ 824980F diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc index b75c6062a6..6cf1c78177 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc @@ -9,7 +9,7 @@ BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B204: @ 824B204 BattleFrontier_BattleDomePreBattleRoom_EventScript_24B20E:: @ 824B20E setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B218: @ 824B218 diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index c80043792d..794dd9d1e3 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -30,7 +30,7 @@ BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE00: @ 825AE00 BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE0A:: @ 825AE0A setvar VAR_TEMP_1, 1 - hideobjectat 255, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM compare VAR_TEMP_F, 0 goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE24 hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM @@ -39,11 +39,11 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE24:: @ 825AE24 end BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE25:: @ 825AE25 - setvar VAR_OBJ_GFX_ID_F, 100 + setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE2B:: @ 825AE2B - setvar VAR_OBJ_GFX_ID_F, 105 + setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE31: @ 825AE31 diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index 6ee39d5fa4..39d7298469 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -9,7 +9,7 @@ BattleFrontier_BattleFactoryLobby_MapScript2_2583F3: @ 82583F3 BattleFrontier_BattleFactoryLobby_EventScript_2583FD:: @ 82583FD setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattleFactoryLobby_MapScript2_258407: @ 8258407 diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index 9018bbb701..21681b70ac 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -15,7 +15,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259ACF:: @ 8259ACF turnobject 1, 1 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AEA:: @ 8259AEA - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AEF: @ 8259AEF diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 086c55b17d..c09c9e61c7 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -19,13 +19,13 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24F833:: @ 824F833 return BattleFrontier_BattlePalaceBattleRoom_EventScript_24F84B:: @ 824F84B - setvar VAR_OBJ_GFX_ID_1, 100 - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return BattleFrontier_BattlePalaceBattleRoom_EventScript_24F856:: @ 824F856 - setvar VAR_OBJ_GFX_ID_1, 105 - setvar VAR_OBJ_GFX_ID_0, 105 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return BattleFrontier_BattlePalaceBattleRoom_MapScript2_24F861: @ 824F861 diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index 170d14ad8a..56edda8ada 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -9,7 +9,7 @@ BattleFrontier_BattlePalaceLobby_MapScript2_24D789: @ 824D789 BattleFrontier_BattlePalaceLobby_EventScript_24D793:: @ 824D793 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattlePalaceLobby_MapScript2_24D79D: @ 824D79D diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc index 7793fcbc27..1155cd67bd 100644 --- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc @@ -42,7 +42,7 @@ BattleFrontier_BattlePikeCorridor_MapScript2_25C7F7: @ 825C7F7 BattleFrontier_BattlePikeCorridor_EventScript_25C801:: @ 825C801 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattlePikeCorridor_Movement_25C80B: @ 825C80B diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index c2d5c2eb51..70d7f3c6cd 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -16,7 +16,7 @@ BattleFrontier_BattlePikeLobby_MapScript2_25B6F3: @ 825B6F3 BattleFrontier_BattlePikeLobby_EventScript_25B6FD:: @ 825B6FD setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattlePikeLobby_EventScript_25B707:: @ 825B707 diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc index 83031af953..f46760e17b 100644 --- a/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc @@ -34,7 +34,7 @@ BattleFrontier_BattlePikeRandomRoom2_MapScript2_25E3DE: @ 825E3DE BattleFrontier_BattlePikeRandomRoom2_EventScript_25E3E8:: @ 825E3E8 setvar VAR_TEMP_4, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattlePikeRandomRoom2_Text_25E3F2: @ 825E3F2 diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc index 4138eebfd6..4beb26724f 100644 --- a/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc @@ -30,7 +30,7 @@ BattleFrontier_BattlePikeRandomRoom3_MapScript2_25E466: @ 825E466 BattleFrontier_BattlePikeRandomRoom3_EventScript_25E470:: @ 825E470 setvar VAR_TEMP_4, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattlePikeRandomRoom3_MapScript1_25E47A: @ 825E47A diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index a92caecfd0..cac5945167 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -18,7 +18,7 @@ BattleFrontier_BattlePikeThreePathRoom_MapScript2_25C87D: @ 825C87D BattleFrontier_BattlePikeThreePathRoom_EventScript_25C887:: @ 825C887 setvar VAR_TEMP_4, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattlePikeThreePathRoom_EventScript_25C891:: @ 825C891 diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 1ae42279a6..686a1bfb29 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -9,7 +9,7 @@ BattleFrontier_BattlePyramidLobby_MapScript2_250721: @ 8250721 BattleFrontier_BattlePyramidLobby_EventScript_25072B: @ 825072B setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattlePyramidLobby_MapScript2_250735: @ 8250735 diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc index 1dc58363e3..d04fe23f23 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc @@ -19,7 +19,7 @@ BattleFrontier_BattlePyramidTop_MapScript2_2550CE: @ 82550CE BattleFrontier_BattlePyramidTop_EventScript_2550D8:: @ 82550D8 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 compare VAR_TEMP_C, 0 goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_2550F3 setobjectxyperm 2, 0, 0 diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc index d80eda53c2..2699fe9d60 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc @@ -17,11 +17,11 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_248F0F:: @ 8248F0F checkplayergender compare VAR_RESULT, 1 goto_if_eq BattleFrontier_BattleTowerBattleRoom2_EventScript_248F29 - setvar VAR_OBJ_GFX_ID_F, 0 + setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_BRENDAN_NORMAL return BattleFrontier_BattleTowerBattleRoom2_EventScript_248F29:: @ 8248F29 - setvar VAR_OBJ_GFX_ID_F, 89 + setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_MAY_NORMAL return BattleFrontier_BattleTowerBattleRoom2_EventScript_248F2F:: @ 8248F2F @@ -33,7 +33,7 @@ BattleFrontier_BattleTowerBattleRoom2_MapScript2_248F33: @ 8248F33 .2byte 0 BattleFrontier_BattleTowerBattleRoom2_EventScript_248F3D:: @ 8248F3D - hideobjectat 255, MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM2 + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM2 end BattleFrontier_BattleTowerBattleRoom2_MapScript2_248F43: @ 8248F43 diff --git a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc index 287ed902a9..73b14fc2e5 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc @@ -17,11 +17,11 @@ BattleFrontier_BattleTowerCorridor2_EventScript_248D71:: @ 8248D71 checkplayergender compare VAR_RESULT, 1 goto_if_eq BattleFrontier_BattleTowerCorridor2_EventScript_248D8B - setvar VAR_OBJ_GFX_ID_F, 0 + setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_BRENDAN_NORMAL return BattleFrontier_BattleTowerCorridor2_EventScript_248D8B:: @ 8248D8B - setvar VAR_OBJ_GFX_ID_F, 89 + setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_MAY_NORMAL return BattleFrontier_BattleTowerCorridor2_EventScript_248D91:: @ 8248D91 @@ -33,7 +33,7 @@ BattleFrontier_BattleTowerCorridor2_MapScript2_248D95: @ 8248D95 .2byte 0 BattleFrontier_BattleTowerCorridor2_EventScript_248D9F:: @ 8248D9F - hideobjectat 255, MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR2 + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR2 hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR2 hideobjectat 4, MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR2 special sub_8139980 diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc index 79668a939d..0479641a79 100644 --- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc @@ -85,6 +85,6 @@ BattleFrontier_BattleTowerElevator_MapScript2_241A96: @ 8241A96 BattleFrontier_BattleTowerElevator_EventScript_241AA0:: @ 8241AA0 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index fabae0bf91..29315eff5d 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -35,7 +35,7 @@ BattleFrontier_BattleTowerLobby_MapScript2_23E6C9: @ 823E6C9 BattleFrontier_BattleTowerLobby_EventScript_23E6D3:: @ 823E6D3 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattleTowerLobby_MapScript2_23E6DD: @ 823E6DD diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index 42694a2a42..ee63e72a1e 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -25,14 +25,14 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0: @ 8243DB0 end BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243DDA:: @ 8243DDA - setvar VAR_OBJ_GFX_ID_0, 7 - setvar VAR_OBJ_GFX_ID_1, 7 - setvar VAR_OBJ_GFX_ID_2, 7 - setvar VAR_OBJ_GFX_ID_3, 7 - setvar VAR_OBJ_GFX_ID_4, 7 - setvar VAR_OBJ_GFX_ID_5, 7 - setvar VAR_OBJ_GFX_ID_6, 7 - setvar VAR_OBJ_GFX_ID_7, 7 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_BOY_1 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_BOY_1 + setvar VAR_OBJ_GFX_ID_2, EVENT_OBJ_GFX_BOY_1 + setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_BOY_1 + setvar VAR_OBJ_GFX_ID_4, EVENT_OBJ_GFX_BOY_1 + setvar VAR_OBJ_GFX_ID_5, EVENT_OBJ_GFX_BOY_1 + setvar VAR_OBJ_GFX_ID_6, EVENT_OBJ_GFX_BOY_1 + setvar VAR_OBJ_GFX_ID_7, EVENT_OBJ_GFX_BOY_1 setvar VAR_TEMP_1, 1 setvar VAR_TEMP_3, 1 setobjectxyperm 1, 10, 2 @@ -43,7 +43,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E14: @ 8243E14 .2byte 0 BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E1E:: @ 8243E1E - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E23: @ 8243E23 diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index bdc548162d..cb84a51bdf 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -10,7 +10,7 @@ BirthIsland_Exterior_MapScript1_267F25: @ 8267F25 BirthIsland_Exterior_MapScript1_267F29: @ 8267F29 setflag FLAG_0x8D3 - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL setvar VAR_0x4034, 0 setvar VAR_0x4035, 0 call_if_set FLAG_0x1AD, BirthIsland_Exterior_EventScript_267F4E diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index 7e16bbcec6..b08a0e8a3d 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -117,29 +117,29 @@ DewfordTown_EventScript_1E9656:: @ 81E9656 DewfordTown_EventScript_1E9660:: @ 81E9660 call DewfordTown_EventScript_271E95 setobjectpriority 2, MAP_DEWFORD_TOWN, 0 - setobjectpriority 255, MAP_DEWFORD_TOWN, 0 + setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN, 0 applymovement 2, DewfordTown_Movement_1E991D waitmovement 0 removeobject 2 applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Movement_1E9911 waitmovement 0 - hideobjectat 255, MAP_DEWFORD_TOWN + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN call DewfordTown_EventScript_2720A0 applymovement 4, DewfordTown_Movement_1E97A2 applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Movement_1E97A2 waitmovement 0 - showobjectat 255, MAP_ROUTE104 + showobjectat EVENT_OBJ_ID_PLAYER, MAP_ROUTE104 call DewfordTown_EventScript_2720A8 applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Movement_1E9914 waitmovement 0 - showobjectat 255, MAP_ROUTE104 + showobjectat EVENT_OBJ_ID_PLAYER, MAP_ROUTE104 clearflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY clearflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO clearflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN hideobjectat 4, MAP_DEWFORD_TOWN setvar VAR_0x408E, 2 - resetobjectpriority 255, MAP_DEWFORD_TOWN + resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 255, 5, 4 copyvar VAR_0x4096, VAR_0x8008 waitstate @@ -149,19 +149,19 @@ DewfordTown_EventScript_1E9660:: @ 81E9660 DewfordTown_EventScript_1E96E7:: @ 81E96E7 call DewfordTown_EventScript_271E95 setobjectpriority 2, MAP_DEWFORD_TOWN, 0 - setobjectpriority 255, MAP_DEWFORD_TOWN, 1 + setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN, 1 applymovement 2, DewfordTown_Movement_1E991D waitmovement 0 removeobject 2 applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Movement_1E9911 waitmovement 0 - hideobjectat 255, MAP_DEWFORD_TOWN + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN call DewfordTown_EventScript_2720A0 applymovement 4, DewfordTown_Movement_1E9865 applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Movement_1E9865 waitmovement 0 call DewfordTown_EventScript_2720A8 - showobjectat 255, MAP_ROUTE109 + showobjectat EVENT_OBJ_ID_PLAYER, MAP_ROUTE109 applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Movement_1E9918 waitmovement 0 setobjectxyperm 2, 21, 26 @@ -178,7 +178,7 @@ DewfordTown_EventScript_1E96E7:: @ 81E96E7 call_if_set FLAG_0x095, DewfordTown_EventScript_1E9799 closemessage copyvar VAR_0x4096, VAR_0x8008 - resetobjectpriority 255, MAP_DEWFORD_TOWN + resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN resetobjectpriority 2, MAP_ROUTE109 moveobjectoffscreen 2 release diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index d0caaabd98..8da9ae7125 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -13,7 +13,7 @@ EverGrandeCity_ChampionsRoom_MapScript2_228A05: @ 8228A05 .2byte 0 EverGrandeCity_ChampionsRoom_EventScript_228A0F:: @ 8228A0F - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end EverGrandeCity_ChampionsRoom_MapScript2_228A14: @ 8228A14 diff --git a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc index ac768b6ea3..06dd58d264 100644 --- a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc @@ -9,7 +9,7 @@ EverGrandeCity_DrakesRoom_MapScript2_2286AC: @ 82286AC .2byte 0 EverGrandeCity_DrakesRoom_EventScript_2286B6:: @ 82286B6 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end EverGrandeCity_DrakesRoom_MapScript2_2286BB: @ 82286BB diff --git a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc index c369187ad3..641c994a5f 100644 --- a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc +++ b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc @@ -9,7 +9,7 @@ EverGrandeCity_GlaciasRoom_MapScript2_228422: @ 8228422 .2byte 0 EverGrandeCity_GlaciasRoom_EventScript_22842C:: @ 822842C - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end EverGrandeCity_GlaciasRoom_MapScript2_228431: @ 8228431 diff --git a/data/maps/EverGrandeCity_Hall1/scripts.inc b/data/maps/EverGrandeCity_Hall1/scripts.inc index 9609186620..a5b7764d74 100644 --- a/data/maps/EverGrandeCity_Hall1/scripts.inc +++ b/data/maps/EverGrandeCity_Hall1/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall1_MapScript2_22956F: @ 822956F .2byte 0 EverGrandeCity_Hall1_EventScript_229579:: @ 8229579 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end diff --git a/data/maps/EverGrandeCity_Hall2/scripts.inc b/data/maps/EverGrandeCity_Hall2/scripts.inc index 1d76e36952..565d681686 100644 --- a/data/maps/EverGrandeCity_Hall2/scripts.inc +++ b/data/maps/EverGrandeCity_Hall2/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall2_MapScript2_229584: @ 8229584 .2byte 0 EverGrandeCity_Hall2_EventScript_22958E:: @ 822958E - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end diff --git a/data/maps/EverGrandeCity_Hall3/scripts.inc b/data/maps/EverGrandeCity_Hall3/scripts.inc index a100487f52..85d0bb2f6c 100644 --- a/data/maps/EverGrandeCity_Hall3/scripts.inc +++ b/data/maps/EverGrandeCity_Hall3/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall3_MapScript2_229599: @ 8229599 .2byte 0 EverGrandeCity_Hall3_EventScript_2295A3:: @ 82295A3 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end diff --git a/data/maps/EverGrandeCity_Hall4/scripts.inc b/data/maps/EverGrandeCity_Hall4/scripts.inc index a7c7305942..29f56829a8 100644 --- a/data/maps/EverGrandeCity_Hall4/scripts.inc +++ b/data/maps/EverGrandeCity_Hall4/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall4_MapScript2_2295AE: @ 82295AE .2byte 0 EverGrandeCity_Hall4_EventScript_2295B8:: @ 82295B8 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end diff --git a/data/maps/EverGrandeCity_Hall5/scripts.inc b/data/maps/EverGrandeCity_Hall5/scripts.inc index 9ca9991e46..d492c28d26 100644 --- a/data/maps/EverGrandeCity_Hall5/scripts.inc +++ b/data/maps/EverGrandeCity_Hall5/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall5_MapScript2_2295C3: @ 82295C3 .2byte 0 EverGrandeCity_Hall5_EventScript_2295CD:: @ 82295CD - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc index f037f247af..9b9bdb5d61 100644 --- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc +++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc @@ -8,7 +8,7 @@ EverGrandeCity_HallOfFame_MapScript2_229837: @ 8229837 .2byte 0 EverGrandeCity_HallOfFame_EventScript_229841:: @ 8229841 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end EverGrandeCity_HallOfFame_MapScript2_229846: @ 8229846 diff --git a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc index 0e170811bc..84ead37663 100644 --- a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc @@ -9,7 +9,7 @@ EverGrandeCity_PhoebesRoom_MapScript2_228184: @ 8228184 .2byte 0 EverGrandeCity_PhoebesRoom_EventScript_22818E:: @ 822818E - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end EverGrandeCity_PhoebesRoom_MapScript2_228193: @ 8228193 diff --git a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc index ef6b7efa4d..8324e19cf4 100644 --- a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc +++ b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc @@ -30,7 +30,7 @@ EverGrandeCity_SidneysRoom_MapScript2_227F3E: @ 8227F3E .2byte 0 EverGrandeCity_SidneysRoom_EventScript_227F48:: @ 8227F48 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end EverGrandeCity_SidneysRoom_MapScript2_227F4D: @ 8227F4D diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index ca9b449e5f..a7bf0ae62f 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -17,13 +17,13 @@ FallarborTown_BattleTentBattleRoom_EventScript_2008AF:: @ 82008AF return FallarborTown_BattleTentBattleRoom_EventScript_2008C7:: @ 82008C7 - setvar VAR_OBJ_GFX_ID_1, 100 - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return FallarborTown_BattleTentBattleRoom_EventScript_2008D2:: @ 82008D2 - setvar VAR_OBJ_GFX_ID_1, 105 - setvar VAR_OBJ_GFX_ID_0, 105 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return FallarborTown_BattleTentBattleRoom_MapScript2_2008DD: @ 82008DD @@ -260,7 +260,7 @@ FallarborTown_BattleTentBattleRoom_MapScript2_200BB0: @ 8200BB0 .2byte 0 FallarborTown_BattleTentBattleRoom_EventScript_200BBA:: @ 8200BBA - hideobjectat 255, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM hideobjectat 1, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM removeobject 3 setvar VAR_TEMP_1, 1 diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index e7dda07f95..cfc468994f 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -9,7 +9,7 @@ FallarborTown_BattleTentLobby_MapScript2_1FFE71: @ 81FFE71 FallarborTown_BattleTentLobby_EventScript_1FFE7B:: @ 81FFE7B setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end FallarborTown_BattleTentLobby_MapScript2_1FFE85: @ 81FFE85 diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index 512171b378..8661c4c526 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -7,12 +7,12 @@ FarawayIsland_Entrance_MapScript1_267C94: @ 8267C94 end FarawayIsland_Entrance_EventScript_267C98:: @ 8267C98 - setweather 1 + setweather WEATHER_CLOUDS doweather end FarawayIsland_Entrance_EventScript_267C9D:: @ 8267C9D - setweather 0 + setweather WEATHER_NONE doweather end diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index 0760cc05a3..a140093caa 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -26,7 +26,7 @@ JaggedPass_MapScript1_23068B: @ 823068B end JaggedPass_EventScript_230697:: @ 8230697 - setweather 7 + setweather WEATHER_ASH doweather return diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index f7b07d668c..62bcc15dd4 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -363,7 +363,7 @@ LilycoveCity_Harbor_EventScript_21E514:: @ 821E514 compare VAR_FACING, 4 call_if_eq LilycoveCity_Harbor_EventScript_21E610 delay 30 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY setvar VAR_0x8004, 2 call LilycoveCity_Harbor_EventScript_2721E2 return @@ -424,7 +424,7 @@ LilycoveCity_Harbor_EventScript_21E5CC:: @ 821E5CC compare VAR_FACING, 4 call_if_eq LilycoveCity_Harbor_EventScript_21E610 delay 30 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY setvar VAR_0x8004, 2 call LilycoveCity_Harbor_EventScript_2721E2 return diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc index 78a4d9b717..9f589d2e4b 100644 --- a/data/maps/LittlerootTown/scripts.inc +++ b/data/maps/LittlerootTown/scripts.inc @@ -137,7 +137,7 @@ LittlerootTown_EventScript_1E7F17:: @ 81E7F17 waitmovement 0 setflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE setvar VAR_0x4092, 3 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY closedoor VAR_0x8004, VAR_0x8005 waitdooranim clearflag FLAG_HIDE_LITTLEROOT_TOWN_FAT_MAN diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index b68214ddf3..3534047ae7 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -48,11 +48,11 @@ LittlerootTown_ProfessorBirchsLab_MapScript2_1F9D06: @ 81F9D06 .2byte 0 LittlerootTown_ProfessorBirchsLab_EventScript_1F9D40:: @ 81F9D40 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end LittlerootTown_ProfessorBirchsLab_EventScript_1F9D45:: @ 81F9D45 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 addobject 2 addobject 3 turnobject 3, 2 diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc index 751723f7b5..79e6f1a5e6 100644 --- a/data/maps/MauvilleCity/scripts.inc +++ b/data/maps/MauvilleCity/scripts.inc @@ -4,7 +4,7 @@ MauvilleCity_MapScripts:: @ 81DF385 MauvilleCity_MapScript1_1DF38B: @ 81DF38B setflag FLAG_VISITED_MAUVILLE_CITY - clearflag FLAG_0x09D + clearflag FLAG_FORCE_MIRAGE_TOWER_VISIBLE clearflag FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION setflag FLAG_SYS_TV_START clearflag FLAG_0x063 diff --git a/data/maps/MirageTower_1F/scripts.inc b/data/maps/MirageTower_1F/scripts.inc index d7d9619b5b..d8432293f4 100644 --- a/data/maps/MirageTower_1F/scripts.inc +++ b/data/maps/MirageTower_1F/scripts.inc @@ -4,7 +4,7 @@ MirageTower_1F_MapScripts:: @ 823AD01 MirageTower_1F_MapScript1_23AD07: @ 823AD07 setflag FLAG_0x8DC - setflag FLAG_0x09D + setflag FLAG_FORCE_MIRAGE_TOWER_VISIBLE setflag FLAG_LANDMARK_MIRAGE_TOWER end diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc index b64fb23a3c..5476d5e788 100644 --- a/data/maps/MirageTower_4F/scripts.inc +++ b/data/maps/MirageTower_4F/scripts.inc @@ -50,7 +50,7 @@ MirageTower_4F_EventScript_23ADCA:: @ 823ADCA setvar VAR_0x8007, 2 special sub_8139560 waitstate - special sub_81BE994 + special DoMirageTowerCeilingCrumble waitstate setvar VAR_0x40CB, 1 clearflag FLAG_LANDMARK_MIRAGE_TOWER diff --git a/data/maps/MtPyre_Exterior/scripts.inc b/data/maps/MtPyre_Exterior/scripts.inc index 6f078c06c6..fe51946dcb 100644 --- a/data/maps/MtPyre_Exterior/scripts.inc +++ b/data/maps/MtPyre_Exterior/scripts.inc @@ -13,16 +13,16 @@ MtPyre_Exterior_EventScript_231FD8:: @ 8231FD8 return MtPyre_Exterior_EventScript_231FE9:: @ 8231FE9 - setweather 6 + setweather WEATHER_FOG_1 return MtPyre_Exterior_EventScript_231FED:: @ 8231FED - setweather 6 + setweather WEATHER_FOG_1 doweather end MtPyre_Exterior_EventScript_231FF2:: @ 8231FF2 - setweather 2 + setweather WEATHER_SUNNY doweather end diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc index 61b046daf6..28d55d68f7 100644 --- a/data/maps/NavelRock_Top/scripts.inc +++ b/data/maps/NavelRock_Top/scripts.inc @@ -42,7 +42,7 @@ NavelRock_Top_EventScript_26916F:: @ 826916F applymovement EVENT_OBJ_ID_CAMERA, NavelRock_Top_Movement_269230 waitmovement 0 delay 50 - setweather 0 + setweather WEATHER_NONE doweather waitse playmoncry SPECIES_HO_OH, 2 diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index c7d1252088..137731ae21 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -68,7 +68,7 @@ PetalburgCity_EventScript_1DC390:: @ 81DC390 applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_1DC418 waitmovement 0 setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_UNCLE - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY closedoor VAR_0x8004, VAR_0x8005 waitdooranim clearflag FLAG_SPECIAL_FLAG_0x4000 diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index fdc7626f60..f978256242 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -78,7 +78,7 @@ PetalburgCity_Gym_MapScript2_20498B: @ 820498B .2byte 0 PetalburgCity_Gym_EventScript_204995:: @ 8204995 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end PetalburgCity_Gym_MapScript2_20499A: @ 820499A diff --git a/data/maps/PetalburgCity_WallysHouse/scripts.inc b/data/maps/PetalburgCity_WallysHouse/scripts.inc index f2c5683099..7645828ef3 100644 --- a/data/maps/PetalburgCity_WallysHouse/scripts.inc +++ b/data/maps/PetalburgCity_WallysHouse/scripts.inc @@ -8,7 +8,7 @@ PetalburgCity_WallysHouse_MapScript2_204234: @ 8204234 .2byte 0 PetalburgCity_WallysHouse_EventScript_20423E:: @ 820423E - turnobject 255, 4 + turnobject EVENT_OBJ_ID_PLAYER, 4 turnobject 1, 3 end diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index 6ebcdd2533..deea27e74c 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -222,7 +222,7 @@ Route101_EventScript_1EBE16:: @ 81EBE16 setflag FLAG_0x052 fadescreen 1 removeobject 4 - setobjectxy 255, 6, 13 + setobjectxy EVENT_OBJ_ID_PLAYER, 6, 13 applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_2725A4 waitmovement 0 special ChooseStarter diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 6f1971d893..2dfb42d749 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -357,13 +357,13 @@ Route104_EventScript_1ED090:: @ 81ED090 Route104_EventScript_1ED099:: @ 81ED099 setobjectpriority 8, MAP_ROUTE104, 0 - setobjectpriority 255, MAP_ROUTE104, 0 + setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE104, 0 applymovement 8, Route104_Movement_1ED359 waitmovement 0 removeobject 8 applymovement EVENT_OBJ_ID_PLAYER, Route104_Movement_1ED34F waitmovement 0 - hideobjectat 255, MAP_ROUTE104 + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_ROUTE104 call Route104_EventScript_2720A0 goto_if_set FLAG_0x132, Route104_EventScript_1ED0D9 goto_if_unset FLAG_0x132, Route104_EventScript_1ED0EF @@ -399,7 +399,7 @@ Route104_EventScript_1ED139:: @ 81ED139 applymovement EVENT_OBJ_ID_PLAYER, Route104_Movement_1ED353 waitmovement 0 call Route104_EventScript_2720A8 - showobjectat 255, MAP_DEWFORD_TOWN + showobjectat EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN applymovement EVENT_OBJ_ID_PLAYER, Route104_Movement_1ED355 waitmovement 0 setobjectxyperm 2, 12, 8 @@ -414,7 +414,7 @@ Route104_EventScript_1ED139:: @ 81ED139 setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT hideobjectat 7, MAP_ROUTE104 copyvar VAR_0x4096, VAR_0x8008 - resetobjectpriority 255, MAP_ROUTE104 + resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE104 resetobjectpriority 2, MAP_DEWFORD_TOWN moveobjectoffscreen 2 setvar VAR_0x408E, 0 diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index fd62343871..2e588f8130 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -4,7 +4,7 @@ Route109_MapScripts:: @ 81EE75F Route109_EventScript_1EE760:: @ 81EE760 call Route109_EventScript_271E95 setobjectpriority 2, MAP_ROUTE109, 0 - setobjectpriority 255, MAP_ROUTE109, 0 + setobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE109, 0 applymovement 2, Route109_Movement_1EE90B waitmovement 0 removeobject 2 @@ -33,14 +33,14 @@ Route109_EventScript_1EE7C5:: @ 81EE7C5 end Route109_EventScript_1EE7D5:: @ 81EE7D5 - hideobjectat 255, MAP_ROUTE109 + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_ROUTE109 call Route109_EventScript_2720A0 applymovement 1, Route109_Movement_1EE84F applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_1EE84F waitmovement 0 delay 50 call Route109_EventScript_2720A8 - showobjectat 255, MAP_DEWFORD_TOWN + showobjectat EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN applymovement EVENT_OBJ_ID_PLAYER, Route109_Movement_1EE900 waitmovement 0 addobject 4 @@ -56,7 +56,7 @@ Route109_EventScript_1EE7D5:: @ 81EE7D5 msgbox Route109_Text_1E9C1D, MSGBOX_DEFAULT closemessage copyvar VAR_0x4096, VAR_0x8008 - resetobjectpriority 255, MAP_ROUTE109 + resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE109 resetobjectpriority 2, MAP_DEWFORD_TOWN moveobjectoffscreen 2 release diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index 91931a7135..b2aa22f6c1 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -133,7 +133,7 @@ Route110_TrickHouseEntrance_EventScript_269C15:: @ 8269C15 addobject 1 showobjectat 1, MAP_ROUTE110_TRICK_HOUSE_ENTRANCE turnobject 1, 4 - turnobject 255, 3 + turnobject EVENT_OBJ_ID_PLAYER, 3 end Route110_TrickHouseEntrance_EventScript_269C26:: @ 8269C26 diff --git a/data/maps/Route111/events.inc b/data/maps/Route111/events.inc index 46e3b067b8..25e1beeba8 100644 --- a/data/maps/Route111/events.inc +++ b/data/maps/Route111/events.inc @@ -43,7 +43,7 @@ Route111_EventObjects: @ 85291F0 object_event 42, EVENT_OBJ_GFX_ITEM_BALL, 0, 19, 118, 3, MOVEMENT_TYPE_LOOK_AROUND, 1, 1, 0, 0, Route111_EventScript_290DC2, FLAG_ITEM_ROUTE_111_ELIXIR object_event 43, EVENT_OBJ_GFX_HIKER, 0, 14, 56, 3, MOVEMENT_TYPE_FACE_UP_AND_RIGHT, 1, 1, 0, 0, Route111_EventScript_1F119B, 0 object_event 44, EVENT_OBJ_GFX_FOSSIL, 0, 20, 53, 3, MOVEMENT_TYPE_FACE_DOWN, 1, 1, 0, 0, 0x0, FLAG_HIDE_ROUTE_111_DESERT_FOSSIL - object_event 45, EVENT_OBJ_GFX_HIPSTER, 0, 19, 53, 3, MOVEMENT_TYPE_FACE_DOWN, 1, 1, 0, 0, 0x0, FLAG_HIDE_ROUTE_111_DESERT_RIVAL + object_event 45, EVENT_OBJ_GFX_HIPSTER, 0, 19, 53, 3, MOVEMENT_TYPE_FACE_DOWN, 1, 1, 0, 0, 0x0, FLAG_HIDE_ROUTE_111_PLAYER_DESCENT object_event 46, EVENT_OBJ_GFX_FAT_MAN, 0, 19, 101, 3, MOVEMENT_TYPE_FACE_UP, 1, 1, 0, 0, Route111_EventScript_1F11E4, FLAG_HIDE_ROUTE_111_ROCK_SMASH_TIP_GUY Route111_MapWarps: @ 8529640 diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 0149299c17..6b8763fd70 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -39,8 +39,8 @@ Route111_EventScript_1F0CE4:: @ 81F0CE4 Route111_MapScript1_1F0D87: @ 81F0D87 setvar VAR_0x40D6, 0 - special sub_81BE79C - call_if_unset FLAG_0x14E, Route111_EventScript_1F0E3C + special SetMirageTowerVisibility + call_if_unset FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_1F0E3C compare VAR_0x40CB, 1 call_if_eq Route111_EventScript_1F0DC2 compare VAR_0x40CB, 2 @@ -60,11 +60,11 @@ Route111_EventScript_1F0DC2:: @ 81F0DC2 return Route111_EventScript_1F0DDA:: @ 81F0DDA - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return Route111_EventScript_1F0DE0:: @ 81F0DE0 - setvar VAR_OBJ_GFX_ID_0, 105 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return Route111_EventScript_1F0DE6:: @ 81F0DE6 @@ -81,7 +81,7 @@ Route111_EventScript_1F0DE6:: @ 81F0DE6 goto_if_lt Route111_EventScript_1F0E25 Route111_EventScript_1F0E22:: @ 81F0E22 - setweather 8 + setweather WEATHER_SANDSTORM Route111_EventScript_1F0E25:: @ 81F0E25 return @@ -109,7 +109,7 @@ Route111_MapScript2_1F0E46: @ 81F0E46 .2byte 0 Route111_EventScript_1F0E50:: @ 81F0E50 - hideobjectat 255, MAP_LITTLEROOT_TOWN + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_LITTLEROOT_TOWN end Route111_MapScript2_1F0E56: @ 81F0E56 @@ -118,21 +118,21 @@ Route111_MapScript2_1F0E56: @ 81F0E56 Route111_EventScript_1F0E60:: @ 81F0E60 lockall - special sub_81BEB68 + special StartMirageTowerShake waitstate delay 24 playse SE_RU_HYUU addobject 45 - special sub_81BE7F4 + special StartPlayerDescendMirageTower waitstate - showobjectat 255, MAP_LITTLEROOT_TOWN + showobjectat EVENT_OBJ_ID_PLAYER, MAP_LITTLEROOT_TOWN removeobject 45 delay 16 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 delay 16 - special sub_81BEB54 + special StartMirageTowerDisintegration waitstate - special sub_81BEB7C + special StartMirageTowerFossilFallAndSink waitstate setvar VAR_0x40CB, 2 clearflag FLAG_HIDE_DESERT_UNDERPASS_FOSSIL @@ -259,14 +259,14 @@ Route111_Movement_1F0FAE: @ 81F0FAE step_end Route111_EventScript_1F0FB0:: @ 81F0FB0 - setweather 2 + setweather WEATHER_SUNNY fadenewbgm MUS_DOORO_X1 doweather setvar VAR_TEMP_3, 0 end Route111_EventScript_1F0FBD:: @ 81F0FBD - setweather 8 + setweather WEATHER_SANDSTORM fadenewbgm MUS_ASHROAD doweather end @@ -415,7 +415,7 @@ Route111_EventScript_1F119B:: @ 81F119B goto_if_eq Route111_EventScript_1F11C6 compare VAR_0x40CB, 2 goto_if_eq Route111_EventScript_1F11D0 - goto_if_set FLAG_0x14E, Route111_EventScript_1F11DA + goto_if_set FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_1F11DA msgbox Route111_Text_1F1A22, MSGBOX_DEFAULT release end diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc index 816e0aab08..995102fe73 100644 --- a/data/maps/Route112/scripts.inc +++ b/data/maps/Route112/scripts.inc @@ -3,7 +3,7 @@ Route112_MapScripts:: @ 81F1DA8 .byte 0 Route112_MapScript1_1F1DAE: @ 81F1DAE - clearflag FLAG_0x09D + clearflag FLAG_FORCE_MIRAGE_TOWER_VISIBLE setvar VAR_0x40BD, 0 end diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc index 85aa250abe..ac27784da4 100644 --- a/data/maps/Route113/scripts.inc +++ b/data/maps/Route113/scripts.inc @@ -8,7 +8,7 @@ Route113_MapScript1_1F215E: @ 81F215E end Route113_MapScript1_1F2161: @ 81F2161 - clearflag FLAG_0x09D + clearflag FLAG_FORCE_MIRAGE_TOWER_VISIBLE call Route113_EventScript_1F216A end @@ -18,7 +18,7 @@ Route113_EventScript_1F216A:: @ 81F216A goto_if_lt Route113_EventScript_1F2189 compare VAR_TEMP_0, 84 goto_if_gt Route113_EventScript_1F2189 - setweather 7 + setweather WEATHER_ASH return Route113_EventScript_1F2189:: @ 81F2189 diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index ccd77b4cc2..cde0fbbd39 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -76,11 +76,11 @@ Route120_EventScript_1F54D8:: @ 81F54D8 return Route120_EventScript_1F54FF:: @ 81F54FF - setweather 1 + setweather WEATHER_CLOUDS return Route120_EventScript_1F5503:: @ 81F5503 - setweather 2 + setweather WEATHER_SUNNY return Route120_EventScript_1F5507:: @ 81F5507 @@ -92,7 +92,7 @@ Route120_EventScript_1F5507:: @ 81F5507 end Route120_EventScript_1F5523:: @ 81F5523 - setweather 3 + setweather WEATHER_RAIN_LIGHT return Route120_EventScript_1F5527:: @ 81F5527 diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc index 316252a85d..0e21b4c385 100644 --- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc @@ -19,7 +19,7 @@ RustboroCity_DevonCorp_3F_MapScript2_212455: @ 8212455 .2byte 0 RustboroCity_DevonCorp_3F_EventScript_21245F:: @ 821245F - turnobject 255, 4 + turnobject EVENT_OBJ_ID_PLAYER, 4 end RustboroCity_DevonCorp_3F_MapScript2_212464: @ 8212464 diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc index 951f967a3a..212496eef7 100644 --- a/data/maps/SeafloorCavern_Room9/scripts.inc +++ b/data/maps/SeafloorCavern_Room9/scripts.inc @@ -28,7 +28,7 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9 msgbox SeafloorCavern_Room9_Text_23512C, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_ARCHIE, SeafloorCavern_Room9_Text_2351BC msgbox SeafloorCavern_Room9_Text_2351E5, MSGBOX_DEFAULT - setweather 0 + setweather WEATHER_NONE doweather special sub_80B05B4 waitstate diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index 4f56805224..4e7701de6f 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -72,7 +72,7 @@ SkyPillar_Outside_EventScript_239304:: @ 8239304 msgbox SkyPillar_Outside_Text_23950C, MSGBOX_DEFAULT closemessage setflag FLAG_SYS_WEATHER_CTRL - setweather 15 + setweather WEATHER_15 doweather special WaitWeather waitstate diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index 6bc328f76b..74c64d0f2b 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -17,11 +17,11 @@ SlateportCity_BattleTentBattleRoom_EventScript_209976:: @ 8209976 return SlateportCity_BattleTentBattleRoom_EventScript_20998E:: @ 820998E - setvar VAR_OBJ_GFX_ID_1, 100 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return SlateportCity_BattleTentBattleRoom_EventScript_209994:: @ 8209994 - setvar VAR_OBJ_GFX_ID_1, 105 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return SlateportCity_BattleTentBattleRoom_MapScript2_20999A: @ 820999A @@ -30,7 +30,7 @@ SlateportCity_BattleTentBattleRoom_MapScript2_20999A: @ 820999A SlateportCity_BattleTentBattleRoom_EventScript_2099A4:: @ 82099A4 setvar VAR_TEMP_1, 1 - hideobjectat 255, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM hideobjectat 2, MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM end diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 5ae3a5eb7b..4bd28996b2 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -15,7 +15,7 @@ SlateportCity_BattleTentCorridor_EventScript_208E3B:: @ 8208E3B turnobject 1, 1 SlateportCity_BattleTentCorridor_EventScript_208E56:: @ 8208E56 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end SlateportCity_BattleTentCorridor_MapScript2_208E5B: @ 8208E5B diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 42478e2a00..2d00095ba0 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -9,7 +9,7 @@ SlateportCity_BattleTentLobby_MapScript2_20873B: @ 820873B SlateportCity_BattleTentLobby_EventScript_208745:: @ 8208745 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end SlateportCity_BattleTentLobby_MapScript2_20874F: @ 820874F diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index e030036bb3..df573aa7a7 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -235,7 +235,7 @@ SlateportCity_Harbor_EventScript_20CBE9:: @ 820CBE9 compare VAR_FACING, 4 call_if_eq SlateportCity_Harbor_EventScript_20CC37 delay 30 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY setvar VAR_0x8004, 5 call SlateportCity_Harbor_EventScript_2721E2 return diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 38b60e430c..ceff8f4e49 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -117,7 +117,7 @@ SootopolisCity_EventScript_1E583D:: @ 81E583D return SootopolisCity_EventScript_1E583E:: @ 81E583E - setweather 13 + setweather WEATHER_RAIN_HEAVY return SootopolisCity_EventScript_1E5842:: @ 81E5842 @@ -179,11 +179,11 @@ SootopolisCity_EventScript_1E58E5:: @ 81E58E5 end SootopolisCity_EventScript_1E58FC:: @ 81E58FC - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 return SootopolisCity_EventScript_1E5901:: @ 81E5901 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 setvar VAR_0x40CA, 3 return @@ -214,7 +214,7 @@ SootopolisCity_EventScript_1E5946:: @ 81E5946 special RemoveCameraObject delay 60 fadescreenspeed 1, 8 - setweather 15 + setweather WEATHER_15 doweather setvar VAR_0x8004, 0 special sub_813B7D8 @@ -314,7 +314,7 @@ SootopolisCity_EventScript_1E5A82:: @ 81E5A82 special RemoveCameraObject delay 60 fadescreenspeed 1, 8 - setweather 15 + setweather WEATHER_15 doweather setvar VAR_0x8004, 0 special sub_813B7D8 @@ -532,7 +532,7 @@ SootopolisCity_EventScript_1E5C1E:: @ 81E5C1E special sub_8139560 waitstate waitmoncry - setweather 0 + setweather WEATHER_NONE doweather applymovement 11, SootopolisCity_Movement_1E5E5B waitmovement 0 @@ -585,7 +585,7 @@ SootopolisCity_EventScript_1E5CCE:: @ 81E5CCE special sub_8139560 waitstate waitmoncry - setweather 0 + setweather WEATHER_NONE doweather applymovement 11, SootopolisCity_Movement_1E5E5B waitmovement 0 diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 49c893fa83..13b38c835e 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -23,12 +23,12 @@ SouthernIsland_Interior_MapScript1_242A6E: @ 8242A6E end SouthernIsland_Interior_EventScript_242A8A:: @ 8242A8A - setvar VAR_OBJ_GFX_ID_1, 188 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LATIOS setvar VAR_TEMP_4, 408 return SouthernIsland_Interior_EventScript_242A95:: @ 8242A95 - setvar VAR_OBJ_GFX_ID_1, 187 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LATIAS setvar VAR_TEMP_4, 407 return @@ -41,11 +41,11 @@ SouthernIsland_Interior_EventScript_242AA0:: @ 8242AA0 end SouthernIsland_Interior_EventScript_242AB8:: @ 8242AB8 - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return SouthernIsland_Interior_EventScript_242ABE:: @ 8242ABE - setvar VAR_OBJ_GFX_ID_0, 105 + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return SouthernIsland_Interior_EventScript_242AC4:: @ 8242AC4 diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index f62be2f1a0..4d315a158a 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -22,7 +22,7 @@ TrainerHill_Entrance_MapScript1_2680D0: @ 82680D0 special sp194_trainer_tower compare VAR_RESULT, 0 goto_if_eq TrainerHill_Entrance_EventScript_2680FF - setobjectxy 255, 9, 6 + setobjectxy EVENT_OBJ_ID_PLAYER, 9, 6 applymovement EVENT_OBJ_ID_PLAYER, TrainerHill_Entrance_Movement_26837F end diff --git a/data/maps/UnknownMap_25_34/scripts.inc b/data/maps/UnknownMap_25_34/scripts.inc index 5bb734781a..efb82a9075 100644 --- a/data/maps/UnknownMap_25_34/scripts.inc +++ b/data/maps/UnknownMap_25_34/scripts.inc @@ -75,7 +75,7 @@ LinkContestRoom1_EventScript_23B829:: @ 823B829 LinkContestRoom1_EventScript_23B834:: @ 823B834 special sub_80F8B94 - hideobjectat 255, MAP_LITTLEROOT_TOWN + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_LITTLEROOT_TOWN call LinkContestRoom1_EventScript_23BB2B end @@ -449,10 +449,10 @@ LilycoveCity_ContestLobby_EventScript_23BEB6:: @ 823BEB6 return LilycoveCity_ContestLobby_EventScript_23BECE:: @ 823BECE - setvar VAR_OBJ_GFX_ID_3, 100 + setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return LilycoveCity_ContestLobby_EventScript_23BED4:: @ 823BED4 - setvar VAR_OBJ_GFX_ID_3, 105 + setvar VAR_OBJ_GFX_ID_3, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index 21494c8a69..e6a61184ee 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -17,13 +17,13 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_202310:: @ 8202310 return VerdanturfTown_BattleTentBattleRoom_EventScript_202328:: @ 8202328 - setvar VAR_OBJ_GFX_ID_1, 100 - setvar VAR_OBJ_GFX_ID_0, 100 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return VerdanturfTown_BattleTentBattleRoom_EventScript_202333:: @ 8202333 - setvar VAR_OBJ_GFX_ID_1, 105 - setvar VAR_OBJ_GFX_ID_0, 105 + setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL + setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return VerdanturfTown_BattleTentBattleRoom_MapScript2_20233E: @ 820233E diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index 842d6fb1cf..d526c769a9 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -9,7 +9,7 @@ VerdanturfTown_BattleTentLobby_MapScript2_2016DB: @ 82016DB VerdanturfTown_BattleTentLobby_EventScript_2016E5:: @ 82016E5 setvar VAR_TEMP_1, 1 - turnobject 255, 2 + turnobject EVENT_OBJ_ID_PLAYER, 2 end VerdanturfTown_BattleTentLobby_MapScript2_2016EF: @ 82016EF diff --git a/data/party_menu.s b/data/party_menu.s deleted file mode 100644 index fd1bd79482..0000000000 --- a/data/party_menu.s +++ /dev/null @@ -1,649 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 1 -gUnknown_0861500C:: @ 861500C - .2byte 0x0005, 0x000e, 0x0019, 0x0022, 0x0026, 0x0044, 0x0045, 0x0066, 0x0076, 0x0087, 0x008a, 0x0056, 0x0099, 0x009d, 0x00a4, 0x00df - .2byte 0x00cd, 0x00f4, 0x00ad, 0x00c4, 0x00cb, 0x00bd, 0x0008, 0x00cf, 0x00d6, 0x0081, 0x006f, 0x0009, 0x0007, 0x00d2 - - .align 2 -gUnknown_08615048:: @ 8615048 - .4byte 0x00000000, 0x25b4409a, 0x25b4409a, 0x25b4409a, 0x37b4e0ff, 0x37b4e0ff, 0x37b4e0ff, 0x05fdc0fd - .4byte 0x05fdc0fd, 0x05fdc0fd, 0x00000000, 0x00000000, 0x03944490, 0x00000000, 0x00000000, 0x23944092 - .4byte 0x03b44090, 0x03b44090, 0x03b44090, 0x07bc48b8, 0x07bc48b8, 0x03b44090, 0x03b44090, 0x01946098 - .4byte 0x01946098, 0x0fb5c8fd, 0x0fb5c8fd, 0x27b5e0fa, 0x27b5e0fa, 0x05b440b8, 0x05b440b8, 0x3dfce0fd - .4byte 0x05b440b8, 0x05b440b8, 0x3dfce0fd, 0x1df7cffd, 0x1df7cffd, 0x03944098, 0x03944098, 0x1df7ccfd - .4byte 0x1df7ccfd, 0x03944090, 0x03944090, 0x01944092, 0x01944092, 0x0194409a, 0x219440ba, 0x219440ba - .4byte 0x03944090, 0x03944090, 0x01b46098, 0x01b46098, 0x07be4498, 0x07be4498, 0x03fec0fd, 0x23fec0fd - .4byte 0x1ff6e1fd, 0x1ff6e1fd, 0x03944098, 0x03944098, 0x059c4098, 0x05fc41fd, 0x05fcc1fd, 0x19d6cdfd - .4byte 0x19d6cdfd, 0x19d6cdfd, 0x19f4e1fd, 0x19f4e1fd, 0x19f4e1fd, 0x01944092, 0x01944092, 0x0194409a - .4byte 0x019c4092, 0x019c4092, 0x15b5f1f9, 0x15b5f1f9, 0x35b5f1fd, 0x03944098, 0x03944098, 0x03be4c98 - .4byte 0x23feccfd, 0x03954890, 0x03954890, 0x03b6409a, 0x03b44098, 0x03b44098, 0x019c4098, 0x019c4098 - .4byte 0x19f4d088, 0x19f4d088, 0x039c5090, 0x039c5090, 0x01965480, 0x01965480, 0x19d6d5fd, 0x01b67098 - .4byte 0x19d6cdfd, 0x19d6cdfd, 0x21bc409a, 0x21bc409a, 0x03955880, 0x03955880, 0x01975490, 0x01975490 - .4byte 0x19bce0ff, 0x19bce0ff, 0x03b4e1fd, 0x1bf4e1fd, 0x1dffe4ff, 0x01955080, 0x01955080, 0x01bd60ba - .4byte 0x39bde0ff, 0x05bfcffd, 0x0196409a, 0x39fce0fd, 0x039c4090, 0x039c4090, 0x039c4090, 0x039c4090 - .4byte 0x039e4890, 0x039e4c90, 0x19f64dfd, 0x239440b2, 0x01fec5fd, 0x1bf4c8fd, 0x19b4c0fd, 0x219460da - .4byte 0x019c4098, 0x00000000, 0x019c4898, 0x019c4498, 0x00000000, 0x03b44098, 0x03bc4098, 0x03b44898 - .4byte 0x03b44098, 0x039e4c90, 0x019d6098, 0x019d60d8, 0x019d6098, 0x219d60de, 0x03946090, 0x1dffe1fd - .4byte 0x03bc4090, 0x03b44890, 0x03b44090, 0x039c4898, 0x039c4898, 0x3bfcc898, 0x1bfecdfd, 0x3fffffff - .4byte 0x01b440ba, 0x21b440ba, 0x21b440ba, 0x07b54098, 0x27b54098, 0x3fb5e0fd, 0x01fce0ff, 0x21fce0ff - .4byte 0x21fce0ff, 0x3ff5c098, 0x3ff5c098, 0x03b44490, 0x03b44490, 0x0bd5c093, 0x0bd5c093, 0x01944098 - .4byte 0x01944098, 0x03944090, 0x01944890, 0x01944890, 0x07b548fd, 0x05bf4ffd, 0x05bf4cfd, 0x07b74ffd - .4byte 0x07b74ffd, 0x03964c90, 0x03964c90, 0x07944898, 0x1f94c8fd, 0x1f94c8fd, 0x01944092, 0x07fdc0dd - .4byte 0x07fdc0dd, 0x1df7f0fd, 0x05bcc1fd, 0x05944092, 0x05944092, 0x05944092, 0x3ff4cdfd, 0x01944092 - .4byte 0x01944092, 0x03944490, 0x05f5c098, 0x05f5c0fd, 0x03b64498, 0x03b64498, 0x03be4c90, 0x23feccfd - .4byte 0x07964c90, 0x00000000, 0x00000000, 0x03b64c98, 0x059570b8, 0x059570b8, 0x05b76cb8, 0x239464b2 - .4byte 0x05b57098, 0x1df4c9fd, 0x1df4e9fd, 0x079d4892, 0x239440b2, 0x05b56098, 0x219460fa, 0x27fec4b2 - .4byte 0x3ff5c1ff, 0x3ff5e1ff, 0x05b56098, 0x05b56098, 0x05bc6098, 0x05bc6098, 0x05b57098, 0x07b44890 - .4byte 0x07b448d0, 0x03bc40fd, 0x03bc4098, 0x03b460b0, 0x03b444b8, 0x03b444b8, 0x039c4098, 0x05b540b8 - .4byte 0x05b560b8, 0x079e4c90, 0x03b64c98, 0x00000000, 0x03b460fc, 0x03b460fc, 0x01fec5fd, 0x1bf4c8fd - .4byte 0x19b4c0fd, 0x1dffe9fd, 0x05bdcffd, 0x03b64898, 0x03b64098, 0x03be4098, 0x01b46098, 0x01b46098 - .4byte 0x31b4e8fd, 0x03be4c98, 0x03b64c90, 0x07b64592, 0x00000000, 0x00000000, 0x00000000, 0x00000000 - .4byte 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 - .4byte 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 - .4byte 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2bb4c0ff, 0x2bb4c0ff, 0x2bb4c0ff - .4byte 0x03b460ff, 0x3bb4e0ff, 0x3bb4e0ff, 0x05bd4098, 0x05fde0fd, 0x05fde0fd, 0x01b640b8, 0x01b640b8 - .4byte 0x27bd4898, 0x27bd4898, 0x00000000, 0x00000000, 0x03944090, 0x00000000, 0x03944090, 0x019c409a - .4byte 0x19fcc09a, 0x19fcc1ff, 0x0595509a, 0x27b7509e, 0x27b7509e, 0x21b44090, 0x23b44092, 0x21b44490 - .4byte 0x03b440b0, 0x03b440b0, 0x0194409a, 0x29b4c0ff, 0x1fffe5fd, 0x03bc4090, 0x03bc4090, 0x039e4090 - .4byte 0x039e4090, 0x059d4098, 0x059d4098, 0x07bf4c98, 0x07bf4c98, 0x3fffe9fd, 0x01b67490, 0x01b67490 - .4byte 0x1df5f898, 0x01b47098, 0x39f6c5fd, 0x01bc4090, 0x01bc6090, 0x039e4090, 0x21bc40ba, 0x23bc40ba - .4byte 0x039c4090, 0x03be4098, 0x23bc4090, 0x23bc4090, 0x01b46098, 0x03b46098, 0x33b46098, 0x19f4e1fd - .4byte 0x19f4e1fd, 0x03b44898, 0x03b44898, 0x05b56098, 0x05b57098, 0x05bd6098, 0x05bd6098, 0x05bd6098 - .4byte 0x29b4c0fb, 0x29b4c0ff, 0x019c4098, 0x059d5098, 0x07977498, 0x07977498, 0x07bd4098, 0x039e4498 - .4byte 0x1bfec4fd, 0x0fb5c9fd, 0x0fb5c9fd, 0x09fee0ff, 0x1bf6c5fd, 0x1bf6e5fd, 0x03b64498, 0x03b64498 - .4byte 0x00000000, 0x019e4498, 0x19fee5fd, 0x23b6409a, 0x39fce0fd, 0x39fce0fd, 0x39fce0fd, 0x1df5d4b8 - .4byte 0x1df5d4b8, 0x21b4409a, 0x1dffc0fd, 0x1dffe0fd, 0x1dffe0fd, 0x019c4098, 0x03bc4098, 0x03bc4098 - .4byte 0x23be6cba, 0x019e4c98, 0x01be4d98, 0x23b44098, 0x3ffde8ff, 0x01be6098, 0x25b56098, 0x25b56098 - .4byte 0x3dfde8fd, 0x079e4898, 0x0bf6c9fd, 0x0bf6c9fd, 0x01b66098, 0x01b66098, 0x21b4609a, 0x21b460da - .4byte 0x1dfe4c98, 0x1dfe4c98, 0x1dfe4c98, 0x21b46098, 0x25b56098, 0x27b56098, 0x00000000, 0x2ffff098 - .4byte 0x2ffff098, 0x1df7f8fd, 0x0dfff8fd, 0x0df7f8fd, 0x07be6898, 0x3fb7e8ff, 0x23be6898, 0x23be4c98 - .4byte 0x23be4c98, 0x1ffecd98, 0x1bfeecfd, 0x059f4490 - - .align 2 -gUnknown_086156B8:: @ 86156B8 - .4byte 0x000011f0, 0x000021e1, 0x000003c2 - - .align 2 -gUnknown_086156C4:: @ 86156C4 - .4byte BlitBitmapToPartyWindow_Default1, 0x0d280b18, 0x08201420, 0x08081440, 0x08182526, 0x08182535, 0x03302318, 0x1040220c - - .align 2 -gUnknown_086156E4:: @ 86156E4 - .4byte BlitBitmapToPartyWindow_Default2, 0x0d280316, 0x08200c1e, 0x08080c3e, 0x08180c66, 0x08180c75, 0x03300a58, 0x1040044d - - .align 2 -gUnknown_08615704:: @ 8615704 - .4byte 0x32142810, 0x22103432, 0x1c6c1268, 0x19661b88, 0x346c2a68, 0x31663388, 0x4c6c4268, 0x49664b88 - .4byte 0x646c5a68, 0x61666388, 0x7c6c7268, 0x79667b88, 0x22141810, 0x12102432, 0x5a145010, 0x4a105c32 - .4byte 0x1c6c1268, 0x19661b88, 0x3c6c3268, 0x39663b88, 0x5c6c5268, 0x59665b88, 0x7c6c7268, 0x79667b88 - .4byte 0x22141810, 0x12102432, 0x5a145010, 0x4a105c32, 0x246a1a68, 0x21662388, 0x3c6a3268, 0x39663b88 - .4byte 0x5c6a5268, 0x59665b88, 0x746a6a68, 0x71667388, 0x2a142010, 0x1a102c32, 0x2c6a2268, 0x29662b88 - .4byte 0x446a3a68, 0x41664388, 0x72146810, 0x62107432, 0x746a6a68, 0x71667388, 0x8c6a8268, 0x89668b88 - - .align 1 -gUnknown_086157C4:: @ 86157C4 - .incbin "graphics/interface/unknown_6157C4.bin" - - .align 1 -gUnknown_086157E0:: @ 86157E0 - .incbin "graphics/interface/unknown_6157E0.bin" - -gUnknown_086157FC:: @ 86157FC - .byte 0x00, 0x03, 0x02, 0x00 - -gUnknown_08615800:: @ 8615800 - .byte 0x01, 0x06, 0x00, 0x0b, 0x0c, 0x01, 0x02, 0x03, 0x01, 0x08, 0x09, 0x00, 0x01, 0x02, 0x00, 0x00 - - .align 2 -gUnknown_08615810:: @ 8615810 - window_template 0x00, 0x01, 0x03, 0x0a, 0x07, 0x03, 0x0063 - window_template 0x00, 0x0c, 0x01, 0x12, 0x03, 0x04, 0x00a9 - window_template 0x00, 0x0c, 0x04, 0x12, 0x03, 0x05, 0x00df - window_template 0x00, 0x0c, 0x07, 0x12, 0x03, 0x06, 0x0115 - window_template 0x00, 0x0c, 0x0a, 0x12, 0x03, 0x07, 0x014b - window_template 0x00, 0x0c, 0x0d, 0x12, 0x03, 0x08, 0x0181 - window_template 0x02, 0x01, 0x0f, 0x1c, 0x04, 0x0e, 0x01df - null_window_template - - .align 2 -gUnknown_08615850:: @ 8615850 - window_template 0x00, 0x01, 0x01, 0x0a, 0x07, 0x03, 0x0063 - window_template 0x00, 0x01, 0x08, 0x0a, 0x07, 0x04, 0x00a9 - window_template 0x00, 0x0c, 0x01, 0x12, 0x03, 0x05, 0x00ef - window_template 0x00, 0x0c, 0x05, 0x12, 0x03, 0x06, 0x0125 - window_template 0x00, 0x0c, 0x09, 0x12, 0x03, 0x07, 0x015b - window_template 0x00, 0x0c, 0x0d, 0x12, 0x03, 0x08, 0x0191 - window_template 0x02, 0x01, 0x0f, 0x1c, 0x04, 0x0e, 0x01df - null_window_template - - .align 2 -gUnknown_08615890:: @ 8615890 - window_template 0x00, 0x01, 0x01, 0x0a, 0x07, 0x03, 0x0063 - window_template 0x00, 0x01, 0x08, 0x0a, 0x07, 0x04, 0x00a9 - window_template 0x00, 0x0c, 0x02, 0x12, 0x03, 0x05, 0x00ef - window_template 0x00, 0x0c, 0x05, 0x12, 0x03, 0x06, 0x0125 - window_template 0x00, 0x0c, 0x09, 0x12, 0x03, 0x07, 0x015b - window_template 0x00, 0x0c, 0x0c, 0x12, 0x03, 0x08, 0x0191 - window_template 0x02, 0x01, 0x0f, 0x1c, 0x04, 0x0e, 0x01df - null_window_template - - .align 2 -gUnknown_086158D0:: @ 86158D0 - window_template 0x00, 0x01, 0x02, 0x0a, 0x07, 0x03, 0x0063 - window_template 0x00, 0x0c, 0x03, 0x12, 0x03, 0x05, 0x00a9 - window_template 0x00, 0x0c, 0x06, 0x12, 0x03, 0x06, 0x00df - window_template 0x02, 0x01, 0x0b, 0x0a, 0x07, 0x04, 0x0115 - window_template 0x02, 0x0c, 0x0c, 0x12, 0x03, 0x07, 0x016b - window_template 0x02, 0x0c, 0x0f, 0x12, 0x03, 0x08, 0x01a1 - null_window_template - - .align 2 -gUnknown_08615908:: @ 8615908 - window_template 0x00, 0x18, 0x11, 0x06, 0x02, 0x03, 0x01c7 - - .align 2 -gUnknown_08615910:: @ 8615910 - window_template 0x00, 0x18, 0x12, 0x06, 0x02, 0x03, 0x01c7 - - .align 2 -gUnknown_08615918:: @ 8615918 - window_template 0x00, 0x18, 0x10, 0x06, 0x02, 0x03, 0x01d3 - - .align 2 -gUnknown_08615920:: @ 8615920 - window_template 0x02, 0x01, 0x11, 0x15, 0x02, 0x0f, 0x024f - - .align 2 -gUnknown_08615928:: @ 8615928 - window_template 0x02, 0x01, 0x11, 0x10, 0x02, 0x0f, 0x0279 - - .align 2 -gUnknown_08615930:: @ 8615930 - window_template 0x02, 0x01, 0x11, 0x14, 0x02, 0x0f, 0x0299 - - .align 2 -gUnknown_08615938:: @ 8615938 - window_template 0x02, 0x01, 0x11, 0x12, 0x02, 0x0f, 0x0299 - - .align 2 -gUnknown_08615940:: @ 8615940 - window_template 0x02, 0x01, 0x11, 0x10, 0x02, 0x0f, 0x0299 - - .align 2 -gUnknown_08615948:: @ 8615948 - window_template 0x02, 0x01, 0x0f, 0x14, 0x04, 0x0f, 0x0299 - - .align 2 -gUnknown_08615950:: @ 8615950 - window_template 0x02, 0x17, 0x0d, 0x06, 0x06, 0x0e, 0x039d - - .align 2 -gUnknown_08615958:: @ 8615958 - window_template 0x02, 0x15, 0x0d, 0x08, 0x06, 0x0e, 0x039d - - .align 2 -gUnknown_08615960:: @ 8615960 - window_template 0x02, 0x13, 0x0b, 0x0a, 0x08, 0x0e, 0x02e9 - - .align 2 -gUnknown_08615968:: @ 8615968 - window_template 0x02, 0x15, 0x09, 0x05, 0x04, 0x0e, 0x02e9 - - .align 2 -gUnknown_08615970:: @ 8615970 - window_template 0x02, 0x13, 0x01, 0x0a, 0x0b, 0x0e, 0x02e9 - window_template 0x02, 0x02, 0x0f, 0x1b, 0x04, 0x0e, 0x01df - window_template 0x02, 0x00, 0x0d, 0x12, 0x03, 0x0c, 0x039d - -gUnknown_08615988:: @ 8615988 - .byte 0x18, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x1a, 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x20, 0x21 - .byte 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x28, 0x3b, 0x3c, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3d, 0x0f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x2e, 0x2f, 0x2f, 0x2f - .byte 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30 - -gUnknown_086159CE:: @ 86159CE - .byte 0x18, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x1a, 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x20, 0x21 - .byte 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x28, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x2a, 0x0f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x2e, 0x2f, 0x2f, 0x2f - .byte 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30 - -gUnknown_08615A14:: @ 8615A14 - .byte 0x2b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2d, 0x31, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x34, 0x35, 0x33, 0x33, 0x33 - .byte 0x33, 0x33, 0x33, 0x36, 0x37, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x39 - -gUnknown_08615A4A:: @ 8615A4A - .byte 0x2b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2d, 0x31, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21 - .byte 0x21, 0x21, 0x21, 0x32, 0x37, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x39 - -gUnknown_08615A80:: @ 8615A80 - .byte 0x15, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x17, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x1f, 0x25, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27 - -gUnknown_08615AB6:: @ 8615AB6 - .byte 0x0b, 0x0c - -gUnknown_08615AB8:: @ 8615AB8 - .byte 0x09, 0x0a - -gUnknown_08615ABA:: @ 8615ABA - .byte 0x04, 0x05, 0x06 - -gUnknown_08615ABD:: @ 8615ABD - .byte 0x01, 0x07, 0x08 - -gUnknown_08615AC0:: @ 8615AC0 - .byte 0x01, 0x0b, 0x0c - -gUnknown_08615AC3:: @ 8615AC3 - .byte 0x3b, 0x3c - -gUnknown_08615AC5:: @ 8615AC5 - .byte 0x4b, 0x4c - -gUnknown_08615AC7:: @ 8615AC7 - .byte 0x39, 0x3a - -gUnknown_08615AC9:: @ 8615AC9 - .byte 0x49, 0x4a - -gUnknown_08615ACB:: @ 8615ACB - .byte 0x59, 0x5a - -gUnknown_08615ACD:: @ 8615ACD - .byte 0x34, 0x35, 0x36 - -gUnknown_08615AD0:: @ 8615AD0 - .byte 0x44, 0x45, 0x46 - -gUnknown_08615AD3:: @ 8615AD3 - .byte 0x54, 0x55, 0x56 - -gUnknown_08615AD6:: @ 8615AD6 - .byte 0x74, 0x75, 0x76 - -gUnknown_08615AD9:: @ 8615AD9 - .byte 0x84, 0x85, 0x86 - -gUnknown_08615ADC:: @ 8615ADC - .byte 0x94, 0x95, 0x96 - -gUnknown_08615ADF:: @ 8615ADF - .byte 0x64, 0x65, 0x66 - -gUnknown_08615AE2:: @ 8615AE2 - .byte 0x31, 0x37, 0x38 - -gUnknown_08615AE5:: @ 8615AE5 - .byte 0x41, 0x47, 0x48 - -gUnknown_08615AE8:: @ 8615AE8 - .byte 0x51, 0x57, 0x58 - -gUnknown_08615AEB:: @ 8615AEB - .byte 0x61, 0x67, 0x68 - -gUnknown_08615AEE:: @ 8615AEE - .byte 0xa1, 0xa7, 0xa8 - -gUnknown_08615AF1:: @ 8615AF1 - .byte 0x11, 0x1b, 0x1c - - .align 2 -gUnknown_08615AF4:: @ 8615AF4 - .4byte gUnknown_085E9E43 - .4byte gUnknown_085EA010 - .4byte gUnknown_085EA02A - .4byte gUnknown_085E9E55 - .4byte gUnknown_085E9E64 - .4byte gUnknown_085E9E79 - .4byte gUnknown_085E9E8F - .4byte gUnknown_085E9EBC - .4byte gUnknown_085E9ED4 - .4byte gUnknown_085E9EE9 - .4byte gUnknown_085E9FDB - .4byte gUnknown_085EA046 - .4byte gUnknown_085EA05B - .4byte gUnknown_085E9F01 - .4byte gUnknown_085E9F58 - .4byte gUnknown_085E9F6F - .4byte gUnknown_085E9F81 - .4byte gUnknown_085E9F90 - .4byte gUnknown_085E9FA7 - .4byte gUnknown_085E9FC2 - .4byte gText_EmptyString2 - .4byte gUnknown_085E9EA6 - .4byte gUnknown_085E9F16 - .4byte gUnknown_085E9F2A - .4byte gUnknown_085E9F42 - .4byte gUnknown_085E9FF9 - .4byte gUnknown_085EA073 - -gUnknown_08615B60:: @ 8615B60 - .4byte gUnknown_085EA091 - .4byte gUnknown_085EA099 - .4byte gUnknown_085EA09E - .4byte gUnknown_085EA0A4 - .4byte gUnknown_085EA0AB - .4byte gUnknown_085EA0E7 - .4byte gUnknown_085EA0B1 - .4byte gUnknown_085EA0B6 - .4byte gUnknown_085EA0BF - .4byte gUnknown_085EA0C5 - .4byte gUnknown_085EA0CF - .4byte gUnknown_085EA0D7 - .4byte gUnknown_085EA0DC - - .align 1 -gUnknown_08615B94:: @ 8615B94 - .2byte 0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071 - .2byte 0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068 - .2byte 0x0073, 0x015f, 0x0035, 0x00bc, 0x00c9, 0x007e, 0x013d, 0x014c, 0x0103, 0x0107, 0x0122, 0x009c, 0x00d5, 0x00a8, 0x00d3, 0x011d - .2byte 0x0121, 0x013b, 0x000f, 0x0013, 0x0039, 0x0046, 0x0094, 0x00f9, 0x007f, 0x0123 - - .align 2 -gUnknown_08615C08:: @ 8615C08 - .4byte gText_Summary5, sub_81B37FC - .4byte gText_Switch2, brm_switch - .4byte gText_Cancel2, brm_cancel_1 - .4byte gText_Item, sub_81B4134 - .4byte gMenuText_Give, sub_81B4198 - .4byte gText_Take, sub_81B4724 - .4byte gText_Mail, sub_81B4A08 - .4byte gText_Take2, brm_take_2 - .4byte gText_Read2, sub_81B4A6C - .4byte gText_Cancel2, sub_81B4D78 - .4byte gText_Shift, brm_shift_sendout - .4byte gText_SendOut, brm_shift_sendout - .4byte gText_Enter, sub_81B4E8C - .4byte gText_NoEntry, sub_81B4FA8 - .4byte gText_Store, sub_81B50AC - .4byte gText_Register, sub_81B50C8 - .4byte gText_Trade4, brm_trade_1 - .4byte gText_Trade4, sub_81B52E4 - .4byte gMenuText_Toss, sub_81B47E0 - .4byte gMoveNames+195, sub_81B5470 - .4byte gMoveNames+1924, sub_81B5470 - .4byte gMoveNames+3237, sub_81B5470 - .4byte gMoveNames+910, sub_81B5470 - .4byte gMoveNames+741, sub_81B5470 - .4byte gMoveNames+247, sub_81B5470 - .4byte gMoveNames+3783, sub_81B5470 - .4byte gMoveNames+1651, sub_81B5470 - .4byte gMoveNames+1300, sub_81B5470 - .4byte gMoveNames+1183, sub_81B5470 - .4byte gMoveNames+3770, sub_81B5470 - .4byte gMoveNames+2704, sub_81B5470 - .4byte gMoveNames+1755, sub_81B5470 - .4byte gMoveNames+2990, sub_81B5470 - -gUnknown_08615D10:: @ 8615D10 - .byte 0x00, 0x01, 0x02 - -gUnknown_08615D13:: @ 8615D13 - .byte 0x0a, 0x00, 0x02 - -gUnknown_08615D16:: @ 8615D16 - .byte 0x0b, 0x00, 0x02 - -gUnknown_08615D19:: @ 8615D19 - .byte 0x00, 0x02 - -gUnknown_08615D1B:: @ 8615D1B - .byte 0x0c, 0x00, 0x02 - -gUnknown_08615D1E:: @ 8615D1E - .byte 0x0d, 0x00, 0x02 - -gUnknown_08615D21:: @ 8615D21 - .byte 0x0e, 0x00, 0x02 - -gUnknown_08615D24:: @ 8615D24 - .byte 0x04, 0x05, 0x09 - -gUnknown_08615D27:: @ 8615D27 - .byte 0x08, 0x07, 0x09 - -gUnknown_08615D2A:: @ 8615D2A - .byte 0x0f, 0x00, 0x02 - -gUnknown_08615D2D:: @ 8615D2D - .byte 0x10, 0x00, 0x02 - -gUnknown_08615D30:: @ 8615D30 - .byte 0x11, 0x00, 0x02 - -gUnknown_08615D33:: @ 8615D33 - .byte 0x05, 0x12, 0x02 - - .align 2 -gUnknown_08615D38:: @ 8615D38 - .4byte NULL, gUnknown_08615D10, gUnknown_08615D13, gUnknown_08615D16, gUnknown_08615D1B, gUnknown_08615D1E, gUnknown_08615D21, gUnknown_08615D19 - .4byte gUnknown_08615D24, gUnknown_08615D27, gUnknown_08615D2A, gUnknown_08615D2D, gUnknown_08615D30, gUnknown_08615D33 - -gUnknown_08615D70:: @ 8615D70 - .byte 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 - - .align 1 -gUnknown_08615D7E:: @ 8615D7E - .2byte 0x000f, 0x0094, 0x00f9, 0x0046, 0x0039, 0x0013, 0x0123, 0x007f, 0x0064, 0x005b, 0x0122, 0x00d0, 0x0087, 0x00e6, 0x000e - - .align 2 -gUnknown_08615D9C:: @ 8615D9C - .4byte SetUpFieldMove_Cut, 0x00000007 - .4byte SetUpFieldMove_Flash, 0x0000000d - .4byte SetUpFieldMove_RockSmash, 0x0000000d - .4byte SetUpFieldMove_Strength, 0x0000000d - .4byte sub_81B5820, 0x00000008 - .4byte sub_81B5884, 0x0000000d - .4byte sub_81B5974, 0x0000000d - .4byte hm_prepare_waterfall, 0x0000000d - .4byte SetUpFieldMove_Teleport, 0x0000000d - .4byte SetUpFieldMove_Dig, 0x0000000d - .4byte SetUpFieldMove_SecretPower, 0x0000000d - .4byte SetUpFieldMove_SoftBoiled, 0x00000010 - .4byte SetUpFieldMove_SoftBoiled, 0x00000010 - .4byte SetUpFieldMove_SweetScent, 0x0000000d - - .align 2 -gUnknown_08615E0C:: @ 8615E0C - .4byte gText_NotPkmnOtherTrainerWants - .4byte gText_ThatIsntAnEgg - .4byte gText_PkmnCantBeTradedNow - .4byte gText_PkmnCantBeTradedNow - .4byte gText_OtherTrainersPkmnCantBeTraded - .4byte gText_EggCantBeTradedNow - .4byte gText_OtherTrainerCantAcceptPkmn - .4byte gText_CantTradeWithTrainer - .4byte gText_CantTradeWithTrainer - - .align 2 -gUnknown_08615E30:: @ 8615E30 - .incbin "graphics/interface/hold_icons.4bpp" - - .align 2 -gUnknown_08615E70:: @ 8615E70 - .incbin "graphics/interface/hold_icons.gbapal" - - .align 2 -gOamData_8615E90:: @ 8615E90 - .2byte 0x0000, 0x0000, 0x0400, 0x0000 - - .align 2 -gSpriteAnim_8615E98:: @ 8615E98 - .2byte 0x0000, 0x0001, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615EA0:: @ 8615EA0 - .2byte 0x0001, 0x0001, 0xffff, 0x0000 - - .align 2 -gSpriteAnimTable_8615EA8:: @ 8615EA8 - .4byte gSpriteAnim_8615E98 - .4byte gSpriteAnim_8615EA0 - - .align 2 -gUnknown_08615EB0:: @ 8615EB0 - obj_tiles gUnknown_08615E30, 0x40, 55120 - - .align 2 -gUnknown_08615EB8:: @ 8615EB8 - obj_pal gUnknown_08615E70, 55120 - - .align 2 -gSpriteTemplate_8615EC0:: @ 8615EC0 - spr_template 0xd750, 0xd750, gOamData_8615E90, gSpriteAnimTable_8615EA8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - - .align 2 -gOamData_8615ED8:: @ 8615ED8 - .2byte 0x0000, 0x8000, 0x0400, 0x0000 - - .align 2 -gSpriteAnim_8615EE0:: @ 8615EE0 - .2byte 0x0000, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615EE8:: @ 8615EE8 - .2byte 0x0010, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnimTable_8615EF0:: @ 8615EF0 - .4byte gSpriteAnim_8615EE0 - .4byte gSpriteAnim_8615EE8 - - .align 2 -gUnknown_08615EF8:: @ 8615EF8 - obj_tiles gPartyMenuPokeball_Gfx, 0x400, 1200 - - .align 2 -gUnknown_08615F00:: @ 8615F00 - obj_pal gPartyMenuPokeball_Pal, 1200 - - .align 2 -gSpriteTemplate_8615F08:: @ 8615F08 - spr_template 0x04b0, 0x04b0, gOamData_8615ED8, gSpriteAnimTable_8615EF0, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - - .align 2 -gOamData_8615F20:: @ 8615F20 - .2byte 0x0000, 0x4000, 0x0800, 0x0000 - - .align 2 -gSpriteAnim_8615F28:: @ 8615F28 - .2byte 0x0000, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615F30:: @ 8615F30 - .2byte 0x0004, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615F38:: @ 8615F38 - .2byte 0x0008, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615F40:: @ 8615F40 - .2byte 0x000c, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615F48:: @ 8615F48 - .2byte 0x0010, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615F50:: @ 8615F50 - .2byte 0x0014, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnimTable_8615F58:: @ 8615F58 - .4byte gSpriteAnim_8615F28 - .4byte gSpriteAnim_8615F30 - .4byte gSpriteAnim_8615F38 - .4byte gSpriteAnim_8615F40 - .4byte gSpriteAnim_8615F48 - .4byte gSpriteAnim_8615F50 - - .align 2 -gUnknown_08615F70:: @ 8615F70 - obj_tiles gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1 - - .align 2 -gSpriteTemplate_8615F78:: @ 8615F78 - spr_template 0x04b1, 0x04b0, gOamData_8615F20, gSpriteAnimTable_8615F58, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - - .align 2 -gOamData_8615F90:: @ 8615F90 - .2byte 0x4000, 0x4000, 0x0400, 0x0000 - - .align 2 -gSpriteAnim_8615F98:: @ 8615F98 - .2byte 0x0000, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615FA0:: @ 8615FA0 - .2byte 0x0004, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615FA8:: @ 8615FA8 - .2byte 0x0008, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615FB0:: @ 8615FB0 - .2byte 0x000c, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615FB8:: @ 8615FB8 - .2byte 0x0010, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615FC0:: @ 8615FC0 - .2byte 0x0014, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615FC8:: @ 8615FC8 - .2byte 0x0018, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnim_8615FD0:: @ 8615FD0 - .2byte 0x001c, 0x0000, 0xffff, 0x0000 - - .align 2 -gSpriteAnimTable_8615FD8:: @ 8615FD8 - .4byte gSpriteAnim_8615F98 - .4byte gSpriteAnim_8615FA0 - .4byte gSpriteAnim_8615FA8 - .4byte gSpriteAnim_8615FB0 - .4byte gSpriteAnim_8615FB8 - .4byte gSpriteAnim_8615FC0 - .4byte gSpriteAnim_8615FC8 - .4byte gSpriteAnim_8615FD0 - - .align 2 -gUnknown_08615FF8:: @ 8615FF8 - obj_tiles gStatusGfx_Icons, 0x400, 1202 - - .align 2 -gUnknown_08616000:: @ 8616000 - obj_pal gStatusPal_Icons, 1202 - - .align 2 -gSpriteTemplate_8616008:: @ 8616008 - spr_template 0x04b2, 0x04b2, gOamData_8615F90, gSpriteAnimTable_8615FD8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - -gUnknown_08616020:: @ 8616020 - .byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00 - - .align 2 -gUnknown_08616028:: @ 8616028 - .4byte gText_HP4 - .4byte gText_Attack3 - .4byte gText_Defense3 - .4byte gText_SpAtk4 - .4byte gText_SpDef4 - .4byte gText_Speed2 - - .align 1 -gUnknown_08616040:: @ 8616040 - .2byte 0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071 - .2byte 0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068 - .2byte 0x0073, 0x015f, 0x0035, 0x00bc, 0x00c9, 0x007e, 0x013d, 0x014c, 0x0103, 0x0107, 0x0122, 0x009c, 0x00d5, 0x00a8, 0x00d3, 0x011d - .2byte 0x0121, 0x013b, 0x000f, 0x0013, 0x0039, 0x0046, 0x0094, 0x00f9, 0x007f, 0x0123 - diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 12b63ce059..b73d7e1fac 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -466,7 +466,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276FBD:: @ 8276FBD waitdooranim applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27735A waitmovement 0 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY closedoor 9, 1 waitdooranim release @@ -570,7 +570,7 @@ OldaleTown_PokemonCenter_2F_EventScript_27713A:: @ 827713A waitdooranim applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27735A waitmovement 0 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY closedoor 9, 1 waitdooranim release @@ -645,7 +645,7 @@ OldaleTown_PokemonCenter_2F_EventScript_27724C:: @ 827724C waitdooranim applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27735A waitmovement 0 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY closedoor 9, 1 waitdooranim release @@ -1043,7 +1043,7 @@ OldaleTown_PokemonCenter_2F_EventScript_27759F:: @ 827759F waitdooranim applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27735A waitmovement 0 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY closedoor 5, 1 waitdooranim special sub_8018090 @@ -1378,7 +1378,7 @@ OldaleTown_PokemonCenter_2F_EventScript_277B3A:: @ 8277B3A waitdooranim applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27735A waitmovement 0 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY closedoor 9, 1 waitdooranim release @@ -1587,7 +1587,7 @@ MossdeepCity_GameCorner_1F_EventScript_277E0E:: @ 8277E0E closemessage applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_GameCorner_1F_Movement_277360 waitmovement 0 - hideobjectat 255, MAP_PETALBURG_CITY + hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY release waitstate end diff --git a/data/specials.inc b/data/specials.inc index 318d272d58..fed1b6641e 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -419,9 +419,9 @@ gSpecials:: @ 81DBA64 def_special ShouldTryGetTrainerScript def_special ShowMapNamePopup def_special ShowMapNamePopup - def_special sub_81BE994 - def_special sub_81BE79C - def_special sub_81BE7F4 + def_special DoMirageTowerCeilingCrumble + def_special SetMirageTowerVisibility + def_special StartPlayerDescendMirageTower def_special sub_81398C0 def_special IsWirelessAdapterConnected def_special BerryBlenderLinkBecomeLeader @@ -491,9 +491,9 @@ gSpecials:: @ 81DBA64 def_special sub_813AFC8 def_special sub_813B1D0 def_special CreateObedientEnemyMon - def_special sub_81BEB54 - def_special sub_81BEB68 - def_special sub_81BEB7C + def_special StartMirageTowerDisintegration + def_special StartMirageTowerShake + def_special StartMirageTowerFossilFallAndSink def_special ChangeBoxPokemonNickname def_special get_unknown_box_id def_special sub_813B21C diff --git a/include/battle.h b/include/battle.h index 3c51a80d77..52ceb5939f 100644 --- a/include/battle.h +++ b/include/battle.h @@ -488,7 +488,7 @@ struct BattleStruct u8 wildVictorySong; u8 dynamicMoveType; u8 wrappedBy[MAX_BATTLERS_COUNT]; - u16 assistPossibleMoves[PARTY_SIZE * 4]; // Each of mons can know max 4 moves. + u16 assistPossibleMoves[PARTY_SIZE * MAX_MON_MOVES]; // Each of mons can know max 4 moves. u8 focusPunchBattlerId; u8 battlerPreventingSwitchout; u8 moneyMultiplier; diff --git a/include/battle_anim.h b/include/battle_anim.h index a8138b4ff8..248e2a9f57 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -58,7 +58,7 @@ void DestroyAnimSprite(struct Sprite *sprite); void DestroyAnimVisualTask(u8 taskId); void DestroyAnimSoundTask(u8 taskId); bool8 IsBattlerSpriteVisible(u8 battlerId); -void sub_80A438C(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible); +void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible); bool8 IsContest(void); s8 BattleAnimAdjustPanning(s8 pan); s8 BattleAnimAdjustPanning2(s8 pan); @@ -78,8 +78,8 @@ void sub_80A6450(struct Sprite *sprite); void SetAverageBattlerPositions(u8 battlerId, bool8 respectMonPicOffsets, s16 *x, s16 *y); void DestroySpriteAndMatrix(struct Sprite *sprite); void AnimTranslateLinearSimple(struct Sprite *sprite); -void InitSpritePosToAnimAttacker(struct Sprite *sprite, u8 a2); -void InitSpritePosToAnimTarget(struct Sprite *sprite, bool8 a2); +void InitSpritePosToAnimAttacker(struct Sprite *sprite, bool8 respectMonPicOffsets); +void InitSpritePosToAnimTarget(struct Sprite *sprite, bool8 respectMonPicOffsets); void StartAnimLinearTranslation(struct Sprite *sprite); void InitAnimArcTranslation(struct Sprite *sprite); bool8 AnimTranslateLinear(struct Sprite *sprite); @@ -149,6 +149,7 @@ u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority void sub_80A749C(struct Sprite *sprite); void sub_80A6814(u8 taskId); void sub_80A8610(struct Sprite *sprite); +void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); enum { diff --git a/include/bg.h b/include/bg.h index ffcaf43edf..1366923f1f 100644 --- a/include/bg.h +++ b/include/bg.h @@ -13,14 +13,16 @@ struct BGCntrlBitfield // for the I/O registers enum { - BG_CTRL_ATTR_VISIBLE = 1, - BG_CTRL_ATTR_CHARBASEINDEX = 2, - BG_CTRL_ATTR_MAPBASEINDEX = 3, - BG_CTRL_ATTR_SCREENSIZE = 4, - BG_CTRL_ATTR_PALETTEMODE = 5, - BG_CTRL_ATTR_PRIORITY = 6, - BG_CTRL_ATTR_MOSAIC = 7, - BG_CTRL_ATTR_WRAPAROUND = 8, + BG_ATTR_CHARBASEINDEX = 1, + BG_ATTR_MAPBASEINDEX, + BG_ATTR_SCREENSIZE, + BG_ATTR_PALETTEMODE, + BG_ATTR_MOSAIC, + BG_ATTR_WRAPAROUND, + BG_ATTR_PRIORITY, + BG_ATTR_METRIC, + BG_ATTR_TYPE, + BG_ATTR_BASETILE, }; struct BgTemplate @@ -38,8 +40,6 @@ void ResetBgs(void); u8 GetBgMode(void); void ResetBgControlStructs(void); void Unused_ResetBgControlStruct(u8 bg); -void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenSize, u8 paletteMode, u8 priority, u8 mosaic, u8 wraparound); -u16 GetBgControlAttribute(u8 bg, u8 attributeId); u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode); void SetTextModeAndHideBgs(void); bool8 IsInvalidBg(u8 bg); diff --git a/include/constants/flags.h b/include/constants/flags.h index c21affd617..3509b6a3b3 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -162,7 +162,7 @@ #define FLAG_0x09A 0x9A #define FLAG_0x09B 0x9B #define FLAG_0x09C 0x9C -#define FLAG_0x09D 0x9D +#define FLAG_FORCE_MIRAGE_TOWER_VISIBLE 0x9D #define FLAG_0x09E 0x9E #define FLAG_0x09F 0x9F #define FLAG_0x0A0 0xA0 @@ -344,7 +344,7 @@ #define FLAG_0x14B 0x14B #define FLAG_0x14C 0x14C #define FLAG_0x14D 0x14D -#define FLAG_0x14E 0x14E +#define FLAG_MIRAGE_TOWER_VISIBLE 0x14E #define FLAG_0x14F 0x14F// PLAYER CHOSE CLAW FOSSIL #define FLAG_0x150 0x150// PLAYER CHOSE ROOT FOSSIL #define FLAG_0x151 0x151 @@ -804,7 +804,7 @@ #define FLAG_HIDE_TRICK_HOUSE_ENTRANCE_MAN 0x368 #define FLAG_HIDE_LILYCOVE_CONTEST_HALL_POKEBLOCK_EXPERT 0x369 #define FLAG_HIDE_DESERT_UNDERPASS_FOSSIL 0x36A -#define FLAG_HIDE_ROUTE_111_DESERT_RIVAL 0x36B +#define FLAG_HIDE_ROUTE_111_PLAYER_DESCENT 0x36B #define FLAG_HIDE_ROUTE_111_DESERT_FOSSIL 0x36C #define FLAG_HIDE_MT_CHIMNEY_TRAINERS 0x36D #define FLAG_HIDE_RUSTURF_TUNNEL_AQUA_GRUNT 0x36E diff --git a/include/field_specials.h b/include/field_specials.h index 5adc7f3cb8..7c29ecbadb 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -15,7 +15,13 @@ bool32 sub_8138168(void); bool32 sub_81381B0(void); bool32 sub_81381F8(void); bool32 CountSSTidalStep(u16 delta); +u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y); void sub_813A128(void); void sub_813A878(u8 a0); +u8 sub_813BADC(u8 a0); +bool8 sub_813B9C0(void); +void SetShoalItemFlag(u16 v0); +void UpdateFrontierManiac(u16 a0); +void UpdateFrontierGambler(u16 a0); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/fldeff.h b/include/fldeff.h new file mode 100644 index 0000000000..99758fdb5b --- /dev/null +++ b/include/fldeff.h @@ -0,0 +1,61 @@ +#ifndef GUARD_FLDEFF_H +#define GUARD_FLDEFF_H + +// cut +bool8 SetUpFieldMove_Cut(void); +bool8 FldEff_UseCutOnGrass(void); +bool8 FldEff_UseCutOnTree(void); +bool8 FldEff_CutGrass(void); +void sub_80D423C(s16 x, s16 y); +void sub_80D42B8(s16 x, s16 y); + +extern const struct SpritePalette gFieldEffectObjectPaletteInfo6; + +// groundshake +bool8 sub_81BE66C(void); +void sub_81BE6AC(void); +void sub_81BE6B8(void); +void sub_81BE72C(void); +void sub_81BE79C(void); +void sub_81BE7F4(void); +void sub_81BE994(void); + +// escalator +void sub_80E1558(u8 var); +void sub_80E1570(void); +bool8 sub_80E1584(void); + +// soft-boiled +bool8 SetUpFieldMove_SoftBoiled(void); +void sub_81615A8(u8 taskId); +void sub_8161560(u8 taskId); + +// flash +bool8 SetUpFieldMove_Flash(void); +void c2_change_map(void); +bool8 GetMapPairFadeToType(u8 a1, u8 a2); +bool8 GetMapPairFadeFromType(u8 a1, u8 a2); + +// strength +bool8 SetUpFieldMove_Strength(void); +bool8 sub_8145E2C(void); + +// sweet scent +bool8 SetUpFieldMove_SweetScent(void); +bool8 FldEff_SweetScent(void); + +// teleport +bool8 SetUpFieldMove_Teleport(void); +bool8 FldEff_UseTeleport(void); + +// dig +bool8 SetUpFieldMove_Dig(void); +bool8 FldEff_UseDig(void); + +// rock smash +bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId); +u8 oei_task_add(void); +bool8 SetUpFieldMove_RockSmash(void); +bool8 FldEff_UseRockSmash(void); + +#endif // GUARD_FLDEFF_H diff --git a/include/fldeff_cut.h b/include/fldeff_cut.h deleted file mode 100644 index c89d3b6ca2..0000000000 --- a/include/fldeff_cut.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef GUARD_FLDEFF_CUT_H -#define GUARD_FLDEFF_CUT_H - -extern const struct SpritePalette gFieldEffectObjectPaletteInfo6; - -bool8 SetUpFieldMove_Cut(void); -bool8 FldEff_UseCutOnGrass(void); -bool8 FldEff_UseCutOnTree(void); -bool8 FldEff_CutGrass(void); -void sub_80D423C(s16 x, s16 y); -void sub_80D42B8(s16 x, s16 y); - -#endif // GUARD_FLDEFF_CUT_H diff --git a/include/fldeff_groundshake.h b/include/fldeff_groundshake.h deleted file mode 100644 index c1629f9bd3..0000000000 --- a/include/fldeff_groundshake.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef GUARD_FLDEFF_GROUNDSHAKE_H -#define GUARD_FLDEFF_GROUNDSHAKE_H - -void sub_81BE72C(void); - -#endif // GUARD_FLDEFF_GROUNDSHAKE_H diff --git a/include/fldeff_softboiled.h b/include/fldeff_softboiled.h deleted file mode 100755 index abb3c7913e..0000000000 --- a/include/fldeff_softboiled.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef GUARD_FLDEFF_SOFTBOILED_H -#define GUARD_FLDEFF_SOFTBOILED_H - -void sub_81615A8(u8 taskId); -void sub_8161560(u8 taskId); - -#endif // GUARD_FLDEFF_SOFTBOILED_H diff --git a/include/graphics.h b/include/graphics.h index cc829b5a93..5cb6354aa4 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4720,6 +4720,10 @@ extern const u32 gBattleAnimBackgroundTilemap_17[]; extern const u32 gBattleAnimBackgroundTilemap_20[]; extern const u32 gBattleAnimBackgroundTilemap_21[]; +extern const u32 gUnknown_08C1D0AC[]; +extern const u32 gUnknown_08C1D1E8[]; +extern const u32 gUnknown_08C1D210[]; + extern const u32 gUnknown_08C20668[]; extern const u32 gUnknown_08C20684[]; extern const u32 gBattleStatMask_Gfx[]; @@ -4793,4 +4797,11 @@ extern const u32 gCableCarDoor_Gfx[]; extern const u32 gCableCarCord_Gfx[]; extern const u16 gCableCar_Pal[]; +// Party menu +extern const u32 gPartyMenuPokeball_Gfx[]; +extern const u32 gPartyMenuPokeballSmall_Gfx[]; +extern const u32 gStatusPal_Icons[]; +extern const u32 gPartyMenuPokeball_Pal[]; +extern const u32 gStatusPal_Icons[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/mirage_tower.h b/include/mirage_tower.h new file mode 100644 index 0000000000..f98b016b2e --- /dev/null +++ b/include/mirage_tower.h @@ -0,0 +1,8 @@ +#ifndef GUARD_MIRAGE_TOWER_H +#define GUARD_MIRAGE_TOWER_H + +void ClearMirageTowerPulseBlendEffect(void); +void ClearMirageTowerPulseBlend(void); +void TryStartMirageTowerPulseBlendEffect(void); + +#endif // GUARD_MIRAGE_TOWER_H diff --git a/include/party_menu.h b/include/party_menu.h index 46f71c1656..ae7c414a8e 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -48,7 +48,7 @@ extern MainCallback gPostMenuFieldCallback; extern u8 gSelectedOrderFromParty[4]; extern u8 gUnknown_0203CF00[3]; -extern const u16 gUnknown_0861500C[]; // tutor table +extern const u16 gTutorMoves[]; void sub_81B0FCC(u8 slot, u8 b); bool8 IsMultiBattle(void); @@ -64,11 +64,7 @@ u8 sub_81B205C(struct Pokemon *mon); void display_pokemon_menu_message(u32 stringID); void sub_81B47E0(u8 taskId); bool8 FieldCallback_PrepareFadeInFromMenu(void); -bool8 sub_81B5820(void); -bool8 sub_81B5884(void); void sub_81B58A8(void); -bool8 hm_prepare_waterfall(void); -bool8 sub_81B5974(void); void LoadHeldItemIcons(void); void sub_81B5D4C(u8 *a, u8 *b, u8 c); void sub_81B617C(void); @@ -77,8 +73,8 @@ void sub_81B67C8(u8 taskId, TaskFunc task); void dp05_ether(u8 taskId, TaskFunc task); void dp05_pp_up(u8 taskId, TaskFunc task); u16 ItemIdToBattleMoveId(u16 item); -bool8 sub_81B6D14(u16 move); -bool8 pokemon_has_move(struct Pokemon *mon, u16 move); +bool8 IsMoveHm(u16 move); +bool8 MonKnowsMove(struct Pokemon *mon, u16 move); void sub_81B6DC4(u8 taskId, TaskFunc task); void dp05_rare_candy(u8 taskId, TaskFunc task); void sub_81B79E8(u8 taskId, TaskFunc task); diff --git a/include/rom6.h b/include/rom6.h deleted file mode 100644 index 8b133e56ef..0000000000 --- a/include/rom6.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef GUARD_ROM6_H -#define GUARD_ROM6_H - -void OpenPokeblockCase(u8, void(void)); -u8 GetLeadMonIndex(void); -u8 GetSSTidalLocation(u8 *grp, u8 *num, s16 *x, s16 *y); -void sub_813BADC(bool8); -bool8 sub_813B9C0(void); -void UpdateMirageRnd(u16 days); -void UpdateBirchState(u16 days); -void UpdateFrontierManiac(u16 days); -void UpdateFrontierGambler(u16 days); -void SetShoalItemFlag(u16 days); - -bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId); -u8 oei_task_add(void); - -#endif //GUARD_ROM6_H diff --git a/include/roulette_util.h b/include/roulette_util.h index 964f551fe8..7f0b9cbf84 100644 --- a/include/roulette_util.h +++ b/include/roulette_util.h @@ -1,45 +1,44 @@ #ifndef GUARD_ROULETTE_UTIL_H #define GUARD_ROULETTE_UTIL_H -struct InnerStruct203CF18_3 +struct PulseBlendSettings { - u16 unk0; - u16 unk2; - u8 unk4; - u8 unk5; - u8 unk6; - s8 unk7_0:4; - s8 unk7_4:2; - s8 unk7_6:1; + u16 blendColor; + u16 paletteOffset; + u8 numColors; + u8 delay; + u8 numFadeCycles; + s8 maxBlendCoeff:4; + s8 fadeType:2; + s8 restorePaletteOnUnload:1; s8 unk7_7:1; }; -struct InnerStruct203CF18_2 +struct PulseBlendPalette { - u8 unk0; - u8 unk1_0:4; - u8 unk1_4:1; + u8 paletteSelector; + u8 blendCoeff:4; + u8 fadeDirection:1; s8 unk1_5:1; - s8 unk1_6:1; - u32 unk1_7:1; - u8 unk2; - u8 unk3; - struct InnerStruct203CF18_3 unk4; + s8 available:1; + u32 inUse:1; + u8 delayCounter; + u8 fadeCycleCounter; + struct PulseBlendSettings pulseBlendSettings; }; -// structures -struct InnerStruct203CF18 +struct PulseBlend { - u16 unk0; - struct InnerStruct203CF18_2 unk4[16]; + u16 usedPulseBlendPalettes; + struct PulseBlendPalette pulseBlendPalettes[16]; }; -int sub_8151B68(struct InnerStruct203CF18 *, const struct InnerStruct203CF18_3 *); -void sub_8151B3C(struct InnerStruct203CF18 *); -void sub_8151CA8(struct InnerStruct203CF18 *, u16, u8); -void sub_8151C50(struct InnerStruct203CF18 *, u16, u8); -void sub_8151D28(struct InnerStruct203CF18 *, u16, u8); -void sub_8151E50(struct InnerStruct203CF18 *); +int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *); +void InitPulseBlend(struct PulseBlend *); +void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); +void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); +void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); +void UpdatePulseBlend(struct PulseBlend *); void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height); void sub_8152058(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height); diff --git a/include/strings.h b/include/strings.h index 706fd116ec..64222cddb7 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1921,4 +1921,67 @@ extern const u8 gDaycareText_GetAlong[]; extern const u8 gDaycareText_DontLikeOther[]; extern const u8 gDaycareText_PlayOther[]; +// party menu +extern const u8 gUnknown_085E9E43[]; +extern const u8 gUnknown_085EA010[]; +extern const u8 gUnknown_085EA02A[]; +extern const u8 gUnknown_085E9E55[]; +extern const u8 gUnknown_085E9E64[]; +extern const u8 gUnknown_085E9E79[]; +extern const u8 gUnknown_085E9E8F[]; +extern const u8 gUnknown_085E9EBC[]; +extern const u8 gUnknown_085E9ED4[]; +extern const u8 gUnknown_085E9EE9[]; +extern const u8 gUnknown_085E9FDB[]; +extern const u8 gUnknown_085EA046[]; +extern const u8 gUnknown_085EA05B[]; +extern const u8 gUnknown_085E9F01[]; +extern const u8 gUnknown_085E9F58[]; +extern const u8 gUnknown_085E9F6F[]; +extern const u8 gUnknown_085E9F81[]; +extern const u8 gUnknown_085E9F90[]; +extern const u8 gUnknown_085E9FA7[]; +extern const u8 gUnknown_085E9FC2[]; +extern const u8 gUnknown_085E9EA6[]; +extern const u8 gUnknown_085E9F16[]; +extern const u8 gUnknown_085E9F2A[]; +extern const u8 gUnknown_085E9F42[]; +extern const u8 gUnknown_085E9FF9[]; +extern const u8 gUnknown_085EA073[]; +extern const u8 gUnknown_085EA091[]; +extern const u8 gUnknown_085EA099[]; +extern const u8 gUnknown_085EA09E[]; +extern const u8 gUnknown_085EA0A4[]; +extern const u8 gUnknown_085EA0AB[]; +extern const u8 gUnknown_085EA0E7[]; +extern const u8 gUnknown_085EA0B1[]; +extern const u8 gUnknown_085EA0B6[]; +extern const u8 gUnknown_085EA0BF[]; +extern const u8 gUnknown_085EA0C5[]; +extern const u8 gUnknown_085EA0CF[]; +extern const u8 gUnknown_085EA0D7[]; +extern const u8 gUnknown_085EA0DC[]; +extern const u8 gText_Take[]; +extern const u8 gText_Mail[]; +extern const u8 gText_Take2[]; +extern const u8 gText_Read2[]; +extern const u8 gText_Cancel2[]; +extern const u8 gText_Shift[]; +extern const u8 gText_SendOut[]; +extern const u8 gText_Enter[]; +extern const u8 gText_NoEntry[]; +extern const u8 gText_Store[]; +extern const u8 gText_Register[]; +extern const u8 gText_Trade4[]; +extern const u8 gText_Summary5[]; +extern const u8 gText_Switch2[]; +extern const u8 gText_Item[]; +extern const u8 gText_NotPkmnOtherTrainerWants[]; +extern const u8 gText_ThatIsntAnEgg[]; +extern const u8 gText_PkmnCantBeTradedNow[]; +extern const u8 gText_OtherTrainersPkmnCantBeTraded[]; +extern const u8 gText_EggCantBeTradedNow[]; +extern const u8 gText_OtherTrainerCantAcceptPkmn[]; +extern const u8 gText_CantTradeWithTrainer[]; + #endif //GUARD_STRINGS_H diff --git a/ld_script.txt b/ld_script.txt index 8b0ea03178..66d4077404 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -165,12 +165,12 @@ SECTIONS { src/fight.o(.text); src/poison.o(.text); asm/flying.o(.text); - asm/psychic.o(.text); + src/psychic.o(.text); src/bug.o(.text); src/rock.o(.text); src/ghost.o(.text); src/dragon.o(.text); - asm/dark.o(.text); + src/dark.o(.text); src/ground.o(.text); src/normal.o(.text); src/battle_anim_utility_funcs.o(.text); @@ -193,7 +193,8 @@ SECTIONS { src/trader.o(.text); src/starter_choose.o(.text); src/wallclock.o(.text); - src/rom6.o(.text); + src/fldeff_rocksmash.o(.text); + src/fldeff_dig.o(.text); src/pokeblock.o(.text); src/fldeff_flash.o(.text); src/post_battle_event_funcs.o(.text); @@ -282,8 +283,7 @@ SECTIONS { src/multiboot.o(.text); src/unk_81BAD84.o(.text); src/battle_controller_player_partner.o(.text); - src/fldeff_groundshake.o(.text); - src/fossil_specials.o(.text); + src/mirage_tower.o(.text); src/berry_fix_program.o(.text); src/pokemon_summary_screen.o(.text); src/unk_pokedex_area_screen_helper.o(.text); @@ -583,13 +583,12 @@ SECTIONS { src/list_menu.o(.rodata); src/save_location.o(.rodata); src/item_icon.o(.rodata); - data/party_menu.o(.rodata); + src/party_menu.o(.rodata); src/battle_tent.o(.rodata); src/unk_text_util_2.o(.rodata); src/unk_81BAD84.o(.rodata); src/battle_controller_player_partner.o(.rodata); - src/fossil_specials.o(.rodata); - src/fldeff_groundshake.o(.rodata); + src/mirage_tower.o(.rodata); src/berry_fix_program.o(.rodata); src/pokemon_summary_screen.o(.rodata); src/unk_pokedex_area_screen_helper.o(.rodata); diff --git a/src/apprentice.c b/src/apprentice.c index 8817261bfe..09afdb5ba7 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -1,5 +1,6 @@ #include "global.h" #include "apprentice.h" +#include "battle.h" #include "battle_tower.h" #include "data2.h" #include "event_data.h" @@ -1298,7 +1299,7 @@ static u16 sub_819FF98(u8 arg0) knownMovesCount = j; i = 0; - while (i < 5) + while (i <= MAX_MON_MOVES) { if (Random() % 2 == 0 || var_24 == TRUE) { @@ -1317,7 +1318,7 @@ static u16 sub_819FF98(u8 arg0) if (knownMovesCount < 5) j = 0; else - j = knownMovesCount - 4; + j = knownMovesCount - MAX_MON_MOVES; for (; j < knownMovesCount; j++) { @@ -1331,7 +1332,7 @@ static u16 sub_819FF98(u8 arg0) } else { - if (knownMovesCount < 5) + if (knownMovesCount <= MAX_MON_MOVES) { var_24 = TRUE; continue; @@ -1343,7 +1344,7 @@ static u16 sub_819FF98(u8 arg0) u8 learnsetId = Random() % (knownMovesCount - 4); moveId = learnset[learnsetId].move; valid = TRUE; - for (j = knownMovesCount - 4; j < knownMovesCount; j++) + for (j = knownMovesCount - MAX_MON_MOVES; j < knownMovesCount; j++) { if ((learnset[j].move) == moveId) { @@ -1400,8 +1401,8 @@ static void GetLatestLearnedMoves(u16 species, u16 *moves) } knownMovesCount = i; - if (knownMovesCount > 4) - knownMovesCount = 4; + if (knownMovesCount > MAX_MON_MOVES) + knownMovesCount = MAX_MON_MOVES; for (j = 0; j < knownMovesCount; j++) moves[j] = learnset[(i - 1) - j].move; @@ -1447,7 +1448,7 @@ static void sub_81A0390(u8 arg0) { gSaveBlock2Ptr->apprentices[0].party[i].species = 0; gSaveBlock2Ptr->apprentices[0].party[i].item = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) gSaveBlock2Ptr->apprentices[0].party[i].moves[j] = 0; } diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index ed38590086..da8a33c0c7 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -352,7 +352,7 @@ void BattleAI_SetupAIData(u8 defaultScoreMoves) AI_THINKING_STRUCT->aiFlags = flags; // Conditional score reset, unlike Ruby. - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (defaultScoreMoves & 1) AI_THINKING_STRUCT->score[i] = 100; @@ -365,7 +365,7 @@ void BattleAI_SetupAIData(u8 defaultScoreMoves) moveLimitations = CheckMoveLimitations(gActiveBattler, 0, 0xFF); // Ignore moves that aren't possible to use. - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBitTable[i] & moveLimitations) AI_THINKING_STRUCT->score[i] = 0; @@ -436,7 +436,7 @@ static u8 ChooseMoveOrAction_Singles(void) currentMoveArray[0] = AI_THINKING_STRUCT->score[0]; consideredMoveArray[0] = 0; - for (i = 1; i < 4; i++) + for (i = 1; i < MAX_MON_MOVES; i++) { if (gBattleMons[sBattler_AI].moves[i] != MOVE_NONE) { @@ -471,7 +471,7 @@ static u8 ChooseMoveOrAction_Doubles(void) s32 mostViableMovesNo; s16 mostMovePoints; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (i == sBattler_AI || gBattleMons[i].hp == 0) { @@ -518,7 +518,7 @@ static u8 ChooseMoveOrAction_Doubles(void) mostViableMovesScores[0] = AI_THINKING_STRUCT->score[0]; mostViableMovesIndices[0] = 0; mostViableMovesNo = 1; - for (j = 1; j < 4; j++) + for (j = 1; j < MAX_MON_MOVES; j++) { if (gBattleMons[sBattler_AI].moves[j] != 0) { @@ -553,7 +553,7 @@ static u8 ChooseMoveOrAction_Doubles(void) mostViableTargetsArray[0] = 0; mostViableTargetsNo = 1; - for (i = 1; i < 4; i++) + for (i = 1; i < MAX_MON_MOVES; i++) { if (mostMovePoints == bestMovePointsForTarget[i]) { @@ -606,7 +606,7 @@ static void BattleAI_DoAIProcessing(void) { AI_THINKING_STRUCT->movesetIndex++; - if (AI_THINKING_STRUCT->movesetIndex < 4 && !(AI_THINKING_STRUCT->aiAction & AI_ACTION_DO_NOT_ATTACK)) + if (AI_THINKING_STRUCT->movesetIndex < MAX_MON_MOVES && !(AI_THINKING_STRUCT->aiAction & AI_ACTION_DO_NOT_ATTACK)) AI_THINKING_STRUCT->aiState = AIState_SettingUp; else AI_THINKING_STRUCT->aiState++; @@ -622,7 +622,7 @@ static void RecordLastUsedMoveByTarget(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i] == gLastMoves[gBattlerTarget]) break; @@ -658,7 +658,7 @@ void ClearBattlerMoveHistory(u8 battlerId) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) BATTLE_HISTORY->usedMoves[battlerId].moves[i] = MOVE_NONE; } @@ -1247,14 +1247,14 @@ static void BattleAICmd_if_user_has_attacking_move(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[sBattler_AI].moves[i] != 0 && gBattleMoves[gBattleMons[sBattler_AI].moves[i]].power != 0) break; } - if (i == 4) + if (i == MAX_MON_MOVES) gAIScriptPtr += 5; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1); @@ -1264,14 +1264,14 @@ static void BattleAICmd_if_user_has_no_attacking_moves(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[sBattler_AI].moves[i] != 0 && gBattleMoves[gBattleMons[sBattler_AI].moves[i]].power != 0) break; } - if (i != 4) + if (i != MAX_MON_MOVES) gAIScriptPtr += 5; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1); @@ -1359,7 +1359,7 @@ static void BattleAICmd_get_how_powerful_move_is(void) *(&gBattleStruct->dynamicMoveType) = 0; gMoveResultFlags = 0; - for (checkedMove = 0; checkedMove < 4; checkedMove++) + for (checkedMove = 0; checkedMove < MAX_MON_MOVES; checkedMove++) { for (i = 0; sDiscouragedPowerfulMoveEffects[i] != 0xFFFF; i++) { @@ -1383,13 +1383,13 @@ static void BattleAICmd_get_how_powerful_move_is(void) } } - for (checkedMove = 0; checkedMove < 4; checkedMove++) + for (checkedMove = 0; checkedMove < MAX_MON_MOVES; checkedMove++) { if (moveDmgs[checkedMove] > moveDmgs[AI_THINKING_STRUCT->movesetIndex]) break; } - if (checkedMove == 4) + if (checkedMove == MAX_MON_MOVES) AI_THINKING_STRUCT->funcResult = MOVE_MOST_POWERFUL; // Is the most powerful. else AI_THINKING_STRUCT->funcResult = MOVE_NOT_MOST_POWERFUL; // Not the most powerful. @@ -1636,7 +1636,7 @@ static void BattleAICmd_get_highest_type_effectiveness(void) gMoveResultFlags = 0; AI_THINKING_STRUCT->funcResult = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { gCurrentMove = gBattleMons[sBattler_AI].moves[i]; if (gCurrentMove != MOVE_NONE) @@ -1943,12 +1943,12 @@ static void BattleAICmd_if_has_move(void) switch (gAIScriptPtr[1]) { case AI_USER: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[sBattler_AI].moves[i] == *movePtr) break; } - if (i == 4) + if (i == MAX_MON_MOVES) gAIScriptPtr += 8; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4); @@ -1961,25 +1961,25 @@ static void BattleAICmd_if_has_move(void) } else { - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[sBattler_AI ^ BIT_FLANK].moves[i] == *movePtr) break; } } - if (i == 4) + if (i == MAX_MON_MOVES) gAIScriptPtr += 8; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4); break; case AI_TARGET: case AI_TARGET_PARTNER: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i] == *movePtr) break; } - if (i == 4) + if (i == MAX_MON_MOVES) gAIScriptPtr += 8; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4); @@ -1996,24 +1996,24 @@ static void BattleAICmd_if_doesnt_have_move(void) { case AI_USER: case AI_USER_PARTNER: // UB: no separate check for user partner. - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[sBattler_AI].moves[i] == *movePtr) break; } - if (i != 4) + if (i != MAX_MON_MOVES) gAIScriptPtr += 8; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4); break; case AI_TARGET: case AI_TARGET_PARTNER: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i] == *movePtr) break; } - if (i != 4) + if (i != MAX_MON_MOVES) gAIScriptPtr += 8; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4); @@ -2029,24 +2029,24 @@ static void BattleAICmd_if_has_move_with_effect(void) { case AI_USER: case AI_USER_PARTNER: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[sBattler_AI].moves[i] != 0 && gBattleMoves[gBattleMons[sBattler_AI].moves[i]].effect == gAIScriptPtr[2]) break; } - if (i == 4) + if (i == MAX_MON_MOVES) gAIScriptPtr += 7; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3); break; case AI_TARGET: case AI_TARGET_PARTNER: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gBattlerTarget].moves[i] != 0 && gBattleMoves[BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i]].effect == gAIScriptPtr[2]) break; } - if (i == 4) + if (i == MAX_MON_MOVES) gAIScriptPtr += 7; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3); @@ -2062,24 +2062,24 @@ static void BattleAICmd_if_doesnt_have_move_with_effect(void) { case AI_USER: case AI_USER_PARTNER: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if(gBattleMons[sBattler_AI].moves[i] != 0 && gBattleMoves[gBattleMons[sBattler_AI].moves[i]].effect == gAIScriptPtr[2]) break; } - if (i != 4) + if (i != MAX_MON_MOVES) gAIScriptPtr += 7; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3); break; case AI_TARGET: case AI_TARGET_PARTNER: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i] && gBattleMoves[BATTLE_HISTORY->usedMoves[gBattlerTarget].moves[i]].effect == gAIScriptPtr[2]) break; } - if (i != 4) + if (i != MAX_MON_MOVES) gAIScriptPtr += 7; else gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3); diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index ba4c612c5f..a046a0e2cc 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -49,7 +49,7 @@ static bool8 ShouldSwitchIfWonderGuard(void) return FALSE; // Check if Pokemon has a super effective move. - for (opposingBattler = GetBattlerAtPosition(opposingPosition), i = 0; i < 4; i++) + for (opposingBattler = GetBattlerAtPosition(opposingPosition), i = 0; i < MAX_MON_MOVES; i++) { move = gBattleMons[gActiveBattler].moves[i]; if (move != MOVE_NONE) @@ -89,7 +89,7 @@ static bool8 ShouldSwitchIfWonderGuard(void) if (i == gBattlerPartyIndexes[gActiveBattler]) continue; - for (opposingBattler = GetBattlerAtPosition(opposingPosition), j = 0; j < 4; j++) + for (opposingBattler = GetBattlerAtPosition(opposingPosition), j = 0; j < MAX_MON_MOVES; j++) { move = GetMonData(&party[i], MON_DATA_MOVE1 + j); if (move != MOVE_NONE) @@ -256,7 +256,7 @@ static bool8 HasSuperEffectiveMoveAgainstOpponents(bool8 noRng) if (!(gAbsentBattlerFlags & gBitTable[opposingBattler])) { - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { move = gBattleMons[gActiveBattler].moves[i]; if (move == MOVE_NONE) @@ -278,7 +278,7 @@ static bool8 HasSuperEffectiveMoveAgainstOpponents(bool8 noRng) if (!(gAbsentBattlerFlags & gBitTable[opposingBattler])) { - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { move = gBattleMons[gActiveBattler].moves[i]; if (move == MOVE_NONE) @@ -391,7 +391,7 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent) { battlerIn1 = gLastHitBy[gActiveBattler]; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { move = GetMonData(&party[i], MON_DATA_MOVE1 + j); if (move == 0) @@ -692,14 +692,14 @@ u8 GetMostSuitableMonToSwitchInto(void) // Ok, we know the mon has the right typing but does it have at least one super effective move? if (bestMonId != PARTY_SIZE) { - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { move = GetMonData(&party[bestMonId], MON_DATA_MOVE1 + i); if (move != MOVE_NONE && AI_GetTypeEffectiveness(move, gActiveBattler, opposingBattler) >= UQ_4_12(2.0)) break; } - if (i != 4) + if (i != MAX_MON_MOVES) return bestMonId; // Has both the typing and at least one super effective move. invalidMons |= gBitTable[bestMonId]; // Sorry buddy, we want something better. @@ -731,7 +731,7 @@ u8 GetMostSuitableMonToSwitchInto(void) if (i == *(gBattleStruct->monToSwitchIntoId + battlerIn2)) continue; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { s32 dmg = 0; move = GetMonData(&party[i], MON_DATA_MOVE1 + j); diff --git a/src/battle_anim.c b/src/battle_anim.c index 2d211c4112..7dd1526dd2 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -1870,7 +1870,7 @@ static void ScriptCmd_monbg(void) else toBG_2 = TRUE; - sub_80A438C(battlerId, toBG_2, FALSE); + MoveBattlerSpriteToBG(battlerId, toBG_2, FALSE); taskId = CreateTask(sub_80A40F4, 10); gAnimVisualTaskCount++; gTasks[taskId].data[t1_MONBG_BATTLER] = battlerId; @@ -1889,7 +1889,7 @@ static void ScriptCmd_monbg(void) else toBG_2 = TRUE; - sub_80A438C(battlerId, toBG_2, FALSE); + MoveBattlerSpriteToBG(battlerId, toBG_2, FALSE); taskId = CreateTask(sub_80A40F4, 10); gAnimVisualTaskCount++; gTasks[taskId].data[0] = battlerId; @@ -1922,7 +1922,7 @@ bool8 IsBattlerSpriteVisible(u8 battlerId) return FALSE; } -void sub_80A438C(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible) +void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible) { struct UnknownAnimStruct2 unknownStruct; u8 battlerSpriteId; @@ -2194,7 +2194,7 @@ static void ScriptCmd_monbg_22(void) else toBG_2 = TRUE; - sub_80A438C(battlerId, toBG_2, FALSE); + MoveBattlerSpriteToBG(battlerId, toBG_2, FALSE); } battlerId ^= BIT_FLANK; @@ -2206,7 +2206,7 @@ static void ScriptCmd_monbg_22(void) else toBG_2 = TRUE; - sub_80A438C(battlerId, toBG_2, FALSE); + MoveBattlerSpriteToBG(battlerId, toBG_2, FALSE); } sBattleAnimScriptPtr++; @@ -2283,7 +2283,7 @@ static void ScriptCmd_setalpha(void) sBattleAnimScriptPtr++; half1 = *(sBattleAnimScriptPtr++); half2 = *(sBattleAnimScriptPtr++) << 8; - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F40); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, half1 | half2); } diff --git a/src/battle_anim_80A5C6C.c b/src/battle_anim_80A5C6C.c index e17dde0789..7b9e975c40 100644 --- a/src/battle_anim_80A5C6C.c +++ b/src/battle_anim_80A5C6C.c @@ -788,7 +788,7 @@ void InitSpritePosToAnimTarget(struct Sprite *sprite, bool8 respectMonPicOffsets sprite->pos1.y += gBattleAnimArgs[1]; } -void InitSpritePosToAnimAttacker(struct Sprite *sprite, u8 respectMonPicOffsets) +void InitSpritePosToAnimAttacker(struct Sprite *sprite, bool8 respectMonPicOffsets) { if (!respectMonPicOffsets) { diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 8acbf62d4a..0ec8b63d7a 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -3134,7 +3134,7 @@ void sub_8105EB0(u8 taskId) SetGpuReg(REG_OFFSET_WIN0V, gBattle_WIN0V); SetGpuReg(REG_OFFSET_WININ, 0x3F1F); SetGpuReg(REG_OFFSET_WINOUT, 0x3F3F); - SetGpuReg(REG_OFFSET_BLDCNT, 0xC8); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG3 | BLDCNT_EFFECT_DARKEN); SetGpuReg(REG_OFFSET_BLDY, 0x10); gTasks[taskId].data[0] = win0v; gTasks[taskId].data[1] = win0h; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index d887eeabf5..5f135691b9 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -589,9 +589,9 @@ const union AffineAnimCmd gUnknown_085CE430[] = const s8 gUnknown_085CE460[] = { - 0xE8, - 0x18, - 0xFC, + 0xE8, + 0x18, + 0xFC, 0x00, }; @@ -1846,7 +1846,7 @@ static void sub_815AED8(u8 taskId) if (task->data[7]) task->data[12] = task->data[8]; else - task->data[12] = task->data[9]; + task->data[12] = task->data[9]; } i = task->data[0]; @@ -2403,7 +2403,7 @@ void sub_815BB84(u8 taskId) gTasks[taskId].data[4] = 0; if (++gTasks[taskId].data[1] > 12) gTasks[taskId].data[1] = 12; - + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[1], 16 - gTasks[taskId].data[1])); if (gTasks[taskId].data[1] == 12) @@ -2459,7 +2459,7 @@ void sub_815BE04(struct Sprite *sprite) xOffset &= 0x3F; if (xOffset > 31) xOffset = 32 - xOffset; - + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + xOffset; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 32; sprite->data[1] = gBattleAnimArgs[0]; @@ -2490,7 +2490,7 @@ static void sub_815BF44(struct Sprite *sprite) { int var0; s8 var1; - + var0 = (u16)sprite->data[2] + (u16)sprite->data[3]; var1 = var0 >> 8; sprite->pos2.y -= var1; @@ -2531,7 +2531,7 @@ static void sub_815C050(struct Sprite *sprite) register u16 d3 asm("r1"); int var0; s8 var1; - + if (!sprite->invisible) { d2 = sprite->data[2]; @@ -2637,7 +2637,7 @@ void sub_815C0A4(u8 taskId) sub_80A6C68(unknownStruct.bgId); if (!IsContest()) SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0); - + SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1); gBattle_BG1_X = 0; gBattle_BG1_Y = 0; @@ -2893,7 +2893,7 @@ static void sub_815C7C4(u8 taskId) SetSpriteRotScale(task->data[15], 0x100, 0x100, task->data[2]); SetBattlerSpriteYOffsetFromRotation(task->data[15]); gSprites[task->data[15]].pos2.x = -(((temp = task->data[2]) >= 0 ? task->data[2] : temp + 63) >> 6); - + if (++task->data[1] > 8) { if (task->data[12]) @@ -3220,7 +3220,7 @@ void sub_815CED8(u8 taskId) gSprites[spriteId].oam.objMode = ST_OAM_OBJ_BLEND; FillPalette(RGB(31, 31, 31), (gSprites[spriteId].oam.paletteNum << 4) + 0x100, 32); gSprites[spriteId].oam.priority = priority; - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F40); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[1], 16 - gTasks[taskId].data[1])); gTasks[taskId].data[0] = spriteId; @@ -3679,7 +3679,7 @@ void sub_815DCA4(u8 taskId) if (!gBattleAnimArgs[1]) DestroyAnimVisualTask(taskId); - + task->data[0] = 0; task->data[1] = 0; task->data[2] = 0; @@ -3801,7 +3801,7 @@ static void sub_815DF64(u8 taskId) BlendPalette(gTasks[taskId].data[2], 16, 8, gUnknown_085CE784[gTasks[taskId].data[0]]); if (++gTasks[taskId].data[0] > 23) gTasks[taskId].data[0] = 0; - + gTasks[taskId].data[1]--; } else @@ -3831,7 +3831,7 @@ void sub_815E01C(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) gBattleAnimArgs[0] = -gBattleAnimArgs[0]; - + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[0]; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[1]; if (gBattleAnimArgs[2] == 0) @@ -4030,7 +4030,7 @@ void sub_815E47C(u8 taskId) InitAnimArcTranslation(&gSprites[task->data[15]]); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) StartSpriteAffineAnim(&gSprites[task->data[15]], 1); - + task->func = sub_815E5CC; } else @@ -4303,7 +4303,7 @@ static void sub_815EA60(struct Sprite *sprite) sprite->pos2.x = sprite->data[7] * (gSineTable[sprite->data[1] * 10] >> 3); if (sprite->data[1] == 15) sprite->oam.tileNum += 16; - + if (sprite->data[1] == 18) { sprite->data[1] = 0; @@ -4581,7 +4581,7 @@ static void sub_815F10C(struct Sprite *sprite) sprite->pos1.x + sprite->pos2.x, sprite->pos1.y + sprite->pos2.y, 5); } - + if (sprite->data[5] == sprite->data[4]) DestroyAnimSprite(sprite); @@ -4648,7 +4648,7 @@ void AnimTask_MonToSubstitute(u8 taskId) for (i = 0; i < 16; i++) gTasks[taskId].data[i] = 0; - + gTasks[taskId].func = sub_815F330; } } @@ -4837,7 +4837,7 @@ void sub_815F620(u8 taskId) gSprites[spriteId1].invisible = 1; } - + gSprites[spriteId2].oam.objMode = ST_OAM_OBJ_NORMAL; gSprites[spriteId1].oam.objMode = ST_OAM_OBJ_NORMAL; gSprites[spriteId2].callback = sub_815F7C4; @@ -4887,3 +4887,18 @@ static void sub_815F7C4(struct Sprite *sprite) break; } } + +void AnimTask_GetReturnPowerLevel(u8 taskId) +{ + gBattleAnimArgs[7] = 0; + if (gAnimFriendship < 60) + gBattleAnimArgs[7] = 0; + if (gAnimFriendship > 60 && gAnimFriendship < 92) + gBattleAnimArgs[7] = 1; + if (gAnimFriendship > 91 && gAnimFriendship < 201) + gBattleAnimArgs[7] = 2; + if (gAnimFriendship > 200) + gBattleAnimArgs[7] = 3; + + DestroyAnimVisualTask(taskId); +} diff --git a/src/battle_bg.c b/src/battle_bg.c index fa8a0d3c8b..d5c31a0b4f 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -1092,7 +1092,7 @@ void DrawBattleEntryBackground(void) LZDecompressVram(gUnknown_08D778F0, (void*)(VRAM + 0x4000)); LZDecompressVram(gUnknown_08D77B0C, (void*)(VRAM + 0x10000)); LoadCompressedPalette(gUnknown_08D77AE4, 0x60, 0x20); - SetBgAttribute(1, BG_CTRL_ATTR_MAPBASEINDEX, 1); + SetBgAttribute(1, BG_ATTR_SCREENSIZE, 1); SetGpuReg(REG_OFFSET_BG1CNT, 0x5C04); CopyToBgTilemapBuffer(1, gUnknown_08D779D8, 0, 0); CopyToBgTilemapBuffer(2, gUnknown_08D779D8, 0, 0); @@ -1113,8 +1113,8 @@ void DrawBattleEntryBackground(void) } else { - SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 2); - SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 2); + SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 2); + SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 2); CopyToBgTilemapBuffer(1, gUnknown_08D857A8, 0, 0); CopyToBgTilemapBuffer(2, gUnknown_08D85A1C, 0, 0); CopyBgTilemapBufferToVram(1); diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index a06c672141..3325bf08e6 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -583,7 +583,7 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); @@ -630,7 +630,7 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); @@ -650,7 +650,7 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP_BONUSES); size++; @@ -915,7 +915,7 @@ static void SetLinkOpponentMonData(u8 monId) SetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gEnemyParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -954,7 +954,7 @@ static void SetLinkOpponentMonData(u8 monId) SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gEnemyParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index ac91cc7737..cfc2c8744a 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -468,7 +468,7 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -515,7 +515,7 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -535,7 +535,7 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); size++; @@ -800,7 +800,7 @@ static void SetLinkPartnerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -839,7 +839,7 @@ static void SetLinkPartnerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index ba28e73712..92ff77bed1 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -566,7 +566,7 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); @@ -613,7 +613,7 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); @@ -633,7 +633,7 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP_BONUSES); size++; @@ -907,7 +907,7 @@ static void SetOpponentMonData(u8 monId) SetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gEnemyParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -946,7 +946,7 @@ static void SetOpponentMonData(u8 monId) SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gEnemyParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index d36f41a603..0219a6b459 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -748,7 +748,7 @@ static void HandleMoveSwitching(void) MoveSelectionDisplayMoveNames(); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) perMovePPBonuses[i] = (gBattleMons[gActiveBattler].ppBonuses & (3 << (i * 2))) >> (i * 2); totalPPBonuses = perMovePPBonuses[gMoveSelectionCursor[gActiveBattler]]; @@ -756,12 +756,12 @@ static void HandleMoveSwitching(void) perMovePPBonuses[gMultiUsePlayerCursor] = totalPPBonuses; totalPPBonuses = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) totalPPBonuses |= perMovePPBonuses[i] << (i * 2); gBattleMons[gActiveBattler].ppBonuses = totalPPBonuses; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { gBattleMons[gActiveBattler].moves[i] = moveInfo->moves[i]; gBattleMons[gActiveBattler].pp[i] = moveInfo->currentPp[i]; @@ -769,14 +769,14 @@ static void HandleMoveSwitching(void) if (!(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED)) { - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { moveStruct.moves[i] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + i); moveStruct.currentPp[i] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP1 + i); } totalPPBonuses = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP_BONUSES); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) perMovePPBonuses[i] = (totalPPBonuses & (3 << (i * 2))) >> (i * 2); i = moveStruct.moves[gMoveSelectionCursor[gActiveBattler]]; @@ -792,10 +792,10 @@ static void HandleMoveSwitching(void) perMovePPBonuses[gMultiUsePlayerCursor] = totalPPBonuses; totalPPBonuses = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) totalPPBonuses |= perMovePPBonuses[i] << (i * 2); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MOVE1 + i, &moveStruct.moves[i]); SetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_PP1 + i, &moveStruct.currentPp[i]); @@ -1490,7 +1490,7 @@ static void MoveSelectionDisplayMoveNames(void) struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]); gNumberOfMovesToChoose = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { MoveSelectionDestroyCursorAt(i); StringCopy(gDisplayedStringBattle, gMoveNames[moveInfo->moves[i]]); @@ -1653,7 +1653,7 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -1700,7 +1700,7 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -1720,7 +1720,7 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); size++; @@ -1994,7 +1994,7 @@ static void SetPlayerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -2033,7 +2033,7 @@ static void SetPlayerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 53947fd9ec..5f33a6a046 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -655,7 +655,7 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -702,7 +702,7 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -722,7 +722,7 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); size++; @@ -987,7 +987,7 @@ static void SetPlayerPartnerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -1026,7 +1026,7 @@ static void SetPlayerPartnerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 363d890ca6..4492a0cb73 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -566,7 +566,7 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); @@ -613,7 +613,7 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); @@ -633,7 +633,7 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP_BONUSES); size++; @@ -898,7 +898,7 @@ static void SetRecordedOpponentMonData(u8 monId) SetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gEnemyParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -937,7 +937,7 @@ static void SetRecordedOpponentMonData(u8 monId) SetMonData(&gEnemyParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gEnemyParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gEnemyParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index a788d6be34..301c1f0091 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -547,7 +547,7 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -594,7 +594,7 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -614,7 +614,7 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); size++; @@ -879,7 +879,7 @@ static void SetRecordedPlayerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -918,7 +918,7 @@ static void SetRecordedPlayerMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index 9c114e39fd..f133184558 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -465,7 +465,7 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst) case REQUEST_ALL_BATTLE: battleMon.species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); battleMon.item = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM); - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { battleMon.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); battleMon.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -512,7 +512,7 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_MOVES_PP_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) { moveData.moves[size] = GetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + size); moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); @@ -532,7 +532,7 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst) size = 2; break; case REQUEST_PP_DATA_BATTLE: - for (size = 0; size < 4; size++) + for (size = 0; size < MAX_MON_MOVES; size++) dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size); dst[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES); size++; @@ -797,7 +797,7 @@ static void SetWallyMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_SPECIES, &battlePokemon->species); SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &battlePokemon->item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &battlePokemon->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &battlePokemon->pp[i]); @@ -836,7 +836,7 @@ static void SetWallyMonData(u8 monId) SetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBattler][3]); break; case REQUEST_MOVES_PP_BATTLE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(&gPlayerParty[monId], MON_DATA_MOVE1 + i, &moveData->moves[i]); SetMonData(&gPlayerParty[monId], MON_DATA_PP1 + i, &moveData->pp[i]); diff --git a/src/battle_controllers.c b/src/battle_controllers.c index eb946de6e1..0af4059045 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -144,7 +144,7 @@ static void InitSinglePlayerBtlControllers(void) gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT; } - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; sub_81B8D64(0, 0); sub_81B8D64(1, 0); @@ -227,7 +227,7 @@ static void InitSinglePlayerBtlControllers(void) gBattlerControllerFuncs[3] = SetControllerToOpponent; gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT; - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) { @@ -247,7 +247,7 @@ static void InitSinglePlayerBtlControllers(void) gBattlerControllerFuncs[3] = SetControllerToOpponent; gBattlerPositions[3] = 3; - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; sub_81B8D64(0, 0); sub_81B8D64(1, 0); @@ -433,7 +433,7 @@ static void InitLinkBtlControllers(void) gBattlerControllerFuncs[3] = SetControllerToLinkOpponent; gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT; - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; } else { @@ -449,7 +449,7 @@ static void InitLinkBtlControllers(void) gBattlerControllerFuncs[2] = SetControllerToLinkOpponent; gBattlerPositions[2] = B_POSITION_OPPONENT_RIGHT; - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; } } else if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) @@ -470,7 +470,7 @@ static void InitLinkBtlControllers(void) gBattlerControllerFuncs[3] = SetControllerToOpponent; gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT; - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; } else { @@ -486,7 +486,7 @@ static void InitLinkBtlControllers(void) gBattlerControllerFuncs[3] = SetControllerToLinkOpponent; gBattlerPositions[3] = B_POSITION_OPPONENT_RIGHT; - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; } sub_81B8D64(0, 0); @@ -576,7 +576,7 @@ static void InitLinkBtlControllers(void) } } - gBattlersCount = 4; + gBattlersCount = MAX_BATTLERS_COUNT; } } diff --git a/src/battle_dome.c b/src/battle_dome.c index 6c04eabf04..cd946c7451 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -2554,7 +2554,7 @@ static void InitDomeTrainers(void) for (i = 0; i < 3; i++) { gSaveBlock2Ptr->frontier.domeMonIds[0][i] = GetMonData(&gPlayerParty[gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1], MON_DATA_SPECIES, NULL); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) gSaveBlock2Ptr->frontier.field_EFC[i].moves[j] = GetMonData(&gPlayerParty[gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1], MON_DATA_MOVE1 + j, NULL); for (j = 0; j < 6; j++) gSaveBlock2Ptr->frontier.field_EFC[i].evs[j] = GetMonData(&gPlayerParty[gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1], MON_DATA_HP_EV + j, NULL); @@ -2814,7 +2814,7 @@ static void CreateDomeMon(u8 monPartyId, u16 tournamentTrainerId, u8 tournamentM gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[tournamentTrainerId][tournamentMonId]].evSpread, otId); happiness = 0xFF; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonMoveSlot(&gEnemyParty[monPartyId], gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[tournamentTrainerId][tournamentMonId]].moves[i], i); @@ -2889,7 +2889,7 @@ static s32 sub_818FCBC(u16 tournamentTrainerId, bool8 arg1) for (i = 0; i < 3; i++) { array[i] = 0; - for (moveId = 0; moveId < 4; moveId++) + for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) { for (playerMonId = 0; playerMonId < 3; playerMonId++) { @@ -2917,7 +2917,7 @@ static s32 sub_818FDB8(u16 tournamentTrainerId, bool8 arg1) for (i = 0; i < 3; i++) { array[i] = 0; - for (moveId = 0; moveId < 4; moveId++) + for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) { for (playerMonId = 0; playerMonId < 3; playerMonId++) { @@ -4848,7 +4848,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTournamentId) for (i = 0; i < 3; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { for (k = 0; k < DOME_TOURNAMENT_TRAINERS_COUNT; k++) { @@ -5538,8 +5538,9 @@ static u16 GetWinningMove(s32 winnerTournamentId, s32 loserTournamentId, u8 roun // Calc move points of all 4 moves for all 3 pokemon hitting all 3 target mons. for (i = 0; i < 3; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { + // TODO: Clean this up, looks like a different data structure moveScores[i * 4 + j] = 0; if (gSaveBlock2Ptr->frontier.domeTrainers[winnerTournamentId].trainerId == TRAINER_FRONTIER_BRAIN) moveIds[i * 4 + j] = GetFrontierBrainMonMove(i, j); @@ -5599,7 +5600,7 @@ static u16 GetWinningMove(s32 winnerTournamentId, s32 loserTournamentId, u8 roun goto LABEL; while (j != 0) { - for (j = 0, k = 0; k < 4 * 3; k++) + for (j = 0, k = 0; k < MAX_MON_MOVES * 3; k++) { if (bestScore < moveScores[k]) { @@ -5626,7 +5627,7 @@ static u16 GetWinningMove(s32 winnerTournamentId, s32 loserTournamentId, u8 roun moveScores[j] = 0; bestScore = 0; j = 0; - for (k = 0; k < 4 * 3; k++) + for (k = 0; k < MAX_MON_MOVES * 3; k++) j += moveScores[k]; } } @@ -6058,16 +6059,16 @@ static void sub_8194D68(void) s32 playerMonId = gSaveBlock2Ptr->frontier.selectedPartyMons[gSelectedOrderFromParty[i] - 1] - 1; s32 count; - for (moveSlot = 0; moveSlot < 4; moveSlot++) + for (moveSlot = 0; moveSlot < MAX_MON_MOVES; moveSlot++) { count = 0; - while (count < 4) + while (count < MAX_MON_MOVES) { if (GetMonData(&gSaveBlock1Ptr->playerParty[playerMonId], MON_DATA_MOVE1 + count, NULL) == GetMonData(&gPlayerParty[i], MON_DATA_MOVE1 + moveSlot, NULL)) break; count++; } - if (count == 4) + if (count == MAX_MON_MOVES) SetMonMoveSlot(&gPlayerParty[i], MOVE_SKETCH, moveSlot); } @@ -6320,7 +6321,7 @@ static void DecideRoundWinners(u8 roundId) // Calculate points for both trainers. for (monId1 = 0; monId1 < 3; monId1++) { - for (moveSlot = 0; moveSlot < 4; moveSlot++) + for (moveSlot = 0; moveSlot < MAX_MON_MOVES; moveSlot++) { for (monId2 = 0; monId2 < 3; monId2++) { @@ -6343,7 +6344,7 @@ static void DecideRoundWinners(u8 roundId) for (monId1 = 0; monId1 < 3; monId1++) { - for (moveSlot = 0; moveSlot < 4; moveSlot++) + for (moveSlot = 0; moveSlot < MAX_MON_MOVES; moveSlot++) { for (monId2 = 0; monId2 < 3; monId2++) { diff --git a/src/battle_factory.c b/src/battle_factory.c index 801b33ba7e..4194086955 100644 --- a/src/battle_factory.c +++ b/src/battle_factory.c @@ -1,4 +1,5 @@ #include "global.h" +#include "battle.h" #include "battle_factory.h" #include "battle_factory_screen.h" #include "event_data.h" @@ -433,7 +434,7 @@ static void sub_81A64C4(void) CalculateMonStats(&gPlayerParty[i]); friendship = 0; - for (k = 0; k < 4; k++) + for (k = 0; k < MAX_MON_MOVES; k++) SetMonMoveAvoidReturn(&gPlayerParty[i], gFacilityTrainerMons[monSetId].moves[k], k); SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &friendship); SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]); @@ -473,7 +474,7 @@ static void sub_81A64C4(void) } CalculateMonStats(&gEnemyParty[i]); - for (k = 0; k < 4; k++) + for (k = 0; k < MAX_MON_MOVES; k++) SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monSetId].moves[k], k); SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]); SetMonData(&gEnemyParty[i], MON_DATA_ALT_ABILITY, &gSaveBlock2Ptr->frontier.field_E70[i + 3].abilityBit); @@ -623,7 +624,7 @@ static void sub_81A6AEC(void) for (i = 0; i < 3; i++) { u16 monSetId = gUnknown_03006298[i]; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { u8 id = GetStyleForMove(gFacilityTrainerMons[monSetId].moves[j]); stylePoints[id]++; @@ -756,7 +757,7 @@ void FillFactoryBrainParty(void) otId); friendship = 0; - for (k = 0; k < 4; k++) + for (k = 0; k < MAX_MON_MOVES; k++) SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monSetId].moves[k], k); SetMonData(&gEnemyParty[i], MON_DATA_FRIENDSHIP, &friendship); SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]); diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 2571e7a92d..7831ef7505 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -1,4 +1,5 @@ #include "global.h" +#include "battle.h" #include "battle_factory_screen.h" #include "battle_factory.h" #include "sprite.h" @@ -1691,7 +1692,7 @@ static void CreateFrontierFactorySelectableMons(u8 firstMonId) gFacilityTrainerMons[monSetId].evSpread, otId); happiness = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) SetMonMoveAvoidReturn(&sFactorySelectScreen->mons[i + firstMonId].monData, gFacilityTrainerMons[monSetId].moves[j], j); SetMonData(&sFactorySelectScreen->mons[i + firstMonId].monData, MON_DATA_FRIENDSHIP, &happiness); SetMonData(&sFactorySelectScreen->mons[i + firstMonId].monData, MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]); @@ -1721,7 +1722,7 @@ static void CreateTentFactorySelectableMons(u8 firstMonId) gFacilityTrainerMons[monSetId].evSpread, otId); happiness = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) SetMonMoveAvoidReturn(&sFactorySelectScreen->mons[i + firstMonId].monData, gFacilityTrainerMons[monSetId].moves[j], j); SetMonData(&sFactorySelectScreen->mons[i + firstMonId].monData, MON_DATA_FRIENDSHIP, &happiness); SetMonData(&sFactorySelectScreen->mons[i + firstMonId].monData, MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]); diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index ca4cb0e0f6..e4a0ff76f6 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -138,7 +138,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) if (i == var1) percent = 2; - for (var2 = 0, i = 0; i < 4; i++) + for (var2 = 0, i = 0; i < MAX_MON_MOVES; i++) { if (moveInfo->moves[i] == MOVE_NONE) break; @@ -160,7 +160,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) { var1 = 0, var2 = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (sub_805D4A8(moveInfo->moves[i]) == 0 && !(gBitTable[i] & unusableMovesBits)) var1 += 0x1; @@ -181,7 +181,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) { do { - i = Random() % 4; + i = Random() % MAX_MON_MOVES; if (!(gBitTable[i] & unusableMovesBits)) chosenMoveId = i; } while (chosenMoveId == -1); @@ -197,7 +197,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) do { - i = Random() % 4; + i = Random() % MAX_MON_MOVES; if (!(gBitTable[i] & unusableMovesBits) && var2 == sub_805D4A8(moveInfo->moves[i])) chosenMoveId = i; } while (chosenMoveId == -1); @@ -685,7 +685,7 @@ void BattleLoadAllHealthBoxesGfxAtOnce(void) LoadCompressedSpriteSheet(&sSpriteSheets_DoublesPlayerHealthbox[1]); LoadCompressedSpriteSheet(&sSpriteSheets_DoublesOpponentHealthbox[0]); LoadCompressedSpriteSheet(&sSpriteSheets_DoublesOpponentHealthbox[1]); - numberOfBattlers = 4; + numberOfBattlers = MAX_BATTLERS_COUNT; } for (i = 0; i < numberOfBattlers; i++) LoadCompressedSpriteSheet(&sSpriteSheets_HealthBar[gBattlerPositions[i]]); diff --git a/src/battle_interface.c b/src/battle_interface.c index c4d18e73e1..99c3cd4581 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1544,7 +1544,7 @@ static void sub_8073E08(u8 taskId) if (--gTasks[taskId].tData15 < 0) return; - SetGpuReg(REG_OFFSET_BLDALPHA, (gTasks[taskId].data[15]) | ((16 - gTasks[taskId].data[15]) << 8)); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[15], 16 - gTasks[taskId].data[15])); } if (gTasks[taskId].tData15 == 0) gTasks[taskId].func = sub_8073E64; @@ -1597,7 +1597,7 @@ static void sub_8073F98(u8 taskId) if (--gTasks[taskId].tData15 >= 0) { - SetGpuReg(REG_OFFSET_BLDALPHA, (gTasks[taskId].tData15) | ((16 - gTasks[taskId].tData15) << 8)); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[15], 16 - gTasks[taskId].data[15])); } else if (gTasks[taskId].tData15 == -1) { diff --git a/src/battle_intro.c b/src/battle_intro.c index 4847cf7992..eaee832362 100644 --- a/src/battle_intro.c +++ b/src/battle_intro.c @@ -221,8 +221,8 @@ static void BattleIntroSlide1(u8 taskId) gScanlineEffect.state = 3; gTasks[taskId].data[0]++; CpuFill32(0, (void *)BG_SCREEN_ADDR(28), BG_SCREEN_SIZE); - SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 0); - SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 0); + SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 0); + SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 0); SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(28) | BGCNT_TXT256x512); SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(30) | BGCNT_TXT512x256); } @@ -330,8 +330,8 @@ static void BattleIntroSlide2(u8 taskId) gScanlineEffect.state = 3; gTasks[taskId].data[0]++; CpuFill32(0, (void *)BG_SCREEN_ADDR(28), BG_SCREEN_SIZE); - SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 0); - SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 0); + SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 0); + SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 0); SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(28) | BGCNT_TXT256x512); SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(30) | BGCNT_TXT512x256); } @@ -418,8 +418,8 @@ static void BattleIntroSlide3(u8 taskId) gScanlineEffect.state = 3; gTasks[taskId].data[0]++; CpuFill32(0, (void *)BG_SCREEN_ADDR(28), BG_SCREEN_SIZE); - SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 0); - SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 0); + SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 0); + SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 0); SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(28) | BGCNT_TXT256x512); SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(30) | BGCNT_TXT512x256); } @@ -499,8 +499,8 @@ static void BattleIntroSlideLink(u8 taskId) { gScanlineEffect.state = 3; gTasks[taskId].data[0]++; - SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 0); - SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 0); + SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 0); + SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 0); SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(28) | BGCNT_TXT256x512); SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(30) | BGCNT_TXT512x256); } @@ -567,8 +567,8 @@ static void BattleIntroSlidePartner(u8 taskId) { CpuFill32(0, (void *)BG_SCREEN_ADDR(28), BG_SCREEN_SIZE * 4); SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) & ~DISPCNT_WIN1_ON); - SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 0); - SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 0); + SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 0); + SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 0); SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(28) | BGCNT_TXT256x512); SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_16COLOR | BGCNT_SCREENBASE(30) | BGCNT_TXT512x256); gScanlineEffect.state = 3; diff --git a/src/battle_main.c b/src/battle_main.c index 3609c8efda..7e1711e16a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -2000,7 +2000,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir fixedIV = partyData[i].iv * 31 / 255; CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, 2, 0); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonData(&party[i], MON_DATA_MOVE1 + j, &partyData[i].moves[j]); SetMonData(&party[i], MON_DATA_PP1 + j, &gBattleMoves[partyData[i].moves[j]].pp); @@ -2034,7 +2034,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonData(&party[i], MON_DATA_MOVE1 + j, &partyData[i].moves[j]); SetMonData(&party[i], MON_DATA_PP1 + j, &gBattleMoves[partyData[i].moves[j]].pp); diff --git a/src/battle_message.c b/src/battle_message.c index a07e6115b7..26ef9a6158 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3272,7 +3272,7 @@ static void ChooseMoveUsedParticle(u8* textBuff) s32 counter = 0; u32 i = 0; - while (counter != 4) + while (counter != MAX_MON_MOVES) { if (sGrammarMoveUsedTable[i] == 0) counter++; @@ -3284,7 +3284,7 @@ static void ChooseMoveUsedParticle(u8* textBuff) { if (counter <= 2) StringCopy(textBuff, sText_SpaceIs); // is - else if (counter <= 4) + else if (counter <= MAX_MON_MOVES) StringCopy(textBuff, sText_ApostropheS); // 's } } @@ -3315,7 +3315,7 @@ static void ChooseTypeOfMoveUsedString(u8* dst) while (*dst != EOS) dst++; - while (counter != 4) + while (counter != MAX_MON_MOVES) { if (sGrammarMoveUsedTable[i] == MOVE_NONE) counter++; diff --git a/src/battle_pike.c b/src/battle_pike.c index 303146f6a3..a4b429bd55 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -793,7 +793,7 @@ static void HealMon(struct Pokemon *mon) SetMonData(mon, MON_DATA_HP, data); ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 move = GetMonData(mon, MON_DATA_MOVE1 + i); data[0] = CalculatePPWithBonus(move, ppBonuses, i); @@ -1137,7 +1137,7 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate) else abilityBit = 0; SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &abilityBit); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(&gEnemyParty[0], wildMons[headerId][pikeMonId].moves[i], i); CalculateMonStats(&gEnemyParty[0]); @@ -1285,7 +1285,7 @@ static void TryHealMons(u8 healCount) else { u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { u16 move = GetMonData(mon, MON_DATA_MOVE1 + j); max = CalculatePPWithBonus(move, ppBonuses, j); @@ -1546,7 +1546,7 @@ static void sub_81A86C0(void) if (curr >= max && pokemon_ailments_get_primary(GetMonData(mon, MON_DATA_STATUS)) == 0) { u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { u16 move = GetMonData(mon, MON_DATA_MOVE1 + j); max = CalculatePPWithBonus(move, ppBonuses, j); diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 244e61d177..c9d9042872 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1177,14 +1177,14 @@ static void sub_81A9834(void) { if (GetMonData(&gSaveBlock1Ptr->playerParty[id], MON_DATA_SPECIES, NULL) == GetMonData(&gPlayerParty[j], MON_DATA_SPECIES, NULL)) { - for (k = 0; k < 4; k++) + for (k = 0; k < MAX_MON_MOVES; k++) { - for (l = 0; l < 4; l++) + for (l = 0; l < MAX_MON_MOVES; l++) { if (GetMonData(&gSaveBlock1Ptr->playerParty[id], MON_DATA_MOVE1 + l, NULL) == GetMonData(&gPlayerParty[j], MON_DATA_MOVE1 + k, NULL)) break; } - if (l == 4) + if (l == MAX_MON_MOVES) SetMonMoveSlot(&gPlayerParty[j], MOVE_SKETCH, k); } gSaveBlock1Ptr->playerParty[id] = gPlayerParty[j]; @@ -1360,7 +1360,7 @@ void GenerateBattlePyramidWildMon(void) break; } - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(&gEnemyParty[0], wildMons[id].moves[i], i); if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] >= 140) // BUG: Reading outside the array as lvl was used for mon level instead of frontier lvl mode. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 1c1683c423..d656d53bf7 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4197,12 +4197,12 @@ static void atk49_moveend(void) *choicedMoveAtk = gChosenMove; LOOP: { - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gBattlerAttacker].moves[i] == *choicedMoveAtk) break; } - if (i == 4) + if (i == MAX_MON_MOVES) *choicedMoveAtk = 0; gBattleScripting.atk49_state++; @@ -5555,7 +5555,7 @@ static void atk5E(void) { s32 i; struct BattlePokemon *bufferPoke = (struct BattlePokemon*) &gBattleBufferB[gActiveBattler][4]; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { gBattleMons[gActiveBattler].moves[i] = bufferPoke->moves[i]; gBattleMons[gActiveBattler].pp[i] = bufferPoke->pp[i]; @@ -5808,7 +5808,7 @@ static void atk6C_drawlvlupbox(void) { case 1: gBattle_BG2_Y = 0x60; - SetBgAttribute(2, BG_CTRL_ATTR_MOSAIC, 0); + SetBgAttribute(2, BG_ATTR_PRIORITY, 0); ShowBg(2); sub_804F17C(); gBattleScripting.atk6C_state = 2; @@ -5820,8 +5820,8 @@ static void atk6C_drawlvlupbox(void) case 3: gBattle_BG1_X = 0; gBattle_BG1_Y = 0x100; - SetBgAttribute(0, BG_CTRL_ATTR_MOSAIC, 1); - SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 0); + SetBgAttribute(0, BG_ATTR_PRIORITY, 1); + SetBgAttribute(1, BG_ATTR_PRIORITY, 0); ShowBg(0); ShowBg(1); HandleBattleWindow(0x12, 7, 0x1D, 0x13, WINDOW_x80); @@ -5867,7 +5867,7 @@ static void atk6C_drawlvlupbox(void) ClearWindowTilemap(13); CopyWindowToVram(13, 1); - SetBgAttribute(2, BG_CTRL_ATTR_MOSAIC, 2); + SetBgAttribute(2, BG_ATTR_PRIORITY, 2); ShowBg(2); gBattleScripting.atk6C_state = 10; @@ -5876,8 +5876,8 @@ static void atk6C_drawlvlupbox(void) case 10: if (!IsDma3ManagerBusyWithBgCopy()) { - SetBgAttribute(0, BG_CTRL_ATTR_MOSAIC, 0); - SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 1); + SetBgAttribute(0, BG_ATTR_PRIORITY, 0); + SetBgAttribute(1, BG_ATTR_PRIORITY, 1); ShowBg(0); ShowBg(1); gBattlescriptCurrInstr++; @@ -6377,12 +6377,12 @@ static void atk76_various(void) choicedMove = &gBattleStruct->choicedMove[gActiveBattler]; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gActiveBattler].moves[i] == *choicedMove) break; } - if (i == 4) + if (i == MAX_MON_MOVES) *choicedMove = 0; } break; @@ -8101,7 +8101,7 @@ static void atk90_tryconversiontypechange(void) // randomly changes user's type u8 moveChecked; u8 moveType; - while (validMoves < 4) + while (validMoves < MAX_MON_MOVES) { if (gBattleMons[gBattlerAttacker].moves[validMoves] == 0) break; @@ -8517,7 +8517,7 @@ static void atk9B_transformdataexecution(void) for (i = 0; i < offsetof(struct BattlePokemon, pp); i++) battleMonAttacker[i] = battleMonTarget[i]; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMoves[gBattleMons[gBattlerAttacker].moves[i]].pp < 5) gBattleMons[gBattlerAttacker].pp[i] = gBattleMoves[gBattleMons[gBattlerAttacker].moves[i]].pp; @@ -8583,13 +8583,13 @@ static void atk9D_mimicattackcopy(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gBattlerAttacker].moves[i] == gLastMoves[gBattlerTarget]) break; } - if (i == 4) + if (i == MAX_MON_MOVES) { gBattleMons[gBattlerAttacker].moves[gCurrMovePos] = gLastMoves[gBattlerTarget]; if (gBattleMoves[gLastMoves[gBattlerTarget]].pp < 5) @@ -8709,13 +8709,13 @@ static void atkA3_disablelastusedattack(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gBattlerTarget].moves[i] == gLastMoves[gBattlerTarget]) break; } if (gDisableStructs[gBattlerTarget].disabledMove == 0 - && i != 4 && gBattleMons[gBattlerTarget].pp[i] != 0) + && i != MAX_MON_MOVES && gBattleMons[gBattlerTarget].pp[i] != 0) { PREPARE_MOVE_BUFFER(gBattleTextBuff1, gBattleMons[gBattlerTarget].moves[i]) @@ -8734,7 +8734,7 @@ static void atkA4_trysetencore(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gBattlerTarget].moves[i] == gLastMoves[gBattlerTarget]) break; @@ -8866,7 +8866,7 @@ static void atkA8_copymovepermanently(void) // sketch { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gBattlerAttacker].moves[i] == MOVE_SKETCH) continue; @@ -8874,7 +8874,7 @@ static void atkA8_copymovepermanently(void) // sketch break; } - if (i != 4) + if (i != MAX_MON_MOVES) { gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); } @@ -8886,7 +8886,7 @@ static void atkA8_copymovepermanently(void) // sketch gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = gBattleMoves[gLastPrintedMoves[gBattlerTarget]].pp; gActiveBattler = gBattlerAttacker; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { movePpData.moves[i] = gBattleMons[gBattlerAttacker].moves[i]; movePpData.pp[i] = gBattleMons[gBattlerAttacker].pp[i]; @@ -8952,7 +8952,7 @@ static void atkA9_trychoosesleeptalkmove(void) s32 i; u8 unusableMovesBits = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (IsInvalidForSleepTalkOrAssist(gBattleMons[gBattlerAttacker].moves[i]) || gBattleMons[gBattlerAttacker].moves[i] == MOVE_FOCUS_PUNCH @@ -9034,13 +9034,13 @@ static void atkAD_tryspiteppreduce(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gLastMoves[gBattlerTarget] == gBattleMons[gBattlerTarget].moves[i]) break; } - if (i != 4 && gBattleMons[gBattlerTarget].pp[i] > 1) + if (i != MAX_MON_MOVES && gBattleMons[gBattlerTarget].pp[i] > 1) { s32 ppToDeduct = (Random() & 3) + 2; if (gBattleMons[gBattlerTarget].pp[i] < ppToDeduct) @@ -10133,19 +10133,19 @@ static void atkDB_tryimprision(void) if (sideAttacker != GetBattlerSide(battlerId)) { s32 attackerMoveId; - for (attackerMoveId = 0; attackerMoveId < 4; attackerMoveId++) + for (attackerMoveId = 0; attackerMoveId < MAX_MON_MOVES; attackerMoveId++) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[gBattlerAttacker].moves[attackerMoveId] == gBattleMons[battlerId].moves[i] && gBattleMons[gBattlerAttacker].moves[attackerMoveId] != MOVE_NONE) break; } - if (i != 4) + if (i != MAX_MON_MOVES) break; } - if (attackerMoveId != 4) + if (attackerMoveId != MAX_MON_MOVES) { gStatuses3[gBattlerAttacker] |= STATUS3_IMPRISONED_OTHERS; gBattlescriptCurrInstr += 5; @@ -10209,7 +10209,7 @@ static void atkDE_asistattackselect(void) if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG) continue; - for (moveId = 0; moveId < 4; moveId++) + for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) { s32 i = 0; u16 move = GetMonData(&party[monId], MON_DATA_MOVE1 + moveId); diff --git a/src/battle_setup.c b/src/battle_setup.c index 2c3a35ea94..ab6b090be8 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -37,9 +37,10 @@ #include "gym_leader_rematch.h" #include "battle_pike.h" #include "battle_pyramid.h" +#include "fldeff.h" #include "fldeff_misc.h" #include "field_control_avatar.h" -#include "fldeff_groundshake.h" +#include "mirage_tower.h" #include "constants/map_types.h" #include "constants/battle_frontier.h" @@ -339,7 +340,7 @@ static void Task_BattleStart(u8 taskId) if (!FldEffPoison_IsActive()) // is poison not active? { BattleTransition_StartOnField(tTransition); - sub_81BE72C(); + ClearMirageTowerPulseBlendEffect(); tState++; // go to case 1. } break; diff --git a/src/battle_tower.c b/src/battle_tower.c index 1b53523726..2bb2e50f53 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1982,7 +1982,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) friendship = 255; // Give the chosen pokemon its specified moves. - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonMoveSlot(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monSetId].moves[j], j); if (gFacilityTrainerMons[monSetId].moves[j] == MOVE_FRUSTRATION) @@ -2021,7 +2021,7 @@ static void Unused_CreateApprenticeMons(u16 trainerId, u8 firstMonId) { CreateMonWithEVSpread(&gEnemyParty[firstMonId + i], apprentice->party[i].species, level, fixedIV, 8); friendship = 0xFF; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { if (apprentice->party[i].moves[j] == MOVE_FRUSTRATION) friendship = 0; @@ -2111,7 +2111,7 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId) otID); friendship = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) SetMonMoveAvoidReturn(&gEnemyParty[firstMonId + i], gFacilityTrainerMons[monSetId].moves[j], j); SetMonData(&gEnemyParty[firstMonId + i], MON_DATA_FRIENDSHIP, &friendship); @@ -2139,7 +2139,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId) otID); friendship = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonMoveAvoidReturn(&gEnemyParty[firstMonId + i], gFacilityTrainerMons[monSetId].moves[j], j); if (gFacilityTrainerMons[monSetId].moves[j] == MOVE_FRUSTRATION) @@ -3224,7 +3224,7 @@ static void FillPartnerParty(u16 trainerId) TRUE, STEVEN_OTID); for (j = 0; j < 6; j++) SetMonData(&gPlayerParty[3 + i], MON_DATA_HP_EV + j, &sStevenMons[i].evs[j]); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) SetMonMoveSlot(&gPlayerParty[3 + i], sStevenMons[i].moves[j], j); SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_NAME, gTrainers[TRAINER_STEVEN].trainerName); j = MALE; @@ -3319,7 +3319,7 @@ static void FillPartnerParty(u16 trainerId) gFacilityTrainerMons[monSetId].evSpread, otID); friendship = 0xFF; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonMoveSlot(&gPlayerParty[3 + i], gFacilityTrainerMons[monSetId].moves[j], j); if (gFacilityTrainerMons[monSetId].moves[j] == MOVE_FRUSTRATION) @@ -3744,7 +3744,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) friendship = 255; // Give the chosen pokemon its specified moves. - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonMoveSlot(&gEnemyParty[i + firstMonId], gFacilityTrainerMons[monSetId].moves[j], j); if (gFacilityTrainerMons[monSetId].moves[j] == MOVE_FRUSTRATION) diff --git a/src/battle_tv.c b/src/battle_tv.c index 44aa8acd8d..2195c15569 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -746,7 +746,7 @@ void TryPutLinkBattleTvShowOnAir(void) species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL); if (species != SPECIES_NONE && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG, NULL)) { - for (sum = 0, j = 0; j < 4; j++) + for (sum = 0, j = 0; j < MAX_MON_MOVES; j++) sum += movePoints->points[0][i * 4 + j]; if (playerBestSum < sum) @@ -760,7 +760,7 @@ void TryPutLinkBattleTvShowOnAir(void) species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES, NULL); if (species != SPECIES_NONE && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG, NULL)) { - for (sum = 0, j = 0; j < 4; j++) + for (sum = 0, j = 0; j < MAX_MON_MOVES; j++) sum += movePoints->points[1][i * 4 + j]; if (opponentBestSum == sum) @@ -781,7 +781,7 @@ void TryPutLinkBattleTvShowOnAir(void) } } - for (sum = 0, i = 0, j = 0; j < 4; j++) + for (sum = 0, i = 0, j = 0; j < MAX_MON_MOVES; j++) { if (sum < movePoints->points[0][playerBestMonId * 4 + j]) { @@ -1422,7 +1422,7 @@ static void TrySetBattleSeminarShow(void) dmgByMove[gMoveSelectionCursor[gBattlerAttacker]] = gBattleMoveDamage; currMoveSaved = gCurrentMove; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { gCurrentMove = gBattleMons[gBattlerAttacker].moves[i]; powerOverride = 0; @@ -1435,7 +1435,7 @@ static void TrySetBattleSeminarShow(void) } } - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (i != gMoveSelectionCursor[gBattlerAttacker] && dmgByMove[i] > dmgByMove[gMoveSelectionCursor[gBattlerAttacker]]) { @@ -1447,7 +1447,7 @@ static void TrySetBattleSeminarShow(void) else bestMoveId = 1; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (i != gMoveSelectionCursor[gBattlerAttacker] && dmgByMove[i] > dmgByMove[bestMoveId]) bestMoveId = i; @@ -1540,7 +1540,7 @@ u8 GetBattlerMoveSlotId(u8 battlerId, u16 moveId) i = 0; while (1) { - if (i >= 4) + if (i >= MAX_MON_MOVES) break; if (GetMonData(&party[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + i, NULL) == moveId) break; diff --git a/src/battle_util.c b/src/battle_util.c index 3b3a8fd67c..8c42efdcfb 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -336,13 +336,13 @@ void PressurePPLose(u8 defender, u8 attacker, u16 move) if (gBattleMons[defender].ability != ABILITY_PRESSURE) return; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[attacker].moves[i] == move) break; } - if (i == 4) // mons don't share any moves + if (i == MAX_MON_MOVES) // mons don't share any moves return; if (gBattleMons[attacker].pp[i] != 0) @@ -367,12 +367,12 @@ void PressurePPLoseOnUsingImprision(u8 attacker) { if (atkSide != GetBattlerSide(i) && gBattleMons[i].ability == ABILITY_PRESSURE) { - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { if (gBattleMons[attacker].moves[j] == MOVE_IMPRISON) break; } - if (j != 4) + if (j != MAX_MON_MOVES) { imprisionPos = j; if (gBattleMons[attacker].pp[j] != 0) @@ -400,12 +400,12 @@ void PressurePPLoseOnUsingPerishSong(u8 attacker) { if (gBattleMons[i].ability == ABILITY_PRESSURE && i != attacker) { - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { if (gBattleMons[attacker].moves[j] == MOVE_PERISH_SONG) break; } - if (j != 4) + if (j != MAX_MON_MOVES) { perishSongPos = j; if (gBattleMons[attacker].pp[j] != 0) @@ -414,7 +414,7 @@ void PressurePPLoseOnUsingPerishSong(u8 attacker) } } - if (perishSongPos != 4 + if (perishSongPos != MAX_MON_MOVES && !(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED) && !(gDisableStructs[attacker].unk18_b & gBitTable[perishSongPos])) { @@ -766,7 +766,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) gPotentialItemEffectBattler = battlerId; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gBattleMons[battlerId].moves[i] == 0 && check & MOVE_LIMITATION_ZEROMOVE) unusableMoves |= gBitTable[i]; @@ -823,12 +823,12 @@ u8 GetImprisonedMovesCount(u8 battlerId, u16 move) if (battlerSide != GetBattlerSide(i) && gStatuses3[i] & STATUS3_IMPRISONED_OTHERS) { s32 j; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { if (move == gBattleMons[i].moves[j]) break; } - if (j < 4) + if (j < MAX_MON_MOVES) imprisionedMoves++; } } @@ -1616,12 +1616,12 @@ u8 DoBattlerEndTurnEffects(void) if (gDisableStructs[gActiveBattler].disableTimer != 0) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gDisableStructs[gActiveBattler].disabledMove == gBattleMons[gActiveBattler].moves[i]) break; } - if (i == 4) // pokemon does not have the disabled move anymore + if (i == MAX_MON_MOVES) // pokemon does not have the disabled move anymore { gDisableStructs[gActiveBattler].disabledMove = 0; gDisableStructs[gActiveBattler].disableTimer = 0; @@ -3656,7 +3656,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) mon = &gPlayerParty[gBattlerPartyIndexes[battlerId]]; else mon = &gEnemyParty[gBattlerPartyIndexes[battlerId]]; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { move = GetMonData(mon, MON_DATA_MOVE1 + i); changedPP = GetMonData(mon, MON_DATA_PP1 + i); @@ -3664,7 +3664,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) if (move && changedPP == 0) break; } - if (i != 4) + if (i != MAX_MON_MOVES) { u8 maxPP = CalculatePPWithBonus(move, ppBonuses, i); if (changedPP + battlerHoldEffectParam > maxPP) diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index d87509e101..3631c083ad 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -67,7 +67,7 @@ static const u16 sUnknown_08618138[] = { 0x7fff, 0x7fff, 0x318c, 0x675a, 0x043c, 0x3aff, 0x0664, 0x4bd2, 0x6546, 0x7b14, 0x7fff, 0x318c, - 0x675a, 0x0000, 0x0000, 0x0000 + 0x675a, 0, 0, 0 }; static const u8 sUnknown_08618158[] = {10, 11, 12}; @@ -124,7 +124,7 @@ void CB2_InitBerryFixProgram(void) ResetSpriteData(); ResetTasks(); ScanlineEffect_Stop(); - SetGpuReg(REG_OFFSET_DISPCNT, 0x0000); + SetGpuReg(REG_OFFSET_DISPCNT, 0); berry_fix_mb_manager = AllocZeroed(0x50); berry_fix_mb_manager->state = 0; berry_fix_mb_manager->unk1 = 6; @@ -203,13 +203,13 @@ static void berry_fix_gpu_set(void) { s32 width, left; - SetGpuReg(REG_OFFSET_BG0CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG1CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG0HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG0VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG1HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG1VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BLDCNT, 0x0000); + SetGpuReg(REG_OFFSET_BG0CNT, 0); + SetGpuReg(REG_OFFSET_BG1CNT, 0); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + SetGpuReg(REG_OFFSET_BLDCNT, 0); DmaFill32(3, 0, VRAM, VRAM_SIZE); DmaFill32(3, 0, OAM, OAM_SIZE); diff --git a/src/bg.c b/src/bg.c index 21624e4a02..54ec3b347b 100644 --- a/src/bg.c +++ b/src/bg.c @@ -77,15 +77,27 @@ void ResetBgControlStructs(void) void Unused_ResetBgControlStruct(u8 bg) { - if (IsInvalidBg(bg) == FALSE) + if (!IsInvalidBg(bg)) { sGpuBgConfigs.configs[bg] = sZeroedBgControlStruct; } } -void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenSize, u8 paletteMode, u8 priority, u8 mosaic, u8 wraparound) +enum { - if (IsInvalidBg(bg) == FALSE) + BG_CTRL_ATTR_VISIBLE = 1, + BG_CTRL_ATTR_CHARBASEINDEX = 2, + BG_CTRL_ATTR_MAPBASEINDEX = 3, + BG_CTRL_ATTR_SCREENSIZE = 4, + BG_CTRL_ATTR_PALETTEMODE = 5, + BG_CTRL_ATTR_PRIORITY = 6, + BG_CTRL_ATTR_MOSAIC = 7, + BG_CTRL_ATTR_WRAPAROUND = 8, +}; + +static void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenSize, u8 paletteMode, u8 priority, u8 mosaic, u8 wraparound) +{ + if (!IsInvalidBg(bg)) { if (charBaseIndex != 0xFF) { @@ -129,9 +141,9 @@ void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenS } } -u16 GetBgControlAttribute(u8 bg, u8 attributeId) +static u16 GetBgControlAttribute(u8 bg, u8 attributeId) { - if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) + if (!IsInvalidBg(bg) && sGpuBgConfigs.configs[bg].visible) { switch (attributeId) { @@ -162,7 +174,7 @@ u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode) u16 offset; s8 cursor; - if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) + if (!IsInvalidBg(bg) && sGpuBgConfigs.configs[bg].visible) { switch (mode) { @@ -198,7 +210,7 @@ end: static void ShowBgInternal(u8 bg) { u16 value; - if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) + if (!IsInvalidBg(bg) && sGpuBgConfigs.configs[bg].visible) { value = sGpuBgConfigs.configs[bg].priority | (sGpuBgConfigs.configs[bg].charBaseIndex << 2) | @@ -217,7 +229,7 @@ static void ShowBgInternal(u8 bg) static void HideBgInternal(u8 bg) { - if (IsInvalidBg(bg) == FALSE) + if (!IsInvalidBg(bg)) { sGpuBgConfigs.bgVisibilityAndMode &= ~(1 << (bg + 8)); sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; @@ -226,12 +238,12 @@ static void HideBgInternal(u8 bg) static void SyncBgVisibilityAndMode(void) { - SetGpuReg(0, (GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS) | sGpuBgConfigs.bgVisibilityAndMode); + SetGpuReg(REG_OFFSET_DISPCNT, (GetGpuReg(REG_OFFSET_DISPCNT) & ~DISPCNT_ALL_BG_AND_MODE_BITS) | sGpuBgConfigs.bgVisibilityAndMode); } void SetTextModeAndHideBgs(void) { - SetGpuReg(0, GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS); + SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) & ~DISPCNT_ALL_BG_AND_MODE_BITS); } static void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle) @@ -312,7 +324,8 @@ void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numT for (i = 0; i < numTemplates; i++) { bg = templates[i].bg; - if (bg < 4) { + if (bg < 4) + { SetBgControlAttributes(bg, templates[i].charBaseIndex, templates[i].mapBaseIndex, @@ -396,9 +409,7 @@ u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset) u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset) { - u8 cursor; - - cursor = LoadBgVram(bg, src, size, destOffset * 2, DISPCNT_MODE_2); + u8 cursor = LoadBgVram(bg, src, size, destOffset * 2, DISPCNT_MODE_2); if (cursor == 0xFF) { @@ -412,12 +423,11 @@ u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset) u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset) { - u16 paletteOffset; s8 cursor; - if (IsInvalidBg32(bg) == FALSE) + if (!IsInvalidBg32(bg)) { - paletteOffset = (sGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); + u16 paletteOffset = (sGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); cursor = RequestDma3Copy(src, (void*)(paletteOffset + BG_PLTT), size, 0); if (cursor == -1) @@ -437,20 +447,16 @@ u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset) bool8 IsDma3ManagerBusyWithBgCopy(void) { - u8 mod; - u8 div; - s8 reqSpace; - int i; for (i = 0; i < 0x80; i++) { - div = i / 0x20; - mod = i % 0x20; + u8 div = i / 0x20; + u8 mod = i % 0x20; - if ((sDmaBusyBitfield[div] & (1 << mod)) != FALSE) + if ((sDmaBusyBitfield[div] & (1 << mod))) { - reqSpace = CheckForSpaceForDma3Request(i); + s8 reqSpace = CheckForSpaceForDma3Request(i); if (reqSpace == -1) { return TRUE; @@ -479,25 +485,25 @@ void SetBgAttribute(u8 bg, u8 attributeId, u8 value) { switch (attributeId) { - case 1: + case BG_ATTR_CHARBASEINDEX: SetBgControlAttributes(bg, value, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF); break; - case 2: + case BG_ATTR_MAPBASEINDEX: SetBgControlAttributes(bg, 0xFF, value, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF); break; - case 3: + case BG_ATTR_SCREENSIZE: SetBgControlAttributes(bg, 0xFF, 0xFF, value, 0xFF, 0xFF, 0xFF, 0xFF); break; - case 4: + case BG_ATTR_PALETTEMODE: SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, value, 0xFF, 0xFF, 0xFF); break; - case 7: + case BG_ATTR_PRIORITY: SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, value, 0xFF, 0xFF); break; - case 5: + case BG_ATTR_MOSAIC: SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, value, 0xFF); break; - case 6: + case BG_ATTR_WRAPAROUND: SetBgControlAttributes(bg, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, value); break; } @@ -507,21 +513,21 @@ u16 GetBgAttribute(u8 bg, u8 attributeId) { switch (attributeId) { - case 1: + case BG_ATTR_CHARBASEINDEX: return GetBgControlAttribute(bg, BG_CTRL_ATTR_CHARBASEINDEX); - case 2: + case BG_ATTR_MAPBASEINDEX: return GetBgControlAttribute(bg, BG_CTRL_ATTR_MAPBASEINDEX); - case 3: + case BG_ATTR_SCREENSIZE: return GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); - case 4: + case BG_ATTR_PALETTEMODE: return GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE); - case 7: + case BG_ATTR_PRIORITY: return GetBgControlAttribute(bg, BG_CTRL_ATTR_PRIORITY); - case 5: + case BG_ATTR_MOSAIC: return GetBgControlAttribute(bg, BG_CTRL_ATTR_MOSAIC); - case 6: + case BG_ATTR_WRAPAROUND: return GetBgControlAttribute(bg, BG_CTRL_ATTR_WRAPAROUND); - case 8: + case BG_ATTR_METRIC: switch (GetBgType(bg)) { case 0: @@ -531,9 +537,9 @@ u16 GetBgAttribute(u8 bg, u8 attributeId) default: return 0; } - case 9: + case BG_ATTR_TYPE: return GetBgType(bg); - case 10: + case BG_ATTR_BASETILE: return sGpuBgConfigs2[bg].baseTile; default: return -1; @@ -546,7 +552,7 @@ s32 ChangeBgX(u8 bg, s32 value, u8 op) u16 temp1; u16 temp2; - if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) + if (IsInvalidBg32(bg) || !GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) { return -1; } @@ -612,9 +618,9 @@ s32 ChangeBgX(u8 bg, s32 value, u8 op) s32 GetBgX(u8 bg) { - if (IsInvalidBg32(bg) != FALSE) + if (IsInvalidBg32(bg)) return -1; - else if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) + else if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) return -1; else return sGpuBgConfigs2[bg].bg_x; @@ -626,7 +632,7 @@ s32 ChangeBgY(u8 bg, s32 value, u8 op) u16 temp1; u16 temp2; - if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) + if (IsInvalidBg32(bg) || !GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) { return -1; } @@ -696,7 +702,7 @@ s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) u16 temp1; u16 temp2; - if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) + if (IsInvalidBg32(bg) || !GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) { return -1; } @@ -763,9 +769,9 @@ s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) s32 GetBgY(u8 bg) { - if (IsInvalidBg32(bg) != FALSE) + if (IsInvalidBg32(bg)) return -1; - else if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) + else if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) return -1; else return sGpuBgConfigs2[bg].bg_y; @@ -849,7 +855,7 @@ u8 Unused_AdjustBgMosaic(u8 a1, u8 a2) void SetBgTilemapBuffer(u8 bg, void *tilemap) { - if (IsInvalidBg32(bg) == FALSE && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) != 0x0) + if (!IsInvalidBg32(bg) && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) { sGpuBgConfigs2[bg].tilemap = tilemap; } @@ -857,7 +863,7 @@ void SetBgTilemapBuffer(u8 bg, void *tilemap) void UnsetBgTilemapBuffer(u8 bg) { - if (IsInvalidBg32(bg) == FALSE && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) != 0x0) + if (!IsInvalidBg32(bg) && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) { sGpuBgConfigs2[bg].tilemap = NULL; } @@ -865,9 +871,9 @@ void UnsetBgTilemapBuffer(u8 bg) void* GetBgTilemapBuffer(u8 bg) { - if (IsInvalidBg32(bg) != FALSE) + if (IsInvalidBg32(bg)) return NULL; - else if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) + else if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE)) return NULL; else return sGpuBgConfigs2[bg].tilemap; @@ -875,7 +881,7 @@ void* GetBgTilemapBuffer(u8 bg) void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset) { - if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) + if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg)) { if (mode != 0) CpuCopy16(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode); @@ -888,7 +894,7 @@ void CopyBgTilemapBufferToVram(u8 bg) { u16 sizeToLoad; - if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) + if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg)) { switch (GetBgType(bg)) { @@ -908,12 +914,12 @@ void CopyBgTilemapBufferToVram(u8 bg) void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height) { - const void* srcCopy; + const void *srcCopy; u16 destX16; u16 destY16; u16 mode; - if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) + if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg)) { switch (GetBgType(bg)) { @@ -997,29 +1003,29 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u16 y16; u16 mode; - if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) + if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg)) { switch (GetBgType(bg)) { - case 0: - for (y16 = y; y16 < (y + height); y16++) + case 0: + for (y16 = y; y16 < (y + height); y16++) + { + for (x16 = x; x16 < (x + width); x16++) { - for (x16 = x; x16 < (x + width); x16++) - { - ((u16*)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum; - } + ((u16*)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum; } - break; - case 1: - mode = GetBgMetricAffineMode(bg, 0x1); - for (y16 = y; y16 < (y + height); y16++) + } + break; + case 1: + mode = GetBgMetricAffineMode(bg, 0x1); + for (y16 = y; y16 < (y + height); y16++) + { + for (x16 = x; x16 < (x + width); x16++) { - for (x16 = x; x16 < (x + width); x16++) - { - ((u8*)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum; - } + ((u8*)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum; } - break; + } + break; } } } @@ -1071,12 +1077,12 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) { - u8 attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); + u8 screenSize = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); switch (whichMetric) { case 0: - switch (attribute) + switch (screenSize) { case 0: return 1; @@ -1088,7 +1094,7 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) } break; case 1: - switch (attribute) + switch (screenSize) { case 0: return 1; @@ -1101,7 +1107,7 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) } break; case 2: - switch (attribute) + switch (screenSize) { case 0: case 1: @@ -1117,12 +1123,12 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric) { - u8 attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); + u8 screenSize = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); switch (whichMetric) { case 0: - switch (attribute) + switch (screenSize) { case 0: return 0x1; @@ -1136,7 +1142,7 @@ u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric) break; case 1: case 2: - return 0x10 << attribute; + return 0x10 << screenSize; } return 0; } diff --git a/src/clock.c b/src/clock.c index aea6c20881..2d4da92ab5 100644 --- a/src/clock.c +++ b/src/clock.c @@ -1,7 +1,8 @@ #include "global.h" -#include "rom6.h" #include "event_data.h" #include "rtc.h" +#include "time_events.h" +#include "field_specials.h" #include "lottery_corner.h" #include "dewford_trend.h" #include "tv.h" diff --git a/src/contest.c b/src/contest.c index 34662b490c..0f29f4ad96 100644 --- a/src/contest.c +++ b/src/contest.c @@ -271,7 +271,7 @@ void LoadContestBgAfterMoveAnim(void) CopyBgTilemapBufferToVram(3); LoadCompressedPalette(gUnknown_08C16E90, 0, 0x200); sub_80D782C(); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u32 var = 5 + i; @@ -285,7 +285,7 @@ void sub_80D779C(void) ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, gUnknown_08587F34, ARRAY_COUNT(gUnknown_08587F34)); - SetBgAttribute(3, BG_CTRL_ATTR_PRIORITY, 1); + SetBgAttribute(3, BG_ATTR_WRAPAROUND, 1); for (i = 0; i < 4; i++) { SetBgTilemapBuffer(i, gContestResources->field_24[i]); @@ -747,7 +747,7 @@ void sub_80D8490(u8 taskId) gBattle_BG0_Y = 0xA0; gBattle_BG2_Y = 0xA0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 move = gContestMons[gContestPlayerMonIndex].moves[i]; u8 *r5 = sp8; @@ -782,7 +782,7 @@ void sub_80D8610(u8 taskId) u8 numMoves = 0; s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gContestMons[gContestPlayerMonIndex].moves[i] != MOVE_NONE) numMoves++; diff --git a/src/contest_ai.c b/src/contest_ai.c index 1342ea1020..97e8c8f29c 100644 --- a/src/contest_ai.c +++ b/src/contest_ai.c @@ -1,4 +1,5 @@ #include "global.h" +#include "battle.h" #include "contest.h" #include "random.h" #include "contest_ai.h" @@ -807,14 +808,14 @@ static void ContestAICmd_check_move_has_highest_appeal(void) u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4]; u8 appeal = gContestEffects[gContestMoves[move].effect].appeal; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 newMove = gContestMons[eContestAI->contestantId].moves[i]; if (newMove != 0 && appeal < gContestEffects[gContestMoves[newMove].effect].appeal) break; } - if (i == 4) + if (i == MAX_MON_MOVES) eContestAI->scriptResult = TRUE; else eContestAI->scriptResult = FALSE; @@ -838,14 +839,14 @@ static void ContestAICmd_unk_2F(void) u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4]; u8 jam = gContestEffects[gContestMoves[move].effect].jam; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 newMove = gContestMons[eContestAI->contestantId].moves[i]; if (newMove != 0 && jam < gContestEffects[gContestMoves[newMove].effect].jam) break; } - if (i == 4) + if (i == MAX_MON_MOVES) eContestAI->scriptResult = TRUE; else eContestAI->scriptResult = FALSE; @@ -1019,7 +1020,7 @@ static void ContestAICmd_check_combo_starter(void) int i; u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4]; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gContestMons[eContestAI->contestantId].moves[i]) { @@ -1065,7 +1066,7 @@ static void ContestAICmd_check_combo_finisher(void) int i; u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4]; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gContestMons[eContestAI->contestantId].moves[i]) { @@ -1677,7 +1678,7 @@ static void ContestAICmd_check_for_exciting_move(void) int result = 0; int i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gContestMons[eContestAI->contestantId].moves[i]) { @@ -1719,7 +1720,7 @@ static void ContestAICmd_unk_85(void) int i; u16 arg = T1_READ_16(gAIScriptPtr + 1); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 move = gContestMons[eContestAI->contestantId].moves[i]; if (move == arg) diff --git a/src/credits.c b/src/credits.c index 5e52e5fb71..3639d36e4c 100644 --- a/src/credits.c +++ b/src/credits.c @@ -2219,8 +2219,8 @@ static void sub_8177050(struct Sprite *sprite) } else { - SetGpuReg(REG_OFFSET_BLDCNT, 0xF40); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x10); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); sprite->oam.objMode = 1; sprite->data[3] = 16; sprite->data[0] += 1; diff --git a/src/dark.c b/src/dark.c index d4a4f0b8a1..efa6e94989 100644 --- a/src/dark.c +++ b/src/dark.c @@ -1,11 +1,29 @@ #include "global.h" #include "battle_anim.h" +#include "contest.h" +#include "gpu_regs.h" +#include "graphics.h" +#include "palette.h" +#include "scanline_effect.h" +#include "trig.h" +#include "util.h" #include "constants/rgb.h" -extern void sub_81138D4(struct Sprite *); -extern void sub_81139DC(struct Sprite *); -extern void sub_8113A90(struct Sprite *); -extern void sub_81144BC(struct Sprite *); +void sub_81138D4(struct Sprite *); +void sub_81139DC(struct Sprite *); +void sub_8113A90(struct Sprite *); +void sub_81144BC(struct Sprite *); +static void sub_811375C(u8); +static void sub_811381C(u8); +static void sub_8113950(struct Sprite *); +static void sub_8113A18(struct Sprite *); +static void sub_8113A58(struct Sprite *); +static void sub_8113B90(struct Sprite *); +static void sub_8113D60(u8); +static void sub_81140C8(u8); +static void sub_8114244(struct Task *); +static void sub_8114374(u8); +static void sub_8114748(u8); const struct SpriteTemplate gUnknown_08596FC8 = { @@ -167,3 +185,797 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8597138 = .affineAnims = gDummySpriteAffineAnimTable, .callback = sub_81144BC, }; + +void sub_81136E8(u8 taskId) +{ + int battler; + gTasks[taskId].data[0] = gBattleAnimArgs[0]; + battler = gBattleAnimAttacker; + gTasks[taskId].data[1] = 16; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); + if (GetBattlerSpriteBGPriorityRank(battler) == 1) + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG1); + else + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG2); + + gTasks[taskId].func = sub_811375C; +} + +static void sub_811375C(u8 taskId) +{ + u8 blendA = gTasks[taskId].data[1] >> 8; + u8 blendB = gTasks[taskId].data[1]; + if (gTasks[taskId].data[2] == (u8)gTasks[taskId].data[0]) + { + blendA++; + blendB--; + gTasks[taskId].data[1] = BLDALPHA_BLEND(blendB, blendA); + SetGpuReg(REG_OFFSET_BLDALPHA, gTasks[taskId].data[1]); + gTasks[taskId].data[2] = 0; + if (blendA == 16) + { + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = 1; + DestroyAnimVisualTask(taskId); + } + } + else + { + gTasks[taskId].data[2]++; + } +} + +void sub_81137E4(u8 taskId) +{ + gTasks[taskId].data[0] = gBattleAnimArgs[0]; + gTasks[taskId].data[1] = BLDALPHA_BLEND(0, 16); + gTasks[taskId].func = sub_811381C; + SetGpuReg(REG_OFFSET_BLDALPHA, gTasks[taskId].data[1]); +} + +static void sub_811381C(u8 taskId) +{ + u8 blendA = gTasks[taskId].data[1] >> 8; + u8 blendB = gTasks[taskId].data[1]; + if (gTasks[taskId].data[2] == (u8)gTasks[taskId].data[0]) + { + blendA--; + blendB++; + gTasks[taskId].data[1] = (blendA << 8) | blendB; + SetGpuReg(REG_OFFSET_BLDALPHA, gTasks[taskId].data[1]); + gTasks[taskId].data[2] = 0; + if (blendA == 0) + { + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + DestroyAnimVisualTask(taskId); + } + } + else + { + gTasks[taskId].data[2]++; + } +} + +void sub_8113888(u8 taskId) +{ + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); + if (GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) == 1) + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG1); + else + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG2); + + DestroyAnimVisualTask(taskId); +} + +void sub_81138D4(struct Sprite *sprite) +{ + sprite->data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->data[3] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + sprite->data[0] = 0x7E; + InitSpriteDataForLinearTranslation(sprite); + sprite->data[3] = -sprite->data[1]; + sprite->data[4] = -sprite->data[2]; + sprite->data[6] = 0xFFD8; + sprite->callback = sub_8113950; + sprite->callback(sprite); +} + +static void sub_8113950(struct Sprite *sprite) +{ + sprite->data[3] += sprite->data[1]; + sprite->data[4] += sprite->data[2]; + sprite->pos2.x = sprite->data[3] >> 8; + sprite->pos2.y = sprite->data[4] >> 8; + if (sprite->data[7] == 0) + { + sprite->data[3] += sprite->data[1]; + sprite->data[4] += sprite->data[2]; + sprite->pos2.x = sprite->data[3] >> 8; + sprite->pos2.y = sprite->data[4] >> 8; + sprite->data[0]--; + } + + sprite->pos2.y += Sin(sprite->data[5], sprite->data[6]); + sprite->data[5] = (sprite->data[5] + 3) & 0xFF; + if (sprite->data[5] > 0x7F) + { + sprite->data[5] = 0; + sprite->data[6] += 20; + sprite->data[7]++; + } + + if (--sprite->data[0] == 0) + DestroyAnimSprite(sprite); +} + +void sub_81139DC(struct Sprite *sprite) +{ + sprite->pos1.x += gBattleAnimArgs[0]; + sprite->pos1.y += gBattleAnimArgs[1]; + StartSpriteAffineAnim(sprite, gBattleAnimArgs[2]); + sprite->data[0] = gBattleAnimArgs[3]; + sprite->data[1] = gBattleAnimArgs[4]; + sprite->data[2] = gBattleAnimArgs[5]; + sprite->callback = sub_8113A18; +} + +static void sub_8113A18(struct Sprite *sprite) +{ + sprite->data[4] += sprite->data[0]; + sprite->data[5] += sprite->data[1]; + sprite->pos2.x = sprite->data[4] >> 8; + sprite->pos2.y = sprite->data[5] >> 8; + if (++sprite->data[3] == sprite->data[2]) + sprite->callback = sub_8113A58; +} + +static void sub_8113A58(struct Sprite *sprite) +{ + sprite->data[4] -= sprite->data[0]; + sprite->data[5] -= sprite->data[1]; + sprite->pos2.x = sprite->data[4] >> 8; + sprite->pos2.y = sprite->data[5] >> 8; + if (--sprite->data[3] == 0) + DestroySpriteAndMatrix(sprite); +} + +void sub_8113A90(struct Sprite *sprite) +{ + u8 battler; + s8 xOffset; + + if (gBattleAnimArgs[0] == 0) + battler = gBattleAnimAttacker; + else + battler = gBattleAnimTarget; + + xOffset = 20; + sprite->oam.tileNum += 4; + + switch (gBattleAnimArgs[1]) + { + case 0: + sprite->pos1.x = sub_80A861C(battler, 5) - 8; + sprite->pos1.y = sub_80A861C(battler, 2) + 8; + break; + case 1: + sprite->pos1.x = sub_80A861C(battler, 5) - 14; + sprite->pos1.y = sub_80A861C(battler, 2) + 16; + break; + case 2: + sprite->pos1.x = sub_80A861C(battler, 4) + 8; + sprite->pos1.y = sub_80A861C(battler, 2) + 8; + StartSpriteAffineAnim(sprite, 1); + xOffset = -20; + break; + case 3: + sprite->pos1.x = sub_80A861C(battler, 4) + 14; + sprite->pos1.y = sub_80A861C(battler, 2) + 16; + StartSpriteAffineAnim(sprite, 1); + xOffset = -20; + break; + } + + sprite->data[0] = 32; + sprite->data[2] = sprite->pos1.x + xOffset; + sprite->data[4] = sprite->pos1.y + 12; + sprite->data[5] = -12; + + InitAnimArcTranslation(sprite); + sprite->callback = sub_8113B90; +} + +static void sub_8113B90(struct Sprite *sprite) +{ + if (TranslateAnimArc(sprite)) + DestroySpriteAndMatrix(sprite); +} + +void sub_8113BAC(u8 taskId) +{ + struct ScanlineEffectParams scanlineParams; + struct UnknownAnimStruct2 unknownStruct; + u16 i; + u8 pos; + int var0; + struct Task *task = &gTasks[taskId]; + + task->data[7] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + 31; + task->data[6] = sub_80A861C(gBattleAnimAttacker, 2) - 7; + task->data[5] = task->data[7]; + task->data[4] = task->data[6]; + task->data[13] = (task->data[7] - task->data[6]) << 8; + + pos = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + task->data[14] = pos - 32; + task->data[15] = pos + 32; + + if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) + task->data[8] = -12; + else + task->data[8] = -64; + + task->data[3] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker); + if (task->data[3] == 1) + { + sub_80A6B30(&unknownStruct); + task->data[10] = gBattle_BG1_Y; + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG1); + FillPalette(0, unknownStruct.unk8 << 4, 32); + scanlineParams.dmaDest = ®_BG1VOFS; + var0 = WINOUT_WIN01_BG1; + if (!IsContest()) + gBattle_BG2_X += 240; + } + else + { + task->data[10] = gBattle_BG2_Y; + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG2); + FillPalette(0, 144, 32); + scanlineParams.dmaDest = ®_BG2VOFS; + var0 = WINOUT_WIN01_BG2; + if (!IsContest()) + gBattle_BG1_X += 240; + } + + scanlineParams.dmaControl = SCANLINE_EFFECT_DMACNT_16BIT; + scanlineParams.initState = 1; + scanlineParams.unused9 = 0; + task->data[11] = 0; + task->data[12] = 16; + task->data[0] = 0; + task->data[1] = 0; + task->data[2] = 0; + sub_8114374(3); + for (i = 0; i < 112; i++) + { + gScanlineEffectRegBuffers[0][i] = task->data[10]; + gScanlineEffectRegBuffers[1][i] = task->data[10]; + } + + ScanlineEffect_SetParams(scanlineParams); + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | (var0 ^ (WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR))); + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); + gBattle_WIN0H = (task->data[14] << 8) | task->data[15]; + gBattle_WIN0V = 160; + + task->func = sub_8113D60; +} + +static void sub_8113D60(u8 taskId) +{ + struct Task *task = &gTasks[taskId]; + + switch (task->data[0]) + { + case 0: + if (++task->data[1] > 1) + { + task->data[1] = 0; + if (++task->data[2] & 1) + { + if (task->data[11] != 12) + task->data[11]++; + } + else + { + if (task->data[12] != 8) + task->data[12]--; + } + + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(task->data[11], task->data[12])); + + if (task->data[11] == 12 && task->data[12] == 8) + task->data[0]++; + } + break; + case 1: + task->data[4] -= 8; + sub_8114244(task); + + if (task->data[4] < task->data[8]) + task->data[0]++; + break; + case 2: + task->data[4] -= 8; + sub_8114244(task); + task->data[14] += 4; + task->data[15] -= 4; + + if (task->data[14] >= task->data[15]) + task->data[14] = task->data[15]; + + gBattle_WIN0H = (task->data[14] << 8) | task->data[15]; + + if (task->data[14] == task->data[15]) + task->data[0]++; + break; + case 3: + gScanlineEffect.state = 3; + task->data[0]++; + break; + case 4: + DestroyAnimVisualTask(taskId); + break; + } +} + +void sub_8113E78(u8 taskId) +{ + struct UnknownAnimStruct2 unknownStruct; + struct ScanlineEffectParams scanlineParams; + u8 x; + u16 i; + struct Task *task = &gTasks[taskId]; + + switch (task->data[0]) + { + case 0: + if (IsContest() == TRUE) + { + gBattle_WIN0H = 0; + gBattle_WIN0V = 0; + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); + DestroyAnimVisualTask(taskId); + } + else + { + task->data[3] = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget); + if (task->data[3] == 1) + { + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG1); + gBattle_BG2_X += 240; + } + else + { + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG2); + gBattle_BG1_X += 240; + } + + task->data[0]++; + } + break; + case 1: + if (task->data[3] == 1) + { + sub_80A6B30(&unknownStruct); + task->data[10] = gBattle_BG1_Y; + FillPalette(0, unknownStruct.unk8 << 4, 32); + } + else + { + task->data[10] = gBattle_BG2_Y; + FillPalette(0, 144, 32); + } + + sub_8114374(3); + task->data[0]++; + break; + case 2: + task->data[7] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 31; + task->data[6] = sub_80A861C(gBattleAnimTarget, 2) - 7; + task->data[13] = (task->data[7] - task->data[6]) << 8; + x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + task->data[14] = x - 4; + task->data[15] = x + 4; + + if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) + task->data[8] = -12; + else + task->data[8] = -64; + + task->data[4] = task->data[8]; + task->data[5] = task->data[8]; + task->data[11] = 12; + task->data[12] = 8; + task->data[0]++; + break; + case 3: + if (task->data[3] == 1) + scanlineParams.dmaDest = ®_BG1VOFS; + else + scanlineParams.dmaDest = ®_BG2VOFS; + + for (i = 0; i < 112; i++) + { + gScanlineEffectRegBuffers[0][i] = task->data[10] + (159 - i); + gScanlineEffectRegBuffers[1][i] = task->data[10] + (159 - i); + } + + scanlineParams.dmaControl = SCANLINE_EFFECT_DMACNT_16BIT; + scanlineParams.initState = 1; + scanlineParams.unused9 = 0; + ScanlineEffect_SetParams(scanlineParams); + task->data[0]++; + break; + case 4: + if (task->data[3] == 1) + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | WINOUT_WIN01_BG0 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); + else + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); + + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); + gBattle_WIN0H = (task->data[14] << 8) | task->data[15]; + gBattle_WIN0V = 160; + + task->data[0] = 0; + task->data[1] = 0; + task->data[2] = 0; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(12, 8)); + task->func = sub_81140C8; + break; + } +} + +static void sub_81140C8(u8 taskId) +{ + u8 pos; + u16 i; + struct Task *task = &gTasks[taskId]; + + switch (task->data[0]) + { + case 0: + task->data[5] += 8; + if (task->data[5] >= task->data[7]) + task->data[5] = task->data[7]; + + sub_8114244(task); + if (task->data[5] == task->data[7]) + task->data[0]++; + break; + case 1: + if (task->data[15] - task->data[14] < 0x40) + { + task->data[14] -= 4; + task->data[15] += 4; + } + else + { + task->data[1] = 1; + } + + gBattle_WIN0H = (task->data[14] << 8) | task->data[15]; + task->data[4] += 8; + if (task->data[4] >= task->data[6]) + task->data[4] = task->data[6]; + + sub_8114244(task); + if (task->data[4] == task->data[6] && task->data[1]) + { + task->data[1] = 0; + task->data[0]++; + } + break; + case 2: + if (++task->data[1] > 1) + { + task->data[1] = 0; + task->data[2]++; + if (task->data[2] & 1) + { + if (task->data[11]) + task->data[11]--; + } + else + { + if (task->data[12] < 16) + task->data[12]++; + } + + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(task->data[11], task->data[12])); + if (task->data[11] == 0 && task->data[12] == 16) + task->data[0]++; + } + break; + case 3: + gScanlineEffect.state = 3; + task->data[0]++; + break; + case 4: + gBattle_WIN0H = 0; + gBattle_WIN0V = 0; + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); + DestroyAnimVisualTask(taskId); + break; + } +} + +static void sub_8114244(struct Task *task) +{ + int var0, var1; + s16 var2; + s16 i; + int var4; + + var2 = task->data[5] - task->data[4]; + if (var2 != 0) + { + var0 = task->data[13] / var2; + var1 = task->data[6] << 8; + + for (i = 0; i < task->data[4]; i++) + { + gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = task->data[10] - (i - 159); + } + + for (i = task->data[4]; i <= task->data[5]; i++) + { + if (i >= 0) + { + s16 var3 = (var1 >> 8) - i; + gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = var3 + task->data[10]; + } + + var1 += var0; + } + + var4 = task->data[10] - (i - 159); + for (i = i; i < task->data[7]; i++) + { + if (i >= 0) + { + gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = var4; + var4--; + } + } + } + else + { + var4 = task->data[10] + 159; + for (i = 0; i < 112; i++) + { + gScanlineEffectRegBuffers[0][i] = var4; + gScanlineEffectRegBuffers[1][i] = var4; + var4--; + } + } +} + +static void sub_8114374(u8 priority) +{ + u16 i; + + for (i = 0; i < MAX_BATTLERS_COUNT; i++) + { + u8 spriteId = GetAnimBattlerSpriteId(i); + if (spriteId != 0xFF) + gSprites[spriteId].oam.priority = priority; + } +} + +void sub_81143C0(u8 taskId) +{ + u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0; + MoveBattlerSpriteToBG(gBattleAnimAttacker, toBG2, TRUE); + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = 0; + + if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) + { + MoveBattlerSpriteToBG(gBattleAnimAttacker ^ 2, toBG2 ^ 1, TRUE); + gSprites[gBattlerSpriteIds[gBattleAnimAttacker ^ 2]].invisible = 0; + } + + DestroyAnimVisualTask(taskId); +} + +void sub_8114470(u8 taskId) +{ + u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0; + sub_80A477C(toBG2); + + if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) + sub_80A477C(toBG2 ^ 1); + + DestroyAnimVisualTask(taskId); +} + +void sub_81144BC(struct Sprite *sprite) +{ + sprite->pos1.x += gBattleAnimArgs[0]; + sprite->pos1.y += gBattleAnimArgs[1]; + StartSpriteAnim(sprite, gBattleAnimArgs[2]); + sprite->callback = RunStoredCallbackWhenAnimEnds; + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); +} + +void sub_81144F8(u8 taskId) +{ + u16 species; + u8 spriteId; + u8 newSpriteId; + u16 paletteNum; + struct UnknownAnimStruct2 unknownStruct; + int var0 = 0; + + gBattle_WIN0H = var0; + gBattle_WIN0V = var0; + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | WINOUT_WIN01_BG0 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); + SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJWIN_ON); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG1); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(8, 12)); + SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 0); + SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 0); + if (!IsContest()) + SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1); + + if (IsDoubleBattle() && !IsContest()) + { + if (GetBattlerPosition(gBattleAnimAttacker) == B_POSITION_OPPONENT_RIGHT || GetBattlerPosition(gBattleAnimAttacker) == B_POSITION_PLAYER_LEFT) + { + if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)) == TRUE) + { + gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority--; + SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1); + var0 = 1; + } + } + } + + if (IsContest()) + { + species = gContestResources->field_18->species; + } + else + { + if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattleAnimAttacker]], MON_DATA_SPECIES); + else + species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattleAnimAttacker]], MON_DATA_SPECIES); + } + + spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + newSpriteId = sub_80A89C8(gBattleAnimAttacker, spriteId, species); + + sub_80A6B30(&unknownStruct); + sub_80A6D48(unknownStruct.bgId, gUnknown_08C1D210); + sub_80A6CC0(unknownStruct.bgId, gUnknown_08C1D0AC, unknownStruct.tilesOffset); + LoadCompressedPalette(gUnknown_08C1D1E8, unknownStruct.unk8 << 4, 32); + + gBattle_BG1_X = -gSprites[spriteId].pos1.x + 96; + gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32; + paletteNum = 16 + gSprites[spriteId].oam.paletteNum; + + if (gBattleAnimArgs[1] == 0) + SetGreyscaleOrOriginalPalette(paletteNum, FALSE); + else + BlendPalette(paletteNum * 16, 16, 11, gBattleAnimArgs[2]); + + gTasks[taskId].data[0] = newSpriteId; + gTasks[taskId].data[1] = gBattleAnimArgs[0]; + gTasks[taskId].data[2] = gBattleAnimArgs[1]; + gTasks[taskId].data[3] = gBattleAnimArgs[2]; + gTasks[taskId].data[6] = var0; + gTasks[taskId].func = sub_8114748; +} + +static void sub_8114748(u8 taskId) +{ + struct UnknownAnimStruct2 unknownStruct; + u16 paletteNum; + u8 spriteId; + u8 taskIdCopy = taskId; + + gTasks[taskIdCopy].data[10] += 4; + gBattle_BG1_X -= 4; + if (gTasks[taskIdCopy].data[10] == 128) + { + gTasks[taskIdCopy].data[10] = 0; + gBattle_BG1_X += 128; + gTasks[taskIdCopy].data[11]++; + if (gTasks[taskIdCopy].data[11] == 2) + { + spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + paletteNum = 16 + gSprites[spriteId].oam.paletteNum; + if (gTasks[taskIdCopy].data[1] == 0) + SetGreyscaleOrOriginalPalette(paletteNum, 1); + + DestroySprite(&gSprites[gTasks[taskIdCopy].data[0]]); + sub_80A6B30(&unknownStruct); + sub_80A6C68(unknownStruct.bgId); + if (gTasks[taskIdCopy].data[6] == 1) + gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority++; + } + else if (gTasks[taskIdCopy].data[11] == 3) + { + gBattle_WIN0H = 0; + gBattle_WIN0V = 0; + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); + if (!IsContest()) + SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0); + + SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) ^ DISPCNT_OBJWIN_ON); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + DestroyAnimVisualTask(taskId); + } + } +} + +void sub_811489C(u8 taskId) +{ + u8 spriteId; + u8 battler; + bool8 calcSpriteId = FALSE; + u8 position = B_POSITION_PLAYER_LEFT; + + switch (gBattleAnimArgs[0]) + { + case 0: + case 1: + case 2: + case 3: + spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); + break; + case 4: + position = B_POSITION_PLAYER_LEFT; + calcSpriteId = TRUE; + break; + case 5: + position = B_POSITION_PLAYER_RIGHT; + calcSpriteId = TRUE; + break; + case 6: + position = B_POSITION_OPPONENT_LEFT; + calcSpriteId = TRUE; + break; + case 7: + position = B_POSITION_OPPONENT_RIGHT; + calcSpriteId = TRUE; + break; + default: + spriteId = 0xFF; + break; + } + + if (calcSpriteId) + { + battler = GetBattlerAtPosition(position); + if (IsBattlerSpriteVisible(battler)) + spriteId = gBattlerSpriteIds[battler]; + else + spriteId = 0xFF; + } + + if (spriteId != 0xFF) + SetGreyscaleOrOriginalPalette(gSprites[spriteId].oam.paletteNum + 16, gBattleAnimArgs[1]); + + DestroyAnimVisualTask(taskId); +} + +void sub_8114960(u8 taskId) +{ + if (gAnimMoveTurn < 2) + gBattleAnimArgs[7] = 0; + + if (gAnimMoveTurn == 2) + gBattleAnimArgs[7] = 1; + + DestroyAnimVisualTask(taskId); +} diff --git a/src/data/pokemon/tutor_learnsets.h b/src/data/pokemon/tutor_learnsets.h new file mode 100644 index 0000000000..27fb40621f --- /dev/null +++ b/src/data/pokemon/tutor_learnsets.h @@ -0,0 +1,5783 @@ +#define TUTOR_MOVE_MEGA_PUNCH 0 +#define TUTOR_MOVE_SWORDS_DANCE 1 +#define TUTOR_MOVE_MEGA_KICK 2 +#define TUTOR_MOVE_BODY_SLAM 3 +#define TUTOR_MOVE_DOUBLE_EDGE 4 +#define TUTOR_MOVE_COUNTER 5 +#define TUTOR_MOVE_SEISMIC_TOSS 6 +#define TUTOR_MOVE_MIMIC 7 +#define TUTOR_MOVE_METRONOME 8 +#define TUTOR_MOVE_SOFT_BOILED 9 +#define TUTOR_MOVE_DREAM_EATER 10 +#define TUTOR_MOVE_THUNDER_WAVE 11 +#define TUTOR_MOVE_EXPLOSION 12 +#define TUTOR_MOVE_ROCK_SLIDE 13 +#define TUTOR_MOVE_SUBSTITUTE 14 +#define TUTOR_MOVE_DYNAMIC_PUNCH 15 +#define TUTOR_MOVE_ROLLOUT 16 +#define TUTOR_MOVE_PSYCH_UP 17 +#define TUTOR_MOVE_SNORE 18 +#define TUTOR_MOVE_ICY_WIND 19 +#define TUTOR_MOVE_ENDURE 20 +#define TUTOR_MOVE_MUD_SLAP 21 +#define TUTOR_MOVE_ICE_PUNCH 22 +#define TUTOR_MOVE_SWAGGER 23 +#define TUTOR_MOVE_SLEEP_TALK 24 +#define TUTOR_MOVE_SWIFT 25 +#define TUTOR_MOVE_DEFENSE_CURL 26 +#define TUTOR_MOVE_THUNDER_PUNCH 27 +#define TUTOR_MOVE_FIRE_PUNCH 28 +#define TUTOR_MOVE_FURY_CUTTER 29 + +const u16 gTutorMoves[] = +{ + [TUTOR_MOVE_MEGA_PUNCH] = MOVE_MEGA_PUNCH, + [TUTOR_MOVE_SWORDS_DANCE] = MOVE_SWORDS_DANCE, + [TUTOR_MOVE_MEGA_KICK] = MOVE_MEGA_KICK, + [TUTOR_MOVE_BODY_SLAM] = MOVE_BODY_SLAM, + [TUTOR_MOVE_DOUBLE_EDGE] = MOVE_DOUBLE_EDGE, + [TUTOR_MOVE_COUNTER] = MOVE_COUNTER, + [TUTOR_MOVE_SEISMIC_TOSS] = MOVE_SEISMIC_TOSS, + [TUTOR_MOVE_MIMIC] = MOVE_MIMIC, + [TUTOR_MOVE_METRONOME] = MOVE_METRONOME, + [TUTOR_MOVE_SOFT_BOILED] = MOVE_SOFT_BOILED, + [TUTOR_MOVE_DREAM_EATER] = MOVE_DREAM_EATER, + [TUTOR_MOVE_THUNDER_WAVE] = MOVE_THUNDER_WAVE, + [TUTOR_MOVE_EXPLOSION] = MOVE_EXPLOSION, + [TUTOR_MOVE_ROCK_SLIDE] = MOVE_ROCK_SLIDE, + [TUTOR_MOVE_SUBSTITUTE] = MOVE_SUBSTITUTE, + [TUTOR_MOVE_DYNAMIC_PUNCH] = MOVE_DYNAMIC_PUNCH, + [TUTOR_MOVE_ROLLOUT] = MOVE_ROLLOUT, + [TUTOR_MOVE_PSYCH_UP] = MOVE_PSYCH_UP, + [TUTOR_MOVE_SNORE] = MOVE_SNORE, + [TUTOR_MOVE_ICY_WIND] = MOVE_ICY_WIND, + [TUTOR_MOVE_ENDURE] = MOVE_ENDURE, + [TUTOR_MOVE_MUD_SLAP] = MOVE_MUD_SLAP, + [TUTOR_MOVE_ICE_PUNCH] = MOVE_ICE_PUNCH, + [TUTOR_MOVE_SWAGGER] = MOVE_SWAGGER, + [TUTOR_MOVE_SLEEP_TALK] = MOVE_SLEEP_TALK, + [TUTOR_MOVE_SWIFT] = MOVE_SWIFT, + [TUTOR_MOVE_DEFENSE_CURL] = MOVE_DEFENSE_CURL, + [TUTOR_MOVE_THUNDER_PUNCH] = MOVE_THUNDER_PUNCH, + [TUTOR_MOVE_FIRE_PUNCH] = MOVE_FIRE_PUNCH, + [TUTOR_MOVE_FURY_CUTTER] = MOVE_FURY_CUTTER, +}; + +#define TUTOR_LEARNSET(moves) ((u32)(moves)) +#define TUTOR(move) ((u64)1 << (TUTOR_##move)) + +static const u32 sTutorLearnsets[] = +{ + [SPECIES_NONE] = TUTOR_LEARNSET(0), + + [SPECIES_BULBASAUR] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_IVYSAUR] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_VENUSAUR] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CHARMANDER] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CHARMELEON] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CHARIZARD] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SQUIRTLE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_WARTORTLE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_BLASTOISE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_CATERPIE] = TUTOR_LEARNSET(0), + + [SPECIES_METAPOD] = TUTOR_LEARNSET(0), + + [SPECIES_BUTTERFREE] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_WEEDLE] = TUTOR_LEARNSET(0), + + [SPECIES_KAKUNA] = TUTOR_LEARNSET(0), + + [SPECIES_BEEDRILL] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_PIDGEY] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_PIDGEOTTO] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_PIDGEOT] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_RATTATA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_RATICATE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SPEAROW] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_FEAROW] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_EKANS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_ARBOK] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_PIKACHU] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_RAICHU] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_SANDSHREW] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SANDSLASH] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_NIDORAN_F] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_NIDORINA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_NIDOQUEEN] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_NIDORAN_M] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_NIDORINO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_NIDOKING] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CLEFAIRY] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_CLEFABLE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_VULPIX] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_NINETALES] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_JIGGLYPUFF] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_WIGGLYTUFF] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_ZUBAT] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_GOLBAT] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_ODDISH] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_GLOOM] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_VILEPLUME] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_PARAS] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_PARASECT] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_VENONAT] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_VENOMOTH] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_DIGLETT] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_DUGTRIO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_MEOWTH] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_PERSIAN] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_PSYDUCK] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_GOLDUCK] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_MANKEY] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_PRIMEAPE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_GROWLITHE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_ARCANINE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_POLIWAG] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_POLIWHIRL] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_POLIWRATH] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_ABRA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_KADABRA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_ALAKAZAM] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MACHOP] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MACHOKE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MACHAMP] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_BELLSPROUT] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_WEEPINBELL] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_VICTREEBEL] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_TENTACOOL] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_TENTACRUEL] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_GEODUDE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_GRAVELER] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_GOLEM] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_PONYTA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_RAPIDASH] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SLOWPOKE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SLOWBRO] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_MAGNEMITE] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MAGNETON] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_FARFETCHD] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_DODUO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_DODRIO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SEEL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_DEWGONG] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_GRIMER] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MUK] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_SHELLDER] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_CLOYSTER] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_GASTLY] = TUTOR_LEARNSET(TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_HAUNTER] = TUTOR_LEARNSET(TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_GENGAR] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_ONIX] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_DROWZEE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_HYPNO] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_KRABBY] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_KINGLER] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_VOLTORB] = TUTOR_LEARNSET(TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_ELECTRODE] = TUTOR_LEARNSET(TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_EXEGGCUTE] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_EXEGGUTOR] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_CUBONE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MAROWAK] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_HITMONLEE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_HITMONCHAN] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_LICKITUNG] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_KOFFING] = TUTOR_LEARNSET(TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_WEEZING] = TUTOR_LEARNSET(TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_RHYHORN] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_RHYDON] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CHANSEY] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_TANGELA] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_KANGASKHAN] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_HORSEA] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SEADRA] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_GOLDEEN] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SEAKING] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_STARYU] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_STARMIE] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MR_MIME] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_SCYTHER] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_JYNX] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_ELECTABUZZ] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MAGMAR] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_PINSIR] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_TAUROS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_MAGIKARP] = TUTOR_LEARNSET(0), + + [SPECIES_GYARADOS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_LAPRAS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_DITTO] = TUTOR_LEARNSET(0), + + [SPECIES_EEVEE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_VAPOREON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_JOLTEON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_FLAREON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_PORYGON] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_OMANYTE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_OMASTAR] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_KABUTO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_KABUTOPS] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_AERODACTYL] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SNORLAX] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_ARTICUNO] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_ZAPDOS] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MOLTRES] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_DRATINI] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_DRAGONAIR] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_DRAGONITE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_MEWTWO] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MEW] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CHIKORITA] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_BAYLEEF] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_MEGANIUM] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CYNDAQUIL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_QUILAVA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_TYPHLOSION] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_TOTODILE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_CROCONAW] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_FERALIGATR] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SENTRET] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_FURRET] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_HOOTHOOT] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_NOCTOWL] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_LEDYBA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_LEDIAN] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_SPINARAK] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_ARIADOS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_CROBAT] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_CHINCHOU] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_LANTURN] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_PICHU] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_CLEFFA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_IGGLYBUFF] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_TOGEPI] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_TOGETIC] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_NATU] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_XATU] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MAREEP] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_FLAAFFY] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_AMPHAROS] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_BELLOSSOM] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_MARILL] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_AZUMARILL] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SUDOWOODO] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_POLITOED] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_HOPPIP] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SKIPLOOM] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_JUMPLUFF] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_AIPOM] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SUNKERN] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_SUNFLORA] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_YANMA] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_WOOPER] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_QUAGSIRE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_ESPEON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_UMBREON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MURKROW] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SLOWKING] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_MISDREAVUS] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_UNOWN] = TUTOR_LEARNSET(0), + + [SPECIES_WOBBUFFET] = TUTOR_LEARNSET(0), + + [SPECIES_GIRAFARIG] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_PINECO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_FORRETRESS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_DUNSPARCE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_GLIGAR] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_STEELIX] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SNUBBULL] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_GRANBULL] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_QWILFISH] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SCIZOR] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SHUCKLE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_HERACROSS] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SNEASEL] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_TEDDIURSA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_URSARING] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SLUGMA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_MAGCARGO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SWINUB] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_PILOSWINE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_CORSOLA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_REMORAID] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_OCTILLERY] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_DELIBIRD] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MANTINE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SKARMORY] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_HOUNDOUR] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_HOUNDOOM] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_KINGDRA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_PHANPY] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_DONPHAN] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_PORYGON2] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_STANTLER] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SMEARGLE] = TUTOR_LEARNSET(0), + + [SPECIES_TYROGUE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_HITMONTOP] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SMOOCHUM] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_ELEKID] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MAGBY] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MILTANK] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_BLISSEY] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SOFT_BOILED) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_RAIKOU] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_ENTEI] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SUICUNE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_LARVITAR] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_PUPITAR] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_TYRANITAR] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_LUGIA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_HO_OH] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_CELEBI] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_TREECKO] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_GROVYLE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SCEPTILE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_TORCHIC] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_COMBUSKEN] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_BLAZIKEN] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_MUDKIP] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_MARSHTOMP] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SWAMPERT] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_POOCHYENA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_MIGHTYENA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_ZIGZAGOON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_LINOONE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_WURMPLE] = TUTOR_LEARNSET(0), + + [SPECIES_SILCOON] = TUTOR_LEARNSET(0), + + [SPECIES_BEAUTIFLY] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_CASCOON] = TUTOR_LEARNSET(0), + + [SPECIES_DUSTOX] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_LOTAD] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_LOMBRE] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_LUDICOLO] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_SEEDOT] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_NUZLEAF] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SHIFTRY] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_NINCADA] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_NINJASK] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SHEDINJA] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_TAILLOW] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SWELLOW] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SHROOMISH] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_BRELOOM] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SPINDA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_WINGULL] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_PELIPPER] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_SURSKIT] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MASQUERAIN] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_WAILMER] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_WAILORD] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SKITTY] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_DELCATTY] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_KECLEON] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_BALTOY] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_CLAYDOL] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_NOSEPASS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_TORKOAL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_SABLEYE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_BARBOACH] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_WHISCASH] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_LUVDISC] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_CORPHISH] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CRAWDAUNT] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_FEEBAS] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MILOTIC] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_CARVANHA] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SHARPEDO] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_TRAPINCH] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_VIBRAVA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_FLYGON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_MAKUHITA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_HARIYAMA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_ELECTRIKE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_MANECTRIC] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_NUMEL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_CAMERUPT] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SPHEAL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SEALEO] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_WALREIN] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_CACNEA] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CACTURNE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SNORUNT] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_GLALIE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_LUNATONE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SOLROCK] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_AZURILL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_SPOINK] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_GRUMPIG] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_PLUSLE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_MINUN] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_MAWILE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_MEDITITE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_MEDICHAM] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_SWABLU] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_ALTARIA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_WYNAUT] = TUTOR_LEARNSET(0), + + [SPECIES_DUSKULL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_DUSCLOPS] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_ROSELIA] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SLAKOTH] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_VIGOROTH] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SLAKING] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_GULPIN] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_SWALOT] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_TROPIUS] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_WHISMUR] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_LOUDRED] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_EXPLOUD] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_CLAMPERL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_HUNTAIL] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_GOREBYSS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT)), + + [SPECIES_ABSOL] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SHUPPET] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_BANETTE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_SEVIPER] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_ZANGOOSE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_RELICANTH] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_ARON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_LAIRON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_AGGRON] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_CASTFORM] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_VOLBEAT] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_ILLUMISE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_LILEEP] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_CRADILY] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK)), + + [SPECIES_ANORITH] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_ARMALDO] = TUTOR_LEARNSET(TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_RALTS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_KIRLIA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_GARDEVOIR] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_BAGON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SHELGON] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_SALAMENCE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_BELDUM] = TUTOR_LEARNSET(0), + + [SPECIES_METANG] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_METAGROSS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_REGIROCK] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_REGICE] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_REGISTEEL] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_EXPLOSION) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH)), + + [SPECIES_KYOGRE] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL)), + + [SPECIES_GROUDON] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_SWORDS_DANCE) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_RAYQUAZA] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_LATIAS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_LATIOS] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_FURY_CUTTER)), + + [SPECIES_JIRACHI] = TUTOR_LEARNSET(TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_METRONOME) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_DEFENSE_CURL) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_DEOXYS] = TUTOR_LEARNSET(TUTOR(MOVE_MEGA_PUNCH) + | TUTOR(MOVE_MEGA_KICK) + | TUTOR(MOVE_BODY_SLAM) + | TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_COUNTER) + | TUTOR(MOVE_SEISMIC_TOSS) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_THUNDER_WAVE) + | TUTOR(MOVE_ROCK_SLIDE) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_DYNAMIC_PUNCH) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_MUD_SLAP) + | TUTOR(MOVE_ICE_PUNCH) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_SWIFT) + | TUTOR(MOVE_THUNDER_PUNCH) + | TUTOR(MOVE_FIRE_PUNCH)), + + [SPECIES_CHIMECHO] = TUTOR_LEARNSET(TUTOR(MOVE_DOUBLE_EDGE) + | TUTOR(MOVE_MIMIC) + | TUTOR(MOVE_DREAM_EATER) + | TUTOR(MOVE_SUBSTITUTE) + | TUTOR(MOVE_ROLLOUT) + | TUTOR(MOVE_PSYCH_UP) + | TUTOR(MOVE_SNORE) + | TUTOR(MOVE_ICY_WIND) + | TUTOR(MOVE_ENDURE) + | TUTOR(MOVE_SWAGGER) + | TUTOR(MOVE_SLEEP_TALK) + | TUTOR(MOVE_DEFENSE_CURL)), + +}; + diff --git a/src/daycare.c b/src/daycare.c index 26fa0251e0..6bdbd987e0 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -636,7 +636,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru u16 i, j; numSharedParentMoves = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { sHatchedEggMotherMoves[i] = 0; sHatchedEggFatherMoves[i] = 0; @@ -648,7 +648,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru sHatchedEggLevelUpMoves[i] = 0; numLevelUpMoves = GetLevelUpMovesBySpecies(GetMonData(egg, MON_DATA_SPECIES), sHatchedEggLevelUpMoves); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { sHatchedEggFatherMoves[i] = GetBoxMonData(father, MON_DATA_MOVE1 + i); sHatchedEggMotherMoves[i] = GetBoxMonData(mother, MON_DATA_MOVE1 + i); @@ -656,7 +656,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru numEggMoves = GetEggMoves(egg, sHatchedEggEggMoves); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (sHatchedEggFatherMoves[i] != MOVE_NONE) { @@ -675,7 +675,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru break; } } - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (sHatchedEggFatherMoves[i] != MOVE_NONE) { @@ -689,18 +689,18 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru } } } - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (sHatchedEggFatherMoves[i] == MOVE_NONE) break; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { if (sHatchedEggFatherMoves[i] == sHatchedEggMotherMoves[j] && sHatchedEggFatherMoves[i] != MOVE_NONE) sHatchedEggFinalMoves[numSharedParentMoves++] = sHatchedEggFatherMoves[i]; } } - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (sHatchedEggFinalMoves[i] == MOVE_NONE) break; diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 360dd24664..a7b3e30b04 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -502,7 +502,7 @@ static void CB2_EggHatch_0(void) ChangeBgX(0, 0, 0); ChangeBgY(0, 0, 0); - SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 2); + SetBgAttribute(1, BG_ATTR_PRIORITY, 2); SetBgTilemapBuffer(1, Alloc(0x1000)); SetBgTilemapBuffer(0, Alloc(0x2000)); diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 1070c69e90..2c1df814b4 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -1479,20 +1479,20 @@ static void InitMovingBackgroundTask(bool8 isLink) if (!isLink) { - SetGpuReg(REG_OFFSET_BLDCNT, 0x442); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x808); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG2); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(8, 8)); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG2_ON | DISPCNT_BG1_ON | DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP); - SetBgAttribute(innerBgId, BG_CTRL_ATTR_MOSAIC, 2); - SetBgAttribute(outerBgId, BG_CTRL_ATTR_MOSAIC, 2); + SetBgAttribute(innerBgId, BG_ATTR_PRIORITY, 2); + SetBgAttribute(outerBgId, BG_ATTR_PRIORITY, 2); ShowBg(1); ShowBg(2); } else { - SetGpuReg(REG_OFFSET_BLDCNT, 0x842); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x808); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG3); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(8, 8)); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG3_ON | DISPCNT_BG1_ON | DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP); } @@ -1529,8 +1529,8 @@ static void sub_8140174(void) gBattle_BG1_X = 0; gBattle_BG1_Y = 0; gBattle_BG2_X = 0; - SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, sub_80391E0(1, 5)); - SetBgAttribute(2, BG_CTRL_ATTR_MOSAIC, sub_80391E0(2, 5)); + SetBgAttribute(1, BG_ATTR_PRIORITY, sub_80391E0(1, 5)); + SetBgAttribute(2, BG_ATTR_PRIORITY, sub_80391E0(2, 5)); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG3_ON | DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP); Free(sEvoMovingBgPtr); } diff --git a/src/field_effect.c b/src/field_effect.c index e1850d0015..9a65a444bd 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -9,9 +9,10 @@ #include "field_screen_effect.h" #include "field_weather.h" #include "fieldmap.h" -#include "fldeff_groundshake.h" +#include "fldeff.h" #include "gpu_regs.h" #include "main.h" +#include "mirage_tower.h" #include "menu.h" #include "metatile_behavior.h" #include "overworld.h" @@ -2325,7 +2326,7 @@ static void TeleportFieldEffectTask4(struct Task *task) { if (task->data[5] == FALSE) { - sub_81BE72C(); + ClearMirageTowerPulseBlendEffect(); task->data[5] = TRUE; } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 7a6e16dd32..f14ac83293 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1310,7 +1310,7 @@ bool8 PartyHasMonWithSurf(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE) break; - if (pokemon_has_move(&gPlayerParty[i], MOVE_SURF)) + if (MonKnowsMove(&gPlayerParty[i], MOVE_SURF)) return TRUE; } } diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index b0572b393a..a6b7e7c248 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -17,6 +17,7 @@ #include "load_save.h" #include "main.h" #include "menu.h" +#include "mirage_tower.h" #include "event_obj_lock.h" #include "metatile_behavior.h" #include "palette.h" @@ -34,7 +35,6 @@ extern bool32 sub_81D6534(void); extern bool8 walkrun_is_standing_still(void); extern void ScriptUnfreezeEventObjects(void); -extern void sub_81BE72C(void); extern void sub_80FB768(void); extern void sub_808D194(void); extern void sub_808D1C8(void); @@ -673,7 +673,7 @@ static void sub_80AFA0C(u8 taskId) { if (task->data[1] == 0) { - sub_81BE72C(); + ClearMirageTowerPulseBlendEffect(); task->data[1] = 1; } if (BGMusicStopped()) diff --git a/src/field_specials.c b/src/field_specials.c index 64ff46ce21..5e1c86dfe2 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3193,7 +3193,7 @@ void sub_813AEB4(void) i = 0; do { - if (gUnknown_0861500C[i] == gUnknown_085B320C[temp2]) + if (gTutorMoves[i] == gUnknown_085B320C[temp2]) { gSpecialVar_0x8005 = i; break; @@ -3206,7 +3206,7 @@ void sub_813AEB4(void) i = 0; do { - if (gUnknown_0861500C[i] == gUnknown_085B31F8[temp2]) + if (gTutorMoves[i] == gUnknown_085B31F8[temp2]) { gSpecialVar_0x8005 = i; break; @@ -3817,7 +3817,7 @@ void sub_813B9A0(void) } } -bool32 sub_813B9C0(void) +bool8 sub_813B9C0(void) { static const u16 gUnknown_085B3444[] = { MAP_OLDALE_TOWN_POKEMON_CENTER_1F, diff --git a/src/fieldmap.c b/src/fieldmap.c index 11161b8df8..4efbc12345 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -1,11 +1,11 @@ #include "global.h" #include "bg.h" #include "fieldmap.h" +#include "fldeff.h" #include "fldeff_misc.h" -#include "fldeff_cut.h" -#include "fldeff_groundshake.h" #include "frontier_util.h" #include "menu.h" +#include "mirage_tower.h" #include "overworld.h" #include "palette.h" #include "pokenav.h" @@ -763,7 +763,7 @@ bool8 CameraMove(int x, int y) else { save_serialize_map(); - sub_81BE72C(); + ClearMirageTowerPulseBlendEffect(); old_x = gSaveBlock1Ptr->pos.x; old_y = gSaveBlock1Ptr->pos.y; connection = sub_8088950(direction, gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y); diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index 6a310efd2a..60887a5cce 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -5,12 +5,11 @@ #include "field_effect.h" #include "field_player_avatar.h" #include "fieldmap.h" -#include "fldeff_cut.h" +#include "fldeff.h" #include "alloc.h" #include "metatile_behavior.h" #include "overworld.h" #include "party_menu.h" -#include "rom6.h" #include "script.h" #include "sound.h" #include "sprite.h" diff --git a/src/fldeff_dig.c b/src/fldeff_dig.c new file mode 100644 index 0000000000..b39d25182b --- /dev/null +++ b/src/fldeff_dig.c @@ -0,0 +1,63 @@ +#include "global.h" +#include "braille_puzzles.h" +#include "field_effect.h" +#include "field_player_avatar.h" +#include "fldeff.h" +#include "item_use.h" +#include "overworld.h" +#include "party_menu.h" +#include "sprite.h" +#include "constants/field_effects.h" + +// static functions +static void hm2_dig(void); +static void sub_8135780(void); + +// text +bool8 SetUpFieldMove_Dig(void) +{ + if (CanUseEscapeRopeOnCurrMap() == TRUE) + { + gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; + gPostMenuFieldCallback = hm2_dig; + return TRUE; + } + else + { + return FALSE; + } +} + +static void hm2_dig(void) +{ + Overworld_ResetStateAfterDigEscRope(); + FieldEffectStart(FLDEFF_USE_DIG); + gFieldEffectArguments[0] = GetCursorSelectionMonId(); +} + +bool8 FldEff_UseDig(void) +{ + u8 taskId = oei_task_add(); + + gTasks[taskId].data[8] = (u32)sub_8135780 >> 16; + gTasks[taskId].data[9] = (u32)sub_8135780; + if (!ShouldDoBrailleDigEffect()) + SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT); + return FALSE; +} + +static void sub_8135780(void) +{ + u8 taskId; + + FieldEffectActiveListRemove(FLDEFF_USE_DIG); + if (ShouldDoBrailleDigEffect()) + { + DoBrailleDigEffect(); + } + else + { + taskId = CreateTask(task08_080A1C44, 8); + gTasks[taskId].data[0] = 0; + } +} diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 7d3e071235..3d00fb162e 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -2,18 +2,19 @@ #include "field_camera.h" #include "field_player_avatar.h" #include "fieldmap.h" +#include "fldeff.h" #include "task.h" static EWRAM_DATA u8 sEscalatorAnim_TaskId = 0; -void sub_80E12E8(u8 taskId, const s16 *list, u16 c) +static void sub_80E12E8(u8 taskId, const s16 *list, u16 c) { s16 r5 = gTasks[taskId].data[4] - 1; s16 r3 = gTasks[taskId].data[5] - 1; s16 r4 = gTasks[taskId].data[1]; s16 y; s16 x; - + if (gTasks[taskId].data[2] == 0) { for (y = 0; y < 3; y++) @@ -21,7 +22,7 @@ void sub_80E12E8(u8 taskId, const s16 *list, u16 c) for (x = 0; x < 3; x++) { s16 metatileId = MapGridGetMetatileIdAt(r5 + x, r3 + y); - + if (list[r4] == metatileId) { if (r4 != 2) @@ -39,7 +40,7 @@ void sub_80E12E8(u8 taskId, const s16 *list, u16 c) for (x = 0; x < 3; x++) { s16 metatileId = MapGridGetMetatileIdAt(r5 + x, r3 + y); - + if (list[2 - r4] == metatileId) { if (r4 != 2) @@ -60,7 +61,7 @@ static const u16 gUnknown_08589AD2[] = {0x2A0, 0x2A2, 0x2A4}; static const u16 gUnknown_08589AD8[] = {0x2A1, 0x2A3, 0x2A5}; static const u16 gUnknown_08589ADE[] = {0x2A8, 0x2AA, 0x2AC}; -void sub_80E1444(u8 taskId) +static void sub_80E1444(u8 taskId) { s16 *data = gTasks[taskId].data; @@ -100,7 +101,7 @@ void sub_80E1444(u8 taskId) } } -u8 sub_80E150C(u16 var) +static u8 sub_80E150C(u16 var) { u8 taskId = CreateTask(sub_80E1444, 0); s16 *data = gTasks[taskId].data; diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c index 8862caa9f1..69d198c842 100644 --- a/src/fldeff_flash.c +++ b/src/fldeff_flash.c @@ -3,12 +3,12 @@ #include "event_data.h" #include "event_scripts.h" #include "field_effect.h" +#include "fldeff.h" #include "gpu_regs.h" #include "main.h" #include "overworld.h" #include "palette.h" #include "party_menu.h" -#include "rom6.h" #include "script.h" #include "sound.h" #include "sprite.h" diff --git a/src/fldeff_groundshake.c b/src/fldeff_groundshake.c deleted file mode 100644 index 44ffd60f92..0000000000 --- a/src/fldeff_groundshake.c +++ /dev/null @@ -1,320 +0,0 @@ -#include "global.h" -#include "event_data.h" -#include "event_object_movement.h" -#include "field_camera.h" -#include "alloc.h" -#include "random.h" -#include "roulette_util.h" -#include "script.h" -#include "sound.h" -#include "sprite.h" -#include "task.h" -#include "constants/flags.h" -#include "constants/songs.h" - -// structures -struct Struct203CF18 { - u8 taskId; - struct InnerStruct203CF18 unk4; -}; //size = 0xC8 - -// extern data -extern const struct SpriteSheet gUnknown_08617D94[]; -extern const s16 gUnknown_08617D64[][3]; - -// static functions -static void sub_81BE808(u8 taskId); -static void sub_81BE900(u8 taskId); -static void sub_81BE968(void); -static void sub_81BE9C0(u8 taskId); -static void sub_81BEA00(u8 taskId); -static void sub_81BEA20(void); -static void sub_81BEAD8(struct Sprite* sprite); - -// rodata -const struct InnerStruct203CF18_3 gUnknown_08617E18 = { - .unk0 = 0x433b, - .unk2 = 0x61, - .unk4 = 0x0F, - .unk5 = 0x05, - .unk6 = 0xFF, - .unk7_0 = 0xB, - .unk7_4 = 0x1, - .unk7_6 = 0, - .unk7_7 = 1, -}; - -static const union AnimCmd gSpriteAnim_8617E20[] = -{ - ANIMCMD_FRAME(0, 12), - ANIMCMD_JUMP(0), -}; - -static const union AnimCmd *const gSpriteAnimTable_8617E28[] = -{ - gSpriteAnim_8617E20, -}; - -static const struct OamData gUnknown_08617E2C = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = 0, - .x = 0, - .matrixNum = 0, - .size = 0, - .tileNum = 0, - .priority = 0, - .paletteNum = 0, - .affineParam = 0, -}; - -static const struct SpriteTemplate gUnknown_08617E34 = { - .tileTag = 0x0FA0, - .paletteTag = 0xFFFF, - .oam = &gUnknown_08617E2C, - .anims = gSpriteAnimTable_8617E28, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81BEAD8 -}; - -static const union AnimCmd gSpriteAnim_8617E4C[] = -{ - ANIMCMD_FRAME(0, 12), - ANIMCMD_JUMP(0), -}; - -static const union AnimCmd *const gSpriteAnim_8617E54[] = -{ - gSpriteAnim_8617E4C, -}; - -static const struct OamData gSpriteAnim_8617E58 = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = 0, - .x = 0, - .matrixNum = 0, - .size = 1, - .tileNum = 0, - .priority = 0, - .paletteNum = 0, - .affineParam = 0, -}; - -static const struct SpriteTemplate gUnknown_08617E60 = { - .tileTag = 0x0FA0, - .paletteTag = 0xFFFF, - .oam = &gSpriteAnim_8617E58, - .anims = gSpriteAnim_8617E54, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81BEAD8 -}; - -// ewram -EWRAM_DATA struct Struct203CF18 *gUnknown_0203CF18 = NULL; - -// text -bool8 sub_81BE66C(void) -{ - if (!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A)) - return 0; - return FlagGet(FLAG_0x14E); -} - -void sub_81BE698(u8 taskId) -{ - sub_8151E50(&(gUnknown_0203CF18->unk4)); -} - -void sub_81BE6AC(void) -{ - gUnknown_0203CF18 = NULL; -} - -void sub_81BE6B8(void) -{ - if(gUnknown_0203CF18 != NULL) - { - gUnknown_0203CF18 = NULL; - return; - } - if(!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A) || !FlagGet(FLAG_0x14E)) - return; - - gUnknown_0203CF18 = (struct Struct203CF18 *)AllocZeroed(sizeof(struct Struct203CF18)); - sub_8151B3C(&(gUnknown_0203CF18->unk4)); - sub_8151B68(&(gUnknown_0203CF18->unk4), &gUnknown_08617E18); - sub_8151CA8(&(gUnknown_0203CF18->unk4), 1, 1); - gUnknown_0203CF18->taskId = CreateTask(sub_81BE698, 0xFF); -} - -void sub_81BE72C(void) -{ - if(!(gSaveBlock1Ptr->location.mapGroup == 0x0 && gSaveBlock1Ptr->location.mapNum == 0x1A) || !FlagGet(FLAG_0x14E) || gUnknown_0203CF18 == NULL) - return; - if(FuncIsActiveTask(sub_81BE698)) - DestroyTask(gUnknown_0203CF18->taskId); - sub_8151D28(&(gUnknown_0203CF18->unk4), 1, 1); - sub_8151C50(&(gUnknown_0203CF18->unk4), 1, 1); - Free(gUnknown_0203CF18); - gUnknown_0203CF18 = NULL; -} - -void sub_81BE79C(void) -{ - u16 rand; - bool8 chance; - - if(VarGet(VAR_0x40CB) != 0) - { - FlagClear(FLAG_0x14E); - return; - } - rand = Random(); - chance = rand & 1; - if(FlagGet(FLAG_0x09D) == TRUE) - chance = TRUE; - if(chance) - { - FlagSet(FLAG_0x14E); - sub_81BE6B8(); - return; - } - FlagClear(FLAG_0x14E); -} - -void sub_81BE7F4(void) -{ - CreateTask(sub_81BE808, 0x8); -} - -static void sub_81BE808(u8 taskId) -{ - u8 eventObjectIdBuffer; - struct EventObject *fieldEventObject; - struct EventObject *playerAvatarEventObject; - - TryGetEventObjectIdByLocalIdAndMap(0x2D, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &eventObjectIdBuffer); - fieldEventObject = &(gEventObjects[eventObjectIdBuffer]); - gSprites[fieldEventObject->spriteId].pos2.y += 4; - playerAvatarEventObject = &(gEventObjects[gPlayerAvatar.eventObjectId]); - - if((gSprites[fieldEventObject->spriteId].pos1.y + gSprites[fieldEventObject->spriteId].pos2.y) >= - (gSprites[playerAvatarEventObject->spriteId].pos1.y + gSprites[playerAvatarEventObject->spriteId].pos2.y)) - { - DestroyTask(taskId); - EnableBothScriptContexts(); - } -} - -static void sp136_strengh_sound(u8 a, u8 b, u8 c, u8 d) -{ - u8 taskId; - - taskId = CreateTask(sub_81BE900, 0x9); - gTasks[taskId].data[0] = b; - gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = c; - gTasks[taskId].data[3] = d; - gTasks[taskId].data[4] = a; - SetCameraPanningCallback(NULL); - PlaySE(SE_W070); -} - -static void sub_81BE900(u8 taskId) -{ - s16 *data; - - data = gTasks[taskId].data; - data[1]++; - if((data[1] % data[3]) == 0) - { - data[1] = 0; - data[2]--; - data[0] = -data[0]; - data[4] = -data[4]; - SetCameraPanning(data[0], data[4]); - if(!data[2]) - { - sub_81BE968(); - DestroyTask(taskId); - InstallCameraPanAheadCallback(); - } - } -} - -static void sub_81BE968(void) -{ - u8 taskId; - - taskId = FindTaskIdByFunc(sub_81BE9C0); - if(taskId != 0xFF) - gTasks[taskId].data[0]++; -} - -void sub_81BE994(void) -{ - LoadSpriteSheets(gUnknown_08617D94); - sub_81BEA20(); - CreateTask(sub_81BE9C0, 0x8); - sp136_strengh_sound(2, 1, 16, 3); -} - -static void sub_81BE9C0(u8 taskId) -{ - u16 *data; - - data = gTasks[taskId].data; - data[1]++; - if(data[1] == 1000 || data[0] == 17) - gTasks[taskId].func = sub_81BEA00; -} - -static void sub_81BEA00(u8 taskId) -{ - FreeSpriteTilesByTag(4000); - DestroyTask(taskId); - EnableBothScriptContexts(); -} - -static void sub_81BEA20(void) -{ - u8 i; - u8 spriteId; - - for(i = 0; i < 8; i++) - { - spriteId = CreateSprite(&gUnknown_08617E60, gUnknown_08617D64[i][0] + 120, gUnknown_08617D64[i][1], 8); - gSprites[spriteId].oam.priority = 0; - gSprites[spriteId].oam.paletteNum = 0; - gSprites[spriteId].data[0] = i; - } - for(i = 0; i < 8; i++) - { - spriteId = CreateSprite(&gUnknown_08617E34, gUnknown_08617D64[i][0] + 115, gUnknown_08617D64[i][1] - 3, 8); - gSprites[spriteId].oam.priority = 0; - gSprites[spriteId].oam.paletteNum = 0; - gSprites[spriteId].data[0] = i; - } -} - -static void sub_81BEAD8(struct Sprite* sprite) -{ - sprite->data[1] += 2; - sprite->pos2.y = (sprite->data[1] / 2); - if(((sprite->pos1.y) + (sprite->pos2.y)) > gUnknown_08617D64[sprite->data[0]][2]) - { - DestroySprite(sprite); - sub_81BE968(); - } -} diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index d9fe38197d..1f4c6f9fbd 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -4,13 +4,13 @@ #include "script.h" #include "sound.h" #include "task.h" -#include "rom6.h" #include "strings.h" #include "party_menu.h" #include "fieldmap.h" #include "field_effect.h" #include "field_camera.h" #include "field_player_avatar.h" +#include "fldeff.h" #include "fldeff_misc.h" #include "secret_base.h" #include "event_data.h" @@ -376,7 +376,7 @@ static void sub_80F9C90(u8 taskId) task->data[7] = GetGpuReg(REG_OFFSET_BLDCNT); task->data[8] = GetGpuReg(REG_OFFSET_BLDY); - SetGpuReg(REG_OFFSET_BLDCNT, 0xBF); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN); SetGpuReg(REG_OFFSET_BLDY, 0x10); break; @@ -452,7 +452,7 @@ static void sub_80F9DFC(u8 taskId) { task->data[5] = 0x50; task->data[6] = 0x51; - SetGpuReg(REG_OFFSET_BLDCNT, 0xBF); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN); SetGpuReg(REG_OFFSET_BLDY, 0x10); } SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->data[5], task->data[6])); diff --git a/src/rom6.c b/src/fldeff_rocksmash.c similarity index 81% rename from src/rom6.c rename to src/fldeff_rocksmash.c index 8043730d2b..9181b55324 100644 --- a/src/rom6.c +++ b/src/fldeff_rocksmash.c @@ -5,10 +5,10 @@ #include "event_scripts.h" #include "field_effect.h" #include "field_player_avatar.h" +#include "fldeff.h" #include "item_use.h" #include "overworld.h" #include "party_menu.h" -#include "rom6.h" #include "script.h" #include "sound.h" #include "sprite.h" @@ -26,8 +26,6 @@ static void sub_813552C(u8 taskId); static void sub_813561C(u8 taskId); static void sub_81356C4(void); static void sub_8135714(void); -static void hm2_dig(void); -static void sub_8135780(void); // extern RAM loc extern struct MapPosition gPlayerFacingPosition; @@ -162,51 +160,3 @@ static void sub_8135714(void) FieldEffectActiveListRemove(FLDEFF_USE_ROCK_SMASH); EnableBothScriptContexts(); } - -bool8 SetUpFieldMove_Dig(void) -{ - if (CanUseEscapeRopeOnCurrMap() == TRUE) - { - gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu; - gPostMenuFieldCallback = hm2_dig; - return TRUE; - } - else - { - return FALSE; - } -} - -static void hm2_dig(void) -{ - Overworld_ResetStateAfterDigEscRope(); - FieldEffectStart(FLDEFF_USE_DIG); - gFieldEffectArguments[0] = GetCursorSelectionMonId(); -} - -bool8 FldEff_UseDig(void) -{ - u8 taskId = oei_task_add(); - - gTasks[taskId].data[8] = (u32)sub_8135780 >> 16; - gTasks[taskId].data[9] = (u32)sub_8135780; - if (!ShouldDoBrailleDigEffect()) - SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT); - return FALSE; -} - -static void sub_8135780(void) -{ - u8 taskId; - - FieldEffectActiveListRemove(FLDEFF_USE_DIG); - if (ShouldDoBrailleDigEffect()) - { - DoBrailleDigEffect(); - } - else - { - taskId = CreateTask(task08_080A1C44, 8); - gTasks[taskId].data[0] = 0; - } -} diff --git a/src/fldeff_strength.c b/src/fldeff_strength.c index f796ecea64..c57ab8cdc6 100644 --- a/src/fldeff_strength.c +++ b/src/fldeff_strength.c @@ -2,8 +2,8 @@ #include "event_data.h" #include "event_scripts.h" #include "field_effect.h" +#include "fldeff.h" #include "party_menu.h" -#include "rom6.h" #include "script.h" #include "string_util.h" #include "task.h" diff --git a/src/fldeff_sweetscent.c b/src/fldeff_sweetscent.c index cd8fa400d3..a187353ff8 100644 --- a/src/fldeff_sweetscent.c +++ b/src/fldeff_sweetscent.c @@ -5,9 +5,10 @@ #include "field_player_avatar.h" #include "field_screen_effect.h" #include "field_weather.h" +#include "fldeff.h" +#include "mirage_tower.h" #include "palette.h" #include "party_menu.h" -#include "rom6.h" #include "script.h" #include "sound.h" #include "sprite.h" @@ -21,8 +22,6 @@ static void FieldCallback_SweetScent(void); static void StartSweetScentFieldEffect(void); static void TrySweetScentEncounter(u8 taskId); static void FailSweetScentEncounter(u8 taskId); -void sub_81BE6B8(void); -void sub_81BE72C(void); bool8 SetUpFieldMove_SweetScent(void) { @@ -65,7 +64,7 @@ static void TrySweetScentEncounter(u8 taskId) { if (!gPaletteFade.active) { - sub_81BE72C(); + ClearMirageTowerPulseBlendEffect(); BlendPalettes(0x00000040, 8, RGB_RED); if (gTasks[taskId].data[0] == 64) { @@ -78,7 +77,7 @@ static void TrySweetScentEncounter(u8 taskId) { gTasks[taskId].func = FailSweetScentEncounter; BeginNormalPaletteFade(~(1 << (gSprites[GetPlayerAvatarObjectId()].oam.paletteNum + 16)), 4, 8, 0, RGB_RED); - sub_81BE6B8(); + TryStartMirageTowerPulseBlendEffect(); } } else diff --git a/src/fldeff_teleport.c b/src/fldeff_teleport.c index 8562908bd0..cbf8ee6cc3 100644 --- a/src/fldeff_teleport.c +++ b/src/fldeff_teleport.c @@ -1,9 +1,9 @@ #include "global.h" #include "field_effect.h" #include "field_player_avatar.h" +#include "fldeff.h" #include "party_menu.h" #include "overworld.h" -#include "rom6.h" #include "task.h" #include "constants/field_effects.h" diff --git a/src/fossil_specials.c b/src/fossil_specials.c deleted file mode 100644 index dfdb999a90..0000000000 --- a/src/fossil_specials.c +++ /dev/null @@ -1,561 +0,0 @@ -#include "global.h" -#include "constants/flags.h" -#include "constants/songs.h" -#include "bg.h" -#include "event_data.h" -#include "field_camera.h" -#include "event_object_movement.h" -#include "fieldmap.h" -#include "global.fieldmap.h" -#include "gpu_regs.h" -#include "alloc.h" -#include "menu.h" -#include "random.h" -#include "script.h" -#include "sound.h" -#include "sprite.h" -#include "task.h" -#include "window.h" - -#define MIRAGE_TOWER_GFX_LENGTH (32 + sizeof(gMirageTower_Gfx)) -#define MIRAGE_TOWER_PALETTE_LENGTH 0x800 -#define ROOT_FOSSIL_GFX_LENGTH sizeof(gRootFossil_Gfx) -#define ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH 0x100 - -struct Struct8617DA4 -{ - u8 x; - u8 y; - u16 tileId; -}; - -struct Struct203CF10 -{ - u8 *buffer; - u8 currIndex; -}; - -struct DynamicSpriteFrameImage -{ - u8 *data; - u16 size; -}; - -struct Struct203CF0C -{ - u8 *frameImageTiles; - struct DynamicSpriteFrameImage *frameImage; - u8 spriteId; - u16 *unkC; - u16 unk10; -}; - -// static functions -static void sub_81BED50(u8 taskId); -static void sub_81BEBF4(u8 taskId); -static void sub_81BF028(u8 taskId); -static void sub_81BF248(struct Sprite *); -static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e); - -// .rodata -static const u8 gUnknown_08617274[32] = {0}; -static const u8 gMirageTower_Gfx[] = INCBIN_U8("graphics/misc/mirage_tower.4bpp"); -static const u16 gUnknown_08617B94[] = INCBIN_U16("graphics/misc/mirage_tower.bin"); -static const u16 gRootFossil_Pal[] = INCBIN_U16("graphics/misc/fossil.gbapal"); -static const u8 gRootFossil_Gfx[] = INCBIN_U8("graphics/misc/fossil.4bpp"); -static const u8 gMirageTowerCrumbles_Gfx[] = INCBIN_U8("graphics/misc/mirage_tower_crumbles.4bpp"); -static const u16 gMirageTowerCrumbles_Palette[] = INCBIN_U16("graphics/misc/mirage_tower_crumbles.gbapal"); - -const s16 gUnknown_08617D64[][3] = -{ - { 0, 10, 65}, - { 17, 3, 50}, - {-12, 0, 75}, - { 10, 15, 90}, - { 7, 8, 65}, - {-18, 5, 75}, - { 22, -10, 55}, - {-24, -4, 65}, -}; - -const struct SpriteSheet gUnknown_08617D94[] = -{ - {gMirageTowerCrumbles_Gfx, 0x0080, 0x0fa0}, - {NULL} -}; - -static const struct Struct8617DA4 gUnknown_08617DA4[] = -{ - {0x12, 0x35, 0x251}, - {0x13, 0x35, 0x251}, - {0x14, 0x35, 0x251}, - {0x12, 0x36, 0x251}, - {0x13, 0x36, 0x251}, - {0x14, 0x36, 0x251}, - {0x12, 0x37, 0x251}, - {0x13, 0x37, 0x251}, - {0x14, 0x37, 0x251}, - {0x12, 0x38, 0x251}, - {0x13, 0x38, 0x251}, - {0x14, 0x38, 0x251}, - {0x12, 0x39, 0x259}, - {0x13, 0x39, 0x259}, - {0x14, 0x39, 0x259}, - {0x12, 0x3A, 0x121}, - {0x13, 0x3A, 0x121}, - {0x14, 0x3A, 0x121}, -}; - -static const union AnimCmd gSpriteAnim_8617DEC[] = -{ - ANIMCMD_FRAME(0, 1), - ANIMCMD_END, -}; - -static const struct OamData gOamData_8617DF4 = -{ - .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 0, - .bpp = 0, - .shape = 0, - .x = 0, - .matrixNum = 0, - .size = 1, - .tileNum = 0, - .priority = 0, - .paletteNum = 3, - .affineParam = 0, -}; - -static const union AnimCmd *const gSpriteAnimTable_8617DFC[] = -{ - gSpriteAnim_8617DEC, -}; - -static const struct SpriteTemplate gUnknown_08617E00 = -{ - 0xFFFF, 0xFFFF, &gOamData_8617DF4, gSpriteAnimTable_8617DFC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy -}; - -// EWRAM -EWRAM_DATA static u8* sUnknown_0203CF04 = NULL; -EWRAM_DATA static u8* sUnknown_0203CF08 = NULL; -EWRAM_DATA static struct Struct203CF0C *sUnknown_0203CF0C = NULL; -EWRAM_DATA static struct Struct203CF10 *sUnknown_0203CF10 = NULL; -EWRAM_DATA static u16 *sUnknown_0203CF14 = NULL; - -// IWRAM bss -IWRAM_DATA static u16 gUnknown_030012A8[8]; - -// text -void sub_81BEB24(void) -{ - u8 i; - for (i = 0; i < (sizeof(gUnknown_08617DA4)/sizeof(gUnknown_08617DA4[0])); i++) - MapGridSetMetatileIdAt(gUnknown_08617DA4[i].x + 7, gUnknown_08617DA4[i].y + 7, gUnknown_08617DA4[i].tileId); - DrawWholeMapView(); -} - -void sub_81BEB54(void) -{ - CreateTask(sub_81BED50, 9); -} - -void sub_81BEB68(void) -{ - CreateTask(sub_81BEBF4, 9); -} - -void sub_81BEB7C(void) -{ - CreateTask(sub_81BF028, 9); -} - -void sub_81BEB90(void) -{ - SetGpuReg(REG_OFFSET_BG0HOFS, sUnknown_0203CF14[0]); - SetGpuReg(REG_OFFSET_BG0VOFS, sUnknown_0203CF14[1]); -} - -void sub_81BEBB4(u8 taskId) -{ - if (!(gTasks[taskId].data[0])) - { - sUnknown_0203CF14[0] = -sUnknown_0203CF14[0]; - gTasks[taskId].data[0] = 2; - sub_81BEB90(); - } - else - { - gTasks[taskId].data[0]--; - } -} - -static void sub_81BEBF4(u8 taskId) -{ - u8 zero; - - switch (gTasks[taskId].data[0]) - { - case 0: - FreeAllWindowBuffers(); - SetBgAttribute(0, BG_CTRL_ATTR_MOSAIC, 2); - gTasks[taskId].data[0]++; - break; - case 1: - sUnknown_0203CF04 = (u8 *)AllocZeroed(MIRAGE_TOWER_GFX_LENGTH); - sUnknown_0203CF08 = (u8 *)AllocZeroed(MIRAGE_TOWER_PALETTE_LENGTH); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - gTasks[taskId].data[0]++; - break; - case 2: - CpuSet(gUnknown_08617274, sUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH / 2); - LoadBgTiles(0, sUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH, 0); - gTasks[taskId].data[0]++; - break; - case 3: - SetBgTilemapBuffer(0, sUnknown_0203CF08); - CopyToBgTilemapBufferRect_ChangePalette(0, &gUnknown_08617B94, 12, 29, 6, 12, 17); - CopyBgTilemapBufferToVram(0); - gTasks[taskId].data[0]++; - break; - case 4: - ShowBg(0); - gTasks[taskId].data[0]++; - break; - case 5: - sub_81BEB24(); - gTasks[taskId].data[0]++; - break; - case 6: - sUnknown_0203CF14 = Alloc(4); - zero = 0; - sUnknown_0203CF14[0] = 2; - sUnknown_0203CF14[1] = zero; - CreateTask(sub_81BEBB4, 0xA); - DestroyTask(taskId); - EnableBothScriptContexts(); - break; - } -} - -#define OUTER_BUFFER_LENGTH 0x60 -#define INNER_BUFFER_LENGTH 0x30 -static void sub_81BED50(u8 taskId) -{ - u8 anotherTaskId, j; - u16 i; - u8 index; - - switch (gTasks[taskId].data[0]) - { - case 1: - sUnknown_0203CF10 = AllocZeroed(OUTER_BUFFER_LENGTH * sizeof(struct Struct203CF10)); - break; - case 3: - if (gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1)) - { - if (gTasks[taskId].data[1] > 1) - { - index = gTasks[taskId].data[3]; - sUnknown_0203CF10[index].buffer = Alloc(INNER_BUFFER_LENGTH); - for (i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++) - sUnknown_0203CF10[index].buffer[i] = i; - for (i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++) - { - u16 rand1, rand2, temp; - - rand1 = Random() % 0x30; - rand2 = Random() % 0x30; - SWAP(sUnknown_0203CF10[index].buffer[rand2], sUnknown_0203CF10[index].buffer[rand1], temp); - } - if (gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1)) - gTasks[taskId].data[3]++; - gTasks[taskId].data[1] = 0; - } - gTasks[taskId].data[1]++; - } - index = gTasks[taskId].data[3]; - for (i = (u8)(gTasks[taskId].data[2]); i < index; i++) - { - for (j = 0; j < 1; j++) - { - sub_81BF2B8(sUnknown_0203CF04, - ((((OUTER_BUFFER_LENGTH - 1) - i) * INNER_BUFFER_LENGTH) + sUnknown_0203CF10[i].buffer[(sUnknown_0203CF10[i].currIndex)++]), - 0, INNER_BUFFER_LENGTH, 1); - } - if (sUnknown_0203CF10[i].currIndex > (INNER_BUFFER_LENGTH - 1)) - { - FREE_AND_SET_NULL(sUnknown_0203CF10[i].buffer); - gTasks[taskId].data[2]++; - if ((i % 2) == 1) - sUnknown_0203CF14[1]--; - } - } - LoadBgTiles(0, sUnknown_0203CF04, MIRAGE_TOWER_GFX_LENGTH, 0); - if (sUnknown_0203CF10[OUTER_BUFFER_LENGTH - 1].currIndex > (INNER_BUFFER_LENGTH - 1)) - break; - return; - case 4: - UnsetBgTilemapBuffer(0); - anotherTaskId = FindTaskIdByFunc(sub_81BEBB4); - if (anotherTaskId != 0xFF) - DestroyTask(anotherTaskId); - sUnknown_0203CF14[1] = sUnknown_0203CF14[0] = 0; - sub_81BEB90(); - break; - case 5: - FREE_AND_SET_NULL(sUnknown_0203CF14); - FREE_AND_SET_NULL(sUnknown_0203CF10); - FREE_AND_SET_NULL(sUnknown_0203CF04); - FREE_AND_SET_NULL(sUnknown_0203CF08); - break; - case 6: - SetGpuRegBits(REG_OFFSET_BG2CNT, 0x2); - SetGpuRegBits(REG_OFFSET_BG0CNT, 0x0); - SetBgAttribute(0, BG_CTRL_ATTR_MOSAIC, 0); - sub_81971D0(); - break; - case 7: - ShowBg(0); - break; - case 8: - DestroyTask(taskId); - EnableBothScriptContexts(); - break; - } - gTasks[taskId].data[0]++; -} - -static void sub_81BF028(u8 taskId) -{ - u16 i; - u8 *buffer; - - switch (gTasks[taskId].data[0]) - { - case 1: - sUnknown_0203CF0C = AllocZeroed(sizeof(*sUnknown_0203CF0C)); - sUnknown_0203CF0C->frameImageTiles = AllocZeroed(ROOT_FOSSIL_GFX_LENGTH); - sUnknown_0203CF0C->frameImage = AllocZeroed(sizeof(*sUnknown_0203CF0C->frameImage)); - sUnknown_0203CF0C->unkC = AllocZeroed(ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16)); - sUnknown_0203CF0C->unk10 = 0; - break; - case 2: - buffer = sUnknown_0203CF0C->frameImageTiles; - for (i = 0; i < ROOT_FOSSIL_GFX_LENGTH; i++, buffer++) - *buffer = gRootFossil_Gfx[i]; - break; - case 3: - sUnknown_0203CF0C->frameImage->data = sUnknown_0203CF0C->frameImageTiles; - sUnknown_0203CF0C->frameImage->size = ROOT_FOSSIL_GFX_LENGTH; - break; - case 4: - { - struct SpriteTemplate fossilTemplate; - - fossilTemplate = gUnknown_08617E00; - fossilTemplate.images = (struct SpriteFrameImage *)(sUnknown_0203CF0C->frameImage); - sUnknown_0203CF0C->spriteId = CreateSprite(&fossilTemplate, 128, -16, 1); - gSprites[sUnknown_0203CF0C->spriteId].centerToCornerVecX = 0; - gSprites[sUnknown_0203CF0C->spriteId].data[0] = gSprites[sUnknown_0203CF0C->spriteId].pos1.x; - gSprites[sUnknown_0203CF0C->spriteId].data[1] = 1; - } - case 5: - for (i = 0; i < ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH; i++) - sUnknown_0203CF0C->unkC[i] = i; - break; - case 6: - for (i = 0; i < (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16)); i++) - { - u16 rand1, rand2, temp; - - rand1 = Random() % 0x100; - rand2 = Random() % 0x100; - SWAP(sUnknown_0203CF0C->unkC[rand2], sUnknown_0203CF0C->unkC[rand1], temp); - } - gSprites[sUnknown_0203CF0C->spriteId].callback = sub_81BF248; - break; - case 7: - if (gSprites[sUnknown_0203CF0C->spriteId].callback != SpriteCallbackDummy) - return; - DestroySprite(&gSprites[sUnknown_0203CF0C->spriteId]); - FREE_AND_SET_NULL(sUnknown_0203CF0C->unkC);; - FREE_AND_SET_NULL(sUnknown_0203CF0C->frameImage); - FREE_AND_SET_NULL(sUnknown_0203CF0C->frameImageTiles); - FREE_AND_SET_NULL(sUnknown_0203CF0C); - break; - case 8: - EnableBothScriptContexts(); - break; - } - - gTasks[taskId].data[0]++; -} - -static void sub_81BF248(struct Sprite *sprite) -{ - if (sUnknown_0203CF0C->unk10 >= (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH)) - { - sprite->callback = SpriteCallbackDummy; - } - else if (sprite->pos1.y >= 0x60) - { - u8 i; - for (i = 0; i < 2; i++) - { - sub_81BF2B8(sUnknown_0203CF0C->frameImageTiles, sUnknown_0203CF0C->unkC[sUnknown_0203CF0C->unk10++], 0, 16, 0); - } - StartSpriteAnim(sprite, 0); - } - else - { - sprite->pos1.y++; - } -} - -#ifdef NONMATCHING -static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e) -{ - u8 r5, r4, r0, r2; - u16 var; - - r4 = r5 = b / d; - gUnknown_030012A8[0] = r4; - - r0 = r2 = b % d; - gUnknown_030012A8[1] = r2; - - r4 &= 7; - r2 &= 7; - gUnknown_030012A8[2] = r4; - gUnknown_030012A8[3] = r2; - - r0 /= 8; - r5 /= 8; - gUnknown_030012A8[4] = r0; - gUnknown_030012A8[5] = r5; - - var = ((d / 8) * (r5 * 64)) + (r0 * 64); - gUnknown_030012A8[6] = var; - - var += (r4 * 8) + r2; - gUnknown_030012A8[7] = var; - - // This part is non-matching. 99% sure it IS functionally equivalent, though. - b = (b & 1) ^ 1; - c = (c << ((b) << 2)) | (15 << ((b ^ 1) << 2)); - - a[(var / 2) + (e * 32)] &= c; -} - -#else -NAKED -static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e) -{ - asm_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, 0x8\n\ - str r0, [sp]\n\ - mov r10, r1\n\ - adds r6, r2, 0\n\ - mov r8, r3\n\ - ldr r0, [sp, 0x28]\n\ - mov r9, r0\n\ - lsls r1, 16\n\ - lsrs r1, 16\n\ - mov r10, r1\n\ - lsls r6, 24\n\ - lsrs r6, 24\n\ - mov r0, r8\n\ - lsls r0, 24\n\ - mov r8, r0\n\ - lsrs r7, r0, 24\n\ - mov r1, r9\n\ - lsls r1, 24\n\ - lsrs r1, 24\n\ - mov r9, r1\n\ - mov r0, r10\n\ - adds r1, r7, 0\n\ - bl __divsi3\n\ - adds r5, r0, 0\n\ - lsls r5, 24\n\ - lsrs r4, r5, 24\n\ - ldr r3, =gUnknown_030012A8\n\ - strh r4, [r3]\n\ - mov r0, r10\n\ - adds r1, r7, 0\n\ - str r3, [sp, 0x4]\n\ - bl __modsi3\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - ldr r3, [sp, 0x4]\n\ - strh r2, [r3, 0x2]\n\ - movs r1, 0x7\n\ - ands r4, r1\n\ - ands r2, r1\n\ - strh r4, [r3, 0x4]\n\ - strh r2, [r3, 0x6]\n\ - lsrs r0, 27\n\ - lsrs r5, 27\n\ - strh r0, [r3, 0x8]\n\ - strh r5, [r3, 0xA]\n\ - mov r1, r8\n\ - lsrs r1, 27\n\ - lsls r1, 6\n\ - mov r8, r1\n\ - mov r1, r8\n\ - muls r1, r5\n\ - lsls r0, 6\n\ - adds r1, r0\n\ - lsls r1, 16\n\ - lsrs r1, 16\n\ - strh r1, [r3, 0xC]\n\ - lsls r4, 3\n\ - adds r4, r2\n\ - adds r1, r4\n\ - lsls r4, r1, 16\n\ - lsrs r4, 17\n\ - strh r1, [r3, 0xE]\n\ - movs r1, 0x1\n\ - mov r0, r10\n\ - ands r1, r0\n\ - movs r2, 0x1\n\ - eors r1, r2\n\ - lsls r0, r1, 2\n\ - lsls r6, r0\n\ - eors r1, r2\n\ - lsls r1, 2\n\ - movs r0, 0xF\n\ - lsls r0, r1\n\ - orrs r6, r0\n\ - lsls r6, 24\n\ - lsrs r6, 24\n\ - mov r1, r9\n\ - lsls r1, 5\n\ - mov r9, r1\n\ - add r9, r4\n\ - ldr r1, [sp]\n\ - add r1, r9\n\ - ldrb r0, [r1]\n\ - ands r6, r0\n\ - strb r6, [r1]\n\ - add sp, 0x8\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\ - "); -} -#endif // NONMATCHING diff --git a/src/frontier_util.c b/src/frontier_util.c index 2fc58241a9..c722230cd6 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -2185,15 +2185,15 @@ static void sub_81A447C(void) u16 monId = gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1; if (monId < PARTY_SIZE) { - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { - for (k = 0; k < 4; k++) + for (k = 0; k < MAX_MON_MOVES; k++) { if (GetMonData(&gSaveBlock1Ptr->playerParty[gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1], MON_DATA_MOVE1 + k, NULL) == GetMonData(&gPlayerParty[i], MON_DATA_MOVE1 + j, NULL)) break; } - if (k == 4) + if (k == MAX_MON_MOVES) SetMonMoveSlot(&gPlayerParty[i], MOVE_SKETCH, j); } gSaveBlock1Ptr->playerParty[gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1] = gPlayerParty[i]; @@ -2511,7 +2511,7 @@ void CreateFrontierBrainPokemon(void) for (j = 0; j < NUM_STATS; j++) SetMonData(&gEnemyParty[monPartyId], MON_DATA_HP_EV + j, &sFrontierBrainsMons[facility][symbol][i].evs[j]); friendship = 0xFF; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonMoveSlot(&gEnemyParty[monPartyId], sFrontierBrainsMons[facility][symbol][i].moves[j], j); if (sFrontierBrainsMons[facility][symbol][i].moves[j] == MOVE_FRUSTRATION) diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index b973798f6e..34d62149a1 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -355,8 +355,8 @@ static bool8 InitHallOfFameScreen(void) gMain.state++; break; case 2: - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F42); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x710); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 7)); SetGpuReg(REG_OFFSET_BLDY, 0); sub_8174FAC(); sHofGfxPtr->state = 0; @@ -817,8 +817,8 @@ void CB2_DoHallOfFamePC(void) { u8 taskId, i; - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F42); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x710); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 7)); SetGpuReg(REG_OFFSET_BLDY, 0); taskId = CreateTask(Task_HofPC_CopySaveData, 0); diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 1012a8e087..3d4f8a90d2 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -5,7 +5,9 @@ #include "global.h" #include "main.h" #include "overworld.h" -#include "rom6.h" +#include "fldeff.h" +#include "field_specials.h" +#include "pokeblock.h" #include "event_data.h" #include "script.h" #include "random.h" diff --git a/src/mail.c b/src/mail.c index 7b096ed00c..45e96e85e5 100644 --- a/src/mail.c +++ b/src/mail.c @@ -170,29 +170,29 @@ static const u16 sUnknown_0859F2B0[][2] = { static const struct MailGraphics sUnknown_0859F2B8[] = { { - gMailPalette_Orange, gMailTiles_Orange, gMailTilemap_Orange, 0x02c0, 0x0000, 0x294a, 0x6739 + gMailPalette_Orange, gMailTiles_Orange, gMailTilemap_Orange, 0x02c0, 0, 0x294a, 0x6739 }, { - gMailPalette_Harbor, gMailTiles_Harbor, gMailTilemap_Harbor, 0x02e0, 0x0000, 0x7fff, 0x4631 + gMailPalette_Harbor, gMailTiles_Harbor, gMailTilemap_Harbor, 0x02e0, 0, 0x7fff, 0x4631 }, { - gMailPalette_Glitter, gMailTiles_Glitter, gMailTilemap_Glitter, 0x0400, 0x0000, 0x294a, 0x6739 + gMailPalette_Glitter, gMailTiles_Glitter, gMailTilemap_Glitter, 0x0400, 0, 0x294a, 0x6739 }, { - gMailPalette_Mech, gMailTiles_Mech, gMailTilemap_Mech, 0x01e0, 0x0000, 0x7fff, 0x4631 + gMailPalette_Mech, gMailTiles_Mech, gMailTilemap_Mech, 0x01e0, 0, 0x7fff, 0x4631 }, { - gMailPalette_Wood, gMailTiles_Wood, gMailTilemap_Wood, 0x02e0, 0x0000, 0x7fff, 0x4631 + gMailPalette_Wood, gMailTiles_Wood, gMailTilemap_Wood, 0x02e0, 0, 0x7fff, 0x4631 }, { - gMailPalette_Wave, gMailTiles_Wave, gMailTilemap_Wave, 0x0300, 0x0000, 0x294a, 0x6739 + gMailPalette_Wave, gMailTiles_Wave, gMailTilemap_Wave, 0x0300, 0, 0x294a, 0x6739 }, { - gMailPalette_Bead, gMailTiles_Bead, gMailTilemap_Bead, 0x0140, 0x0000, 0x7fff, 0x4631 + gMailPalette_Bead, gMailTiles_Bead, gMailTilemap_Bead, 0x0140, 0, 0x7fff, 0x4631 }, { - gMailPalette_Shadow, gMailTiles_Shadow, gMailTilemap_Shadow, 0x0300, 0x0000, 0x7fff, 0x4631 + gMailPalette_Shadow, gMailTiles_Shadow, gMailTilemap_Shadow, 0x0300, 0, 0x7fff, 0x4631 }, { - gMailPalette_Tropic, gMailTiles_Tropic, gMailTilemap_Tropic, 0x0220, 0x0000, 0x294a, 0x6739 + gMailPalette_Tropic, gMailTiles_Tropic, gMailTilemap_Tropic, 0x0220, 0, 0x294a, 0x6739 }, { - gMailPalette_Dream, gMailTiles_Dream, gMailTilemap_Dream, 0x0340, 0x0000, 0x294a, 0x6739 + gMailPalette_Dream, gMailTiles_Dream, gMailTilemap_Dream, 0x0340, 0, 0x294a, 0x6739 }, { - gMailPalette_Fab, gMailTiles_Fab, gMailTilemap_Fab, 0x02a0, 0x0000, 0x294a, 0x6739 + gMailPalette_Fab, gMailTiles_Fab, gMailTilemap_Fab, 0x02a0, 0, 0x294a, 0x6739 }, { - gMailPalette_Retro, gMailTiles_Retro, gMailTilemap_Retro, 0x0520, 0x0000, 0x294a, 0x6739 + gMailPalette_Retro, gMailTiles_Retro, gMailTilemap_Retro, 0x0520, 0, 0x294a, 0x6739 } }; @@ -306,7 +306,7 @@ static bool8 MailReadBuildGraphics(void) case 0: SetVBlankCallback(NULL); ScanlineEffect_Stop(); - SetGpuReg(REG_OFFSET_DISPCNT, 0x0000); + SetGpuReg(REG_OFFSET_DISPCNT, 0); break; case 1: CpuFill16(0, (void *)OAM, OAM_SIZE); @@ -323,16 +323,16 @@ static bool8 MailReadBuildGraphics(void) case 5: FreeAllSpritePalettes(); reset_temp_tile_data_buffers(); - SetGpuReg(REG_OFFSET_BG0HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG0VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG1HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG1VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG2VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG2HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG3HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG3VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BLDCNT, 0x0000); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x0000); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG2HOFS, 0); + SetGpuReg(REG_OFFSET_BG3HOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); break; case 6: ResetBgsAndClearDma3BusyFlags(0); diff --git a/src/menu.c b/src/menu.c index e0e5eb4eb9..8c3c61ea76 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1934,8 +1934,8 @@ void sub_8199D98(void) void sub_8199DF0(u32 bg, u8 a1, int a2, int a3) { - int temp = (!GetBgAttribute(bg, 4)) ? 0x20 : 0x40; - void *addr = (void *)((GetBgAttribute(bg, 1) * 0x4000) + (GetBgAttribute(bg, 10) + a2) * temp); + int temp = (!GetBgAttribute(bg, BG_ATTR_PALETTEMODE)) ? 0x20 : 0x40; + void *addr = (void *)((GetBgAttribute(bg, BG_ATTR_CHARBASEINDEX) * 0x4000) + (GetBgAttribute(bg, BG_ATTR_BASETILE) + a2) * temp); RequestDma3Fill(a1 << 24 | a1 << 16 | a1 << 8 | a1, addr + VRAM, a3 * temp, 1); } diff --git a/src/mirage_tower.c b/src/mirage_tower.c new file mode 100644 index 0000000000..bfaea4c5e7 --- /dev/null +++ b/src/mirage_tower.c @@ -0,0 +1,868 @@ +#include "global.h" +#include "alloc.h" +#include "bg.h" +#include "event_data.h" +#include "event_object_movement.h" +#include "field_camera.h" +#include "fieldmap.h" +#include "gpu_regs.h" +#include "menu.h" +#include "random.h" +#include "roulette_util.h" +#include "script.h" +#include "sound.h" +#include "sprite.h" +#include "task.h" +#include "window.h" +#include "constants/flags.h" +#include "constants/maps.h" +#include "constants/rgb.h" +#include "constants/songs.h" + +struct MirageTowerPulseBlend { + u8 taskId; + struct PulseBlend pulseBlend; +}; + +struct MetatileCoords +{ + u8 x; + u8 y; + u16 metatileId; +}; + +struct BgRegOffsets +{ + u16 bgHOFS; + u16 bgVOFS; +}; + +struct Struct203CF10 +{ + u8 *buffer; + u8 currIndex; +}; + +struct DynamicSpriteFrameImage +{ + u8 *data; + u16 size; +}; + +struct Struct203CF0C +{ + u8 *frameImageTiles; + struct DynamicSpriteFrameImage *frameImage; + u8 spriteId; + u16 *unkC; + u16 unk10; +}; + +#define MIRAGE_TOWER_GFX_LENGTH (sizeof(sBlankTile_Gfx) + sizeof(sMirageTower_Gfx)) +#define ROOT_FOSSIL_GFX_LENGTH sizeof(sRootFossil_Gfx) +#define ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH 0x100 + +// extern data +extern const struct SpriteSheet gMirageTowerCeilingCrumbleSpriteSheets[]; +extern const s16 sCeilingCrumblePositions[][3]; + +// static functions +static void PlayerDescendMirageTower(u8 taskId); +static void DoScreenShake(u8 taskId); +static void IncrementCeilingCrumbleFinishedCount(void); +static void WaitCeilingCrumble(u8 taskId); +static void FinishCeilingCrumbleTask(u8 taskId); +static void CreateCeilingCrumbleSprites(void); +static void MoveCeilingCrumbleSprite(struct Sprite* sprite); +static void DoMirageTowerDisintegration(u8 taskId); +static void InitMirageTowerShake(u8 taskId); +static void DoFossilFallAndSink(u8 taskId); +static void sub_81BF248(struct Sprite *); +static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e); + +// rodata +static const u8 sBlankTile_Gfx[32] = {0}; +static const u8 sMirageTower_Gfx[] = INCBIN_U8("graphics/misc/mirage_tower.4bpp"); +static const u16 sMirageTowerTilemap[] = INCBIN_U16("graphics/misc/mirage_tower.bin"); +static const u16 sRootFossil_Pal[] = INCBIN_U16("graphics/misc/fossil.gbapal"); +static const u8 sRootFossil_Gfx[] = INCBIN_U8("graphics/misc/fossil.4bpp"); +static const u8 sMirageTowerCrumbles_Gfx[] = INCBIN_U8("graphics/misc/mirage_tower_crumbles.4bpp"); +static const u16 sMirageTowerCrumbles_Palette[] = INCBIN_U16("graphics/misc/mirage_tower_crumbles.gbapal"); + +const s16 sCeilingCrumblePositions[][3] = +{ + { 0, 10, 65}, + { 17, 3, 50}, + {-12, 0, 75}, + { 10, 15, 90}, + { 7, 8, 65}, + {-18, 5, 75}, + { 22, -10, 55}, + {-24, -4, 65}, +}; + +const struct SpriteSheet gMirageTowerCeilingCrumbleSpriteSheets[] = +{ + {sMirageTowerCrumbles_Gfx, 0x0080, 4000}, + {NULL} +}; + +static const struct MetatileCoords sInvisibleMirageTowerMetatiles[] = +{ + {18, 53, 0x251}, + {19, 53, 0x251}, + {20, 53, 0x251}, + {18, 54, 0x251}, + {19, 54, 0x251}, + {20, 54, 0x251}, + {18, 55, 0x251}, + {19, 55, 0x251}, + {20, 55, 0x251}, + {18, 56, 0x251}, + {19, 56, 0x251}, + {20, 56, 0x251}, + {18, 57, 0x259}, + {19, 57, 0x259}, + {20, 57, 0x259}, + {18, 58, 0x121}, + {19, 58, 0x121}, + {20, 58, 0x121}, +}; + +static const union AnimCmd gSpriteAnim_8617DEC[] = +{ + ANIMCMD_FRAME(0, 1), + ANIMCMD_END, +}; + +static const struct OamData gOamData_8617DF4 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 0, + .paletteNum = 3, + .affineParam = 0, +}; + +static const union AnimCmd *const gSpriteAnimTable_8617DFC[] = +{ + gSpriteAnim_8617DEC, +}; + +static const struct SpriteTemplate gUnknown_08617E00 = +{ + 0xFFFF, 0xFFFF, &gOamData_8617DF4, gSpriteAnimTable_8617DFC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy +}; + +const struct PulseBlendSettings gMirageTowerPulseBlendSettings = { + .blendColor = RGB(27, 25, 16), + .paletteOffset = 0x61, + .numColors = 15, + .delay = 5, + .numFadeCycles = -1, + .maxBlendCoeff = 11, + .fadeType = 1, + .restorePaletteOnUnload = FALSE, + .unk7_7 = 1, +}; + +static const union AnimCmd sCeilingCrumble2AnimCmd[] = +{ + ANIMCMD_FRAME(0, 12), + ANIMCMD_JUMP(0), +}; + +static const union AnimCmd *const sCeilingCrumble2AnimCmds[] = +{ + sCeilingCrumble2AnimCmd, +}; + +static const struct OamData sCeilingCrumble2OamData = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = 0, + .bpp = ST_OAM_4BPP, + .shape = ST_OAM_SQUARE, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const struct SpriteTemplate sCeilingCrumbleSpriteTemplate2 = { + .tileTag = 4000, + .paletteTag = 0xFFFF, + .oam = &sCeilingCrumble2OamData, + .anims = sCeilingCrumble2AnimCmds, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = MoveCeilingCrumbleSprite +}; + +static const union AnimCmd sCeilingCrumble1AnimCmd[] = +{ + ANIMCMD_FRAME(0, 12), + ANIMCMD_JUMP(0), +}; + +static const union AnimCmd *const sCeilingCrumble1AnimCmds[] = +{ + sCeilingCrumble1AnimCmd, +}; + +static const struct OamData sCeilingCrumble1OamData = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = 0, + .bpp = ST_OAM_4BPP, + .shape = ST_OAM_SQUARE, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const struct SpriteTemplate sCeilingCrumbleSpriteTemplate1 = { + .tileTag = 4000, + .paletteTag = 0xFFFF, + .oam = &sCeilingCrumble1OamData, + .anims = sCeilingCrumble1AnimCmds, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = MoveCeilingCrumbleSprite +}; + +EWRAM_DATA static u8* sMirageTowerGfxBuffer = NULL; +EWRAM_DATA static u8* sMirageTowerTilemapBuffer = NULL; +EWRAM_DATA static struct Struct203CF0C *sUnknown_0203CF0C = NULL; +EWRAM_DATA static struct Struct203CF10 *sUnknown_0203CF10 = NULL; +EWRAM_DATA static struct BgRegOffsets *sBgShakeOffsets = NULL; +EWRAM_DATA struct MirageTowerPulseBlend *sMirageTowerPulseBlend = NULL; + +IWRAM_DATA static u16 gUnknown_030012A8[8]; + +bool8 IsMirageTowerVisible(void) +{ + if (!(gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE111) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE111))) + return FALSE; + return FlagGet(FLAG_MIRAGE_TOWER_VISIBLE); +} + +static void UpdateMirageTowerPulseBlend(u8 taskId) +{ + UpdatePulseBlend(&sMirageTowerPulseBlend->pulseBlend); +} + +void ClearMirageTowerPulseBlend(void) +{ + sMirageTowerPulseBlend = NULL; +} + +void TryStartMirageTowerPulseBlendEffect(void) +{ + if (sMirageTowerPulseBlend) + { + sMirageTowerPulseBlend = NULL; + return; + } + + if (gSaveBlock1Ptr->location.mapGroup != MAP_GROUP(ROUTE111) + || gSaveBlock1Ptr->location.mapNum != MAP_NUM(ROUTE111) + || !FlagGet(FLAG_MIRAGE_TOWER_VISIBLE)) + return; + + sMirageTowerPulseBlend = AllocZeroed(sizeof(*sMirageTowerPulseBlend)); + InitPulseBlend(&sMirageTowerPulseBlend->pulseBlend); + InitPulseBlendPaletteSettings(&sMirageTowerPulseBlend->pulseBlend, &gMirageTowerPulseBlendSettings); + MarkUsedPulseBlendPalettes(&sMirageTowerPulseBlend->pulseBlend, 0x1, TRUE); + sMirageTowerPulseBlend->taskId = CreateTask(UpdateMirageTowerPulseBlend, 0xFF); +} + +void ClearMirageTowerPulseBlendEffect(void) +{ + if (gSaveBlock1Ptr->location.mapGroup != MAP_GROUP(ROUTE111) + || gSaveBlock1Ptr->location.mapNum != MAP_NUM(ROUTE111) + || !FlagGet(FLAG_MIRAGE_TOWER_VISIBLE) + || sMirageTowerPulseBlend == NULL) + return; + + if (FuncIsActiveTask(UpdateMirageTowerPulseBlend)) + DestroyTask(sMirageTowerPulseBlend->taskId); + + UnmarkUsedPulseBlendPalettes(&sMirageTowerPulseBlend->pulseBlend, 0x1, TRUE); + UnloadUsedPulseBlendPalettes(&sMirageTowerPulseBlend->pulseBlend, 0x1, TRUE); + FREE_AND_SET_NULL(sMirageTowerPulseBlend); +} + +void SetMirageTowerVisibility(void) +{ + u16 rand; + bool8 visible; + + if (VarGet(VAR_0x40CB)) + { + FlagClear(FLAG_MIRAGE_TOWER_VISIBLE); + return; + } + + rand = Random(); + visible = rand & 1; + if (FlagGet(FLAG_FORCE_MIRAGE_TOWER_VISIBLE) == TRUE) + visible = TRUE; + + if (visible) + { + FlagSet(FLAG_MIRAGE_TOWER_VISIBLE); + TryStartMirageTowerPulseBlendEffect(); + return; + } + + FlagClear(FLAG_MIRAGE_TOWER_VISIBLE); +} + +void StartPlayerDescendMirageTower(void) +{ + CreateTask(PlayerDescendMirageTower, 8); +} + +static void PlayerDescendMirageTower(u8 taskId) +{ + u8 eventObjectId; + struct EventObject *fakePlayerEventObject; + struct EventObject *playerEventObject; + + TryGetEventObjectIdByLocalIdAndMap(45, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &eventObjectId); + fakePlayerEventObject = &gEventObjects[eventObjectId]; + gSprites[fakePlayerEventObject->spriteId].pos2.y += 4; + playerEventObject = &gEventObjects[gPlayerAvatar.eventObjectId]; + if ((gSprites[fakePlayerEventObject->spriteId].pos1.y + gSprites[fakePlayerEventObject->spriteId].pos2.y) >= + (gSprites[playerEventObject->spriteId].pos1.y + gSprites[playerEventObject->spriteId].pos2.y)) + { + DestroyTask(taskId); + EnableBothScriptContexts(); + } +} + +static void StartScreenShake(u8 yShakeOffset, u8 xShakeOffset, u8 numShakes, u8 shakeDelay) +{ + u8 taskId = CreateTask(DoScreenShake, 9); + gTasks[taskId].data[0] = xShakeOffset; + gTasks[taskId].data[1] = 0; + gTasks[taskId].data[2] = numShakes; + gTasks[taskId].data[3] = shakeDelay; + gTasks[taskId].data[4] = yShakeOffset; + SetCameraPanningCallback(NULL); + PlaySE(SE_W070); +} + +static void DoScreenShake(u8 taskId) +{ + s16 *data; + + data = gTasks[taskId].data; + data[1]++; + if (data[1] % data[3] == 0) + { + data[1] = 0; + data[2]--; + data[0] = -data[0]; + data[4] = -data[4]; + SetCameraPanning(data[0], data[4]); + if (data[2] == 0) + { + IncrementCeilingCrumbleFinishedCount(); + DestroyTask(taskId); + InstallCameraPanAheadCallback(); + } + } +} + +static void IncrementCeilingCrumbleFinishedCount(void) +{ + u8 taskId = FindTaskIdByFunc(WaitCeilingCrumble); + if (taskId != 0xFF) + gTasks[taskId].data[0]++; +} + +void DoMirageTowerCeilingCrumble(void) +{ + LoadSpriteSheets(gMirageTowerCeilingCrumbleSpriteSheets); + CreateCeilingCrumbleSprites(); + CreateTask(WaitCeilingCrumble, 8); + StartScreenShake(2, 1, 16, 3); +} + +static void WaitCeilingCrumble(u8 taskId) +{ + u16 *data = gTasks[taskId].data; + data[1]++; + // Either wait 1000 frames, or until all 16 crumble sprites and the one screen-shake task are completed. + if (data[1] == 1000 || data[0] == 17) + gTasks[taskId].func = FinishCeilingCrumbleTask; +} + +static void FinishCeilingCrumbleTask(u8 taskId) +{ + FreeSpriteTilesByTag(4000); + DestroyTask(taskId); + EnableBothScriptContexts(); +} + +static void CreateCeilingCrumbleSprites(void) +{ + u8 i; + u8 spriteId; + + for (i = 0; i < 8; i++) + { + spriteId = CreateSprite(&sCeilingCrumbleSpriteTemplate1, sCeilingCrumblePositions[i][0] + 120, sCeilingCrumblePositions[i][1], 8); + gSprites[spriteId].oam.priority = 0; + gSprites[spriteId].oam.paletteNum = 0; + gSprites[spriteId].data[0] = i; + } + for (i = 0; i < 8; i++) + { + spriteId = CreateSprite(&sCeilingCrumbleSpriteTemplate2, sCeilingCrumblePositions[i][0] + 115, sCeilingCrumblePositions[i][1] - 3, 8); + gSprites[spriteId].oam.priority = 0; + gSprites[spriteId].oam.paletteNum = 0; + gSprites[spriteId].data[0] = i; + } +} + +static void MoveCeilingCrumbleSprite(struct Sprite* sprite) +{ + sprite->data[1] += 2; + sprite->pos2.y = sprite->data[1] / 2; + if(((sprite->pos1.y) + (sprite->pos2.y)) > sCeilingCrumblePositions[sprite->data[0]][2]) + { + DestroySprite(sprite); + IncrementCeilingCrumbleFinishedCount(); + } +} + +static void SetInvisibleMirageTowerMetatiles(void) +{ + u8 i; + for (i = 0; i < ARRAY_COUNT(sInvisibleMirageTowerMetatiles); i++) + MapGridSetMetatileIdAt(sInvisibleMirageTowerMetatiles[i].x + 7, sInvisibleMirageTowerMetatiles[i].y + 7, sInvisibleMirageTowerMetatiles[i].metatileId); + DrawWholeMapView(); +} + +void StartMirageTowerDisintegration(void) +{ + CreateTask(DoMirageTowerDisintegration, 9); +} + +void StartMirageTowerShake(void) +{ + CreateTask(InitMirageTowerShake, 9); +} + +void StartMirageTowerFossilFallAndSink(void) +{ + CreateTask(DoFossilFallAndSink, 9); +} + +static void SetBgShakeOffsets(void) +{ + SetGpuReg(REG_OFFSET_BG0HOFS, sBgShakeOffsets->bgHOFS); + SetGpuReg(REG_OFFSET_BG0VOFS, sBgShakeOffsets->bgVOFS); +} + +static void UpdateBgShake(u8 taskId) +{ + if (!gTasks[taskId].data[0]) + { + sBgShakeOffsets->bgHOFS = -sBgShakeOffsets->bgHOFS; + gTasks[taskId].data[0] = 2; + SetBgShakeOffsets(); + } + else + { + gTasks[taskId].data[0]--; + } +} + +static void InitMirageTowerShake(u8 taskId) +{ + u8 zero; + + switch (gTasks[taskId].data[0]) + { + case 0: + FreeAllWindowBuffers(); + SetBgAttribute(0, BG_ATTR_PRIORITY, 2); + gTasks[taskId].data[0]++; + break; + case 1: + sMirageTowerGfxBuffer = (u8 *)AllocZeroed(MIRAGE_TOWER_GFX_LENGTH); + sMirageTowerTilemapBuffer = (u8 *)AllocZeroed(BG_SCREEN_SIZE); + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + gTasks[taskId].data[0]++; + break; + case 2: + CpuSet(sBlankTile_Gfx, sMirageTowerGfxBuffer, MIRAGE_TOWER_GFX_LENGTH / 2); + LoadBgTiles(0, sMirageTowerGfxBuffer, MIRAGE_TOWER_GFX_LENGTH, 0); + gTasks[taskId].data[0]++; + break; + case 3: + SetBgTilemapBuffer(0, sMirageTowerTilemapBuffer); + CopyToBgTilemapBufferRect_ChangePalette(0, &sMirageTowerTilemap, 12, 29, 6, 12, 17); + CopyBgTilemapBufferToVram(0); + gTasks[taskId].data[0]++; + break; + case 4: + ShowBg(0); + gTasks[taskId].data[0]++; + break; + case 5: + SetInvisibleMirageTowerMetatiles(); + gTasks[taskId].data[0]++; + break; + case 6: + sBgShakeOffsets = Alloc(sizeof(*sBgShakeOffsets)); + zero = 0; + sBgShakeOffsets->bgHOFS = 2; + sBgShakeOffsets->bgVOFS = zero; + CreateTask(UpdateBgShake, 10); + DestroyTask(taskId); + EnableBothScriptContexts(); + break; + } +} + +#define OUTER_BUFFER_LENGTH 0x60 +#define INNER_BUFFER_LENGTH 0x30 +static void DoMirageTowerDisintegration(u8 taskId) +{ + u8 bgShakeTaskId, j; + u16 i; + u8 index; + + switch (gTasks[taskId].data[0]) + { + case 1: + sUnknown_0203CF10 = AllocZeroed(OUTER_BUFFER_LENGTH * sizeof(struct Struct203CF10)); + break; + case 3: + if (gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1)) + { + if (gTasks[taskId].data[1] > 1) + { + index = gTasks[taskId].data[3]; + sUnknown_0203CF10[index].buffer = Alloc(INNER_BUFFER_LENGTH); + for (i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++) + sUnknown_0203CF10[index].buffer[i] = i; + for (i = 0; i <= (INNER_BUFFER_LENGTH - 1); i++) + { + u16 rand1, rand2, temp; + + rand1 = Random() % 0x30; + rand2 = Random() % 0x30; + SWAP(sUnknown_0203CF10[index].buffer[rand2], sUnknown_0203CF10[index].buffer[rand1], temp); + } + if (gTasks[taskId].data[3] <= (OUTER_BUFFER_LENGTH - 1)) + gTasks[taskId].data[3]++; + gTasks[taskId].data[1] = 0; + } + gTasks[taskId].data[1]++; + } + index = gTasks[taskId].data[3]; + for (i = (u8)(gTasks[taskId].data[2]); i < index; i++) + { + for (j = 0; j < 1; j++) + { + sub_81BF2B8(sMirageTowerGfxBuffer, + ((((OUTER_BUFFER_LENGTH - 1) - i) * INNER_BUFFER_LENGTH) + sUnknown_0203CF10[i].buffer[(sUnknown_0203CF10[i].currIndex)++]), + 0, INNER_BUFFER_LENGTH, 1); + } + if (sUnknown_0203CF10[i].currIndex > (INNER_BUFFER_LENGTH - 1)) + { + FREE_AND_SET_NULL(sUnknown_0203CF10[i].buffer); + gTasks[taskId].data[2]++; + if ((i % 2) == 1) + sBgShakeOffsets->bgVOFS--; + } + } + LoadBgTiles(0, sMirageTowerGfxBuffer, MIRAGE_TOWER_GFX_LENGTH, 0); + if (sUnknown_0203CF10[OUTER_BUFFER_LENGTH - 1].currIndex > (INNER_BUFFER_LENGTH - 1)) + break; + return; + case 4: + UnsetBgTilemapBuffer(0); + bgShakeTaskId = FindTaskIdByFunc(UpdateBgShake); + if (bgShakeTaskId != 0xFF) + DestroyTask(bgShakeTaskId); + sBgShakeOffsets->bgVOFS = sBgShakeOffsets->bgHOFS = 0; + SetBgShakeOffsets(); + break; + case 5: + FREE_AND_SET_NULL(sBgShakeOffsets); + FREE_AND_SET_NULL(sUnknown_0203CF10); + FREE_AND_SET_NULL(sMirageTowerGfxBuffer); + FREE_AND_SET_NULL(sMirageTowerTilemapBuffer); + break; + case 6: + SetGpuRegBits(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(2)); + SetGpuRegBits(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(0)); + SetBgAttribute(0, BG_ATTR_PRIORITY, 0); + sub_81971D0(); + break; + case 7: + ShowBg(0); + break; + case 8: + DestroyTask(taskId); + EnableBothScriptContexts(); + break; + } + gTasks[taskId].data[0]++; +} + +static void DoFossilFallAndSink(u8 taskId) +{ + u16 i; + u8 *buffer; + + switch (gTasks[taskId].data[0]) + { + case 1: + sUnknown_0203CF0C = AllocZeroed(sizeof(*sUnknown_0203CF0C)); + sUnknown_0203CF0C->frameImageTiles = AllocZeroed(ROOT_FOSSIL_GFX_LENGTH); + sUnknown_0203CF0C->frameImage = AllocZeroed(sizeof(*sUnknown_0203CF0C->frameImage)); + sUnknown_0203CF0C->unkC = AllocZeroed(ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16)); + sUnknown_0203CF0C->unk10 = 0; + break; + case 2: + buffer = sUnknown_0203CF0C->frameImageTiles; + for (i = 0; i < ROOT_FOSSIL_GFX_LENGTH; i++, buffer++) + *buffer = sRootFossil_Gfx[i]; + break; + case 3: + sUnknown_0203CF0C->frameImage->data = sUnknown_0203CF0C->frameImageTiles; + sUnknown_0203CF0C->frameImage->size = ROOT_FOSSIL_GFX_LENGTH; + break; + case 4: + { + struct SpriteTemplate fossilTemplate; + + fossilTemplate = gUnknown_08617E00; + fossilTemplate.images = (struct SpriteFrameImage *)(sUnknown_0203CF0C->frameImage); + sUnknown_0203CF0C->spriteId = CreateSprite(&fossilTemplate, 128, -16, 1); + gSprites[sUnknown_0203CF0C->spriteId].centerToCornerVecX = 0; + gSprites[sUnknown_0203CF0C->spriteId].data[0] = gSprites[sUnknown_0203CF0C->spriteId].pos1.x; + gSprites[sUnknown_0203CF0C->spriteId].data[1] = 1; + } + case 5: + for (i = 0; i < ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH; i++) + sUnknown_0203CF0C->unkC[i] = i; + break; + case 6: + for (i = 0; i < (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH * sizeof(u16)); i++) + { + u16 rand1, rand2, temp; + + rand1 = Random() % 0x100; + rand2 = Random() % 0x100; + SWAP(sUnknown_0203CF0C->unkC[rand2], sUnknown_0203CF0C->unkC[rand1], temp); + } + gSprites[sUnknown_0203CF0C->spriteId].callback = sub_81BF248; + break; + case 7: + if (gSprites[sUnknown_0203CF0C->spriteId].callback != SpriteCallbackDummy) + return; + DestroySprite(&gSprites[sUnknown_0203CF0C->spriteId]); + FREE_AND_SET_NULL(sUnknown_0203CF0C->unkC);; + FREE_AND_SET_NULL(sUnknown_0203CF0C->frameImage); + FREE_AND_SET_NULL(sUnknown_0203CF0C->frameImageTiles); + FREE_AND_SET_NULL(sUnknown_0203CF0C); + break; + case 8: + EnableBothScriptContexts(); + break; + } + + gTasks[taskId].data[0]++; +} + +static void sub_81BF248(struct Sprite *sprite) +{ + if (sUnknown_0203CF0C->unk10 >= (ROOT_FOSSIL_GFX_RANDOMIZER_LENGTH)) + { + sprite->callback = SpriteCallbackDummy; + } + else if (sprite->pos1.y >= 96) + { + u8 i; + for (i = 0; i < 2; i++) + sub_81BF2B8(sUnknown_0203CF0C->frameImageTiles, sUnknown_0203CF0C->unkC[sUnknown_0203CF0C->unk10++], 0, 16, 0); + + StartSpriteAnim(sprite, 0); + } + else + { + sprite->pos1.y++; + } +} + +#ifdef NONMATCHING +static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e) +{ + u8 r5, r4, r0, r2; + u16 var; + + r4 = r5 = b / d; + gUnknown_030012A8[0] = r4; + + r0 = r2 = b % d; + gUnknown_030012A8[1] = r2; + + r4 &= 7; + r2 &= 7; + gUnknown_030012A8[2] = r4; + gUnknown_030012A8[3] = r2; + + r0 /= 8; + r5 /= 8; + gUnknown_030012A8[4] = r0; + gUnknown_030012A8[5] = r5; + + var = ((d / 8) * (r5 * 64)) + (r0 * 64); + gUnknown_030012A8[6] = var; + + var += (r4 * 8) + r2; + gUnknown_030012A8[7] = var; + + // This part is non-matching. 99% sure it IS functionally equivalent, though. + b = (b & 1) ^ 1; + c = (c << ((b) << 2)) | (15 << ((b ^ 1) << 2)); + + a[(var / 2) + (e * 32)] &= c; +} + +#else +NAKED +static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e) +{ + asm_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, 0x8\n\ + str r0, [sp]\n\ + mov r10, r1\n\ + adds r6, r2, 0\n\ + mov r8, r3\n\ + ldr r0, [sp, 0x28]\n\ + mov r9, r0\n\ + lsls r1, 16\n\ + lsrs r1, 16\n\ + mov r10, r1\n\ + lsls r6, 24\n\ + lsrs r6, 24\n\ + mov r0, r8\n\ + lsls r0, 24\n\ + mov r8, r0\n\ + lsrs r7, r0, 24\n\ + mov r1, r9\n\ + lsls r1, 24\n\ + lsrs r1, 24\n\ + mov r9, r1\n\ + mov r0, r10\n\ + adds r1, r7, 0\n\ + bl __divsi3\n\ + adds r5, r0, 0\n\ + lsls r5, 24\n\ + lsrs r4, r5, 24\n\ + ldr r3, =gUnknown_030012A8\n\ + strh r4, [r3]\n\ + mov r0, r10\n\ + adds r1, r7, 0\n\ + str r3, [sp, 0x4]\n\ + bl __modsi3\n\ + lsls r0, 24\n\ + lsrs r2, r0, 24\n\ + ldr r3, [sp, 0x4]\n\ + strh r2, [r3, 0x2]\n\ + movs r1, 0x7\n\ + ands r4, r1\n\ + ands r2, r1\n\ + strh r4, [r3, 0x4]\n\ + strh r2, [r3, 0x6]\n\ + lsrs r0, 27\n\ + lsrs r5, 27\n\ + strh r0, [r3, 0x8]\n\ + strh r5, [r3, 0xA]\n\ + mov r1, r8\n\ + lsrs r1, 27\n\ + lsls r1, 6\n\ + mov r8, r1\n\ + mov r1, r8\n\ + muls r1, r5\n\ + lsls r0, 6\n\ + adds r1, r0\n\ + lsls r1, 16\n\ + lsrs r1, 16\n\ + strh r1, [r3, 0xC]\n\ + lsls r4, 3\n\ + adds r4, r2\n\ + adds r1, r4\n\ + lsls r4, r1, 16\n\ + lsrs r4, 17\n\ + strh r1, [r3, 0xE]\n\ + movs r1, 0x1\n\ + mov r0, r10\n\ + ands r1, r0\n\ + movs r2, 0x1\n\ + eors r1, r2\n\ + lsls r0, r1, 2\n\ + lsls r6, r0\n\ + eors r1, r2\n\ + lsls r1, 2\n\ + movs r0, 0xF\n\ + lsls r0, r1\n\ + orrs r6, r0\n\ + lsls r6, 24\n\ + lsrs r6, 24\n\ + mov r1, r9\n\ + lsls r1, 5\n\ + mov r9, r1\n\ + add r9, r4\n\ + ldr r1, [sp]\n\ + add r1, r9\n\ + ldrb r0, [r1]\n\ + ands r6, r0\n\ + strb r6, [r1]\n\ + add sp, 0x8\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\ + "); +} +#endif // NONMATCHING diff --git a/src/overworld.c b/src/overworld.c index 27bd0425a8..2aad688615 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -31,6 +31,7 @@ #include "map_name_popup.h" #include "menu.h" #include "metatile_behavior.h" +#include "mirage_tower.h" #include "money.h" #include "new_game.h" #include "palette.h" @@ -112,7 +113,6 @@ extern void sub_81AA1D8(void); extern void c2_change_map(void); extern void sub_81D5DF8(void); extern void sub_80EB218(void); -extern void sub_81BE72C(void); extern void sub_80AF3C8(void); extern void sub_81971F4(void); extern void sub_808B578(void); @@ -134,7 +134,6 @@ extern void sub_81AA2F8(void); extern void sub_8195E10(void); extern void sub_80EDB44(void); extern void sub_81D64C0(void); -extern void sub_81BE6AC(void); extern void sub_8098128(void); extern void copy_map_tileset1_to_vram(const struct MapLayout *); extern void copy_map_tileset2_to_vram(const struct MapLayout *); @@ -146,7 +145,6 @@ extern bool8 warp0_in_pokecenter(void); extern void ResetAllPicSprites(void); extern void FieldEffectActiveListClear(void); extern void SetUpFieldTasks(void); -extern void sub_81BE6B8(void); extern void ShowStartMenu(void); extern void sub_80AEE84(void); extern void mapldr_default(void); @@ -1450,9 +1448,9 @@ u8 GetCurrentMapBattleScene(void) static void overworld_bg_setup(void) { InitBgsFromTemplates(0, gUnknown_08339DAC, ARRAY_COUNT(gUnknown_08339DAC)); - SetBgAttribute(1, BG_CTRL_ATTR_PALETTEMODE, 1); - SetBgAttribute(2, BG_CTRL_ATTR_PALETTEMODE, 1); - SetBgAttribute(3, BG_CTRL_ATTR_PALETTEMODE, 1); + SetBgAttribute(1, BG_ATTR_MOSAIC, 1); + SetBgAttribute(2, BG_ATTR_MOSAIC, 1); + SetBgAttribute(3, BG_ATTR_MOSAIC, 1); gBGTilemapBuffers2 = AllocZeroed(0x800); gBGTilemapBuffers1 = AllocZeroed(0x800); gBGTilemapBuffers3 = AllocZeroed(0x800); @@ -1464,7 +1462,7 @@ static void overworld_bg_setup(void) void overworld_free_bg_tilemaps(void) { - sub_81BE72C(); + ClearMirageTowerPulseBlendEffect(); sub_81971F4(); if (gBGTilemapBuffers3 != NULL) FREE_AND_SET_NULL(gBGTilemapBuffers3); @@ -2121,7 +2119,7 @@ static void do_load_map_stuff_loop(u8 *state) static void sub_80867C8(void) { - sub_81BE6AC(); + ClearMirageTowerPulseBlend(); MoveSaveBlocks_ResetHeap(); } @@ -2199,7 +2197,7 @@ static void sub_8086988(u32 a1) if (!a1) SetUpFieldTasks(); mapheader_run_script_with_tag_x5(); - sub_81BE6B8(); + TryStartMirageTowerPulseBlendEffect(); } static void sub_80869DC(void) diff --git a/src/party_menu.c b/src/party_menu.c index 0ccfd45de5..256a167866 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -22,7 +22,8 @@ #include "field_specials.h" #include "field_weather.h" #include "fieldmap.h" -#include "fldeff_softboiled.h" +#include "fldeff.h" +#include "fldeff_misc.h" #include "frontier_util.h" #include "gpu_regs.h" #include "graphics.h" @@ -72,14 +73,16 @@ #include "constants/species.h" #include "constants/vars.h" -enum { +enum +{ CAN_LEARN_MOVE, CANNOT_LEARN_MOVE, ALREADY_KNOWS_MOVE, CANNOT_LEARN_MOVE_IS_EGG }; -struct Unk_Rodata1 { +struct Unk_Rodata1 +{ void (*unk0)(u8, u8, u8, u8, u8, u8); u8 unk4[24]; u8 unk1C; @@ -88,7 +91,8 @@ struct Unk_Rodata1 { u8 unk1F; }; -struct Struct203CEC4 { +struct Struct203CEC4 +{ TaskFunc unk0; MainCallback exitCallback; u32 unk8_0:1; @@ -104,9 +108,10 @@ struct Struct203CEC4 { s16 data[16]; }; -struct Struct203CEDC { - struct Unk_Rodata1 *unk0; - u8 *unk4; +struct Struct203CEDC +{ + const struct Unk_Rodata1 *unk0; + const u8 *unk4; u8 windowId; u8 unk9; u8 unkA; @@ -114,16 +119,6 @@ struct Struct203CEDC { u8 unkC; }; -struct Struct8615C08 { - const u8 *textPtr; - TaskFunc func; -}; - -struct Struct8615D9C { - bool8 (*fieldMoveFunc)(void); - u8 msgID; -}; - static EWRAM_DATA struct Struct203CEC4 *gUnknown_0203CEC4 = NULL; EWRAM_DATA struct Struct203CEC8 gUnknown_0203CEC8 = {0}; static EWRAM_DATA struct Struct203CEDC *gUnknown_0203CEDC = NULL; @@ -139,86 +134,6 @@ static EWRAM_DATA u16 gUnknown_0203CEFC = 0; static EWRAM_DATA u16 gUnknown_0203CEFE = 0; // unused EWRAM_DATA u8 gUnknown_0203CF00[3] = {0}; -// BELOW TO BE CONVERTED TO C - -extern u32 gUnknown_08615048[]; // tutor compatibility table -extern struct BgTemplate gUnknown_086156B8[]; -extern struct Unk_Rodata1 gUnknown_086156C4[2]; -// extern struct Unk_Rodata1 gUnknown_086156E4; -extern u8 gUnknown_08615704[][6][8]; -extern u8 gUnknown_086157C4[]; -extern u8 gUnknown_086157E0[]; -extern const u8 gUnknown_086157FC[][3]; -extern struct WindowTemplate gUnknown_08615810[]; -extern struct WindowTemplate gUnknown_08615850[]; -extern struct WindowTemplate gUnknown_086158D0[]; -extern struct WindowTemplate gUnknown_08615890[]; -extern struct WindowTemplate gUnknown_08615908; -extern struct WindowTemplate gUnknown_08615910; -extern struct WindowTemplate gUnknown_08615918; -extern struct WindowTemplate gUnknown_08615920; -extern struct WindowTemplate gUnknown_08615928; -extern struct WindowTemplate gUnknown_08615930; -extern struct WindowTemplate gUnknown_08615938; -extern struct WindowTemplate gUnknown_08615940; -extern struct WindowTemplate gUnknown_08615948; -extern struct WindowTemplate gUnknown_08615950; -extern struct WindowTemplate gUnknown_08615958; -extern struct WindowTemplate gUnknown_08615960; -extern struct WindowTemplate gUnknown_08615968; -extern struct WindowTemplate gUnknown_08615970; -extern u8 gUnknown_08615988[]; -extern u8 gUnknown_086159CE[]; -extern u8 gUnknown_08615A14[]; -extern u8 gUnknown_08615A4A[]; -extern u8 gUnknown_08615A80[]; -extern u8 gUnknown_08615AB6[]; -extern u8 gUnknown_08615AB8[]; -extern u8 gUnknown_08615ABA[]; -extern u8 gUnknown_08615ABD[]; -extern u8 gUnknown_08615AC0[]; -extern u8 gUnknown_08615AC3[]; -extern u8 gUnknown_08615AC5[]; -extern u8 gUnknown_08615AC7[]; -extern u8 gUnknown_08615AC9[]; -extern u8 gUnknown_08615ACB[]; -extern u8 gUnknown_08615ACD[]; -extern u8 gUnknown_08615AD0[]; -extern u8 gUnknown_08615AD3[]; -extern u8 gUnknown_08615AD6[]; -extern u8 gUnknown_08615AD9[]; -extern u8 gUnknown_08615ADC[]; -extern u8 gUnknown_08615ADF[]; -extern u8 gUnknown_08615AE2[]; -extern u8 gUnknown_08615AE5[]; -extern u8 gUnknown_08615AE8[]; -extern u8 gUnknown_08615AEB[]; -extern u8 gUnknown_08615AEE[]; -extern u8 gUnknown_08615AF1[]; -extern const u8 *gUnknown_08615AF4[]; -extern const u8 *gUnknown_08615B60[]; -extern struct Struct8615C08 gUnknown_08615C08[]; -extern u8 *gUnknown_08615D38[]; -extern u8 gUnknown_08615D70[]; -extern const u16 gUnknown_08615D7E[]; -extern const struct Struct8615D9C gUnknown_08615D9C[]; -extern const u8 *gUnknown_08615E0C[]; -extern const struct SpriteSheet gUnknown_08615EB0; -extern const struct SpritePalette gUnknown_08615EB8; -extern struct SpriteTemplate gSpriteTemplate_8615EC0; -extern const struct CompressedSpriteSheet gUnknown_08615EF8; -extern const struct CompressedSpritePalette gUnknown_08615F00; -extern struct SpriteTemplate gSpriteTemplate_8615F08; -extern const struct CompressedSpriteSheet gUnknown_08615F70; -extern struct SpriteTemplate gSpriteTemplate_8615F78; -extern const struct CompressedSpriteSheet gUnknown_08615FF8; -extern const struct CompressedSpritePalette gUnknown_08616000; -extern struct SpriteTemplate gSpriteTemplate_8616008; -extern u8 gUnknown_08616020[]; -extern u16 gUnknown_08616040[]; - -// ABOVE TO BE CONVERTED TO C - extern void (*gUnknown_03006328)(u8, TaskFunc); static void reset_brm(void); @@ -260,8 +175,8 @@ static u8 sub_81B8830(void); static bool8 GetBattleEntryEligibility(struct Pokemon *); static bool8 sub_81B218C(u8); static void DisplayPartyPokemonSelectToTeachMove(u8, u16, u8); -static u8 CanPartyPokemonLearnTMTutor(struct Pokemon *, u16, u8); -static void DisplayPartyPokemonBarDetail(u8, const u8*, u8, u8*); +static u8 CanMonLearnTMTutor(struct Pokemon *, u16, u8); +static void DisplayPartyPokemonBarDetail(u8, const u8*, u8, const u8*); static void DisplayPartyPokemonLevel(u8, struct Struct203CEDC *); static void DisplayPartyPokemonGender(u8, u16, u8*, struct Struct203CEDC *); static void DisplayPartyPokemonHP(u16, struct Struct203CEDC *); @@ -320,14 +235,14 @@ static bool16 sub_81B2134(struct Pokemon*); static bool16 sub_81B2164(struct Pokemon*); static void sub_81B2248(u8); static void sub_81B227C(u8); -static bool8 sub_81B2370(u16, u8); -static u16 sub_81B2360(u8); +static bool8 CanLearnTutorMove(u16, u8); +static u16 GetTutorMove(u8); static bool8 sub_81B314C(void); static void sub_81B3414(struct Pokemon*, u8); static u8 sub_81B8A2C(struct Pokemon*); static u8 sub_81B856C(s8); static void sub_81B469C(u8); -static void sub_81B3730(u8); +static void HandleMenuInput(u8); static void sub_81B3828(void); static void pokemon_change_order(void); static void sub_81B3894(void); @@ -444,7 +359,1177 @@ static void sub_81B953C(u8); static void sub_81B9588(void); static void sub_81B9640(u8); static void sub_81B97DC(struct Pokemon*, u8, u8); +static void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); +static void BlitBitmapToPartyWindow_Default2(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f); +static void CursorCb_Summary(u8 taskId); +static void CursorCb_Switch(u8 taskId); +static void CursorCb_Cancel1(u8 taskId); +static void CursorCb_Item(u8 taskId); +static void CursorCb_Give(u8 taskId); +static void CursorCb_TakeItem(u8 taskId); +static void CursorCb_Mail(u8 taskId); +static void CursorCb_Read(u8 taskId); +static void CursorCb_TakeMail(u8 taskId); +static void CursorCb_Cancel2(u8 taskId); +static void CursorCb_SendMon(u8 taskId); +static void CursorCb_Enter(u8 taskId); +static void CursorCb_NoEntry(u8 taskId); +static void CursorCb_Store(u8 taskId); +static void CursorCb_Register(u8 taskId); +static void CursorCb_Trade1(u8 taskId); +static void CursorCb_Trade2(u8 taskId); +static void CursorCb_Toss(u8 taskId); +static void CursorCb_FieldMove(u8 taskId); +static bool8 SetUpFieldMove_Surf(void); +static bool8 SetUpFieldMove_Fly(void); +static bool8 SetUpFieldMove_Waterfall(void); +static bool8 SetUpFieldMove_Dive(void); +// static const data +#include "data/pokemon/tutor_learnsets.h" + +static const struct BgTemplate gUnknown_086156B8[] = +{ + { + .bg = 0, + .charBaseIndex = 0, + .mapBaseIndex = 31, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 30, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 0, + .mapBaseIndex = 28, + .screenSize = 1, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, +}; + +static const struct Unk_Rodata1 gUnknown_086156C4[] = +{ + {BlitBitmapToPartyWindow_Default1, {0x18, 0xB, 0x28, 0xD, 0x20, 0x14, 0x20, 8, 0x40, 0x14, 8, 8, 0x26, 0x25, 0x18, 8, 0x35, 0x25, 0x18, 8, 0x18, 0x23, 0x30, 3}, 0xC, 0x22, 0x40, 0x10}, + {BlitBitmapToPartyWindow_Default2, {0x16, 3, 0x28, 0xD, 0x1E, 0xC, 0x20, 8, 0x3E, 0xC, 8, 8, 0x66, 0xC, 0x18, 8, 0x75, 0xC, 0x18, 8, 0x58, 0xA, 0x30, 3}, 0x4D, 4, 0x40, 0x10}, +}; + +static const u8 gUnknown_08615704[][6][8] = +{ + { + {16, 40, 20, 50, 50, 52, 16, 34}, + {104, 18, 108, 28, 136, 27, 102, 25}, + {104, 42, 108, 52, 136, 51, 102, 49}, + {104, 66, 108, 76, 136, 75, 102, 73}, + {104, 90, 108, 100, 136, 99, 102, 97}, + {104, 114, 108, 124, 136, 123, 102, 121}, + }, + { + {16, 24, 20, 34, 50, 36, 16, 18}, + {16, 80, 20, 90, 50, 92, 16, 74}, + {104, 18, 108, 28, 136, 27, 102, 25}, + {104, 50, 108, 60, 136, 59, 102, 57}, + {104, 82, 108, 92, 136, 91, 102, 89}, + {104, 114, 108, 124, 136, 123, 102, 121}, + }, + { + {16, 24, 20, 34, 50, 36, 16, 18}, + {16, 80, 20, 90, 50, 92, 16, 74}, + {104, 26, 106, 36, 136, 35, 102, 33}, + {104, 50, 106, 60, 136, 59, 102, 57}, + {104, 82, 106, 92, 136, 91, 102, 89}, + {104, 106, 106, 116, 136, 115, 102, 113}, + }, + { + {16, 32, 20, 42, 50, 44, 16, 26}, + {104, 34, 106, 44, 136, 43, 102, 41}, + {104, 58, 106, 68, 136, 67, 102, 65}, + {16, 104, 20, 114, 50, 116, 16, 98}, + {104, 106, 106, 116, 136, 115, 102, 113}, + {104, 130, 106, 140, 136, 139, 102, 137}, + }, +}; + +static const u32 gUnknown_086157C4[] = INCBIN_U32("graphics/interface/unknown_6157C4.bin"); +static const u32 gUnknown_086157E0[] = INCBIN_U32("graphics/interface/unknown_6157E0.bin"); + +static const u8 gUnknown_086157FC[][3] = +{ + {0, 3, 2}, + {0, 1, 6}, + {0, 11, 12}, + {1, 2, 3}, + {1, 8, 9}, + {0, 1, 2}, +}; + +static const struct WindowTemplate gUnknown_08615810[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 1, + .width = 18, + .height = 3, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 4, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xDF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 7, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x115, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 10, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x14B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x181, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate gUnknown_08615850[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 1, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xEF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 5, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x125, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 9, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x15B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x191, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate gUnknown_08615890[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 2, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xEF, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 5, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0x125, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 9, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x15B, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x191, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate gUnknown_086158D0[] = +{ + { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 2, + .width = 10, + .height = 7, + .paletteNum = 3, + .baseBlock = 0x63, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 3, + .width = 18, + .height = 3, + .paletteNum = 5, + .baseBlock = 0xA9, + }, + { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 6, + .width = 18, + .height = 3, + .paletteNum = 6, + .baseBlock = 0xDF, + }, + { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 11, + .width = 10, + .height = 7, + .paletteNum = 4, + .baseBlock = 0x115, + }, + { + .bg = 2, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 3, + .paletteNum = 7, + .baseBlock = 0x16B, + }, + { + .bg = 2, + .tilemapLeft = 12, + .tilemapTop = 15, + .width = 18, + .height = 3, + .paletteNum = 8, + .baseBlock = 0x1A1, + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate gUnknown_08615908 = +{ + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 17, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1C7, +}; + +static const struct WindowTemplate gUnknown_08615910 = +{ + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 18, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1C7, +}; + +static const struct WindowTemplate gUnknown_08615918 = +{ + .bg = 0, + .tilemapLeft = 24, + .tilemapTop = 16, + .width = 6, + .height = 2, + .paletteNum = 3, + .baseBlock = 0x1D3, +}; + +static const struct WindowTemplate gUnknown_08615920 = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 21, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x24F, +}; + +static const struct WindowTemplate gUnknown_08615928 = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 16, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x279, +}; + +static const struct WindowTemplate gUnknown_08615930 = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 20, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate gUnknown_08615938 = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 18, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate gUnknown_08615940 = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 17, + .width = 16, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate gUnknown_08615948 = +{ + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 20, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x299, +}; + +static const struct WindowTemplate gUnknown_08615950 = +{ + .bg = 2, + .tilemapLeft = 23, + .tilemapTop = 13, + .width = 6, + .height = 6, + .paletteNum = 14, + .baseBlock = 0x39D, +}; + +static const struct WindowTemplate gUnknown_08615958 = +{ + .bg = 2, + .tilemapLeft = 21, + .tilemapTop = 13, + .width = 8, + .height = 6, + .paletteNum = 14, + .baseBlock = 0x39D, +}; + +static const struct WindowTemplate gUnknown_08615960 = +{ + .bg = 2, + .tilemapLeft = 19, + .tilemapTop = 11, + .width = 10, + .height = 8, + .paletteNum = 14, + .baseBlock = 0x2E9, +}; + +static const struct WindowTemplate gUnknown_08615968 = +{ + .bg = 2, + .tilemapLeft = 21, + .tilemapTop = 9, + .width = 5, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x2E9, +}; + +static const struct WindowTemplate gUnknown_08615970 = +{ + .bg = 2, + .tilemapLeft = 19, + .tilemapTop = 1, + .width = 10, + .height = 11, + .paletteNum = 14, + .baseBlock = 0x2E9, +}; + +// Unused. +static const struct WindowTemplate gUnknown_08615978 = +{ + .bg = 2, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 27, + .height = 4, + .paletteNum = 14, + .baseBlock = 0x1DF, +}; + +// Unused. +static const struct WindowTemplate gUnknown_08615980 = +{ + .bg = 2, + .tilemapLeft = 0, + .tilemapTop = 13, + .width = 18, + .height = 3, + .paletteNum = 12, + .baseBlock = 0x39D, +}; + +static const u8 gUnknown_08615988[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; +static const u8 gUnknown_086159CE[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; +static const u8 gUnknown_08615A14[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; +static const u8 gUnknown_08615A4A[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; +static const u8 gUnknown_08615A80[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; +static const u8 gUnknown_08615AB6[] = {11, 12}; +static const u8 gUnknown_08615AB8[] = {9, 10}; +static const u8 gUnknown_08615ABA[] = {4, 5, 6}; +static const u8 gUnknown_08615ABD[] = {1, 7, 8}; +static const u8 gUnknown_08615AC0[] = {1, 11, 12}; +static const u8 gUnknown_08615AC3[] = {59, 60}; +static const u8 gUnknown_08615AC5[] = {75, 76}; +static const u8 gUnknown_08615AC7[] = {57, 58}; +static const u8 gUnknown_08615AC9[] = {73, 74}; +static const u8 gUnknown_08615ACB[] = {89, 90}; +static const u8 gUnknown_08615ACD[] = {52, 53, 54}; +static const u8 gUnknown_08615AD0[] = {68, 69, 70}; +static const u8 gUnknown_08615AD3[] = {84, 85, 86}; +static const u8 gUnknown_08615AD6[] = {116, 117, 118}; +static const u8 gUnknown_08615AD9[] = {132, 133, 134}; +static const u8 gUnknown_08615ADC[] = {148, 149, 150}; +static const u8 gUnknown_08615ADF[] = {100, 101, 102}; +static const u8 gUnknown_08615AE2[] = {49, 55, 56}; +static const u8 gUnknown_08615AE5[] = {65, 71, 72}; +static const u8 gUnknown_08615AE8[] = {81, 87, 88}; +static const u8 gUnknown_08615AEB[] = {97, 103, 104}; +static const u8 gUnknown_08615AEE[] = {161, 167, 168}; +static const u8 gUnknown_08615AF1[] = {17, 27, 28}; + +static const u8 *const gUnknown_08615AF4[] = +{ + gUnknown_085E9E43, + gUnknown_085EA010, + gUnknown_085EA02A, + gUnknown_085E9E55, + gUnknown_085E9E64, + gUnknown_085E9E79, + gUnknown_085E9E8F, + gUnknown_085E9EBC, + gUnknown_085E9ED4, + gUnknown_085E9EE9, + gUnknown_085E9FDB, + gUnknown_085EA046, + gUnknown_085EA05B, + gUnknown_085E9F01, + gUnknown_085E9F58, + gUnknown_085E9F6F, + gUnknown_085E9F81, + gUnknown_085E9F90, + gUnknown_085E9FA7, + gUnknown_085E9FC2, + gText_EmptyString2, + gUnknown_085E9EA6, + gUnknown_085E9F16, + gUnknown_085E9F2A, + gUnknown_085E9F42, + gUnknown_085E9FF9, + gUnknown_085EA073, +}; + +static const u8 *const gUnknown_08615B60[] = +{ + gUnknown_085EA091, + gUnknown_085EA099, + gUnknown_085EA09E, + gUnknown_085EA0A4, + gUnknown_085EA0AB, + gUnknown_085EA0E7, + gUnknown_085EA0B1, + gUnknown_085EA0B6, + gUnknown_085EA0BF, + gUnknown_085EA0C5, + gUnknown_085EA0CF, + gUnknown_085EA0D7, + gUnknown_085EA0DC, +}; + +// Unknown unused data. Feel free to remove. +static const u16 gUnknown_08615B94[] = +{ + 0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071, + 0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068, + 0x0073, 0x015f, 0x0035, 0x00bc, 0x00c9, 0x007e, 0x013d, 0x014c, 0x0103, 0x0107, 0x0122, 0x009c, 0x00d5, 0x00a8, 0x00d3, 0x011d, + 0x0121, 0x013b, 0x000f, 0x0013, 0x0039, 0x0046, 0x0094, 0x00f9, 0x007f, 0x0123, +}; + +enum +{ + MENU_SUMMARY, + MENU_SWITCH, + MENU_CANCEL1, + MENU_ITEM, + MENU_GIVE, + MENU_TAKE_ITEM, + MENU_MAIL, + MENU_TAKE_MAIL, + MENU_READ, + MENU_CANCEL2, + MENU_SHIFT, + MENU_SEND_OUT, + MENU_ENTER, + MENU_NO_ENTRY, + MENU_STORE, + MENU_REGISTER, + MENU_TRADE1, + MENU_TRADE2, + MENU_TOSS, + MENU_FIELD_MOVES, +}; + +enum +{ + FIELD_MOVE_CUT, + FIELD_MOVE_FLASH, + FIELD_MOVE_ROCK_SMASH, + FIELD_MOVE_STRENGTH, + FIELD_MOVE_SURF, + FIELD_MOVE_FLY, + FIELD_MOVE_DIVE, + FIELD_MOVE_WATERFALL, + FIELD_MOVE_TELEPORT, + FIELD_MOVE_DIG, + FIELD_MOVE_SECRET_POWER, + FIELD_MOVE_MILK_DRINK, + FIELD_MOVE_SOFT_BOILED, + FIELD_MOVE_SWEET_SCENT, +}; + +// What a weird choice of table termination; +#define FIELD_MOVE_TERMINATOR MOVE_SWORDS_DANCE + +struct +{ + const u8 *text; + TaskFunc func; +} static const sCursorOptions[] = +{ + [MENU_SUMMARY] = {gText_Summary5, CursorCb_Summary}, + [MENU_SWITCH] = {gText_Switch2, CursorCb_Switch}, + [MENU_CANCEL1] = {gText_Cancel2, CursorCb_Cancel1}, + [MENU_ITEM] = {gText_Item, CursorCb_Item}, + [MENU_GIVE] = {gMenuText_Give, CursorCb_Give}, + [MENU_TAKE_ITEM] = {gText_Take, CursorCb_TakeItem}, + [MENU_MAIL] = {gText_Mail, CursorCb_Mail}, + [MENU_TAKE_MAIL] = {gText_Take2, CursorCb_TakeMail}, + [MENU_READ] = {gText_Read2, CursorCb_Read}, + [MENU_CANCEL2] = {gText_Cancel2, CursorCb_Cancel2}, + [MENU_SHIFT] = {gText_Shift, CursorCb_SendMon}, + [MENU_SEND_OUT] = {gText_SendOut, CursorCb_SendMon}, + [MENU_ENTER] = {gText_Enter, CursorCb_Enter}, + [MENU_NO_ENTRY] = {gText_NoEntry, CursorCb_NoEntry}, + [MENU_STORE] = {gText_Store, CursorCb_Store}, + [MENU_REGISTER] = {gText_Register, CursorCb_Register}, + [MENU_TRADE1] = {gText_Trade4, CursorCb_Trade1}, + [MENU_TRADE2] = {gText_Trade4, CursorCb_Trade2}, + [MENU_TOSS] = {gMenuText_Toss, CursorCb_Toss}, + [MENU_FIELD_MOVES + FIELD_MOVE_CUT] = {gMoveNames[MOVE_CUT], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_FLASH] = {gMoveNames[MOVE_FLASH], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_ROCK_SMASH] = {gMoveNames[MOVE_ROCK_SMASH], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_STRENGTH] = {gMoveNames[MOVE_STRENGTH], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SURF] = {gMoveNames[MOVE_SURF], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_FLY] = {gMoveNames[MOVE_FLY], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_DIVE] = {gMoveNames[MOVE_DIVE], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_WATERFALL] = {gMoveNames[MOVE_WATERFALL], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_TELEPORT] = {gMoveNames[MOVE_TELEPORT], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_DIG] = {gMoveNames[MOVE_DIG], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SECRET_POWER] = {gMoveNames[MOVE_SECRET_POWER], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_MILK_DRINK] = {gMoveNames[MOVE_MILK_DRINK], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SOFT_BOILED] = {gMoveNames[MOVE_SOFT_BOILED], CursorCb_FieldMove}, + [MENU_FIELD_MOVES + FIELD_MOVE_SWEET_SCENT] = {gMoveNames[MOVE_SWEET_SCENT], CursorCb_FieldMove}, +}; + +static const u8 gUnknown_08615D10[] = {0, 1, 2}; +static const u8 gUnknown_08615D13[] = {10, 0, 2}; +static const u8 gUnknown_08615D16[] = {11, 0, 2}; +static const u8 gUnknown_08615D19[] = {0, 2}; +static const u8 gUnknown_08615D1B[] = {12, 0, 2}; +static const u8 gUnknown_08615D1E[] = {13, 0, 2}; +static const u8 gUnknown_08615D21[] = {14, 0, 2}; +static const u8 gUnknown_08615D24[] = {4, 5, 9}; +static const u8 gUnknown_08615D27[] = {8, 7, 9}; +static const u8 gUnknown_08615D2A[] = {15, 0, 2}; +static const u8 gUnknown_08615D2D[] = {16, 0, 2}; +static const u8 gUnknown_08615D30[] = {17, 0, 2}; +static const u8 gUnknown_08615D33[] = {5, 18, 2}; + +static const u8 *const gUnknown_08615D38[] = +{ + NULL, + gUnknown_08615D10, + gUnknown_08615D13, + gUnknown_08615D16, + gUnknown_08615D1B, + gUnknown_08615D1E, + gUnknown_08615D21, + gUnknown_08615D19, + gUnknown_08615D24, + gUnknown_08615D27, + gUnknown_08615D2A, + gUnknown_08615D2D, + gUnknown_08615D30, + gUnknown_08615D33, +}; + +static const u8 gUnknown_08615D70[] = {0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03}; + +static const u16 sFieldMoves[] = +{ + MOVE_CUT, MOVE_FLASH, MOVE_ROCK_SMASH, MOVE_STRENGTH, MOVE_SURF, MOVE_FLY, MOVE_DIVE, MOVE_WATERFALL, MOVE_TELEPORT, + MOVE_DIG, MOVE_SECRET_POWER, MOVE_MILK_DRINK, MOVE_SOFT_BOILED, MOVE_SWEET_SCENT, FIELD_MOVE_TERMINATOR +}; + +struct +{ + bool8 (*fieldMoveFunc)(void); + u8 msgId; +} static const sFieldMoveCursorCallbacks[] = +{ + [FIELD_MOVE_CUT] = {SetUpFieldMove_Cut, 0x07}, + [FIELD_MOVE_FLASH] = {SetUpFieldMove_Flash, 0x0d}, + [FIELD_MOVE_ROCK_SMASH] = {SetUpFieldMove_RockSmash, 0x0d}, + [FIELD_MOVE_STRENGTH] = {SetUpFieldMove_Strength, 0x0d}, + [FIELD_MOVE_SURF] = {SetUpFieldMove_Surf, 0x08}, + [FIELD_MOVE_FLY] = {SetUpFieldMove_Fly, 0x0d}, + [FIELD_MOVE_DIVE] = {SetUpFieldMove_Dive, 0x0d}, + [FIELD_MOVE_WATERFALL] = {SetUpFieldMove_Waterfall, 0x0d}, + [FIELD_MOVE_TELEPORT] = {SetUpFieldMove_Teleport, 0x0d}, + [FIELD_MOVE_DIG] = {SetUpFieldMove_Dig, 0x0d}, + [FIELD_MOVE_SECRET_POWER] = {SetUpFieldMove_SecretPower, 0x0d}, + [FIELD_MOVE_MILK_DRINK] = {SetUpFieldMove_SoftBoiled, 0x10}, + [FIELD_MOVE_SOFT_BOILED] = {SetUpFieldMove_SoftBoiled, 0x10}, + [FIELD_MOVE_SWEET_SCENT] = {SetUpFieldMove_SweetScent, 0x0d}, +}; + +static const u8 *const gUnknown_08615E0C[] = +{ + gText_NotPkmnOtherTrainerWants, + gText_ThatIsntAnEgg, + gText_PkmnCantBeTradedNow, + gText_PkmnCantBeTradedNow, + gText_OtherTrainersPkmnCantBeTraded, + gText_EggCantBeTradedNow, + gText_OtherTrainerCantAcceptPkmn, + gText_CantTradeWithTrainer, + gText_CantTradeWithTrainer, +}; + +static const u32 gUnknown_08615E30[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); +static const u16 gUnknown_08615E70[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); + +static const struct OamData gOamData_83765EC = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd gSpriteAnim_83765F4[] = +{ + ANIMCMD_FRAME(0, 1), + ANIMCMD_END +}; + +static const union AnimCmd gSpriteAnim_83765FC[] = +{ + ANIMCMD_FRAME(1, 1), + ANIMCMD_END +}; + +static const union AnimCmd *const gSpriteAnimTable_8376604[] = +{ + gSpriteAnim_83765F4, + gSpriteAnim_83765FC, +}; + +static const struct SpriteSheet gUnknown_08615EB0 = +{ + gUnknown_08615E30, sizeof(gUnknown_08615E30), 0xd750 +}; + +static const struct SpritePalette gUnknown_08615EB8 = +{ + gUnknown_08615E70, 0xd750 +}; + +static const struct SpriteTemplate gSpriteTemplate_8615EC0 = +{ + 0xd750, + 0xd750, + &gOamData_83765EC, + gSpriteAnimTable_8376604, + NULL, + gDummySpriteAffineAnimTable, + SpriteCallbackDummy +}; + +static const struct OamData sOamData_8615ED8 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sSpriteAnim_8615EE0[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615EE8[] = +{ + ANIMCMD_FRAME(16, 0), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_8615EF0[] = +{ + sSpriteAnim_8615EE0, + sSpriteAnim_8615EE8 +}; + +static const struct CompressedSpriteSheet gUnknown_08615EF8 = +{ + gPartyMenuPokeball_Gfx, 0x400, 0x04b0 +}; + +static const struct CompressedSpritePalette gUnknown_08615F00 = +{ + gPartyMenuPokeball_Pal, 0x04b0 +}; + +static const struct SpriteTemplate gSpriteTemplate_8615F08 = +{ + .tileTag = 0x04b0, + .paletteTag = 0x04b0, + .oam = &sOamData_8615ED8, + .anims = sSpriteAnimTable_8615EF0, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +static const struct OamData sOamData_8615F20 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sSpriteAnim_8615F28[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615F30[] = +{ + ANIMCMD_FRAME(4, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615F38[] = +{ + ANIMCMD_FRAME(8, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615F40[] = +{ + ANIMCMD_FRAME(12, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615F48[] = +{ + ANIMCMD_FRAME(16, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615F50[] = +{ + ANIMCMD_FRAME(20, 0), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_8615F58[] = +{ + sSpriteAnim_8615F28, + sSpriteAnim_8615F30, + sSpriteAnim_8615F38, + sSpriteAnim_8615F40, + sSpriteAnim_8615F48, + sSpriteAnim_8615F50 +}; + +static const struct CompressedSpriteSheet gUnknown_08615F70 = +{ + gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1 +}; + +static const struct SpriteTemplate gSpriteTemplate_8615F78 = +{ + .tileTag = 1201, + .paletteTag = 1200, + .oam = &sOamData_8615F20, + .anims = sSpriteAnimTable_8615F58, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +static const struct OamData sOamData_8615F90 = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sSpriteAnim_8615F98[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615FA0[] = +{ + ANIMCMD_FRAME(4, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615FA8[] = +{ + ANIMCMD_FRAME(8, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615FB0[] = +{ + ANIMCMD_FRAME(12, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615FB8[] = +{ + ANIMCMD_FRAME(16, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615FC0[] = +{ + ANIMCMD_FRAME(20, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615FC8[] = +{ + ANIMCMD_FRAME(24, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_8615FD0[] = +{ + ANIMCMD_FRAME(28, 0), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_8615FD8[] = +{ + sSpriteAnim_8615F98, + sSpriteAnim_8615FA0, + sSpriteAnim_8615FA8, + sSpriteAnim_8615FB0, + sSpriteAnim_8615FB8, + sSpriteAnim_8615FC0, + sSpriteAnim_8615FC8, + sSpriteAnim_8615FD0 +}; + +static const struct CompressedSpriteSheet gUnknown_08615FF8 = +{ + gStatusGfx_Icons, 0x400, 1202 +}; + +static const struct CompressedSpritePalette gUnknown_08616000 = +{ + gStatusPal_Icons, 1202 +}; + +static const struct SpriteTemplate gSpriteTemplate_8616008 = +{ + .tileTag = 1202, + .paletteTag = 1202, + .oam = &sOamData_8615F90, + .anims = sSpriteAnimTable_8615FD8, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +static const u8 gUnknown_08616020[] = {0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00}; + +// Unused table of pointers to strings of statistics. +static const u8 *const gUnknown_08616028[] = +{ + gText_HP4, + gText_Attack3, + gText_Defense3, + gText_SpAtk4, + gText_SpDef4, + gText_Speed2 +}; + +static const u16 gTMHMMoves[] = +{ + MOVE_FOCUS_PUNCH, + MOVE_DRAGON_CLAW, + MOVE_WATER_PULSE, + MOVE_CALM_MIND, + MOVE_ROAR, + MOVE_TOXIC, + MOVE_HAIL, + MOVE_BULK_UP, + MOVE_BULLET_SEED, + MOVE_HIDDEN_POWER, + MOVE_SUNNY_DAY, + MOVE_TAUNT, + MOVE_ICE_BEAM, + MOVE_BLIZZARD, + MOVE_HYPER_BEAM, + MOVE_LIGHT_SCREEN, + MOVE_PROTECT, + MOVE_RAIN_DANCE, + MOVE_GIGA_DRAIN, + MOVE_SAFEGUARD, + MOVE_FRUSTRATION, + MOVE_SOLAR_BEAM, + MOVE_IRON_TAIL, + MOVE_THUNDERBOLT, + MOVE_THUNDER, + MOVE_EARTHQUAKE, + MOVE_RETURN, + MOVE_DIG, + MOVE_PSYCHIC, + MOVE_SHADOW_BALL, + MOVE_BRICK_BREAK, + MOVE_DOUBLE_TEAM, + MOVE_REFLECT, + MOVE_SHOCK_WAVE, + MOVE_FLAMETHROWER, + MOVE_SLUDGE_BOMB, + MOVE_SANDSTORM, + MOVE_FIRE_BLAST, + MOVE_ROCK_TOMB, + MOVE_AERIAL_ACE, + MOVE_TORMENT, + MOVE_FACADE, + MOVE_SECRET_POWER, + MOVE_REST, + MOVE_ATTRACT, + MOVE_THIEF, + MOVE_STEEL_WING, + MOVE_SKILL_SWAP, + MOVE_SNATCH, + MOVE_OVERHEAT, + MOVE_CUT, + MOVE_FLY, + MOVE_SURF, + MOVE_STRENGTH, + MOVE_FLASH, + MOVE_ROCK_SMASH, + MOVE_WATERFALL, + MOVE_DIVE, +}; + +// code static void InitPartyMenu(u8 a, u8 b, u8 c, u8 d, u8 e, TaskFunc task, MainCallback callback) { u16 i; @@ -671,9 +1756,10 @@ static bool8 AllocPartyMenuBg(void) gUnknown_0203CEE4 = Alloc(0x800); if (gUnknown_0203CEE4 == NULL) return FALSE; + memset(gUnknown_0203CEE4, 0, 0x800); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, gUnknown_086156B8, 3); + InitBgsFromTemplates(0, gUnknown_086156B8, ARRAY_COUNT(gUnknown_086156B8)); SetBgTilemapBuffer(1, gUnknown_0203CEE4); ResetAllBgsCoordinates(); schedule_bg_copy_tilemap_to_vram(1); @@ -957,7 +2043,7 @@ static bool8 sub_81B0BFC(u8 slot) static void DisplayPartyPokemonSelectToTeachMove(u8 slot, u16 item, u8 tutor) { - switch (CanPartyPokemonLearnTMTutor(&gPlayerParty[slot], item, tutor)) + switch (CanMonLearnTMTutor(&gPlayerParty[slot], item, tutor)) { case CANNOT_LEARN_MOVE: case CANNOT_LEARN_MOVE_IS_EGG: @@ -1952,12 +3038,13 @@ static void sub_81B227C(u8 taskId) } } -static u8 CanPartyPokemonLearnTMTutor(struct Pokemon *mon, u16 item, u8 tutor) +static u8 CanMonLearnTMTutor(struct Pokemon *mon, u16 item, u8 tutor) { u16 move; if (GetMonData(mon, MON_DATA_IS_EGG)) return CANNOT_LEARN_MOVE_IS_EGG; + if (item >= ITEM_TM01_FOCUS_PUNCH) { if (CanMonLearnTMHM(mon, item - ITEM_TM01_FOCUS_PUNCH)) @@ -1966,30 +3053,32 @@ static u8 CanPartyPokemonLearnTMTutor(struct Pokemon *mon, u16 item, u8 tutor) return CANNOT_LEARN_MOVE; do {} while (0); // :morphon: } - else if (sub_81B2370(GetMonData(mon, MON_DATA_SPECIES), tutor) == FALSE) + else if (CanLearnTutorMove(GetMonData(mon, MON_DATA_SPECIES), tutor) == FALSE) { return CANNOT_LEARN_MOVE; } else { - move = sub_81B2360(tutor); + move = GetTutorMove(tutor); } - if (pokemon_has_move(mon, move) == TRUE) + if (MonKnowsMove(mon, move) == TRUE) return ALREADY_KNOWS_MOVE; - return CAN_LEARN_MOVE; + else + return CAN_LEARN_MOVE; } -static u16 sub_81B2360(u8 tutor) +static u16 GetTutorMove(u8 tutor) { - return gUnknown_0861500C[tutor]; + return gTutorMoves[tutor]; } -static bool8 sub_81B2370(u16 species, u8 tutor) +static bool8 CanLearnTutorMove(u16 species, u8 tutor) { - if (gUnknown_08615048[species] & (1 << tutor)) + if (sTutorLearnsets[species] & (1 << tutor)) return TRUE; - return FALSE; + else + return FALSE; } static void sub_81B239C(u8 a) @@ -2066,7 +3155,7 @@ static u16* GetPartyMenuPaletteFromBuffer(u8 paletteId) return &gUnknown_0203CEC4->palBuffer[paletteId]; } -static void BlitBitmapToPartyWindow(u8 windowId, u8 *b, u8 c, u8 x, u8 y, u8 width, u8 height) +static void BlitBitmapToPartyWindow(u8 windowId, const u8 *b, u8 c, u8 x, u8 y, u8 width, u8 height) { u8 *pixels = AllocZeroed(height * width * 32); u8 i, j; @@ -2083,7 +3172,7 @@ static void BlitBitmapToPartyWindow(u8 windowId, u8 *b, u8 c, u8 x, u8 y, u8 wid } } -/*static*/ void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f) +static void BlitBitmapToPartyWindow_Default1(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f) { if (width == 0 && height == 0) { @@ -2096,7 +3185,7 @@ static void BlitBitmapToPartyWindow(u8 windowId, u8 *b, u8 c, u8 x, u8 y, u8 wid BlitBitmapToPartyWindow(windowId, gUnknown_086159CE, 10, x, y, width, height); } -/*static*/ void BlitBitmapToPartyWindow_Default2(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f) +static void BlitBitmapToPartyWindow_Default2(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 f) { if (width == 0 && height == 0) { @@ -2237,7 +3326,7 @@ static void UpdateSelectedPartyBox(struct Struct203CEDC *ptr, u8 bitfield) } } -static void DisplayPartyPokemonBarDetail(u8 windowId, const u8 *str, u8 color, u8 *align) +static void DisplayPartyPokemonBarDetail(u8 windowId, const u8 *str, u8 color, const u8 *align) { AddTextPrinterParameterized3(windowId, 0, align[0], align[1], gUnknown_086157FC[color], 0, str); } @@ -2510,7 +3599,7 @@ static u8 sub_81B31B0(u8 a) for (i = 0; i < gUnknown_0203CEC4->unk17; i++) { u8 unk = (gUnknown_0203CEC4->unkF[i] > 18) ? 4 : 3; - AddTextPrinterParameterized4(gUnknown_0203CEC4->unkC[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, gUnknown_086157FC[unk], 0, gUnknown_08615C08[gUnknown_0203CEC4->unkF[i]].textPtr); + AddTextPrinterParameterized4(gUnknown_0203CEC4->unkC[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, gUnknown_086157FC[unk], 0, sCursorOptions[gUnknown_0203CEC4->unkF[i]].text); } InitMenuInUpperLeftCorner(gUnknown_0203CEC4->unkC[0], gUnknown_0203CEC4->unk17, 0, 1); @@ -2568,15 +3657,16 @@ static void sub_81B3414(struct Pokemon *mons, u8 a) AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, 0); for (i = 0; i < MAX_MON_MOVES; i++) { - for (j = 0; gUnknown_08615D7E[j] != MOVE_SWORDS_DANCE; j++) + for (j = 0; sFieldMoves[j] != FIELD_MOVE_TERMINATOR; j++) { - if (GetMonData(&mons[a], i + MON_DATA_MOVE1) == gUnknown_08615D7E[j]) + if (GetMonData(&mons[a], i + MON_DATA_MOVE1) == sFieldMoves[j]) { AppendToList(gUnknown_0203CEC4->unkF, &gUnknown_0203CEC4->unk17, j + 19); break; } } } + if (!InBattlePike()) { if (GetMonData(&mons[1], MON_DATA_SPECIES) != SPECIES_NONE) @@ -2680,41 +3770,41 @@ static void sub_81B36FC(u8 taskId) if (sub_81B3608(taskId)) { gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = sub_81B3730; + gTasks[taskId].func = HandleMenuInput; } } -static void sub_81B3730(u8 taskId) +static void HandleMenuInput(u8 taskId) { - s16 *data; - s8 input; - - if (gPaletteFade.active == FALSE && sub_81221EC() != TRUE) + if (!gPaletteFade.active && sub_81221EC() != TRUE) { - data = gTasks[taskId].data; + s8 input; + s16 *data = gTasks[taskId].data; + if (gUnknown_0203CEC4->unk17 <= 3) input = Menu_ProcessInputNoWrapAround_other(); else input = ProcessMenuInput_other(); + data[0] = Menu_GetCursorPos(); - if (input != MENU_NOTHING_CHOSEN) + switch (input) { - if (input == MENU_B_PRESSED) - { - PlaySE(SE_SELECT); - sub_81B302C(&gUnknown_0203CEC4->unkC[2]); - gUnknown_08615C08[gUnknown_0203CEC4->unkF[gUnknown_0203CEC4->unk17 - 1]].func(taskId); - } - else - { - sub_81B302C(&gUnknown_0203CEC4->unkC[2]); - gUnknown_08615C08[gUnknown_0203CEC4->unkF[input]].func(taskId); - } + case MENU_NOTHING_CHOSEN: + break; + case MENU_B_PRESSED: + PlaySE(SE_SELECT); + sub_81B302C(&gUnknown_0203CEC4->unkC[2]); + sCursorOptions[gUnknown_0203CEC4->unkF[gUnknown_0203CEC4->unk17 - 1]].func(taskId); + break; + default: + sub_81B302C(&gUnknown_0203CEC4->unkC[2]); + sCursorOptions[gUnknown_0203CEC4->unkF[input]].func(taskId); + break; } } } -/*static*/ void sub_81B37FC(u8 taskId) +static void CursorCb_Summary(u8 taskId) { PlaySE(SE_SELECT); gUnknown_0203CEC4->exitCallback = sub_81B3828; @@ -2741,7 +3831,7 @@ static void sub_81B3894(void) InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 21, sub_81B36FC, gUnknown_0203CEC8.exitCallback); } -/*static*/ void brm_switch(u8 taskId) +static void CursorCb_Switch(u8 taskId) { PlaySE(SE_SELECT); gUnknown_0203CEC8.unkB = 8; @@ -2972,7 +4062,7 @@ static void sub_81B407C(u8 taskId) gTasks[taskId].func = sub_81B1370; } -/*static*/ void brm_cancel_1(u8 taskId) +static void CursorCb_Cancel1(u8 taskId) { PlaySE(SE_SELECT); sub_81B302C(&gUnknown_0203CEC4->unkC[0]); @@ -2984,7 +4074,7 @@ static void sub_81B407C(u8 taskId) gTasks[taskId].func = sub_81B1370; } -/*static*/ void sub_81B4134(u8 taskId) +static void CursorCb_Item(u8 taskId) { PlaySE(SE_SELECT); sub_81B302C(&gUnknown_0203CEC4->unkC[0]); @@ -2993,10 +4083,10 @@ static void sub_81B407C(u8 taskId) sub_81B31B0(1); display_pokemon_menu_message(24); gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = sub_81B3730; + gTasks[taskId].func = HandleMenuInput; } -/*static*/ void sub_81B4198(u8 taskId) +static void CursorCb_Give(u8 taskId) { PlaySE(SE_SELECT); gUnknown_0203CEC4->exitCallback = sub_81B41C4; @@ -3167,7 +4257,7 @@ static void sub_81B469C(u8 taskId) } } -/*static*/ void sub_81B4724(u8 taskId) +static void CursorCb_TakeItem(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); @@ -3194,7 +4284,7 @@ static void sub_81B469C(u8 taskId) gTasks[taskId].func = sub_81B469C; } -void sub_81B47E0(u8 taskId) +static void CursorCb_Toss(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; u16 item = GetMonData(mon, MON_DATA_HELD_ITEM); @@ -3250,19 +4340,19 @@ static void sub_81B48DC(u8 taskId) static void sub_81B4988(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; - u16 itemClear; if (sub_81B1BD4() != TRUE) { - itemClear = ITEM_NONE; - SetMonData(mon, MON_DATA_HELD_ITEM, &itemClear); + u16 item = ITEM_NONE; + + SetMonData(mon, MON_DATA_HELD_ITEM, &item); sub_81B5C94(mon, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9]); DisplayPartyPokemonOtherText(12, &gUnknown_0203CEDC[gUnknown_0203CEC8.unk9], 1); gTasks[taskId].func = sub_81B1C1C; } } -/*static*/ void sub_81B4A08(u8 taskId) +static void CursorCb_Mail(u8 taskId) { PlaySE(SE_SELECT); sub_81B302C(&gUnknown_0203CEC4->unkC[0]); @@ -3271,10 +4361,10 @@ static void sub_81B4988(u8 taskId) sub_81B31B0(2); display_pokemon_menu_message(25); gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = sub_81B3730; + gTasks[taskId].func = HandleMenuInput; } -/*static*/ void sub_81B4A6C(u8 taskId) +static void CursorCb_Read(u8 taskId) { PlaySE(SE_SELECT); gUnknown_0203CEC4->exitCallback = sub_81B4A98; @@ -3292,7 +4382,7 @@ static void sub_81B4AE0(void) InitPartyMenu(gUnknown_0203CEC8.unk8_0, 0xFF, gUnknown_0203CEC8.unkB, 1, 21, sub_81B36FC, gUnknown_0203CEC8.exitCallback); } -/*static*/ void brm_take_2(u8 taskId) +static void CursorCb_TakeMail(u8 taskId) { PlaySE(SE_SELECT); sub_81B302C(&gUnknown_0203CEC4->unkC[1]); @@ -3373,7 +4463,7 @@ static void sub_81B4C94(u8 taskId) } } -/*static*/ void sub_81B4D78(u8 taskId) +static void CursorCb_Cancel2(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; @@ -3393,10 +4483,10 @@ static void sub_81B4C94(u8 taskId) display_pokemon_menu_message(26); } gTasks[taskId].data[0] = 0xFF; - gTasks[taskId].func = sub_81B3730; + gTasks[taskId].func = HandleMenuInput; } -/*static*/ void brm_shift_sendout(u8 taskId) +static void CursorCb_SendMon(u8 taskId) { PlaySE(SE_SELECT); sub_81B302C(&gUnknown_0203CEC4->unkC[0]); @@ -3412,7 +4502,7 @@ static void sub_81B4C94(u8 taskId) } } -/*static*/ void sub_81B4E8C(u8 taskId) +static void CursorCb_Enter(u8 taskId) { u8 unk; u8 i; @@ -3448,7 +4538,7 @@ static void sub_81B4F88(void) sub_81B0FCC(gUnknown_0203CEC8.unk9, 1); } -/*static*/ void sub_81B4FA8(u8 taskId) +static void CursorCb_NoEntry(u8 taskId) { u8 unk; u8 i, j; @@ -3477,13 +4567,13 @@ static void sub_81B4F88(void) gTasks[taskId].func = sub_81B1370; } -/*static*/ void sub_81B50AC(u8 taskId) +static void CursorCb_Store(u8 taskId) { PlaySE(SE_SELECT); sub_81B12C0(taskId); } -/*static*/ void sub_81B50C8(u8 taskId) +static void CursorCb_Register(u8 taskId) { u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES2); u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES); @@ -3510,7 +4600,7 @@ static void sub_81B4F88(void) gTasks[taskId].func = sub_81B1C1C; } -/*static*/ void brm_trade_1(u8 taskId) +static void CursorCb_Trade1(u8 taskId) { u16 species2 = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES2); u16 species = GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_SPECIES); @@ -3534,7 +4624,7 @@ static void sub_81B4F88(void) } } -/*static*/ void sub_81B52E4(u8 taskId) +static void CursorCb_Trade2(u8 taskId) { sub_81B302C(&gUnknown_0203CEC4->unkC[0]); sub_81B302C(&gUnknown_0203CEC4->unkC[1]); @@ -3587,79 +4677,81 @@ static void sub_81B5430(u8 taskId) } } -/*static*/ void sub_81B5470(u8 taskId) +static void CursorCb_FieldMove(u8 taskId) { - u8 fieldMove = gUnknown_0203CEC4->unkF[Menu_GetCursorPos()] - 19; + u8 fieldMove = gUnknown_0203CEC4->unkF[Menu_GetCursorPos()] - MENU_FIELD_MOVES; const struct MapHeader *mapHeader; PlaySE(SE_SELECT); - if (gUnknown_08615D9C[fieldMove].fieldMoveFunc != NULL) + if (sFieldMoveCursorCallbacks[fieldMove].fieldMoveFunc == NULL) + return; + + sub_81B302C(&gUnknown_0203CEC4->unkC[0]); + sub_81B302C(&gUnknown_0203CEC4->unkC[1]); + if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) { - sub_81B302C(&gUnknown_0203CEC4->unkC[0]); - sub_81B302C(&gUnknown_0203CEC4->unkC[1]); - if (sub_81221AC() == TRUE || InUnionRoom() == TRUE) + if (fieldMove == FIELD_MOVE_MILK_DRINK || fieldMove == FIELD_MOVE_SOFT_BOILED) + display_pokemon_menu_message(13); + else + display_pokemon_menu_message(sFieldMoveCursorCallbacks[fieldMove].msgId); + + gTasks[taskId].func = task_brm_cancel_1_on_keypad_a_or_b; + } + else + { + // All field moves before WATERFALL are HMs. + if (fieldMove <= FIELD_MOVE_WATERFALL && FlagGet(FLAG_BADGE01_GET + fieldMove) != TRUE) { - if (fieldMove == 11 || fieldMove == 12) - display_pokemon_menu_message(13); - else - display_pokemon_menu_message(gUnknown_08615D9C[fieldMove].msgID); - gTasks[taskId].func = task_brm_cancel_1_on_keypad_a_or_b; + sub_81B1B5C(gText_CantUseUntilNewBadge, 1); + gTasks[taskId].func = sub_81B1C1C; + } + else if (sFieldMoveCursorCallbacks[fieldMove].fieldMoveFunc() == TRUE) + { + switch (fieldMove) + { + case FIELD_MOVE_MILK_DRINK: + case FIELD_MOVE_SOFT_BOILED: + sub_8161560(taskId); + break; + case FIELD_MOVE_TELEPORT: + mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->lastHealLocation.mapGroup, gSaveBlock1Ptr->lastHealLocation.mapNum); + sub_81245DC(gStringVar1, mapHeader->regionMapSectionId); + StringExpandPlaceholders(gStringVar4, gText_ReturnToHealingSpot); + sub_81B5674(taskId); + gUnknown_0203CEC4->data[0] = fieldMove; + break; + case FIELD_MOVE_DIG: + mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->warp4.mapGroup, gSaveBlock1Ptr->warp4.mapNum); + sub_81245DC(gStringVar1, mapHeader->regionMapSectionId); + StringExpandPlaceholders(gStringVar4, gText_EscapeFromHere); + sub_81B5674(taskId); + gUnknown_0203CEC4->data[0] = fieldMove; + break; + case FIELD_MOVE_FLY: + gUnknown_0203CEC8.exitCallback = MCB2_FlyMap; + sub_81B12C0(taskId); + break; + default: + gUnknown_0203CEC8.exitCallback = CB2_ReturnToField; + sub_81B12C0(taskId); + break; + } } else { - if (fieldMove <= 7 && FlagGet(FLAG_BADGE01_GET + fieldMove) != TRUE) + switch (fieldMove) { - sub_81B1B5C(gText_CantUseUntilNewBadge, 1); - gTasks[taskId].func = sub_81B1C1C; - } - else if (gUnknown_08615D9C[fieldMove].fieldMoveFunc() == TRUE) - { - switch (fieldMove) - { - case 11: - case 12: - sub_8161560(taskId); - break; - case 8: - mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->lastHealLocation.mapGroup, gSaveBlock1Ptr->lastHealLocation.mapNum); - sub_81245DC(gStringVar1, mapHeader->regionMapSectionId); - StringExpandPlaceholders(gStringVar4, gText_ReturnToHealingSpot); - sub_81B5674(taskId); - gUnknown_0203CEC4->data[0] = fieldMove; - break; - case 9: - mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->warp4.mapGroup, gSaveBlock1Ptr->warp4.mapNum); - sub_81245DC(gStringVar1, mapHeader->regionMapSectionId); - StringExpandPlaceholders(gStringVar4, gText_EscapeFromHere); - sub_81B5674(taskId); - gUnknown_0203CEC4->data[0] = fieldMove; - break; - case 5: - gUnknown_0203CEC8.exitCallback = MCB2_FlyMap; - sub_81B12C0(taskId); - break; - default: - gUnknown_0203CEC8.exitCallback = CB2_ReturnToField; - sub_81B12C0(taskId); - break; - } - } - else - { - switch (fieldMove) - { - case 4: - sub_81B5864(); - break; - case 1: - sub_81B57DC(); - break; - default: - display_pokemon_menu_message(gUnknown_08615D9C[fieldMove].msgID); - break; - } - gTasks[taskId].func = task_brm_cancel_1_on_keypad_a_or_b; + case FIELD_MOVE_SURF: + sub_81B5864(); + break; + case FIELD_MOVE_FLASH: + sub_81B57DC(); + break; + default: + display_pokemon_menu_message(sFieldMoveCursorCallbacks[fieldMove].msgId); + break; } + gTasks[taskId].func = task_brm_cancel_1_on_keypad_a_or_b; } } } @@ -3722,7 +4814,7 @@ static u16 brm_get_selected_species(void) static void task_brm_cancel_1_on_keypad_a_or_b(u8 taskId) { if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)) - brm_cancel_1(taskId); + CursorCb_Cancel1(taskId); } static void sub_81B57DC(void) @@ -3739,7 +4831,7 @@ static void hm_surf_run_dp02scr(void) FieldEffectStart(FLDEFF_USE_SURF); } -bool8 sub_81B5820(void) +static bool8 SetUpFieldMove_Surf(void) { if (PartyHasMonWithSurf() == TRUE && IsPlayerFacingSurfableFishableWater() == TRUE) { @@ -3752,17 +4844,18 @@ bool8 sub_81B5820(void) static void sub_81B5864(void) { - if (TestPlayerAvatarFlags(8)) + if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) display_pokemon_menu_message(9); else display_pokemon_menu_message(8); } -bool8 sub_81B5884(void) +static bool8 SetUpFieldMove_Fly(void) { if (Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType) == TRUE) return TRUE; - return FALSE; + else + return FALSE; } void sub_81B58A8(void) @@ -3776,7 +4869,7 @@ static void hm2_waterfall(void) FieldEffectStart(FLDEFF_USE_WATERFALL); } -bool8 hm_prepare_waterfall(void) +static bool8 SetUpFieldMove_Waterfall(void) { s16 x, y; @@ -3796,7 +4889,7 @@ static void sub_81B5958(void) FieldEffectStart(FLDEFF_USE_DIVE); } -bool8 sub_81B5974(void) +static bool8 SetUpFieldMove_Dive(void) { gFieldEffectArguments[1] = TrySetDiveWarp(); if (gFieldEffectArguments[1] != 0) @@ -4109,7 +5202,7 @@ void sub_81B617C(void) u8 doubleBattleStatus; bool8 inBattle; u8 i; - u8 msgIDMaybe; + u8 msgIdMaybe; register TaskFunc task asm("r0"); if (gMain.inBattle) @@ -4134,14 +5227,14 @@ void sub_81B617C(void) } } task = sub_81B6280; - msgIDMaybe = 0x7F; + msgIdMaybe = 0x7F; } else { - msgIDMaybe = (GetPocketByItemId(gSpecialVar_ItemId) == POCKET_TM_HM) ? 4 : 5; + msgIdMaybe = (GetPocketByItemId(gSpecialVar_ItemId) == POCKET_TM_HM) ? 4 : 5; task = sub_81B1370; } - InitPartyMenu(inBattle, doubleBattleStatus, 3, 1, msgIDMaybe, task, callback); + InitPartyMenu(inBattle, doubleBattleStatus, 3, 1, msgIdMaybe, task, callback); } static void c2_815ABFC(void) @@ -4553,22 +5646,22 @@ void dp05_pp_up(u8 taskId, TaskFunc task) u16 ItemIdToBattleMoveId(u16 item) { u16 tmNumber = item - ITEM_TM01_FOCUS_PUNCH; - return gUnknown_08616040[tmNumber]; + return gTMHMMoves[tmNumber]; } -bool8 sub_81B6D14(u16 move) +bool8 IsMoveHm(u16 move) { u8 i; for (i = 0; i < NUM_HIDDEN_MACHINES; i++) { - if (gUnknown_08616040[i + NUM_TECHNICAL_MACHINES] == move) + if (gTMHMMoves[i + NUM_TECHNICAL_MACHINES] == move) return TRUE; } return FALSE; } -bool8 pokemon_has_move(struct Pokemon *mon, u16 move) +bool8 MonKnowsMove(struct Pokemon *mon, u16 move) { u8 i; @@ -4609,7 +5702,8 @@ void sub_81B6DC4(u8 taskId, TaskFunc task) move[0] = ItemIdToBattleMoveId(item); StringCopy(gStringVar2, gMoveNames[move[0]]); move[1] = 0; - switch (CanPartyPokemonLearnTMTutor(mon, item, 0)) + + switch (CanMonLearnTMTutor(mon, item, 0)) { case CANNOT_LEARN_MOVE: sub_81B6D98(taskId, gText_PkmnCantLearnMove); @@ -4618,6 +5712,7 @@ void sub_81B6DC4(u8 taskId, TaskFunc task) sub_81B6D98(taskId, gText_PkmnAlreadyKnows); return; } + if (GiveMoveToMon(mon, move[0]) != 0xFFFF) { gTasks[taskId].func = sub_81B6EB4; @@ -4895,7 +5990,7 @@ static void sub_81B767C(u8 taskId) schedule_bg_copy_tilemap_to_vram(2); } -static void sub_81B76C8(u8 taskIdUnused) +static void sub_81B76C8(u8 taskId) { s16 *arrayPtr = gUnknown_0203CEC4->data; @@ -5258,10 +6353,10 @@ static void sub_81B7E4C(u8 taskId) mon = &gPlayerParty[gUnknown_0203CEC8.unk9]; move = &gUnknown_0203CEC8.unkE; GetMonNickname(mon, gStringVar1); - gUnknown_0203CEC8.unkE = sub_81B2360(gSpecialVar_0x8005); + gUnknown_0203CEC8.unkE = GetTutorMove(gSpecialVar_0x8005); StringCopy(gStringVar2, gMoveNames[gUnknown_0203CEC8.unkE]); move[1] = 2; - switch (CanPartyPokemonLearnTMTutor(mon, 0, gSpecialVar_0x8005)) + switch (CanMonLearnTMTutor(mon, 0, gSpecialVar_0x8005)) { case CANNOT_LEARN_MOVE: sub_81B6D98(taskId, gText_PkmnCantLearnMove); @@ -5591,12 +6686,12 @@ static bool8 sub_81B8770(u8 slot) static void sub_81B879C(u8 taskId) { - u8 msgID = sub_81B865C(); + u8 msgId = sub_81B865C(); - if (msgID != 0xFF) + if (msgId != 0xFF) { PlaySE(SE_HAZURE); - display_pokemon_menu_message(msgID); + display_pokemon_menu_message(msgId); gTasks[taskId].func = sub_81B87E8; } else @@ -5663,9 +6758,10 @@ static const u8* sub_81B88BC(void) if (!(facilityNum != 8 && facilityNum != 9)) return gText_CancelBattle; - if (facilityNum == FRONTIER_FACILITY_DOME && gSpecialVar_0x8005 == 2) + else if (facilityNum == FRONTIER_FACILITY_DOME && gSpecialVar_0x8005 == 2) return gText_ReturnToWaitingRoom; - return gText_CancelChallenge; + else + return gText_CancelChallenge; } void sub_81B8904(u8 initArg, MainCallback callback) @@ -5723,7 +6819,6 @@ static bool8 sub_81B8A7C(void) u8 slot = GetCursorSelectionMonId(); u8 newSlot; u8 i; - u8 neededToMatch; if (IsMultiBattle() == TRUE && (slot == 1 || slot == 4 || slot == 5)) { @@ -5764,8 +6859,8 @@ static bool8 sub_81B8A7C(void) } if (gUnknown_0203CEC8.unkB == 2) { - neededToMatch = gBattlerInMenuId; - GetMonNickname(&gPlayerParty[pokemon_order_func(gBattlerPartyIndexes[neededToMatch])], gStringVar1); + u8 currBattler = gBattlerInMenuId; + GetMonNickname(&gPlayerParty[pokemon_order_func(gBattlerPartyIndexes[currBattler])], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_PkmnCantSwitchOut); return FALSE; } diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 30a127c713..a268b53822 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -533,7 +533,7 @@ static void Task_PokedexAreaScreen_0(u8 taskId) HideBg(0); break; case 1: - SetBgAttribute(3, BG_CTRL_ATTR_VISIBLE, 3); + SetBgAttribute(3, BG_ATTR_CHARBASEINDEX, 3); sub_81C4D70(&sUnknown_085B4018); StringFill(sPokedexAreaScreen->charBuffer, CHAR_SPACE, 16); break; @@ -628,8 +628,8 @@ static void Task_PokedexAreaScreen_1(u8 taskId) static void sub_813D6B4(void) { - SetBgAttribute(3, BG_CTRL_ATTR_VISIBLE, 0); - SetBgAttribute(3, BG_CTRL_ATTR_SCREENSIZE, 0); + SetBgAttribute(3, BG_ATTR_CHARBASEINDEX, 0); + SetBgAttribute(3, BG_ATTR_PALETTEMODE, 0); } static void CreateAreaMarkerSprites(void) diff --git a/src/pokemon.c b/src/pokemon.c index 3087a8f2c7..8bde37ff9d 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -931,7 +931,7 @@ const u16 gSpeciesToNationalPokedexNum[] = // Assigns all species to the Nationa SPECIES_TO_NATIONAL(CHIMECHO), }; -const u16 gHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using National Dex Index) +const u16 gHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using National Dex Index) { HOENN_TO_NATIONAL(TREECKO), HOENN_TO_NATIONAL(GROVYLE), @@ -1135,7 +1135,7 @@ const u16 gHoennToNationalOrder[] = // Assigns Hoenn Dex Pok HOENN_TO_NATIONAL(RAYQUAZA), HOENN_TO_NATIONAL(JIRACHI), HOENN_TO_NATIONAL(DEOXYS), - HOENN_TO_NATIONAL(BULBASAUR), // Pokémon from here onwards are UNSEEN in the HoennDex. + HOENN_TO_NATIONAL(BULBASAUR), // Pokémon from here onwards are UNSEEN in the HoennDex. HOENN_TO_NATIONAL(IVYSAUR), HOENN_TO_NATIONAL(VENUSAUR), HOENN_TO_NATIONAL(CHARMANDER), @@ -2733,7 +2733,7 @@ void sub_806819C(struct Pokemon *mon, struct BattleTowerPokemon *src) CreateMon(mon, src->species, src->level, 0, 1, src->personality, 1, src->otId); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(mon, src->moves[i], i); SetMonData(mon, MON_DATA_PP_BONUSES, &src->ppBonuses); @@ -2795,7 +2795,7 @@ void sub_8068338(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl5 CreateMon(mon, src->species, level, 0, 1, src->personality, 1, src->otId); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(mon, src->moves[i], i); SetMonData(mon, MON_DATA_PP_BONUSES, &src->ppBonuses); @@ -2859,7 +2859,7 @@ void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 m otId); SetMonData(mon, MON_DATA_HELD_ITEM, &src->party[monId].item); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(mon, src->party[monId].moves[i], i); evAmount = MAX_TOTAL_EVS / NUM_STATS; @@ -2919,7 +2919,7 @@ void sub_80686FC(struct Pokemon *mon, struct BattleTowerPokemon *dest) dest->heldItem = heldItem; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) dest->moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); dest->level = GetMonData(mon, MON_DATA_LEVEL, NULL); @@ -3245,7 +3245,7 @@ u16 GiveMoveToMon(struct Pokemon *mon, u16 move) u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 existingMove = GetBoxMonData(boxMon, MON_DATA_MOVE1 + i, NULL); if (!existingMove) @@ -3264,7 +3264,7 @@ u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (!mon->moves[i]) { @@ -3359,7 +3359,7 @@ void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) moves[3] = move; pp[3] = gBattleMoves[move].pp; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(mon, MON_DATA_MOVE1 + i, &moves[i]); SetMonData(mon, MON_DATA_PP1 + i, &pp[i]); @@ -3386,7 +3386,7 @@ void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) moves[3] = move; pp[3] = gBattleMoves[move].pp; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetBoxMonData(boxMon, MON_DATA_MOVE1 + i, &moves[i]); SetBoxMonData(boxMon, MON_DATA_PP1 + i, &pp[i]); @@ -4564,7 +4564,7 @@ void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord) for (j = 0; j < 6; j++) SetMonData(&gEnemyParty[i], MON_DATA_HP_EV + j, &gBattleResources->secretBase->party.EVs[i]); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonData(&gEnemyParty[i], MON_DATA_MOVE1 + j, &gBattleResources->secretBase->party.moves[i * 4 + j]); SetMonData(&gEnemyParty[i], MON_DATA_PP1 + j, &gBattleMoves[gBattleResources->secretBase->party.moves[i * 4 + j]].pp); @@ -4649,7 +4649,7 @@ void PokemonToBattleMon(struct Pokemon *src, struct BattlePokemon *dst) s32 i; u8 nickname[POKEMON_NAME_LENGTH * 2]; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { dst->moves[i] = GetMonData(src, MON_DATA_MOVE1 + i, NULL); dst->pp[i] = GetMonData(src, MON_DATA_PP1 + i, NULL); @@ -6197,7 +6197,7 @@ u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves) u8 level = GetMonData(mon, MON_DATA_LEVEL, 0); int i, j, k; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0); for (i = 0; i < 20; i++) @@ -6211,10 +6211,10 @@ u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves) if (moveLevel <= level) { - for (j = 0; j < 4 && learnedMoves[j] != gLevelUpLearnsets[species][i].move; j++) + for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != gLevelUpLearnsets[species][i].move; j++) ; - if (j == 4) + if (j == MAX_MON_MOVES) { for (k = 0; k < numMoves && moves[k] != gLevelUpLearnsets[species][i].move; k++) ; @@ -6251,7 +6251,7 @@ u8 GetNumberOfRelearnableMoves(struct Pokemon *mon) if (species == SPECIES_EGG) return 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, 0); for (i = 0; i < 20; i++) @@ -6265,10 +6265,10 @@ u8 GetNumberOfRelearnableMoves(struct Pokemon *mon) if (moveLevel <= level) { - for (j = 0; j < 4 && learnedMoves[j] != gLevelUpLearnsets[species][i].move; j++) + for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != gLevelUpLearnsets[species][i].move; j++) ; - if (j == 4) + if (j == MAX_MON_MOVES) { for (k = 0; k < numMoves && moves[k] != gLevelUpLearnsets[species][i].move; k++) ; @@ -6512,7 +6512,7 @@ void BoxMonRestorePP(struct BoxPokemon *boxMon) { int i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (GetBoxMonData(boxMon, MON_DATA_MOVE1 + i, 0)) { diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 7b1d8da7c9..91a1a5fd03 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -8826,7 +8826,7 @@ static bool8 sub_80D024C(void) FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); FillWindowPixelBuffer8Bit(sPSSData->field_2200, 0); sub_80D07B0(sMoveMonsPtr->fromRow, sMoveMonsPtr->fromColumn); - SetBgAttribute(0, 4, 1); + SetBgAttribute(0, BG_ATTR_PALETTEMODE, 1); PutWindowTilemap(sPSSData->field_2200); CopyWindowToVram8Bit(sPSSData->field_2200, 3); BlendPalettes(0x3F00, 8, RGB_WHITE); @@ -9246,7 +9246,7 @@ static void sub_80D0B5C(void) { ChangeBgX(0, 0, 0); ChangeBgY(0, 0, 0); - SetBgAttribute(0, 4, 0); + SetBgAttribute(0, BG_ATTR_PALETTEMODE, 0); ClearGpuRegBits(REG_OFFSET_BG0CNT, BGCNT_256COLOR); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); CopyBgTilemapBufferToVram(0); @@ -9865,7 +9865,7 @@ static bool8 sub_80D184C(void) var = 0x15 - sPSSData->field_2236; for (i = 0; i < var; i++) { - WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, 10) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21); + WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21); } sub_80D19B4(var); @@ -9886,7 +9886,7 @@ static bool8 sub_80D18E4(void) var = 0x15 - sPSSData->field_2236; for (i = 0; i < var; i++) { - WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, 10) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21); + WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + sPSSData->field_2236 + i, i, 13, 1, 7, 15, 21); } if (var >= 0) @@ -10423,7 +10423,7 @@ static const sUnkVars[][4] = static void sub_80D2644(u8 id, u8 bg, const void *arg2, u16 arg3, u16 arg4) { - u16 attribute1, attribute2; + u16 bgScreenSize, bgType; if (id >= gUnknown_02039D88) return; @@ -10434,11 +10434,11 @@ static void sub_80D2644(u8 id, u8 bg, const void *arg2, u16 arg3, u16 arg4) gUnknown_02039D84[id].field_24 = arg3; gUnknown_02039D84[id].field_26 = arg4; - attribute1 = GetBgAttribute(bg, 3); - attribute2 = GetBgAttribute(bg, 9); - gUnknown_02039D84[id].field_20 = sUnkVars[attribute2][attribute1].a; - gUnknown_02039D84[id].field_22 = sUnkVars[attribute2][attribute1].b; - if (attribute2 != 0) + bgScreenSize = GetBgAttribute(bg, BG_ATTR_SCREENSIZE); + bgType = GetBgAttribute(bg, BG_ATTR_TYPE); + gUnknown_02039D84[id].field_20 = sUnkVars[bgType][bgScreenSize].a; + gUnknown_02039D84[id].field_22 = sUnkVars[bgType][bgScreenSize].b; + if (bgType != 0) gUnknown_02039D84[id].field_2A = 1; else gUnknown_02039D84[id].field_2A = 2; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index db4ee30deb..9db711b1b1 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1418,7 +1418,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *a) break; case 1: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { sum->moves[i] = GetMonData(a, MON_DATA_MOVE1+i); sum->pp[i] = GetMonData(a, MON_DATA_PP1+i); @@ -1791,15 +1791,15 @@ static void sub_81C0B8C(u8 taskId) if (pssData->unk40C9 == 0) { data[1] = 1; - SetBgAttribute(1, 7, 1); - SetBgAttribute(2, 7, 2); + SetBgAttribute(1, BG_ATTR_PRIORITY, 1); + SetBgAttribute(2, BG_ATTR_PRIORITY, 2); schedule_bg_copy_tilemap_to_vram(1); } else { data[1] = 2; - SetBgAttribute(2, 7, 1); - SetBgAttribute(1, 7, 2); + SetBgAttribute(2, BG_ATTR_PRIORITY, 1); + SetBgAttribute(1, BG_ATTR_PRIORITY, 2); schedule_bg_copy_tilemap_to_vram(2); } ChangeBgX(data[1], 0, 0); @@ -1848,14 +1848,14 @@ static void sub_81C0D44(u8 taskId) s16 *data = gTasks[taskId].data; if (pssData->unk40C9 == 0) { - SetBgAttribute(1, 7, 1); - SetBgAttribute(2, 7, 2); + SetBgAttribute(1, BG_ATTR_PRIORITY, 1); + SetBgAttribute(2, BG_ATTR_PRIORITY, 2); schedule_bg_copy_tilemap_to_vram(2); } else { - SetBgAttribute(2, 7, 1); - SetBgAttribute(1, 7, 2); + SetBgAttribute(2, BG_ATTR_PRIORITY, 1); + SetBgAttribute(1, BG_ATTR_PRIORITY, 2); schedule_bg_copy_tilemap_to_vram(1); } if (pssData->currPageIndex > 1) @@ -1954,7 +1954,7 @@ static void sub_81C0F44(u8 taskId) static bool8 sub_81C1040(void) { u8 i; - for (i = 1; i < 4; i++) + for (i = 1; i < MAX_MON_MOVES; i++) { if (pssData->summary.moves[i] != 0) return TRUE; @@ -1970,14 +1970,14 @@ static void sub_81C1070(s16 *a, s8 b, u8 *c) PlaySE(SE_SELECT); moveIndex = *c; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { moveIndex += b; if (moveIndex > a[0]) moveIndex = 0; else if (moveIndex < 0) moveIndex = a[0]; - if (moveIndex == 4) + if (moveIndex == MAX_MON_MOVES) { move = pssData->newMove; break; @@ -2248,7 +2248,7 @@ static void sub_81C174C(u8 taskId) static bool8 sub_81C18A8(void) { - if (pssData->firstMoveIndex == MAX_MON_MOVES || pssData->newMove == MOVE_NONE || sub_81B6D14(pssData->summary.moves[pssData->firstMoveIndex]) != 1) + if (pssData->firstMoveIndex == MAX_MON_MOVES || pssData->newMove == MOVE_NONE || IsMoveHm(pssData->summary.moves[pssData->firstMoveIndex]) != 1) return TRUE; else return FALSE; @@ -3654,7 +3654,7 @@ static void PrintContestMoveDescription(u8 moveSlot) { u16 move; - if (moveSlot == 4) + if (moveSlot == MAX_MON_MOVES) move = pssData->newMove; else move = pssData->summary.moves[moveSlot]; @@ -3852,7 +3852,7 @@ static void sub_81C4420(void) { u8 i; struct PokeSummary *summary = &pssData->summary; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (summary->moves[i] != MOVE_NONE) SetMoveTypeSpritePosAndType(gBattleMoves[summary->moves[i]].type, 0x55, 0x20 + (i * 0x10), i + 3); @@ -3865,7 +3865,7 @@ static void sub_81C4484(void) { u8 i; struct PokeSummary *summary = &pssData->summary; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (summary->moves[i] != MOVE_NONE) SetMoveTypeSpritePosAndType(NUMBER_OF_MON_TYPES + gContestMoves[summary->moves[i]].contestCategory, 0x55, 0x20 + (i * 0x10), i + 3); diff --git a/src/psychic.c b/src/psychic.c index efd15f7460..371c24ce89 100644 --- a/src/psychic.c +++ b/src/psychic.c @@ -1,18 +1,33 @@ #include "global.h" #include "battle_anim.h" +#include "gpu_regs.h" +#include "palette.h" +#include "sound.h" +#include "scanline_effect.h" +#include "trig.h" #include "constants/rgb.h" +#include "constants/songs.h" -extern void sub_80A77C8(struct Sprite *); -extern void sub_810F1EC(struct Sprite *); -extern void sub_810F1EC(struct Sprite *); -extern void sub_810F58C(struct Sprite *); -extern void TranslateAnimSpriteToTargetMonLocation(struct Sprite *); -extern void sub_810F634(struct Sprite *); -extern void sub_810F6B0(struct Sprite *); -extern void sub_810FBA8(struct Sprite *); -extern void sub_810FDF0(struct Sprite *); -extern void sub_80A77C8(struct Sprite *); -extern void sub_8110240(struct Sprite *); +void sub_810F1EC(struct Sprite *); +void sub_810F58C(struct Sprite *); +void sub_810F634(struct Sprite *); +void sub_810F6B0(struct Sprite *); +void sub_810FBA8(struct Sprite *); +void sub_810FDF0(struct Sprite *); +void sub_8110240(struct Sprite *); +static void sub_810F340(struct Sprite *); +static void sub_810F3C8(struct Sprite *); +static void sub_810F400(struct Sprite *); +static void sub_810F46C(struct Sprite *); +static void sub_810F524(struct Sprite *); +static void sub_810F740(struct Sprite *); +static void sub_810F774(struct Sprite *); +static void sub_810F810(u8); +static void sub_810F898(u8); +static void sub_810F9D4(u8); +static void sub_810FD3C(u8); +static void sub_810FF34(u8); +static void sub_8110134(u8); const union AffineAnimCmd gUnknown_0859652C[] = { @@ -403,3 +418,744 @@ const struct SpriteTemplate gUnknown_08596920 = .affineAnims = gUnknown_08596918, .callback = sub_8110240, }; + +void sub_810F1EC(struct Sprite *sprite) +{ + u8 isContest = IsContest(); + + if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER || isContest) + { + sprite->oam.priority = 2; + sprite->subpriority = 200; + } + + if (!isContest) + { + u8 battlerCopy; + u8 battler = battlerCopy = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + u8 rank = GetBattlerSpriteBGPriorityRank(battler); + int var0 = 1; + u8 toBG_2 = (rank ^ var0) != 0; + + if (IsBattlerSpriteVisible(battler)) + MoveBattlerSpriteToBG(battler, toBG_2, FALSE); + + battler = BATTLE_PARTNER(battlerCopy); + if (IsBattlerSpriteVisible(battler)) + MoveBattlerSpriteToBG(battler, toBG_2 ^ var0, FALSE); + } + + if (!isContest && IsDoubleBattle()) + { + if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) + { + sprite->pos1.x = 72; + sprite->pos1.y = 80; + } + else + { + sprite->pos1.x = 176; + sprite->pos1.y = 40; + } + } + else + { + if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + gBattleAnimArgs[0] = -gBattleAnimArgs[0]; + + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[0]; + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[1]; + } + + sprite->data[0] = 256 + IndexOfSpritePaletteTag(gBattleAnimArgs[2]) * 16; + + if (isContest) + { + sprite->pos1.y += 9; + sprite->callback = sub_810F3C8; + sprite->callback(sprite); + } + else + { + sprite->callback = sub_810F340; + } +} + +static void sub_810F340(struct Sprite *sprite) +{ + u8 battler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + if (!sprite->data[7]) + { + sprite->data[7] = 1; + return; + } + + if (IsBattlerSpriteVisible(battler)) + gSprites[gBattlerSpriteIds[battler]].invisible = 1; + + battler = BATTLE_PARTNER(battler); + if (IsBattlerSpriteVisible(battler)) + gSprites[gBattlerSpriteIds[battler]].invisible = 1; + + sprite->callback = sub_810F3C8; + sprite->callback(sprite); +} + +static void sub_810F3C8(struct Sprite *sprite) +{ + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[3], 16 - sprite->data[3])); + if (sprite->data[3] == 13) + sprite->callback = sub_810F400; + else + sprite->data[3]++; +} + +static void sub_810F400(struct Sprite *sprite) +{ + u16 color; + u16 startOffset; + int i; + + if (++sprite->data[1] == 2) + { + sprite->data[1] = 0; + startOffset = sprite->data[0]; + color = gPlttBufferFaded[startOffset + 8]; + + for (i = 8; i > 0; i--) + gPlttBufferFaded[startOffset + i] = gPlttBufferFaded[startOffset + i - 1]; + + gPlttBufferFaded[startOffset + 1] = color; + + if (++sprite->data[2] == 16) + sprite->callback = sub_810F46C; + } +} + +static void sub_810F46C(struct Sprite *sprite) +{ + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[3], 16 - sprite->data[3])); + + if (--sprite->data[3] == -1) + { + if (!IsContest()) + { + u8 battlerCopy; + u8 battler = battlerCopy = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + + if (IsBattlerSpriteVisible(battler)) + gSprites[gBattlerSpriteIds[battler]].invisible = 0; + + battler = BATTLE_PARTNER(battlerCopy); + if (IsBattlerSpriteVisible(battler)) + gSprites[gBattlerSpriteIds[battler]].invisible = 0; + } + + sprite->invisible = 1; + sprite->callback = sub_810F524; + } +} + +static void sub_810F524(struct Sprite *sprite) +{ + if (!IsContest()) + { + u8 battlerCopy; + u8 battler = battlerCopy = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + u8 rank = GetBattlerSpriteBGPriorityRank(battler); + int var0 = 1; + u8 toBG_2 = (rank ^ var0) != 0; + + if (IsBattlerSpriteVisible(battler)) + sub_80A477C(toBG_2); + + battler = battlerCopy ^ 2; + if (IsBattlerSpriteVisible(battler)) + sub_80A477C(toBG_2 ^ var0); + } + + sprite->callback = DestroyAnimSprite; +} + +void sub_810F58C(struct Sprite *sprite) +{ + if (sprite->data[0] == 0) + { + int arg3 = gBattleAnimArgs[3]; + bool8 respectMonPicOffsets = FALSE; + if (arg3 == 0) + respectMonPicOffsets = TRUE; + + if (!IsContest() && IsDoubleBattle()) + { + if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) + { + sprite->pos1.x = 72 - gBattleAnimArgs[0]; + sprite->pos1.y = gBattleAnimArgs[1] + 80; + } + else + { + sprite->pos1.x = gBattleAnimArgs[0] + 176; + sprite->pos1.y = gBattleAnimArgs[1] + 40; + } + } + else + { + if (gBattleAnimArgs[2] == 0) + InitSpritePosToAnimAttacker(sprite, respectMonPicOffsets); + else + InitSpritePosToAnimTarget(sprite, respectMonPicOffsets); + } + + sprite->data[0]++; + } + else + { + if (sprite->animEnded || sprite->affineAnimEnded) + DestroySpriteAndMatrix(sprite); + } +} + +void sub_810F634(struct Sprite *sprite) +{ + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + + if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) + { + StartSpriteAnim(sprite, 1); + sprite->pos1.x -= 40; + sprite->pos1.y += 10; + sprite->data[1] = -1; + } + else + { + sprite->pos1.x += 40; + sprite->pos1.y -= 10; + sprite->data[1] = 1; + } + + StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); + sprite->callback = RunStoredCallbackWhenAnimEnds; +} + +void sub_810F6B0(struct Sprite *sprite) +{ + s16 x = sub_80A861C(gBattleAnimAttacker, 1) / 2; + s16 y = sub_80A861C(gBattleAnimAttacker, 0) / -2; + + if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) + x = -x; + + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + x; + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + y; + + if (sprite->pos1.y < 16) + sprite->pos1.y = 16; + + StoreSpriteCallbackInData6(sprite, sub_810F740); + sprite->callback = RunStoredCallbackWhenAnimEnds; +} + +static void sub_810F740(struct Sprite *sprite) +{ + sprite->oam.affineMode = 1; + sprite->affineAnims = gUnknown_08596740; + sprite->data[0] = 0; + InitSpriteAffineAnim(sprite); + sprite->callback = sub_810F774; +} + +static void sub_810F774(struct Sprite *sprite) +{ + switch (sprite->data[0]) + { + case 0: + if (sprite->affineAnimEnded) + { + FreeOamMatrix(sprite->oam.matrixNum); + sprite->oam.affineMode = 0; + sprite->data[1] = 18; + sprite->data[0]++; + } + break; + case 1: + if (--sprite->data[1] == -1) + DestroyAnimSprite(sprite); + break; + } +} + +void sub_810F7D4(u8 taskId) +{ + struct Task *task = &gTasks[taskId]; + u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + task->data[0] = spriteId; + PrepareAffineAnimInTaskData(task, spriteId, gUnknown_0859675C); + task->func = sub_810F810; +} + +static void sub_810F810(u8 taskId) +{ + if (!RunAffineAnimFromTaskData(&gTasks[taskId])) + DestroyAnimVisualTask(taskId); +} + +void sub_810F83C(u8 taskId) +{ + struct Task *task = &gTasks[taskId]; + u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + task->data[0] = spriteId; + task->data[1] = 0; + task->data[2] = 0; + task->data[3] = GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER ? 4 : 8; + + PrepareAffineAnimInTaskData(task, task->data[0], gUnknown_0859677C); + task->func = sub_810F898; +} + +static void sub_810F898(u8 taskId) +{ + struct Task *task = &gTasks[taskId]; + + switch (task->data[1]) + { + case 0: + RunAffineAnimFromTaskData(task); + if (++task->data[2] > 19) + task->data[1]++; + break; + case 1: + if (task->data[3] != 0) + { + gSprites[task->data[0]].pos2.y -= 8; + task->data[3]--; + } + else + { + gSprites[task->data[0]].invisible = 1; + gSprites[task->data[0]].pos1.x = 272; + ResetSpriteRotScale(task->data[0]); + DestroyAnimVisualTask(taskId); + } + break; + } +} + +void sub_810F940(u8 taskId) +{ + u16 var0, var1; + + struct Task *task = &gTasks[taskId]; + + task->data[3] = 16; + task->data[4] = 0; + task->data[13] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + task->data[14] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + + var0 = sub_80A861C(gBattleAnimAttacker, 1) / 3; + var1 = sub_80A861C(gBattleAnimAttacker, 0) / 3; + task->data[12] = var0 > var1 ? var0 : var1; + + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); + + task->func = sub_810F9D4; +} + +static void sub_810F9D4(u8 taskId) +{ + u16 i; + u8 spriteId; + struct Task *task = &gTasks[taskId]; + + switch (task->data[0]) + { + case 0: + if (++task->data[1] > 8) + { + task->data[1] = 0; + spriteId = CreateSprite(&gUnknown_08596794, task->data[13], task->data[14], 0); + task->data[task->data[2] + 8] = spriteId; + if (spriteId != MAX_SPRITES) + { + switch (task->data[2]) + { + case 0: + gSprites[spriteId].pos2.x = task->data[12]; + gSprites[spriteId].pos2.y = -task->data[12]; + break; + case 1: + gSprites[spriteId].pos2.x = -task->data[12]; + gSprites[spriteId].pos2.y = task->data[12]; + break; + case 2: + gSprites[spriteId].pos2.x = task->data[12]; + gSprites[spriteId].pos2.y = task->data[12]; + break; + case 3: + gSprites[spriteId].pos2.x = -task->data[12]; + gSprites[spriteId].pos2.y = -task->data[12]; + break; + } + } + + if (++task->data[2] == 5) + task->data[0]++; + } + break; + case 1: + if (task->data[1] & 1) + task->data[3]--; + else + task->data[4]++; + + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(task->data[3], task->data[4])); + if (++task->data[1] == 32) + { + for (i = 8; i < 13; i++) + { + if (task->data[i] != 64) + DestroySprite(&gSprites[task->data[i]]); + } + + task->data[0]++; + } + break; + case 2: + task->data[0]++; + break; + case 3: + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + DestroyAnimVisualTask(taskId); + break; + } +} + +static void sub_810FB60(struct Sprite *sprite) +{ + if (sprite->data[1] > sprite->data[0] - 10) + sprite->invisible = sprite->data[1] & 1; + + if (sprite->data[1] == sprite->data[0]) + DestroyAnimSprite(sprite); + + sprite->data[1]++; +} + +void sub_810FBA8(struct Sprite *sprite) +{ + if (gBattleAnimArgs[0] == 0) + { + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + } + + sprite->data[0] = gBattleAnimArgs[1]; + sprite->callback = sub_810FB60; +} + +void sub_810FBF0(u8 taskId) +{ + struct Task *task = &gTasks[taskId]; + + if (IsContest()) + { + if (gBattleAnimArgs[0] == 1) + { + task->data[10] = -10; + task->data[11] = sub_80A861C(gBattleAnimTarget, 5) - 8; + task->data[12] = sub_80A861C(gBattleAnimTarget, 2) + 8; + task->data[13] = sub_80A861C(gBattleAnimAttacker, 5) - 8; + task->data[14] = sub_80A861C(gBattleAnimAttacker, 2) + 8; + } + else + { + task->data[10] = 10; + task->data[11] = sub_80A861C(gBattleAnimAttacker, 4) + 8; + task->data[12] = sub_80A861C(gBattleAnimAttacker, 3) - 8; + task->data[13] = sub_80A861C(gBattleAnimTarget, 4) + 8; + task->data[14] = sub_80A861C(gBattleAnimTarget, 3) - 8; + } + } + else + { + if (gBattleAnimArgs[0] == 1) + { + task->data[10] = -10; + task->data[11] = sub_80A861C(gBattleAnimTarget, 4) + 8; + task->data[12] = sub_80A861C(gBattleAnimTarget, 2) + 8; + task->data[13] = sub_80A861C(gBattleAnimAttacker, 4) + 8; + task->data[14] = sub_80A861C(gBattleAnimAttacker, 2) + 8; + } + else + { + task->data[10] = 10; + task->data[11] = sub_80A861C(gBattleAnimAttacker, 5) - 8; + task->data[12] = sub_80A861C(gBattleAnimAttacker, 3) - 8; + task->data[13] = sub_80A861C(gBattleAnimTarget, 5) - 8; + task->data[14] = sub_80A861C(gBattleAnimTarget, 3) - 8; + } + } + + task->data[1] = 6; + task->func = sub_810FD3C; +} + +static void sub_810FD3C(u8 taskId) +{ + u8 spriteId; + struct Task *task = &gTasks[taskId]; + + switch (task->data[0]) + { + case 0: + if (++task->data[1] > 6) + { + task->data[1] = 0; + spriteId = CreateSprite(&gUnknown_08596864, task->data[11], task->data[12], 0); + if (spriteId != 64) + { + gSprites[spriteId].data[0] = 16; + gSprites[spriteId].data[2] = task->data[13]; + gSprites[spriteId].data[4] = task->data[14]; + gSprites[spriteId].data[5] = task->data[10]; + + InitAnimArcTranslation(&gSprites[spriteId]); + StartSpriteAffineAnim(&gSprites[spriteId], task->data[2] & 3); + } + + if (++task->data[2] == 12) + task->data[0]++; + } + break; + case 1: + if (++task->data[1] > 17) + DestroyAnimVisualTask(taskId); + break; + } +} + +void sub_810FDF0(struct Sprite *sprite) +{ + if (TranslateAnimArc(sprite)) + { + FreeOamMatrix(sprite->oam.matrixNum); + DestroySprite(sprite); + } +} + +void sub_810FE14(u8 taskId) +{ + s16 i; + u8 yOffset; + struct ScanlineEffectParams scanlineParams; + struct Task *task = &gTasks[taskId]; + + yOffset = GetBattlerYCoordWithElevation(gBattleAnimTarget); + task->data[14] = yOffset - 32; + + switch (gBattleAnimArgs[0]) + { + case 0: + task->data[11] = 2; + task->data[12] = 5; + task->data[13] = 64; + task->data[15] = yOffset + 32; + break; + case 1: + task->data[11] = 2; + task->data[12] = 5; + task->data[13] = 192; + task->data[15] = yOffset + 32; + break; + case 2: + task->data[11] = 4; + task->data[12] = 4; + task->data[13] = 0; + task->data[15] = yOffset + 32; + break; + } + + if (task->data[14] < 0) + task->data[14] = 0; + + if (GetBattlerSpriteBGPriorityRank(gBattleAnimTarget) == 1) + { + task->data[10] = gBattle_BG1_X; + scanlineParams.dmaDest = ®_BG1HOFS; + } + else + { + task->data[10] = gBattle_BG2_X; + scanlineParams.dmaDest = ®_BG2HOFS; + } + + i = task->data[14]; + while (i <= task->data[14] + 64) + { + gScanlineEffectRegBuffers[0][i] = task->data[10]; + gScanlineEffectRegBuffers[1][i] = task->data[10]; + i++; + } + + scanlineParams.dmaControl = SCANLINE_EFFECT_DMACNT_16BIT; + scanlineParams.initState = 1; + scanlineParams.unused9 = 0; + ScanlineEffect_SetParams(scanlineParams); + task->func = sub_810FF34; +} + +static void sub_810FF34(u8 taskId) +{ + s16 sineIndex, i; + struct Task *task = &gTasks[taskId]; + + switch (task->data[0]) + { + case 0: + sineIndex = task->data[13]; + i = task->data[14]; + while (i <= task->data[15]) + { + s16 var2 = (gSineTable[sineIndex] >> task->data[12]); + if (var2 > 0) + var2 += (task->data[1] & 3); + else if (var2 < 0) + var2 -= (task->data[1] & 3); + + gScanlineEffectRegBuffers[0][i] = task->data[10] + var2; + gScanlineEffectRegBuffers[1][i] = task->data[10] + var2; + sineIndex += task->data[11]; + i++; + } + + if (++task->data[1] > 23) + task->data[0]++; + break; + case 1: + gScanlineEffect.state = 3; + task->data[0]++; + break; + case 2: + DestroyAnimVisualTask(taskId); + break; + } +} + +void sub_8110034(u8 taskId) +{ + s16 spriteId; + s16 matrixNum; + struct Task *task = &gTasks[taskId]; + + matrixNum = AllocOamMatrix(); + if (matrixNum == 0xFF) + { + DestroyAnimVisualTask(taskId); + return; + } + + spriteId = CloneBattlerSpriteWithBlend(gBattleAnimArgs[0]); + if (spriteId < 0) + { + FreeOamMatrix(matrixNum); + DestroyAnimVisualTask(taskId); + return; + } + + gSprites[spriteId].callback = SpriteCallbackDummy; + gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_DOUBLE; + gSprites[spriteId].oam.matrixNum = matrixNum; + gSprites[spriteId].affineAnimPaused = 1; + gSprites[spriteId].subpriority++; + SetSpriteRotScale(spriteId, 256, 256, 0); + CalcCenterToCornerVec(&gSprites[spriteId], gSprites[spriteId].oam.shape, gSprites[spriteId].oam.size, gSprites[spriteId].oam.affineMode); + task->data[13] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); + task->data[14] = matrixNum; + task->data[15] = spriteId; + task->func = sub_8110134; +} + +static void sub_8110134(u8 taskId) +{ + struct Task *task = &gTasks[taskId]; + + switch (task->data[0]) + { + case 0: + task->data[1] += 4; + task->data[2] = 256 - (gSineTable[task->data[1]] >> 1); + SetSpriteRotScale(task->data[15], task->data[2], task->data[2], 0); + SetBattlerSpriteYOffsetFromOtherYScale(task->data[15], task->data[13]); + if (task->data[1] == 48) + task->data[0]++; + break; + case 1: + task->data[1] -= 4; + task->data[2] = 256 - (gSineTable[task->data[1]] >> 1);; + SetSpriteRotScale(task->data[15], task->data[2], task->data[2], 0); + SetBattlerSpriteYOffsetFromOtherYScale(task->data[15], task->data[13]); + if (task->data[1] == 0) + task->data[0]++; + break; + case 2: + obj_delete_but_dont_free_vram(&gSprites[task->data[15]]); + task->data[0]++; + break; + case 3: + FreeOamMatrix(task->data[14]); + DestroyAnimVisualTask(taskId); + break; + } +} + +void sub_8110240(struct Sprite *sprite) +{ + switch (sprite->data[0]) + { + case 0: + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); + + if (IsContest()) + sprite->pos1.y += 12; + + sprite->data[1] = 8; + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[1], 16 - sprite->data[1])); + sprite->data[0]++; + break; + case 1: + if (sprite->affineAnimEnded) + { + PlaySE12WithPanning(SE_W100, BattleAnimAdjustPanning(-64)); + ChangeSpriteAffineAnim(sprite, 1); + sprite->data[0]++; + } + break; + case 2: + if (sprite->data[2]++ > 1) + { + sprite->data[2] = 0; + sprite->data[1]--; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[1], 16 - sprite->data[1])); + if (sprite->data[1] == 0) + { + sprite->data[0]++; + sprite->invisible = 1; + } + } + + sprite->data[3] += 0x380; + sprite->pos2.y -= sprite->data[3] >> 8; + sprite->data[3] &= 0xFF; + break; + case 3: + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + DestroyAnimSprite(sprite); + break; + } +} diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index 94d81e30f6..00a73a0a20 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -1708,7 +1708,7 @@ static void sub_81D752C(u8 taskId) if (data[0] != 16) { data[0]++; - SetGpuReg(REG_OFFSET_BLDALPHA, (data[0] << 8) | (16 - data[0])); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - data[0], data[0])); } } @@ -1954,7 +1954,7 @@ static void Task_RayTakesFlightAnim(u8 taskId) sub_81D7E10(); sub_81D7E9C(); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_OBJ | BLDCNT_TGT2_BG1 | BLDCNT_EFFECT_BLEND); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x808); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(8, 8)); BlendPalettes(-1, 0x10, 0); SetVBlankCallback(VBlankCB_RayquazaScene); CreateTask(sub_81D81A4, 0); @@ -2153,7 +2153,7 @@ static void Task_RayDescendsAnim(u8 taskId) sub_81D82B0(); sub_81D8358(); SetGpuRegBits(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_EFFECT_BLEND); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x1000); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); BlendPalettes(-1, 0x10, 0); SetVBlankCallback(VBlankCB_RayquazaScene); sRayScene->field_2008 = 0; @@ -2509,7 +2509,7 @@ static void Task_RayChasesAwayAnim(u8 taskId) sub_81D68C8(); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_EFFECT_BLEND); - SetGpuReg(REG_OFFSET_BLDALPHA, 0xE09); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(9, 14)); BlendPalettes(-1, 0x10, 0); SetVBlankCallback(VBlankCB_RayquazaScene); data[0] = 0; diff --git a/src/recorded_battle.c b/src/recorded_battle.c index 81935b7c6c..03823dd457 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -718,7 +718,7 @@ void RecordedBattle_CopyBattlerMoves(void) if (sUnknown_0203C7AC == 2) return; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { sPlayerMonMoves[gActiveBattler / 2][i] = gBattleMons[gActiveBattler].moves[i]; } @@ -739,17 +739,17 @@ void sub_818603C(u8 arg0) { if (arg0 == 1) { - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { if (gBattleMons[battlerId].moves[j] != sPlayerMonMoves[battlerId / 2][j]) break; } - if (j != 4) // player's mon's move has been changed + if (j != MAX_MON_MOVES) // player's mon's move has been changed { RecordedBattle_SetBattlerAction(battlerId, ACTION_MOVE_CHANGE); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { - for (k = 0; k < 4; k++) + for (k = 0; k < MAX_MON_MOVES; k++) { if (gBattleMons[battlerId].moves[j] == sPlayerMonMoves[battlerId / 2][k]) { @@ -772,11 +772,11 @@ void sub_818603C(u8 arg0) u8 var; RecordedBattle_GetBattlerAction(battlerId); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { ppBonuses[j] = ((gBattleMons[battlerId].ppBonuses & ((3 << (j << 1)))) >> (j << 1)); } - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { array1[j] = RecordedBattle_GetBattlerAction(battlerId); movePp.moves[j] = gBattleMons[battlerId].moves[array1[j]]; @@ -784,14 +784,14 @@ void sub_818603C(u8 arg0) array3[j] = ppBonuses[array1[j]]; array2[j] = (gDisableStructs[battlerId].unk18_b & gBitTable[j]) >> j; } - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { gBattleMons[battlerId].moves[j] = movePp.moves[j]; gBattleMons[battlerId].pp[j] = movePp.pp[j]; } gBattleMons[battlerId].ppBonuses = 0; gDisableStructs[battlerId].unk18_b = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { gBattleMons[battlerId].ppBonuses |= (array3[j]) << (j << 1); gDisableStructs[battlerId].unk18_b |= (array2[j]) << (j); @@ -799,23 +799,23 @@ void sub_818603C(u8 arg0) if (!(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED)) { - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { ppBonuses[j] = ((GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, NULL) & ((3 << (j << 1)))) >> (j << 1)); } - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { movePp.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + array1[j], NULL); movePp.pp[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + array1[j], NULL); array3[j] = ppBonuses[array1[j]]; } - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + j, &movePp.moves[j]); SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + j, &movePp.pp[j]); } var = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { var |= (array3[j]) << (j << 1); } diff --git a/src/region_map.c b/src/region_map.c index d7b53d631d..4752d96f05 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -11,7 +11,6 @@ #include "overworld.h" #include "constants/flags.h" #include "event_data.h" -#include "rom6.h" #include "secret_base.h" #include "string_util.h" #include "international_string_util.h" @@ -20,6 +19,8 @@ #include "constants/songs.h" #include "m4a.h" #include "field_effect.h" +#include "field_specials.h" +#include "fldeff.h" #include "region_map.h" #include "constants/region_map_sections.h" #include "heal_location.h" @@ -426,82 +427,82 @@ bool8 sub_8122DB0(void) { switch (gRegionMap->initStep) { - case 0: - if (gRegionMap->bgManaged) - { - decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0); - } - else - { - LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2)); - } - break; - case 1: - if (gRegionMap->bgManaged) - { - if (!free_temp_tile_data_buffers_if_possible()) - { - decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1); - } - } - else - { - LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28)); - } - break; - case 2: + case 0: + if (gRegionMap->bgManaged) + { + decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0); + } + else + { + LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2)); + } + break; + case 1: + if (gRegionMap->bgManaged) + { if (!free_temp_tile_data_buffers_if_possible()) { - LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60); + decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1); } - break; - case 3: - LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage); - break; - case 4: - LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage); - break; - case 5: - RegionMap_InitializeStateBasedOnPlayerLocation(); - gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX; - gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY; - gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId); - gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId); - GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16); - break; - case 6: - if (gRegionMap->zoomed == FALSE) - { - CalcZoomScrollParams(0, 0, 0, 0, 0x100, 0x100, 0); - } - else - { - gRegionMap->scrollX = gRegionMap->cursorPosX * 8 - 0x34; - gRegionMap->scrollY = gRegionMap->cursorPosY * 8 - 0x44; - gRegionMap->zoomedCursorPosX = gRegionMap->cursorPosX; - gRegionMap->zoomedCursorPosY = gRegionMap->cursorPosY; - CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, 0x80, 0x80, 0); - } - break; - case 7: - RegionMap_GetPositionOfCursorWithinMapSection(); - UpdateRegionMapVideoRegs(); - gRegionMap->cursorSprite = NULL; - gRegionMap->playerIconSprite = NULL; - gRegionMap->cursorMovementFrameCounter = 0; - gRegionMap->blinkPlayerIcon = FALSE; - if (gRegionMap->bgManaged) - { - SetBgAttribute(gRegionMap->bgNum, BG_CTRL_ATTR_MAPBASEINDEX, 2); - SetBgAttribute(gRegionMap->bgNum, BG_CTRL_ATTR_VISIBLE, gRegionMap->charBaseIdx); - SetBgAttribute(gRegionMap->bgNum, BG_CTRL_ATTR_CHARBASEINDEX, gRegionMap->mapBaseIdx); - SetBgAttribute(gRegionMap->bgNum, BG_CTRL_ATTR_PRIORITY, 1); - SetBgAttribute(gRegionMap->bgNum, BG_CTRL_ATTR_SCREENSIZE, 1); - } - gRegionMap->initStep++; - return FALSE; - default: - return FALSE; + } + else + { + LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28)); + } + break; + case 2: + if (!free_temp_tile_data_buffers_if_possible()) + { + LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60); + } + break; + case 3: + LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage); + break; + case 4: + LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage); + break; + case 5: + RegionMap_InitializeStateBasedOnPlayerLocation(); + gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX; + gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY; + gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId); + gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId); + GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16); + break; + case 6: + if (gRegionMap->zoomed == FALSE) + { + CalcZoomScrollParams(0, 0, 0, 0, 0x100, 0x100, 0); + } + else + { + gRegionMap->scrollX = gRegionMap->cursorPosX * 8 - 0x34; + gRegionMap->scrollY = gRegionMap->cursorPosY * 8 - 0x44; + gRegionMap->zoomedCursorPosX = gRegionMap->cursorPosX; + gRegionMap->zoomedCursorPosY = gRegionMap->cursorPosY; + CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, 0x80, 0x80, 0); + } + break; + case 7: + RegionMap_GetPositionOfCursorWithinMapSection(); + UpdateRegionMapVideoRegs(); + gRegionMap->cursorSprite = NULL; + gRegionMap->playerIconSprite = NULL; + gRegionMap->cursorMovementFrameCounter = 0; + gRegionMap->blinkPlayerIcon = FALSE; + if (gRegionMap->bgManaged) + { + SetBgAttribute(gRegionMap->bgNum, BG_ATTR_SCREENSIZE, 2); + SetBgAttribute(gRegionMap->bgNum, BG_ATTR_CHARBASEINDEX, gRegionMap->charBaseIdx); + SetBgAttribute(gRegionMap->bgNum, BG_ATTR_MAPBASEINDEX, gRegionMap->mapBaseIdx); + SetBgAttribute(gRegionMap->bgNum, BG_ATTR_WRAPAROUND, 1); + SetBgAttribute(gRegionMap->bgNum, BG_ATTR_PALETTEMODE, 1); + } + gRegionMap->initStep++; + return FALSE; + default: + return FALSE; } gRegionMap->initStep++; return TRUE; diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index f1156ae71f..fdf90ab38c 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -50,8 +50,8 @@ static void CB2_ReshowBattleScreenAfterMenu(void) case 0: ScanlineEffect_Clear(); BattleInitBgsAndWindows(); - SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 0); - SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 0); + SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 0); + SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 0); ShowBg(0); ShowBg(1); ShowBg(2); diff --git a/src/roulette_util.c b/src/roulette_util.c index a197cfa09e..c556a4af56 100755 --- a/src/roulette_util.c +++ b/src/roulette_util.c @@ -206,463 +206,227 @@ void sub_8151A9C(struct UnkStruct0 *r0, u16 r1) } } -void sub_8151B3C(struct InnerStruct203CF18 *arg0) +void InitPulseBlend(struct PulseBlend *pulseBlend) { u8 i = 0; - arg0->unk0 = 0; - memset(&arg0->unk4, 0, sizeof(arg0->unk4)); + pulseBlend->usedPulseBlendPalettes = 0; + memset(&pulseBlend->pulseBlendPalettes, 0, sizeof(pulseBlend->pulseBlendPalettes)); for (; i < 16; i++) - { - arg0->unk4[i].unk0 = i; - } + pulseBlend->pulseBlendPalettes[i].paletteSelector = i; } -int sub_8151B68(struct InnerStruct203CF18 *arg0, const struct InnerStruct203CF18_3 *arg1) +int InitPulseBlendPaletteSettings(struct PulseBlend *pulseBlend, const struct PulseBlendSettings *settings) { u8 i = 0; - struct InnerStruct203CF18_2 *r4 = NULL; + struct PulseBlendPalette *pulseBlendPalette = NULL; - if (!arg0->unk4[0].unk1_7) + if (!pulseBlend->pulseBlendPalettes[0].inUse) { - r4 = &arg0->unk4[0]; + pulseBlendPalette = &pulseBlend->pulseBlendPalettes[0]; } else { while (++i < 16) { - if (!arg0->unk4[i].unk1_7) + if (!pulseBlend->pulseBlendPalettes[i].inUse) { - r4 = &arg0->unk4[i]; + pulseBlendPalette = &pulseBlend->pulseBlendPalettes[i]; break; } } } - if (r4 == 0) + if (pulseBlendPalette == NULL) return 0xFF; - r4->unk1_0 = 0; - r4->unk1_4 = 0; - r4->unk1_6 = 1; - r4->unk1_7 = 1; - r4->unk2 = 0; - r4->unk3 = 0; - memcpy(&r4->unk4, arg1, sizeof(*arg1)); + pulseBlendPalette->blendCoeff = 0; + pulseBlendPalette->fadeDirection = 0; + pulseBlendPalette->available = 1; + pulseBlendPalette->inUse = 1; + pulseBlendPalette->delayCounter = 0; + pulseBlendPalette->fadeCycleCounter = 0; + memcpy(&pulseBlendPalette->pulseBlendSettings, settings, sizeof(*settings)); return i; } -void sub_8151BD4(struct InnerStruct203CF18_2 *arg0) +static void ClearPulseBlendPalettesSettings(struct PulseBlendPalette *pulseBlendPalette) { u16 i; - if (!arg0->unk1_6 && arg0->unk4.unk7_6) + if (!pulseBlendPalette->available && pulseBlendPalette->pulseBlendSettings.restorePaletteOnUnload) { - for (i = arg0->unk4.unk2; i < arg0->unk4.unk2 + arg0->unk4.unk4; i++) + for (i = pulseBlendPalette->pulseBlendSettings.paletteOffset; i < pulseBlendPalette->pulseBlendSettings.paletteOffset + pulseBlendPalette->pulseBlendSettings.numColors; i++) gPlttBufferFaded[i] = gPlttBufferUnfaded[i]; } - memset(&arg0->unk4, 0, sizeof(arg0->unk4)); - arg0->unk1_0 = 0; - arg0->unk1_4 = 0; - arg0->unk1_5 = 0; - arg0->unk1_6 = 1; - arg0->unk1_7 = 0; - arg0->unk3 = 0; - arg0->unk2 = 0; + memset(&pulseBlendPalette->pulseBlendSettings, 0, sizeof(pulseBlendPalette->pulseBlendSettings)); + pulseBlendPalette->blendCoeff = 0; + pulseBlendPalette->fadeDirection = 0; + pulseBlendPalette->unk1_5 = 0; + pulseBlendPalette->available = 1; + pulseBlendPalette->inUse = 0; + pulseBlendPalette->fadeCycleCounter = 0; + pulseBlendPalette->delayCounter = 0; } -void sub_8151C50(struct InnerStruct203CF18 *arg0, u16 arg1, u8 arg2) +void UnloadUsedPulseBlendPalettes(struct PulseBlend *pulseBlend, u16 pulseBlendPaletteSelector, u8 multiSelection) { u16 i = 0; - if (!arg2) + if (!multiSelection) { - sub_8151BD4(&arg0->unk4[arg1 & 0xF]); + ClearPulseBlendPalettesSettings(&pulseBlend->pulseBlendPalettes[pulseBlendPaletteSelector & 0xF]); } else { for (i = 0; i < 16; i++) { - if ((arg1 & 1) && arg0->unk4[i].unk1_7) - sub_8151BD4(&arg0->unk4[i]); + if ((pulseBlendPaletteSelector & 1) && pulseBlend->pulseBlendPalettes[i].inUse) + ClearPulseBlendPalettesSettings(&pulseBlend->pulseBlendPalettes[i]); - arg1 >>= 1; + pulseBlendPaletteSelector >>= 1; } } } -// there seems to be a temp var involved inside the first if block -void sub_8151CA8(struct InnerStruct203CF18 *arg0, u16 arg1, u8 arg2) +void MarkUsedPulseBlendPalettes(struct PulseBlend *pulseBlend, u16 pulseBlendPaletteSelector, u8 multiSelection) { u8 i = 0; - if (!arg2) + if (!multiSelection) { - i = arg1 & 0xF; - arg0->unk4[i].unk1_6 = 0; - arg0->unk0 |= 1 << i; + i = pulseBlendPaletteSelector & 0xF; + pulseBlend->pulseBlendPalettes[i].available = 0; + pulseBlend->usedPulseBlendPalettes |= 1 << i; } else { for (i = 0; i < 16; i++) { - if (!(arg1 & 1) || !arg0->unk4[i].unk1_7 || !arg0->unk4[i].unk1_6) + if (!(pulseBlendPaletteSelector & 1) || !pulseBlend->pulseBlendPalettes[i].inUse || !pulseBlend->pulseBlendPalettes[i].available) { - arg1 <<= 1; + pulseBlendPaletteSelector <<= 1; } else { - arg0->unk4[i].unk1_6 = 0; - arg0->unk0 |= 1 << i; + pulseBlend->pulseBlendPalettes[i].available = 0; + pulseBlend->usedPulseBlendPalettes |= 1 << i; } } } } -void sub_8151D28(struct InnerStruct203CF18 *arg0, u16 arg1, u8 arg2) +void UnmarkUsedPulseBlendPalettes(struct PulseBlend *pulseBlend, u16 pulseBlendPaletteSelector, u8 multiSelection) { u16 i; - struct InnerStruct203CF18_2 *var0; + struct PulseBlendPalette *pulseBlendPalette; u8 j = 0; - if (!arg2) + if (!multiSelection) { - var0 = &arg0->unk4[arg1 & 0xF]; - if (!var0->unk1_6 && var0->unk1_7) + pulseBlendPalette = &pulseBlend->pulseBlendPalettes[pulseBlendPaletteSelector & 0xF]; + if (!pulseBlendPalette->available && pulseBlendPalette->inUse) { - if (var0->unk4.unk7_6) + if (pulseBlendPalette->pulseBlendSettings.restorePaletteOnUnload) { - for (i = var0->unk4.unk2; i < var0->unk4.unk2 + var0->unk4.unk4; i++) + for (i = pulseBlendPalette->pulseBlendSettings.paletteOffset; i < pulseBlendPalette->pulseBlendSettings.paletteOffset + pulseBlendPalette->pulseBlendSettings.numColors; i++) gPlttBufferFaded[i] = gPlttBufferUnfaded[i]; } - var0->unk1_6 = 1; - arg0->unk0 &= ~(1 << j); + pulseBlendPalette->available = 1; + pulseBlend->usedPulseBlendPalettes &= ~(1 << j); } } else { for (j = 0; j < 16; j++) { - var0 = &arg0->unk4[j]; - if (!(arg1 & 1) || var0->unk1_6 || !var0->unk1_7) + pulseBlendPalette = &pulseBlend->pulseBlendPalettes[j]; + if (!(pulseBlendPaletteSelector & 1) || pulseBlendPalette->available || !pulseBlendPalette->inUse) { - arg1 <<= 1; + pulseBlendPaletteSelector <<= 1; } else { - if (var0->unk4.unk7_6) + if (pulseBlendPalette->pulseBlendSettings.restorePaletteOnUnload) { - for (i = var0->unk4.unk2; i < var0->unk4.unk2 + var0->unk4.unk4; i++) + for (i = pulseBlendPalette->pulseBlendSettings.paletteOffset; i < pulseBlendPalette->pulseBlendSettings.paletteOffset + pulseBlendPalette->pulseBlendSettings.numColors; i++) gPlttBufferFaded[i] = gPlttBufferUnfaded[i]; } - var0->unk1_6 = 1; - arg0->unk0 &= ~(1 << j); + pulseBlendPalette->available = 1; + pulseBlend->usedPulseBlendPalettes &= ~(1 << j); } } } } -#ifdef NONMATCHING -void sub_8151E50(struct InnerStruct203CF18 *arg0) +void UpdatePulseBlend(struct PulseBlend *pulseBlend) { - struct InnerStruct203CF18_2 *var0; + struct PulseBlendPalette *pulseBlendPalette; u8 i = 0; - if (arg0->unk0) + if (pulseBlend->usedPulseBlendPalettes) { for (i = 0; i < 16; i++) { - var0 = &arg0->unk4[i]; - if ((!var0->unk1_6 && var0->unk1_7) && (!gPaletteFade.active || !var0->unk4.unk7_7)) + pulseBlendPalette = &pulseBlend->pulseBlendPalettes[i]; + if ((!pulseBlendPalette->available && pulseBlendPalette->inUse) && (!gPaletteFade.active || !pulseBlendPalette->pulseBlendSettings.unk7_7)) { - if (--var0->unk2 == 0xFF) + if (--pulseBlendPalette->delayCounter == 0xFF) { - var0->unk2 = var0->unk4.unk5; - BlendPalette(var0->unk4.unk2, var0->unk4.unk4, var0->unk1_0, var0->unk4.unk0); - switch (var0->unk4.unk7_4) + pulseBlendPalette->delayCounter = pulseBlendPalette->pulseBlendSettings.delay; + BlendPalette(pulseBlendPalette->pulseBlendSettings.paletteOffset, pulseBlendPalette->pulseBlendSettings.numColors, pulseBlendPalette->blendCoeff, pulseBlendPalette->pulseBlendSettings.blendColor); + switch (pulseBlendPalette->pulseBlendSettings.fadeType) { - case 0: - if (var0->unk1_0++ == var0->unk4.unk7_0) + case 0: // Fade all the way to the max blend amount, then wrap around + // BUG: This comparison will never be true for maxBlendCoeff values that are >= 8. This is because + // maxBlendCoeff is a signed 4-bit field, but blendCoeff is an unsigned 4-bit field. This code is never + // reached, anyway, so the bug is not observable in vanilla gameplay. + if (pulseBlendPalette->blendCoeff++ == pulseBlendPalette->pulseBlendSettings.maxBlendCoeff) { - var0->unk3++; - var0->unk1_0 = 0; + pulseBlendPalette->fadeCycleCounter++; + pulseBlendPalette->blendCoeff = 0; } break; - case 1: - if (var0->unk1_4) + case 1: // Fade in and out + if (pulseBlendPalette->fadeDirection) { - if (--var0->unk1_0 == 0) + if (--pulseBlendPalette->blendCoeff == 0) { - var0->unk3++; - var0->unk1_4 ^= 1; + pulseBlendPalette->fadeCycleCounter++; + pulseBlendPalette->fadeDirection ^= 1; } } else { - if (var0->unk1_0++ == var0->unk4.unk7_0 - 1) + u8 max = (pulseBlendPalette->pulseBlendSettings.maxBlendCoeff - 1) & 0xF; + if (pulseBlendPalette->blendCoeff++ == max) { - var0->unk3++; - var0->unk1_4 ^= 1; + pulseBlendPalette->fadeCycleCounter++; + pulseBlendPalette->fadeDirection ^= 1; } } break; - case 2: - if (var0->unk1_4) - var0->unk1_0 = 0; + case 2: // Flip back and forth + if (pulseBlendPalette->fadeDirection) + pulseBlendPalette->blendCoeff = 0; else - var0->unk1_0 = var0->unk4.unk7_0; + pulseBlendPalette->blendCoeff = pulseBlendPalette->pulseBlendSettings.maxBlendCoeff & 0xF; - var0->unk1_4 ^= 1; - var0->unk3++; + pulseBlendPalette->fadeDirection ^= 1; + pulseBlendPalette->fadeCycleCounter++; break; } - if (var0->unk4.unk6 != 0xFF && var0->unk3 == 0xFF) - sub_8151D28(arg0, var0->unk0, 0); + if (pulseBlendPalette->pulseBlendSettings.numFadeCycles != 0xFF + && pulseBlendPalette->fadeCycleCounter == pulseBlendPalette->pulseBlendSettings.numFadeCycles) + UnmarkUsedPulseBlendPalettes(pulseBlend, pulseBlendPalette->paletteSelector, FALSE); } } } } } -#else -NAKED -void sub_8151E50(struct InnerStruct203CF18 *arg0) -{ - asm_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, 0x4\n\ - str r0, [sp]\n\ - movs r0, 0\n\ - mov r10, r0\n\ - ldr r1, [sp]\n\ - ldrh r0, [r1]\n\ - cmp r0, 0\n\ - bne _08151E6C\n\ - b _08151FF6\n\ -_08151E6C:\n\ - movs r2, 0xF\n\ - mov r9, r2\n\ - movs r3, 0x10\n\ - negs r3, r3\n\ - mov r8, r3\n\ - movs r7, 0x1\n\ -_08151E78:\n\ - mov r5, r10\n\ - lsls r0, r5, 1\n\ - add r0, r10\n\ - lsls r0, 2\n\ - adds r0, 0x4\n\ - ldr r1, [sp]\n\ - adds r4, r1, r0\n\ - ldrb r2, [r4, 0x1]\n\ - movs r3, 0xC0\n\ - ands r3, r2\n\ - cmp r3, 0x80\n\ - beq _08151E92\n\ - b _08151FE6\n\ -_08151E92:\n\ - ldr r0, =gPaletteFade\n\ - ldrb r1, [r0, 0x7]\n\ - adds r0, r3, 0\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _08151EA8\n\ - ldrb r0, [r4, 0xB]\n\ - ands r3, r0\n\ - cmp r3, 0\n\ - beq _08151EA8\n\ - b _08151FE6\n\ -_08151EA8:\n\ - ldrb r0, [r4, 0x2]\n\ - subs r0, 0x1\n\ - strb r0, [r4, 0x2]\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - cmp r0, 0xFF\n\ - beq _08151EB8\n\ - b _08151FE6\n\ -_08151EB8:\n\ - ldrb r0, [r4, 0x9]\n\ - strb r0, [r4, 0x2]\n\ - ldrh r0, [r4, 0x6]\n\ - ldrb r1, [r4, 0x8]\n\ - lsls r2, 28\n\ - lsrs r2, 28\n\ - ldrh r3, [r4, 0x4]\n\ - bl BlendPalette\n\ - ldrb r5, [r4, 0xB]\n\ - lsls r0, r5, 26\n\ - asrs r0, 30\n\ - cmp r0, 0x1\n\ - beq _08151F16\n\ - cmp r0, 0x1\n\ - bgt _08151EE4\n\ - cmp r0, 0\n\ - beq _08151EEA\n\ - b _08151FD0\n\ - .pool\n\ -_08151EE4:\n\ - cmp r0, 0x2\n\ - beq _08151F92\n\ - b _08151FD0\n\ -_08151EEA:\n\ - ldrb r2, [r4, 0x1]\n\ - lsls r1, r2, 28\n\ - lsrs r0, r1, 28\n\ - adds r0, 0x1\n\ - mov r3, r9\n\ - ands r0, r3\n\ - mov r6, r8\n\ - adds r3, r6, 0\n\ - ands r3, r2\n\ - orrs r3, r0\n\ - strb r3, [r4, 0x1]\n\ - lsrs r1, 28\n\ - lsls r0, r5, 28\n\ - asrs r0, 28\n\ - cmp r1, r0\n\ - bne _08151FD0\n\ - ldrb r0, [r4, 0x3]\n\ - adds r0, 0x1\n\ - strb r0, [r4, 0x3]\n\ - ands r3, r6\n\ - strb r3, [r4, 0x1]\n\ - b _08151FD0\n\ -_08151F16:\n\ - ldrb r3, [r4, 0x1]\n\ - movs r0, 0x10\n\ - ands r0, r3\n\ - cmp r0, 0\n\ - beq _08151F54\n\ - lsls r0, r3, 28\n\ - lsrs r0, 28\n\ - subs r0, 0x1\n\ - mov r5, r9\n\ - ands r0, r5\n\ - mov r2, r8\n\ - ands r2, r3\n\ - orrs r2, r0\n\ - strb r2, [r4, 0x1]\n\ - cmp r0, 0\n\ - bne _08151FD0\n\ - ldrb r0, [r4, 0x3]\n\ - adds r0, 0x1\n\ - strb r0, [r4, 0x3]\n\ - lsls r0, r2, 27\n\ - lsrs r0, 31\n\ - eors r0, r7\n\ - ands r0, r7\n\ - lsls r0, 4\n\ - movs r3, 0x11\n\ - negs r3, r3\n\ - adds r1, r3, 0\n\ - ands r2, r1\n\ - orrs r2, r0\n\ - strb r2, [r4, 0x1]\n\ - b _08151FD0\n\ -_08151F54:\n\ - lsls r0, r5, 28\n\ - asrs r0, 28\n\ - subs r0, 0x1\n\ - mov r5, r9\n\ - ands r0, r5\n\ - lsls r2, r3, 28\n\ - lsrs r1, r2, 28\n\ - adds r1, 0x1\n\ - ands r1, r5\n\ - mov r5, r8\n\ - ands r3, r5\n\ - orrs r3, r1\n\ - strb r3, [r4, 0x1]\n\ - lsrs r2, 28\n\ - cmp r2, r0\n\ - bne _08151FD0\n\ - ldrb r0, [r4, 0x3]\n\ - adds r0, 0x1\n\ - strb r0, [r4, 0x3]\n\ - lsls r0, r3, 27\n\ - lsrs r0, 31\n\ - eors r0, r7\n\ - ands r0, r7\n\ - lsls r0, 4\n\ - movs r2, 0x11\n\ - negs r2, r2\n\ - adds r1, r2, 0\n\ - ands r3, r1\n\ - orrs r3, r0\n\ - strb r3, [r4, 0x1]\n\ - b _08151FD0\n\ -_08151F92:\n\ - ldrb r2, [r4, 0x1]\n\ - movs r0, 0x10\n\ - ands r0, r2\n\ - cmp r0, 0\n\ - beq _08151FA2\n\ - mov r0, r8\n\ - ands r0, r2\n\ - b _08151FB0\n\ -_08151FA2:\n\ - lsls r1, r5, 28\n\ - asrs r1, 28\n\ - mov r3, r9\n\ - ands r1, r3\n\ - mov r0, r8\n\ - ands r0, r2\n\ - orrs r0, r1\n\ -_08151FB0:\n\ - strb r0, [r4, 0x1]\n\ - ldrb r2, [r4, 0x1]\n\ - lsls r0, r2, 27\n\ - lsrs r0, 31\n\ - eors r0, r7\n\ - ands r0, r7\n\ - lsls r0, 4\n\ - movs r5, 0x11\n\ - negs r5, r5\n\ - adds r1, r5, 0\n\ - ands r2, r1\n\ - orrs r2, r0\n\ - strb r2, [r4, 0x1]\n\ - ldrb r0, [r4, 0x3]\n\ - adds r0, 0x1\n\ - strb r0, [r4, 0x3]\n\ -_08151FD0:\n\ - ldrb r1, [r4, 0xA]\n\ - cmp r1, 0xFF\n\ - beq _08151FE6\n\ - ldrb r0, [r4, 0x3]\n\ - cmp r0, r1\n\ - bne _08151FE6\n\ - ldrb r1, [r4]\n\ - ldr r0, [sp]\n\ - movs r2, 0\n\ - bl sub_8151D28\n\ -_08151FE6:\n\ - mov r0, r10\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r10, r0\n\ - cmp r0, 0xF\n\ - bhi _08151FF6\n\ - b _08151E78\n\ -_08151FF6:\n\ - add sp, 0x4\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"); -} -#endif // NONMATCHING void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height) { diff --git a/src/scrcmd.c b/src/scrcmd.c index 9d9c62a82f..ab3af019d8 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1713,8 +1713,7 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx) u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL); if (!species) break; - // UB: GetMonData() arguments don't match function definition - if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && pokemon_has_move(&gPlayerParty[i], moveId) == TRUE) + if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && MonKnowsMove(&gPlayerParty[i], moveId) == TRUE) { gSpecialVar_Result = i; gSpecialVar_0x8004 = species; diff --git a/src/script_pokemon_util_80F87D8.c b/src/script_pokemon_util_80F87D8.c index 2611c5c6da..102e800647 100755 --- a/src/script_pokemon_util_80F87D8.c +++ b/src/script_pokemon_util_80F87D8.c @@ -528,7 +528,7 @@ void HealPlayerParty(void) ppBonuses = GetMonData(&gPlayerParty[i], MON_DATA_PP_BONUSES); // restore PP. - for(j = 0; j < 4; j++) + for(j = 0; j < MAX_MON_MOVES; j++) { arg[0] = CalculatePPWithBonus(GetMonData(&gPlayerParty[i], MON_DATA_MOVE1 + j), ppBonuses, j); SetMonData(&gPlayerParty[i], MON_DATA_PP1 + j, arg); diff --git a/src/secret_base.c b/src/secret_base.c index a32186419d..7e7b10a9a8 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -16,11 +16,13 @@ #include "overworld.h" #include "fieldmap.h" #include "field_camera.h" +#include "field_specials.h" #include "field_player_avatar.h" #include "field_screen_effect.h" #include "field_weather.h" #include "event_object_movement.h" #include "field_effect.h" +#include "fldeff.h" #include "fldeff_misc.h" #include "metatile_behavior.h" #include "map_name_popup.h" @@ -32,7 +34,6 @@ #include "event_data.h" #include "battle.h" #include "battle_setup.h" -#include "rom6.h" #include "decoration.h" #include "link.h" #include "tv.h" diff --git a/src/starter_choose.c b/src/starter_choose.c index afa3fabbf6..2d4a1b1e1c 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -425,7 +425,7 @@ void CB2_ChooseStarter(void) SetGpuReg(REG_OFFSET_WINOUT, 0x1F); SetGpuReg(REG_OFFSET_WIN0H, 0); SetGpuReg(REG_OFFSET_WIN0V, 0); - SetGpuReg(REG_OFFSET_BLDCNT, 0xFE); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 7); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); diff --git a/src/title_screen.c b/src/title_screen.c index c6e9aa26fa..48571ff96c 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -553,7 +553,7 @@ void CB2_InitTitleScreen(void) SetGpuReg(REG_OFFSET_WIN1V, 0); SetGpuReg(REG_OFFSET_WININ, 0x1F1F); SetGpuReg(REG_OFFSET_WINOUT, 0x3F1F); - SetGpuReg(REG_OFFSET_BLDCNT, 0x84); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_LIGHTEN); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0xC); SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(3) | BGCNT_CHARBASE(2) | BGCNT_SCREENBASE(26) | BGCNT_16COLOR | BGCNT_TXT256x256); @@ -615,8 +615,8 @@ static void Task_TitleScreenPhase1(u8 taskId) SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG2_ON | DISPCNT_OBJ_ON); SetGpuReg(REG_OFFSET_WININ, 0); SetGpuReg(REG_OFFSET_WINOUT, 0); - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F50); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x10); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_OBJ | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); SetGpuReg(REG_OFFSET_BLDY, 0); // Create left side of version banner @@ -652,8 +652,8 @@ static void Task_TitleScreenPhase2(u8 taskId) else { gTasks[taskId].tSkipToNext = TRUE; - SetGpuReg(REG_OFFSET_BLDCNT, 0x2142); - SetGpuReg(REG_OFFSET_BLDALPHA, 0xF06); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BD); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(6, 15)); SetGpuReg(REG_OFFSET_BLDY, 0); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP diff --git a/src/tv.c b/src/tv.c index 0ae1055803..3d2a25bdc0 100644 --- a/src/tv.c +++ b/src/tv.c @@ -6,6 +6,8 @@ #include "event_data.h" #include "fieldmap.h" #include "field_camera.h" +#include "field_specials.h" +#include "fldeff.h" #include "strings.h" #include "string_util.h" #include "international_string_util.h" @@ -24,7 +26,6 @@ #include "event_scripts.h" #include "shop.h" #include "lilycove_lady.h" -#include "rom6.h" #include "pokedex.h" #include "event_object_movement.h" #include "text.h" diff --git a/src/unk_pokedex_area_screen_helper.c b/src/unk_pokedex_area_screen_helper.c index 67fd52cb50..0041d628c5 100644 --- a/src/unk_pokedex_area_screen_helper.c +++ b/src/unk_pokedex_area_screen_helper.c @@ -22,21 +22,21 @@ void sub_81C4D70(const struct UnkStruct_1C4D70 *template) if (unk == 0) { - SetBgAttribute(template->bg, BG_CTRL_ATTR_WRAPAROUND, 0); + SetBgAttribute(template->bg, BG_ATTR_METRIC, 0); decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861D1A0, 0, template->unk2, unk); sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861DEF4, 0, 0, 1), template->unk2, 32, 32, unk); } else { - SetBgAttribute(template->bg, BG_CTRL_ATTR_WRAPAROUND, 2); - SetBgAttribute(template->bg, 9, 1); + SetBgAttribute(template->bg, BG_ATTR_METRIC, 2); + SetBgAttribute(template->bg, BG_ATTR_TYPE, 1); decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861E208, 0, template->unk2, 0); sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861EF64, 0, 0, 1), template->unk2, 64, 64, 1); } ChangeBgX(template->bg, 0, 0); ChangeBgY(template->bg, 0, 0); - SetBgAttribute(template->bg, BG_CTRL_ATTR_SCREENSIZE, 1); + SetBgAttribute(template->bg, BG_ATTR_PALETTEMODE, 1); CpuCopy32(gUnknown_0861D140, &gPlttBufferUnfaded[0x70], 0x60); *gUnknown_0203CF28 = template->bg; } diff --git a/src/unk_transition.c b/src/unk_transition.c index 7346e06abe..d56998b5bb 100644 --- a/src/unk_transition.c +++ b/src/unk_transition.c @@ -337,8 +337,8 @@ static bool8 sub_81DAACC(struct Task *task) else { sub_81DA700(); - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F41); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x1000); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); ChangeBgX(0, 0, 0); ChangeBgY(0, 0, 0); ChangeBgY(0, 0x500, 2); @@ -368,11 +368,11 @@ static bool8 sub_81DAB4C(struct Task *task) } else { - u16 var; + u16 blnd; task->data[2]++; - var = task->data[2]; - SetGpuReg(REG_OFFSET_BLDALPHA, (var) | ((16 - var) << 8)); + blnd = task->data[2]; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(blnd, 16 - blnd)); } return FALSE; diff --git a/src/wallclock.c b/src/wallclock.c index 58704c8a39..546750ba66 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -585,11 +585,11 @@ static void WallClockVblankCallback(void) static void LoadWallClockGraphics(void) { SetVBlankCallback(NULL); - SetGpuReg(REG_OFFSET_DISPCNT, 0x0000); - SetGpuReg(REG_OFFSET_BG3CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG2CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG1CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG0CNT, 0x0000); + SetGpuReg(REG_OFFSET_DISPCNT, 0); + SetGpuReg(REG_OFFSET_BG3CNT, 0); + SetGpuReg(REG_OFFSET_BG2CNT, 0); + SetGpuReg(REG_OFFSET_BG1CNT, 0); + SetGpuReg(REG_OFFSET_BG0CNT, 0); ChangeBgX(0, 0, 0); ChangeBgY(0, 0, 0); ChangeBgX(1, 0, 0); @@ -633,9 +633,9 @@ static void WallClockInit(void) EnableInterrupts(INTR_FLAG_VBLANK); SetVBlankCallback(WallClockVblankCallback); SetMainCallback2(WallClockMainCallback); - SetGpuReg(REG_OFFSET_BLDCNT, 0x0000); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x0000); - SetGpuReg(REG_OFFSET_BLDY, 0x0000); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); ShowBg(0); ShowBg(2); diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 9267708b96..2a5e2c609b 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -89,20 +89,12 @@ static bool8 CheckFeebas(void) x -= 7; y -= 7; -#ifdef NONMATCHING + if (y >= gRoute119WaterTileData[3 * 0 + 0] && y <= gRoute119WaterTileData[3 * 0 + 1]) + route119Section = 0; if (y >= gRoute119WaterTileData[3 * 1 + 0] && y <= gRoute119WaterTileData[3 * 1 + 1]) route119Section = 1; if (y >= gRoute119WaterTileData[3 * 2 + 0] && y <= gRoute119WaterTileData[3 * 2 + 1]) route119Section = 2; -#else - { - register const u16 *arr asm("r0"); - if (y >= (arr = gRoute119WaterTileData)[3 * 1 + 0] && y <= arr[3 * 1 + 1]) - route119Section = 1; - if (y >= arr[3 * 2 + 0] && y <= arr[3 * 2 + 1]) - route119Section = 2; - } -#endif if (Random() % 100 > 49) // 50% chance of encountering Feebas return FALSE; diff --git a/src/window.c b/src/window.c index aa1df3a123..3da5291789 100644 --- a/src/window.c +++ b/src/window.c @@ -63,7 +63,7 @@ bool16 InitWindows(const struct WindowTemplate *templates) if (gUnknown_03002F70[bgLayer] == NULL) { - attrib = GetBgAttribute(bgLayer, 0x8); + attrib = GetBgAttribute(bgLayer, BG_ATTR_METRIC); if (attrib != 0xFFFF) { @@ -141,7 +141,7 @@ u16 AddWindow(const struct WindowTemplate *template) if (gUnknown_03002F70[bgLayer] == NULL) { - attrib = GetBgAttribute(bgLayer, 0x8); + attrib = GetBgAttribute(bgLayer, BG_ATTR_METRIC); if (attrib != 0xFFFF) { @@ -328,7 +328,7 @@ void PutWindowTilemap(u8 windowId) WriteSequenceToBgTilemapBuffer( windowLocal.window.bg, - GetBgAttribute(windowLocal.window.bg, 0xA) + windowLocal.window.baseBlock, + GetBgAttribute(windowLocal.window.bg, BG_ATTR_BASETILE) + windowLocal.window.baseBlock, windowLocal.window.tilemapLeft, windowLocal.window.tilemapTop, windowLocal.window.width, @@ -340,7 +340,7 @@ void PutWindowTilemap(u8 windowId) void PutWindowRectTilemapOverridePalette(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 palette) { struct Window windowLocal = gWindows[windowId]; - u16 currentRow = windowLocal.window.baseBlock + (y * windowLocal.window.width) + x + GetBgAttribute(windowLocal.window.bg, 0xA); + u16 currentRow = windowLocal.window.baseBlock + (y * windowLocal.window.width) + x + GetBgAttribute(windowLocal.window.bg, BG_ATTR_BASETILE); int i; for (i = 0; i < height; ++i) @@ -376,7 +376,7 @@ void ClearWindowTilemap(u8 windowId) void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height) { struct Window windowLocal = gWindows[windowId]; - u16 currentRow = windowLocal.window.baseBlock + (y * windowLocal.window.width) + x + GetBgAttribute(windowLocal.window.bg, 0xA); + u16 currentRow = windowLocal.window.baseBlock + (y * windowLocal.window.width) + x + GetBgAttribute(windowLocal.window.bg, BG_ATTR_BASETILE); int i; for (i = 0; i < height; ++i) @@ -617,7 +617,7 @@ u16 AddWindow8Bit(const struct WindowTemplate *template) bgLayer = template->bg; if (gUnknown_03002F70[bgLayer] == 0) { - u16 attribute = GetBgAttribute(bgLayer, 8); + u16 attribute = GetBgAttribute(bgLayer, BG_ATTR_METRIC); if (attribute != 0xFFFF) { s32 i; diff --git a/sym_bss.txt b/sym_bss.txt index da8b4ae80e..ae4e5dadff 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -43,7 +43,7 @@ .include "src/battle_pike.o" .include "src/battle_tent.o" .include "src/multiboot.o" - .include "src/fossil_specials.o" + .include "src/mirage_tower.o" .include "src/berry_fix_program.o" gUnknown_030012BC: @ 30012BC diff --git a/sym_ewram.txt b/sym_ewram.txt index f99dd1ab38..7e61267f60 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -301,8 +301,7 @@ gUnknown_0203CD88: @ 203CD88 .include "src/dynamic_placeholder_text_util.o" .include "src/item_icon.o" .include "src/party_menu.o" - .include "src/fossil_specials.o" - .include "src/fldeff_groundshake.o" + .include "src/mirage_tower.o" .include "src/pokemon_summary_screen.o" .include "src/unk_pokedex_area_screen_helper.o" .include "src/battle_pyramid_bag.o"