diff --git a/asm/code_807CD9C.s b/asm/code_807CD9C.s deleted file mode 100644 index 6e202bc88..000000000 --- a/asm/code_807CD9C.s +++ /dev/null @@ -1,1564 +0,0 @@ - #include "asm/constants/gba_constants.inc" - #include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_807D510 -sub_807D510: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r4, _0807D540 - add sp, r4 - ldr r1, _0807D544 - add r1, sp - str r0, [r1] - movs r2, 0 - movs r3, 0xD1 - lsls r3, 4 - add r3, sp - str r2, [r3] - ldr r4, _0807D548 - add r4, sp - str r2, [r4] - add r5, sp, 0x4 - mov r8, r5 - mov r10, r2 - mov r9, r2 - add r7, sp, 0x8 - b _0807D606 - .align 2, 0 -_0807D540: .4byte 0xfffff2d4 -_0807D544: .4byte 0x00000d08 -_0807D548: .4byte 0x00000d0c -_0807D54C: - movs r0, 0x4 - ldrsh r1, [r5, r0] - ldr r2, _0807D650 - add r2, sp - ldr r2, [r2] - movs r3, 0x4 - ldrsh r0, [r2, r3] - subs r1, r0 - cmp r1, 0 - bge _0807D562 - negs r1, r1 -_0807D562: - cmp r1, 0x2 - bgt _0807D580 - movs r3, 0x6 - ldrsh r1, [r5, r3] - ldr r4, _0807D650 - add r4, sp - ldr r4, [r4] - movs r2, 0x6 - ldrsh r0, [r4, r2] - subs r1, r0 - cmp r1, 0 - bge _0807D57C - negs r1, r1 -_0807D57C: - cmp r1, 0x2 - ble _0807D5FE -_0807D580: - movs r1, 0x4 - ldrsh r0, [r5, r1] - movs r2, 0x6 - ldrsh r1, [r5, r2] - bl GetTile - ldrh r1, [r0] - movs r2, 0x3 - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - beq _0807D5FE - mov r3, r8 - str r2, [r3] - ldr r4, _0807D654 - add r4, sp - ldr r1, _0807D658 - add r1, sp - ldr r1, [r1] - lsls r0, r1, 2 - adds r4, r0 - str r4, [r7, 0x6C] - ldr r0, [r5, 0x4] - str r0, [r7] - movs r2, 0x4 - ldrsh r0, [r5, r2] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 3 - adds r1, 0x4 - lsls r1, 8 - movs r3, 0x6 - ldrsh r0, [r5, r3] - lsls r2, r0, 1 - adds r2, r0 - lsls r2, 3 - adds r2, 0x4 - lsls r2, 8 - mov r0, r8 - bl SetEntityPixelPos - movs r2, 0 - movs r1, 0 - strh r1, [r7, 0x22] - movs r0, 0x1 - strb r0, [r7, 0x1C] - strb r2, [r7, 0x1E] - str r1, [r7, 0x18] - ldr r0, _0807D65C - ldr r0, [r0] - ldr r5, _0807D660 - adds r0, r5 - add r0, r9 - ldr r0, [r0] - str r0, [r4] - adds r7, 0x74 - movs r0, 0x74 - add r8, r0 - ldr r2, _0807D658 - add r2, sp - ldr r1, [r2] - adds r1, 0x1 - str r1, [r2] -_0807D5FE: - movs r3, 0x4 - add r9, r3 - movs r4, 0x1 - add r10, r4 -_0807D606: - ldr r0, _0807D65C - ldr r1, [r0] - ldr r5, _0807D664 - adds r0, r1, r5 - movs r2, 0 - ldrsh r0, [r0, r2] - cmp r10, r0 - bge _0807D634 - ldr r3, _0807D668 - adds r0, r1, r3 - add r0, r9 - ldr r5, [r0] - adds r0, r5, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807D5FE - ldr r4, _0807D658 - add r4, sp - ldr r4, [r4] - cmp r4, 0x18 - ble _0807D54C -_0807D634: - ldr r5, _0807D658 - add r5, sp - ldr r5, [r5] - cmp r5, 0 - bne _0807D670 - ldr r0, _0807D66C - ldr r1, [r0] - ldr r2, _0807D650 - add r2, sp - ldr r0, [r2] - bl LogMessageByIdWithPopupCheckUser - b _0807D9F4 - .align 2, 0 -_0807D650: .4byte 0x00000d08 -_0807D654: .4byte 0x00000b58 -_0807D658: .4byte 0x00000d0c -_0807D65C: .4byte gDungeon -_0807D660: .4byte 0x00003804 -_0807D664: .4byte 0x00003904 -_0807D668: .4byte 0x0001361c -_0807D66C: .4byte gUnknown_80FE034 -_0807D670: - movs r1, 0 - movs r7, 0x1D - ldr r0, _0807D754 - add r0, sp -_0807D678: - strb r1, [r0] - subs r0, 0x1 - subs r7, 0x1 - cmp r7, 0 - bge _0807D678 - movs r7, 0 - ldr r3, _0807D758 - add r3, sp - ldr r3, [r3] - cmp r7, r3 - blt _0807D690 - b _0807D7CC -_0807D690: - ldr r4, _0807D75C - mov r10, r4 - ldr r5, _0807D760 - movs r0, 0 - ldrsh r5, [r5, r0] - ldr r0, _0807D764 - add r0, sp - str r5, [r0] -_0807D6A0: - movs r1, 0 - mov r9, r1 - ldr r2, _0807D768 - add r2, sp - ldr r2, [r2] - ldrh r0, [r2, 0x4] - ldr r1, _0807D76C - ands r6, r1 - orrs r6, r0 - ldrh r0, [r2, 0x6] - lsls r0, 16 - mov r4, r10 - ands r6, r4 - orrs r6, r0 - mov r4, r9 - adds r5, r7, 0x1 - movs r0, 0xD2 - lsls r0, 4 - add r0, sp - str r5, [r0] - ldr r1, _0807D760 - ldr r2, _0807D764 - add r2, sp - ldr r2, [r2] - cmp r2, 0x63 - beq _0807D790 - ldr r3, _0807D770 - add r3, sp - mov r8, r3 -_0807D6DA: - ldr r0, _0807D774 - add r0, sp - adds r0, r4 - ldr r5, _0807D778 - add r5, sp - str r0, [r5] - ldrb r0, [r0] - cmp r0, 0 - bne _0807D77C - lsls r2, r4, 2 - adds r2, r1 - ldrh r0, [r2] - ldr r1, _0807D768 - add r1, sp - ldr r1, [r1] - ldrh r1, [r1, 0x4] - adds r0, r1 - lsls r0, 16 - lsrs r0, 16 - ldr r1, _0807D76C - ands r6, r1 - orrs r6, r0 - ldrh r0, [r2, 0x2] - ldr r2, _0807D768 - add r2, sp - ldr r2, [r2] - ldrh r2, [r2, 0x6] - adds r0, r2 - lsls r0, 16 - mov r3, r10 - ands r6, r3 - orrs r6, r0 - lsls r0, r6, 16 - asrs r0, 16 - asrs r1, r6, 16 - bl GetTile - adds r2, r0, 0 - ldrh r1, [r2] - movs r3, 0x3 - ands r3, r1 - cmp r3, 0x1 - bne _0807D77C - movs r5, 0x80 - lsls r5, 2 - adds r0, r5, 0 - ands r0, r1 - cmp r0, 0 - bne _0807D77C - ldr r0, [r2, 0x14] - cmp r0, 0 - bne _0807D77C - lsls r0, r7, 2 - add r0, r8 - str r6, [r0] - ldr r0, _0807D778 - add r0, sp - ldr r0, [r0] - strb r3, [r0] - b _0807D7B8 - .align 2, 0 -_0807D754: .4byte 0x00000d05 -_0807D758: .4byte 0x00000d0c -_0807D75C: .4byte 0x0000ffff -_0807D760: .4byte gUnknown_80F4468 -_0807D764: .4byte 0x00000d18 -_0807D768: .4byte 0x00000d08 -_0807D76C: .4byte 0xffff0000 -_0807D770: .4byte 0x00000bbc -_0807D774: .4byte 0x00000ce8 -_0807D778: .4byte 0x00000d28 -_0807D77C: - adds r4, 0x1 - cmp r4, 0x1D - bgt _0807D790 - lsls r0, r4, 2 - ldr r1, _0807D9B4 - adds r0, r1 - movs r2, 0 - ldrsh r0, [r0, r2] - cmp r0, 0x63 - bne _0807D6DA -_0807D790: - mov r3, r9 - cmp r3, 0 - bne _0807D7B8 - movs r0, 0x74 - muls r0, r7 - add r0, sp - adds r0, 0x4 - str r3, [r0] - ldr r1, _0807D9B8 - add r1, sp - lsls r0, r7, 2 - adds r1, r0 - ldrh r2, [r1] - mov r0, r10 - orrs r0, r2 - strh r0, [r1] - ldrh r2, [r1, 0x2] - mov r0, r10 - orrs r0, r2 - strh r0, [r1, 0x2] -_0807D7B8: - movs r4, 0xD2 - lsls r4, 4 - add r4, sp - ldr r7, [r4] - ldr r5, _0807D9BC - add r5, sp - ldr r5, [r5] - cmp r7, r5 - bge _0807D7CC - b _0807D6A0 -_0807D7CC: - movs r7, 0 - ldr r0, _0807D9BC - add r0, sp - ldr r0, [r0] - cmp r7, r0 - bge _0807D866 -_0807D7D8: - movs r0, 0x74 - adds r1, r7, 0 - muls r1, r0 - mov r8, r1 - mov r4, sp - add r4, r8 - adds r4, 0x4 - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807D85A - adds r0, r4, 0x4 - movs r1, 0x1 - bl sub_80461C8 - movs r2, 0x4 - ldrsh r0, [r4, r2] - movs r3, 0x6 - ldrsh r1, [r4, r3] - bl sub_80402AC - movs r5, 0xC2 - lsls r5, 4 - add r5, sp - lsls r6, r7, 3 - adds r5, r6 - ldr r4, _0807D9B8 - add r4, sp - lsls r0, r7, 2 - adds r4, r0 - movs r0, 0 - ldrsh r1, [r4, r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 3 - adds r0, 0x4 - lsls r0, 8 - add r1, sp, 0x10 - add r1, r8 - ldr r1, [r1] - subs r0, r1 - movs r1, 0x3C - bl __divsi3 - str r0, [r5] - ldr r5, _0807D9C0 - add r5, sp - adds r5, r6 - movs r2, 0x2 - ldrsh r1, [r4, r2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 3 - adds r0, 0x4 - lsls r0, 8 - add r1, sp, 0x14 - add r1, r8 - ldr r1, [r1] - subs r0, r1 - movs r1, 0x3C - bl __divsi3 - str r0, [r5] -_0807D85A: - adds r7, 0x1 - ldr r3, _0807D9BC - add r3, sp - ldr r3, [r3] - cmp r7, r3 - blt _0807D7D8 -_0807D866: - movs r1, 0xD1 - lsls r1, 1 - ldr r4, _0807D9C4 - add r4, sp - ldr r0, [r4] - bl sub_80421C0 - movs r5, 0 - mov r9, r5 - ldr r0, _0807D9C8 - ldr r0, [r0] - ldr r1, _0807D9CC - adds r0, r1 - ldrb r0, [r0] - ldr r2, _0807D9D0 - add r2, sp - str r0, [r2] - mov r10, r5 - movs r6, 0 -_0807D88C: - movs r7, 0 - mov r3, r10 - adds r3, 0x22 - ldr r4, _0807D9D4 - add r4, sp - str r3, [r4] - adds r5, r6, 0x1 - ldr r0, _0807D9D8 - add r0, sp - str r5, [r0] - ldr r1, _0807D9BC - add r1, sp - ldr r1, [r1] - cmp r7, r1 - bge _0807D916 - mov r2, r9 - lsls r2, 24 - mov r8, r2 -_0807D8B0: - movs r0, 0x74 - adds r5, r7, 0 - muls r5, r0 - mov r4, sp - adds r4, r5 - adds r4, 0x4 - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807D90A - movs r0, 0xC2 - lsls r0, 4 - add r0, sp - lsls r2, r7, 3 - adds r0, r2 - ldr r1, [r0] - ldr r0, _0807D9C0 - add r0, sp - adds r0, r2 - ldr r2, [r0] - adds r0, r4, 0 - bl IncreaseEntityPixelPos - mov r0, r10 - bl sin_4096 - add r2, sp, 0x20 - adds r2, r5 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - str r1, [r2] - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - ldr r3, _0807D9D0 - add r3, sp - ldr r1, [r3] - movs r2, 0 - mov r4, r8 - lsrs r3, r4, 24 - bl sub_80462AC -_0807D90A: - adds r7, 0x1 - ldr r5, _0807D9BC - add r5, sp - ldr r5, [r5] - cmp r7, r5 - blt _0807D8B0 -_0807D916: - movs r0, 0x13 - bl sub_803E46C - ldr r0, _0807D9D4 - add r0, sp - ldr r0, [r0] - mov r10, r0 - movs r0, 0x3 - ands r0, r6 - cmp r0, 0 - bne _0807D930 - movs r1, 0x1 - add r9, r1 -_0807D930: - movs r0, 0x7 - mov r2, r9 - ands r2, r0 - mov r9, r2 - ldr r3, _0807D9D8 - add r3, sp - ldr r6, [r3] - cmp r6, 0x3B - ble _0807D88C - movs r7, 0 - ldr r4, _0807D9BC - add r4, sp - ldr r4, [r4] - cmp r7, r4 - bge _0807D996 -_0807D94E: - ldr r0, _0807D9B8 - add r0, sp - lsls r1, r7, 2 - adds r4, r0, r1 - movs r5, 0 - ldrsh r0, [r4, r5] - cmp r0, 0 - blt _0807D98A - movs r0, 0x74 - muls r0, r7 - add r0, sp - adds r0, 0x4 - bl GetItemData - adds r1, r0, 0 - adds r0, r4, 0 - movs r2, 0x1 - bl sub_80460F8 - movs r1, 0 - ldrsh r0, [r4, r1] - movs r2, 0x2 - ldrsh r1, [r4, r2] - bl sub_80402AC - movs r3, 0x1 - movs r4, 0xD1 - lsls r4, 4 - add r4, sp - str r3, [r4] -_0807D98A: - adds r7, 0x1 - ldr r5, _0807D9BC - add r5, sp - ldr r5, [r5] - cmp r7, r5 - blt _0807D94E -_0807D996: - movs r0, 0xD1 - lsls r0, 4 - add r0, sp - ldr r0, [r0] - cmp r0, 0 - beq _0807D9E0 - ldr r0, _0807D9DC - ldr r1, [r0] - ldr r2, _0807D9C4 - add r2, sp - ldr r0, [r2] - bl LogMessageByIdWithPopupCheckUser - b _0807D9EE - .align 2, 0 -_0807D9B4: .4byte gUnknown_80F4468 -_0807D9B8: .4byte 0x00000bbc -_0807D9BC: .4byte 0x00000d0c -_0807D9C0: .4byte 0x00000c24 -_0807D9C4: .4byte 0x00000d08 -_0807D9C8: .4byte gDungeon -_0807D9CC: .4byte 0x00018210 -_0807D9D0: .4byte 0x00000d14 -_0807D9D4: .4byte 0x00000d1c -_0807D9D8: .4byte 0x00000d24 -_0807D9DC: .4byte gUnknown_80FE060 -_0807D9E0: - ldr r0, _0807DA08 - ldr r1, [r0] - ldr r3, _0807DA0C - add r3, sp - ldr r0, [r3] - bl LogMessageByIdWithPopupCheckUser -_0807D9EE: - movs r0, 0x1 - bl sub_807EC28 -_0807D9F4: - ldr r3, _0807DA10 - add sp, r3 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0807DA08: .4byte gUnknown_80FE034 -_0807DA0C: .4byte 0x00000d08 -_0807DA10: .4byte 0x00000d2c - thumb_func_end sub_807D510 - - thumb_func_start sub_807DA14 -sub_807DA14: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - adds r5, r0, 0 - adds r6, r1, 0 - lsls r2, 24 - lsrs r4, r2, 24 - ldr r0, [r6, 0x70] - mov r10, r0 - adds r0, r6, 0 - movs r1, 0xE - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _0807DA50 - ldr r0, _0807DA48 - adds r1, r6, 0 - movs r2, 0 - bl SubstitutePlaceholderStringTags - ldr r0, _0807DA4C - b _0807DA5C - .align 2, 0 -_0807DA48: .4byte gFormatBuffer_Monsters -_0807DA4C: .4byte gUnknown_80FCB98 -_0807DA50: - bl IsCurrentFixedRoomBossFight - lsls r0, 24 - cmp r0, 0 - beq _0807DA6C - ldr r0, _0807DA68 -_0807DA5C: - ldr r2, [r0] - adds r0, r5, 0 - adds r1, r6, 0 - bl TryDisplayDungeonLoggableMessage3 - b _0807DB5E - .align 2, 0 -_0807DA68: .4byte gUnknown_80FC9C0 -_0807DA6C: - cmp r4, 0x8 - bne _0807DA76 - mov r0, r10 - adds r0, 0x46 - ldrb r4, [r0] -_0807DA76: - adds r0, r6, 0 - movs r1, 0x6 - adds r2, r4, 0 - bl sub_806CDD4 - lsls r1, r4, 2 - adds r2, r6, 0x4 - mov r9, r2 - ldr r0, _0807DAFC - adds r1, r0 - mov r8, r1 -_0807DA8C: - ldrh r0, [r6, 0x4] - mov r3, r8 - ldrh r3, [r3] - adds r0, r3 - lsls r0, 16 - ldrh r1, [r6, 0x6] - mov r2, r8 - ldrh r2, [r2, 0x2] - adds r1, r2 - lsls r1, 16 - lsrs r7, r0, 16 - orrs r7, r1 - lsls r0, r7, 16 - asrs r5, r0, 16 - cmp r5, 0 - ble _0807DB00 - asrs r4, r7, 16 - cmp r4, 0 - ble _0807DB00 - cmp r5, 0x36 - bgt _0807DB00 - cmp r4, 0x1E - bgt _0807DB00 - adds r0, r5, 0 - adds r1, r4, 0 - bl GetTile - adds r1, r0, 0 - ldr r0, [r1, 0x10] - cmp r0, 0 - bne _0807DB00 - ldrh r1, [r1] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - beq _0807DB00 - adds r0, r6, 0 - adds r1, r5, 0 - adds r2, r4, 0 - movs r3, 0 - bl sub_80694C0 - adds r0, r6, 0 - movs r1, 0 - bl sub_804535C - adds r0, r6, 0 - bl sub_8045888 - lsls r0, 24 - cmp r0, 0 - beq _0807DA8C - movs r0, 0x3A - bl sub_803E46C - b _0807DA8C - .align 2, 0 -_0807DAFC: .4byte gAdjacentTileOffsets -_0807DB00: - adds r0, r6, 0 - bl sub_806A5B8 - mov r1, r9 - adds r0, r6, 0 - bl sub_80706A4 - lsls r0, 24 - cmp r0, 0 - beq _0807DB20 - adds r0, r6, 0 - adds r1, r6, 0 - movs r2, 0 - movs r3, 0 - bl sub_807D148 -_0807DB20: - adds r0, r6, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807DB5E - adds r0, r6, 0 - movs r1, 0x8 - bl sub_806CE68 - mov r3, r10 - ldrb r0, [r3, 0x7] - cmp r0, 0 - beq _0807DB48 - mov r0, r9 - bl sub_804AC20 - movs r0, 0 - bl sub_807EC28 -_0807DB48: - adds r0, r6, 0 - bl sub_806A5B8 - ldr r0, _0807DB6C - ldr r0, [r0] - ldr r1, _0807DB70 - adds r0, r1 - ldrb r1, [r0] - adds r0, r6, 0 - bl sub_8075900 -_0807DB5E: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0807DB6C: .4byte gDungeon -_0807DB70: .4byte 0x00003a08 - thumb_func_end sub_807DA14 - - thumb_func_start sub_807DB74 -sub_807DB74: - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - adds r7, r0, 0 - movs r0, 0 - mov r8, r0 - bl IsCurrentFixedRoomBossFight - lsls r0, 24 - cmp r0, 0 - beq _0807DB94 - ldr r0, _0807DB90 - b _0807DBA0 - .align 2, 0 -_0807DB90: .4byte gUnknown_80FD060 -_0807DB94: - bl IsWaterTileset - lsls r0, 24 - cmp r0, 0 - beq _0807DBB0 - ldr r0, _0807DBAC -_0807DBA0: - ldr r1, [r0] - adds r0, r7, 0 - bl LogMessageByIdWithPopupCheckUser - b _0807DC54 - .align 2, 0 -_0807DBAC: .4byte gUnknown_80FD08C -_0807DBB0: - movs r5, 0 - ldr r0, _0807DC24 - adds r6, r0, 0 -_0807DBB6: - movs r4, 0 -_0807DBB8: - adds r0, r4, 0 - adds r1, r5, 0 - bl GetTileMut - adds r2, r0, 0 - ldrh r1, [r2] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0x2 - bne _0807DBE2 - adds r0, r1, 0 - ands r0, r6 - movs r1, 0x1 - orrs r0, r1 - strh r0, [r2] - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80498A8 - movs r1, 0x1 - mov r8, r1 -_0807DBE2: - adds r4, 0x1 - cmp r4, 0x37 - ble _0807DBB8 - adds r5, 0x1 - cmp r5, 0x1F - ble _0807DBB6 - movs r5, 0 -_0807DBF0: - movs r4, 0 - adds r6, r5, 0x1 -_0807DBF4: - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8049BB0 - adds r4, 0x1 - cmp r4, 0x37 - ble _0807DBF4 - adds r5, r6, 0 - cmp r5, 0x1F - ble _0807DBF0 - mov r0, r8 - cmp r0, 0 - beq _0807DC30 - ldr r1, _0807DC28 - adds r0, r7, 0 - bl sub_80421C0 - ldr r0, _0807DC2C - ldr r1, [r0] - adds r0, r7, 0 - bl LogMessageByIdWithPopupCheckUser - b _0807DC3A - .align 2, 0 -_0807DC24: .4byte 0x0000fffc -_0807DC28: .4byte 0x000001a1 -_0807DC2C: .4byte gUnknown_80FD05C -_0807DC30: - ldr r0, _0807DC60 - ldr r1, [r0] - adds r0, r7, 0 - bl LogMessageByIdWithPopupCheckUser -_0807DC3A: - ldr r0, _0807DC64 - ldr r0, [r0] - movs r1, 0xCE - lsls r1, 3 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - bl sub_806CF60 - bl sub_8040A84 - bl sub_8049ED4 -_0807DC54: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0807DC60: .4byte gUnknown_80FD060 -_0807DC64: .4byte gDungeon - thumb_func_end sub_807DB74 - - thumb_func_start sub_807DC68 -sub_807DC68: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - mov r9, r0 - ldr r0, _0807DC88 - ldr r1, [r0] - ldr r2, _0807DC8C - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0 - beq _0807DC94 - ldr r0, _0807DC90 - b _0807DCB8 - .align 2, 0 -_0807DC88: .4byte gDungeon -_0807DC8C: .4byte 0x00003a08 -_0807DC90: .4byte gUnknown_80FD3C8 -_0807DC94: - ldr r3, _0807DCA4 - adds r0, r1, r3 - ldrb r0, [r0] - cmp r0, 0 - beq _0807DCAC - ldr r0, _0807DCA8 - b _0807DCB8 - .align 2, 0 -_0807DCA4: .4byte 0x00003a0b -_0807DCA8: .4byte gUnknown_80FD3CC -_0807DCAC: - bl IsBossFight - lsls r0, 24 - cmp r0, 0 - beq _0807DCC8 - ldr r0, _0807DCC4 -_0807DCB8: - ldr r1, [r0] - mov r0, r9 - bl LogMessageByIdWithPopupCheckUser - b _0807DF0E - .align 2, 0 -_0807DCC4: .4byte gUnknown_80FD3D0 -_0807DCC8: - movs r0, 0 - mov r8, r0 - movs r5, 0x1 - movs r1, 0 - mov r10, r1 - ldr r2, _0807DD68 - adds r7, r2, 0 -_0807DCD6: - movs r4, 0x1 -_0807DCD8: - movs r6, 0 - adds r0, r5, 0 - adds r1, r4, 0 - bl GetTileMut - adds r2, r0, 0 - ldrh r1, [r2] - ldr r3, _0807DD6C - adds r0, r3, 0 - adds r3, r1, 0 - ands r3, r0 - strh r3, [r2] - mov r0, r10 - strb r0, [r2, 0x9] - movs r0, 0x10 - ands r0, r3 - cmp r0, 0 - bne _0807DD94 - movs r0, 0x80 - lsls r0, 1 - adds r1, r0, 0 - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - bne _0807DD94 - ldrh r0, [r2, 0x4] - movs r1, 0x3 - orrs r0, r1 - strh r0, [r2, 0x4] - ldr r1, _0807DD70 - adds r0, r1, 0 - adds r1, r3, 0 - ands r1, r0 - strh r1, [r2] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0807DD28 - movs r3, 0x1 - mov r8, r3 -_0807DD28: - movs r0, 0x3 - ands r0, r1 - cmp r0, 0x2 - beq _0807DD94 - cmp r0, 0x3 - beq _0807DD94 - cmp r5, 0x1 - beq _0807DD44 - cmp r4, 0x1 - beq _0807DD44 - cmp r5, 0x36 - beq _0807DD44 - cmp r4, 0x1E - bne _0807DD5C -_0807DD44: - ldr r0, [r2, 0x14] - cmp r0, 0 - bne _0807DD5C - ldr r0, _0807DD74 - ldr r0, [r0] - movs r1, 0xCE - lsls r1, 3 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _0807DD5C - movs r6, 0x1 -_0807DD5C: - cmp r6, 0 - beq _0807DD78 - ldrh r0, [r2] - ands r0, r7 - movs r1, 0x2 - b _0807DD90 - .align 2, 0 -_0807DD68: .4byte 0x0000fffc -_0807DD6C: .4byte 0x0000fbff -_0807DD70: .4byte 0x0000fff7 -_0807DD74: .4byte gDungeon -_0807DD78: - ldrh r1, [r2] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0x1 - beq _0807DD94 - adds r0, r1, 0 - ands r0, r7 - movs r1, 0x1 - orrs r0, r1 - movs r3, 0x80 - lsls r3, 3 - adds r1, r3, 0 -_0807DD90: - orrs r0, r1 - strh r0, [r2] -_0807DD94: - adds r4, 0x1 - cmp r4, 0x1E - ble _0807DCD8 - adds r5, 0x1 - cmp r5, 0x36 - ble _0807DCD6 - ldr r0, _0807DF1C - ldr r1, [r0] - ldr r2, _0807DF20 - adds r0, r1, r2 - movs r3, 0 - ldrsh r0, [r0, r3] - adds r2, 0x2 - adds r1, r2 - movs r3, 0 - ldrsh r1, [r1, r3] - movs r2, 0x1 - bl StairsAlwaysReachable - lsls r0, 24 - cmp r0, 0 - beq _0807DE02 - movs r5, 0 - movs r6, 0x84 - lsls r6, 8 - movs r7, 0 -_0807DDC8: - movs r4, 0 -_0807DDCA: - adds r0, r5, 0 - adds r1, r4, 0 - bl GetTileMut - adds r2, r0, 0 - ldrh r1, [r2] - movs r3, 0x80 - lsls r3, 1 - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - bne _0807DDF6 - adds r0, r6, 0 - ands r0, r1 - cmp r0, r6 - bne _0807DDF6 - ldr r3, _0807DF24 - adds r0, r3, 0 - ands r0, r1 - movs r1, 0x2 - orrs r0, r1 - strh r0, [r2] -_0807DDF6: - adds r4, 0x1 - cmp r4, 0x1F - ble _0807DDCA - adds r5, 0x1 - cmp r5, 0x37 - ble _0807DDC8 -_0807DE02: - mov r0, r8 - cmp r0, 0 - beq _0807DE14 - ldr r0, _0807DF1C - ldr r0, [r0] - ldr r1, _0807DF28 - adds r0, r1 - movs r1, 0 - strb r1, [r0] -_0807DE14: - movs r5, 0 -_0807DE16: - movs r4, 0 - adds r6, r5, 0x1 -_0807DE1A: - mov r2, r8 - cmp r2, 0 - beq _0807DE30 - adds r0, r5, 0 - adds r1, r4, 0 - bl GetTileMut - ldrh r2, [r0] - movs r1, 0x40 - orrs r1, r2 - strh r1, [r0] -_0807DE30: - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8049BB0 - adds r4, 0x1 - cmp r4, 0x1F - ble _0807DE1A - adds r5, r6, 0 - cmp r5, 0x37 - ble _0807DE16 - movs r5, 0 -_0807DE46: - ldr r0, _0807DF1C - ldr r0, [r0] - lsls r1, r5, 2 - ldr r3, _0807DF2C - adds r0, r3 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807DE74 - movs r1, 0x4 - ldrsh r0, [r4, r1] - movs r2, 0x6 - ldrsh r1, [r4, r2] - bl GetTile - ldrb r1, [r0, 0x9] - adds r0, r4, 0 - adds r0, 0x25 - strb r1, [r0] -_0807DE74: - adds r5, 0x1 - cmp r5, 0x13 - ble _0807DE46 - bl sub_804EB30 - bl sub_804AAD4 - bl sub_8049884 - bl sub_806CF60 - bl sub_8040A84 - bl sub_8049ED4 - ldr r0, _0807DF30 - ldr r1, [r0] - mov r0, r9 - bl LogMessageByIdWithPopupCheckUser - movs r0, 0x28 - movs r1, 0x2B - bl sub_803E708 - mov r0, r9 - movs r1, 0x1 - bl sub_8075900 - movs r5, 0 -_0807DEAE: - ldr r0, _0807DF1C - ldr r0, [r0] - lsls r1, r5, 2 - ldr r3, _0807DF2C - adds r0, r3 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807DEF4 - adds r0, r4, 0 - bl sub_806A5B8 - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807DEF4 - adds r1, r4, 0x4 - adds r0, r4, 0 - bl sub_80706A4 - lsls r0, 24 - cmp r0, 0 - beq _0807DEF4 - adds r0, r4, 0 - adds r1, r4, 0 - movs r2, 0 - movs r3, 0 - bl sub_807D148 -_0807DEF4: - adds r5, 0x1 - cmp r5, 0x13 - ble _0807DEAE - ldr r0, _0807DF1C - ldr r0, [r0] - ldr r1, _0807DF34 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - movs r0, 0x14 - movs r1, 0x2B - bl sub_803E708 -_0807DF0E: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0807DF1C: .4byte gDungeon -_0807DF20: .4byte 0x0000e21c -_0807DF24: .4byte 0x0000fffc -_0807DF28: .4byte 0x00003a0c -_0807DF2C: .4byte 0x000135cc -_0807DF30: .4byte gUnknown_80FD3A0 -_0807DF34: .4byte 0x00003a08 - thumb_func_end sub_807DC68 - - thumb_func_start sub_807DF38 -sub_807DF38: - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x20 - str r0, [sp, 0x8] - mov r10, r1 - str r2, [sp, 0xC] - adds r6, r3, 0 - ldr r0, [sp, 0x40] - ldr r1, [sp, 0x44] - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x10] - lsls r1, 16 - asrs r1, 16 - str r1, [sp, 0x14] - movs r5, 0 - b _0807DF62 -_0807DF60: - adds r5, 0x1 -_0807DF62: - cmp r5, 0x13 - bgt _0807DF8E - ldr r0, _0807DFA8 - ldr r0, [r0] - lsls r1, r5, 2 - ldr r2, _0807DFAC - adds r0, r2 - adds r0, r1 - ldr r4, [r0] - adds r0, r4, 0 - bl EntityExists - lsls r0, 24 - cmp r0, 0 - beq _0807DF60 - adds r0, r4, 0 - movs r1, 0x15 - bl HasAbility - lsls r0, 24 - cmp r0, 0 - beq _0807DF60 -_0807DF8E: - cmp r5, 0x14 - beq _0807DFB4 - ldr r0, [sp, 0x8] - mov r1, r10 - bl sub_804218C - ldr r0, _0807DFB0 - mov r1, r10 - movs r2, 0 - bl SubstitutePlaceholderStringTags - b _0807DFC2 - .align 2, 0 -_0807DFA8: .4byte gDungeon -_0807DFAC: .4byte 0x000135cc -_0807DFB0: .4byte gFormatBuffer_Monsters -_0807DFB4: - mov r0, r10 - bl GetApparentWeather - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - bne _0807DFD4 -_0807DFC2: - ldr r0, _0807DFD0 - ldr r2, [r0] - ldr r0, [sp, 0x8] - mov r1, r10 - bl TryDisplayDungeonLoggableMessage3 - b _0807E174 - .align 2, 0 -_0807DFD0: .4byte gUnknown_80F96EC -_0807DFD4: - ldr r0, [sp, 0x8] - mov r1, r10 - adds r2, r6, 0 - bl sub_804216C - ldr r0, _0807E184 - mov r1, r10 - movs r2, 0 - bl SubstitutePlaceholderStringTags - ldr r0, _0807E188 - ldr r2, [r0] - ldr r0, [sp, 0x8] - mov r1, r10 - bl TryDisplayDungeonLoggableMessage3 - movs r5, 0 - ldr r0, _0807E18C - lsls r1, r6, 2 - adds r0, r1, r0 - ldr r0, [r0] - mov r9, r0 - ldrh r4, [r0] - movs r3, 0 - ldrsh r0, [r0, r3] - str r1, [sp, 0x1C] - cmp r0, 0x63 - bne _0807E00E - b _0807E124 -_0807E00E: - mov r0, sp - adds r0, 0x4 - str r0, [sp, 0x18] -_0807E014: - ldr r1, [sp, 0xC] - ldrh r0, [r1] - adds r0, r4, r0 - lsls r0, 16 - lsrs r0, 16 - ldr r2, _0807E190 - ldr r1, [sp, 0x4] - ands r1, r2 - orrs r1, r0 - str r1, [sp, 0x4] - ldr r2, [sp, 0xC] - ldrh r0, [r2, 0x2] - mov r3, r9 - ldrh r3, [r3, 0x2] - adds r0, r3 - lsls r0, 16 - ldr r2, _0807E194 - ands r2, r1 - orrs r2, r0 - str r2, [sp, 0x4] - ldr r1, [sp, 0x18] - movs r3, 0 - ldrsh r0, [r1, r3] - cmp r0, 0 - blt _0807E112 - asrs r1, r2, 16 - cmp r1, 0 - blt _0807E112 - cmp r0, 0x37 - bgt _0807E112 - cmp r1, 0x1F - bgt _0807E112 - bl GetTileMut - mov r8, r0 - ldr r0, [sp, 0x18] - movs r2, 0 - ldrsh r1, [r0, r2] - cmp r1, 0 - ble _0807E0BE - ldr r0, [sp, 0x4] - asrs r0, 16 - cmp r0, 0 - ble _0807E0BE - cmp r1, 0x36 - bgt _0807E0BE - cmp r0, 0x1E - bgt _0807E0BE - mov r3, r8 - ldrh r1, [r3] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - bne _0807E0BE - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - bne _0807E0BE - ldr r2, _0807E198 - adds r0, r2, 0 - ands r0, r1 - movs r1, 0x1 - orrs r0, r1 - strh r0, [r3] - movs r5, 0x1 - negs r5, r5 - add r7, sp, 0x4 -_0807E09A: - movs r4, 0x1 - negs r4, r4 - adds r6, r5, 0x1 -_0807E0A0: - movs r3, 0 - ldrsh r0, [r7, r3] - adds r0, r4 - ldr r1, [sp, 0x4] - asrs r1, 16 - adds r1, r5 - bl sub_80498A8 - adds r4, 0x1 - cmp r4, 0x1 - ble _0807E0A0 - adds r5, r6, 0 - cmp r5, 0x1 - ble _0807E09A - movs r5, 0x1 -_0807E0BE: - mov r0, r8 - ldr r4, [r0, 0x14] - cmp r4, 0 - beq _0807E0DC - cmp r4, r10 - beq _0807E0DC - adds r0, r4, 0 - bl GetEntityType - cmp r0, 0x3 - bne _0807E0DC - add r0, sp, 0x4 - movs r1, 0 - bl sub_80461C8 -_0807E0DC: - mov r1, r8 - ldr r4, [r1, 0x10] - cmp r4, 0 - beq _0807E112 - cmp r4, r10 - beq _0807E112 - adds r0, r4, 0 - bl GetEntityType - cmp r0, 0x1 - bne _0807E112 - ldr r0, _0807E19C - ldr r2, [sp, 0x1C] - adds r0, r2, r0 - ldr r0, [r0] - str r0, [sp] - ldr r0, [sp, 0x8] - adds r1, r4, 0 - ldr r2, [sp, 0x10] - ldr r3, [sp, 0x14] - bl sub_807E1A0 - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _0807E124 -_0807E112: - movs r3, 0x4 - add r9, r3 - mov r0, r9 - ldrh r4, [r0] - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0x63 - beq _0807E124 - b _0807E014 -_0807E124: - bl sub_8044B28 - lsls r0, 24 - cmp r0, 0 - bne _0807E174 - mov r0, r10 - bl GetEntityType - cmp r0, 0x1 - bne _0807E14E - ldr r0, _0807E19C - ldr r2, [sp, 0x1C] - adds r0, r2, r0 - ldr r0, [r0] - str r0, [sp] - ldr r0, [sp, 0x8] - mov r1, r10 - ldr r2, [sp, 0x10] - ldr r3, [sp, 0x14] - bl sub_807E1A0 -_0807E14E: - cmp r5, 0 - beq _0807E174 - movs r5, 0 -_0807E154: - movs r4, 0 - adds r6, r5, 0x1 -_0807E158: - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8049BB0 - adds r4, 0x1 - cmp r4, 0x37 - ble _0807E158 - adds r5, r6, 0 - cmp r5, 0x1F - ble _0807E154 - bl sub_8040A84 - bl sub_8049ED4 -_0807E174: - add sp, 0x20 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0807E184: .4byte gFormatBuffer_Monsters -_0807E188: .4byte gUnknown_80F96BC -_0807E18C: .4byte gUnknown_8107178 -_0807E190: .4byte 0xffff0000 -_0807E194: .4byte 0x0000ffff -_0807E198: .4byte 0x0000fffc -_0807E19C: .4byte gUnknown_203B444 - thumb_func_end sub_807DF38 - - .align 2, 0 diff --git a/asm/code_807E5AC.s b/asm/code_807E5AC.s index 084893b9e..f8426f4b8 100644 --- a/asm/code_807E5AC.s +++ b/asm/code_807E5AC.s @@ -1034,7 +1034,7 @@ _0807EEA0: adds r1, r5, 0 movs r2, 0x3 adds r3, r6, 0 - bl sub_807D148 + bl WarpTarget b _0807EE72 _0807EEAE: movs r6, 0 @@ -2301,7 +2301,7 @@ _0807F8BE: mov r1, r8 movs r2, 0 movs r3, 0 - bl sub_807D148 + bl WarpTarget b _0807F8FA .align 2, 0 _0807F8D0: .4byte gAdjacentTileOffsets diff --git a/data/data_8107010.s b/data/data_8107010.s index 90934e658..a129b8916 100644 --- a/data/data_8107010.s +++ b/data/data_8107010.s @@ -48,7 +48,7 @@ gUnknown_810702C: @ 810702C .string "pksdir0\0" .string "pksdir0\0" .string "pksdir0\0" -@ sub_807DF38 +@ HandleExplosion .string "pksdir0\0" .global gUnknown_81070E8 diff --git a/include/code_807CD9C.h b/include/code_807CD9C.h index e61d18766..380747ec2 100644 --- a/include/code_807CD9C.h +++ b/include/code_807CD9C.h @@ -1,8 +1,8 @@ #ifndef CODE_807CD9C_H #define CODE_807CD9C_H -void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction); -void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos); +void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction); +void WarpTarget(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos); void sub_807D3CC(Entity *param_1); #endif /* ifndef CODE_807CD9C_H */ diff --git a/include/constants/dungeon_action.h b/include/constants/dungeon_action.h index bd209b2d0..7ffe68b7d 100644 --- a/include/constants/dungeon_action.h +++ b/include/constants/dungeon_action.h @@ -31,6 +31,7 @@ enum DungeonAction ACTION_UNK21 = 0x21, ACTION_EAT_AI = 0x23, ACTION_THROW_ITEM_AI = 0x24, + ACTION_STEPPED_ON_TRAP = 0x25, ACTION_STAIRS = 0x26, ACTION_THROW_STRAIGHT_PLAYER = 0x27, ACTION_USE_LINK_BOX = 0x2C, diff --git a/include/dungeon_action.h b/include/dungeon_action.h index c9127eda6..d8acfa2f8 100644 --- a/include/dungeon_action.h +++ b/include/dungeon_action.h @@ -3,6 +3,7 @@ #include "structs/dungeon_entity.h" +void sub_8044C50(u16 action); void ClearMonsterActionFields(ActionContainer *actionPointer); void SetMonsterActionFields(ActionContainer *actionPointer, u16 action); void SetActionPassTurnOrWalk(ActionContainer *actionPointer, s16 species); diff --git a/include/dungeon_map_access.h b/include/dungeon_map_access.h index 3fe6c492e..71532776d 100644 --- a/include/dungeon_map_access.h +++ b/include/dungeon_map_access.h @@ -9,4 +9,19 @@ Tile *GetTileMut(s32 x, s32 y); void sub_8049ED4(void); void sub_804AC20(DungeonPos *pos); +void sub_80495E4(void); +void LoadDungeonTilesetAssets(void); +void sub_8049820(void); +void sub_8049840(void); +void sub_8049884(void); +void sub_80498A8(s32 x, s32 y); +void sub_8049B8C(void); +void sub_8049BB0(s32 x, s32 y); +void sub_804A1F0(s32 a0, s32 a1); +void sub_804A49C(s32 a0, s32 a1); +void sub_804A728(DungeonPos *pos, s32 a1, u8 a2, u8 a3); +void sub_804AA60(void); +void sub_804AAAC(void); +void sub_804AAD4(void); + #endif // GUARD_DUNGEON_MAP_ACCESS_H diff --git a/include/move_effects_target.h b/include/move_effects_target.h index 6c12cbf88..e2b6d0544 100644 --- a/include/move_effects_target.h +++ b/include/move_effects_target.h @@ -4,7 +4,7 @@ #include "structs/dungeon_entity.h" u8 sub_8075BF4(Entity * pokemon, s32 sleepClassStatusTurns); -void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, bool8 displayMessage); +void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, bool8 displayMessage); bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMessage); void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns); void NappingStatusTarget(Entity * pokemon, Entity * target, s32 turns); diff --git a/include/status_actions.h b/include/status_actions.h index 1632e96b8..74add8fdd 100644 --- a/include/status_actions.h +++ b/include/status_actions.h @@ -4,50 +4,49 @@ #include "constants/move.h" #include "structs/dungeon_entity.h" -bool8 sub_805B668(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 sub_805B734(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 RecycleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 ReflectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805B808(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805B884(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DragonDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 SkullBashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805B910(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805B968(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 StruggleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 sub_805BA44(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805BA50(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 sub_805BB64(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805BB74(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805BB98(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SwitcherOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 StayawayOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 CleanseOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); -bool8 sub_805BC70(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805BC98(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SlumberOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TwoEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 SilenceOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); bool8 ScannerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 RadarOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 TransferOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); -bool8 sub_805BE90(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SlowDownMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 LuminousOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); bool8 PetrifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805BEB8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805BEC8(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PounceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TrawlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 EscapeOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); -bool8 sub_805BF34(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DroughtOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 TrapbustOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); -bool8 sub_805C080(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C128(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C138(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RollcallOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 OneShotOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C1E4(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 ShockerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4); bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 OneRoomOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); bool8 sub_805C3DC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C3F8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C45C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HurlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 MobileOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 StairsOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 LongtossOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); diff --git a/include/structs/map.h b/include/structs/map.h index 1d10fc4fc..8e98ced99 100644 --- a/include/structs/map.h +++ b/include/structs/map.h @@ -26,6 +26,8 @@ enum TerrainType TERRAIN_TYPE_UNK_x400 = 1 << 10, TERRAIN_TYPE_UNK_x800 = 1 << 11, TERRAIN_TYPE_UNK_x1000 = 1 << 12, + TERRAIN_TYPE_UNK_x2000 = 1 << 13, + TERRAIN_TYPE_UNK_x4000 = 1 << 14, TERRAIN_TYPE_UNREACHABLE_FROM_STAIRS = 1 << 15, // 0x8000 }; diff --git a/include/trap.h b/include/trap.h index e6a6ad899..767eaba30 100644 --- a/include/trap.h +++ b/include/trap.h @@ -11,7 +11,7 @@ bool8 sub_807FD84(Entity *entity); bool8 sub_807FE04(DungeonPos *pos, char param_2); bool8 sub_807FE44(DungeonPos *pos, char param_2); void GetTrapName(u8 *buffer, u8 trapIndex); -void sub_807FE9C(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); +void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); void HandleMudTrap(Entity *pokemon, Entity *target); void HandleStickyTrap(Entity *pokemon, Entity *target); void HandleGrimyTrap(Entity *pokemon, Entity *target); @@ -26,6 +26,8 @@ void HandleSelfdestructTrap(Entity *pokemon, Entity *target); void HandleExplosionTrap(Entity *pokemon, Entity *target); void HandlePPZeroTrap(Entity *pokemon, Entity *target); void HandleWonderTile(Entity *pokemon, Entity *target); +void HandleSealTrap(Entity *pokemon, Entity *target); +void HandleWhirlwindTrap(Entity *entity, Entity *target); // code_807FCD4.s extern void HandleSealTrap(Entity *pokemon, Entity *target); diff --git a/ld_script.txt b/ld_script.txt index 9dcc39f80..3d8fd85cd 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -268,7 +268,6 @@ SECTIONS { src/dungeon_ai_attack.o(.text); src/targeting_flags.o(.text); src/code_807CD9C.o(.text); - asm/code_807CD9C.o(.text); src/code_807E1A0.o(.text); src/weather.o(.text); asm/code_807E5AC.o(.text); diff --git a/src/called_move_data.c b/src/called_move_data.c index f83ab7cd3..ba28f735d 100644 --- a/src/called_move_data.c +++ b/src/called_move_data.c @@ -2,300 +2,300 @@ #include "called_move_data.h" #include "constants/move_id.h" -extern bool8 sub_8057634(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 YawnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 NightmareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805783C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057974(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PainSplitMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057BC4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057C88(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 WhirlpoolMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057D7C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057D9C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FakeTearsMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SpiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057FCC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057FF4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805805C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805816C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80582C4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80583D8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058430(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058478(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80584C0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058548(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ReturnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058638(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80586DC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058770(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80587E8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058838(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058858(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80588B8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80588F4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058930(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058A18(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058BF0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 GigaDrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ReversalMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SmellingSaltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058FBC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80590D4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059190(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80591E4(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059424(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805946C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059540(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80595A0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80598CC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059928(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059988(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059AA8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059AB8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059AF8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059D00(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059D48(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059D98(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059DA4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059DB4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059DC4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059E0C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A120(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A210(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A258(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A3DC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A464(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A688(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD04(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD34(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD54(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AE3C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AE74(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AECC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AFA4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B028(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B074(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B0BC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B264(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B324(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B388(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B3E0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B454(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B53C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B668(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B910(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B808(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A408(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 HandleRegularDamagingMove(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059050(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); // Todo: move this data to some better place once the file structure is better understood // These are random const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES] = { - {MOVE_IRON_TAIL, sub_8057634}, + {MOVE_IRON_TAIL, IronTailMoveAction}, {MOVE_YAWN, YawnMoveAction}, {MOVE_NIGHTMARE, NightmareMoveAction}, - {MOVE_CHARM, sub_805783C}, + {MOVE_CHARM, CharmMoveAction}, {MOVE_ENCORE, EncoreMoveAction}, - {MOVE_SUPER_FANG, sub_8057974}, + {MOVE_SUPER_FANG, SuperFangMoveAction}, {MOVE_PAIN_SPLIT, PainSplitMoveAction}, {MOVE_TORMENT, TormentMoveAction}, - {MOVE_SWAGGER, sub_8057BC4}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_SWAGGER, SwaggerMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_WHIRLPOOL, WhirlpoolMoveAction}, - {MOVE_FAKE_TEARS, sub_8057D7C}, - {MOVE_SPITE, sub_8057D9C}, + {MOVE_FAKE_TEARS, FakeTearsMoveAction}, + {MOVE_SPITE, SpiteMoveAction}, {MOVE_SMOKESCREEN, SmokescreenMoveAction}, - {MOVE_FLATTER, sub_8057FCC}, - {MOVE_WILL_O_WISP, sub_8057FF4}, - {MOVE_RETURN, sub_805805C}, - {MOVE_FLAME_WHEEL, sub_805816C}, - {MOVE_GUST, sub_8058270}, - {MOVE_DISABLE, sub_80582C4}, - {MOVE_CRUNCH, sub_80583D8}, - {MOVE_BITE, sub_8058430}, - {MOVE_THUNDER, sub_8058478}, - {MOVE_ENDEAVOR, sub_80584C0}, - {MOVE_FACADE, sub_8058548}, + {MOVE_FLATTER, FlatterMoveAction}, + {MOVE_WILL_O_WISP, WillOWispMoveAction}, + {MOVE_RETURN, ReturnMoveAction}, + {MOVE_FLAME_WHEEL, FlameWheelMoveAction}, + {MOVE_GUST, GustMoveAction}, + {MOVE_DISABLE, DisableMoveAction}, + {MOVE_CRUNCH, ShadowBallMoveAction}, + {MOVE_BITE, BiteMoveAction}, + {MOVE_THUNDER, ThunderMoveAction}, + {MOVE_ENDEAVOR, EndeavorMoveAction}, + {MOVE_FACADE, FacadeMoveAction}, {MOVE_CONSTRICT, sub_8058580}, {MOVE_BRICK_BREAK, BrickBreakMoveAction}, - {MOVE_ROCK_TOMB, sub_8058638}, - {MOVE_GIGA_DRAIN, sub_80586DC}, - {MOVE_REVERSAL, sub_8058770}, - {MOVE_SMELLINGSALT, sub_80587E8}, - {MOVE_METAL_SOUND, sub_8058838}, - {MOVE_TICKLE, sub_8058858}, - {MOVE_OUTRAGE, sub_80588B8}, - {MOVE_LOW_KICK, sub_80588F4}, - {MOVE_ANCIENTPOWER, sub_8058930}, - {MOVE_RAPID_SPIN, sub_8058A18}, - {MOVE_SCARY_FACE, sub_8058BF0}, + {MOVE_ROCK_TOMB, RockTombMoveAction}, + {MOVE_GIGA_DRAIN, GigaDrainMoveAction}, + {MOVE_REVERSAL, ReversalMoveAction}, + {MOVE_SMELLINGSALT, SmellingSaltMoveAction}, + {MOVE_METAL_SOUND, MetalSoundMoveAction}, + {MOVE_TICKLE, TickleMoveAction}, + {MOVE_OUTRAGE, OutrageMoveAction}, + {MOVE_LOW_KICK, LowKickMoveAction}, + {MOVE_ANCIENTPOWER, AncientPowerMoveAction}, + {MOVE_RAPID_SPIN, RapidSpinMoveAction}, + {MOVE_SCARY_FACE, ScaryFaceMoveAction}, {MOVE_SUBMISSION, sub_8058E5C}, - {MOVE_LICK, sub_8058FBC}, - {MOVE_FISSURE, sub_80590D4}, - {MOVE_EXTRASENSORY, sub_8059190}, - {MOVE_ABSORB, sub_80591E4}, + {MOVE_LICK, LickMoveAction}, + {MOVE_FISSURE, FissureMoveAction}, + {MOVE_EXTRASENSORY, ExtrasensoryMoveAction}, + {MOVE_ABSORB, AbsorbMoveAction}, {MOVE_SKILL_SWAP, SkillSwapMoveAction}, - {MOVE_HEADBUTT, sub_8059424}, - {MOVE_DOUBLE_EDGE, sub_805946C}, + {MOVE_HEADBUTT, HeadbuttMoveAction}, + {MOVE_DOUBLE_EDGE, DoubleEdgeMoveAction}, {MOVE_SAND_ATTACK, sub_8059528}, - {MOVE_SMOG, sub_8059540}, - {MOVE_SACRED_FIRE, sub_80595A0}, + {MOVE_SMOG, SmogMoveAction}, + {MOVE_SACRED_FIRE, SacredFireMoveAction}, {MOVE_SHEER_COLD, sub_80595EC}, - {MOVE_MUDDY_WATER, sub_80598CC}, - {MOVE_TWISTER, sub_8059928}, - {MOVE_TWINEEDLE, sub_8059988}, + {MOVE_MUDDY_WATER, MuddyWaterMoveAction}, + {MOVE_TWISTER, TwisterMoveAction}, + {MOVE_TWINEEDLE, TwineedleMoveAction}, {MOVE_SEISMIC_TOSS, sub_8059A2C}, - {MOVE_SUPERSONIC, sub_8059AA8}, - {MOVE_TAUNT, sub_8059AB8}, - {MOVE_HORN_DRILL, sub_8059AF8}, - {MOVE_THUNDERSHOCK, sub_8059D00}, - {MOVE_THUNDER_WAVE, sub_8059D48}, - {MOVE_BLOCK, sub_8059D98}, - {MOVE_POISON_GAS, sub_8059DA4}, - {MOVE_TOXIC, sub_8059DB4}, - {MOVE_POISON_FANG, sub_8059DC4}, - {MOVE_POISON_STING, sub_8059E0C}, + {MOVE_SUPERSONIC, SupersonicMoveAction}, + {MOVE_TAUNT, TauntMoveAction}, + {MOVE_HORN_DRILL, HornDrillMoveAction}, + {MOVE_THUNDERSHOCK, ThundershockMoveAction}, + {MOVE_THUNDER_WAVE, ThunderWaveMoveAction}, + {MOVE_BLOCK, BlockMoveAction}, + {MOVE_POISON_GAS, PoisonGasMoveAction}, + {MOVE_TOXIC, ToxicMoveAction}, + {MOVE_POISON_FANG, PoisonFangMoveAction}, + {MOVE_POISON_STING, PoisonStingMoveAction}, {MOVE_TRI_ATTACK, TriAttackMoveAction}, - {MOVE_TRICK, sub_805A120}, - {MOVE_TRIPLE_KICK, sub_805A210}, - {MOVE_MUD_SLAP, sub_805A258}, - {MOVE_THIEF, sub_805A2A0}, + {MOVE_TRICK, TrickMoveAction}, + {MOVE_TRIPLE_KICK, TripleKickMoveAction}, + {MOVE_MUD_SLAP, MudSlapMoveAction}, + {MOVE_THIEF, ThiefMoveAction}, {MOVE_ROLE_PLAY, RolePlayMoveAction}, - {MOVE_LEER, sub_805A3DC}, - {MOVE_PAY_DAY, sub_805A464}, + {MOVE_LEER, LeerMoveAction}, + {MOVE_PAY_DAY, PayDayMoveAction}, {MOVE_CURSE, CurseMoveAction}, {MOVE_FRENZY_PLANT, sub_805A568}, - {MOVE_SUPERPOWER, TickleMoveAction}, - {MOVE_DYNAMICPUNCH, sub_805A688}, + {MOVE_SUPERPOWER, SuperpowerMoveAction}, + {MOVE_DYNAMICPUNCH, DynamicPunchMoveAction}, {MOVE_KNOCK_OFF, KnockOffMoveAction}, {MOVE_SECRET_POWER, SecretPowerMoveAction}, {MOVE_DIZZY_PUNCH, sub_805AC90}, - {MOVE_IMPRISON, sub_805AD04}, - {MOVE_FEATHERDANCE, sub_805AD34}, - {MOVE_BEAT_UP, sub_805AD54}, - {MOVE_BLAST_BURN, sub_805AE3C}, - {MOVE_CRUSH_CLAW, sub_805AE74}, - {MOVE_BLAZE_KICK, sub_805AECC}, + {MOVE_IMPRISON, ObserverOrbAction}, + {MOVE_FEATHERDANCE, FeatherDanceMoveAction}, + {MOVE_BEAT_UP, BeatUpMoveAction}, + {MOVE_BLAST_BURN, BlastBurnMoveAction}, + {MOVE_CRUSH_CLAW, CrushClawMoveAction}, + {MOVE_BLAZE_KICK, BlazeKickMoveAction}, {MOVE_PRESENT, PresentMoveAction}, - {MOVE_ERUPTION, sub_805AFA4}, - {MOVE_GLARE, sub_805B028}, - {MOVE_POISON_TAIL, sub_805B074}, - {MOVE_ROAR, sub_805B0BC}, + {MOVE_ERUPTION, EruptionMoveAction}, + {MOVE_GLARE, GlareMoveAction}, + {MOVE_POISON_TAIL, PoisonTailMoveAction}, + {MOVE_ROAR, RoarMoveAction}, {MOVE_FIRE_SPIN, sub_805B17C}, {MOVE_WRAP, WrapMoveAction}, - {MOVE_MAGNITUDE, sub_805B264}, - {MOVE_MIST_BALL, sub_805B324}, + {MOVE_MAGNITUDE, MagnitudeMoveAction}, + {MOVE_MIST_BALL, MistBallMoveAction}, {MOVE_DESTINY_BOND, DestinyBondMoveAction}, - {MOVE_FALSE_SWIPE, sub_805B388}, - {MOVE_HIDDEN_POWER, sub_805B3E0}, - {MOVE_ATTRACT, sub_805B454}, + {MOVE_FALSE_SWIPE, FalseSwipeMoveAction}, + {MOVE_HIDDEN_POWER, HiddenPowerMoveAction}, + {MOVE_ATTRACT, AttractMoveAction}, {MOVE_MIMIC, MimicMoveAction}, - {MOVE_FRUSTRATION, sub_805B53C}, + {MOVE_FRUSTRATION, FrustrationMoveAction}, {MOVE_LEECH_SEED, LeechSeedMoveAction}, - {MOVE_DREAM_EATER, sub_805B668}, - {MOVE_LUSTER_PURGE, sub_805B910}, - {MOVE_DRAGON_RAGE, sub_805B808}, - {MOVE_FAKE_OUT, sub_805A408}, + {MOVE_DREAM_EATER, DreamEaterMoveAction}, + {MOVE_LUSTER_PURGE, LusterPurgeMoveAction}, + {MOVE_DRAGON_RAGE, DragonRageMoveAction}, + {MOVE_FAKE_OUT, FakeOutMoveAction}, }; // These correspond to dungeon's tileset id const struct CalledMove gNaturePowerCalledMoves[] = { {MOVE_SURF, HandleRegularDamagingMove}, - {MOVE_STUN_SPORE, sub_8059050}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_SHADOW_BALL, sub_80583D8}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_STUN_SPORE, sub_8059050}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_EARTHQUAKE, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_STUN_SPORE, sub_8059050}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_STUN_SPORE, sub_8059050}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_EARTHQUAKE, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_STUN_SPORE, sub_8059050}, - {MOVE_STUN_SPORE, sub_8059050}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_RAZOR_LEAF, HandleRegularDamagingMove}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_SHADOW_BALL, sub_80583D8}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_RAZOR_LEAF, HandleRegularDamagingMove}, {MOVE_RAZOR_LEAF, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_STUN_SPORE, sub_8059050}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_EARTHQUAKE, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_SURF, HandleRegularDamagingMove}, - {MOVE_STUN_SPORE, sub_8059050}, - {MOVE_STUN_SPORE, sub_8059050}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_EARTHQUAKE, HandleRegularDamagingMove}, {MOVE_BUBBLEBEAM, sub_8058580}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_STUN_SPORE, sub_8059050}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_STUN_SPORE, sub_8059050}, - {MOVE_SHADOW_BALL, sub_80583D8}, - {MOVE_STUN_SPORE, sub_8059050}, - {MOVE_STUN_SPORE, sub_8059050}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, + {MOVE_STUN_SPORE, StunSporeMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_RAZOR_LEAF, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_ROCK_SLIDE, sub_8057C88}, + {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SURF, HandleRegularDamagingMove}, diff --git a/src/code_803E724.c b/src/code_803E724.c index 42be68d70..265015a1e 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -68,8 +68,6 @@ extern void sub_8083D44(void); extern void sub_8040A84(void); extern void sub_80400D4(void); extern void sub_8041888(u8 param_1); -extern void sub_804A1F0(s32 a0, s32 a1); -extern void sub_804A49C(s32 a0, s32 a1); extern void sub_80402AC(s32, s32); void sub_803EC94(void); diff --git a/src/code_8042B34.c b/src/code_8042B34.c index 8e24db18c..756944284 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -287,12 +287,10 @@ extern void sub_8040150(bool8 param_1); extern void sub_803D4AC(void); extern void sub_804513C(void); extern void sub_8043CD8(void); -extern void sub_80495E4(void); extern void sub_803E250(void); extern void sub_8040130(void); extern void sub_8040124(void); extern void sub_803E830(void); -extern void sub_8049820(void); extern void sub_803E214(void); extern void nullsub_56(void); extern void sub_806863C(void); @@ -309,7 +307,6 @@ extern void sub_8086130(void); extern void FreeDungeonPokemonSprites(void); extern void sub_803DF60(void); extern void sub_803E02C(void); -extern void sub_8049840(void); extern void sub_80847D4(void); extern void sub_8043D60(void); extern void sub_806890C(void); @@ -344,26 +341,21 @@ extern void sub_806AA70(void); extern void sub_803D8F0(void); extern void sub_806AD3C(void); extern void sub_806C42C(void); -extern void sub_804AAD4(void); -extern void sub_8049B8C(void); extern void sub_806B678(void); extern void sub_806C3C0(void); extern void sub_806B168(void); extern void sub_806B6C4(void); extern void sub_806A338(void); -extern void sub_804AAAC(void); extern void sub_8051E3C(void); extern void sub_8045CB0(void); extern void sub_807FA18(void); extern void sub_806A974(void); extern void sub_806CF60(void); -extern void sub_8049884(void); extern void sub_8068F80(void); extern bool8 sub_8044B28(void); extern bool8 sub_8083C24(void); extern bool8 sub_8083C88(u8 param_1); extern bool8 sub_8043ED0(bool8); -extern void LoadDungeonTilesetAssets(void); extern void LoadDungeonPokemonSprites(void); extern void ShowDungeonNameBanner(void); extern void sub_803EAF0(u32, u32); diff --git a/src/code_8048480.c b/src/code_8048480.c index 57d5ce899..97651a482 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -473,7 +473,7 @@ UNUSED void nullsub_205(void) { } void SleepSeedItemAction(Entity *pokemon, Entity *target) { - sub_8075C58(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); } void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4) @@ -555,7 +555,7 @@ void PechaBerryItemAction(Entity *pokemon, Entity *target) void WarpSeedItemAction(Entity *pokemon, Entity *target) { - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); } void ChestoBerryItemAction(Entity *pokemon, Entity *target) diff --git a/src/code_805D8C8_1.c b/src/code_805D8C8_1.c index 93e1d4225..c501b3ca9 100644 --- a/src/code_805D8C8_1.c +++ b/src/code_805D8C8_1.c @@ -68,8 +68,7 @@ extern void sub_8083D30(void); extern void sub_8083D08(void); extern void sub_806A6E8(Entity *); extern bool8 sub_8047084(s32 itemFlag); -extern void sub_807FE9C(Entity *pokemon, DungeonPos *pos, int param_3, - char param_4); +extern void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); extern void sub_8045DB4(DungeonPos *, u32); bool8 sub_807EF48(void); void sub_806A2BC(Entity *a0, u8 a1); @@ -85,12 +84,10 @@ void sub_8075680(u32); void sub_8094C88(void); void sub_8040A84(void); void sub_8047158(void); -void sub_804AA60(void); void sub_806A914(u8 a0, u8 a1, u8 a2); void sub_8044C10(u8 a0); u16 GetLeaderActionId(void); void sub_80978C8(s16 a0); -void sub_8044C50(u16 a0); static void TryCreateModeArrows(Entity *leader); bool8 sub_8094C48(void); bool8 sub_805EC4C(Entity *a0, u8 a1); @@ -215,7 +212,7 @@ void DungeonHandlePlayerInput(void) } frames = 0; - sub_8044C50(0); + sub_8044C50(ACTION_NOTHING); sShowThreeArrows1 = FALSE; sShowThreeArrows2 = FALSE; @@ -247,7 +244,7 @@ void DungeonHandlePlayerInput(void) } if (gRealInputs.held & A_BUTTON && gRealInputs.held & B_BUTTON && FixedPointToInt(leaderInfo->belly) != 0) { - sub_8044C50(1); + sub_8044C50(ACTION_PASS_TURN); gDungeon->unk644.unk2F = 1; break; } @@ -258,14 +255,14 @@ void DungeonHandlePlayerInput(void) if (gRealInputs.pressed & A_BUTTON) { if (gRealInputs.held & B_BUTTON) { if (FixedPointToInt(leaderInfo->belly) != 0) { - sub_8044C50(1); + sub_8044C50(ACTION_PASS_TURN); gDungeon->unk644.unk2F = 1; break; } } else if (ShouldMonsterRunAwayAndShowEffect(leader, TRUE)) { LogMessageByIdWithPopupCheckUser(leader, gUnknown_80FD4B0); - sub_8044C50(1); + sub_8044C50(ACTION_PASS_TURN); gDungeon->unk644.unk2F = 1; break; } @@ -415,7 +412,7 @@ void DungeonHandlePlayerInput(void) s32 i; for (i = 0; i < INVENTORY_SIZE; i++) { if (ItemExists(&gTeamInventoryRef->teamItems[i]) && ItemSet(&gTeamInventoryRef->teamItems[i])) { - sub_8044C50(11); + sub_8044C50(ACTION_THROW_ITEM_PLAYER); leaderInfo->action.unk4[0].actionUseIndex = i +1; leaderInfo->action.unk4[0].lastItemThrowPosition.x = 0; leaderInfo->action.unk4[0].lastItemThrowPosition.y = 0; @@ -531,11 +528,11 @@ void DungeonHandlePlayerInput(void) if (immobilizedMsg != NULL) { LogMessageByIdWithPopupCheckUser(leader, immobilizedMsg); } - sub_8044C50(1); + sub_8044C50(ACTION_PASS_TURN); gDungeon->unk644.unk2F = 1; } else { - sub_8044C50(2); + sub_8044C50(ACTION_WALK); if ((gRealInputs.held & B_BUTTON || bPress) && FixedPointToInt(leaderInfo->belly) != 0) { if (GetEntInfo(leader)->cringeClassStatus.status != STATUS_CONFUSED) { gDungeon->unk644.unk28 = 1; @@ -565,7 +562,7 @@ void DungeonHandlePlayerInput(void) HandleTalkFieldAction(leader); if (sub_8044B28()) break; - sub_8044C50(0); + sub_8044C50(ACTION_NOTHING); } else if ((r6.a0_8) == 0) { gDungeon->unk644.unk29 = 0; @@ -1632,7 +1629,7 @@ void sub_805EE30(void) break; } if (!r7) { - sub_807FE9C(leader, &leader->pos, 0, 1); + HandleTrap(leader, &leader->pos, 0, 1); } } break; diff --git a/src/code_8066D04.c b/src/code_8066D04.c index 647166dac..1c5eb7a32 100644 --- a/src/code_8066D04.c +++ b/src/code_8066D04.c @@ -177,7 +177,7 @@ void HandleGiveItemAction(Entity *param_1) } sub_806A6E8(entity); if (sub_80706A4(entity,&entity->pos) != 0) { - sub_807D148(param_1,entity,0,0); + WarpTarget(param_1,entity,0,0); } if (!info2->isTeamLeader) { info2->flags = info2->flags | MOVEMENT_FLAG_UNK_14; @@ -218,7 +218,7 @@ void HandleTakeItemAction(Entity *param_1) LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8D7C); sub_806A6E8(entity); if (sub_80706A4(entity,&entity->pos) != 0) { - sub_807D148(param_1,entity,0,0); + WarpTarget(param_1,entity,0,0); } if (!info->isTeamLeader) { info->flags |= MOVEMENT_FLAG_UNK_14; @@ -262,7 +262,7 @@ void sub_8066BD4(Entity *param_1) PlaySoundEffect(0x14d); LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8DB4); if (sub_80706A4(entity,&entity->pos) != 0) { - sub_807D148(param_1,entity,0,0); + WarpTarget(param_1,entity,0,0); } if (!info->isTeamLeader) { info->flags = info->flags | MOVEMENT_FLAG_UNK_14; diff --git a/src/code_8073CF0.c b/src/code_8073CF0.c index f3faeb8b1..39bb9e81d 100644 --- a/src/code_8073CF0.c +++ b/src/code_8073CF0.c @@ -45,7 +45,7 @@ extern bool8 sub_80461C8(DungeonPos *, u32); extern void sub_805229C(void); extern void sub_807E8F0(Entity *); extern void sub_80444F4(Entity *pokemon); -extern void sub_807D148(Entity *pokemon, Entity *r1, u32 r2, DungeonPos *r3); +extern void WarpTarget(Entity *pokemon, Entity *r1, u32 r2, DungeonPos *r3); extern void sub_80420B8(Entity *pokemon); extern void sub_8041C4C(Entity *pokemon, u32 r1); extern void sub_805E804(void); @@ -300,7 +300,7 @@ void sub_8074094(Entity *entity) UseAttack(NULL); if (!EntityExists(entity) || sub_8044B28()) return; - sub_807D148(entity, entity, 0, NULL); + WarpTarget(entity, entity, 0, NULL); if (entityInfo->isTeamLeader) { gDungeon->unk1 = 0; gDungeon->unk5C0 = -1; @@ -1031,7 +1031,7 @@ bool8 UseAttack(Entity *a0) sub_806A5B8(mon); if (sub_80706A4(mon, &mon->pos)) { - sub_807D148(mon, mon, 0, NULL); + WarpTarget(mon, mon, 0, NULL); } } } diff --git a/src/code_8075708.c b/src/code_8075708.c index 5eeefe47b..b89fdec07 100644 --- a/src/code_8075708.c +++ b/src/code_8075708.c @@ -105,7 +105,7 @@ void sub_8075708(Entity *entity) } _ret: if (!bVar2) { - sub_807FE9C(entity, &entity->pos, 0, 1); + HandleTrap(entity, &entity->pos, 0, 1); } break; case ENTITY_ITEM: diff --git a/src/code_8077274_1.c b/src/code_8077274_1.c index f4ca48d5d..a4c5d1a1b 100644 --- a/src/code_8077274_1.c +++ b/src/code_8077274_1.c @@ -1,6 +1,7 @@ #include "global.h" #include "code_803E46C.h" #include "code_8045A00.h" +#include "dungeon_map_access.h" #include "dungeon_message.h" #include "code_805D8C8.h" #include "code_806CD90.h" @@ -1187,7 +1188,7 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8 case STATUS_YAWNING: if (param_3) { entityInfo->sleepClassStatus.status = STATUS_NONE; - sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE); + SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE); return; } TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA734); diff --git a/src/code_807CD9C.c b/src/code_807CD9C.c index 6878c3248..2af5b6e00 100644 --- a/src/code_807CD9C.c +++ b/src/code_807CD9C.c @@ -1,6 +1,7 @@ #include "global.h" #include "constants/ability.h" +#include "constants/weather.h" #include "code_803E46C.h" #include "code_8045A00.h" #include "dungeon_message.h" @@ -10,6 +11,7 @@ #include "code_8077274_1.h" #include "dungeon_ai.h" #include "dungeon_engine.h" +#include "dungeon_generation.h" #include "dungeon_movement.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_map_access.h" @@ -19,8 +21,12 @@ #include "moves.h" #include "move_util.h" #include "code_8041AD0.h" +#include "tile_types.h" +#include "code_803E668.h" +#include "weather.h" extern u32 gUnknown_202EDCC; +extern u32 gUnknown_203B444[]; extern s16 gUnknown_80F4F90; extern u8 *gUnknown_80FCA10[]; @@ -34,7 +40,25 @@ extern u8 *gUnknown_80FC9A0[]; extern u8 *gUnknown_80FC584[]; extern u8 *gUnknown_80FD320[]; extern u8 *gUnknown_80FD2F8[]; +extern u8 *gUnknown_80FCB98[]; +extern u8 *gUnknown_80FC9C0[]; +extern u8 *gUnknown_80FD060[]; +extern u8 *gUnknown_80FD08C[]; +extern u8 *gUnknown_80FD05C[]; +extern u8 *gUnknown_80FD3D0[]; +extern u8 *gUnknown_80FD3CC[]; +extern u8 *gUnknown_80FD3C8[]; +extern u8 *gUnknown_80FD3A0[]; +extern u8 *gUnknown_80F96BC[]; +extern u8 *gUnknown_80F96EC[]; +extern struct DungeonPos *gUnknown_8107178[3]; +extern void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 param_4,s32 param_5); // TODO: param_4 should be s16 +extern void sub_804216C(Entity *pokemon, Entity *target, u32 r2); +extern void sub_80461C8(DungeonPos *, u32); +extern void sub_804218C(Entity *pokemon, Entity *target); + +void sub_804EB30(); bool8 ExposeTrap(s32 x, s32 y); void sub_8040A84(); void sub_8049ED4(); @@ -51,18 +75,18 @@ extern void sub_803F580(u32); bool8 sub_808384C(DungeonPos *, DungeonPos *); u8 sub_8083660(DungeonPos *); -void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction) +void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) { const Tile *tile; int iVar8; bool8 flag; - DungeonPos sp_0x18; + DungeonPos pos; Move move; - int sp_0x24; - Entity *sp_0x28; - PixelPos sp_0x2C; + int counter; + Entity *entity; + PixelPos pos32; - sp_0x24 = 10; + counter = 10; if (IsCurrentFixedRoomBossFight()) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC9E8); // It couldn't be knocked flying! return; @@ -86,35 +110,35 @@ void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction) sub_80421C0(target,0x1a3); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F8A0C); // {POKEMON_0} was blown away! flag = TRUE; - sp_0x28 = NULL; + entity = NULL; - for(; sp_0x24 > 0; sp_0x24--) + for(; counter > 0; counter--) { - sp_0x18 = target->pos; - sp_0x18.x += gAdjacentTileOffsets[direction].x; - sp_0x18.y += gAdjacentTileOffsets[direction].y; - if ((((sp_0x18.x < 0) || (sp_0x18.y < 0)) || (DUNGEON_MAX_SIZE_X <= sp_0x18.x)) || - (DUNGEON_MAX_SIZE_Y <= sp_0x18.y)) goto _0807CF20; - sp_0x2C.x = gAdjacentTileOffsets[direction].x << 0xA; - sp_0x2C.y = gAdjacentTileOffsets[direction].y << 0xA; + pos = target->pos; + pos.x += gAdjacentTileOffsets[direction].x; + pos.y += gAdjacentTileOffsets[direction].y; + if ((((pos.x < 0) || (pos.y < 0)) || (DUNGEON_MAX_SIZE_X <= pos.x)) || + (DUNGEON_MAX_SIZE_Y <= pos.y)) goto _0807CF20; + pos32.x = gAdjacentTileOffsets[direction].x << 0xA; + pos32.y = gAdjacentTileOffsets[direction].y << 0xA; for(iVar8 = 0; iVar8 < 6; iVar8++) { - IncreaseEntityPixelPos(target,sp_0x2C.x,sp_0x2C.y); + IncreaseEntityPixelPos(target,pos32.x,pos32.y); if (sub_8045888(target) != 0) { sub_803E46C(0x19); } } - tile = GetTile(sp_0x18.x, sp_0x18.y); + tile = GetTile(pos.x, pos.y); if (tile->monster != NULL) { - sp_0x28 = tile->monster; + entity = tile->monster; goto _0807CF26; } - if (sub_80705F0(target,&sp_0x18)){ - flag = (tile->terrainType & 3) == 0 ? FALSE : TRUE; + if (sub_80705F0(target,&pos)){ + flag = (tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) == 0 ? FALSE : TRUE; goto _0807CF20; } - sub_80694C0(target,sp_0x18.x,sp_0x18.y,1); + sub_80694C0(target,pos.x,pos.y,1); } @@ -129,11 +153,11 @@ void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction) if (sub_8044B28()) { return; } - if (sp_0x28 != NULL) { + if (entity != NULL) { InitPokemonMove(&move,0x163); - if (!sub_80571F0(sp_0x28,&move)) { - TrySendImmobilizeSleepEndMsg(pokemon,sp_0x28); - sub_806F370(pokemon,sp_0x28,gUnknown_80F4F90,0,0,0,0x21a,0,0,0); + if (!sub_80571F0(entity,&move)) { + TrySendImmobilizeSleepEndMsg(pokemon,entity); + sub_806F370(pokemon,entity,gUnknown_80F4F90,0,0,0,0x21a,0,0,0); } } if (sub_8044B28()) { @@ -144,7 +168,7 @@ void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction) } sub_806A5B8(target); if (sub_80706A4(target,&target->pos)) { - sub_807D148(target,target,0,0); + WarpTarget(target,target,0,0); } if (!EntityExists(target)) { return; @@ -215,7 +239,7 @@ _0807D11E: sub_803E46C(0x1a); } -void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos) +void WarpTarget(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos) { EntityInfo *info; u32 direction; @@ -381,3 +405,950 @@ bool8 ExposeTrap(s32 x,s32 y) return FALSE; } } + +// https://decomp.me/scratch/P5sBc +NAKED +void HandleTrawlOrbAction(Entity *pokemon, Entity *target) +{ +asm_unified( +"push {r4-r7,lr}\n" +"mov r7, r10\n" +"mov r6, r9\n" +"mov r5, r8\n" +"push {r5-r7}\n" +"ldr r4, _0807D540\n" +"add sp, r4\n" +"ldr r1, _0807D544\n" +"add r1, sp\n" +"str r0, [r1]\n" +"movs r2, 0\n" +"movs r3, 0xD1\n" +"lsls r3, 4\n" +"add r3, sp\n" +"str r2, [r3]\n" +"ldr r4, _0807D548\n" +"add r4, sp\n" +"str r2, [r4]\n" +"add r5, sp, 0x4\n" +"mov r8, r5\n" +"mov r10, r2\n" +"mov r9, r2\n" +"add r7, sp, 0x8\n" +"b _0807D606\n" +".align 2, 0\n" +"_0807D540: .4byte 0xfffff2d4\n" +"_0807D544: .4byte 0x00000d08\n" +"_0807D548: .4byte 0x00000d0c\n" +"_0807D54C:\n" +"movs r0, 0x4\n" +"ldrsh r1, [r5, r0]\n" +"ldr r2, _0807D650\n" +"add r2, sp\n" +"ldr r2, [r2]\n" +"movs r3, 0x4\n" +"ldrsh r0, [r2, r3]\n" +"subs r1, r0\n" +"cmp r1, 0\n" +"bge _0807D562\n" +"negs r1, r1\n" +"_0807D562:\n" +"cmp r1, 0x2\n" +"bgt _0807D580\n" +"movs r3, 0x6\n" +"ldrsh r1, [r5, r3]\n" +"ldr r4, _0807D650\n" +"add r4, sp\n" +"ldr r4, [r4]\n" +"movs r2, 0x6\n" +"ldrsh r0, [r4, r2]\n" +"subs r1, r0\n" +"cmp r1, 0\n" +"bge _0807D57C\n" +"negs r1, r1\n" +"_0807D57C:\n" +"cmp r1, 0x2\n" +"ble _0807D5FE\n" +"_0807D580:\n" +"movs r1, 0x4\n" +"ldrsh r0, [r5, r1]\n" +"movs r2, 0x6\n" +"ldrsh r1, [r5, r2]\n" +"bl GetTile\n" +"ldrh r1, [r0]\n" +"movs r2, 0x3\n" +"adds r0, r2, 0\n" +"ands r0, r1\n" +"cmp r0, 0\n" +"beq _0807D5FE\n" +"mov r3, r8\n" +"str r2, [r3]\n" +"ldr r4, _0807D654\n" +"add r4, sp\n" +"ldr r1, _0807D658\n" +"add r1, sp\n" +"ldr r1, [r1]\n" +"lsls r0, r1, 2\n" +"adds r4, r0\n" +"str r4, [r7, 0x6C]\n" +"ldr r0, [r5, 0x4]\n" +"str r0, [r7]\n" +"movs r2, 0x4\n" +"ldrsh r0, [r5, r2]\n" +"lsls r1, r0, 1\n" +"adds r1, r0\n" +"lsls r1, 3\n" +"adds r1, 0x4\n" +"lsls r1, 8\n" +"movs r3, 0x6\n" +"ldrsh r0, [r5, r3]\n" +"lsls r2, r0, 1\n" +"adds r2, r0\n" +"lsls r2, 3\n" +"adds r2, 0x4\n" +"lsls r2, 8\n" +"mov r0, r8\n" +"bl SetEntityPixelPos\n" +"movs r2, 0\n" +"movs r1, 0\n" +"strh r1, [r7, 0x22]\n" +"movs r0, 0x1\n" +"strb r0, [r7, 0x1C]\n" +"strb r2, [r7, 0x1E]\n" +"str r1, [r7, 0x18]\n" +"ldr r0, _0807D65C\n" +"ldr r0, [r0]\n" +"ldr r5, _0807D660\n" +"adds r0, r5\n" +"add r0, r9\n" +"ldr r0, [r0]\n" +"str r0, [r4]\n" +"adds r7, 0x74\n" +"movs r0, 0x74\n" +"add r8, r0\n" +"ldr r2, _0807D658\n" +"add r2, sp\n" +"ldr r1, [r2]\n" +"adds r1, 0x1\n" +"str r1, [r2]\n" +"_0807D5FE:\n" +"movs r3, 0x4\n" +"add r9, r3\n" +"movs r4, 0x1\n" +"add r10, r4\n" +"_0807D606:\n" +"ldr r0, _0807D65C\n" +"ldr r1, [r0]\n" +"ldr r5, _0807D664\n" +"adds r0, r1, r5\n" +"movs r2, 0\n" +"ldrsh r0, [r0, r2]\n" +"cmp r10, r0\n" +"bge _0807D634\n" +"ldr r3, _0807D668\n" +"adds r0, r1, r3\n" +"add r0, r9\n" +"ldr r5, [r0]\n" +"adds r0, r5, 0\n" +"bl EntityExists\n" +"lsls r0, 24\n" +"cmp r0, 0\n" +"beq _0807D5FE\n" +"ldr r4, _0807D658\n" +"add r4, sp\n" +"ldr r4, [r4]\n" +"cmp r4, 0x18\n" +"ble _0807D54C\n" +"_0807D634:\n" +"ldr r5, _0807D658\n" +"add r5, sp\n" +"ldr r5, [r5]\n" +"cmp r5, 0\n" +"bne _0807D670\n" +"ldr r0, _0807D66C\n" +"ldr r1, [r0]\n" +"ldr r2, _0807D650\n" +"add r2, sp\n" +"ldr r0, [r2]\n" +"bl LogMessageByIdWithPopupCheckUser\n" +"b _0807D9F4\n" +".align 2, 0\n" +"_0807D650: .4byte 0x00000d08\n" +"_0807D654: .4byte 0x00000b58\n" +"_0807D658: .4byte 0x00000d0c\n" +"_0807D65C: .4byte gDungeon\n" +"_0807D660: .4byte 0x00003804\n" +"_0807D664: .4byte 0x00003904\n" +"_0807D668: .4byte 0x0001361c\n" +"_0807D66C: .4byte gUnknown_80FE034\n" +"_0807D670:\n" +"movs r1, 0\n" +"movs r7, 0x1D\n" +"ldr r0, _0807D754\n" +"add r0, sp\n" +"_0807D678:\n" +"strb r1, [r0]\n" +"subs r0, 0x1\n" +"subs r7, 0x1\n" +"cmp r7, 0\n" +"bge _0807D678\n" +"movs r7, 0\n" +"ldr r3, _0807D758\n" +"add r3, sp\n" +"ldr r3, [r3]\n" +"cmp r7, r3\n" +"blt _0807D690\n" +"b _0807D7CC\n" +"_0807D690:\n" +"ldr r4, _0807D75C\n" +"mov r10, r4\n" +"ldr r5, _0807D760\n" +"movs r0, 0\n" +"ldrsh r5, [r5, r0]\n" +"ldr r0, _0807D764\n" +"add r0, sp\n" +"str r5, [r0]\n" +"_0807D6A0:\n" +"movs r1, 0\n" +"mov r9, r1\n" +"ldr r2, _0807D768\n" +"add r2, sp\n" +"ldr r2, [r2]\n" +"ldrh r0, [r2, 0x4]\n" +"ldr r1, _0807D76C\n" +"ands r6, r1\n" +"orrs r6, r0\n" +"ldrh r0, [r2, 0x6]\n" +"lsls r0, 16\n" +"mov r4, r10\n" +"ands r6, r4\n" +"orrs r6, r0\n" +"mov r4, r9\n" +"adds r5, r7, 0x1\n" +"movs r0, 0xD2\n" +"lsls r0, 4\n" +"add r0, sp\n" +"str r5, [r0]\n" +"ldr r1, _0807D760\n" +"ldr r2, _0807D764\n" +"add r2, sp\n" +"ldr r2, [r2]\n" +"cmp r2, 0x63\n" +"beq _0807D790\n" +"ldr r3, _0807D770\n" +"add r3, sp\n" +"mov r8, r3\n" +"_0807D6DA:\n" +"ldr r0, _0807D774\n" +"add r0, sp\n" +"adds r0, r4\n" +"ldr r5, _0807D778\n" +"add r5, sp\n" +"str r0, [r5]\n" +"ldrb r0, [r0]\n" +"cmp r0, 0\n" +"bne _0807D77C\n" +"lsls r2, r4, 2\n" +"adds r2, r1\n" +"ldrh r0, [r2]\n" +"ldr r1, _0807D768\n" +"add r1, sp\n" +"ldr r1, [r1]\n" +"ldrh r1, [r1, 0x4]\n" +"adds r0, r1\n" +"lsls r0, 16\n" +"lsrs r0, 16\n" +"ldr r1, _0807D76C\n" +"ands r6, r1\n" +"orrs r6, r0\n" +"ldrh r0, [r2, 0x2]\n" +"ldr r2, _0807D768\n" +"add r2, sp\n" +"ldr r2, [r2]\n" +"ldrh r2, [r2, 0x6]\n" +"adds r0, r2\n" +"lsls r0, 16\n" +"mov r3, r10\n" +"ands r6, r3\n" +"orrs r6, r0\n" +"lsls r0, r6, 16\n" +"asrs r0, 16\n" +"asrs r1, r6, 16\n" +"bl GetTile\n" +"adds r2, r0, 0\n" +"ldrh r1, [r2]\n" +"movs r3, 0x3\n" +"ands r3, r1\n" +"cmp r3, 0x1\n" +"bne _0807D77C\n" +"movs r5, 0x80\n" +"lsls r5, 2\n" +"adds r0, r5, 0\n" +"ands r0, r1\n" +"cmp r0, 0\n" +"bne _0807D77C\n" +"ldr r0, [r2, 0x14]\n" +"cmp r0, 0\n" +"bne _0807D77C\n" +"lsls r0, r7, 2\n" +"add r0, r8\n" +"str r6, [r0]\n" +"ldr r0, _0807D778\n" +"add r0, sp\n" +"ldr r0, [r0]\n" +"strb r3, [r0]\n" +"b _0807D7B8\n" +".align 2, 0\n" +"_0807D754: .4byte 0x00000d05\n" +"_0807D758: .4byte 0x00000d0c\n" +"_0807D75C: .4byte 0x0000ffff\n" +"_0807D760: .4byte gUnknown_80F4468\n" +"_0807D764: .4byte 0x00000d18\n" +"_0807D768: .4byte 0x00000d08\n" +"_0807D76C: .4byte 0xffff0000\n" +"_0807D770: .4byte 0x00000bbc\n" +"_0807D774: .4byte 0x00000ce8\n" +"_0807D778: .4byte 0x00000d28\n" +"_0807D77C:\n" +"adds r4, 0x1\n" +"cmp r4, 0x1D\n" +"bgt _0807D790\n" +"lsls r0, r4, 2\n" +"ldr r1, _0807D9B4\n" +"adds r0, r1\n" +"movs r2, 0\n" +"ldrsh r0, [r0, r2]\n" +"cmp r0, 0x63\n" +"bne _0807D6DA\n" +"_0807D790:\n" +"mov r3, r9\n" +"cmp r3, 0\n" +"bne _0807D7B8\n" +"movs r0, 0x74\n" +"muls r0, r7\n" +"add r0, sp\n" +"adds r0, 0x4\n" +"str r3, [r0]\n" +"ldr r1, _0807D9B8\n" +"add r1, sp\n" +"lsls r0, r7, 2\n" +"adds r1, r0\n" +"ldrh r2, [r1]\n" +"mov r0, r10\n" +"orrs r0, r2\n" +"strh r0, [r1]\n" +"ldrh r2, [r1, 0x2]\n" +"mov r0, r10\n" +"orrs r0, r2\n" +"strh r0, [r1, 0x2]\n" +"_0807D7B8:\n" +"movs r4, 0xD2\n" +"lsls r4, 4\n" +"add r4, sp\n" +"ldr r7, [r4]\n" +"ldr r5, _0807D9BC\n" +"add r5, sp\n" +"ldr r5, [r5]\n" +"cmp r7, r5\n" +"bge _0807D7CC\n" +"b _0807D6A0\n" +"_0807D7CC:\n" +"movs r7, 0\n" +"ldr r0, _0807D9BC\n" +"add r0, sp\n" +"ldr r0, [r0]\n" +"cmp r7, r0\n" +"bge _0807D866\n" +"_0807D7D8:\n" +"movs r0, 0x74\n" +"adds r1, r7, 0\n" +"muls r1, r0\n" +"mov r8, r1\n" +"mov r4, sp\n" +"add r4, r8\n" +"adds r4, 0x4\n" +"adds r0, r4, 0\n" +"bl EntityExists\n" +"lsls r0, 24\n" +"cmp r0, 0\n" +"beq _0807D85A\n" +"adds r0, r4, 0x4\n" +"movs r1, 0x1\n" +"bl sub_80461C8\n" +"movs r2, 0x4\n" +"ldrsh r0, [r4, r2]\n" +"movs r3, 0x6\n" +"ldrsh r1, [r4, r3]\n" +"bl sub_80402AC\n" +"movs r5, 0xC2\n" +"lsls r5, 4\n" +"add r5, sp\n" +"lsls r6, r7, 3\n" +"adds r5, r6\n" +"ldr r4, _0807D9B8\n" +"add r4, sp\n" +"lsls r0, r7, 2\n" +"adds r4, r0\n" +"movs r0, 0\n" +"ldrsh r1, [r4, r0]\n" +"lsls r0, r1, 1\n" +"adds r0, r1\n" +"lsls r0, 3\n" +"adds r0, 0x4\n" +"lsls r0, 8\n" +"add r1, sp, 0x10\n" +"add r1, r8\n" +"ldr r1, [r1]\n" +"subs r0, r1\n" +"movs r1, 0x3C\n" +"bl __divsi3\n" +"str r0, [r5]\n" +"ldr r5, _0807D9C0\n" +"add r5, sp\n" +"adds r5, r6\n" +"movs r2, 0x2\n" +"ldrsh r1, [r4, r2]\n" +"lsls r0, r1, 1\n" +"adds r0, r1\n" +"lsls r0, 3\n" +"adds r0, 0x4\n" +"lsls r0, 8\n" +"add r1, sp, 0x14\n" +"add r1, r8\n" +"ldr r1, [r1]\n" +"subs r0, r1\n" +"movs r1, 0x3C\n" +"bl __divsi3\n" +"str r0, [r5]\n" +"_0807D85A:\n" +"adds r7, 0x1\n" +"ldr r3, _0807D9BC\n" +"add r3, sp\n" +"ldr r3, [r3]\n" +"cmp r7, r3\n" +"blt _0807D7D8\n" +"_0807D866:\n" +"movs r1, 0xD1\n" +"lsls r1, 1\n" +"ldr r4, _0807D9C4\n" +"add r4, sp\n" +"ldr r0, [r4]\n" +"bl sub_80421C0\n" +"movs r5, 0\n" +"mov r9, r5\n" +"ldr r0, _0807D9C8\n" +"ldr r0, [r0]\n" +"ldr r1, _0807D9CC\n" +"adds r0, r1\n" +"ldrb r0, [r0]\n" +"ldr r2, _0807D9D0\n" +"add r2, sp\n" +"str r0, [r2]\n" +"mov r10, r5\n" +"movs r6, 0\n" +"_0807D88C:\n" +"movs r7, 0\n" +"mov r3, r10\n" +"adds r3, 0x22\n" +"ldr r4, _0807D9D4\n" +"add r4, sp\n" +"str r3, [r4]\n" +"adds r5, r6, 0x1\n" +"ldr r0, _0807D9D8\n" +"add r0, sp\n" +"str r5, [r0]\n" +"ldr r1, _0807D9BC\n" +"add r1, sp\n" +"ldr r1, [r1]\n" +"cmp r7, r1\n" +"bge _0807D916\n" +"mov r2, r9\n" +"lsls r2, 24\n" +"mov r8, r2\n" +"_0807D8B0:\n" +"movs r0, 0x74\n" +"adds r5, r7, 0\n" +"muls r5, r0\n" +"mov r4, sp\n" +"adds r4, r5\n" +"adds r4, 0x4\n" +"adds r0, r4, 0\n" +"bl EntityExists\n" +"lsls r0, 24\n" +"cmp r0, 0\n" +"beq _0807D90A\n" +"movs r0, 0xC2\n" +"lsls r0, 4\n" +"add r0, sp\n" +"lsls r2, r7, 3\n" +"adds r0, r2\n" +"ldr r1, [r0]\n" +"ldr r0, _0807D9C0\n" +"add r0, sp\n" +"adds r0, r2\n" +"ldr r2, [r0]\n" +"adds r0, r4, 0\n" +"bl IncreaseEntityPixelPos\n" +"mov r0, r10\n" +"bl sin_4096\n" +"add r2, sp, 0x20\n" +"adds r2, r5\n" +"lsls r1, r0, 1\n" +"adds r1, r0\n" +"lsls r1, 2\n" +"str r1, [r2]\n" +"movs r0, 0\n" +"str r0, [sp]\n" +"adds r0, r4, 0\n" +"ldr r3, _0807D9D0\n" +"add r3, sp\n" +"ldr r1, [r3]\n" +"movs r2, 0\n" +"mov r4, r8\n" +"lsrs r3, r4, 24\n" +"bl sub_80462AC\n" +"_0807D90A:\n" +"adds r7, 0x1\n" +"ldr r5, _0807D9BC\n" +"add r5, sp\n" +"ldr r5, [r5]\n" +"cmp r7, r5\n" +"blt _0807D8B0\n" +"_0807D916:\n" +"movs r0, 0x13\n" +"bl sub_803E46C\n" +"ldr r0, _0807D9D4\n" +"add r0, sp\n" +"ldr r0, [r0]\n" +"mov r10, r0\n" +"movs r0, 0x3\n" +"ands r0, r6\n" +"cmp r0, 0\n" +"bne _0807D930\n" +"movs r1, 0x1\n" +"add r9, r1\n" +"_0807D930:\n" +"movs r0, 0x7\n" +"mov r2, r9\n" +"ands r2, r0\n" +"mov r9, r2\n" +"ldr r3, _0807D9D8\n" +"add r3, sp\n" +"ldr r6, [r3]\n" +"cmp r6, 0x3B\n" +"ble _0807D88C\n" +"movs r7, 0\n" +"ldr r4, _0807D9BC\n" +"add r4, sp\n" +"ldr r4, [r4]\n" +"cmp r7, r4\n" +"bge _0807D996\n" +"_0807D94E:\n" +"ldr r0, _0807D9B8\n" +"add r0, sp\n" +"lsls r1, r7, 2\n" +"adds r4, r0, r1\n" +"movs r5, 0\n" +"ldrsh r0, [r4, r5]\n" +"cmp r0, 0\n" +"blt _0807D98A\n" +"movs r0, 0x74\n" +"muls r0, r7\n" +"add r0, sp\n" +"adds r0, 0x4\n" +"bl GetItemData\n" +"adds r1, r0, 0\n" +"adds r0, r4, 0\n" +"movs r2, 0x1\n" +"bl sub_80460F8\n" +"movs r1, 0\n" +"ldrsh r0, [r4, r1]\n" +"movs r2, 0x2\n" +"ldrsh r1, [r4, r2]\n" +"bl sub_80402AC\n" +"movs r3, 0x1\n" +"movs r4, 0xD1\n" +"lsls r4, 4\n" +"add r4, sp\n" +"str r3, [r4]\n" +"_0807D98A:\n" +"adds r7, 0x1\n" +"ldr r5, _0807D9BC\n" +"add r5, sp\n" +"ldr r5, [r5]\n" +"cmp r7, r5\n" +"blt _0807D94E\n" +"_0807D996:\n" +"movs r0, 0xD1\n" +"lsls r0, 4\n" +"add r0, sp\n" +"ldr r0, [r0]\n" +"cmp r0, 0\n" +"beq _0807D9E0\n" +"ldr r0, _0807D9DC\n" +"ldr r1, [r0]\n" +"ldr r2, _0807D9C4\n" +"add r2, sp\n" +"ldr r0, [r2]\n" +"bl LogMessageByIdWithPopupCheckUser\n" +"b _0807D9EE\n" +".align 2, 0\n" +"_0807D9B4: .4byte gUnknown_80F4468\n" +"_0807D9B8: .4byte 0x00000bbc\n" +"_0807D9BC: .4byte 0x00000d0c\n" +"_0807D9C0: .4byte 0x00000c24\n" +"_0807D9C4: .4byte 0x00000d08\n" +"_0807D9C8: .4byte gDungeon\n" +"_0807D9CC: .4byte 0x00018210\n" +"_0807D9D0: .4byte 0x00000d14\n" +"_0807D9D4: .4byte 0x00000d1c\n" +"_0807D9D8: .4byte 0x00000d24\n" +"_0807D9DC: .4byte gUnknown_80FE060\n" +"_0807D9E0:\n" +"ldr r0, _0807DA08\n" +"ldr r1, [r0]\n" +"ldr r3, _0807DA0C\n" +"add r3, sp\n" +"ldr r0, [r3]\n" +"bl LogMessageByIdWithPopupCheckUser\n" +"_0807D9EE:\n" +"movs r0, 0x1\n" +"bl sub_807EC28\n" +"_0807D9F4:\n" +"ldr r3, _0807DA10\n" +"add sp, r3\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" +".align 2, 0\n" +"_0807DA08: .4byte gUnknown_80FE034\n" +"_0807DA0C: .4byte 0x00000d08\n" +"_0807DA10: .4byte 0x00000d2c"); +} + + +void HandlePounceOrbAction(Entity *pokemon, Entity *target, u8 r2) { + EntityInfo *info; + const Tile *tile; + DungeonPos pos; + u32 direction = r2; + info = GetEntInfo(target); + if(HasAbility(target, ABILITY_SUCTION_CUPS)) + { + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); + TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FCB98); + return; + } + if(IsCurrentFixedRoomBossFight()) + { + TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FC9C0); + return; + } + if(direction == NUM_DIRECTIONS) + direction = info->action.direction; + sub_806CDD4(target, 6, direction); + + + while (1) + { + pos.x = target->pos.x + gAdjacentTileOffsets[direction].x; + pos.y = target->pos.y + gAdjacentTileOffsets[direction].y; + + if(pos.x <= 0 || pos.y <= 0 || pos.x > DUNGEON_MAX_SIZE_X - 2 || pos.y > DUNGEON_MAX_SIZE_Y - 2) break; + + tile = GetTile(pos.x, pos.y); + + if(tile->monster) break; + if(!(tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY))) break; + + sub_80694C0(target, pos.x, pos.y, 0); + + sub_804535C(target, 0); + if(!sub_8045888(target)) continue; + sub_803E46C(0x3A); + } + + sub_806A5B8(target); + if(sub_80706A4(target, &target->pos)) + WarpTarget(target, target, 0, 0); + if(EntityExists(target)) + { + sub_806CE68(target, 8); + if(info->isTeamLeader) + { + sub_804AC20(&target->pos); + sub_807EC28(0); + } + sub_806A5B8(target); + + sub_8075900(target, gDungeon->forceMonsterHouse); + } +} + +void HandleDroughtOrbAction(Entity *pokemon, Entity *target) { + s32 x; + s32 y; + Tile *tile; + bool8 flag; + + flag = FALSE; + if(IsCurrentFixedRoomBossFight()) + { + LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FD060); + return; + } + + if(IsWaterTileset()) + { + LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FD08C); + return; + } + + for (y = 0; y < DUNGEON_MAX_SIZE_Y; y++) + for(x = 0; x < DUNGEON_MAX_SIZE_X; x++) + { + tile = GetTileMut(x, y); + if((tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) == TERRAIN_TYPE_SECONDARY) + { + tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY); + tile->terrainType |= TERRAIN_TYPE_NORMAL; + sub_80498A8(x, y); + flag = TRUE; + } + } + for (y = 0; y < DUNGEON_MAX_SIZE_Y; y++) + for(x = 0; x < DUNGEON_MAX_SIZE_X; x++) + sub_8049BB0(x, y); + + if(flag) + { + sub_80421C0(pokemon, 0x1A1); + LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FD05C); + } + else + { + LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FD060); + } + gDungeon->unk644.unk2C = 1; + sub_806CF60(); + sub_8040A84(); + sub_8049ED4(); +} + +void HandleOneRoomOrb(Entity *pokemon, Entity *target) { + bool8 bVar1; + Tile *tile; + s32 y; + Entity *entity; + s32 x; + s32 index; + bool8 isMonsterHouse; + + if (gDungeon->forceMonsterHouse != 0) { + LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FD3C8); + return; + } + + if (gDungeon->unk3A0B != 0) { + LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FD3CC); + return; + } + + if (IsBossFight()) { + LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FD3D0); + return; + } + isMonsterHouse = FALSE; + + for(x = 1; x < DUNGEON_MAX_SIZE_X - 1; x++) + { + for(y = 1; y < DUNGEON_MAX_SIZE_Y - 1; y++) + { + bVar1 = 0; + tile = GetTileMut(x,y); + tile->terrainType &= ~(TERRAIN_TYPE_UNK_x400); + tile->room = 0; + if ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0) + { + if((tile->terrainType & TERRAIN_TYPE_UNBREAKABLE) == 0) { + tile->spawnOrVisibilityFlags |= SPAWN_FLAG_STAIRS | SPAWN_FLAG_ITEM; + tile->terrainType &= ~(TERRAIN_TYPE_NATURAL_JUNCTION); + if ((tile->terrainType & TERRAIN_TYPE_IN_MONSTER_HOUSE)) { + isMonsterHouse = TRUE; + } + if ((tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) != TERRAIN_TYPE_SECONDARY) + if(((tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) != (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY))) { + if (((x == 1) || (((y == 1 || (x == DUNGEON_MAX_SIZE_X - 2)) || (y == DUNGEON_MAX_SIZE_Y - 2)))) && + ((tile->object == NULL && (gDungeon->unk644.unk2C == 0)))) { + bVar1 = TRUE; + } + if (bVar1) { + tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY); + tile->terrainType |= TERRAIN_TYPE_SECONDARY; + } + else { + if ((tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) == TERRAIN_TYPE_NORMAL) continue; + tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY); + tile->terrainType |= TERRAIN_TYPE_NORMAL; + tile->terrainType |= TERRAIN_TYPE_UNK_x400; + } + } + } + } + } + } + + + if (StairsAlwaysReachable(gDungeon->stairsSpawn.x,gDungeon->stairsSpawn.y,TRUE)) { + for(x = 0; x < DUNGEON_MAX_SIZE_X; x++) + { + for(y = 0; y < DUNGEON_MAX_SIZE_Y; y++) + { + tile = GetTileMut(x,y); + if (!(tile->terrainType & TERRAIN_TYPE_UNBREAKABLE)) + if(((tile->terrainType & (TERRAIN_TYPE_UNREACHABLE_FROM_STAIRS| TERRAIN_TYPE_UNK_x400)) == (TERRAIN_TYPE_UNREACHABLE_FROM_STAIRS| TERRAIN_TYPE_UNK_x400))) { + tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY); + tile->terrainType |= TERRAIN_TYPE_SECONDARY; + } + } + } + } + if (isMonsterHouse) { + gDungeon->monsterHouseRoom = 0; + } + for(x = 0; x < DUNGEON_MAX_SIZE_X; x++) + { + + for(y = 0; y < DUNGEON_MAX_SIZE_Y; y++) + { + if (isMonsterHouse) { + GetTileMut(x,y)->terrainType |= TERRAIN_TYPE_IN_MONSTER_HOUSE; + } + sub_8049BB0(x,y); + } + } + + for(index = 0; index < DUNGEON_MAX_POKEMON; index++) + { + entity = gDungeon->activePokemon[index]; + if (EntityExists(entity)) { + entity->room = GetTile(entity->pos.x,entity->pos.y)->room; + } + } + sub_804EB30(); + sub_804AAD4(); + sub_8049884(); + sub_806CF60(); + sub_8040A84(); + sub_8049ED4(); + LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FD3A0); + sub_803E708(0x28,0x2b); + sub_8075900(pokemon,1); + for(index = 0; index < DUNGEON_MAX_POKEMON; index++) + { + entity = gDungeon->activePokemon[index]; + if (EntityExists(entity)) { + sub_806A5B8(entity); + if ((EntityExists(entity)) && (sub_80706A4(entity,&entity->pos))) { + WarpTarget(entity,entity,0,0); + } + } + } + gDungeon->forceMonsterHouse = TRUE; + sub_803E708(0x14,0x2b); +} + + +// https://decomp.me/scratch/JZ51a -- sub_807E1A0 param_4 should be s16 but using s32 to match this func +void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 param_4,u8 moveType,s16 param_6) +{ + bool8 flag; + DungeonPos *posPtr; + Tile *tile; + Entity * entity1; + Entity *entity2; + int x; + int y; + int index; + DungeonPos pos; + + u32 uStack_2c; + + uStack_2c = param_6; + for (index = 0; index < DUNGEON_MAX_POKEMON; index++) { + entity1 = gDungeon->activePokemon[index]; + if ((EntityExists(entity1)) && (HasAbility(entity1, ABILITY_DAMP))) break; + } + if (index != DUNGEON_MAX_POKEMON) { + sub_804218C(pokemon,target); + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); + TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F96EC); + } + else if (GetApparentWeather(target) == WEATHER_RAIN) { + TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F96EC); + } + else + { + sub_804216C(pokemon,target,param_4); + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); + TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F96BC); + flag = FALSE; + + posPtr = (gUnknown_8107178)[param_4]; + if (posPtr->x != 99) { + while (posPtr->x != 99) { + pos.x = posPtr->x + param_3->x; + pos.y = posPtr->y + param_3->y; + if ((0 <= pos.x) && (0 <= pos.y) && (pos.x < DUNGEON_MAX_SIZE_X) && (pos.y < DUNGEON_MAX_SIZE_Y)) { + tile = GetTileMut(pos.x,pos.y); + if ((0 < pos.x) && (0 < pos.y && ((pos.x < (DUNGEON_MAX_SIZE_X - 1) && ((pos.y < (DUNGEON_MAX_SIZE_Y - 1) + && (tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) == 0))) + )) && (tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0) { + tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY); + tile->terrainType |= TERRAIN_TYPE_NORMAL; + for(y = -1; y < 2; y++) + { + for(x = -1; x < 2; x++) + { + sub_80498A8(pos.x + x,pos.y + y); + } + } + flag = TRUE; + } + entity2 = tile->object; + if (((entity2 != NULL) && (entity2 != target)) && (GetEntityType(entity2) == ENTITY_ITEM)) { + sub_80461C8(&pos, 0); + } + entity2 = tile->monster; + if (((entity2 != NULL) && (entity2 != target)) && (GetEntityType(entity2) == ENTITY_MONSTER)) { + sub_807E1A0(pokemon,entity2,moveType,uStack_2c,gUnknown_203B444[param_4]); + if (sub_8044B28()) break; + } + } + posPtr++; + } + } + if (sub_8044B28()) { + return; + } + if (GetEntityType(target) == ENTITY_MONSTER) { + sub_807E1A0(pokemon,target,moveType,uStack_2c,gUnknown_203B444[param_4]); + } + if (!flag) { + return; + } + for(y = 0; y < DUNGEON_MAX_SIZE_Y; y++) + { + for(x = 0; x < DUNGEON_MAX_SIZE_X; x++) + { + sub_8049BB0(x,y); + } + } + sub_8040A84(); + sub_8049ED4(); + } +} + diff --git a/src/code_807E1A0.c b/src/code_807E1A0.c index 8814d522b..bbcf68e87 100644 --- a/src/code_807E1A0.c +++ b/src/code_807E1A0.c @@ -67,7 +67,7 @@ void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s16 param_4,s32 para } } -void sub_807E254(Entity *pokemon,Entity *target) +void HandleSwitcherOrb(Entity *pokemon,Entity *target) { DungeonPos pokemonPos; DungeonPos targetPos; diff --git a/src/dungeon_ai_leader.c b/src/dungeon_ai_leader.c index 5c1204ac1..49072107e 100644 --- a/src/dungeon_ai_leader.c +++ b/src/dungeon_ai_leader.c @@ -297,8 +297,8 @@ bool8 sub_8072CF4(Entity *entity) case ACTION_REGULAR_ATTACK: sub_8067904(entity, MOVE_REGULAR_ATTACK); break; - case 0x25: - sub_807FE9C(entity,&entity->pos,0,0); + case ACTION_STEPPED_ON_TRAP: + HandleTrap(entity,&entity->pos,0,0); break; case ACTION_PICK_UP_AI: HandlePickUpAIAction(entity); @@ -360,7 +360,7 @@ bool8 sub_8072CF4(Entity *entity) sub_8041888(0); if (((EntityExists(entity)) && (!info->aiAllySkip)) && (!bVar14)) { if (sub_80706A4(entity,&entity->pos) != '\0') { - sub_807D148(entity,entity,0,0); + WarpTarget(entity,entity,0,0); } sub_8074094(entity); sub_8071DA4(entity); diff --git a/src/dungeon_cutscenes.c b/src/dungeon_cutscenes.c index 0768676b3..9a114b38e 100644 --- a/src/dungeon_cutscenes.c +++ b/src/dungeon_cutscenes.c @@ -375,7 +375,6 @@ extern s32 GetCameraXPos(void); extern s32 GetCameraYPos(void); extern void sub_803F878(u32, s32); extern void BgColorCallNullsub4(void); -extern void DeoxysScreenFlash(void); extern void sub_8085EB0(void); extern void sub_8049884(void); extern void sub_8049B8C(void); @@ -400,6 +399,9 @@ extern void sub_80460F8(DungeonPos *, Item *, u8); extern u8 sub_8044B28(void); extern bool8 sub_8085B80(struct_8085B80 *); +void sub_808BBA8(Entity * ); +void DeoxysScreenFlash(void); +void sub_8086A54(Entity *); void ZapdosScreenFlash(s32 numFlashes); void ZapdosDropInEffect(Entity *); void SetupDeoxysFightHP(Entity *r0); diff --git a/src/dungeon_map_access.c b/src/dungeon_map_access.c index 5c28d0cd5..7977d334d 100644 --- a/src/dungeon_map_access.c +++ b/src/dungeon_map_access.c @@ -39,8 +39,6 @@ EWRAM_DATA_2 const Tile *gCurTilesetOobTile = {0}; extern u8 sub_8043CE4(u32); extern void sub_80402AC(s32, s32); extern int sprintf(char *, const char *, ...); -void sub_8049BB0(s32, s32); -void sub_80498A8(s32, s32); const Tile *GetTile(s32 x, s32 y) { diff --git a/src/dungeon_move.c b/src/dungeon_move.c index d654f04e8..131da29b6 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -69,206 +69,207 @@ extern void MarkLastUsedMonMove(Entity *entity, Move *move); extern s32 sub_8057070(Move *move); extern bool8 MoveRequiresCharging(Entity* pokemon,u16 param_2); extern s32 sub_800ED20(u16 param_1); -extern bool32 sub_8058F04(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern void sub_8042930(Entity *r0); extern void sub_8041B48(Entity *pokemon); extern void sub_8041BA8(Entity *pokemon); extern void sub_8042950(Entity *r0); -extern bool8 sub_8057634(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern void sub_80421C0(Entity *pokemon, u16 r1); +extern bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 YawnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 NightmareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805783C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057974(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PainSplitMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057BC4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057C88(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 WhirlpoolMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057D7C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057D9C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FakeTearsMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SpiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057FCC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057FF4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805805C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805816C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80581D0(Entity *pokemon, Entity *target, Move *move, u32 param_4); -extern bool8 sub_8058B3C(Entity *pokemon, Entity *target, Move *move, u32 param_4); -extern bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80582C4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80583D8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058430(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058478(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80584C0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058548(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ReturnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4); +extern bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4); +extern bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058638(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80586DC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058770(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80587E8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058838(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058858(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80588B8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80588F4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058930(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 GigaDrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ReversalMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SmellingSaltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058A18(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058BF0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058FBC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80590D4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059190(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80591E4(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059424(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805946C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059540(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80595A0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805C138(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80598CC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059928(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059988(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 OneShotOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059AA8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059AB8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059AF8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059D00(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059D48(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059D98(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059DA4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059DB4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059DC4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059E0C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A120(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A210(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A258(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A3DC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A464(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 FocusEnergyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A688(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD04(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD34(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD54(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AE3C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AE74(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AECC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AFA4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B028(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B074(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B0BC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B264(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B324(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B388(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B3E0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B454(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B53C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B668(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B910(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B808(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A408(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059050(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059FC8(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); -extern bool8 sub_8059E54(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); +extern bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); +extern bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); extern void SetShopkeeperAggression(Entity *, Entity *); extern bool8 MoveCausesPaused(Move *move); extern void sub_8069F9C(Entity *pokemon,Entity * target,Move *move); extern void sub_806A120(Entity *pokemon,Entity * target,Move *move); extern bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); -extern bool8 sub_805B3FC(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); -extern bool8 sub_805A5E8(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); -extern bool8 sub_8058B84(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059714(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80576F8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059080(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059D58(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B164(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059A18(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MetalClawMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); +extern bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); +extern bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SonicboomMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BasicSleepMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 TailGlowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80582D4(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059B94(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B3B4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059588(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A2B0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B2FC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 CalmMindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DefenseCurlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058A7C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057F7C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057ED0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058CEC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A2C8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057C68(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SolarBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058D38(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 LightScreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057F24(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80589D4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059AC4(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A4D4(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058A08(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805836C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 RazorWindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 FocusPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MagicCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057748(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MorningSunMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MudWaterSportMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A4FC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058C48(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SpikesMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80588A8(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057E6C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059CF0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80582AC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058A54(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 VitalThrowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 FlyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059F38(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BounceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 DiveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 DigMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057824(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805825C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 GrudgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A4C0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805AAD0(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805B314(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 ProtectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059004(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80597F0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ExplosionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058D44(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 WaterSpoutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -276,27 +277,27 @@ extern bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s3 extern bool8 InvisifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MirrorCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PerishSongMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057CD0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 WeatherBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BellyDrumMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80578FC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057BB4(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TransformMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058234(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A85C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 SplashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 ReboundOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8057E50(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 ConversionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SnatchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 HandleColorChange(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PsychUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B618(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 MetronomeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); s32 HandleDamagingMove(Entity *, Entity *, Move *, s32, s32); @@ -616,10 +617,10 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move switch (moveId) { case MOVE_HI_JUMP_KICK: - sub_8059FC8(attacker, currTarget, move, itemId, 1); + HiJumpKickMoveAction(attacker, currTarget, move, itemId, 1); break; case MOVE_JUMP_KICK: - sub_8059E54(attacker, currTarget, move, itemId, 1); + JumpKickMoveAction(attacker, currTarget, move, itemId, 1); break; } @@ -724,29 +725,29 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, 0, itemId) != 0); break; case MOVE_EARTHQUAKE: - moveHadEffect = sub_8058F04(attacker, currTarget, move, itemId); + moveHadEffect = EarthquakeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_GUST: - moveHadEffect = sub_8058270(attacker, currTarget, move, itemId); + moveHadEffect = GustMoveAction(attacker, currTarget, move, itemId); break; case MOVE_STRUGGLE: - moveHadEffect = sub_805B968(attacker, currTarget, move, itemId); + moveHadEffect = StruggleMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FLAME_WHEEL: - moveHadEffect = sub_805816C(attacker, currTarget, move, itemId); + moveHadEffect = FlameWheelMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FLAMETHROWER: case MOVE_FIRE_BLAST: case MOVE_HEAT_WAVE: case MOVE_EMBER: case MOVE_FIRE_PUNCH: - moveHadEffect = sub_80581D0(attacker, currTarget, move, itemId); + moveHadEffect = BasicFireMoveAction(attacker, currTarget, move, itemId); break; case MOVE_POWDER_SNOW: case MOVE_BLIZZARD: case MOVE_ICE_PUNCH: case MOVE_ICE_BEAM: - moveHadEffect = sub_8058B3C(attacker, currTarget, move, itemId); + moveHadEffect = BasicIceMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FRENZY_PLANT: case MOVE_HYDRO_CANNON: @@ -766,14 +767,14 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, 0x100, itemId) != 0); break; case MOVE_FISSURE: - moveHadEffect = sub_80590D4(attacker, currTarget, move, itemId); + moveHadEffect = FissureMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SHEER_COLD: case MOVE_GUILLOTINE: moveHadEffect = sub_80595EC(attacker, currTarget, move, itemId); break; case MOVE_ONE_SHOT: - moveHadEffect = sub_805C138(attacker, currTarget, move, itemId); + moveHadEffect = OneShotOrbAction(attacker, currTarget, move, itemId); break; case MOVE_CLAMP: case MOVE_BIND: @@ -794,7 +795,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move case MOVE_POISON_STING: case MOVE_SLUDGE: case MOVE_SLUDGE_BOMB: - moveHadEffect = sub_8059E0C(attacker, currTarget, move, itemId); + moveHadEffect = PoisonStingMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PSYCHIC: moveHadEffect = sub_8058C98(attacker, currTarget, move, gUnknown_8106A50, itemId); @@ -803,16 +804,16 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_8058C98(attacker, currTarget, move, gUnknown_8106A4C, itemId); break; case MOVE_METAL_CLAW: - moveHadEffect = sub_805B3FC(attacker, currTarget, move, gUnknown_8106A4C, itemId); + moveHadEffect = MetalClawMoveAction(attacker, currTarget, move, gUnknown_8106A4C, itemId); break; case MOVE_STEEL_WING: - moveHadEffect = sub_805A5E8(attacker, currTarget, move, gUnknown_8106A4C, itemId); + moveHadEffect = SteelWingMoveAction(attacker, currTarget, move, gUnknown_8106A4C, itemId); break; case MOVE_POISON_TAIL: - moveHadEffect = sub_805B074(attacker, currTarget, move, itemId); + moveHadEffect = PoisonTailMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TWISTER: - moveHadEffect = sub_8059928(attacker, currTarget, move, itemId); + moveHadEffect = TwisterMoveAction(attacker, currTarget, move, itemId); break; case MOVE_CONSTRICT: case MOVE_BUBBLEBEAM: @@ -820,7 +821,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move break; case MOVE_SILVER_WIND: case MOVE_ANCIENTPOWER: - moveHadEffect = sub_8058930(attacker, currTarget, move, itemId); + moveHadEffect = AncientPowerMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PSYBEAM: case MOVE_SIGNAL_BEAM: @@ -828,50 +829,50 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_8058C00(attacker, currTarget, move, itemId); break; case MOVE_MIST_BALL: - moveHadEffect = sub_805B324(attacker, currTarget, move, itemId); + moveHadEffect = MistBallMoveAction(attacker, currTarget, move, itemId); break; case MOVE_LUSTER_PURGE: - moveHadEffect = sub_805B910(attacker, currTarget, move, itemId); + moveHadEffect = LusterPurgeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_CRUSH_CLAW: - moveHadEffect = sub_805AE74(attacker, currTarget, move, itemId); + moveHadEffect = CrushClawMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SMOG: - moveHadEffect = sub_8059540(attacker, currTarget, move, itemId); + moveHadEffect = SmogMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SACRED_FIRE: - moveHadEffect = sub_80595A0(attacker, currTarget, move, itemId); + moveHadEffect = SacredFireMoveAction(attacker, currTarget, move, itemId); break; case MOVE_THUNDERSHOCK: - moveHadEffect = sub_8059D00(attacker, currTarget, move, itemId); + moveHadEffect = ThundershockMoveAction(attacker, currTarget, move, itemId); break; case MOVE_LICK: case MOVE_SPARK: case MOVE_BODY_SLAM: case MOVE_DRAGONBREATH: - moveHadEffect = sub_8058FBC(attacker, currTarget, move, itemId); + moveHadEffect = LickMoveAction(attacker, currTarget, move, itemId); break; case MOVE_EXTRASENSORY: case MOVE_HYPER_FANG: case MOVE_BONE_CLUB: - moveHadEffect = sub_8059190(attacker, currTarget, move, itemId); + moveHadEffect = ExtrasensoryMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BITE: case MOVE_NEEDLE_ARM: case MOVE_STOMP: case MOVE_ROLLING_KICK: - moveHadEffect = sub_8058430(attacker, currTarget, move, itemId); + moveHadEffect = BiteMoveAction(attacker, currTarget, move, itemId); break; case MOVE_HEADBUTT: - moveHadEffect = sub_8059424(attacker, currTarget, move, itemId); + moveHadEffect = HeadbuttMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ROCK_SLIDE: case MOVE_ASTONISH: - moveHadEffect = sub_8057C88(attacker, currTarget, move, itemId); + moveHadEffect = RockSlideMoveAction(attacker, currTarget, move, itemId); break; case MOVE_CRUNCH: case MOVE_SHADOW_BALL: - moveHadEffect = sub_80583D8(attacker, currTarget, move, itemId); + moveHadEffect = ShadowBallMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DIZZY_PUNCH: case MOVE_WATER_PULSE: @@ -881,32 +882,32 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = TriAttackMoveAction(attacker, currTarget, move, itemId); break; case MOVE_METEOR_MASH: - moveHadEffect = sub_8058B84(attacker, currTarget, move, itemId); + moveHadEffect = MeteorMashMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BLAZE_KICK: - moveHadEffect = sub_805AECC(attacker, currTarget, move, itemId); + moveHadEffect = BlazeKickMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ATTRACT: - moveHadEffect = sub_805B454(attacker, currTarget, move, itemId); + moveHadEffect = AttractMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DISABLE: - moveHadEffect = sub_80582C4(attacker, currTarget, move, itemId); + moveHadEffect = DisableMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FAKE_OUT: - moveHadEffect = sub_805A408(attacker, currTarget, move, itemId); + moveHadEffect = FakeOutMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SONICBOOM: - moveHadEffect = sub_8059714(attacker, currTarget, move, itemId); + moveHadEffect = SonicboomMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DRAGON_RAGE: - moveHadEffect = sub_805B808(attacker, currTarget, move, itemId); + moveHadEffect = DragonRageMoveAction(attacker, currTarget, move, itemId); break; case MOVE_STUN_SPORE: - moveHadEffect = sub_8059050(attacker, currTarget, move, itemId); + moveHadEffect = StunSporeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_THUNDER: case MOVE_THUNDERPUNCH: - moveHadEffect = sub_8058478(attacker, currTarget, move, itemId); + moveHadEffect = ThunderMoveAction(attacker, currTarget, move, itemId); break; case MOVE_LOVELY_KISS: case MOVE_SING: @@ -914,70 +915,70 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move case MOVE_GRASSWHISTLE: case MOVE_HYPNOSIS: case MOVE_SLEEP_POWDER: - moveHadEffect = sub_80576F8(attacker, currTarget, move, itemId); + moveHadEffect = BasicSleepMoveAction(attacker, currTarget, move, itemId); break; case MOVE_YAWN: moveHadEffect = YawnMoveAction(attacker, currTarget, move, itemId); break; case MOVE_THUNDERBOLT: - moveHadEffect = sub_8059080(attacker, currTarget, move, itemId); + moveHadEffect = ThunderboltMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BLOCK: - moveHadEffect = sub_8059D98(attacker, currTarget, move, itemId); + moveHadEffect = BlockMoveAction(attacker, currTarget, move, itemId); break; case MOVE_HORN_DRILL: - moveHadEffect = sub_8059AF8(attacker, currTarget, move, itemId); + moveHadEffect = HornDrillMoveAction(attacker, currTarget, move, itemId); break; case MOVE_CONFUSE_RAY: case MOVE_SUPERSONIC: case MOVE_SWEET_KISS: case MOVE_TEETER_DANCE: case MOVE_TOTTER: - moveHadEffect = sub_8059AA8(attacker, currTarget, move, itemId); + moveHadEffect = SupersonicMoveAction(attacker, currTarget, move, itemId); break; case MOVE_POISON_GAS: case MOVE_POISONPOWDER: - moveHadEffect = sub_8059DA4(attacker, currTarget, move, itemId); + moveHadEffect = PoisonGasMoveAction(attacker, currTarget, move, itemId); break; case MOVE_THUNDER_WAVE: - moveHadEffect = sub_8059D48(attacker, currTarget, move, itemId); + moveHadEffect = ThunderWaveMoveAction(attacker, currTarget, move, itemId); break; case MOVE_GLARE: - moveHadEffect = sub_805B028(attacker, currTarget, move, itemId); + moveHadEffect = GlareMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ZAP_CANNON: - moveHadEffect = sub_8059D58(attacker, currTarget, move, itemId); + moveHadEffect = ZapCannonMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SUPERPOWER: - moveHadEffect = TickleMoveAction(attacker, currTarget, move, itemId); + moveHadEffect = SuperpowerMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ROCK_TOMB: case MOVE_ICY_WIND: case MOVE_MUD_SHOT: - moveHadEffect = sub_8058638(attacker, currTarget, move, itemId); + moveHadEffect = RockTombMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DYNAMICPUNCH: - moveHadEffect = sub_805A688(attacker, currTarget, move, itemId); + moveHadEffect = DynamicPunchMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FAKE_TEARS: - moveHadEffect = sub_8057D7C(attacker, currTarget, move, itemId); + moveHadEffect = FakeTearsMoveAction(attacker, currTarget, move, itemId); break; case MOVE_WHIRLWIND: case MOVE_ROAR: case MOVE_BLOWBACK: - moveHadEffect = sub_805B0BC(attacker, currTarget, move, itemId); + moveHadEffect = RoarMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PAIN_SPLIT: moveHadEffect = PainSplitMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TAIL_GLOW: - moveHadEffect = sub_805B164(attacker, currTarget, move, itemId); + moveHadEffect = TailGlowMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MINIMIZE: - moveHadEffect = sub_8059A18(attacker, currTarget, move, itemId); + moveHadEffect = MinimizeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DRAGON_DANCE: - moveHadEffect = sub_805B884(attacker, currTarget, move, itemId); + moveHadEffect = DragonDanceMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BULK_UP: moveHadEffect = BulkUpMoveAction(attacker, currTarget, move, itemId); @@ -985,25 +986,25 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move case MOVE_SHARPEN: case MOVE_HOWL: case MOVE_MEDITATE: - moveHadEffect = sub_80582D4(attacker, currTarget, move, itemId); + moveHadEffect = BasicRaiseAttackMoveAction(attacker, currTarget, move, itemId); break; case MOVE_RAGE: moveHadEffect = RageMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SWORDS_DANCE: - moveHadEffect = sub_8059B94(attacker, currTarget, move, itemId); + moveHadEffect = SwordsDanceMoveAction(attacker, currTarget, move, itemId); break; case MOVE_CALM_MIND: - moveHadEffect = sub_805B3B4(attacker, currTarget, move, itemId); + moveHadEffect = CalmMindMoveAction(attacker, currTarget, move, itemId); break; case MOVE_GROWTH: - moveHadEffect = sub_8059588(attacker, currTarget, move, itemId); + moveHadEffect = GrowthMoveAction(attacker, currTarget, move, itemId); break; case MOVE_AMNESIA: - moveHadEffect = sub_805A2B0(attacker, currTarget, move, itemId); + moveHadEffect = AmnesiaMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DEFENSE_CURL: - moveHadEffect = sub_805B2FC(attacker, currTarget, move, itemId); + moveHadEffect = DefenseCurlMoveAction(attacker, currTarget, move, itemId); break; case MOVE_IRON_DEFENSE: case MOVE_ACID_ARMOR: @@ -1011,32 +1012,32 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_8059CD8(attacker, currTarget, move, itemId); break; case MOVE_COSMIC_POWER: - moveHadEffect = sub_8058A7C(attacker, currTarget, move, itemId); + moveHadEffect = CosmicPowerMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MUDDY_WATER: - moveHadEffect = sub_80598CC(attacker, currTarget, move, itemId); + moveHadEffect = MuddyWaterMoveAction(attacker, currTarget, move, itemId); break; case MOVE_OCTAZOOKA: - moveHadEffect = sub_8057F7C(attacker, currTarget, move, itemId); + moveHadEffect = OctazookaMoveAction(attacker, currTarget, move, itemId); break; case MOVE_AURORA_BEAM: - moveHadEffect = sub_8057ED0(attacker, currTarget, move, itemId); + moveHadEffect = AuroraBeamMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PSYCHO_BOOST: - moveHadEffect = sub_8058CEC(attacker, currTarget, move, itemId); + moveHadEffect = PsychoBoostMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SCARY_FACE: case MOVE_COTTON_SPORE: - moveHadEffect = sub_8058BF0(attacker, currTarget, move, itemId); + moveHadEffect = ScaryFaceMoveAction(attacker, currTarget, move, itemId); break; case MOVE_GROWL: - moveHadEffect = sub_805A2C8(attacker, currTarget, move, itemId); + moveHadEffect = GrowlMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FEATHERDANCE: - moveHadEffect = sub_805AD34(attacker, currTarget, move, itemId); + moveHadEffect = FeatherDanceMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SCREECH: - moveHadEffect = sub_8057C68(attacker, currTarget, move, itemId); + moveHadEffect = ScreechMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SEISMIC_TOSS: case MOVE_NIGHT_SHADE: @@ -1045,10 +1046,10 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move case MOVE_GIGA_DRAIN: case MOVE_LEECH_LIFE: case MOVE_MEGA_DRAIN: - moveHadEffect = sub_80586DC(attacker, currTarget, move, itemId); + moveHadEffect = GigaDrainMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DOUBLE_EDGE: - moveHadEffect = sub_805946C(attacker, currTarget, move, itemId); + moveHadEffect = DoubleEdgeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SUBMISSION: case MOVE_TAKE_DOWN: @@ -1056,16 +1057,16 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_8058E5C(attacker, currTarget, move, itemId); break; case MOVE_ABSORB: - moveHadEffect = sub_80591E4(attacker, currTarget, move, itemId); + moveHadEffect = AbsorbMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SWAGGER: - moveHadEffect = sub_8057BC4(attacker, currTarget, move, itemId); + moveHadEffect = SwaggerMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TRIPLE_KICK: - moveHadEffect = sub_805A210(attacker, currTarget, move, itemId); + moveHadEffect = TripleKickMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TWINEEDLE: - moveHadEffect = sub_8059988(attacker, currTarget, move, itemId); + moveHadEffect = TwineedleMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SOLARBEAM: moveHadEffect = SolarBeamMoveAction(attacker, currTarget, move, itemId); @@ -1074,20 +1075,20 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = SkyAttackMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SLOW_DOWN: - moveHadEffect = sub_805BE90(attacker, currTarget, move, itemId); + moveHadEffect = SlowDownMoveAction(attacker, currTarget, move, itemId); break; case MOVE_OUTRAGE: case MOVE_PETAL_DANCE: - moveHadEffect = sub_80588B8(attacker, currTarget, move, itemId); + moveHadEffect = OutrageMoveAction(attacker, currTarget, move, itemId); break; case MOVE_WRAP: moveHadEffect = WrapMoveAction(attacker, currTarget, move, itemId); break; case MOVE_UPROAR: - moveHadEffect = sub_8058D38(attacker, currTarget, move, itemId); + moveHadEffect = UproarMoveAction(attacker, currTarget, move, itemId); break; case MOVE_POISON_FANG: - moveHadEffect = sub_8059DC4(attacker, currTarget, move, itemId); + moveHadEffect = PoisonFangMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PRESENT: moveHadEffect = PresentMoveAction(attacker, currTarget, move, itemId); @@ -1112,20 +1113,20 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_805768C(attacker, currTarget, move, itemId); break; case MOVE_MEMENTO: - moveHadEffect = sub_8057F24(attacker, currTarget, move, itemId); + moveHadEffect = MementoMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SOFTBOILED: case MOVE_MILK_DRINK: moveHadEffect = sub_80599EC(attacker, currTarget, move, itemId); break; case MOVE_SYNTHESIS: - moveHadEffect = sub_80589D4(attacker, currTarget, move, itemId); + moveHadEffect = SynthesisMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MOONLIGHT: - moveHadEffect = sub_8059AC4(attacker, currTarget, move, itemId); + moveHadEffect = MoonlightMoveAction(attacker, currTarget, move, itemId); break; case MOVE_REST: - moveHadEffect = sub_805A4D4(attacker, currTarget, move, itemId); + moveHadEffect = RestMoveAction(attacker, currTarget, move, itemId); break; case MOVE_RECOVER: case MOVE_SLACK_OFF: @@ -1135,18 +1136,18 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = ScannerOrbAction(attacker, currTarget, move, itemId); break; case MOVE_TRICK: - moveHadEffect = sub_805A120(attacker, currTarget, move, itemId); + moveHadEffect = TrickMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TAKEAWAY: - moveHadEffect = sub_805BA50(attacker, currTarget, move, itemId); + moveHadEffect = ThiefAction(attacker, currTarget, move, itemId); break; case MOVE_THIEF: case MOVE_COVET: - moveHadEffect = sub_805A2A0(attacker, currTarget, move, itemId); + moveHadEffect = ThiefMoveAction(attacker, currTarget, move, itemId); break; case MOVE_AGILITY: case MOVE_SPEED_BOOST: - moveHadEffect = sub_8058A08(attacker, currTarget, move, itemId); + moveHadEffect = AgilityMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PURSUIT: case MOVE_COUNTER: @@ -1157,7 +1158,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = BideMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BIDE_2: - moveHadEffect = sub_805836C(attacker, currTarget, move, itemId); + moveHadEffect = Bide2MoveAction(attacker, currTarget, move, itemId); break; case MOVE_TRAPPER: moveHadEffect = TrapperOrbAction(attacker, currTarget, move, itemId); @@ -1169,13 +1170,13 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = CurseMoveAction(attacker, currTarget, move, itemId); break; case MOVE_HI_JUMP_KICK: - moveHadEffect = sub_8059FC8(attacker, currTarget, move, itemId, 0); + moveHadEffect = HiJumpKickMoveAction(attacker, currTarget, move, itemId, 0); break; case MOVE_BLAST_BURN: - moveHadEffect = sub_805AE3C(attacker, currTarget, move, itemId); + moveHadEffect = BlastBurnMoveAction(attacker, currTarget, move, itemId); break; case MOVE_HIDDEN_POWER: - moveHadEffect = sub_805B3E0(attacker, currTarget, move, itemId); + moveHadEffect = HiddenPowerMoveAction(attacker, currTarget, move, itemId); break; case MOVE_RAZOR_WIND: moveHadEffect = RazorWindMoveAction(attacker, currTarget, move, itemId); @@ -1190,30 +1191,30 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = NightmareMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MORNING_SUN: - moveHadEffect = sub_8057748(attacker, currTarget, move, itemId); + moveHadEffect = MorningSunMoveAction(attacker, currTarget, move, itemId); break; case MOVE_VACUUM_CUT: - moveHadEffect = sub_805C1BC(attacker, currTarget, move, itemId); + moveHadEffect = VacuumCutMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MUD_SPORT: case MOVE_WATER_SPORT: moveHadEffect = MudWaterSportMoveAction(attacker, currTarget, move, itemId); break; case MOVE_IRON_TAIL: - moveHadEffect = sub_8057634(attacker, currTarget, move, itemId); + moveHadEffect = IronTailMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TAIL_WHIP: case MOVE_LEER: - moveHadEffect = sub_805A3DC(attacker, currTarget, move, itemId); + moveHadEffect = LeerMoveAction(attacker, currTarget, move, itemId); break; case MOVE_WILL_O_WISP: - moveHadEffect = sub_8057FF4(attacker, currTarget, move, itemId); + moveHadEffect = WillOWispMoveAction(attacker, currTarget, move, itemId); break; case MOVE_INGRAIN: - moveHadEffect = sub_805A4FC(attacker, currTarget, move, itemId); + moveHadEffect = IngrainMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PSYWAVE: - moveHadEffect = sub_8058C48(attacker, currTarget, move, itemId); + moveHadEffect = PsywaveMoveAction(attacker, currTarget, move, itemId); break; case MOVE_LEECH_SEED: moveHadEffect = LeechSeedMoveAction(attacker, currTarget, move, itemId); @@ -1227,19 +1228,19 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_80578EC(attacker, currTarget, move, itemId); break; case MOVE_HAZE: - moveHadEffect = sub_80588A8(attacker, currTarget, move, itemId); + moveHadEffect = HazeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_POWER_EARS: moveHadEffect = RadarOrbAction(attacker, currTarget, move, itemId); break; case MOVE_SIESTA: - moveHadEffect = sub_805BC70(attacker, currTarget, move, itemId); + moveHadEffect = SlumberOrbAction(attacker, currTarget, move, itemId); break; case MOVE_SMELLINGSALT: - moveHadEffect = sub_80587E8(attacker, currTarget, move, itemId); + moveHadEffect = SmellingSaltMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MAGNITUDE: - moveHadEffect = sub_805B264(attacker, currTarget, move, itemId); + moveHadEffect = MagnitudeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SKULL_BASH: moveHadEffect = SkullBashMoveAction(attacker, currTarget, move, itemId); @@ -1248,10 +1249,10 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = WishMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FLATTER: - moveHadEffect = sub_8057FCC(attacker, currTarget, move, itemId); + moveHadEffect = FlatterMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MUD_SLAP: - moveHadEffect = sub_805A258(attacker, currTarget, move, itemId); + moveHadEffect = MudSlapMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SAND_ATTACK: case MOVE_KINESIS: @@ -1259,35 +1260,35 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_8059528(attacker, currTarget, move, itemId); break; case MOVE_OVERHEAT: - moveHadEffect = sub_8057E6C(attacker, currTarget, move, itemId); + moveHadEffect = OverheatMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TOXIC: - moveHadEffect = sub_8059DB4(attacker, currTarget, move, itemId); + moveHadEffect = ToxicMoveAction(attacker, currTarget, move, itemId); break; case MOVE_METAL_SOUND: - moveHadEffect = sub_8058838(attacker, currTarget, move, itemId); + moveHadEffect = MetalSoundMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TORMENT: moveHadEffect = TormentMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SUPER_FANG: - moveHadEffect = sub_8057974(attacker, currTarget, move, itemId); + moveHadEffect = SuperFangMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FALSE_SWIPE: - moveHadEffect = sub_805B388(attacker, currTarget, move, itemId); + moveHadEffect = FalseSwipeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TWO_EDGE: - moveHadEffect = sub_805BC98(attacker, currTarget, move, itemId); + moveHadEffect = TwoEdgeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ENDEAVOR: - moveHadEffect = sub_80584C0(attacker, currTarget, move, itemId); + moveHadEffect = EndeavorMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BATON_PASS: case MOVE_SWITCHER: - moveHadEffect = sub_805BB74(attacker, currTarget, move, itemId); + moveHadEffect = SwitcherOrbAction(attacker, currTarget, move, itemId); break; case MOVE_DREAM_EATER: - moveHadEffect = sub_805B668(attacker, currTarget, move, itemId); + moveHadEffect = DreamEaterMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SEARCHLIGHT: moveHadEffect = LuminousOrbAction(attacker, currTarget, move, itemId); @@ -1297,10 +1298,10 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move break; case MOVE_TELEPORT: case MOVE_WARP: - moveHadEffect = sub_8059CF0(attacker, currTarget, move, itemId); + moveHadEffect = WarpMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DROUGHT: - moveHadEffect = sub_805BF34(attacker, currTarget, move, itemId); + moveHadEffect = DroughtOrbAction(attacker, currTarget, move, itemId); break; case MOVE_SEE_STAIRS: moveHadEffect = StairsOrbAction(attacker, currTarget, move, itemId); @@ -1310,11 +1311,11 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move break; case MOVE_HARDEN: case MOVE_WITHDRAW: - moveHadEffect = sub_80582AC(attacker, currTarget, move, itemId); + moveHadEffect = BasicRaiseDefenseMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MIND_READER: case MOVE_LOCK_ON: - moveHadEffect = sub_8058A54(attacker, currTarget, move, itemId); + moveHadEffect = SureShotMoveAction(attacker, currTarget, move, itemId); break; case MOVE_VITAL_THROW: moveHadEffect = VitalThrowMoveAction(attacker, currTarget, move, itemId); @@ -1323,7 +1324,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = FlyMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BOUNCE: - moveHadEffect = sub_8059F38(attacker, currTarget, move, itemId); + moveHadEffect = BounceMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DIVE: moveHadEffect = DiveMoveAction(attacker, currTarget, move, itemId); @@ -1332,10 +1333,10 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = DigMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SWEET_SCENT: - moveHadEffect = sub_8057824(attacker, currTarget, move, itemId); + moveHadEffect = SweetScentMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DOUBLE_TEAM: - moveHadEffect = sub_805825C(attacker, currTarget, move, itemId); + moveHadEffect = DoubleTeamMoveAction(attacker, currTarget, move, itemId); break; case MOVE_KNOCK_OFF: moveHadEffect = KnockOffMoveAction(attacker, currTarget, move, itemId); @@ -1356,7 +1357,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = PetrifyOrbAction(attacker, currTarget, move, itemId); break; case MOVE_ASSIST: - moveHadEffect = sub_805A4C0(attacker, currTarget, move, itemId); + moveHadEffect = AssistMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DOOM_DESIRE: case MOVE_FUTURE_SIGHT: @@ -1371,42 +1372,42 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_805B314(attacker, currTarget, move, itemId); break; case MOVE_JUMP_KICK: - moveHadEffect = sub_8059E54(attacker, currTarget, move, itemId, 0); + moveHadEffect = JumpKickMoveAction(attacker, currTarget, move, itemId, 0); break; case MOVE_PROTECT: case MOVE_DETECT: moveHadEffect = ProtectMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TAUNT: - moveHadEffect = sub_8059AB8(attacker, currTarget, move, itemId); + moveHadEffect = TauntMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TICKLE: - moveHadEffect = sub_8058858(attacker, currTarget, move, itemId); + moveHadEffect = TickleMoveAction(attacker, currTarget, move, itemId); break; case MOVE_REVERSAL: case MOVE_FLAIL: - moveHadEffect = sub_8058770(attacker, currTarget, move, itemId); + moveHadEffect = ReversalMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SELFDESTRUCT: - moveHadEffect = sub_8059004(attacker, currTarget, move, itemId); + moveHadEffect = SelfDestructMoveAction(attacker, currTarget, move, itemId); break; case MOVE_EXPLOSION: - moveHadEffect = sub_80597F0(attacker, currTarget, move, itemId); + moveHadEffect = ExplosionMoveAction(attacker, currTarget, move, itemId); break; case MOVE_CHARGE: moveHadEffect = ChargeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_FACADE: - moveHadEffect = sub_8058548(attacker, currTarget, move, itemId); + moveHadEffect = FacadeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_LOW_KICK: - moveHadEffect = sub_80588F4(attacker, currTarget, move, itemId); + moveHadEffect = LowKickMoveAction(attacker, currTarget, move, itemId); break; case MOVE_WATER_SPOUT: - moveHadEffect = sub_8058D44(attacker, currTarget, move, itemId); + moveHadEffect = WaterSpoutMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ERUPTION: - moveHadEffect = sub_805AFA4(attacker, currTarget, move, itemId); + moveHadEffect = EruptionMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SMOKESCREEN: moveHadEffect = SmokescreenMoveAction(attacker, currTarget, move, itemId); @@ -1427,7 +1428,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = RainDanceMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SPITE: - moveHadEffect = sub_8057D9C(attacker, currTarget, move, itemId); + moveHadEffect = SpiteMoveAction(attacker, currTarget, move, itemId); break; case MOVE_INVISIFY: moveHadEffect = InvisifyOrbAction(attacker, currTarget, move, itemId); @@ -1439,7 +1440,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = PerishSongMoveAction(attacker, currTarget, move, itemId); break; case MOVE_RAPID_SPIN: - moveHadEffect = sub_8058A18(attacker, currTarget, move, itemId); + moveHadEffect = RapidSpinMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DESTINY_BOND: moveHadEffect = DestinyBondMoveAction(attacker, currTarget, move, itemId); @@ -1448,16 +1449,16 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = EncoreMoveAction(attacker, currTarget, move, itemId); break; case MOVE_WEATHER_BALL: - moveHadEffect = sub_8057CD0(attacker, currTarget, move, itemId); + moveHadEffect = WeatherBallMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SUNNY_DAY: moveHadEffect = SunnyDayMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PAY_DAY: - moveHadEffect = sub_805A464(attacker, currTarget, move, itemId); + moveHadEffect = PayDayMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ONE_ROOM: - moveHadEffect = sub_805C2A0(attacker, currTarget, move, itemId); + moveHadEffect = OneRoomOrbAction(attacker, currTarget, move, itemId); break; case MOVE_ENDURE: moveHadEffect = EndureMoveAction(attacker, currTarget, move, itemId); @@ -1472,13 +1473,13 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = sub_805C288(attacker, currTarget, move, itemId); break; case MOVE_CHARM: - moveHadEffect = sub_805783C(attacker, currTarget, move, itemId); + moveHadEffect = CharmMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BUBBLE: - moveHadEffect = sub_80578FC(attacker, currTarget, move, itemId); + moveHadEffect = BubbleMoveAction(attacker, currTarget, move, itemId); break; case MOVE_STRING_SHOT: - moveHadEffect = sub_8057BB4(attacker, currTarget, move, itemId); + moveHadEffect = StringShotMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ROCK_SMASH: case MOVE_EXCAVATE: @@ -1495,32 +1496,32 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move break; case MOVE_ODOR_SLEUTH: case MOVE_FORESIGHT: - moveHadEffect = sub_8058234(attacker, currTarget, move, itemId); + moveHadEffect = ExposeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SPLASH: - moveHadEffect = sub_805A85C(attacker, currTarget, move, itemId); + moveHadEffect = SplashMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TRANSFER: moveHadEffect = TransferOrbAction(attacker, currTarget, move, itemId); break; case MOVE_STAY_AWAY: - moveHadEffect = sub_805BB98(attacker, currTarget, move, itemId); + moveHadEffect = StayawayOrbAction(attacker, currTarget, move, itemId); break; case MOVE_BEAT_UP: - moveHadEffect = sub_805AD54(attacker, currTarget, move, itemId); + moveHadEffect = BeatUpMoveAction(attacker, currTarget, move, itemId); break; case MOVE_REBOUND: moveHadEffect = ReboundOrbAction(attacker, currTarget, move, itemId); break; case MOVE_IMPRISON: case MOVE_OBSERVER: - moveHadEffect = sub_805AD04(attacker, currTarget, move, itemId); + moveHadEffect = ObserverOrbAction(attacker, currTarget, move, itemId); break; case MOVE_WILD_CALL: - moveHadEffect = sub_805C080(attacker, currTarget, move, itemId); + moveHadEffect = RollcallOrbAction(attacker, currTarget, move, itemId); break; case MOVE_REVIVER: - moveHadEffect = sub_805C1E4(attacker, currTarget, move, itemId); + moveHadEffect = ReviverOrbAction(attacker, currTarget, move, itemId); break; case MOVE_ESCAPE: moveHadEffect = EscapeOrbAction(attacker, currTarget, move, itemId); @@ -1532,13 +1533,13 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = NaturePowerMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ITEMIZE: - moveHadEffect = sub_805C3F8(attacker, currTarget, move, itemId); + moveHadEffect = ItemizeOrbAction(attacker, currTarget, move, itemId); break; case MOVE_SKETCH: moveHadEffect = SketchMoveAction(attacker, currTarget, move, itemId); break; case MOVE_MIRROR_MOVE: - moveHadEffect = sub_8057E50(attacker, currTarget, move, itemId); + moveHadEffect = MirrorMoveMoveAction(attacker, currTarget, move, itemId); break; case MOVE_ROLE_PLAY: moveHadEffect = RolePlayMoveAction(attacker, currTarget, move, itemId); @@ -1553,7 +1554,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = CleanseOrbAction(attacker, currTarget, move, itemId); break; case MOVE_RETURN: - moveHadEffect = sub_805805C(attacker, currTarget, move, itemId); + moveHadEffect = ReturnMoveAction(attacker, currTarget, move, itemId); break; case MOVE_SNATCH: moveHadEffect = SnatchMoveAction(attacker, currTarget, move, itemId); @@ -1562,7 +1563,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = HandleColorChange(attacker, currTarget, move, itemId); break; case MOVE_FRUSTRATION: - moveHadEffect = sub_805B53C(attacker, currTarget, move, itemId); + moveHadEffect = FrustrationMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PSYCH_UP: moveHadEffect = PsychUpMoveAction(attacker, currTarget, move, itemId); @@ -1577,7 +1578,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = SilenceOrbAction(attacker, currTarget, move, itemId); break; case MOVE_METRONOME: - moveHadEffect = sub_805B618(attacker, currTarget, move, itemId); + moveHadEffect = MetronomeMoveAction(attacker, currTarget, move, itemId); break; case MOVE_HP_GAUGE: moveHadEffect = IdentifyOrbAction(attacker, currTarget, move, itemId); @@ -1586,17 +1587,17 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = Conversion2MoveAction(attacker, currTarget, move, itemId); break; case MOVE_POUNCE: - moveHadEffect = sub_805BEB8(attacker, currTarget, move, itemId); + moveHadEffect = PounceOrbAction(attacker, currTarget, move, itemId); break; case MOVE_TRAWL: - moveHadEffect = sub_805BEC8(attacker, currTarget, move, itemId); + moveHadEffect = TrawlOrbAction(attacker, currTarget, move, itemId); break; case MOVE_MIMIC: moveHadEffect = MimicMoveAction(attacker, currTarget, move, itemId); break; case MOVE_STRENGTH: case MOVE_HURL: - moveHadEffect = sub_805C45C(attacker, currTarget, move, itemId); + moveHadEffect = HurlOrbAction(attacker, currTarget, move, itemId); break; case MOVE_ECHO: moveHadEffect = sub_805C208(attacker, currTarget, move, itemId); @@ -1643,7 +1644,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move if (!sub_8044B28()) { if (EntityExists(attacker) && GetEntInfo(attacker)->unk154 != 0) { GetEntInfo(attacker)->unk154 = 0; - sub_807D148(attacker, attacker, 0, NULL); + WarpTarget(attacker, attacker, 0, NULL); } if (EntityExists(attacker) && GetEntInfo(attacker)->unk155 != 0) { GetEntInfo(attacker)->unk155 = 0; @@ -1994,7 +1995,7 @@ static void TriggerTargetAbilityEffect(Entity *attacker) } if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_SLP) { LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF54); // Effect Spore scattered spores! - sub_8075C58(attacker, attacker, CalculateStatusTurns(attacker, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(attacker, attacker, CalculateStatusTurns(attacker, gUnknown_80F4E74, TRUE), TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_FLAME_BODY) { LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF74); // Flame Body caused a burn! diff --git a/src/move_actions.c b/src/move_actions.c index fbb367301..f571ec53f 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -193,8 +193,7 @@ extern void sub_806A6E8(Entity *); extern void EndAbilityImmuneStatus(Entity *, Entity *); extern u8 sub_806F4A4(Entity *, u32); -extern void sub_807DF38(Entity *pokemon, Entity *target, DungeonPos *pos, u32, - u8 moveType, s16); +extern void HandleExplosion(Entity *pokemon, Entity *target, DungeonPos *pos, u32, u8 moveType, s16); extern void nullsub_92(Entity *); extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5); extern u8 sub_807EAA0(u32, u32); @@ -273,7 +272,7 @@ u8 ToItemID(u32 itemID) return itemID; } -bool8 sub_8057634(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { bool8 flag; @@ -307,9 +306,10 @@ bool8 YawnMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4) return TRUE; } -bool8 sub_80576F8(Entity * pokemon, Entity *target, Move *move, s32 param_4) +// NOTE: Is there a better name for this? +bool8 BasicSleepMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4) { - sub_8075C58(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); return TRUE; } @@ -319,7 +319,7 @@ bool8 NightmareMoveAction(Entity * pokemon, Entity *target, Move *move, s32 para return TRUE; } -bool8 sub_8057748(Entity * pokemon,Entity * target, Move *move, s32 param_4) +bool8 MorningSunMoveAction(Entity * pokemon,Entity * target, Move *move, s32 param_4) { HealTargetHP(pokemon, target, gUnknown_80F502A[GetApparentWeather(pokemon)], 0, TRUE); return TRUE; @@ -354,13 +354,13 @@ bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) return flag; } -bool32 sub_8057824(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool32 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { LowerAccuracyStageTarget(pokemon,target,gUnknown_8106A50,TRUE); return TRUE; } -bool32 sub_805783C(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool32 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { ChangeAttackMultiplierTarget(pokemon,target,gUnknown_8106A4C,FloatToF248(0.5),TRUE); return TRUE; @@ -392,7 +392,7 @@ bool32 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 param_4) return TRUE; } -bool32 sub_80578FC(Entity *pokemon, Entity *target, Move * move, u32 param_4) +bool32 BubbleMoveAction(Entity *pokemon, Entity *target, Move * move, u32 param_4) { bool32 flag; @@ -419,7 +419,7 @@ bool32 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) return TRUE; } -bool32 sub_8057974(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool32 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { s32 newHP; bool8 local_24; @@ -518,13 +518,13 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 return isTormented; } -bool8 sub_8057BB4(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { LowerMovementSpeedTarget(pokemon, target, 1, TRUE); return TRUE; } -bool8 sub_8057BC4(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { ConfuseStatusTarget(pokemon, target, TRUE); RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2); @@ -550,13 +550,13 @@ bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, u32 param_4) return flag; } -bool8 sub_8057C68(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { ChangeDefenseMultiplierTarget(pokemon, target, gUnknown_8106A4C, FloatToF248(0.25), 1); return TRUE; } -bool8 sub_8057C88(Entity *pokemon, Entity *target, Move * move, u32 param_4) +bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move * move, u32 param_4) { bool8 flag; @@ -570,7 +570,7 @@ bool8 sub_8057C88(Entity *pokemon, Entity *target, Move * move, u32 param_4) return flag; } -bool32 sub_8057CD0(Entity * pokemon, Entity * target, Move * move, u32 param_4) +bool32 WeatherBallMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) { u32 weather; s32 flag; @@ -605,13 +605,13 @@ bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, u32 pa return flag; } -bool8 sub_8057D7C(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 FakeTearsMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 2, 1, TRUE); return TRUE; } -bool8 sub_8057D9C(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { s32 i; EntityInfo *targetInfo = GetEntInfo(target); @@ -648,14 +648,14 @@ bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par return TRUE; } -bool8 sub_8057E50(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { SendThawedMessage(pokemon, target); MirrorMoveStatusTarget(pokemon, target); return TRUE; } -bool8 sub_8057E6C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { EntityInfo *entityInfo; bool8 flag; @@ -672,7 +672,7 @@ bool8 sub_8057E6C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8057ED0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -687,7 +687,7 @@ bool8 sub_8057ED0(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8057F24(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { EntityInfo *entityInfo; @@ -699,7 +699,7 @@ bool8 sub_8057F24(Entity *pokemon, Entity *target, Move *move, s32 param_4) return TRUE; } -bool8 sub_8057F7C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -714,14 +714,14 @@ bool8 sub_8057F7C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8057FCC(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { ConfuseStatusTarget(pokemon, target, TRUE); RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1); return TRUE; } -bool8 sub_8057FF4(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { u8 flashFireStatus; @@ -744,7 +744,7 @@ bool8 sub_8057FF4(Entity *pokemon, Entity *target, Move *move, s32 param_4) return TRUE; } -bool8 sub_805805C(Entity * pokemon,Entity * target,Move * move,s32 param_4) +bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4) { s16 *psVar3; s32 index; @@ -799,7 +799,7 @@ bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 return TRUE; } -bool8 sub_805816C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -815,7 +815,8 @@ bool8 sub_805816C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_80581D0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +// NOTE: Do we have a better name for this?? +bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -831,7 +832,7 @@ bool8 sub_80581D0(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8058234(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { u16 uVar1; uVar1 = (move->id == MOVE_FORESIGHT) ? 0x7A : 0x51; @@ -839,13 +840,13 @@ bool8 sub_8058234(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_805825C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseAccuracyStageTarget(pokemon, target, gUnknown_8106A50); return TRUE; } -bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; u32 r3; @@ -859,19 +860,21 @@ bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_80582AC(Entity *pokemon, Entity *target, Move *move, u32 param_4) +// NOTE: Is there a better name for this? +bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1); return TRUE; } -bool8 sub_80582C4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { ParalyzeStatusTarget(pokemon, target, TRUE); return TRUE; } -bool8 sub_80582D4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +// NOTE: Is there a better name for this? +bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1); return TRUE; @@ -898,7 +901,7 @@ bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_805836C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { s32 iVar2; bool8 local_18; @@ -914,7 +917,7 @@ bool8 sub_805836C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return local_18; } -bool8 sub_80583D8(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -929,7 +932,7 @@ bool8 sub_80583D8(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8058430(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -944,7 +947,7 @@ bool8 sub_8058430(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8058478(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -959,7 +962,7 @@ bool8 sub_8058478(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_80584C0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { s32 diffHP; bool8 local_24; @@ -980,7 +983,7 @@ bool8 sub_80584C0(Entity *pokemon, Entity *target, Move *move, u32 param_4) return local_24; } -bool8 sub_8058548(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; u32 r5; @@ -1022,7 +1025,7 @@ bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para return flag; } -bool8 sub_8058638(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1052,7 +1055,7 @@ bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, u32 p return flag; } -bool8 sub_80586DC(Entity * pokemon, Entity * target, Move * move, u32 param_4) +bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) { bool8 hasLiquidOoze; s32 uVar3; @@ -1081,9 +1084,7 @@ bool8 sub_80586DC(Entity * pokemon, Entity * target, Move * move, u32 param_4) return flag; } - -// NOTE: almost the same as sub_8058D44 and sub_805AFA4 in status_actions.c -bool8 sub_8058770(Entity * pokemon, Entity * target, Move * move, u32 param_4) +bool8 ReversalMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) { s32 index; bool8 flag; @@ -1106,7 +1107,7 @@ bool8 sub_8058770(Entity * pokemon, Entity * target, Move * move, u32 param_4) return flag; } -bool8 sub_80587E8(Entity * pokemon, Entity * target, Move * move, u32 param_4) +bool8 SmellingSaltMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) { bool8 flag; @@ -1120,13 +1121,13 @@ bool8 sub_80587E8(Entity * pokemon, Entity * target, Move * move, u32 param_4) return flag; } -bool8 sub_8058838(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 3, 1, TRUE); return TRUE; } -bool8 sub_8058858(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { s32 index = gUnknown_8106A4C; LowerAttackStageTarget(pokemon, target, index, 1, 1, TRUE); @@ -1140,13 +1141,13 @@ bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_80588A8(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { sub_8079E34(pokemon, target, TRUE); return TRUE; } -bool8 sub_80588B8(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag = FALSE; if(HandleDamagingMove(pokemon, target, move, 0x80 << 1, param_4) != 0) @@ -1160,7 +1161,7 @@ bool8 sub_80588B8(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_80588F4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; EntityInfo *entityInfo = GetEntInfo(target); @@ -1170,7 +1171,7 @@ bool8 sub_80588F4(Entity *pokemon, Entity *target, Move *move, u32 param_4) } -bool8 sub_8058930(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag = FALSE; EntityInfo *entityInfo; @@ -1195,19 +1196,19 @@ bool8 sub_8058930(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_80589D4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { HealTargetHP(pokemon, target, gUnknown_80F500A[GetApparentWeather(pokemon)], 0, TRUE); return TRUE; } -bool8 sub_8058A08(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseMovementSpeedTarget(pokemon, target, 0, TRUE); return TRUE; } -bool8 sub_8058A18(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag = FALSE; if(HandleDamagingMove(pokemon, target, move, 0x80 << 1, param_4) != 0) @@ -1221,13 +1222,13 @@ bool8 sub_8058A18(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8058A54(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { SureShotStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4EB8, FALSE)); return TRUE; } -bool8 sub_8058A7C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1); RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A50, 1); @@ -1254,7 +1255,8 @@ bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param return flag; } -bool8 sub_8058B3C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +// NOTE: Is there a better name for this? +bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1269,7 +1271,7 @@ bool8 sub_8058B3C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8058B84(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; EntityInfo *entityInfo; @@ -1293,7 +1295,7 @@ bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_8058BF0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { LowerMovementSpeedTarget(pokemon, target, 1, TRUE); return TRUE; @@ -1314,7 +1316,7 @@ bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8058C48(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { s32 rand; bool8 flag; @@ -1346,7 +1348,7 @@ bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 return flag; } -bool8 sub_8058CEC(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag = FALSE; if(HandleDamagingMove(pokemon, target, move, 0x80 << 1, param_4) != 0) @@ -1360,15 +1362,13 @@ bool8 sub_8058CEC(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8058D38(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { SleeplessStatusTarget(pokemon, target); return TRUE; } - -// NOTE: same as sub_8058770 -bool8 sub_8058D44(Entity * pokemon, Entity * target, Move * move, u32 param_4) +bool8 WaterSpoutMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) { s32 index; bool8 flag; @@ -1423,7 +1423,7 @@ bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4) bool8 flag; flag = FALSE; - if ((HandleDamagingMove(pokemon, target, move, 0x80 << 1, param_4) != 0) && (EntityExists(pokemon))) { + if ((HandleDamagingMove(pokemon, target, move, 0x100, param_4) != 0) && (EntityExists(pokemon))) { iVar2 = GetEntInfo(pokemon)->maxHPStat; if (iVar2 < 0) { iVar2 = iVar2 + 7; @@ -1446,7 +1446,7 @@ bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool32 sub_8058F04(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { bool32 flag; EntityInfo *entityInfo; @@ -1484,7 +1484,7 @@ bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par return flag; } -bool8 sub_8058FBC(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1499,13 +1499,13 @@ bool8 sub_8058FBC(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8059004(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { - sub_807DF38(pokemon, target, &target->pos, 1, GetMoveType(move), sub_8057600(move, param_4)); + HandleExplosion(pokemon, target, &target->pos, 1, GetMoveType(move), sub_8057600(move, param_4)); return TRUE; } -bool8 sub_8059050(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { ParalyzeStatusTarget(pokemon, target, TRUE); return TRUE; @@ -1517,7 +1517,7 @@ bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_8059080(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1538,7 +1538,7 @@ bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_80590D4(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { u8 moveType; bool8 uVar5; @@ -1562,7 +1562,7 @@ bool8 sub_80590D4(Entity *pokemon, Entity *target, Move *move, s32 param_4) return flag; } -bool8 sub_8059190(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1583,7 +1583,7 @@ bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param return TRUE; } -bool8 sub_80591E4(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { bool8 hasLiquidOoze; s32 iVar3; @@ -1685,7 +1685,7 @@ bool32 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 return ret; } -bool8 sub_8059424(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1700,7 +1700,7 @@ bool8 sub_8059424(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_805946C(Entity * pokemon,Entity * target,Move * move,u32 param_4) +bool8 DoubleEdgeMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) { s32 HP; bool8 flag; @@ -1740,7 +1740,7 @@ bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_8059540(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1755,13 +1755,13 @@ bool8 sub_8059540(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8059588(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1); return TRUE; } -bool8 sub_80595A0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1816,7 +1816,7 @@ bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param return weather; } -bool8 sub_8059714(Entity * pokemon,Entity * target,Move * move,u32 param_4) +bool8 SonicboomMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) { u8 local_20; @@ -1842,9 +1842,9 @@ bool8 FlyMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) return flag; } -bool8 sub_80597F0(Entity * pokemon,Entity * target,Move * move,u32 param_4) +bool8 ExplosionMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) { - sub_807DF38(pokemon,target,&target->pos,2,GetMoveType(move),sub_8057600(move,param_4)); + HandleExplosion(pokemon,target,&target->pos,2,GetMoveType(move),sub_8057600(move,param_4)); return TRUE; } @@ -1867,7 +1867,7 @@ bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4 return flag; } -bool8 sub_80598CC(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1888,7 +1888,7 @@ bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param return TRUE; } -bool8 sub_8059928(Entity * pokemon,Entity * target,Move * move,u32 param_4) +bool8 TwisterMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) { bool8 flag; s32 iVar2; @@ -1908,7 +1908,7 @@ bool8 sub_8059928(Entity * pokemon,Entity * target,Move * move,u32 param_4) return flag; } -bool8 sub_8059988(Entity * pokemon,Entity * target,Move * move,u32 param_4) +bool8 TwineedleMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) { bool8 flag; @@ -1935,7 +1935,7 @@ bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_8059A18(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseAccuracyStageTarget(pokemon, target, gUnknown_8106A50); return TRUE; @@ -1953,25 +1953,25 @@ bool8 sub_8059A2C(Entity * pokemon,Entity * target,Move * move,u32 param_4) return local_20; } -bool8 sub_8059AA8(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { ConfuseStatusTarget(pokemon, target, TRUE); return TRUE; } -bool8 sub_8059AB8(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { TauntStatusTarget(pokemon, target); return TRUE; } -bool8 sub_8059AC4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { HealTargetHP(pokemon, target, gUnknown_80F501A[GetApparentWeather(pokemon)], 0, TRUE); return TRUE; } -bool8 sub_8059AF8(Entity * pokemon,Entity * target,Move * move,u32 param_4) +bool8 HornDrillMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) { u8 local_20; @@ -1987,7 +1987,7 @@ bool8 sub_8059AF8(Entity * pokemon,Entity * target,Move * move,u32 param_4) } } -bool8 sub_8059B94(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2); return TRUE; @@ -2065,13 +2065,13 @@ bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_8059CF0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); return TRUE; } -bool8 sub_8059D00(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2086,13 +2086,13 @@ bool8 sub_8059D00(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8059D48(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { ParalyzeStatusTarget(pokemon, target, TRUE); return TRUE; } -bool8 sub_8059D58(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2107,25 +2107,25 @@ bool8 sub_8059D58(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8059D98(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { ImmobilizedStatusTarget(pokemon, target); return TRUE; } -bool8 sub_8059DA4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { PoisonedStatusTarget(pokemon, target, TRUE); return TRUE; } -bool8 sub_8059DB4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { BadlyPoisonedStatusTarget(pokemon, target, TRUE); return TRUE; } -bool8 sub_8059DC4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2140,7 +2140,7 @@ bool8 sub_8059DC4(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8059E0C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2155,7 +2155,7 @@ bool8 sub_8059E0C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_8059E54(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5) +bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5) { u8 moveType; u32 movePower; @@ -2184,7 +2184,7 @@ bool8 sub_8059E54(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 pa return flag; } -bool8 sub_8059F38(Entity * pokemon,Entity * target,Move * move,u32 param_4) +bool8 BounceMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) { bool8 flag; @@ -2205,7 +2205,7 @@ bool8 sub_8059F38(Entity * pokemon,Entity * target,Move * move,u32 param_4) return flag; } -bool8 sub_8059FC8(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5) +bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5) { u8 moveType; u32 movePower; @@ -2262,7 +2262,7 @@ bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, Move *move, u32 par return flag; } -bool8 sub_805A120(Entity * pokemon,Entity * target, Move *move, u32 param_4) +bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, u32 param_4) { EntityInfo *r9; EntityInfo *r8; @@ -2318,7 +2318,7 @@ bool8 sub_805A120(Entity * pokemon,Entity * target, Move *move, u32 param_4) } } -bool8 sub_805A210(Entity * pokemon, Entity * target, Move *move, u32 param_4) +bool8 TripleKickMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) { bool8 flag; @@ -2341,7 +2341,7 @@ bool8 MudWaterSportMoveAction(Entity * pokemon, Entity * target, Move *move, u32 } -bool8 sub_805A258(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2356,18 +2356,18 @@ bool8 sub_805A258(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_805A2A0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { - return sub_805BA50(pokemon, target, move, param_4); + return ThiefAction(pokemon, target, move, param_4); } -bool8 sub_805A2B0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A50, 2); return TRUE; } -bool8 sub_805A2C8(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, TRUE); return TRUE; @@ -2423,7 +2423,7 @@ bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_ return TRUE; } -bool8 sub_805A3DC(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, TRUE); return TRUE; @@ -2435,7 +2435,7 @@ bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_805A408(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2456,7 +2456,7 @@ bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, u32 param_4) return FALSE; } -bool8 sub_805A464(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool32 flag; Item item; @@ -2469,7 +2469,7 @@ bool8 sub_805A464(Entity *pokemon, Entity *target, Move *move, u32 param_4) if (!EntityExists(target)) { pos.x = 0; pos.y = 0; - sub_8045C28(&item,0x69,2); + sub_8045C28(&item,ITEM_POKE,2); sub_805A7D4(pokemon,target,&item,&pos); } } @@ -2477,19 +2477,19 @@ bool8 sub_805A464(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_805A4C0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC74C); return FALSE; } -bool8 sub_805A4D4(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { NappingStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E94, FALSE)); return TRUE; } -bool8 sub_805A4FC(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { IngrainedStatusTarget(pokemon, target); return TRUE; @@ -2524,7 +2524,7 @@ bool8 sub_805A568(Entity * pokemon, Entity * target, Move *move, u32 param_4) return flag; } -bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { u32 stat; bool32 flag; @@ -2541,7 +2541,7 @@ bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_805A5E8(Entity *pokemon, Entity *target, Move *move, u32 stat, u32 param_5) +bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 stat, u32 param_5) { EntityInfo *entityInfo; bool32 flag; @@ -2573,7 +2573,7 @@ bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_805A688(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2626,7 +2626,7 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_ sub_805A7D4(pokemon,target,&heldItem,&pos); if (sub_80706A4(target, &target->pos) != 0) { - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); } return TRUE; } @@ -2652,7 +2652,7 @@ static void sub_805A7D4(Entity * pokemon, Entity * target, Item *item, sub_804652C(pokemon,&stackEntity,item,1,0); } -bool8 sub_805A85C(Entity * pokemon, Entity * target, Move *move, u32 param_4) +bool8 SplashMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) { int x; int y; @@ -2744,7 +2744,7 @@ _0805AA5E: sub_804535C(target, NULL); pos = r9; if (sub_80706A4(target, pos)) { - sub_807D148(pokemon,target,0,0); + WarpTarget(pokemon,target,0,0); } if (GetEntInfo(target)->isTeamLeader) { sub_804AC20(r9); @@ -2801,7 +2801,7 @@ bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, Move *move, u32 p PoisonedStatusTarget(pokemon,target,FALSE); break; case 1: - sub_8075C58(pokemon,target,CalculateStatusTurns(target,gUnknown_80F4E74,TRUE),FALSE); + SleepStatusTarget(pokemon,target,CalculateStatusTurns(target,gUnknown_80F4E74,TRUE),FALSE); break; case 2: LowerMovementSpeedTarget(pokemon,target,1,FALSE); @@ -2853,19 +2853,19 @@ bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_805AD04(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { PausedStatusTarget(pokemon, target, 1, CalculateStatusTurns(target, &gUnknown_80F4EE0, TRUE), TRUE); return TRUE; } -bool8 sub_805AD34(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2, 1, TRUE); return TRUE; } -bool32 sub_805AD54(Entity * pokemon, Entity * target, Move *move, u32 param_4) +bool32 BeatUpMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) { s32 numPossibleTargets; s32 i; @@ -2890,7 +2890,7 @@ bool32 sub_805AD54(Entity * pokemon, Entity * target, Move *move, u32 param_4) { EntityInfo *targetInfo = GetEntInfo(targetEntity); if (targetInfo->monsterBehavior != BEHAVIOR_RESCUE_TARGET && !IsClientOrTeamBase(targetInfo->joinedAt.id)) { - sub_807D148(pokemon,targetEntity,2,&target->pos); + WarpTarget(pokemon,targetEntity,2,&target->pos); flag = TRUE; SetExpMultplier(info); } @@ -2903,7 +2903,7 @@ bool32 sub_805AD54(Entity * pokemon, Entity * target, Move *move, u32 param_4) return flag; } -bool8 sub_805AE3C(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2912,7 +2912,7 @@ bool8 sub_805AE3C(Entity *pokemon, Entity *target, Move *move, u32 param_4) return flag; } -bool8 sub_805AE74(Entity * pokemon, Entity * target, Move *move, u32 param_4) +bool8 CrushClawMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) { bool8 flag; @@ -2926,7 +2926,7 @@ bool8 sub_805AE74(Entity * pokemon, Entity * target, Move *move, u32 param_4) return flag; } -bool8 sub_805AECC(Entity * pokemon, Entity * target, Move *move, u32 param_4) +bool8 BlazeKickMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) { bool8 flag; diff --git a/src/move_effects_target.c b/src/move_effects_target.c index f34bd5771..efa3e59b0 100644 --- a/src/move_effects_target.c +++ b/src/move_effects_target.c @@ -192,7 +192,7 @@ u8 sub_8075BF4(Entity * pokemon, s32 sleepClassStatusTurns) return uVar4; } -void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage) +void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage) { u8 sleep; u8 cVar2; diff --git a/src/status_actions.c b/src/status_actions.c index 82c782218..66c1db3bc 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -36,7 +36,7 @@ #include "called_move_data.h" extern void sub_807F43C(Entity *, Entity *); -extern void sub_807DC68(Entity *, Entity *); +extern void HandleOneRoomOrb(Entity *, Entity *); extern u32 sub_803D73C(u32); extern void sub_8045C28(Item *, u8 , u8); extern void sub_80464C8(Entity *, DungeonPos *, Item *); @@ -50,14 +50,14 @@ extern void sub_8042A54(DungeonPos *); extern void sub_8049BB0(s32, s32); extern s16 sub_8057600(Move*, u32); extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5); -extern void sub_807DB74(Entity *); +extern void HandleDroughtOrbAction(Entity *); extern void HandleLuminousOrbAction(Entity *pokemon); -extern void sub_807D510(Entity *, Entity *); -extern void sub_807DA14(Entity *, Entity *, s32); +extern void HandleTrawlOrbAction(Entity *, Entity *); +extern void HandlePounceOrbAction(Entity *, Entity *, s32); extern s16 sub_803D970(u32); extern bool8 sub_806AA0C(s32, u32); extern void sub_806BB6C(Entity *, s32); -extern void sub_807E254(Entity *, Entity *, u32); +extern void HandleSwitcherOrb(Entity *, Entity *, u32); extern u32 HandleDamagingMove(Entity *, Entity *, Move *, u32, u32); extern void sub_806A6E8(Entity *); extern u8 sub_8069D18(DungeonPos *); @@ -75,7 +75,7 @@ extern void WrapTarget(Entity *, Entity *); // TODO having matching issues when this isn't s32.. (move_effects_target.h) extern void SqueezedStatusTarget(Entity *, Entity *, s32, bool32); -extern void sub_8075C58(Entity *, Entity *, s32, s32); +extern void SleepStatusTarget(Entity *, Entity *, s32, s32); extern void DealDamageToEntity(Entity *, s32, u32, u32); extern bool8 MoveRequiresCharging(Entity* pokemon,u16 moveID); @@ -143,7 +143,7 @@ extern u8 *gUnknown_80FEFF4[]; extern u32 gUnknown_80F51C4[]; -bool8 sub_805AFA4(Entity * pokemon, Entity * target, Move *move, u32 param_4) +bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) { EntityInfo *entityInfo; s32 maxHp; @@ -170,7 +170,7 @@ bool8 sub_805AFA4(Entity * pokemon, Entity * target, Move *move, u32 param_4) return flag; } -bool8 sub_805B028(Entity * pokemon,Entity * target,Move *move) +bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move) { ParalyzeStatusTarget(pokemon,target, TRUE); return TRUE; @@ -189,7 +189,7 @@ bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par } } -bool8 sub_805B074(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 PoisonTailMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { bool8 flag; @@ -203,9 +203,9 @@ bool8 sub_805B074(Entity * pokemon, Entity * target, Move *move, s32 param_4) return flag; } -bool8 sub_805B0BC(Entity * pokemon, Entity * target) +bool8 RoarMoveAction(Entity * pokemon, Entity * target) { - sub_807CD9C(pokemon, target, GetEntInfo(pokemon)->action.direction); + BlowAwayTarget(pokemon, target, GetEntInfo(pokemon)->action.direction); return TRUE; } @@ -233,7 +233,7 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target) } } -bool8 sub_805B164(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 TailGlowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { RaiseAttackStageTarget(pokemon,target,gUnknown_8106A50, 2); return TRUE; @@ -300,7 +300,7 @@ bool8 SpikesMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_ return trapLaid; } -bool8 sub_805B264(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { s32 r3; bool8 r6; @@ -333,7 +333,7 @@ bool8 ProtectMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4 return TRUE; } -bool8 sub_805B2FC(Entity * pokemon,Entity * target,Move *move, s32 param_4) +bool8 DefenseCurlMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4) { RaiseDefenseStageTarget(pokemon,target,gUnknown_8106A4C,1); return TRUE; @@ -345,7 +345,7 @@ bool8 sub_805B314(Entity * pokemon,Entity * target,Move *move, s32 param_4) return TRUE; } -bool8 sub_805B324(Entity * pokemon,Entity * target,Move *move, s32 param_4) +bool8 MistBallMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4) { bool8 flag; @@ -365,7 +365,7 @@ bool8 DestinyBondMoveAction(Entity * pokemon,Entity * target,Move *move, s32 par return TRUE; } -bool8 sub_805B388(Entity * pokemon,Entity * target,Move *move, s32 param_4) +bool8 FalseSwipeMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4) { return (HandleDamagingMove(pokemon,target,move,0x100,param_4)) ? TRUE : FALSE; } @@ -376,7 +376,7 @@ bool8 MirrorCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 para return TRUE; } -bool8 sub_805B3B4(Entity * pokemon,Entity * target,Move *move, s32 param_4) +bool8 CalmMindMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4) { u32 stat = gUnknown_8106A50; RaiseAttackStageTarget(pokemon,target,stat,1); @@ -384,13 +384,13 @@ bool8 sub_805B3B4(Entity * pokemon,Entity * target,Move *move, s32 param_4) return TRUE; } -bool8 sub_805B3E0(Entity * pokemon,Entity * target,Move *move, s32 param_4) +bool8 HiddenPowerMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4) { HandleDamagingMove(pokemon,target,move,0x100,param_4); return TRUE; } -bool8 sub_805B3FC(Entity * pokemon,Entity * target,Move *move, s32 param_4, s32 param_5) +bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4, s32 param_5) { EntityInfo *entityInfo; bool8 flag; @@ -407,7 +407,7 @@ bool8 sub_805B3FC(Entity * pokemon,Entity * target,Move *move, s32 param_4, s32 return flag; } -bool8 sub_805B454(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 AttractMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { InfatuateStatusTarget(pokemon, target, TRUE); return TRUE; @@ -450,7 +450,7 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4 return mimicSuccess; } -bool8 sub_805B53C(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 FrustrationMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { s16 *r1; s32 index; @@ -486,7 +486,7 @@ bool8 LeechSeedMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par return TRUE; } -bool8 sub_805B618(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 MetronomeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { bool8 flag; Move natureMove; @@ -499,7 +499,7 @@ bool8 sub_805B618(Entity * pokemon, Entity * target, Move *move, s32 param_4) return flag; } -bool8 sub_805B668(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { bool8 hasLiquidOoze; s32 iVar3; @@ -580,7 +580,7 @@ bool8 ReflectMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param return TRUE; } -bool8 sub_805B808(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 DragonRageMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { u8 local_20; @@ -590,7 +590,7 @@ bool8 sub_805B808(Entity * pokemon, Entity * target, Move *move, s32 param_4) return local_20; } -bool8 sub_805B884( Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 DragonDanceMoveAction( Entity * pokemon, Entity * target, Move *move, s32 param_4) { RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1); RaiseMovementSpeedTarget(pokemon, target, 0, TRUE); @@ -612,7 +612,7 @@ bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa return flag; } -bool8 sub_805B910(Entity * pokemon, Entity * target, Move * move, s32 param_4) +bool8 LusterPurgeMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4) { bool8 flag; @@ -627,7 +627,7 @@ bool8 sub_805B910(Entity * pokemon, Entity * target, Move * move, s32 param_4) return flag; } -bool8 sub_805B968(Entity * pokemon, Entity * target, Move * move, s32 param_4) +bool8 StruggleMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4) { s32 entityHP; s32 newHP; @@ -678,12 +678,12 @@ bool8 sub_805BA44(Entity * pokemon, Entity * target, Move *move, s32 param_4) return TRUE; } -bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 ThiefAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - EntityInfo *iVar2; - EntityInfo *iVar3; - EntityInfo *iVar5; - EntityInfo *iVar6; + EntityInfo *pokemonInfo1; + EntityInfo *pokemonInfo2; + EntityInfo *targetInfo1; + EntityInfo *targetInfo2; bool8 flag; Item *pokeItem; Item *targetItem; @@ -692,10 +692,10 @@ bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4) if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) { flag = TRUE; if (sub_805727C(pokemon,target, 0) != 0) { - iVar2 = GetEntInfo(pokemon); - iVar3 = GetEntInfo(pokemon); - iVar5 = GetEntInfo(target); - iVar6 = GetEntInfo(target); + pokemonInfo1 = GetEntInfo(pokemon); + pokemonInfo2 = GetEntInfo(pokemon); + targetInfo1 = GetEntInfo(target); + targetInfo2 = GetEntInfo(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); if (HasAbility(target, ABILITY_STICKY_HOLD)) { @@ -706,8 +706,8 @@ bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4) return TRUE; } else { - pokeItem = &iVar2->heldItem; - targetItem = &iVar5->heldItem; + pokeItem = &pokemonInfo1->heldItem; + targetItem = &targetInfo1->heldItem; if ((pokeItem->flags & ITEM_FLAG_EXISTS) != 0) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC654); // $m0 has an item already! return TRUE; @@ -717,11 +717,11 @@ bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4) return TRUE; } else { - iVar3->heldItem = iVar6->heldItem; + pokemonInfo2->heldItem = targetInfo2->heldItem; ZeroOutItem(targetItem); sub_806A6E8(pokemon); sub_806A6E8(target); - SetExpMultplier(iVar3); + SetExpMultplier(pokemonInfo2); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC614); // Got $m1's item! } } @@ -736,16 +736,16 @@ bool8 ReboundOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_ return TRUE; } -bool8 sub_805BB74(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 SwitcherOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { SetExpMultplier(GetEntInfo(pokemon)); - sub_807E254(pokemon, target, 1); + HandleSwitcherOrb(pokemon, target, 1); return TRUE; } -bool8 sub_805BB98(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 StayawayOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - sub_807D148(pokemon, target, 1, NULL); + WarpTarget(pokemon, target, 1, NULL); return TRUE; } @@ -787,13 +787,13 @@ bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_ return isItemCleaned; } -bool8 sub_805BC70(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 SlumberOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); return TRUE; } -bool8 sub_805BC98(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 TwoEdgeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { EntityInfo *entityInfo; bool8 flag; @@ -888,7 +888,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_ return didTransfer; } -bool8 sub_805BE90(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 SlowDownMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { LowerMovementSpeedTarget(pokemon, target, 1, TRUE); return TRUE; @@ -906,15 +906,15 @@ bool8 PetrifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_ return TRUE; } -bool8 sub_805BEB8(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 PounceOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - sub_807DA14(pokemon, target, 8); + HandlePounceOrbAction(pokemon, target, 8); return TRUE; } -bool8 sub_805BEC8(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 TrawlOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - sub_807D510(pokemon, target); + HandleTrawlOrbAction(pokemon, target); return TRUE; } @@ -932,9 +932,9 @@ bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4 return FALSE; } -bool8 sub_805BF34(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 DroughtOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - sub_807DB74(pokemon); + HandleDroughtOrbAction(pokemon); return TRUE; } @@ -994,7 +994,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 param_ return foundTrap; } -bool8 sub_805C080(Entity * pokemon, Entity *target, Move *move, s32 param_4) +bool8 RollcallOrbAction(Entity * pokemon, Entity *target, Move *move, s32 param_4) { Entity **possibleTargets; s32 numPossibleTargets; @@ -1015,7 +1015,7 @@ bool8 sub_805C080(Entity * pokemon, Entity *target, Move *move, s32 param_4) targetEntity = possibleTargets[index]; if (((EntityExists(targetEntity)) && (pokemon != targetEntity)) && (GetTreatmentBetweenMonsters(pokemon,targetEntity,TRUE,FALSE) == TREATMENT_TREAT_AS_ALLY)) { - sub_807D148(pokemon,targetEntity,2,&pokemon->pos); + WarpTarget(pokemon,targetEntity,2,&pokemon->pos); foundTarget = TRUE; } } @@ -1031,7 +1031,7 @@ bool8 InvisifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param return TRUE; } -bool8 sub_805C138(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 OneShotOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { u8 local_20; @@ -1047,7 +1047,7 @@ bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 return TRUE; } -bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { bool8 flag; @@ -1055,7 +1055,7 @@ bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4) return flag; } -bool8 sub_805C1E4(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FD454); return FALSE; @@ -1086,9 +1086,9 @@ bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4) return TRUE; } -bool8 sub_805C2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 OneRoomOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { - sub_807DC68(pokemon, target); + HandleOneRoomOrb(pokemon, target); return TRUE; } @@ -1150,7 +1150,7 @@ bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) return TRUE; } -bool8 sub_805C3F8(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { Item stack; DungeonPos posStruct = target->pos; @@ -1170,7 +1170,7 @@ bool8 sub_805C3F8(Entity *pokemon, Entity *target, Move *move, s32 param_4) } } -bool8 sub_805C45C(Entity *pokemon, Entity *target, Move *move, s32 param_4) +bool8 HurlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4) { sub_807F43C(pokemon, target); return TRUE; diff --git a/src/tile_types.c b/src/tile_types.c index 813d2dd53..c66dff5eb 100644 --- a/src/tile_types.c +++ b/src/tile_types.c @@ -84,7 +84,6 @@ const u8 gDungeonWaterType[76] = { DUNGEON_WATER_TYPE_NONE, }; -extern void sub_80498A8(s32, s32); extern void sub_80402AC(s32, s32); extern void sub_8049BB0(s32, s32); void sub_8042A14(DungeonPos *); diff --git a/src/trap.c b/src/trap.c index 9dd484d6a..6f45aaf54 100644 --- a/src/trap.c +++ b/src/trap.c @@ -75,8 +75,8 @@ void sub_804225C(Entity *, DungeonPos *, u8); void sub_8071DA4(Entity *); void sub_806A1E8(Entity *pokemon); u8 sub_803D6FC(void); -extern void sub_807DF38(Entity *pokemon, Entity *target, DungeonPos *pos, u32, - u8 moveType, s16); +Entity *sub_8045684(u8, DungeonPos *, u8); +extern void HandleExplosion(Entity *pokemon, Entity *target, DungeonPos *pos, u32, u8 moveType, s16); void sub_807FC3C(DungeonPos *pos, u32 trapID, u32 param_3) { @@ -213,7 +213,7 @@ void GetTrapName(u8 *buffer, u8 trapIndex) strcpy(buffer, gTrapNames[trapIndex]); } -void sub_807FE9C(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) +void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) { Tile *tile; bool8 flag1; @@ -435,7 +435,7 @@ void HandleSpinTrap(Entity *pokemon, Entity *target) void HandleWarpTrap(Entity *pokemon, Entity *target) { if(target != NULL) - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); } void HandleSlumberTrap(Entity *pokemon, Entity *target) @@ -445,7 +445,7 @@ void HandleSlumberTrap(Entity *pokemon, Entity *target) if(target != NULL) { turns = CalculateStatusTurns(target, gUnknown_80F4E74, TRUE); - sub_8075C58(pokemon, target, turns, TRUE); + SleepStatusTarget(pokemon, target, turns, TRUE); } } @@ -463,12 +463,12 @@ void HandlePoisonTrap(Entity *pokemon, Entity *target) void HandleSelfdestructTrap(Entity *pokemon, Entity *target) { - sub_807DF38(pokemon, target, &target->pos, 1, TYPE_NONE, 0x212); + HandleExplosion(pokemon, target, &target->pos, 1, TYPE_NONE, 0x212); } void HandleExplosionTrap(Entity *pokemon, Entity *target) { - sub_807DF38(pokemon, target, &target->pos, 2, TYPE_NONE, 0x212); + HandleExplosion(pokemon, target, &target->pos, 2, TYPE_NONE, 0x212); } void HandleGrimyTrap(Entity *pokemon, Entity *target) @@ -700,6 +700,6 @@ void HandleWhirlwindTrap(Entity *pokemon, Entity *target) { if(target) { - sub_807CD9C(pokemon, target, DungeonRandInt(NUM_DIRECTIONS)); + BlowAwayTarget(pokemon, target, DungeonRandInt(NUM_DIRECTIONS)); } } diff --git a/sym_ewram2.txt b/sym_ewram2.txt index d92c28e28..ca90bdfb0 100644 --- a/sym_ewram2.txt +++ b/sym_ewram2.txt @@ -255,7 +255,7 @@ gUnknown_203B43C: /* 203B43C (sub_8065FB4) */ .include "src/dungeon_ai_items.o" -gUnknown_203B444: /* 203B444 (sub_807DF38) */ +gUnknown_203B444: /* 203B444 (HandleExplosion) */ .space 0xC gLeaderPointer: /* 203B450 (xxx_dungeon_8042F6C - ReadMonster) */