mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-02 16:53:46 -05:00
Merge pull request #259 from AnonymousRandomPerson/master
Some checks are pending
GithubCI / build (push) Waiting to run
Some checks are pending
GithubCI / build (push) Waiting to run
Synced some dungeon symbol names with Sky
This commit is contained in:
commit
07e740f2e3
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
.text
|
||||
|
||||
thumb_func_start LoadTitleScreen
|
||||
LoadTitleScreen:
|
||||
|
|
@ -1262,7 +1262,7 @@ sub_8001064:
|
|||
movs r0, 0x4
|
||||
ldrsh r1, [r5, r0]
|
||||
adds r0, r4, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
mov r0, sp
|
||||
adds r1, r4, 0
|
||||
bl CopyStringtoBuffer
|
||||
|
|
@ -1293,7 +1293,7 @@ _080010AE:
|
|||
movs r0, 0x6
|
||||
ldrsh r1, [r5, r0]
|
||||
adds r0, r4, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
mov r0, sp
|
||||
adds r1, r4, 0
|
||||
bl CopyStringtoBuffer
|
||||
|
|
|
|||
|
|
@ -1728,7 +1728,7 @@ _08040E6E:
|
|||
ldr r0, _08040ECC
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r1, 0xD2
|
||||
lsls r1, 1
|
||||
adds r0, r6, 0
|
||||
|
|
@ -2501,7 +2501,7 @@ _080414A0:
|
|||
_080414A4:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl MoveMatchesChargingStatus
|
||||
bl MoveMatchesBideClassStatus
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ _08045E1E:
|
|||
ldr r0, _08045E38
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08045E3C
|
||||
b _08046048
|
||||
.align 2, 0
|
||||
|
|
@ -278,7 +278,7 @@ _08045FAC:
|
|||
_08045FD0:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08045FF2
|
||||
.align 2, 0
|
||||
_08045FDC: .4byte 0x00ff0008
|
||||
|
|
@ -288,7 +288,7 @@ _08045FE8:
|
|||
ldr r0, _08045FFC
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08045FF2:
|
||||
ldrb r0, [r5, 0x2]
|
||||
bl TryDisplayItemPickupTutorialMessage
|
||||
|
|
@ -331,12 +331,12 @@ _0804602E:
|
|||
ldr r0, _08046058
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0804605C
|
||||
_08046048:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080460E0
|
||||
.align 2, 0
|
||||
_08046054: .4byte gFormatBuffer_Items
|
||||
|
|
@ -374,12 +374,12 @@ _08046094:
|
|||
ldr r0, _080460B8
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _080460BC
|
||||
_080460AC:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080460DA
|
||||
.align 2, 0
|
||||
_080460B8: .4byte gFormatBuffer_Monsters
|
||||
|
|
@ -394,7 +394,7 @@ _080460C0:
|
|||
ldr r0, _080460F4
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080460DA:
|
||||
ldrb r0, [r5, 0x2]
|
||||
bl TryDisplayItemPickupTutorialMessage
|
||||
|
|
@ -996,7 +996,7 @@ sub_804652C:
|
|||
ldr r0, _080465A4
|
||||
ldr r1, [r0]
|
||||
mov r0, r10
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
mov r0, r9
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x1
|
||||
|
|
@ -1721,7 +1721,7 @@ _08046B0A:
|
|||
ldr r4, _08046B38
|
||||
add r4, sp
|
||||
ldr r0, [r4]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08046C7C
|
||||
.align 2, 0
|
||||
_08046B2C: .4byte 0x0000052c
|
||||
|
|
@ -1734,7 +1734,7 @@ _08046B3C:
|
|||
ldr r5, _08046B50
|
||||
add r5, sp
|
||||
ldr r0, [r5]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08046C7C
|
||||
.align 2, 0
|
||||
_08046B4C: .4byte gItemLost
|
||||
|
|
@ -1748,7 +1748,7 @@ _08046B54:
|
|||
ldr r2, _08046C94
|
||||
add r2, sp
|
||||
ldr r0, [r2]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08046B68:
|
||||
movs r3, 0
|
||||
mov r9, r3
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ _08047462:
|
|||
ldr r0, _080474C4
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _080474C8
|
||||
ldr r1, [sp, 0x214]
|
||||
bl sub_8045C08
|
||||
|
|
@ -463,7 +463,7 @@ _080474E2:
|
|||
ldr r0, _0804750C
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08047510
|
||||
ldr r1, [sp, 0x214]
|
||||
bl sub_8045BF8
|
||||
|
|
@ -552,7 +552,7 @@ _08047596:
|
|||
ldr r0, _080475C0
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080475A8:
|
||||
movs r3, 0x90
|
||||
lsls r3, 2
|
||||
|
|
@ -913,7 +913,7 @@ _0804786E:
|
|||
ldr r0, _080478D4
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
lsls r0, r6, 24
|
||||
cmp r0, 0
|
||||
beq _080478DC
|
||||
|
|
|
|||
|
|
@ -4118,7 +4118,7 @@ sub_8051E7C:
|
|||
ldr r0, _08051EB4
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080520F6
|
||||
.align 2, 0
|
||||
_08051EB4: .4byte gUnknown_80FDDF0
|
||||
|
|
@ -4378,7 +4378,7 @@ _0805207A:
|
|||
ldr r0, _080520E8
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x14
|
||||
movs r1, 0x3C
|
||||
bl sub_803E708
|
||||
|
|
@ -4399,7 +4399,7 @@ _080520EC:
|
|||
ldr r0, _08052108
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080520F6:
|
||||
add sp, 0x14
|
||||
pop {r3-r5}
|
||||
|
|
|
|||
|
|
@ -2171,7 +2171,7 @@ sub_8062B74:
|
|||
ldr r0, _08062BD0
|
||||
mov r1, r10
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08062BD4
|
||||
ldr r2, [r0]
|
||||
movs r0, 0
|
||||
|
|
@ -2322,7 +2322,7 @@ sub_8062CA8:
|
|||
ldr r0, _08062CF8
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08062CFC
|
||||
ldr r2, [r0]
|
||||
movs r0, 0
|
||||
|
|
@ -3429,7 +3429,7 @@ sub_8063578:
|
|||
ldr r0, _080635FC
|
||||
ldr r1, [sp, 0x14]
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
lsls r4, 3
|
||||
adds r4, 0xA
|
||||
ldr r0, _08063600
|
||||
|
|
@ -4122,7 +4122,7 @@ _08063AEC:
|
|||
ldr r0, _08063B2C
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08063B3A
|
||||
.align 2, 0
|
||||
_08063B1C: .4byte gDungeon
|
||||
|
|
@ -4134,7 +4134,7 @@ _08063B30:
|
|||
ldr r0, _08063B50
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08063B3A:
|
||||
movs r0, 0x78
|
||||
movs r1, 0x1F
|
||||
|
|
@ -4442,7 +4442,7 @@ _08063D70:
|
|||
ldr r0, _08063DAC
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08063DBA
|
||||
.align 2, 0
|
||||
_08063D98: .4byte gDungeon
|
||||
|
|
@ -4455,7 +4455,7 @@ _08063DB0:
|
|||
ldr r0, _08063DD0
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08063DBA:
|
||||
movs r0, 0x78
|
||||
movs r1, 0x1F
|
||||
|
|
@ -5474,7 +5474,7 @@ sub_806455C:
|
|||
ldr r1, [r4, 0x14]
|
||||
add r0, sp, 0x4
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
str r5, [sp]
|
||||
movs r0, 0x8
|
||||
movs r1, 0x12
|
||||
|
|
|
|||
|
|
@ -1010,7 +1010,7 @@ _080690A2:
|
|||
adds r0, r2
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
b _08069484
|
||||
.align 2, 0
|
||||
_080690E4: .4byte gDungeon
|
||||
|
|
@ -1283,7 +1283,7 @@ _0806930A:
|
|||
adds r0, r2
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
b _08069352
|
||||
.align 2, 0
|
||||
_0806932C: .4byte gUnknown_202EE70
|
||||
|
|
@ -1301,7 +1301,7 @@ _08069338:
|
|||
adds r0, r3
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
_08069352:
|
||||
bl GetLeader
|
||||
cmp r0, 0
|
||||
|
|
@ -1515,7 +1515,7 @@ _080694FC:
|
|||
_0806950A:
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
bl SendImmobilizeEndMessage
|
||||
bl EndFrozenClassStatus
|
||||
_08069512:
|
||||
movs r0, 0x4
|
||||
ldrsh r2, [r4, r0]
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ _08066ECC:
|
|||
_08066F1E:
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08066F7E
|
||||
.align 2, 0
|
||||
_08066F28: .4byte 0xffffff00
|
||||
|
|
@ -167,7 +167,7 @@ _08066F46:
|
|||
ldr r0, _08066F98
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
ldr r0, _08066F9C
|
||||
ldr r0, [r0]
|
||||
ldr r2, _08066FA0
|
||||
|
|
@ -314,7 +314,7 @@ _08067040:
|
|||
_0806709E:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080670EE
|
||||
.align 2, 0
|
||||
_080670A8: .4byte gFormatBuffer_Items + 0x50
|
||||
|
|
@ -339,7 +339,7 @@ _080670CA:
|
|||
ldr r0, _08067104
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
ldr r0, _08067108
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0806710C
|
||||
|
|
@ -390,7 +390,7 @@ sub_8067110:
|
|||
bl sub_80464AC
|
||||
adds r1, r0, 0
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
ldr r0, [r6]
|
||||
str r0, [sp, 0x8]
|
||||
adds r0, r5, 0
|
||||
|
|
@ -498,7 +498,7 @@ _08067220:
|
|||
_08067230:
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x14
|
||||
movs r1, 0x4C
|
||||
bl sub_803E708
|
||||
|
|
@ -677,7 +677,7 @@ _08067384:
|
|||
ldr r0, _080673B8
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080673C6
|
||||
.align 2, 0
|
||||
_080673B0: .4byte gFormatBuffer_Items
|
||||
|
|
@ -687,7 +687,7 @@ _080673BC:
|
|||
ldr r0, _080673F8
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080673C6:
|
||||
add r0, sp, 0x4
|
||||
ldrb r0, [r0, 0x2]
|
||||
|
|
@ -1198,7 +1198,7 @@ _080677B4:
|
|||
ldr r0, _080677F0
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _080677F4
|
||||
ldr r5, [r0]
|
||||
ldr r0, _080677F8
|
||||
|
|
@ -1380,7 +1380,7 @@ sub_8067904:
|
|||
ldr r0, _08067944
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08067948
|
||||
b _08067962
|
||||
.align 2, 0
|
||||
|
|
@ -1396,12 +1396,12 @@ _0806794C:
|
|||
ldr r0, _0806796C
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08067970
|
||||
_08067962:
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08067A56
|
||||
.align 2, 0
|
||||
_0806796C: .4byte gFormatBuffer_Monsters
|
||||
|
|
@ -1477,7 +1477,7 @@ _080679DE:
|
|||
ldr r0, _08067A70
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08067A04:
|
||||
ldrb r0, [r6, 0x7]
|
||||
cmp r0, 0
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ _0806A5CE:
|
|||
bne _0806A608
|
||||
adds r0, r6, 0
|
||||
adds r1, r6, 0
|
||||
bl SendImmobilizeEndMessage
|
||||
bl EndFrozenClassStatus
|
||||
_0806A608:
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r4, r1]
|
||||
|
|
@ -346,7 +346,7 @@ _0806A650:
|
|||
bne _0806A6D2
|
||||
adds r0, r6, 0
|
||||
adds r1, r6, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
b _0806A6D2
|
||||
_0806A664:
|
||||
cmp r1, 0
|
||||
|
|
@ -399,7 +399,7 @@ _0806A6C4:
|
|||
beq _0806A6D2
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0806A6D2:
|
||||
add sp, 0x4
|
||||
pop {r3}
|
||||
|
|
@ -663,7 +663,7 @@ sub_806A898:
|
|||
b _0806A8C8
|
||||
_0806A8C2:
|
||||
adds r0, r4, 0
|
||||
bl MoveIfPossible
|
||||
bl AIMovement
|
||||
_0806A8C8:
|
||||
movs r0, 0xB6
|
||||
lsls r0, 1
|
||||
|
|
@ -817,7 +817,7 @@ _0806A9E0:
|
|||
_0806A9E6:
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0806AA02
|
||||
.align 2, 0
|
||||
_0806A9F0: .4byte gPtrLinkMoveOneUseWarningMessage
|
||||
|
|
@ -827,7 +827,7 @@ _0806A9F4:
|
|||
ldr r0, _0806AA08
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0806AA02:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
|
|
@ -1072,7 +1072,7 @@ sub_806ABAC:
|
|||
bne _0806ABD4
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
_0806ABD4:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x40
|
||||
|
|
@ -1087,7 +1087,7 @@ _0806ABD4:
|
|||
bne _0806ABF4
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendVolatileEndMessage
|
||||
bl EndCringeClassStatus
|
||||
_0806ABF4:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x42
|
||||
|
|
@ -1102,7 +1102,7 @@ _0806ABF4:
|
|||
bne _0806AC14
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
_0806AC14:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x29
|
||||
|
|
@ -1117,7 +1117,7 @@ _0806AC14:
|
|||
bne _0806AC34
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendVolatileEndMessage
|
||||
bl EndCringeClassStatus
|
||||
_0806AC34:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x36
|
||||
|
|
@ -1147,7 +1147,7 @@ _0806AC66:
|
|||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x1
|
||||
bl SendSleepEndMessage
|
||||
bl EndSleepClassStatus
|
||||
_0806AC72:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x41
|
||||
|
|
@ -1162,7 +1162,7 @@ _0806AC72:
|
|||
bne _0806AC92
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendImmobilizeEndMessage
|
||||
bl EndFrozenClassStatus
|
||||
_0806AC92:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x45
|
||||
|
|
@ -1180,7 +1180,7 @@ _0806AC92:
|
|||
bhi _0806ACB8
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
_0806ACB8:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x25
|
||||
|
|
@ -1199,7 +1199,7 @@ _0806ACB8:
|
|||
bne _0806ACE0
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendProtectionEndMessage
|
||||
bl EndReflectClassStatus
|
||||
_0806ACE0:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ _08072A0C:
|
|||
ldr r0, _08072A44
|
||||
mov r1, r9
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08072A48
|
||||
add r1, sp, 0x40
|
||||
bl strcpy
|
||||
|
|
@ -417,7 +417,7 @@ _08072A92:
|
|||
ldr r0, _08072AC0
|
||||
mov r1, r9
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08072AC4
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start sub_80732F0
|
||||
sub_80732F0:
|
||||
push {r4-r7,lr}
|
||||
|
|
@ -148,11 +148,11 @@ _080733FC:
|
|||
ldr r0, _08073438
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807343C
|
||||
ldr r1, [r0]
|
||||
mov r0, r8
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x7
|
||||
mov r1, r9
|
||||
ands r1, r0
|
||||
|
|
@ -360,11 +360,11 @@ _0807359C:
|
|||
ldr r0, _08073600
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08073604
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x7
|
||||
mov r1, r8
|
||||
ands r1, r0
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ _0807D634:
|
|||
ldr r2, _0807D650
|
||||
add r2, sp
|
||||
ldr r0, [r2]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807D9F4
|
||||
.align 2, 0
|
||||
_0807D650: .4byte 0x00000d08
|
||||
|
|
@ -585,7 +585,7 @@ _0807D996:
|
|||
ldr r2, _0807D9C4
|
||||
add r2, sp
|
||||
ldr r0, [r2]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807D9EE
|
||||
.align 2, 0
|
||||
_0807D9B4: .4byte gUnknown_80F4468
|
||||
|
|
@ -605,7 +605,7 @@ _0807D9E0:
|
|||
ldr r3, _0807DA0C
|
||||
add r3, sp
|
||||
ldr r0, [r3]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807D9EE:
|
||||
movs r0, 0x1
|
||||
bl sub_807EC28
|
||||
|
|
@ -647,7 +647,7 @@ sub_807DA14:
|
|||
ldr r0, _0807DA48
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807DA4C
|
||||
b _0807DA5C
|
||||
.align 2, 0
|
||||
|
|
@ -818,7 +818,7 @@ _0807DB94:
|
|||
_0807DBA0:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807DC54
|
||||
.align 2, 0
|
||||
_0807DBAC: .4byte gUnknown_80FD08C
|
||||
|
|
@ -878,7 +878,7 @@ _0807DBF4:
|
|||
ldr r0, _0807DC2C
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807DC3A
|
||||
.align 2, 0
|
||||
_0807DC24: .4byte 0x0000fffc
|
||||
|
|
@ -888,7 +888,7 @@ _0807DC30:
|
|||
ldr r0, _0807DC60
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807DC3A:
|
||||
ldr r0, _0807DC64
|
||||
ldr r0, [r0]
|
||||
|
|
@ -953,7 +953,7 @@ _0807DCAC:
|
|||
_0807DCB8:
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807DF0E
|
||||
.align 2, 0
|
||||
_0807DCC4: .4byte gUnknown_80FD3D0
|
||||
|
|
@ -1192,7 +1192,7 @@ _0807DE74:
|
|||
ldr r0, _0807DF30
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x28
|
||||
movs r1, 0x2B
|
||||
bl sub_803E708
|
||||
|
|
@ -1316,7 +1316,7 @@ _0807DF8E:
|
|||
ldr r0, _0807DFB0
|
||||
mov r1, r10
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
b _0807DFC2
|
||||
.align 2, 0
|
||||
_0807DFA8: .4byte gDungeon
|
||||
|
|
@ -1346,7 +1346,7 @@ _0807DFD4:
|
|||
ldr r0, _0807E184
|
||||
mov r1, r10
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807E188
|
||||
ldr r2, [r0]
|
||||
ldr r0, [sp, 0x8]
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ _0807E816:
|
|||
ldr r0, _0807E884
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807E844:
|
||||
movs r5, 0
|
||||
_0807E846:
|
||||
|
|
@ -494,7 +494,7 @@ MudWaterSportEffect:
|
|||
bl GetLeader
|
||||
ldr r1, _0807EA68
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807EA8C
|
||||
.align 2, 0
|
||||
_0807EA5C: .4byte gUnknown_80F4EAC
|
||||
|
|
@ -514,7 +514,7 @@ _0807EA6C:
|
|||
bl GetLeader
|
||||
ldr r1, _0807EA9C
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807EA8C:
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
|
@ -677,7 +677,7 @@ _0807EBA6:
|
|||
bl GetLeader
|
||||
ldr r1, _0807EC1C
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807EBD4:
|
||||
ldr r4, _0807EC14
|
||||
ldr r0, [r4]
|
||||
|
|
@ -697,7 +697,7 @@ _0807EBD4:
|
|||
bl GetLeader
|
||||
ldr r1, _0807EC24
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807EC00:
|
||||
ldr r0, [sp, 0x8]
|
||||
add sp, 0xC
|
||||
|
|
@ -1621,7 +1621,7 @@ sub_807F33C:
|
|||
bl GetLeader
|
||||
ldr r1, _0807F428
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r6, 0
|
||||
_0807F360:
|
||||
movs r5, 0
|
||||
|
|
@ -1748,7 +1748,7 @@ sub_807F43C:
|
|||
ldr r0, _0807F468
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807F46C
|
||||
b _0807F694
|
||||
.align 2, 0
|
||||
|
|
@ -1761,7 +1761,7 @@ _0807F470:
|
|||
ldr r0, _0807F488
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807F48C
|
||||
ldr r2, [r0]
|
||||
mov r0, r8
|
||||
|
|
@ -2046,7 +2046,7 @@ _0807F6A8:
|
|||
ldr r0, _0807F860
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807F864
|
||||
ldr r2, [r0]
|
||||
ldr r0, [sp, 0xEC]
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ _08080A26:
|
|||
_08080A2E:
|
||||
ldr r1, [r0]
|
||||
ldr r0, [sp, 0x14]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08080A46
|
||||
.align 2, 0
|
||||
_08080A38: .4byte gUnknown_80FDACC
|
||||
|
|
@ -214,7 +214,7 @@ _08080A3C:
|
|||
ldr r0, _08080A58
|
||||
ldr r1, [r0]
|
||||
ldr r0, [sp, 0x14]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08080A46:
|
||||
add sp, 0x30
|
||||
pop {r3-r5}
|
||||
|
|
|
|||
|
|
@ -322,12 +322,12 @@ sub_8084448:
|
|||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r4, 0x50
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r0, r5, 0
|
||||
bl sub_8070BC0
|
||||
lsls r0, 24
|
||||
|
|
@ -516,12 +516,12 @@ sub_80845E0:
|
|||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r4, 0x50
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r0, r6, 0
|
||||
bl sub_8070BC0
|
||||
lsls r0, 24
|
||||
|
|
@ -585,7 +585,7 @@ _08084680:
|
|||
ldr r0, _0808469C
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r0, r7, 0
|
||||
bl sub_8070BC0
|
||||
lsls r0, 24
|
||||
|
|
|
|||
|
|
@ -3103,7 +3103,7 @@ _080A8F30:
|
|||
ldrsh r1, [r0, r2]
|
||||
_080A8F34:
|
||||
adds r0, r4, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
b _080A8F44
|
||||
_080A8F3C:
|
||||
ldr r1, _080A8F4C
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ _080A184C:
|
|||
bl sub_80A8BFC
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
bl CanMove
|
||||
bl GetCanMoveFlag
|
||||
b _080A171E
|
||||
_080A185E:
|
||||
lsls r0, r5, 16
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ _0808FDB0:
|
|||
movs r3, 0
|
||||
ldrsh r1, [r2, r3]
|
||||
adds r0, r6, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
ldr r1, _0808FEF4
|
||||
mov r2, r10
|
||||
movs r3, 0
|
||||
|
|
|
|||
|
|
@ -308,8 +308,8 @@ gUnknown_80F6624: @ 80F6624
|
|||
.byte 0xb9, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xba, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00
|
||||
.byte 0xbb, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00
|
||||
|
||||
.global gStatusSpriteMasks_SleepStatus
|
||||
gStatusSpriteMasks_SleepStatus: @ 80F669C
|
||||
.global gStatusSpriteMasks_SleepClassStatus
|
||||
gStatusSpriteMasks_SleepClassStatus: @ 80F669C
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_SLEEP @ STATUS_SLEEP
|
||||
.4byte STATUS_SPRITE_SLEEPLESS @ STATUS_SLEEPLESS
|
||||
|
|
@ -317,16 +317,16 @@ gStatusSpriteMasks_SleepStatus: @ 80F669C
|
|||
.4byte 0 @ STATUS_YAWNING
|
||||
.4byte STATUS_SPRITE_SLEEP @ STATUS_NAPPING
|
||||
|
||||
.global gStatusSpriteMasks_NonVolatileStatus
|
||||
gStatusSpriteMasks_NonVolatileStatus: @ 80F66B4
|
||||
.global gStatusSpriteMasks_BurnClassStatus
|
||||
gStatusSpriteMasks_BurnClassStatus: @ 80F66B4
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_BURNED @ STATUS_BURN
|
||||
.4byte STATUS_SPRITE_POISONED @ STATUS_POISONED
|
||||
.4byte STATUS_SPRITE_BADLY_POISONED @ STATUS_BADLY_POISONED
|
||||
.4byte 0 @ STATUS_PARALYSIS
|
||||
|
||||
.global gStatusSpriteMasks_ImmobilizeStatus
|
||||
gStatusSpriteMasks_ImmobilizeStatus: @ 80F66C8
|
||||
.global gStatusSpriteMasks_FrozenClassStatus
|
||||
gStatusSpriteMasks_FrozenClassStatus: @ 80F66C8
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_FROZEN @ STATUS_FROZEN
|
||||
.4byte 0 @ STATUS_SHADOW_HOLD
|
||||
|
|
@ -336,8 +336,8 @@ gStatusSpriteMasks_ImmobilizeStatus: @ 80F66C8
|
|||
.4byte 0 @ STATUS_PETRIFIED
|
||||
.4byte 0 @ STATUS_CONSTRICTION
|
||||
|
||||
.global gStatusSpriteMasks_VolatileStatus
|
||||
gStatusSpriteMasks_VolatileStatus: @ 80F66E8
|
||||
.global gStatusSpriteMasks_CringeClassStatus
|
||||
gStatusSpriteMasks_CringeClassStatus: @ 80F66E8
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_CRINGE
|
||||
.4byte STATUS_SPRITE_CONFUSED @ STATUS_CONFUSED
|
||||
|
|
@ -347,8 +347,8 @@ gStatusSpriteMasks_VolatileStatus: @ 80F66E8
|
|||
.4byte STATUS_SPRITE_ENCORE @ STATUS_ENCORE
|
||||
.4byte 0 @ STATUS_INFATUATED
|
||||
|
||||
.global gStatusSpriteMasks_ChargingStatus
|
||||
gStatusSpriteMasks_ChargingStatus: @ 80F6708
|
||||
.global gStatusSpriteMasks_BideClassStatus
|
||||
gStatusSpriteMasks_BideClassStatus: @ 80F6708
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_BIDE
|
||||
.4byte 0 @ STATUS_SOLARBEAM
|
||||
|
|
@ -363,8 +363,8 @@ gStatusSpriteMasks_ChargingStatus: @ 80F6708
|
|||
.4byte 0 @ STATUS_CHARGING
|
||||
.4byte 0 @ STATUS_ENRAGED
|
||||
|
||||
.global gStatusSpriteMasks_ProtectionStatus
|
||||
gStatusSpriteMasks_ProtectionStatus: @ 80F673C
|
||||
.global gStatusSpriteMasks_ReflectClassStatus
|
||||
gStatusSpriteMasks_ReflectClassStatus: @ 80F673C
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_SHIELD_BLUE @ STATUS_REFLECT
|
||||
.4byte STATUS_SPRITE_SHIELD_RED @ STATUS_SAFEGUARD
|
||||
|
|
@ -381,42 +381,42 @@ gStatusSpriteMasks_ProtectionStatus: @ 80F673C
|
|||
.4byte STATUS_SPRITE_SHIELD_GREEN @ STATUS_VITAL_THROW
|
||||
.4byte STATUS_SPRITE_SHIELD_BLUE @ STATUS_MIST
|
||||
|
||||
.global gStatusSpriteMasks_WaitingStatus
|
||||
gStatusSpriteMasks_WaitingStatus: @ 80F6778
|
||||
.global gStatusSpriteMasks_CurseClassStatus
|
||||
gStatusSpriteMasks_CurseClassStatus: @ 80F6778
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_CURSED @ STATUS_CURSED
|
||||
.4byte 0 @ STATUS_DECOY
|
||||
.4byte STATUS_SPRITE_SNATCH @ STATUS_SNATCH
|
||||
|
||||
.global gStatusSpriteMasks_LinkedStatus
|
||||
gStatusSpriteMasks_LinkedStatus: @ 80F6788
|
||||
.global gStatusSpriteMasks_LeechSeedClassStatus
|
||||
gStatusSpriteMasks_LeechSeedClassStatus: @ 80F6788
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_LEECH_SEED
|
||||
.4byte 0 @ STATUS_DESTINY_BOND
|
||||
|
||||
.global gStatusSpriteMasks_MoveStatus
|
||||
gStatusSpriteMasks_MoveStatus: @ 80F6794
|
||||
.global gStatusSpriteMasks_SureShotClassStatus
|
||||
gStatusSpriteMasks_SureShotClassStatus: @ 80F6794
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_SURE_SHOT @ STATUS_SURE_SHOT
|
||||
.4byte STATUS_SPRITE_WHIFFER @ STATUS_WHIFFER
|
||||
.4byte STATUS_SPRITE_SET_DAMAGE @ STATUS_SET_DAMAGE
|
||||
.4byte STATUS_SPRITE_FOCUS_ENERGY @ STATUS_FOCUS_ENERGY
|
||||
|
||||
.global gStatusSpriteMasks_ItemStatus
|
||||
gStatusSpriteMasks_ItemStatus: @ 80F67A8
|
||||
.global gStatusSpriteMasks_LongTossClassStatus
|
||||
gStatusSpriteMasks_LongTossClassStatus: @ 80F67A8
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_LONG_TOSS
|
||||
.4byte 0 @ STATUS_PIERCE
|
||||
|
||||
.global gStatusSpriteMasks_TransformStatus
|
||||
gStatusSpriteMasks_TransformStatus: @ 80F67B4
|
||||
.global gStatusSpriteMasks_InvisibleClassStatus
|
||||
gStatusSpriteMasks_InvisibleClassStatus: @ 80F67B4
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_INVISIBLE
|
||||
.4byte 0 @ STATUS_TRANSFORMED
|
||||
.4byte 0 @ STATUS_MOBILE
|
||||
|
||||
.global gStatusSpriteMasks_EyesightStatus
|
||||
gStatusSpriteMasks_EyesightStatus: @ 80F67C4
|
||||
.global gStatusSpriteMasks_BlinkerClassStatus
|
||||
gStatusSpriteMasks_BlinkerClassStatus: @ 80F67C4
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_BLINKER @ STATUS_BLINKER
|
||||
.4byte STATUS_SPRITE_CROSS_EYED @ STATUS_CROSS_EYED
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move);
|
||||
bool8 MoveMatchesBideClassStatus(Entity *pokemon, Move *move);
|
||||
// checkCharge = Check for the move named Charge.
|
||||
bool8 IsChargingAnyTwoTurnMove(Entity *pokemon, bool8 checkCharge);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void SetMessageArgument(u8 *buffer, Entity *entity, u32 param_3);
|
||||
void SubstitutePlaceholderStringTags(u8 *buffer, Entity *entity, u32 param_3);
|
||||
|
||||
void sub_8045ACC(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,13 +35,13 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target);
|
|||
void VitalThrowStatusTarget(Entity * pokemon, Entity * target);
|
||||
void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4);
|
||||
void sub_807A0CC(Entity * pokemon, Entity * target);
|
||||
void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8 param_4);
|
||||
void SendNonVolatileEndMessage(Entity * pokemon, Entity * target);
|
||||
void SendImmobilizeEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendVolatileEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendProtectionEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus);
|
||||
void SendLinkedEndMessage(Entity * pokemon, Entity * target);
|
||||
void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8 param_4);
|
||||
void EndBurnClassStatus(Entity * pokemon, Entity * target);
|
||||
void EndFrozenClassStatus(Entity * pokemon, Entity *target);
|
||||
void EndCringeClassStatus(Entity * pokemon, Entity *target);
|
||||
void EndReflectClassStatus(Entity * pokemon, Entity *target);
|
||||
void EndCurseClassStatus(Entity * pokemon, Entity * target, u8 curseClassStatus);
|
||||
void EndLeechSeedClassStatus(Entity * pokemon, Entity * target);
|
||||
void SendMoveEndMessage(Entity * pokemon, Entity * target);
|
||||
void SendTransformEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendEyesightEndMessage(Entity * pokemon,Entity * target);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef GUARD_CONSTANTS_STATUS_H
|
||||
#define GUARD_CONSTANTS_STATUS_H
|
||||
|
||||
// Sleep statuses
|
||||
// Sleep class statuses
|
||||
#define STATUS_NONE 0
|
||||
#define STATUS_SLEEP 1
|
||||
#define STATUS_SLEEPLESS 2
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
#define STATUS_YAWNING 4
|
||||
#define STATUS_NAPPING 5
|
||||
|
||||
// Non-volatile statuses
|
||||
// Burn class statuses
|
||||
#define STATUS_BURN 1
|
||||
#define STATUS_POISONED 2
|
||||
#define STATUS_BADLY_POISONED 3
|
||||
#define STATUS_PARALYSIS 4
|
||||
|
||||
// Immobilize statuses
|
||||
// Frozen class statuses
|
||||
#define STATUS_FROZEN 1
|
||||
#define STATUS_SHADOW_HOLD 2
|
||||
#define STATUS_WRAP 3
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
#define STATUS_PETRIFIED 6
|
||||
#define STATUS_CONSTRICTION 7
|
||||
|
||||
// Volatile statuses
|
||||
// Cringe class statuses
|
||||
#define STATUS_CRINGE 1
|
||||
#define STATUS_CONFUSED 2
|
||||
#define STATUS_PAUSED 3
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
#define STATUS_ENCORE 6
|
||||
#define STATUS_INFATUATED 7
|
||||
|
||||
// Charging statuses
|
||||
// Bide class statuses
|
||||
#define STATUS_BIDE 1
|
||||
#define STATUS_SOLARBEAM 2
|
||||
#define STATUS_SKY_ATTACK 3
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
#define STATUS_CHARGING 11
|
||||
#define STATUS_ENRAGED 12
|
||||
|
||||
// Protection statuses
|
||||
// ReflectClassStatus statuses
|
||||
#define STATUS_REFLECT 1
|
||||
#define STATUS_SAFEGUARD 2
|
||||
#define STATUS_LIGHT_SCREEN 3
|
||||
|
|
@ -63,31 +63,31 @@
|
|||
#define STATUS_VITAL_THROW 13
|
||||
#define STATUS_MIST 14
|
||||
|
||||
// Waiting statuses
|
||||
// Curse class statuses
|
||||
#define STATUS_CURSED 1
|
||||
#define STATUS_DECOY 2
|
||||
#define STATUS_SNATCH 3
|
||||
|
||||
// Linked statuses
|
||||
// Leech Seed class statuses
|
||||
#define STATUS_LEECH_SEED 1
|
||||
#define STATUS_DESTINY_BOND 2
|
||||
|
||||
// Move statuses
|
||||
// Sure Shot class statuses
|
||||
#define STATUS_SURE_SHOT 1
|
||||
#define STATUS_WHIFFER 2
|
||||
#define STATUS_SET_DAMAGE 3
|
||||
#define STATUS_FOCUS_ENERGY 4
|
||||
|
||||
// Item statuses
|
||||
// Long Toss class statuses
|
||||
#define STATUS_LONG_TOSS 1
|
||||
#define STATUS_PIERCE 2
|
||||
|
||||
// Transform statuses
|
||||
// Invisible class statuses
|
||||
#define STATUS_INVISIBLE 1
|
||||
#define STATUS_TRANSFORMED 2
|
||||
#define STATUS_MOBILE 3
|
||||
|
||||
// Eyesight statuses
|
||||
// Blinker class statuses
|
||||
#define STATUS_BLINKER 1
|
||||
#define STATUS_CROSS_EYED 2
|
||||
#define STATUS_EYEDROPS 3
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef GUARD_CONSTANTS_TARGETING_H
|
||||
#define GUARD_CONSTANTS_TARGETING_H
|
||||
|
||||
#define TARGETING_DECOY_NONE 0
|
||||
#define TARGETING_DECOY_TEAM 1
|
||||
#define TARGETING_DECOY_WILD 2
|
||||
#define DECOY_AI_NONE 0
|
||||
#define DECOY_AI_TEAM 1
|
||||
#define DECOY_AI_WILD 2
|
||||
|
||||
#define TREATMENT_TREAT_AS_ALLY 0
|
||||
#define TREATMENT_TREAT_AS_ENEMY 1
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ struct AIPossibleMove
|
|||
s32 weight;
|
||||
};
|
||||
|
||||
void DecideAttack(Entity *pokemon);
|
||||
void ChooseAIMove(Entity *pokemon);
|
||||
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move *move);
|
||||
bool8 IsTargetInLineRange(Entity *user, Entity *target, s32 range);
|
||||
s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, Entity *user, Entity *target, Move *move, u32 hasStatusChecker);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void MoveIfPossible(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
void AIMovement(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
bool8 CanTakeItem(Entity *pokemon);
|
||||
bool8 ChooseTargetPosition(Entity *pokemon);
|
||||
void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void sub_80521D0(void);
|
|||
void sub_8052210(bool8 a0);
|
||||
|
||||
// These functions display the string if certain conditions are met. The conditions differ depending on the function. The string is then saved to the message log.
|
||||
void TryDisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str);
|
||||
void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage2(Entity *pokemon, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u8 *str);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Entity *GetPartnerEntity(void);
|
|||
void sub_80854D4(void);
|
||||
void sub_80855E4(DungeonCallback func);
|
||||
void sub_808563C(DungeonCallback func);
|
||||
Entity *GetEntityFromClientType(u8 entityType);
|
||||
Entity *GetEntityFromMonsterBehavior(u8 entityType);
|
||||
void sub_80856C8(Entity * pokemon, s32 x, s32 y);
|
||||
void sub_80856E0(Entity * pokemon, s32 direction);
|
||||
void sub_8085764(void);
|
||||
|
|
@ -26,7 +26,7 @@ void ShiftCameraToPosition(Position32 *posStruct, s32 cameraSteps);
|
|||
void SetFacingDirection(Entity *pokemon, s32 direction);
|
||||
void sub_8085930(s32 direction);
|
||||
void sub_80859F0(s32 direction);
|
||||
bool8 IsMovingClient(Entity *entity);
|
||||
bool8 ShouldRunMonsterAI(Entity *entity);
|
||||
void sub_8085B0C(Entity *pokemon);
|
||||
void sub_8085B4C(struct_8085B80 a0[], s16 *a1[], Entity *a2[], s32 a3);
|
||||
void sub_80857B8(void);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
u8 sub_8075BF4(Entity * pokemon, s32 sleepTurns);
|
||||
u8 sub_8075BF4(Entity * pokemon, s32 sleepClassStatusTurns);
|
||||
void sub_8075C58(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);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void InitializeRecruitedPokemon(void);
|
|||
//u8 GetBodySize(s16 index);
|
||||
|
||||
|
||||
void CopyMonsterNametoBuffer(u8 * buffer, s16 index);
|
||||
void CopyMonsterNameToBuffer(u8 * buffer, s16 index);
|
||||
void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index);
|
||||
void PrintColoredPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon, s32 colorNum);
|
||||
void sub_808D930(u8 *buffer, s32 index);
|
||||
|
|
@ -58,7 +58,7 @@ char * GetMonSpecies(s16 index);
|
|||
s32 GetMovementSpeed(s16 index);
|
||||
u8 GetMovementType(s16 index);
|
||||
u8 GetRegenSpeed(s16 index);
|
||||
bool8 CanMove(s16 index);
|
||||
bool8 GetCanMoveFlag(s16 index);
|
||||
u8 GetChanceAsleep(s16 index);
|
||||
u32 GetWeight(s16 index);
|
||||
u32 GetSize(s16 index);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@
|
|||
|
||||
extern const s16 gConfusedAttackChance;
|
||||
|
||||
bool8 HasStatusAffectingActions(Entity *pokemon);
|
||||
bool8 HasStatusThatPreventsActing(Entity *pokemon);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -77,104 +77,104 @@ typedef struct AITarget
|
|||
} AITarget;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Sleep
|
||||
typedef struct SleepClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 sleep;
|
||||
/* 0x1 */ u8 sleepTurns;
|
||||
} Sleep;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} SleepClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct NonVolatile
|
||||
typedef struct BurnClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 nonVolatileStatus;
|
||||
/* 0x1 */ u8 nonVolatileStatusTurns;
|
||||
/* 0x2 */ u8 nonVolatileStatusDamageCountdown;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
/* 0x2 */ u8 damageCountdown;
|
||||
/* 0x3 */ u8 unk4;
|
||||
} NonVolatile;
|
||||
} BurnClassStatus;
|
||||
|
||||
// size: 0xC
|
||||
typedef struct Immobilize
|
||||
typedef struct FrozenClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 immobilizeStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x4 */ s32 unk4;
|
||||
/* 0x8 */ u8 immobilizeStatusTurns;
|
||||
/* 0x9 */ u8 immobilizeStatusDamageCountdown;
|
||||
} Immobilize;
|
||||
/* 0x8 */ u8 turns;
|
||||
/* 0x9 */ u8 damageCountdown;
|
||||
} FrozenClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Volatile
|
||||
typedef struct CringeClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 volatileStatus;
|
||||
/* 0x1 */ u8 volatileStatusTurns;
|
||||
} Volatile;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} CringeClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Charging
|
||||
typedef struct BideClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 chargingStatus;
|
||||
/* 0x1 */ u8 chargingStatusTurns;
|
||||
/* 0x2 */ u8 chargingStatusMoveIndex; // The position of the move in the Pokémon's moveset that triggered the status.
|
||||
} Charging;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
/* 0x2 */ u8 moveSlot; // The position of the move in the Pokémon's moveset that triggered the status.
|
||||
} BideClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Protection
|
||||
typedef struct ReflectClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 protectionStatus;
|
||||
/* 0x1 */ u8 protectionStatusTurns;
|
||||
} Protection;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} ReflectClassStatus;
|
||||
|
||||
// size: 0x8
|
||||
typedef struct Waiting
|
||||
typedef struct CurseClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 waitingStatus;
|
||||
/* 0x1 */ bool8 enemyDecoy; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ bool8 applierNonTeamMemberFlag; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
||||
/* 0x2 */ bool8 unk2;
|
||||
/* 0x3 */ u8 waitingStatusTurns;
|
||||
/* 0x4 */ u8 curseDamageCountdown;
|
||||
} Waiting;
|
||||
/* 0x3 */ u8 turns;
|
||||
/* 0x4 */ u8 damageCountdown;
|
||||
} CurseClassStatus;
|
||||
|
||||
// size: 0xC
|
||||
typedef struct Linked
|
||||
typedef struct LeechSeedClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 linkedStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x4 */ u32 unk4;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ u8 linkedStatusTurns;
|
||||
/* 0xA */ u8 linkedStatusDamageCountdown;
|
||||
} Linked;
|
||||
/* 0x9 */ u8 turns;
|
||||
/* 0xA */ u8 damageCountdown;
|
||||
} LeechSeedClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct MoveStatus
|
||||
typedef struct SureShotClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 moveStatus;
|
||||
/* 0x0 */ u8 moveStatusTurns;
|
||||
} MoveStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} SureShotClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct ItemStatus
|
||||
typedef struct LongTossClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 itemStatus;
|
||||
} ItemStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
} LongTossClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct TransformStatus
|
||||
typedef struct InvisibleClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 transformStatus;
|
||||
/* 0x0 */ u8 transformStatusTurns;
|
||||
} TransformStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} InvisibleClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct EyesightStatus
|
||||
typedef struct BlinkerClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 eyesightStatus;
|
||||
/* 0x0 */ u8 eyesightStatusTurns;
|
||||
} EyesightStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} BlinkerClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Muzzled
|
||||
{
|
||||
/* 0x0 */ bool8 muzzled;
|
||||
/* 0x1 */ u8 muzzledTurns;
|
||||
/* 0x1 */ u8 turns;
|
||||
} Muzzled;
|
||||
|
||||
// size: 0x1C
|
||||
|
|
@ -254,22 +254,22 @@ typedef struct EntityInfo
|
|||
/* 0x98 */ u32 unk98;
|
||||
/* 0x9C */ u32 unk9C;
|
||||
/* 0xA0 */ s32 unkA0;
|
||||
/* 0xA4 */ u8 clientType;
|
||||
/* 0xA4 */ u8 monsterBehavior;
|
||||
u8 fillA5[0xA8 - 0xA5];
|
||||
// Statuses are split into groups based on which ones can't overlap.
|
||||
// See status.h for which statuses are in each group.
|
||||
/* 0xA8 */ Sleep sleep;
|
||||
/* 0xAC */ NonVolatile nonVolatile;
|
||||
/* 0xB0 */ Immobilize immobilize;
|
||||
/* 0xBC */ Volatile volatileStatus;
|
||||
/* 0xC0 */ Charging charging;
|
||||
/* 0xC4 */ Protection protection;
|
||||
/* 0xC8 */ Waiting waitingStruct;
|
||||
/* 0xD0 */ Linked linked;
|
||||
/* 0xDC */ MoveStatus moveStatus;
|
||||
/* 0xE0 */ ItemStatus itemStatus;
|
||||
/* 0xE4 */ TransformStatus transformStatus;
|
||||
/* 0xE8 */ EyesightStatus eyesightStatus;
|
||||
/* 0xA8 */ SleepClassStatus sleepClassStatus;
|
||||
/* 0xAC */ BurnClassStatus burnClassStatus;
|
||||
/* 0xB0 */ FrozenClassStatus frozenClassStatus;
|
||||
/* 0xBC */ CringeClassStatus cringeClassStatus;
|
||||
/* 0xC0 */ BideClassStatus bideClassStatus;
|
||||
/* 0xC4 */ ReflectClassStatus reflectClassStatus;
|
||||
/* 0xC8 */ CurseClassStatus curseClassStatus;
|
||||
/* 0xD0 */ LeechSeedClassStatus leechSeedClassStatus;
|
||||
/* 0xDC */ SureShotClassStatus sureShotClassStatus;
|
||||
/* 0xE0 */ LongTossClassStatus longTossClassStatus;
|
||||
/* 0xE4 */ InvisibleClassStatus invisibleClassStatus;
|
||||
/* 0xE8 */ BlinkerClassStatus blinkerClassStatus;
|
||||
/* 0xEC */ Muzzled muzzled;
|
||||
/* 0xF0 */ bool8 powerEars;
|
||||
/* 0xF1 */ bool8 scanning;
|
||||
|
|
@ -289,7 +289,7 @@ typedef struct EntityInfo
|
|||
/* 0xFD */ u8 perishSongTurns; // When this reaches 0, the Pokémon faints from Perish Song. Doubles as a bool for whether the Pokémon is afflicted by Perish Song.
|
||||
u8 unkFE;
|
||||
u8 unkFF;
|
||||
/* 0x100 */ u8 targetingDecoy; // If the Pokémon is targeting a decoy, this indicates whether the decoy target is a team or wild Pokémon.
|
||||
/* 0x100 */ u8 decoyAITracker; // If the Pokémon is targeting a decoy, this indicates whether the decoy target is a team or wild Pokémon.
|
||||
/* 0x104 */ s32 speedStage;
|
||||
// The turn counter for movement speed up/down is split into five timers each. Multiple timers are used if the Pokémon is affected by multiple
|
||||
// speed-up/slow effects at once, like using Agility twice.
|
||||
|
|
@ -303,7 +303,7 @@ typedef struct EntityInfo
|
|||
/* 0x118 */ Moves moves;
|
||||
/* 0x13C */ FixedPoint belly;
|
||||
/* 0x140 */ FixedPoint maxBelly;
|
||||
/* 0x144 */ bool8 aiNextToTarget; // True if an AI Pokémon is following another Pokémon and is already adjacent to them.
|
||||
/* 0x144 */ bool8 aiAllySkip; // True if an AI Pokémon is following another Pokémon and is already adjacent to them.
|
||||
/* 0x145 */ bool8 recalculateFollow; // Used by the AI to defer a movement decision until after all other Pokémon have moved.
|
||||
/* 0x146 */ u8 unk146;
|
||||
/* 0x147 */ bool8 waiting; // True if an AI Pokémon decided to do nothing this turn.
|
||||
|
|
@ -430,13 +430,45 @@ enum AIObjective
|
|||
AI_TAKE_ITEM
|
||||
};
|
||||
|
||||
enum ClientType
|
||||
enum MonsterBehavior
|
||||
{
|
||||
CLIENT_TYPE_NONE,
|
||||
CLIENT_TYPE_CLIENT, // Used for mission clients that need rescuing.
|
||||
CLIENT_TYPE_PARTNER,
|
||||
// 3
|
||||
CLIENT_TYPE_DONT_MOVE = 4 // Used for Diglett in the Skarmory boss fight.
|
||||
BEHAVIOR_FIXED_ENEMY,
|
||||
BEHAVIOR_RESCUE_TARGET, // Used for mission clients that need rescuing.
|
||||
BEHAVIOR_ALLY,
|
||||
BEHAVIOR_SKARMORY,
|
||||
BEHAVIOR_DIGLETT, // Used for Diglett in the Skarmory boss fight.
|
||||
BEHAVIOR_5, // 5 and 6 are probably Gengar and Ekans, but not sure which is which.
|
||||
BEHAVIOR_6,
|
||||
BEHAVIOR_MEDICHAM,
|
||||
BEHAVIOR_ZAPDOS,
|
||||
BEHAVIOR_MOLTRES,
|
||||
BEHAVIOR_ALAKAZAM_1,
|
||||
BEHAVIOR_GROUDON_1,
|
||||
BEHAVIOR_ALAKAZAM_2,
|
||||
BEHAVIOR_ARTICUNO,
|
||||
BEHAVIOR_GROUDON_2,
|
||||
BEHAVIOR_RAYQUAZA,
|
||||
BEHAVIOR_16,
|
||||
BEHAVIOR_MEWTWO,
|
||||
BEHAVIOR_ENTEI,
|
||||
BEHAVIOR_RAIKOU,
|
||||
BEHAVIOR_SUICUNE,
|
||||
BEHAVIOR_HO_OH,
|
||||
BEHAVIOR_LATIOS,
|
||||
BEHAVIOR_REGIROCK,
|
||||
BEHAVIOR_REGICE,
|
||||
BEHAVIOR_REGISTEEL,
|
||||
BEHAVIOR_JIRACHI,
|
||||
BEHAVIOR_LUGIA,
|
||||
BEHAVIOR_KYOGRE,
|
||||
BEHAVIOR_29,
|
||||
BEHAVIOR_CELEBI,
|
||||
BEHAVIOR_SMEARGLE,
|
||||
BEHAVIOR_32,
|
||||
BEHAVIOR_33,
|
||||
BEHAVIOR_34,
|
||||
BEHAVIOR_35,
|
||||
BEHAVIOR_36,
|
||||
};
|
||||
|
||||
enum VisualFlag
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ typedef struct Dungeon
|
|||
/* 0x37F4 */ s32 unk37F4;
|
||||
/* 0x37F8 */ bool8 plusIsActive[2]; // Index 0: Enemy , Index 1: Team
|
||||
/* 0x37FA */ bool8 minusIsActive[2]; // Index 0: Enemy , Index 1: Team
|
||||
/* 0x37FC */ bool8 decoyActive;
|
||||
/* 0x37FC */ bool8 decoyIsActive;
|
||||
/* 0x37FD */ bool8 unk37FD;
|
||||
/* 0x37FE */ bool8 deoxysDefeat; // Flag set for deoxys in Meteor Cave
|
||||
/* 0x37FE */ bool8 unk37FF;
|
||||
|
|
@ -404,7 +404,7 @@ typedef struct Dungeon
|
|||
u8 fill1357A[0x1357C - 0x1357A];
|
||||
/* 0x1357C */ Entity *teamPokemon[MAX_TEAM_MEMBERS];
|
||||
/* 0x1358C */ Entity *wildPokemon[DUNGEON_MAX_WILD_POKEMON];
|
||||
/* 0x135CC */ Entity *allPokemon[DUNGEON_MAX_POKEMON]; // Contains both team and wild Pokémon
|
||||
/* 0x135CC */ Entity *activePokemon[DUNGEON_MAX_POKEMON]; // Contains both team and wild Pokémon
|
||||
/* 0x1361C */ Entity *items[DUNGEON_MAX_ITEMS];
|
||||
/* 0x1371C */ Entity *traps[DUNGEON_MAX_TRAPS];
|
||||
/* 0x1381C */ Entity teamPokemonEntities[MAX_TEAM_MEMBERS];
|
||||
|
|
|
|||
|
|
@ -993,7 +993,7 @@ void sub_803F580(u8 a0)
|
|||
unk18214 = strPtr->unk18214;
|
||||
if (unk18214 == 0) {
|
||||
u32 unkVar;
|
||||
if (info->eyesightStatus.eyesightStatus == STATUS_BLINKER) {
|
||||
if (info->blinkerClassStatus.status == STATUS_BLINKER) {
|
||||
strPtr->blinded = 1;
|
||||
unkVar = 0xE;
|
||||
}
|
||||
|
|
@ -1016,7 +1016,7 @@ void sub_803F580(u8 a0)
|
|||
}
|
||||
|
||||
before = strPtr->hallucinating;
|
||||
if (info->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED) {
|
||||
if (info->blinkerClassStatus.status == STATUS_CROSS_EYED) {
|
||||
strPtr->hallucinating = 1;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1066,7 +1066,7 @@ void sub_803F580(u8 a0)
|
|||
|
||||
if (strPtr->cameraPos.x != strPtr->cameraPosMirror.x || strPtr->cameraPos.y != strPtr->cameraPosMirror.y) {
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
Entity *mon = gDungeon->allPokemon[i];
|
||||
Entity *mon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(mon)) {
|
||||
sub_80402AC(mon->pos.x, mon->pos.y);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ void HandleLuminousOrbAction(Entity *pokemon)
|
|||
sub_803F580(0);
|
||||
sub_8049ED4();
|
||||
sub_8040A84();
|
||||
TryDisplayDungeonLoggableMessage(pokemon, gUnknown_80FD040);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD040);
|
||||
}
|
||||
|
||||
void sub_8040094(u8 r0)
|
||||
|
|
|
|||
|
|
@ -16,18 +16,18 @@
|
|||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
|
||||
extern u32 gStatusSpriteMasks_SleepStatus[];
|
||||
extern u32 gStatusSpriteMasks_NonVolatileStatus[];
|
||||
extern u32 gStatusSpriteMasks_ImmobilizeStatus[];
|
||||
extern u32 gStatusSpriteMasks_VolatileStatus[];
|
||||
extern u32 gStatusSpriteMasks_ChargingStatus[];
|
||||
extern u32 gStatusSpriteMasks_ProtectionStatus[];
|
||||
extern u32 gStatusSpriteMasks_WaitingStatus[];
|
||||
extern u32 gStatusSpriteMasks_LinkedStatus[];
|
||||
extern u32 gStatusSpriteMasks_MoveStatus[];
|
||||
extern u32 gStatusSpriteMasks_ItemStatus[];
|
||||
extern u32 gStatusSpriteMasks_TransformStatus[];
|
||||
extern u32 gStatusSpriteMasks_EyesightStatus[];
|
||||
extern u32 gStatusSpriteMasks_SleepClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_BurnClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_FrozenClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_CringeClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_BideClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_ReflectClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_CurseClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_LeechSeedClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_SureShotClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_LongTossClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_InvisibleClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_BlinkerClassStatus[];
|
||||
extern u32 gStatusSpriteMasks_MuzzledStatus[];
|
||||
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ void sub_8041888(u8 param_1)
|
|||
EntityInfo *entityInfo;
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if(EntityExists(entity))
|
||||
{
|
||||
entityInfo = GetEntInfo(entity);
|
||||
|
|
@ -182,26 +182,26 @@ void EntityUpdateStatusSprites(Entity *entity)
|
|||
|
||||
if (entityInfo->id == 0xb9) {
|
||||
// NOTE: clean this up sometime
|
||||
temp = entityInfo->sleep.sleepTurns;
|
||||
temp = entityInfo->sleepClassStatus.turns;
|
||||
flag = 0x7f;
|
||||
temp ^= flag;
|
||||
flag = (temp) != 0;
|
||||
}
|
||||
if (flag) {
|
||||
spriteStatus = gStatusSpriteMasks_SleepStatus[entityInfo->sleep.sleep];
|
||||
spriteStatus = gStatusSpriteMasks_SleepClassStatus[entityInfo->sleepClassStatus.status];
|
||||
}
|
||||
spriteStatus = spriteStatus |
|
||||
gStatusSpriteMasks_NonVolatileStatus[entityInfo->nonVolatile.nonVolatileStatus] |
|
||||
gStatusSpriteMasks_ImmobilizeStatus[entityInfo->immobilize.immobilizeStatus] |
|
||||
gStatusSpriteMasks_VolatileStatus[entityInfo->volatileStatus.volatileStatus] |
|
||||
gStatusSpriteMasks_ChargingStatus[entityInfo->charging.chargingStatus] |
|
||||
gStatusSpriteMasks_ProtectionStatus[entityInfo->protection.protectionStatus] |
|
||||
gStatusSpriteMasks_WaitingStatus[entityInfo->waitingStruct.waitingStatus] |
|
||||
gStatusSpriteMasks_LinkedStatus[entityInfo->linked.linkedStatus] |
|
||||
gStatusSpriteMasks_MoveStatus[entityInfo->moveStatus.moveStatus] |
|
||||
gStatusSpriteMasks_ItemStatus[entityInfo->itemStatus.itemStatus] |
|
||||
gStatusSpriteMasks_TransformStatus[entityInfo->transformStatus.transformStatus] |
|
||||
gStatusSpriteMasks_EyesightStatus[entityInfo->eyesightStatus.eyesightStatus] |
|
||||
gStatusSpriteMasks_BurnClassStatus[entityInfo->burnClassStatus.status] |
|
||||
gStatusSpriteMasks_FrozenClassStatus[entityInfo->frozenClassStatus.status] |
|
||||
gStatusSpriteMasks_CringeClassStatus[entityInfo->cringeClassStatus.status] |
|
||||
gStatusSpriteMasks_BideClassStatus[entityInfo->bideClassStatus.status] |
|
||||
gStatusSpriteMasks_ReflectClassStatus[entityInfo->reflectClassStatus.status] |
|
||||
gStatusSpriteMasks_CurseClassStatus[entityInfo->curseClassStatus.status] |
|
||||
gStatusSpriteMasks_LeechSeedClassStatus[entityInfo->leechSeedClassStatus.status] |
|
||||
gStatusSpriteMasks_SureShotClassStatus[entityInfo->sureShotClassStatus.status] |
|
||||
gStatusSpriteMasks_LongTossClassStatus[entityInfo->longTossClassStatus.status] |
|
||||
gStatusSpriteMasks_InvisibleClassStatus[entityInfo->invisibleClassStatus.status] |
|
||||
gStatusSpriteMasks_BlinkerClassStatus[entityInfo->blinkerClassStatus.status] |
|
||||
gStatusSpriteMasks_MuzzledStatus[entityInfo->muzzled.muzzled];
|
||||
|
||||
if (entityInfo->grudge) {
|
||||
|
|
|
|||
|
|
@ -103,14 +103,14 @@ void sub_80427AC(void)
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
entity = gDungeon->allPokemon[i];
|
||||
entity = gDungeon->activePokemon[i];
|
||||
if (EntityExists(entity)) {
|
||||
enInfo = GetEntInfo(entity);
|
||||
if (enInfo->unkF3) {
|
||||
enInfo->unkF3 = FALSE;
|
||||
sub_80429A0(entity);
|
||||
if (!enInfo->isNotTeamMember) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
|
||||
DisplayDungeonLoggableMessageTrue(entity, *gPtrFeralFoundItemMessage);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8)
|
|||
if (!r6) {
|
||||
s32 rnd;
|
||||
|
||||
gDungeon->decoyActive = FALSE;
|
||||
gDungeon->decoyIsActive = FALSE;
|
||||
rnd = DungeonRandInt(4);
|
||||
gDungeon->unk37FD = 0;
|
||||
gDungeon->deoxysDefeat = FALSE;
|
||||
|
|
@ -1019,7 +1019,7 @@ void sub_8043D60(void)
|
|||
unk = FALSE;
|
||||
if (IsClientOrTeamBase(monInfo->joinedAt.joinedAt))
|
||||
unk = FALSE;
|
||||
if (monInfo->clientType == CLIENT_TYPE_CLIENT)
|
||||
if (monInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET)
|
||||
unk = FALSE;
|
||||
|
||||
if (unk) {
|
||||
|
|
|
|||
|
|
@ -602,9 +602,9 @@ bool8 sub_8045804(Entity *ent)
|
|||
if (!monInfo->isNotTeamMember)
|
||||
return TRUE;
|
||||
|
||||
if (!saveTyping->unk1820F && monInfo->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||
if (!saveTyping->unk1820F && monInfo->invisibleClassStatus.status == STATUS_INVISIBLE)
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (saveTyping->unk1820B || saveTyping->unk1820D)
|
||||
return TRUE;
|
||||
|
||||
|
|
@ -631,10 +631,10 @@ bool8 sub_8045888(Entity *ent)
|
|||
if (ent->isVisible) {
|
||||
s32 x = (ent->pixelPos.x / 256) - gDungeon->unk181e8.cameraPixelPos.x;
|
||||
s32 y = (ent->pixelPos.y / 256) - gDungeon->unk181e8.cameraPixelPos.y;
|
||||
|
||||
|
||||
if (x >= -32 && y >= -32 && x <= 272 && y <= 192) {
|
||||
UnkDungeonGlobal_unk181E8_sub *saveTyping = &gDungeon->unk181e8;
|
||||
|
||||
|
||||
switch (GetEntityType(ent)) {
|
||||
case ENTITY_ITEM: {
|
||||
if (!saveTyping->unk1820E && !sub_803F428(&ent->pos))
|
||||
|
|
@ -645,7 +645,7 @@ bool8 sub_8045888(Entity *ent)
|
|||
EntityInfo *monInfo = GetEntInfo(ent);
|
||||
|
||||
if (monInfo->isNotTeamMember) {
|
||||
if (!gDungeon->unk181e8.unk1820F && monInfo->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||
if (!gDungeon->unk181e8.unk1820F && monInfo->invisibleClassStatus.status == STATUS_INVISIBLE)
|
||||
return FALSE;
|
||||
|
||||
if (!saveTyping->unk1820D && !sub_803F428(&ent->pos))
|
||||
|
|
@ -658,7 +658,7 @@ bool8 sub_8045888(Entity *ent)
|
|||
return FALSE;
|
||||
break;
|
||||
}
|
||||
case ENTITY_NOTHING:
|
||||
case ENTITY_NOTHING:
|
||||
case ENTITY_UNK_5: {
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ void sub_8045ACC(void)
|
|||
{
|
||||
entity = gDungeon->teamPokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
gDungeon->allPokemon[pokeCount] = entity;
|
||||
gDungeon->activePokemon[pokeCount] = entity;
|
||||
pokeCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -41,12 +41,12 @@ void sub_8045ACC(void)
|
|||
{
|
||||
entity = gDungeon->wildPokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
gDungeon->allPokemon[pokeCount] = entity;
|
||||
gDungeon->activePokemon[pokeCount] = entity;
|
||||
pokeCount++;
|
||||
}
|
||||
}
|
||||
for (; pokeCount < DUNGEON_MAX_POKEMON; pokeCount++) {
|
||||
gDungeon->allPokemon[pokeCount] = NULL;
|
||||
gDungeon->activePokemon[pokeCount] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ s32 GetTeamMemberEntityIndex(Entity *pokemon)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void SetMessageArgument(u8 *buffer, Entity *entity, u32 param_3)
|
||||
void SubstitutePlaceholderStringTags(u8 *buffer, Entity *entity, u32 param_3)
|
||||
{
|
||||
switch(GetEntityType(entity))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ bool8 sub_8047930(Entity *pokemon, Entity *target)
|
|||
bool8 flag;
|
||||
|
||||
if (((GetEntInfo(target)->shopkeeper == TRUE) ||
|
||||
(GetEntInfo(target)->clientType == CLIENT_TYPE_DONT_MOVE)) || (GetEntInfo(target)->clientType == CLIENT_TYPE_CLIENT)) {
|
||||
(GetEntInfo(target)->monsterBehavior == BEHAVIOR_DIGLETT)) || (GetEntInfo(target)->monsterBehavior == BEHAVIOR_RESCUE_TARGET)) {
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
|
|
@ -220,7 +220,7 @@ void sub_80479B8(char param_1, char param_2, u8 param_3, Entity *pokemon, Entity
|
|||
}
|
||||
PlaySoundEffect(0x14d);
|
||||
sub_8045BF8(gFormatBuffer_Items[0],item);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FDBB8); // $m0 caught the $i0
|
||||
info->heldItem = *item;
|
||||
sub_806A6E8(target);
|
||||
|
|
@ -537,8 +537,8 @@ void EyedropSeedItemAction(Entity *pokemon, Entity *target)
|
|||
|
||||
void CheriBerryItemAction(Entity *pokemon, Entity *target)
|
||||
{
|
||||
if(GetEntInfo(target)->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS)
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
if(GetEntInfo(target)->burnClassStatus.status == STATUS_PARALYSIS)
|
||||
EndBurnClassStatus(pokemon, target);
|
||||
else
|
||||
// Pointer to "But nothing happened!"
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80F89F4);
|
||||
|
|
@ -547,8 +547,8 @@ void CheriBerryItemAction(Entity *pokemon, Entity *target)
|
|||
void PechaBerryItemAction(Entity *pokemon, Entity *target)
|
||||
{
|
||||
EntityInfo *entInfo = GetEntInfo(target);
|
||||
if(entInfo->nonVolatile.nonVolatileStatus == STATUS_POISONED || entInfo->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
if(entInfo->burnClassStatus.status == STATUS_POISONED || entInfo->burnClassStatus.status == STATUS_BADLY_POISONED)
|
||||
EndBurnClassStatus(pokemon, target);
|
||||
else
|
||||
// Pointer to "But nothing happened!"
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80F89F4);
|
||||
|
|
@ -592,11 +592,11 @@ void DoomSeedItemAction(Entity *pokemon, Entity *target)
|
|||
|
||||
void RawstBerryItemAction(Entity *pokemon, Entity *target)
|
||||
{
|
||||
if(GetEntInfo(target)->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
if(GetEntInfo(target)->burnClassStatus.status == STATUS_BURN)
|
||||
EndBurnClassStatus(pokemon, target);
|
||||
else
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
// Pointer to "But nothing happened!"
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FB580);
|
||||
}
|
||||
|
|
@ -610,7 +610,7 @@ void HungerSeedItemAction(Entity *pokemon, Entity * target)
|
|||
else
|
||||
{
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
if (IQSkillIsEnabled(target, IQ_SELF_CURER))
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gPtrSelfHealPreventedHungerMessage);
|
||||
else
|
||||
|
|
@ -694,8 +694,8 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
|
|||
else {
|
||||
uVar1 = gUnknown_80F4FA4;
|
||||
}
|
||||
if (entityInfo_1->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(pokemon, target);
|
||||
if (entityInfo_1->frozenClassStatus.status == STATUS_FROZEN) {
|
||||
EndFrozenClassStatus(pokemon, target);
|
||||
}
|
||||
sub_806F370(pokemon, target, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -717,8 +717,8 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
|
|||
else {
|
||||
uVar1 = gUnknown_80F4FA6;
|
||||
}
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(pokemon, entity);
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_FROZEN) {
|
||||
EndFrozenClassStatus(pokemon, entity);
|
||||
}
|
||||
sub_806F370(pokemon, entity, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -832,7 +832,7 @@ bool8 sub_8048950(Entity *param_1,Item *item)
|
|||
if (CheckVariousStatuses2(entity, FALSE)) {
|
||||
flag = FALSE;
|
||||
}
|
||||
if (entityInfo->clientType == CLIENT_TYPE_CLIENT) {
|
||||
if (entityInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET) {
|
||||
flag = FALSE;
|
||||
}
|
||||
if (IsClientOrTeamBase(entityInfo->joinedAt.joinedAt)) {
|
||||
|
|
@ -894,7 +894,7 @@ bool8 sub_8048A68(Entity *param_1,Item *item)
|
|||
if (CheckVariousStatuses2(entity, FALSE)) {
|
||||
flag = FALSE;
|
||||
}
|
||||
if (pEVar6->clientType == CLIENT_TYPE_CLIENT) {
|
||||
if (pEVar6->monsterBehavior == BEHAVIOR_RESCUE_TARGET) {
|
||||
flag = FALSE;
|
||||
}
|
||||
if (IsClientOrTeamBase(pEVar6->joinedAt.joinedAt)) {
|
||||
|
|
@ -956,7 +956,7 @@ bool32 sub_8048B9C(Entity *entity,Item *param_2)
|
|||
{
|
||||
flag = FALSE;
|
||||
}
|
||||
if(entity1Info->clientType == CLIENT_TYPE_CLIENT)
|
||||
if(entity1Info->monsterBehavior == BEHAVIOR_RESCUE_TARGET)
|
||||
{
|
||||
flag = FALSE;
|
||||
}
|
||||
|
|
@ -1034,14 +1034,14 @@ bool8 sub_8048D50(Entity * pokemon, Item *item)
|
|||
|
||||
if ((item->flags & ITEM_FLAG_STICKY) != 0) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0], item);
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gItemStickyDoesntWorkText);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gItemStickyDoesntWorkText);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((entityInfo->muzzled.muzzled == TRUE) && (IsEdibleItem(item->id))) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FDCA4);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FDCA4);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1083,27 +1083,27 @@ void GrimyFoodItemAction(Entity *pokemon, Entity * target)
|
|||
|
||||
void IcePartItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrIcePartCrumbledMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrIcePartCrumbledMessage);
|
||||
}
|
||||
|
||||
void RockPartItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrRockPartCrumbledMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrRockPartCrumbledMessage);
|
||||
}
|
||||
|
||||
void SteelPartItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrSteelPartCrumbledMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrSteelPartCrumbledMessage);
|
||||
}
|
||||
|
||||
void WishStoneItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrWishStoneCrumbledMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrWishStoneCrumbledMessage);
|
||||
}
|
||||
|
||||
void MusicBoxItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||
{
|
||||
sub_80421C0(pokemon, 0xD6);
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrMusicBoxPlayedCrumbledMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrMusicBoxPlayedCrumbledMessage);
|
||||
sub_803E708(0x3C, 0x46);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ void sub_8068768(void)
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
entity = gDungeon->allPokemon[i];
|
||||
entity = gDungeon->activePokemon[i];
|
||||
|
||||
if (entity != NULL && EntityExists(entity))
|
||||
LoadPokemonSprite(GetEntInfo(entity)->apparentID, FALSE);
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ void DungeonHandlePlayerInput(void)
|
|||
}
|
||||
}
|
||||
else if (ShouldMonsterRunAwayAndShowEffect(leader, TRUE)) {
|
||||
TryDisplayDungeonLoggableMessage(leader, gUnknown_80FD4B0);
|
||||
LogMessageByIdWithPopupCheckUser(leader, gUnknown_80FD4B0);
|
||||
sub_8044C50(1);
|
||||
gDungeon->unk644.unk2F = 1;
|
||||
break;
|
||||
|
|
@ -278,7 +278,7 @@ void DungeonHandlePlayerInput(void)
|
|||
}
|
||||
}
|
||||
if (i == MAX_MON_MOVES) {
|
||||
TryDisplayDungeonLoggableMessage(leader, gUnknown_80F8A28);
|
||||
LogMessageByIdWithPopupCheckUser(leader, gUnknown_80F8A28);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -304,7 +304,7 @@ void DungeonHandlePlayerInput(void)
|
|||
}
|
||||
}
|
||||
if (!canUseMove) {
|
||||
TryDisplayDungeonLoggableMessage(leader, gUnknown_80F8A4C);
|
||||
LogMessageByIdWithPopupCheckUser(leader, gUnknown_80F8A4C);
|
||||
}
|
||||
else {
|
||||
SetMonsterActionFields(&leaderInfo->action, ACTION_USE_MOVE_PLAYER);
|
||||
|
|
@ -502,19 +502,19 @@ void DungeonHandlePlayerInput(void)
|
|||
if (sub_805EC4C(leader, 1))
|
||||
break;
|
||||
|
||||
if (leaderInfo->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD) {
|
||||
if (leaderInfo->frozenClassStatus.status == STATUS_SHADOW_HOLD) {
|
||||
immobilizedMsg = gUnknown_80F8A84, canMoveFlags |= 1;
|
||||
}
|
||||
else if (leaderInfo->immobilize.immobilizeStatus == STATUS_CONSTRICTION) {
|
||||
else if (leaderInfo->frozenClassStatus.status == STATUS_CONSTRICTION) {
|
||||
immobilizedMsg = gUnknown_80F8A6C, canMoveFlags |= 1;
|
||||
}
|
||||
else if (leaderInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||
else if (leaderInfo->frozenClassStatus.status == STATUS_INGRAIN) {
|
||||
immobilizedMsg = gUnknown_80F8AB0, canMoveFlags |= 1;
|
||||
}
|
||||
else if (leaderInfo->immobilize.immobilizeStatus == STATUS_WRAP) {
|
||||
else if (leaderInfo->frozenClassStatus.status == STATUS_WRAP) {
|
||||
immobilizedMsg = gUnknown_80F8ADC, canMoveFlags |= 1;
|
||||
}
|
||||
else if (leaderInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
else if (leaderInfo->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
immobilizedMsg = gUnknown_80F8B0C, canMoveFlags |= 1;
|
||||
}
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ void DungeonHandlePlayerInput(void)
|
|||
if (!(canMoveFlags & 2)) {
|
||||
if (canMoveFlags & 1) {
|
||||
if (immobilizedMsg != NULL) {
|
||||
TryDisplayDungeonLoggableMessage(leader, immobilizedMsg);
|
||||
LogMessageByIdWithPopupCheckUser(leader, immobilizedMsg);
|
||||
}
|
||||
sub_8044C50(1);
|
||||
gDungeon->unk644.unk2F = 1;
|
||||
|
|
@ -536,7 +536,7 @@ void DungeonHandlePlayerInput(void)
|
|||
else {
|
||||
sub_8044C50(2);
|
||||
if ((gRealInputs.held & B_BUTTON || bPress) && FixedPointToInt(leaderInfo->belly) != 0) {
|
||||
if (GetEntInfo(leader)->volatileStatus.volatileStatus != STATUS_CONFUSED) {
|
||||
if (GetEntInfo(leader)->cringeClassStatus.status != STATUS_CONFUSED) {
|
||||
gDungeon->unk644.unk28 = 1;
|
||||
}
|
||||
leaderInfo->action.unk4[0].actionUseIndex = 0;
|
||||
|
|
@ -1349,7 +1349,7 @@ void sub_805E738(Entity *a0)
|
|||
Tile *tile;
|
||||
s32 i, j;
|
||||
EntityInfo *entityInfo = GetEntInfo(a0);
|
||||
if (entityInfo->eyesightStatus.eyesightStatus != 1 && entityInfo->eyesightStatus.eyesightStatus != 2) {
|
||||
if (entityInfo->blinkerClassStatus.status != 1 && entityInfo->blinkerClassStatus.status != 2) {
|
||||
// What???
|
||||
for (i = 0; i < 1; i++) {
|
||||
bool8 r9 = FALSE;
|
||||
|
|
@ -1544,29 +1544,29 @@ bool8 sub_805EC4C(Entity *a0, u8 a1)
|
|||
if (tileMonsterInfo->isNotTeamMember
|
||||
&& (tileMonsterInfo->shopkeeper != 1 && tileMonsterInfo->shopkeeper != 2)
|
||||
&& !IsClientOrTeamBase(tileMonsterInfo->joinedAt.joinedAt)
|
||||
&& tileMonsterInfo->clientType != CLIENT_TYPE_CLIENT) {
|
||||
&& tileMonsterInfo->monsterBehavior != BEHAVIOR_RESCUE_TARGET) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD) return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN) return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_CONSTRICTION) return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP) return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) return FALSE;
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_SHADOW_HOLD) return FALSE;
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_FROZEN) return FALSE;
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_CONSTRICTION) return FALSE;
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) return FALSE;
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAP) return FALSE;
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAPPED) return FALSE;
|
||||
|
||||
if (tileMonsterInfo->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD) return FALSE;
|
||||
if (tileMonsterInfo->immobilize.immobilizeStatus == STATUS_FROZEN) return FALSE;
|
||||
if (tileMonsterInfo->immobilize.immobilizeStatus == STATUS_CONSTRICTION) return FALSE;
|
||||
if (tileMonsterInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) return FALSE;
|
||||
if (tileMonsterInfo->immobilize.immobilizeStatus == STATUS_WRAP) return FALSE;
|
||||
if (tileMonsterInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) return FALSE;
|
||||
if (tileMonsterInfo->frozenClassStatus.status == STATUS_SHADOW_HOLD) return FALSE;
|
||||
if (tileMonsterInfo->frozenClassStatus.status == STATUS_FROZEN) return FALSE;
|
||||
if (tileMonsterInfo->frozenClassStatus.status == STATUS_CONSTRICTION) return FALSE;
|
||||
if (tileMonsterInfo->frozenClassStatus.status == STATUS_INGRAIN) return FALSE;
|
||||
if (tileMonsterInfo->frozenClassStatus.status == STATUS_WRAP) return FALSE;
|
||||
if (tileMonsterInfo->frozenClassStatus.status == STATUS_WRAPPED) return FALSE;
|
||||
|
||||
if (entityInfo->volatileStatus.volatileStatus == STATUS_CONFUSED) return FALSE;
|
||||
if (tileMonsterInfo->volatileStatus.volatileStatus == STATUS_CONFUSED) return FALSE;
|
||||
if (entityInfo->cringeClassStatus.status == STATUS_CONFUSED) return FALSE;
|
||||
if (tileMonsterInfo->cringeClassStatus.status == STATUS_CONFUSED) return FALSE;
|
||||
|
||||
if (tileMonsterInfo->sleep.sleep != STATUS_NONE && tileMonsterInfo->sleep.sleep != STATUS_SLEEPLESS && tileMonsterInfo->sleep.sleep != STATUS_YAWNING) return FALSE;
|
||||
if (entityInfo->sleep.sleep != STATUS_NONE && entityInfo->sleep.sleep != STATUS_SLEEPLESS && entityInfo->sleep.sleep != STATUS_YAWNING) return FALSE;
|
||||
if (tileMonsterInfo->sleepClassStatus.status != STATUS_NONE && tileMonsterInfo->sleepClassStatus.status != STATUS_SLEEPLESS && tileMonsterInfo->sleepClassStatus.status != STATUS_YAWNING) return FALSE;
|
||||
if (entityInfo->sleepClassStatus.status != STATUS_NONE && entityInfo->sleepClassStatus.status != STATUS_SLEEPLESS && entityInfo->sleepClassStatus.status != STATUS_YAWNING) return FALSE;
|
||||
|
||||
if (IsChargingAnyTwoTurnMove(tileMonster, FALSE)) return FALSE;
|
||||
if (!sub_8070F80(a0, entityInfo->action.direction)) return FALSE;
|
||||
|
|
@ -1603,7 +1603,7 @@ void sub_805EE30(void)
|
|||
return;
|
||||
|
||||
tile = GetTileAtEntitySafe(leader);
|
||||
if (IQSkillIsEnabled(leader, IQ_SUPER_MOBILE) && GetEntInfo(leader)->transformStatus.transformStatus != STATUS_MOBILE && !HasHeldItem(leader, ITEM_MOBILE_SCARF))
|
||||
if (IQSkillIsEnabled(leader, IQ_SUPER_MOBILE) && GetEntInfo(leader)->invisibleClassStatus.status != STATUS_MOBILE && !HasHeldItem(leader, ITEM_MOBILE_SCARF))
|
||||
sub_804AE84(&leader->pos);
|
||||
if (tile->terrainType & TERRAIN_TYPE_STAIRS)
|
||||
gDungeon->unk1 = 1;
|
||||
|
|
@ -1667,7 +1667,7 @@ bool8 sub_805EF60(Entity *a0, EntityInfo *a1)
|
|||
return FALSE;
|
||||
if (!sub_8070BC0(a0))
|
||||
return FALSE;
|
||||
if (GetEntInfo(r4)->isNotTeamMember && GetEntInfo(r4)->clientType != CLIENT_TYPE_CLIENT && GetEntInfo(r4)->shopkeeper != 1)
|
||||
if (GetEntInfo(r4)->isNotTeamMember && GetEntInfo(r4)->monsterBehavior != BEHAVIOR_RESCUE_TARGET && GetEntInfo(r4)->shopkeeper != 1)
|
||||
return FALSE;
|
||||
|
||||
SetMonsterActionFields(&a1->action, ACTION_TALK_FIELD);
|
||||
|
|
@ -1678,11 +1678,11 @@ void sub_805EFB4(Entity *a0, bool8 a1)
|
|||
{
|
||||
s32 i;
|
||||
EntityInfo *leaderInfo = GetLeaderInfo();
|
||||
if (a1 && leaderInfo->volatileStatus.volatileStatus == STATUS_COWERING) {
|
||||
if (a1 && leaderInfo->cringeClassStatus.status == STATUS_COWERING) {
|
||||
leaderInfo->action.direction += 4;
|
||||
leaderInfo->action.direction &= 7;
|
||||
}
|
||||
else if (leaderInfo->volatileStatus.volatileStatus == STATUS_CONFUSED) {
|
||||
else if (leaderInfo->cringeClassStatus.status == STATUS_CONFUSED) {
|
||||
s32 rnd = DungeonRandInt(8);
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (a1 || CanMoveInDirection(a0, rnd)) {
|
||||
|
|
@ -1752,8 +1752,8 @@ void sub_805F02C(void)
|
|||
sub_803F508(r7);
|
||||
sub_8041AD0(leader);
|
||||
sub_8041AE0(GetLeader());
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], r7, 0);
|
||||
TryDisplayDungeonLoggableMessage(r7, gUnknown_80F9BB0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], r7, 0);
|
||||
LogMessageByIdWithPopupCheckUser(r7, gUnknown_80F9BB0);
|
||||
sub_807EC28(FALSE);
|
||||
r8->unk64 = 0;
|
||||
leaderInfo->unk64 = 0;
|
||||
|
|
@ -2115,7 +2115,7 @@ void ShowFieldMenu(u8 a0_, bool8 a1)
|
|||
break;
|
||||
}
|
||||
else {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], GetLeader(), 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0);
|
||||
DisplayDungeonMessage(0, gUnknown_80FDE18, 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -2251,7 +2251,7 @@ void DrawFieldMenu(u8 a0)
|
|||
Entity *teamMon = gDungeon->teamPokemon[i];
|
||||
if (EntityExists(teamMon)) {
|
||||
EntityInfo *monInfo = GetEntInfo(teamMon);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], teamMon, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], teamMon, 0);
|
||||
gFormatArgs[0] = monInfo->HP;
|
||||
gFormatArgs[1] = monInfo->maxHPStat;
|
||||
PrintFormattedStringOnWindow(4, yLoop, gUnknown_80F91E0, 2, 0);
|
||||
|
|
@ -3652,7 +3652,7 @@ void ShowTacticsMenu(ActionContainer *a0)
|
|||
monInfo->aiTarget.unkC = 0;
|
||||
monInfo->aiTarget.aiTargetSpawnGenID = 0;
|
||||
if (!monInfo->isTeamLeader) {
|
||||
MoveIfPossible(teamMon, TRUE);
|
||||
AIMovement(teamMon, TRUE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2)
|
|||
if (((itemPtr->flags & ITEM_FLAG_EXISTS)) && ((itemPtr->flags & ITEM_FLAG_SET))) {
|
||||
if ((itemPtr->flags & ITEM_FLAG_STICKY)) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0],itemPtr);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gItemStickyCannotEquip);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gItemStickyCannotEquip);
|
||||
return;
|
||||
}
|
||||
itemPtr->flags &= ~(ITEM_FLAG_SET);
|
||||
|
|
@ -64,22 +64,22 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2)
|
|||
PlaySoundEffect(0x133);
|
||||
if (param_2 != 0) {
|
||||
if ((item->flags & ITEM_FLAG_STICKY)) {
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8D04);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8D04);
|
||||
}
|
||||
else {
|
||||
if (GetItemCategory(item->id) == CATEGORY_THROWN_LINE) {
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8CE4);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8CE4);
|
||||
}
|
||||
else
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8CE8);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8CE8);
|
||||
}
|
||||
}
|
||||
}
|
||||
item->flags |= ITEM_FLAG_SET;
|
||||
if (((item->flags & ITEM_FLAG_STICKY)) && (param_2 != 0)) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0],item);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8BE0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -95,14 +95,14 @@ void HandleUnsetItemAction(Entity *entity,bool8 enableMessage)
|
|||
if (((item->flags & ITEM_FLAG_EXISTS)) && ((item->flags & ITEM_FLAG_SET))) {
|
||||
if ((item->flags & ITEM_FLAG_STICKY)) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0],item);
|
||||
TryDisplayDungeonLoggableMessage(entity,*gItemStickyCannotEquip);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gItemStickyCannotEquip);
|
||||
return;
|
||||
}
|
||||
item->flags &= ~(ITEM_FLAG_SET);
|
||||
sub_8045BF8(gFormatBuffer_Items[0],item);
|
||||
PlaySoundEffect(0x133);
|
||||
if (enableMessage) {
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8D20);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80F8D20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -132,15 +132,15 @@ void HandleGiveItemAction(Entity *param_1)
|
|||
|
||||
if ((!bVar3) && ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET))) {
|
||||
sub_8045BF8(gFormatBuffer_Items[1],item);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gItemStickyCannotMove2);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gItemStickyCannotMove2);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],entity,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],entity,0);
|
||||
if (((info2->heldItem).flags & ITEM_FLAG_EXISTS)) {
|
||||
if (((info2->heldItem).flags & ITEM_FLAG_STICKY)) {
|
||||
sub_8045BF8(gFormatBuffer_Items[1],&info2->heldItem);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gItemStickyCannotMove1);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gItemStickyCannotMove1);
|
||||
return;
|
||||
}
|
||||
item1 = (info2->heldItem);
|
||||
|
|
@ -158,9 +158,9 @@ void HandleGiveItemAction(Entity *param_1)
|
|||
sub_8045BF8(gFormatBuffer_Items[0],&item2);
|
||||
sub_8045BF8(gFormatBuffer_Items[1],&item1);
|
||||
PlaySoundEffect(0x14d);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gMonTookAndReturnedItem);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gMonTookAndReturnedItem);
|
||||
if ((item2.flags & ITEM_FLAG_STICKY)) {
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8BE0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -170,9 +170,9 @@ void HandleGiveItemAction(Entity *param_1)
|
|||
info2->heldItem = item3;
|
||||
sub_8045BF8(gFormatBuffer_Items[0],&item3);
|
||||
PlaySoundEffect(0x14d);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8D44);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8D44);
|
||||
if ((item3.flags & ITEM_FLAG_STICKY)) {
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8BE0);
|
||||
}
|
||||
}
|
||||
sub_806A6E8(entity);
|
||||
|
|
@ -198,24 +198,24 @@ void HandleTakeItemAction(Entity *param_1)
|
|||
info = GetEntInfo(entity);
|
||||
heldItem = &info->heldItem;
|
||||
if (ItemExists(&gTeamInventoryRef->teamItems[ITEM_POWER_BAND])) {
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8D60);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8D60);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ItemSticky(heldItem)) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0],heldItem);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8BE0);
|
||||
}
|
||||
else
|
||||
{
|
||||
item = *heldItem;
|
||||
item.flags &= ~(ITEM_FLAG_SET);
|
||||
sub_8045BF8(gFormatBuffer_Items[0],&item);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],entity,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
|
||||
ZeroOutItem(heldItem);
|
||||
AddItemToInventory(&item);
|
||||
PlaySoundEffect(0x14d);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8D7C);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8D7C);
|
||||
sub_806A6E8(entity);
|
||||
if (sub_80706A4(entity,&entity->pos) != 0) {
|
||||
sub_807D148(param_1,entity,0,0);
|
||||
|
|
@ -243,11 +243,11 @@ void sub_8066BD4(Entity *param_1)
|
|||
if (heldItem->flags & ITEM_FLAG_STICKY)
|
||||
{
|
||||
sub_8045BF8(gFormatBuffer_Items[0],heldItem);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8BE0);
|
||||
}
|
||||
else if ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0],item);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8BE0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -255,12 +255,12 @@ void sub_8066BD4(Entity *param_1)
|
|||
item->flags &= ~(ITEM_FLAG_SET);
|
||||
sub_8045BF8(gFormatBuffer_Items[0],heldItem);
|
||||
sub_8045BF8(gFormatBuffer_Items[1],item);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],entity,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],entity,0);
|
||||
temp = info->heldItem;
|
||||
info->heldItem = *item;
|
||||
*item = temp;
|
||||
PlaySoundEffect(0x14d);
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80F8DB4);
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8DB4);
|
||||
if (sub_80706A4(entity,&entity->pos) != 0) {
|
||||
sub_807D148(param_1,entity,0,0);
|
||||
}
|
||||
|
|
@ -296,13 +296,13 @@ void HandlePlaceItemAction(Entity *param_1)
|
|||
item = sub_8044D90(entity,0,4);
|
||||
sub_8045BF8(gFormatBuffer_Items[0],item);
|
||||
if (info->action.unk4[0].actionUseIndex == 0x80) {
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8DE0);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80F8DE0);
|
||||
}
|
||||
else if ((info->action.unk4[0].actionUseIndex < 0x15) && ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET))) {
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80F8BE0);
|
||||
}
|
||||
else if ((info->action.unk4[0].actionUseIndex == 0x81) && ((item->flags & ITEM_FLAG_STICKY))) {
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8BE0);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80F8BE0);
|
||||
}
|
||||
else {
|
||||
tile = GetTile(entity->pos.x, entity->pos.y);
|
||||
|
|
@ -314,7 +314,7 @@ void HandlePlaceItemAction(Entity *param_1)
|
|||
sub_8045BF8(gFormatBuffer_Items[0],item);
|
||||
if (sub_80460F8(&entity->pos,item,1) == 0) {
|
||||
_message:
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8E04);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80F8E04);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -323,8 +323,8 @@ void HandlePlaceItemAction(Entity *param_1)
|
|||
item->flags = 0;
|
||||
FillInventoryGaps();
|
||||
PlaySoundEffect(0x14d);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],entity,0);
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80F8E28);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80F8E28);
|
||||
sub_807AB38(entity,gDungeon->unk3A08);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ void TriggerWeatherAbilities(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
if (HasAbility(entity, ABILITY_DRIZZLE)) {
|
||||
gDungeon->weather.naturalWeather[WEATHER_RAIN] = 1;
|
||||
|
|
@ -171,7 +171,7 @@ void sub_8069F9C(Entity *pokemon,Entity * target,Move *move)
|
|||
}
|
||||
iVar6->abilities[abilityIndex] = local_20[randomIndex];
|
||||
gDungeon->unkC = 1;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCC7C);
|
||||
sub_8042900(target);
|
||||
sub_806ABAC(pokemon,target);
|
||||
|
|
@ -189,7 +189,7 @@ _0806A068:
|
|||
iVar6->types[0] = type;
|
||||
iVar6->types[1] = TYPE_NONE;
|
||||
iVar6->isColorChanged = TRUE;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
__src = GetUnformattedTypeString(iVar6->types[0]);
|
||||
strcpy(gFormatBuffer_Items[0],__src);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCCAC);
|
||||
|
|
@ -207,14 +207,14 @@ void sub_806A120(Entity * pokemon, Entity * target, Move* move)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
if ((((EntityExists(pokemon)) && (EntityExists(target))) && (pokemon != target))
|
||||
&& (entityInfo = GetEntInfo(target), entityInfo->protection.protectionStatus == STATUS_CONVERSION2)) {
|
||||
&& (entityInfo = GetEntInfo(target), entityInfo->reflectClassStatus.status == STATUS_CONVERSION2)) {
|
||||
moveType = GetMoveTypeForMonster(pokemon, move);
|
||||
uVar2_u32 = sub_8092364(moveType);
|
||||
if (uVar2_u32 != TYPE_NONE) {
|
||||
entityInfo->types[0] = uVar2_u32;
|
||||
entityInfo->types[1] = 0;
|
||||
sub_8041BBC(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
typeString = GetUnformattedTypeString(uVar2_u32);
|
||||
strcpy(gFormatBuffer_Items[0],typeString);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FDCC8);
|
||||
|
|
@ -300,8 +300,8 @@ void sub_806A338(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
if (EntityExists(entity) && (GetEntInfo(entity)->waitingStruct.waitingStatus == STATUS_SNATCH))
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity) && (GetEntInfo(entity)->curseClassStatus.status == STATUS_SNATCH))
|
||||
{
|
||||
gDungeon->snatchPokemon = entity;
|
||||
ASM_MATCH_TRICK(entity);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void sub_806CC10(void)
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
entity = gDungeon->allPokemon[i];
|
||||
entity = gDungeon->activePokemon[i];
|
||||
|
||||
if (EntityExists(entity)) {
|
||||
entityInfo = GetEntInfo(entity);
|
||||
|
|
@ -70,7 +70,7 @@ void sub_806CC70(void)
|
|||
Entity *entity;
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
entity = gDungeon->allPokemon[i];
|
||||
entity = gDungeon->activePokemon[i];
|
||||
|
||||
if (EntityExists(entity))
|
||||
sub_806CCB4(entity, sub_806CEBC(entity));
|
||||
|
|
@ -96,7 +96,7 @@ void sub_806CCB4(Entity *entity, u8 a1)
|
|||
entity->axObj.unk47 = 0;
|
||||
sVar1 = entity->axObj.unk40_maybeAnimTimer;
|
||||
|
||||
if (info->waitingStruct.waitingStatus != STATUS_DECOY && !flag)
|
||||
if (info->curseClassStatus.status != STATUS_DECOY && !flag)
|
||||
AxResInitFile(&entity->axObj.axdata,
|
||||
entity->axObj.spriteFile, entity->axObj.unk42_animId1,
|
||||
entity->axObj.unk44_direction1, sVar1,
|
||||
|
|
@ -117,7 +117,7 @@ void sub_806CD90(void)
|
|||
Entity *entity;
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
entity = gDungeon->allPokemon[i];
|
||||
entity = gDungeon->activePokemon[i];
|
||||
|
||||
if (EntityExists(entity))
|
||||
sub_806CCB4(entity, sub_806CEBC(entity));
|
||||
|
|
@ -177,19 +177,19 @@ void sub_806CE94(Entity *entity, u32 newDir)
|
|||
|
||||
u8 sub_806CEBC(Entity *entity)
|
||||
{
|
||||
u8 sleep;
|
||||
u8 sleepClassStatus;
|
||||
EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = GetEntInfo(entity);
|
||||
sleep = entityInfo->sleep.sleep;
|
||||
sleepClassStatus = entityInfo->sleepClassStatus.status;
|
||||
|
||||
if (sleep == STATUS_SLEEP || sleep == STATUS_NAPPING || sleep == STATUS_NIGHTMARE) {
|
||||
if (entityInfo->apparentID != MONSTER_SUDOWOODO || entityInfo->sleep.sleepTurns != 0x7F)
|
||||
if (sleepClassStatus == STATUS_SLEEP || sleepClassStatus == STATUS_NAPPING || sleepClassStatus == STATUS_NIGHTMARE) {
|
||||
if (entityInfo->apparentID != MONSTER_SUDOWOODO || entityInfo->sleepClassStatus.turns != 0x7F)
|
||||
return 5;
|
||||
else
|
||||
return 7;
|
||||
}
|
||||
if (entityInfo->charging.chargingStatus == STATUS_BIDE)
|
||||
if (entityInfo->bideClassStatus.status == STATUS_BIDE)
|
||||
return 11;
|
||||
return 7;
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ void sub_806CF60(void)
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
entity = gDungeon->allPokemon[i];
|
||||
entity = gDungeon->activePokemon[i];
|
||||
|
||||
if (EntityExists(entity))
|
||||
sub_806CF98(entity);
|
||||
|
|
@ -342,19 +342,19 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
|
|||
return;
|
||||
|
||||
r9 = arg8;
|
||||
if (CheckVariousStatuses(target) || GetEntInfo(target)->charging.chargingStatus != 0)
|
||||
if (CheckVariousStatuses(target) || GetEntInfo(target)->bideClassStatus.status != 0)
|
||||
r9 = FALSE;
|
||||
if (r9
|
||||
&& abs(attacker->pos.x - target->pos.x) <= 1 && abs(attacker->pos.y - target->pos.y) <= 1
|
||||
&& attacker != target
|
||||
&& IsTypePhysical(dmgStruct->type)
|
||||
&& GetEntInfo(target)->protection.protectionStatus == STATUS_VITAL_THROW)
|
||||
&& GetEntInfo(target)->reflectClassStatus.status == STATUS_VITAL_THROW)
|
||||
{
|
||||
sub_8042730(target, attacker);
|
||||
sub_807F43C(target, attacker);
|
||||
}
|
||||
|
||||
if (GetEntInfo(target)->charging.chargingStatus == STATUS_ENRAGED) {
|
||||
if (GetEntInfo(target)->bideClassStatus.status == STATUS_ENRAGED) {
|
||||
RaiseAttackStageTarget(attacker, target, gUnknown_8106A4C, 1);
|
||||
}
|
||||
|
||||
|
|
@ -366,15 +366,15 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
|
|||
&& abs(attacker->pos.x - target->pos.x) <= 1 && abs(attacker->pos.y - target->pos.y) <= 1)
|
||||
{
|
||||
bool32 isPhysical = IsTypePhysical(dmgStruct->type);
|
||||
if (GetEntInfo(target)->protection.protectionStatus == STATUS_COUNTER && isPhysical) {
|
||||
if (GetEntInfo(target)->reflectClassStatus.status == STATUS_COUNTER && isPhysical) {
|
||||
sub_8041B18(target);
|
||||
returnDmg += 4;
|
||||
}
|
||||
if (GetEntInfo(target)->protection.protectionStatus == STATUS_MINI_COUNTER && isPhysical) {
|
||||
if (GetEntInfo(target)->reflectClassStatus.status == STATUS_MINI_COUNTER && isPhysical) {
|
||||
sub_8041B18(target);
|
||||
returnDmg += 1;
|
||||
}
|
||||
if (GetEntInfo(target)->protection.protectionStatus == STATUS_MIRROR_COAT && !isPhysical) {
|
||||
if (GetEntInfo(target)->reflectClassStatus.status == STATUS_MIRROR_COAT && !isPhysical) {
|
||||
sub_8041B90(target);
|
||||
returnDmg += 4;
|
||||
}
|
||||
|
|
@ -472,13 +472,13 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
|
|||
// Destiny Bond
|
||||
if (r9) {
|
||||
EntityInfo *targetInfo = GetEntInfo(target);
|
||||
if (targetInfo->linked.linkedStatus == STATUS_DESTINY_BOND) {
|
||||
Entity *destBondTarget = gDungeon->allPokemon[targetInfo->linked.unk8];
|
||||
if (targetInfo->leechSeedClassStatus.status == STATUS_DESTINY_BOND) {
|
||||
Entity *destBondTarget = gDungeon->activePokemon[targetInfo->leechSeedClassStatus.unk8];
|
||||
if (destBondTarget == NULL) {
|
||||
targetInfo->linked.linkedStatus = 0;
|
||||
targetInfo->leechSeedClassStatus.status = 0;
|
||||
}
|
||||
else if (GetEntInfo(destBondTarget)->unk98 != targetInfo->linked.unk4) {
|
||||
targetInfo->linked.linkedStatus = 0;
|
||||
else if (GetEntInfo(destBondTarget)->unk98 != targetInfo->leechSeedClassStatus.unk4) {
|
||||
targetInfo->leechSeedClassStatus.status = 0;
|
||||
}
|
||||
else {
|
||||
sub_8041D00(destBondTarget, target);
|
||||
|
|
@ -513,29 +513,29 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
TrySendImmobilizeSleepEndMsg(attacker, target);
|
||||
SetShopkeeperAggression(attacker, target);
|
||||
if (GetEntityType(attacker) == ENTITY_MONSTER
|
||||
&& GetEntInfo(attacker)->moveStatus.moveStatus == STATUS_SET_DAMAGE
|
||||
&& GetEntInfo(attacker)->sureShotClassStatus.status == STATUS_SET_DAMAGE
|
||||
&& dmgStruct->unkE == 0)
|
||||
{
|
||||
dmgStruct->dmg = gUnknown_80F4F8C;
|
||||
}
|
||||
|
||||
if (arg4 != 0x20E && HasAbility(target, ABILITY_STURDY) && dmgStruct->dmg == 9999) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FCA90);
|
||||
sub_8042238(attacker, target);
|
||||
dmgStruct->tookNoDamage = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
if (targetData->frozenClassStatus.status == STATUS_FROZEN) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9600);
|
||||
sub_8042238(attacker, target);
|
||||
dmgStruct->tookNoDamage = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((targetData->sleep.sleep == STATUS_SLEEP || targetData->sleep.sleep == STATUS_NAPPING || targetData->sleep.sleep == STATUS_NIGHTMARE)
|
||||
&& targetData->sleep.sleepTurns == 0x7F)
|
||||
if ((targetData->sleepClassStatus.status == STATUS_SLEEP || targetData->sleepClassStatus.status == STATUS_NAPPING || targetData->sleepClassStatus.status == STATUS_NIGHTMARE)
|
||||
&& targetData->sleepClassStatus.turns == 0x7F)
|
||||
{
|
||||
WakeUpPokemon(target);
|
||||
}
|
||||
|
|
@ -568,8 +568,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
}
|
||||
}
|
||||
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
if (dmgStruct->dmg == 0) {
|
||||
if (sub_8045888(attacker) && sub_8045888(target)) {
|
||||
if (targetData->unk152 == 0) {
|
||||
|
|
@ -639,7 +639,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
else {
|
||||
unkBool = FALSE;
|
||||
}
|
||||
if (targetData->eyesightStatus.eyesightStatus == STATUS_BLINKER || targetData->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED)
|
||||
if (targetData->blinkerClassStatus.status == STATUS_BLINKER || targetData->blinkerClassStatus.status == STATUS_CROSS_EYED)
|
||||
unkBool = FALSE;
|
||||
if (unkBool) {
|
||||
EntityInfo *info = GetEntInfo(target);
|
||||
|
|
@ -659,7 +659,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
else
|
||||
targetData->HP = 0;
|
||||
|
||||
if (targetData->protection.protectionStatus == STATUS_ENDURING) {
|
||||
if (targetData->reflectClassStatus.status == STATUS_ENDURING) {
|
||||
if (targetData->HP == 0) {
|
||||
targetData->HP = 1;
|
||||
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_8100548);
|
||||
|
|
@ -694,7 +694,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
}
|
||||
|
||||
// 0 HP
|
||||
if (targetData->transformStatus.transformStatus == STATUS_TRANSFORMED) {
|
||||
if (targetData->invisibleClassStatus.status == STATUS_TRANSFORMED) {
|
||||
SendTransformEndMessage(attacker, target);
|
||||
}
|
||||
|
||||
|
|
@ -715,8 +715,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
r8 = 0;
|
||||
|
||||
targetData->unk14C = 0;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
if (dmgStruct->residualDmgType == 19 || dmgStruct->residualDmgType == 20) {
|
||||
if (targetData->isNotTeamMember) {
|
||||
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9E44);
|
||||
|
|
@ -727,7 +727,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
}
|
||||
else if (targetData->isNotTeamMember)
|
||||
{
|
||||
if (targetData->clientType == CLIENT_TYPE_CLIENT) {
|
||||
if (targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET) {
|
||||
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DF0[r8]);
|
||||
}
|
||||
else {
|
||||
|
|
@ -742,7 +742,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
else if (IsClientOrTeamBase(targetData->joinedAt.joinedAt)) {
|
||||
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DAC[r8]);
|
||||
}
|
||||
else if (targetData->clientType == CLIENT_TYPE_CLIENT) {
|
||||
else if (targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET) {
|
||||
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DF0[r8]);
|
||||
}
|
||||
else if (sub_806A58C(recruitedMon->unkA)) {
|
||||
|
|
@ -758,7 +758,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
}
|
||||
}
|
||||
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_WRAP || targetData->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (targetData->frozenClassStatus.status == STATUS_WRAP || targetData->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
sub_8076CB4(targetData->unk9C);
|
||||
}
|
||||
|
||||
|
|
@ -779,11 +779,11 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
gDungeon->unk644.itemHoldersIdentified = 0;
|
||||
}
|
||||
ZeroOutItem(&targetData->heldItem);
|
||||
if (targetData->waitingStruct.waitingStatus == STATUS_SNATCH) {
|
||||
SendWaitingEndMessage(attacker, target, STATUS_SNATCH);
|
||||
if (targetData->curseClassStatus.status == STATUS_SNATCH) {
|
||||
EndCurseClassStatus(attacker, target, STATUS_SNATCH);
|
||||
}
|
||||
else if (targetData->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||
SendWaitingEndMessage(attacker, target, STATUS_DECOY);
|
||||
else if (targetData->curseClassStatus.status == STATUS_DECOY) {
|
||||
EndCurseClassStatus(attacker, target, STATUS_DECOY);
|
||||
}
|
||||
sub_8078084(target);
|
||||
sub_806BFC0(targetData, 0);
|
||||
|
|
@ -791,7 +791,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
sub_806A390(target);
|
||||
sub_806CCB4(target, sub_806CEBC(target));
|
||||
EntityUpdateStatusSprites(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C);
|
||||
sub_806F63C(target);
|
||||
return FALSE;
|
||||
|
|
@ -836,11 +836,11 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
gDungeon->unk644.itemHoldersIdentified = 0;
|
||||
}
|
||||
ZeroOutItem(heldItem);
|
||||
if (targetData->waitingStruct.waitingStatus == STATUS_SNATCH) {
|
||||
SendWaitingEndMessage(attacker, target, STATUS_SNATCH);
|
||||
if (targetData->curseClassStatus.status == STATUS_SNATCH) {
|
||||
EndCurseClassStatus(attacker, target, STATUS_SNATCH);
|
||||
}
|
||||
else if (targetData->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||
SendWaitingEndMessage(attacker, target, STATUS_DECOY);
|
||||
else if (targetData->curseClassStatus.status == STATUS_DECOY) {
|
||||
EndCurseClassStatus(attacker, target, STATUS_DECOY);
|
||||
}
|
||||
sub_8078084(target);
|
||||
sub_806BFC0(targetData, 0);
|
||||
|
|
@ -848,8 +848,8 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
sub_806A390(target);
|
||||
sub_806CCB4(target, sub_806CEBC(target));
|
||||
EntityUpdateStatusSprites(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], teamMember, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], teamMember, 0);
|
||||
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD484);
|
||||
sub_806F63C(target);
|
||||
return FALSE;
|
||||
|
|
@ -890,11 +890,11 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
gDungeon->unk644.unk35 = 0;
|
||||
gDungeon->unk644.itemHoldersIdentified = 0;
|
||||
}
|
||||
if (targetData->waitingStruct.waitingStatus == STATUS_SNATCH) {
|
||||
SendWaitingEndMessage(attacker, target, STATUS_SNATCH);
|
||||
if (targetData->curseClassStatus.status == STATUS_SNATCH) {
|
||||
EndCurseClassStatus(attacker, target, STATUS_SNATCH);
|
||||
}
|
||||
else if (targetData->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||
SendWaitingEndMessage(attacker, target, STATUS_DECOY);
|
||||
else if (targetData->curseClassStatus.status == STATUS_DECOY) {
|
||||
EndCurseClassStatus(attacker, target, STATUS_DECOY);
|
||||
}
|
||||
sub_8078084(target);
|
||||
sub_806BFC0(targetData, 0);
|
||||
|
|
@ -902,7 +902,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
|||
sub_806A390(target);
|
||||
sub_806CCB4(target, sub_806CEBC(target));
|
||||
EntityUpdateStatusSprites(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C);
|
||||
sub_806F63C(target);
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
|
|||
atkStat = statCalc / 256;
|
||||
|
||||
defStatStage = targetInfo->defensiveStages[splitIndex];
|
||||
if (splitIndex == 0 && targetInfo->charging.chargingStatus == STATUS_SKULL_BASH) {
|
||||
if (splitIndex == 0 && targetInfo->bideClassStatus.status == STATUS_SKULL_BASH) {
|
||||
gDungeon->unk134.unk17A = 1;
|
||||
defStatStage++;
|
||||
}
|
||||
|
|
@ -323,7 +323,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
|
|||
s32 flashFireStatus = GetFlashFireStatus(target);
|
||||
if (flashFireStatus != FLASH_FIRE_STATUS_NONE && targetInfo->unk152 == 0 && arg_10) {
|
||||
targetInfo->unk152 = 1;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
if (flashFireStatus == FLASH_FIRE_STATUS_MAXED) {
|
||||
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FAE00); // Fire moves won't become stronger!
|
||||
}
|
||||
|
|
@ -333,12 +333,12 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
|
|||
}
|
||||
}
|
||||
if (arg_10) {
|
||||
if (splitIndex == 0 && targetInfo->protection.protectionStatus == STATUS_REFLECT) {
|
||||
if (splitIndex == 0 && targetInfo->reflectClassStatus.status == STATUS_REFLECT) {
|
||||
sub_8041B74(target);
|
||||
F48_16_SMul(&unkSp9, &unkSp9, &gUnknown_8106F1C);
|
||||
gDungeon->unk134.unk166 = 1;
|
||||
}
|
||||
if (splitIndex == 1 && targetInfo->protection.protectionStatus == STATUS_LIGHT_SCREEN) {
|
||||
if (splitIndex == 1 && targetInfo->reflectClassStatus.status == STATUS_LIGHT_SCREEN) {
|
||||
sub_8041B5C(target);
|
||||
F48_16_SMul(&unkSp9, &unkSp9, &gUnknown_8106F1C);
|
||||
gDungeon->unk134.unk167 = 1;
|
||||
|
|
@ -356,7 +356,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
|
|||
critOdds = critChance;
|
||||
}
|
||||
|
||||
if (attackerInfo->moveStatus.moveStatus == STATUS_FOCUS_ENERGY) {
|
||||
if (attackerInfo->sureShotClassStatus.status == STATUS_FOCUS_ENERGY) {
|
||||
critOdds = 999;
|
||||
gDungeon->unk134.unk168 = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ bool8 sub_806F660(Entity *pokemon,Entity *target)
|
|||
(targetInfo->id != MONSTER_JIRACHI) &&
|
||||
(targetInfo->id != MONSTER_RAYQUAZA) &&
|
||||
(targetInfo->id != MONSTER_DEOXYS_NORMAL) &&
|
||||
(targetInfo->id != 0MONSTER_REGIROCK &&
|
||||
(targetInfo->id != MONSTER_REGIROCK &&
|
||||
(targetInfo->id != MONSTER_REGICE) &&
|
||||
(targetInfo->id != MONSTER_REGISTEEL)) || (HasRecruitedMon(targetInfo->id) == 0)) &&
|
||||
(sub_806F9BC(targetInfo->id) != 0)) {
|
||||
|
|
@ -243,7 +243,7 @@ bool8 sub_806F660(Entity *pokemon,Entity *target)
|
|||
iVar5 = -iVar5;
|
||||
}
|
||||
if (((iVar5 < 2) && (targetInfo->joinedAt.joinedAt != 0x4A)) &&
|
||||
(targetInfo->clientType != 1 && (CanSeeTarget(target,pokemon))
|
||||
(targetInfo->monsterBehavior != 1 && (CanSeeTarget(target,pokemon))
|
||||
)) {
|
||||
sub_806F910();
|
||||
iVar4 = DungeonRandInt(1000);
|
||||
|
|
@ -746,7 +746,7 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa
|
|||
|
||||
if (DisplayDungeonYesNoMessage(0,*gUnknown_80F9FE8,1) == 0) {
|
||||
if (param_3->id != MONSTER_JIRACHI) {
|
||||
TryDisplayDungeonLoggableMessage(entity1,*gUnknown_80FA004);
|
||||
LogMessageByIdWithPopupCheckUser(entity1,*gUnknown_80FA004);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -759,7 +759,7 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa
|
|||
}
|
||||
|
||||
if (pokeIndex == MAX_TEAM_MEMBERS) {
|
||||
TryDisplayDungeonLoggableMessage(entity1,*gUnknown_80FA030);
|
||||
LogMessageByIdWithPopupCheckUser(entity1,*gUnknown_80FA030);
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
|
|
@ -800,7 +800,7 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa
|
|||
IncrementAdventureNumJoined();
|
||||
|
||||
if (sub_806B8CC(param_3->id,param_3->pos.x,param_3->pos.y,pokeStruct2,&local_2c,0,1) == 0) {
|
||||
TryDisplayDungeonLoggableMessage(entity1,*gUnknown_80FA058);
|
||||
LogMessageByIdWithPopupCheckUser(entity1,*gUnknown_80FA058);
|
||||
pokeStruct2->unk0 = 0;
|
||||
}
|
||||
else {
|
||||
|
|
@ -812,10 +812,10 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa
|
|||
}
|
||||
}
|
||||
sub_808D9DC(gFormatBuffer_Monsters[0],pokeStruct2,0);
|
||||
TryDisplayDungeonLoggableMessage(entity1,*gUnknown_80FA0F0);
|
||||
LogMessageByIdWithPopupCheckUser(entity1,*gUnknown_80FA0F0);
|
||||
if (flag) {
|
||||
leader = xxx_call_GetLeader();
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],leader,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
|
||||
sub_8092558(gFormatBuffer_FriendArea,friendArea);
|
||||
PlaySound(0xce);
|
||||
DisplayDungeonMessage(0,*gUnknown_80FA120,1);
|
||||
|
|
@ -1074,7 +1074,7 @@ bool8 sub_806FDF4(Entity *entity1,Entity *entity2,Entity **entityPtr)
|
|||
}
|
||||
if (flag) {
|
||||
leader = xxx_call_GetLeader();
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],leader,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
|
||||
sub_8092558(gFormatBuffer_FriendArea,friendArea);
|
||||
PlaySound(0xce);
|
||||
DisplayDungeonMessage(0,*gUnknown_80FA120,1);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void sub_8071B48(void)
|
|||
if (dungeon->unk644.unk1E > 900) {
|
||||
entity2 = dungeon->unk17B34;
|
||||
if ((EntityExists(entity2)) && (entity2->spawnGenID == dungeon->unk17B40)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],entity2,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity2,0);
|
||||
entityPtr = entity2;
|
||||
}
|
||||
}
|
||||
|
|
@ -450,7 +450,7 @@ void sub_8071DA4(Entity *entity)
|
|||
" ldr r0, _08071FF8\n"
|
||||
" mov r1, r8\n"
|
||||
" movs r2, 0\n"
|
||||
" bl SetMessageArgument\n"
|
||||
" bl SubstitutePlaceholderStringTags\n"
|
||||
" lsls r1, r4, 24\n"
|
||||
" lsrs r1, 24\n"
|
||||
" ldr r0, _08071FFC\n"
|
||||
|
|
@ -545,7 +545,7 @@ void sub_8072008(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 para
|
|||
for(tacticIndex = 0; tacticIndex < NUM_TACTICS; tacticIndex++)
|
||||
{
|
||||
if ((tacticsBuffer1[tacticIndex] == 0) && (tacticsBuffer2[tacticIndex] == 1)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
CopyTacticsNameToBuffer(gFormatBuffer_Items[0],tacticIndex);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FF730);
|
||||
}
|
||||
|
|
@ -554,7 +554,7 @@ void sub_8072008(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 para
|
|||
info->expGainedInTurn = 0;
|
||||
info->unk149 = 0;
|
||||
if ((flag == 0) && (param_4 != 0)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F9B74);
|
||||
}
|
||||
}
|
||||
|
|
@ -669,7 +669,7 @@ void LevelDownTarget(Entity *pokemon, Entity *target, u32 level)
|
|||
|
||||
if(!flag)
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80F9B94);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,14 +138,14 @@ void sub_8073D14(Entity *entity)
|
|||
return;
|
||||
if (sub_8044B28())
|
||||
return;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
|
||||
if (entityInfo->isTeamLeader)
|
||||
return;
|
||||
if (entityInfo->shopkeeper == 1)
|
||||
return;
|
||||
if (IsClientOrTeamBase(entityInfo->joinedAt.joinedAt))
|
||||
return;
|
||||
if (entityInfo->clientType == CLIENT_TYPE_CLIENT)
|
||||
if (entityInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET)
|
||||
return;
|
||||
|
||||
_entityInfo = GetEntInfo(entity); // Reloaded as a new variable for some reason.
|
||||
|
|
@ -155,7 +155,7 @@ void sub_8073D14(Entity *entity)
|
|||
|
||||
if (ShouldMonsterRunAwayAndShowEffect(entity, TRUE)) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0], groundItem);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
|
||||
DisplayDungeonLoggableMessageTrue(entity, gMonTerrifiedCouldntPickUpItem);
|
||||
}
|
||||
else if (!_entityInfo->isNotTeamMember && GetItemCategory(groundItem->id) == CATEGORY_POKE) {
|
||||
|
|
@ -265,7 +265,7 @@ void sub_8073D14(Entity *entity)
|
|||
DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem2);
|
||||
}
|
||||
else if (AddItemToInventory(groundItem)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
|
||||
DisplayDungeonLoggableMessageTrue(entity, gMonCouldntPickUpItem);
|
||||
}
|
||||
else {
|
||||
|
|
@ -383,7 +383,7 @@ void sub_8074094(Entity *entity)
|
|||
if (str != NULL) {
|
||||
if (sound)
|
||||
PlaySoundEffect(0x153);
|
||||
TryDisplayDungeonLoggableMessage(entity, str);
|
||||
LogMessageByIdWithPopupCheckUser(entity, str);
|
||||
sub_803E708(0x1E, 0x32);
|
||||
}
|
||||
}
|
||||
|
|
@ -422,19 +422,19 @@ void sub_8074094(Entity *entity)
|
|||
}
|
||||
|
||||
// Statuses
|
||||
if (entityInfo->sleep.sleep == STATUS_YAWNING) {
|
||||
if (entityInfo->sleepClassStatus.status == STATUS_YAWNING) {
|
||||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
sub_80420B8(entity);
|
||||
}
|
||||
|
||||
if (entityInfo->nonVolatile.nonVolatileStatus == STATUS_BURN) {
|
||||
if (entityInfo->nonVolatile.nonVolatileStatusDamageCountdown == 0 || --entityInfo->nonVolatile.nonVolatileStatusDamageCountdown == 0) {
|
||||
if (entityInfo->burnClassStatus.status == STATUS_BURN) {
|
||||
if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) {
|
||||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = gUnknown_80F4F32;
|
||||
entityInfo->burnClassStatus.damageCountdown = gUnknown_80F4F32;
|
||||
TrySendImmobilizeSleepEndMsg(entity, entity);
|
||||
DealDamageToEntity(entity, gUnknown_80F4F70, 1, 0x208);
|
||||
}
|
||||
|
|
@ -442,24 +442,24 @@ void sub_8074094(Entity *entity)
|
|||
return;
|
||||
}
|
||||
|
||||
if (entityInfo->nonVolatile.nonVolatileStatus == STATUS_POISONED) {
|
||||
if (entityInfo->nonVolatile.nonVolatileStatusDamageCountdown == 0 || --entityInfo->nonVolatile.nonVolatileStatusDamageCountdown == 0) {
|
||||
if (entityInfo->burnClassStatus.status == STATUS_POISONED) {
|
||||
if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) {
|
||||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = gUnknown_80F4F34;
|
||||
entityInfo->burnClassStatus.damageCountdown = gUnknown_80F4F34;
|
||||
TrySendImmobilizeSleepEndMsg(entity, entity);
|
||||
DealDamageToEntity(entity, gUnknown_80F4F72, 3, 0x20A);
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
}
|
||||
else if (entityInfo->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED) {
|
||||
if (entityInfo->nonVolatile.nonVolatileStatusDamageCountdown == 0 || --entityInfo->nonVolatile.nonVolatileStatusDamageCountdown == 0) {
|
||||
s32 turns = entityInfo->nonVolatile.unk4;
|
||||
if (entityInfo->nonVolatile.unk4 < 29)
|
||||
entityInfo->nonVolatile.unk4++;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = gUnknown_80F4F36;
|
||||
else if (entityInfo->burnClassStatus.status == STATUS_BADLY_POISONED) {
|
||||
if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) {
|
||||
s32 turns = entityInfo->burnClassStatus.unk4;
|
||||
if (entityInfo->burnClassStatus.unk4 < 29)
|
||||
entityInfo->burnClassStatus.unk4++;
|
||||
entityInfo->burnClassStatus.damageCountdown = gUnknown_80F4F36;
|
||||
if (turns >= 29)
|
||||
turns = 29;
|
||||
|
||||
|
|
@ -474,47 +474,47 @@ void sub_8074094(Entity *entity)
|
|||
return;
|
||||
}
|
||||
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_CONSTRICTION) {
|
||||
if (entityInfo->immobilize.immobilizeStatusDamageCountdown == 0 || --entityInfo->immobilize.immobilizeStatusDamageCountdown == 0) {
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_CONSTRICTION) {
|
||||
if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) {
|
||||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = gUnknown_80F4F38;
|
||||
entityInfo->frozenClassStatus.damageCountdown = gUnknown_80F4F38;
|
||||
TrySendImmobilizeSleepEndMsg(entity, entity);
|
||||
sub_8041C4C(entity, entityInfo->immobilize.unk4);
|
||||
sub_8041C4C(entity, entityInfo->frozenClassStatus.unk4);
|
||||
DealDamageToEntity(entity, gUnknown_80F4F74, 2, 0x209);
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
}
|
||||
else if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (entityInfo->immobilize.immobilizeStatusDamageCountdown == 0 || --entityInfo->immobilize.immobilizeStatusDamageCountdown == 0) {
|
||||
else if (entityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) {
|
||||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = gUnknown_80F4F3A;
|
||||
entityInfo->frozenClassStatus.damageCountdown = gUnknown_80F4F3A;
|
||||
TrySendImmobilizeSleepEndMsg(entity, entity);
|
||||
DealDamageToEntity(entity, gUnknown_80F4F76, 5, 0x20B);
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
}
|
||||
else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||
if (entityInfo->immobilize.immobilizeStatusDamageCountdown == 0 || --entityInfo->immobilize.immobilizeStatusDamageCountdown == 0) {
|
||||
else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) {
|
||||
if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) {
|
||||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = gUnknown_80F4F3C;
|
||||
entityInfo->frozenClassStatus.damageCountdown = gUnknown_80F4F3C;
|
||||
HealTargetHP(entity, entity, gUnknown_80F4FB2, 0, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (entityInfo->waitingStruct.waitingStatus == STATUS_CURSED) {
|
||||
if (entityInfo->waitingStruct.curseDamageCountdown == 0 || --entityInfo->waitingStruct.curseDamageCountdown == 0) {
|
||||
if (entityInfo->curseClassStatus.status == STATUS_CURSED) {
|
||||
if (entityInfo->curseClassStatus.damageCountdown == 0 || --entityInfo->curseClassStatus.damageCountdown == 0) {
|
||||
s32 dmg = entityInfo->maxHPStat / 4;
|
||||
if (dmg == 0)
|
||||
dmg = 1;
|
||||
entityInfo->waitingStruct.curseDamageCountdown = gUnknown_80F4F3E;
|
||||
entityInfo->curseClassStatus.damageCountdown = gUnknown_80F4F3E;
|
||||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
|
@ -526,19 +526,19 @@ void sub_8074094(Entity *entity)
|
|||
return;
|
||||
}
|
||||
|
||||
if (entityInfo->linked.linkedStatus == STATUS_LEECH_SEED) {
|
||||
if (entityInfo->linked.linkedStatusDamageCountdown == 0 || --entityInfo->linked.linkedStatusDamageCountdown == 0) {
|
||||
if (entityInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED) {
|
||||
if (entityInfo->leechSeedClassStatus.damageCountdown == 0 || --entityInfo->leechSeedClassStatus.damageCountdown == 0) {
|
||||
s32 hp = gUnknown_80F4FB4;
|
||||
Entity *target = gDungeon->allPokemon[entityInfo->linked.unk8];
|
||||
Entity *target = gDungeon->activePokemon[entityInfo->leechSeedClassStatus.unk8];
|
||||
|
||||
entityInfo->linked.linkedStatusDamageCountdown = gUnknown_80F4F40;
|
||||
entityInfo->leechSeedClassStatus.damageCountdown = gUnknown_80F4F40;
|
||||
if (target == NULL) {
|
||||
entityInfo->linked.linkedStatus = 0;
|
||||
entityInfo->leechSeedClassStatus.status = 0;
|
||||
}
|
||||
else {
|
||||
EntityInfo *targetInfo = GetEntInfo(target);
|
||||
if (targetInfo->unk98 != entityInfo->linked.unk4) {
|
||||
entityInfo->linked.linkedStatus = 0;
|
||||
if (targetInfo->unk98 != entityInfo->leechSeedClassStatus.unk4) {
|
||||
entityInfo->leechSeedClassStatus.status = 0;
|
||||
}
|
||||
else {
|
||||
bool8 dmgUser = HasAbility(entity, ABILITY_LIQUID_OOZE);
|
||||
|
|
@ -547,7 +547,7 @@ void sub_8074094(Entity *entity)
|
|||
if (!EntityExists(entity) || !EntityExists(target) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->immobilize.immobilizeStatus != STATUS_FROZEN) {
|
||||
if (entityInfo->frozenClassStatus.status != STATUS_FROZEN) {
|
||||
TrySendImmobilizeSleepEndMsg(entity, entity);
|
||||
DealDamageToEntity(entity, hp, 9, 0x20D);
|
||||
if (dmgUser) {
|
||||
|
|
@ -571,11 +571,11 @@ void sub_8074094(Entity *entity)
|
|||
UseAttack(NULL);
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], entity, 0);
|
||||
TryDisplayDungeonLoggableMessage(entity, gUnknown_80FEB30);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], entity, 0);
|
||||
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FEB30);
|
||||
TrySendImmobilizeSleepEndMsg(entity, entity);
|
||||
if (entityInfo->protection.protectionStatus == STATUS_PROTECT) {
|
||||
TryDisplayDungeonLoggableMessage(entity, gPtrProtectSavedItMessage);
|
||||
if (entityInfo->reflectClassStatus.status == STATUS_PROTECT) {
|
||||
LogMessageByIdWithPopupCheckUser(entity, gPtrProtectSavedItMessage);
|
||||
}
|
||||
else {
|
||||
DealDamageToEntity(entity, 0x270F, 0xB, 0x20E);
|
||||
|
|
@ -585,10 +585,10 @@ void sub_8074094(Entity *entity)
|
|||
}
|
||||
}
|
||||
|
||||
if (entityInfo->charging.chargingStatus == STATUS_BIDE) {
|
||||
sub_80838EC(&entityInfo->charging.chargingStatusTurns);
|
||||
if (entityInfo->charging.chargingStatusTurns == 0) {
|
||||
entityInfo->charging.chargingStatus = 0;
|
||||
if (entityInfo->bideClassStatus.status == STATUS_BIDE) {
|
||||
sub_80838EC(&entityInfo->bideClassStatus.turns);
|
||||
if (entityInfo->bideClassStatus.turns == 0) {
|
||||
entityInfo->bideClassStatus.status = 0;
|
||||
if (!CheckVariousStatuses2(entity, FALSE) && !CannotAttack(entity, FALSE) && !CheckVariousStatuses(entity)) {
|
||||
Move bideMove;
|
||||
|
||||
|
|
@ -606,13 +606,13 @@ void sub_8074094(Entity *entity)
|
|||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->charging.chargingStatus == STATUS_ENRAGED) {
|
||||
sub_80838EC(&entityInfo->charging.chargingStatusTurns);
|
||||
if (entityInfo->charging.chargingStatusTurns == 0) {
|
||||
entityInfo->charging.chargingStatus = 0;
|
||||
if (entityInfo->bideClassStatus.status == STATUS_ENRAGED) {
|
||||
sub_80838EC(&entityInfo->bideClassStatus.turns);
|
||||
if (entityInfo->bideClassStatus.turns == 0) {
|
||||
entityInfo->bideClassStatus.status = 0;
|
||||
entityInfo->unk14A = 0;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0);
|
||||
TryDisplayDungeonLoggableMessage(entity, gUnknown_80FABD8);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
|
||||
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FABD8);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -635,7 +635,7 @@ void TickStatusHeal(Entity *entity)
|
|||
entityInfo = GetEntInfo(entity);
|
||||
|
||||
// HP heal
|
||||
if (entityInfo->unk146 == 0 && entityInfo->nonVolatile.nonVolatileStatus != STATUS_POISONED && entityInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED) {
|
||||
if (entityInfo->unk146 == 0 && entityInfo->burnClassStatus.status != STATUS_POISONED && entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED) {
|
||||
s32 r4 = 0;
|
||||
|
||||
if (!entityInfo->isNotTeamMember)
|
||||
|
|
@ -644,7 +644,7 @@ void TickStatusHeal(Entity *entity)
|
|||
if (r4 != 0) {
|
||||
if (HasHeldItem(entity, ITEM_HEAL_RIBBON))
|
||||
r4 += gUnknown_80F4FC4;
|
||||
if (entityInfo->protection.protectionStatus == STATUS_WISH)
|
||||
if (entityInfo->reflectClassStatus.status == STATUS_WISH)
|
||||
r4 += gUnknown_80F4FC0;
|
||||
if (HasAbility(entity, ABILITY_RAIN_DISH) && GetApparentWeather(entity) == WEATHER_RAIN)
|
||||
r4 += gUnknown_80F4FC2;
|
||||
|
|
@ -665,90 +665,90 @@ void TickStatusHeal(Entity *entity)
|
|||
}
|
||||
}
|
||||
|
||||
if (entityInfo->sleep.sleep != 0) {
|
||||
sub_80838EC(&entityInfo->sleep.sleepTurns);
|
||||
if (entityInfo->sleep.sleepTurns == 0) {
|
||||
SendSleepEndMessage(entity, entity, TRUE, TRUE);
|
||||
if (entityInfo->sleepClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->sleepClassStatus.turns);
|
||||
if (entityInfo->sleepClassStatus.turns == 0) {
|
||||
EndSleepClassStatus(entity, entity, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->nonVolatile.nonVolatileStatus != 0) {
|
||||
sub_80838EC(&entityInfo->nonVolatile.nonVolatileStatusTurns);
|
||||
if (entityInfo->nonVolatile.nonVolatileStatusTurns == 0) {
|
||||
SendNonVolatileEndMessage(entity, entity);
|
||||
if (entityInfo->burnClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->burnClassStatus.turns);
|
||||
if (entityInfo->burnClassStatus.turns == 0) {
|
||||
EndBurnClassStatus(entity, entity);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->immobilize.immobilizeStatus != 0) {
|
||||
sub_80838EC(&entityInfo->immobilize.immobilizeStatusTurns);
|
||||
if (entityInfo->immobilize.immobilizeStatusTurns == 0) {
|
||||
SendImmobilizeEndMessage(entity, entity);
|
||||
if (entityInfo->frozenClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->frozenClassStatus.turns);
|
||||
if (entityInfo->frozenClassStatus.turns == 0) {
|
||||
EndFrozenClassStatus(entity, entity);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->volatileStatus.volatileStatus != 0) {
|
||||
sub_80838EC(&entityInfo->volatileStatus.volatileStatusTurns);
|
||||
if (entityInfo->volatileStatus.volatileStatusTurns == 0) {
|
||||
SendVolatileEndMessage(entity, entity);
|
||||
if (entityInfo->cringeClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->cringeClassStatus.turns);
|
||||
if (entityInfo->cringeClassStatus.turns == 0) {
|
||||
EndCringeClassStatus(entity, entity);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->protection.protectionStatus != 0) {
|
||||
sub_80838EC(&entityInfo->protection.protectionStatusTurns);
|
||||
if (entityInfo->protection.protectionStatusTurns == 0) {
|
||||
SendProtectionEndMessage(entity, entity);
|
||||
if (entityInfo->reflectClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->reflectClassStatus.turns);
|
||||
if (entityInfo->reflectClassStatus.turns == 0) {
|
||||
EndReflectClassStatus(entity, entity);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->waitingStruct.waitingStatus != 0) {
|
||||
sub_80838EC(&entityInfo->waitingStruct.waitingStatusTurns);
|
||||
if (entityInfo->waitingStruct.waitingStatusTurns == 0) {
|
||||
SendWaitingEndMessage(entity, entity, 0);
|
||||
if (entityInfo->curseClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->curseClassStatus.turns);
|
||||
if (entityInfo->curseClassStatus.turns == 0) {
|
||||
EndCurseClassStatus(entity, entity, 0);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->linked.linkedStatus != 0) {
|
||||
sub_80838EC(&entityInfo->linked.linkedStatusTurns);
|
||||
if (entityInfo->linked.linkedStatusTurns == 0) {
|
||||
SendLinkedEndMessage(entity, entity);
|
||||
if (entityInfo->leechSeedClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->leechSeedClassStatus.turns);
|
||||
if (entityInfo->leechSeedClassStatus.turns == 0) {
|
||||
EndLeechSeedClassStatus(entity, entity);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->moveStatus.moveStatus != 0) {
|
||||
sub_80838EC(&entityInfo->moveStatus.moveStatusTurns);
|
||||
if (entityInfo->moveStatus.moveStatusTurns == 0) {
|
||||
if (entityInfo->sureShotClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->sureShotClassStatus.turns);
|
||||
if (entityInfo->sureShotClassStatus.turns == 0) {
|
||||
SendMoveEndMessage(entity, entity);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->transformStatus.transformStatus != 0) {
|
||||
sub_80838EC(&entityInfo->transformStatus.transformStatusTurns);
|
||||
if (entityInfo->transformStatus.transformStatusTurns == 0) {
|
||||
if (entityInfo->invisibleClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->invisibleClassStatus.turns);
|
||||
if (entityInfo->invisibleClassStatus.turns == 0) {
|
||||
SendTransformEndMessage(entity, entity);
|
||||
}
|
||||
}
|
||||
if (!EntityExists(entity) || sub_8044B28())
|
||||
return;
|
||||
|
||||
if (entityInfo->eyesightStatus.eyesightStatus != 0) {
|
||||
sub_80838EC(&entityInfo->eyesightStatus.eyesightStatusTurns);
|
||||
if (entityInfo->eyesightStatus.eyesightStatusTurns == 0) {
|
||||
if (entityInfo->blinkerClassStatus.status != 0) {
|
||||
sub_80838EC(&entityInfo->blinkerClassStatus.turns);
|
||||
if (entityInfo->blinkerClassStatus.turns == 0) {
|
||||
SendEyesightEndMessage(entity, entity);
|
||||
}
|
||||
}
|
||||
|
|
@ -756,8 +756,8 @@ void TickStatusHeal(Entity *entity)
|
|||
return;
|
||||
|
||||
if (entityInfo->muzzled.muzzled != 0) {
|
||||
sub_80838EC(&entityInfo->muzzled.muzzledTurns);
|
||||
if (entityInfo->muzzled.muzzledTurns == 0) {
|
||||
sub_80838EC(&entityInfo->muzzled.turns);
|
||||
if (entityInfo->muzzled.turns == 0) {
|
||||
SendMuzzledEndMessage(entity, entity);
|
||||
}
|
||||
}
|
||||
|
|
@ -767,8 +767,8 @@ void TickStatusHeal(Entity *entity)
|
|||
if (entityInfo->terrifiedTurns != 0) {
|
||||
sub_80838EC(&entityInfo->terrifiedTurns);
|
||||
if (entityInfo->terrifiedTurns == 0) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0);
|
||||
TryDisplayDungeonLoggableMessage(entity, gPtrStenchWavedOffMessage);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
|
||||
LogMessageByIdWithPopupCheckUser(entity, gPtrStenchWavedOffMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -791,8 +791,8 @@ void TickStatusHeal(Entity *entity)
|
|||
s32 newSpdStage = CalcSpeedStage(entity);
|
||||
|
||||
if (oldSpdStage != newSpdStage) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], entity, 0);
|
||||
TryDisplayDungeonLoggableMessage(entity, gUnknown_80FA124[newSpdStage]);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
|
||||
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FA124[newSpdStage]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -893,7 +893,7 @@ bool8 UseAttack(Entity *a0)
|
|||
gUnknown_202F378 = 1;
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
Entity *mon = gDungeon->allPokemon[i];
|
||||
Entity *mon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(mon)) {
|
||||
EntityInfo *monInfo = GetEntInfo(mon);
|
||||
if (monInfo->numMoveTiles == 0) {
|
||||
|
|
@ -935,7 +935,7 @@ bool8 UseAttack(Entity *a0)
|
|||
for (loop = 0; loop < 24 / gUnknown_202F378; loop++) {
|
||||
sub_803E46C(7);
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
Entity *mon = gDungeon->allPokemon[i];
|
||||
Entity *mon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(mon)) {
|
||||
EntityInfo *monInfo = GetEntInfo(mon);
|
||||
Unk_Entity_x184 *strPtr = &monInfo->unk184[monInfo->notMoving];
|
||||
|
|
@ -963,7 +963,7 @@ bool8 UseAttack(Entity *a0)
|
|||
}
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
Entity *mon = gDungeon->allPokemon[i];
|
||||
Entity *mon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(mon)) {
|
||||
EntityInfo *monInfo = GetEntInfo(mon);
|
||||
monInfo->numMoveTiles = 0;
|
||||
|
|
@ -979,7 +979,7 @@ bool8 UseAttack(Entity *a0)
|
|||
for (loop = 0; loop < DUNGEON_MAX_POKEMON; loop++) {
|
||||
Position monPosBefore;
|
||||
EntityInfo *monInfo;
|
||||
Entity *mon = gDungeon->allPokemon[loop];
|
||||
Entity *mon = gDungeon->activePokemon[loop];
|
||||
|
||||
if (!EntityExists(mon))
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ void sub_8075680(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if ((EntityExists(entity)) && (info = GetEntInfo(entity), !info->isTeamLeader)) {
|
||||
targetPos = &(info->targetPos);
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ void sub_8075708(Entity *entity)
|
|||
return;
|
||||
}
|
||||
tile = GetTileAtEntitySafe(entity);
|
||||
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->transformStatus.transformStatus != STATUS_MOBILE)) &&
|
||||
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->invisibleClassStatus.status != STATUS_MOBILE)) &&
|
||||
(!HasHeldItem(entity, ITEM_MOBILE_SCARF))) {
|
||||
sub_804AE84(&entity->pos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,10 +216,10 @@ void MuzzleTarget(Entity *pokemon, Entity *target)
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->muzzled.muzzled != TRUE) {
|
||||
entityInfo->muzzled.muzzled = TRUE;
|
||||
entityInfo->muzzled.muzzledTurns = CalculateStatusTurns(target,gUnknown_80F4F1C, TRUE) + 1;
|
||||
entityInfo->muzzled.turns = CalculateStatusTurns(target,gUnknown_80F4F1C, TRUE) + 1;
|
||||
nullsub_86(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FBF68);
|
||||
}
|
||||
|
|
@ -247,10 +247,10 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
entityInfo = GetEntInfo(target);
|
||||
|
||||
if (entityInfo->transformStatus.transformStatus == STATUS_TRANSFORMED)
|
||||
if (entityInfo->invisibleClassStatus.status == STATUS_TRANSFORMED)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FBF04);
|
||||
else {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
iVar5 = sub_803D870(auStack544, 0);
|
||||
|
||||
if (iVar5 == 0)
|
||||
|
|
@ -275,8 +275,8 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
|
|||
else {
|
||||
entityInfo->apparentID = apparentID;
|
||||
target->axObj.spriteFile = sprite;
|
||||
entityInfo->transformStatus.transformStatus = STATUS_TRANSFORMED;
|
||||
entityInfo->transformStatus.transformStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EFC, TRUE) + 1;
|
||||
entityInfo->invisibleClassStatus.status = STATUS_TRANSFORMED;
|
||||
entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EFC, TRUE) + 1;
|
||||
sub_806CF98(target);
|
||||
nullsub_87(target);
|
||||
sub_806CCB4(target, sub_806CEBC(target));
|
||||
|
|
@ -296,13 +296,13 @@ void MobileStatusTarget(Entity * pokemon, Entity * target)
|
|||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
|
||||
if (entityInfo->transformStatus.transformStatus == STATUS_TRANSFORMED) {
|
||||
if (entityInfo->invisibleClassStatus.status == STATUS_TRANSFORMED) {
|
||||
SendTransformEndMessage(pokemon,target);
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->transformStatus.transformStatus != STATUS_MOBILE) {
|
||||
entityInfo->transformStatus.transformStatus = STATUS_MOBILE;
|
||||
entityInfo->transformStatus.transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F04, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->invisibleClassStatus.status != STATUS_MOBILE) {
|
||||
entityInfo->invisibleClassStatus.status = STATUS_MOBILE;
|
||||
entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F04, FALSE) + 1;
|
||||
nullsub_88(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBF28);
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3)
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->hitChanceStages[1] > 10) {
|
||||
entityInfo->hitChanceStages[1] = 10;
|
||||
flag = TRUE;
|
||||
|
|
@ -384,10 +384,10 @@ void BlindTarget(Entity *pokemon, Entity *target)
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->eyesightStatus.eyesightStatus != STATUS_BLINKER) {
|
||||
entityInfo->eyesightStatus.eyesightStatus = STATUS_BLINKER;
|
||||
entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F08, TRUE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->blinkerClassStatus.status != STATUS_BLINKER) {
|
||||
entityInfo->blinkerClassStatus.status = STATUS_BLINKER;
|
||||
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F08, TRUE) + 1;
|
||||
sub_8041E0C(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB7F4);
|
||||
sub_803E46C(0x31);
|
||||
|
|
@ -411,12 +411,12 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target)
|
|||
if(!HasSafeguardStatus(pokemon, target, TRUE))
|
||||
{
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->eyesightStatus.eyesightStatus != STATUS_CROSS_EYED) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->blinkerClassStatus.status != STATUS_CROSS_EYED) {
|
||||
sub_8041E1C(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB834);
|
||||
entityInfo->eyesightStatus.eyesightStatus = STATUS_CROSS_EYED;
|
||||
entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F0C, TRUE) + 1;
|
||||
entityInfo->blinkerClassStatus.status = STATUS_CROSS_EYED;
|
||||
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F0C, TRUE) + 1;
|
||||
sub_803F580(0x1);
|
||||
sub_8049ED4();
|
||||
sub_8040A84();
|
||||
|
|
@ -437,10 +437,10 @@ void RestoreVisionTarget(Entity *pokemon, Entity *target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->eyesightStatus.eyesightStatus != STATUS_EYEDROPS) {
|
||||
entityInfo->eyesightStatus.eyesightStatus = STATUS_EYEDROPS;
|
||||
entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F10, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->blinkerClassStatus.status != STATUS_EYEDROPS) {
|
||||
entityInfo->blinkerClassStatus.status = STATUS_EYEDROPS;
|
||||
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F10, FALSE) + 1;
|
||||
sub_8041E3C(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB880);
|
||||
sub_803E46C(0x31);
|
||||
|
|
@ -505,7 +505,7 @@ void RaiseAtkStatTarget(Entity * pokemon, Entity *target, s32 increment)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
oldStat = entityInfo->atk[0];
|
||||
|
|
@ -535,7 +535,7 @@ void RaiseSpAtkStatTarget(Entity * pokemon, Entity *target, s32 increment)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
oldStat = entityInfo->atk[1];
|
||||
|
|
@ -565,7 +565,7 @@ void RaiseDefStatTarget(Entity * pokemon, Entity *target, s32 increment)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
oldStat = entityInfo->def[0];
|
||||
|
|
@ -595,7 +595,7 @@ void RaiseSpDefStatTarget(Entity * pokemon, Entity *target, s32 increment)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
oldStat = entityInfo->def[1];
|
||||
|
|
@ -622,9 +622,9 @@ void LongTossStatusTarget(Entity * pokemon, Entity * target)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],target,0);
|
||||
if (entityInfo->itemStatus.itemStatus != STATUS_LONG_TOSS) {
|
||||
entityInfo->itemStatus.itemStatus = STATUS_LONG_TOSS;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
|
||||
if (entityInfo->longTossClassStatus.status != STATUS_LONG_TOSS) {
|
||||
entityInfo->longTossClassStatus.status = STATUS_LONG_TOSS;
|
||||
sub_8041EA4(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD20C);
|
||||
}
|
||||
|
|
@ -639,9 +639,9 @@ void PierceStatusTarget(Entity * pokemon, Entity * target)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],target,0);
|
||||
if (entityInfo->itemStatus.itemStatus != STATUS_PIERCE) {
|
||||
entityInfo->itemStatus.itemStatus = STATUS_PIERCE;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
|
||||
if (entityInfo->longTossClassStatus.status != STATUS_PIERCE) {
|
||||
entityInfo->longTossClassStatus.status = STATUS_PIERCE;
|
||||
sub_8041EB4(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD254);
|
||||
}
|
||||
|
|
@ -663,19 +663,19 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if ((entityInfo->charging.chargingStatus == newStatus) && (newStatus == STATUS_ENRAGED)) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if ((entityInfo->bideClassStatus.status == newStatus) && (newStatus == STATUS_ENRAGED)) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC074);
|
||||
}
|
||||
else {
|
||||
entityInfo->charging.chargingStatus = newStatus;
|
||||
entityInfo->bideClassStatus.status = newStatus;
|
||||
|
||||
for(index = 0; index < MAX_MON_MOVES; index++)
|
||||
{
|
||||
movePtr = &entityInfo->moves.moves[index];
|
||||
if(movePtr == move)
|
||||
{
|
||||
entityInfo->charging.chargingStatusMoveIndex = index;
|
||||
entityInfo->bideClassStatus.moveSlot = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -690,11 +690,11 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
|
|||
entityInfo->unkFF = 2;
|
||||
}
|
||||
if (newStatus == STATUS_BIDE) {
|
||||
entityInfo->charging.chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E9C, FALSE) + 1;
|
||||
entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E9C, FALSE) + 1;
|
||||
entityInfo->unkA0 = 0;
|
||||
}
|
||||
if (newStatus == STATUS_ENRAGED) {
|
||||
entityInfo->charging.chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA0, FALSE) + 1;
|
||||
entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EA0, FALSE) + 1;
|
||||
}
|
||||
sub_8041BD0(target,uVar5);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,message);
|
||||
|
|
@ -723,8 +723,8 @@ void sub_8079764(Entity * pokemon)
|
|||
|
||||
if (EntityExists(pokemon)) {
|
||||
entityInfo = GetEntInfo(pokemon);
|
||||
if ((entityInfo->charging.chargingStatus != STATUS_BIDE) && (entityInfo->charging.chargingStatus != STATUS_ENRAGED)) {
|
||||
entityInfo->charging.chargingStatus = STATUS_NONE;
|
||||
if ((entityInfo->bideClassStatus.status != STATUS_BIDE) && (entityInfo->bideClassStatus.status != STATUS_ENRAGED)) {
|
||||
entityInfo->bideClassStatus.status = STATUS_NONE;
|
||||
entityInfo->unk14A = 0;
|
||||
entityInfo->unkFF = 0;
|
||||
}
|
||||
|
|
@ -738,16 +738,16 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus == newStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status == newStatus) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB10C);
|
||||
}
|
||||
else {
|
||||
nullsub_57(target);
|
||||
if ((entityInfo->protection.protectionStatus != STATUS_COUNTER) && (entityInfo->protection.protectionStatus != STATUS_MINI_COUNTER)) {
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E98, FALSE) + 1;
|
||||
if ((entityInfo->reflectClassStatus.status != STATUS_COUNTER) && (entityInfo->reflectClassStatus.status != STATUS_MINI_COUNTER)) {
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E98, FALSE) + 1;
|
||||
}
|
||||
entityInfo->protection.protectionStatus = newStatus;
|
||||
entityInfo->reflectClassStatus.status = newStatus;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB0E0);
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
|
@ -760,10 +760,10 @@ void SafeguardStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_SAFEGUARD) {
|
||||
entityInfo->protection.protectionStatus = STATUS_SAFEGUARD;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_SAFEGUARD) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_SAFEGUARD;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1;
|
||||
nullsub_58(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB048);
|
||||
}
|
||||
|
|
@ -780,10 +780,10 @@ void MistStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MIST) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MIST;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_MIST) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_MIST;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1;
|
||||
nullsub_59(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB09C);
|
||||
}
|
||||
|
|
@ -800,10 +800,10 @@ void WishStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_WISH) {
|
||||
entityInfo->protection.protectionStatus = STATUS_WISH;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_WISH) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_WISH;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1;
|
||||
sub_8041B34(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE1C);
|
||||
}
|
||||
|
|
@ -820,10 +820,10 @@ void MagicCoatStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MAGIC_COAT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MAGIC_COAT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_MAGIC_COAT) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_MAGIC_COAT;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1;
|
||||
nullsub_60(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAF5C);
|
||||
}
|
||||
|
|
@ -840,10 +840,10 @@ void LightScreenStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_LIGHT_SCREEN) {
|
||||
entityInfo->protection.protectionStatus = STATUS_LIGHT_SCREEN;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_LIGHT_SCREEN) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_LIGHT_SCREEN;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1;
|
||||
nullsub_61(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB130);
|
||||
}
|
||||
|
|
@ -860,10 +860,10 @@ void ReflectStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_REFLECT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_REFLECT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_REFLECT) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_REFLECT;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1;
|
||||
nullsub_62(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB17C);
|
||||
}
|
||||
|
|
@ -881,14 +881,14 @@ void ProtectStatusTarget(Entity * pokemon, Entity * target)
|
|||
if (EntityExists(target)) {
|
||||
nullsub_63(target);
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_PROTECT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_PROTECT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_PROTECT) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_PROTECT;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB9B0);
|
||||
}
|
||||
else {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB9D8);
|
||||
}
|
||||
EntityUpdateStatusSprites(target);
|
||||
|
|
@ -901,10 +901,10 @@ void MirrorCoatStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MIRROR_COAT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MIRROR_COAT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_MIRROR_COAT) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_MIRROR_COAT;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1;
|
||||
nullsub_64(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBAC0);
|
||||
}
|
||||
|
|
@ -921,10 +921,10 @@ void EndureStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_ENDURING) {
|
||||
entityInfo->protection.protectionStatus = STATUS_ENDURING;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_ENDURING) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_ENDURING;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1;
|
||||
nullsub_65(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBBF0);
|
||||
}
|
||||
|
|
@ -941,10 +941,10 @@ void MirrorMoveStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MIRROR_MOVE) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MIRROR_MOVE;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_MIRROR_MOVE) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_MIRROR_MOVE;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1;
|
||||
nullsub_66(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBC38);
|
||||
}
|
||||
|
|
@ -966,10 +966,10 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target)
|
|||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gPtrForecastPreventsConversion2Message);
|
||||
else
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_CONVERSION2) {
|
||||
entityInfo->protection.protectionStatus = STATUS_CONVERSION2;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_CONVERSION2) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_CONVERSION2;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1;
|
||||
nullsub_67(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBC7C);
|
||||
}
|
||||
|
|
@ -987,10 +987,10 @@ void VitalThrowStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->protection.protectionStatus != STATUS_VITAL_THROW) {
|
||||
entityInfo->protection.protectionStatus = STATUS_VITAL_THROW;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->reflectClassStatus.status != STATUS_VITAL_THROW) {
|
||||
entityInfo->reflectClassStatus.status = STATUS_VITAL_THROW;
|
||||
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1;
|
||||
nullsub_68(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBCC8);
|
||||
}
|
||||
|
|
@ -1040,7 +1040,7 @@ void sub_8079E34(Entity * pokemon, Entity * target, bool8 param_3)
|
|||
else if (param_3 != 0) {
|
||||
sub_80420C8(target);
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (statChanged) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBD18);
|
||||
}
|
||||
|
|
@ -1066,15 +1066,15 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4)
|
|||
entityInfo = GetEntInfo(target);
|
||||
if (HasNegativeStatus(target)) {
|
||||
bVar8 = TRUE;
|
||||
SendSleepEndMessage(pokemon,target,0,0);
|
||||
EndSleepClassStatus(pokemon,target,0,0);
|
||||
if (!EntityExists(target)) {
|
||||
return;
|
||||
}
|
||||
SendNonVolatileEndMessage(pokemon,target);
|
||||
SendImmobilizeEndMessage(pokemon,target);
|
||||
SendVolatileEndMessage(pokemon,target);
|
||||
SendWaitingEndMessage(pokemon,target,0);
|
||||
SendLinkedEndMessage(pokemon,target);
|
||||
EndBurnClassStatus(pokemon,target);
|
||||
EndFrozenClassStatus(pokemon,target);
|
||||
EndCringeClassStatus(pokemon,target);
|
||||
EndCurseClassStatus(pokemon,target,0);
|
||||
EndLeechSeedClassStatus(pokemon,target);
|
||||
SendMoveEndMessage(pokemon,target);
|
||||
SendEyesightEndMessage(pokemon,target);
|
||||
SendMuzzledEndMessage(pokemon,target);
|
||||
|
|
@ -1147,7 +1147,7 @@ void sub_807A0CC(Entity * pokemon, Entity * target)
|
|||
};
|
||||
}
|
||||
|
||||
void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8 param_4)
|
||||
void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8 param_4)
|
||||
{
|
||||
EntityInfo *entityInfo;
|
||||
bool8 isAsleep;
|
||||
|
|
@ -1157,8 +1157,8 @@ void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->sleep.sleep) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->sleepClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 6:
|
||||
break;
|
||||
|
|
@ -1180,26 +1180,26 @@ void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8
|
|||
isAsleep = TRUE;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA710);
|
||||
HealTargetHP(pokemon,target,gUnknown_80F4F7A, 0, FALSE);
|
||||
entityInfo->sleep.sleep = 0;
|
||||
entityInfo->sleepClassStatus.status = 0;
|
||||
sub_8079F20(pokemon,target,1,1);
|
||||
break;
|
||||
case STATUS_YAWNING:
|
||||
if (param_3) {
|
||||
entityInfo->sleep.sleep = STATUS_NONE;
|
||||
entityInfo->sleepClassStatus.status = STATUS_NONE;
|
||||
sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE);
|
||||
return;
|
||||
}
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA734);
|
||||
break;
|
||||
}
|
||||
entityInfo->sleep.sleep = STATUS_NONE;
|
||||
entityInfo->sleepClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
if (isAsleep) {
|
||||
sub_806CE68(target,8);
|
||||
}
|
||||
}
|
||||
|
||||
void SendNonVolatileEndMessage(Entity * pokemon, Entity * target)
|
||||
void EndBurnClassStatus(Entity * pokemon, Entity * target)
|
||||
{
|
||||
EntityInfo *entityInfo;
|
||||
|
||||
|
|
@ -1207,8 +1207,8 @@ void SendNonVolatileEndMessage(Entity * pokemon, Entity * target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->nonVolatile.nonVolatileStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->burnClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 5:
|
||||
break;
|
||||
|
|
@ -1224,11 +1224,11 @@ void SendNonVolatileEndMessage(Entity * pokemon, Entity * target)
|
|||
break;
|
||||
|
||||
}
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_NONE;
|
||||
entityInfo->burnClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void SendImmobilizeEndMessage(Entity * pokemon, Entity *target)
|
||||
void EndFrozenClassStatus(Entity * pokemon, Entity *target)
|
||||
{
|
||||
bool8 isFrozen;
|
||||
EntityInfo *entityInfo;
|
||||
|
|
@ -1238,8 +1238,8 @@ void SendImmobilizeEndMessage(Entity * pokemon, Entity *target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->immobilize.immobilizeStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->frozenClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 8:
|
||||
break;
|
||||
|
|
@ -1263,14 +1263,14 @@ void SendImmobilizeEndMessage(Entity * pokemon, Entity *target)
|
|||
TryDisplayDungeonLoggableMessage3(pokemon,target, *gPtrMonNoLongerPetrifiedMessage);
|
||||
break;
|
||||
}
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||
entityInfo->frozenClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
if (isFrozen) {
|
||||
sub_8042A74(target);
|
||||
}
|
||||
}
|
||||
|
||||
void SendVolatileEndMessage(Entity * pokemon, Entity *target)
|
||||
void EndCringeClassStatus(Entity * pokemon, Entity *target)
|
||||
{
|
||||
EntityInfo *entityInfo;
|
||||
|
||||
|
|
@ -1278,8 +1278,8 @@ void SendVolatileEndMessage(Entity * pokemon, Entity *target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->volatileStatus.volatileStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->cringeClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 8:
|
||||
break;
|
||||
|
|
@ -1305,12 +1305,12 @@ void SendVolatileEndMessage(Entity * pokemon, Entity *target)
|
|||
TryDisplayDungeonLoggableMessage3(pokemon,target, *gPtrMonNoLongerCringingMessage);
|
||||
break;
|
||||
}
|
||||
entityInfo->volatileStatus.volatileStatus = STATUS_NONE;
|
||||
entityInfo->cringeClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
CalcSpeedStage(target);
|
||||
}
|
||||
|
||||
void SendProtectionEndMessage(Entity * pokemon, Entity *target)
|
||||
void EndReflectClassStatus(Entity * pokemon, Entity *target)
|
||||
{
|
||||
EntityInfo *entityInfo;
|
||||
|
||||
|
|
@ -1318,116 +1318,116 @@ void SendProtectionEndMessage(Entity * pokemon, Entity *target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->protection.protectionStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->reflectClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 0xF:
|
||||
break;
|
||||
case STATUS_REFLECT:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA638);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA638);
|
||||
break;
|
||||
case STATUS_SAFEGUARD:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA69C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA69C);
|
||||
break;
|
||||
case STATUS_LIGHT_SCREEN:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA658);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA658);
|
||||
break;
|
||||
case STATUS_COUNTER:
|
||||
case STATUS_MINI_COUNTER:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA67C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA67C);
|
||||
break;
|
||||
case STATUS_MAGIC_COAT:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA6BC);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA6BC);
|
||||
break;
|
||||
case STATUS_WISH:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA6D4);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA6D4);
|
||||
break;
|
||||
case STATUS_PROTECT:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA9C0);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA9C0);
|
||||
break;
|
||||
case STATUS_MIRROR_COAT:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FAA68);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FAA68);
|
||||
break;
|
||||
case STATUS_ENDURING:
|
||||
TryDisplayDungeonLoggableMessage(target, *gPtrMonStoppedEnduringMessage);
|
||||
LogMessageByIdWithPopupCheckUser(target, *gPtrMonStoppedEnduringMessage);
|
||||
break;
|
||||
case STATUS_MIRROR_MOVE:
|
||||
TryDisplayDungeonLoggableMessage(target,*gPtrMonMirrorMoveFadedMessage);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gPtrMonMirrorMoveFadedMessage);
|
||||
break;
|
||||
case STATUS_CONVERSION2:
|
||||
TryDisplayDungeonLoggableMessage(target, *gPtrMonConversion2FailedMessage);
|
||||
LogMessageByIdWithPopupCheckUser(target, *gPtrMonConversion2FailedMessage);
|
||||
break;
|
||||
case STATUS_VITAL_THROW:
|
||||
TryDisplayDungeonLoggableMessage(target, *gPtrMonGaveUpVitalThrowMessage);
|
||||
LogMessageByIdWithPopupCheckUser(target, *gPtrMonGaveUpVitalThrowMessage);
|
||||
break;
|
||||
case STATUS_MIST:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FAB40);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FAB40);
|
||||
break;
|
||||
}
|
||||
entityInfo->protection.protectionStatus = STATUS_NONE;
|
||||
entityInfo->reflectClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus)
|
||||
void EndCurseClassStatus(Entity * pokemon, Entity * target, u8 curseClassStatus)
|
||||
{
|
||||
u32 uVar3;
|
||||
EntityInfo *entityInfo;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->waitingStruct.waitingStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->curseClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 4:
|
||||
break;
|
||||
case STATUS_CURSED:
|
||||
if (waitingStatus != STATUS_CURSED) {
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA7BC);
|
||||
if (curseClassStatus != STATUS_CURSED) {
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA7BC);
|
||||
}
|
||||
break;
|
||||
case STATUS_SNATCH:
|
||||
if (waitingStatus != STATUS_SNATCH) {
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA7DC);
|
||||
if (curseClassStatus != STATUS_SNATCH) {
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA7DC);
|
||||
}
|
||||
gDungeon->snatchPokemon = NULL;
|
||||
gDungeon->unk17B3C = 0;
|
||||
break;
|
||||
case STATUS_DECOY:
|
||||
entityInfo->waitingStruct.waitingStatus = STATUS_NONE;
|
||||
entityInfo->curseClassStatus.status = STATUS_NONE;
|
||||
uVar3 = sub_806CEBC(target);
|
||||
sub_806CCB4(target,uVar3);
|
||||
gDungeon->decoyActive = FALSE;
|
||||
if (waitingStatus != STATUS_DECOY) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA9A0);
|
||||
gDungeon->decoyIsActive = FALSE;
|
||||
if (curseClassStatus != STATUS_DECOY) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA9A0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
entityInfo->waitingStruct.waitingStatus = STATUS_NONE;
|
||||
entityInfo->curseClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
|
||||
void SendLinkedEndMessage(Entity * pokemon, Entity * target)
|
||||
void EndLeechSeedClassStatus(Entity * pokemon, Entity * target)
|
||||
{
|
||||
EntityInfo *entityInfo;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->linked.linkedStatus)
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->leechSeedClassStatus.status)
|
||||
{
|
||||
case STATUS_NONE:
|
||||
break;
|
||||
case STATUS_LEECH_SEED:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA79C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA79C);
|
||||
break;
|
||||
case STATUS_DESTINY_BOND:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FAA8C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FAA8C);
|
||||
break;
|
||||
}
|
||||
entityInfo->linked.linkedStatus = STATUS_NONE;
|
||||
entityInfo->linked.unk8 = 0xff;
|
||||
entityInfo->leechSeedClassStatus.status = STATUS_NONE;
|
||||
entityInfo->leechSeedClassStatus.unk8 = 0xff;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
|
|
@ -1440,25 +1440,25 @@ void SendMoveEndMessage(Entity * pokemon, Entity * target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->moveStatus.moveStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->sureShotClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 5:
|
||||
break;
|
||||
case STATUS_SURE_SHOT:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA8E0);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA8E0);
|
||||
break;
|
||||
case STATUS_WHIFFER:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA90C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA90C);
|
||||
break;
|
||||
case STATUS_SET_DAMAGE:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA934);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA934);
|
||||
break;
|
||||
case STATUS_FOCUS_ENERGY:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA95C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA95C);
|
||||
break;
|
||||
}
|
||||
entityInfo->moveStatus.moveStatus = STATUS_NONE;
|
||||
entityInfo->sureShotClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
|
|
@ -1473,27 +1473,27 @@ void SendTransformEndMessage(Entity * pokemon, Entity *target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->transformStatus.transformStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->invisibleClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 4:
|
||||
break;
|
||||
case STATUS_INVISIBLE:
|
||||
isInvisible = TRUE;
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FA9F4);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FA9F4);
|
||||
break;
|
||||
case STATUS_MOBILE:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FABBC);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FABBC);
|
||||
break;
|
||||
case STATUS_TRANSFORMED:
|
||||
entityInfo->apparentID = GetMonsterApparentID(target, entityInfo->id);
|
||||
target->axObj.spriteFile = GetSpriteData(entityInfo->apparentID);
|
||||
uVar3 = sub_806CEBC(target);
|
||||
sub_806CCB4(target,uVar3);
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FAB6C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FAB6C);
|
||||
break;
|
||||
}
|
||||
entityInfo->transformStatus.transformStatus = STATUS_NONE;
|
||||
entityInfo->invisibleClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
if (isInvisible) {
|
||||
sub_807EC28(TRUE);
|
||||
|
|
@ -1508,22 +1508,22 @@ void SendEyesightEndMessage(Entity * pokemon,Entity * target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->eyesightStatus.eyesightStatus) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->blinkerClassStatus.status) {
|
||||
case STATUS_NONE:
|
||||
case 4:
|
||||
break;
|
||||
case STATUS_BLINKER:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FAA0C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FAA0C);
|
||||
break;
|
||||
case STATUS_CROSS_EYED:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FAA2C);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FAA2C);
|
||||
break;
|
||||
case STATUS_EYEDROPS:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FAA48);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FAA48);
|
||||
break;
|
||||
}
|
||||
entityInfo->eyesightStatus.eyesightStatus = STATUS_NONE;
|
||||
entityInfo->blinkerClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
if (entityInfo->isTeamLeader) {
|
||||
sub_803E46C(0x31);
|
||||
|
|
@ -1540,13 +1540,13 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
switch(entityInfo->muzzled.muzzled) {
|
||||
case FALSE:
|
||||
case 2:
|
||||
break;
|
||||
case TRUE:
|
||||
TryDisplayDungeonLoggableMessage(target,*gUnknown_80FABC0);
|
||||
LogMessageByIdWithPopupCheckUser(target,*gUnknown_80FABC0);
|
||||
break;
|
||||
}
|
||||
entityInfo->muzzled.muzzled = FALSE;
|
||||
|
|
@ -1558,12 +1558,12 @@ bool8 TrySendImmobilizeSleepEndMsg(Entity * pokemon, Entity * target)
|
|||
EntityInfo *entityInfo = GetEntInfo(target);
|
||||
bool32 msg = FALSE;
|
||||
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED) {
|
||||
SendImmobilizeEndMessage(pokemon, target);
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_PETRIFIED) {
|
||||
EndFrozenClassStatus(pokemon, target);
|
||||
msg = TRUE;
|
||||
}
|
||||
if (entityInfo->sleep.sleep == STATUS_SLEEP && entityInfo->sleep.sleepTurns == 0x7f) {
|
||||
SendSleepEndMessage(pokemon,target, FALSE, TRUE);
|
||||
if (entityInfo->sleepClassStatus.status == STATUS_SLEEP && entityInfo->sleepClassStatus.turns == 0x7f) {
|
||||
EndSleepClassStatus(pokemon,target, FALSE, TRUE);
|
||||
msg = TRUE;
|
||||
}
|
||||
return msg;
|
||||
|
|
@ -1574,8 +1574,8 @@ void WakeUpPokemon(Entity * pokemon)
|
|||
EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = GetEntInfo(pokemon);
|
||||
entityInfo->sleep.sleep = STATUS_NONE;
|
||||
entityInfo->sleep.sleepTurns = 0;
|
||||
entityInfo->sleepClassStatus.status = STATUS_NONE;
|
||||
entityInfo->sleepClassStatus.turns = 0;
|
||||
sub_806A898(pokemon, 1, 1);
|
||||
EntityUpdateStatusSprites(pokemon);
|
||||
}
|
||||
|
|
@ -1586,11 +1586,11 @@ void SendThawedMessage(Entity *pokemon, Entity *target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||
entityInfo->immobilize.immobilizeStatusTurns = 0;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_FROZEN) {
|
||||
entityInfo->frozenClassStatus.status = STATUS_NONE;
|
||||
entityInfo->frozenClassStatus.turns = 0;
|
||||
entityInfo->frozenClassStatus.damageCountdown = 0;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA8BC); // $m0 thawed out!
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
|
@ -1614,8 +1614,8 @@ void sub_807AA30(void)
|
|||
{
|
||||
wildEntity = gDungeon->wildPokemon[wildIndex];
|
||||
if (EntityExists(wildEntity) &&
|
||||
(entityInfo = GetEntInfo(wildEntity), entityInfo->sleep.sleep == STATUS_SLEEP) &&
|
||||
(entityInfo->sleep.sleepTurns == 0x7F)) {
|
||||
(entityInfo = GetEntInfo(wildEntity), entityInfo->sleepClassStatus.status == STATUS_SLEEP) &&
|
||||
(entityInfo->sleepClassStatus.turns == 0x7F)) {
|
||||
adjacentCheck = FALSE;
|
||||
forceWakeup = FALSE;
|
||||
room = GetEntityRoom(wildEntity);
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction)
|
|||
else
|
||||
{
|
||||
if (pokemon == target) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA10); // {POKEMON_0} couldn't be knocked flying!
|
||||
return;
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (HasAbility(target,ABILITY_SUCTION_CUPS)) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCBCC); // {POKEMON_0} is anchored! It can't be knocked flying!
|
||||
return;
|
||||
|
|
@ -226,7 +226,7 @@ void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, Position *pos)
|
|||
info = GetEntInfo(target);
|
||||
flag = FALSE;
|
||||
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (HasAbility(target,ABILITY_SUCTION_CUPS)) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCAE8);
|
||||
return;
|
||||
|
|
@ -358,12 +358,12 @@ void sub_807D3CC(Entity *param_1)
|
|||
}
|
||||
}
|
||||
if (flag) {
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80FD2F8); // All traps were exposed
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80FD2F8); // All traps were exposed
|
||||
sub_8040A84();
|
||||
sub_8049ED4();
|
||||
}
|
||||
else {
|
||||
TryDisplayDungeonLoggableMessage(param_1,*gUnknown_80FD320); // There appears to be no hidden traps.
|
||||
LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80FD320); // There appears to be no hidden traps.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ void sub_807E254(Entity *pokemon,Entity *target)
|
|||
|
||||
|
||||
if (HasAbility(pokemon, ABILITY_SUCTION_CUPS)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCAC0); // $m0 is anchored! It won't switch places
|
||||
}
|
||||
else if(HasAbility(target, ABILITY_SUCTION_CUPS))
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCAC0); // $m0 is anchored! It won't switch places
|
||||
}
|
||||
else
|
||||
|
|
@ -135,7 +135,7 @@ void sub_807E378(void)
|
|||
sub_806A2BC(leader,1);
|
||||
UseAttack(leader);
|
||||
if (sub_8044B28() == 0) {
|
||||
TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9C4C);
|
||||
LogMessageByIdWithPopupCheckUser(leader,*gUnknown_80F9C4C);
|
||||
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],0);
|
||||
gDungeon->unk644.unk36 = 1;
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ void sub_807E378(void)
|
|||
sub_806A2BC(leader,1);
|
||||
UseAttack(leader);
|
||||
if (sub_8044B28() == 0) {
|
||||
TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9C70);
|
||||
LogMessageByIdWithPopupCheckUser(leader,*gUnknown_80F9C70);
|
||||
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],1);
|
||||
gDungeon->unk644.unk36 = 2;
|
||||
}
|
||||
|
|
@ -159,7 +159,7 @@ void sub_807E378(void)
|
|||
sub_806A2BC(leader,1);
|
||||
UseAttack(leader);
|
||||
if (sub_8044B28() == 0) {
|
||||
TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9C8C);
|
||||
LogMessageByIdWithPopupCheckUser(leader,*gUnknown_80F9C8C);
|
||||
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],2);
|
||||
gDungeon->unk644.unk36 = 3;
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ void sub_807E378(void)
|
|||
sub_806A2BC(leader,1);
|
||||
UseAttack(leader);
|
||||
if (sub_8044B28() == 0) {
|
||||
TryDisplayDungeonLoggableMessage(leader,*gUnknown_80F9CBC);
|
||||
LogMessageByIdWithPopupCheckUser(leader,*gUnknown_80F9CBC);
|
||||
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],3);
|
||||
gDungeon->unk644.unk36 = 4;
|
||||
sub_8068FE0(leader,0x21e,leader);
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ static void sub_803A3BC(void)
|
|||
speciesIndex = index * 0x10000 >> 0x10; // TODO: dumb way to force s16. Temp var may fix the regswap
|
||||
memset(moves, 0, sizeof(moves));
|
||||
moves[0] = MOVE_DOUBLESLAP;
|
||||
CopyMonsterNametoBuffer(buffer, speciesIndex);
|
||||
CopyMonsterNameToBuffer(buffer, speciesIndex);
|
||||
CopyStringtoBuffer(buffer, buffer);
|
||||
buffer[0] = 0x40;
|
||||
sub_808CFD0(&pokemon, speciesIndex, buffer, ITEM_CHERI_BERRY, (DungeonLocation *)&loc, moves);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ void sub_8044820(void)
|
|||
Entity * entity;
|
||||
Entity * entity2;
|
||||
s32 index;
|
||||
|
||||
|
||||
for (index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++) {
|
||||
entity = gDungeon->wildPokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
|
|
@ -62,7 +62,7 @@ void sub_8044820(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
entityInfo->aiNextToTarget = FALSE;
|
||||
entityInfo->aiAllySkip = FALSE;
|
||||
movSpeed = CalcSpeedStage(entity);
|
||||
if (gSpeedTurns[movSpeed][gDungeon->unk644.fractionalTurn] != 0) {
|
||||
if (!entityInfo->attacking) {
|
||||
|
|
@ -88,12 +88,12 @@ void sub_8044820(void)
|
|||
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++)
|
||||
{
|
||||
entity2 = gDungeon->wildPokemon[index];
|
||||
if ((EntityExists(entity2)) && (entityInfo2 = GetEntInfo(entity2), entityInfo2->aiNextToTarget))
|
||||
if ((EntityExists(entity2)) && (entityInfo2 = GetEntInfo(entity2), entityInfo2->aiAllySkip))
|
||||
{
|
||||
sub_8074094(entity2);
|
||||
if (EntityExists(entity2)) {
|
||||
sub_8071DA4(entity2);
|
||||
entityInfo2->aiNextToTarget = FALSE;
|
||||
entityInfo2->aiAllySkip = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -106,7 +106,7 @@ void TrySpawnMonsterAndActivatePlusMinus(void)
|
|||
Entity *entity;
|
||||
u32 isNotEnemy;
|
||||
s32 index;
|
||||
|
||||
|
||||
if (gSpeedTurns[1][gDungeon->unk644.fractionalTurn] != 0) {
|
||||
sub_8071B48();
|
||||
gDungeon->plusIsActive[0] = FALSE;
|
||||
|
|
@ -118,7 +118,7 @@ void TrySpawnMonsterAndActivatePlusMinus(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
entityInfo = GetEntInfo(entity);
|
||||
entityInfo->attacking = FALSE;
|
||||
|
|
@ -137,7 +137,7 @@ void TrySpawnMonsterAndActivatePlusMinus(void)
|
|||
}
|
||||
if (HasAbility(entity, ABILITY_MINUS)) {
|
||||
gDungeon->minusIsActive[isNotEnemy] = TRUE;
|
||||
}
|
||||
}
|
||||
if (HasAbility(entity, ABILITY_PLUS)) {
|
||||
gDungeon->plusIsActive[isNotEnemy] = TRUE;
|
||||
}
|
||||
|
|
@ -150,10 +150,10 @@ void TrySpawnMonsterAndActivatePlusMinus(void)
|
|||
void sub_8044AB4(void)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
|
||||
if (gSpeedTurns[1][gDungeon->unk644.fractionalTurn + 1] != 0) {
|
||||
for (index = 0; index < DUNGEON_MAX_POKEMON; index++) {
|
||||
if (EntityExists(gDungeon->allPokemon[index])) {
|
||||
if (EntityExists(gDungeon->activePokemon[index])) {
|
||||
UseAttack(0);
|
||||
break;
|
||||
}
|
||||
|
|
@ -182,7 +182,7 @@ bool8 sub_8044B28(void)
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool8 sub_8044B84(void)
|
||||
{
|
||||
if(gDungeon->unk10 != 0)
|
||||
|
|
@ -198,7 +198,7 @@ u8 *sub_8044BA8(u16 param_1, u8 id)
|
|||
{
|
||||
u32 uVar3;
|
||||
u32 uVar4;
|
||||
|
||||
|
||||
if ((param_1 == 0x26) && (sub_8043D10() == 2)) {
|
||||
return *gUnknown_80F91EC;
|
||||
}
|
||||
|
|
@ -260,7 +260,7 @@ void SetMonsterActionFields(ActionContainer *actionPointer, u16 action)
|
|||
|
||||
void SetActionPassTurnOrWalk(ActionContainer *actionPointer, s16 species)
|
||||
{
|
||||
if (CanMove(species))
|
||||
if (GetCanMoveFlag(species))
|
||||
{
|
||||
actionPointer->action = ACTION_WALK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ void sub_8075900(Entity *pokemon, u8 r1)
|
|||
if((GetTileAtEntitySafe(pokemon)->terrainType & TERRAIN_TYPE_IN_MONSTER_HOUSE))
|
||||
{
|
||||
// It's a monster house!
|
||||
TryDisplayDungeonLoggableMessage(GetLeader(), gPtrItsaMonsterHouseMessage);
|
||||
LogMessageByIdWithPopupCheckUser(GetLeader(), gPtrItsaMonsterHouseMessage);
|
||||
gDungeon->unk644.monsterHouseTriggeredEvent = TRUE;
|
||||
sub_807AB38(pokemon, r1);
|
||||
sub_8041888(0);
|
||||
|
|
@ -74,23 +74,23 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
if (pokemonInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY)
|
||||
{
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
if (pokemonInfo->frozenClassStatus.status == STATUS_PETRIFIED)
|
||||
{
|
||||
SendImmobilizeEndMessage(pokemon, pokemon);
|
||||
EndFrozenClassStatus(pokemon, pokemon);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pokemonInfo->targetingDecoy = TARGETING_DECOY_NONE;
|
||||
if (pokemonInfo->clientType == CLIENT_TYPE_NONE || IsMovingClient(pokemon))
|
||||
pokemonInfo->decoyAITracker = DECOY_AI_NONE;
|
||||
if (pokemonInfo->monsterBehavior == BEHAVIOR_FIXED_ENEMY || ShouldRunMonsterAI(pokemon))
|
||||
{
|
||||
if (pokemonInfo->clientType != CLIENT_TYPE_CLIENT && pokemonInfo->useHeldItem)
|
||||
if (pokemonInfo->monsterBehavior != BEHAVIOR_RESCUE_TARGET && pokemonInfo->useHeldItem)
|
||||
{
|
||||
if (CheckVariousConditions(pokemon))
|
||||
{
|
||||
pokemonInfo->useHeldItem = FALSE;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
TryDisplayDungeonLoggableMessage(pokemon, gPtrCouldntBeUsedMessage);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, gPtrCouldntBeUsedMessage);
|
||||
return;
|
||||
}
|
||||
AIDecideUseItem(pokemon);
|
||||
|
|
@ -99,32 +99,32 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (!HasStatusAffectingActions(pokemon))
|
||||
if (!HasStatusThatPreventsActing(pokemon))
|
||||
{
|
||||
if (gDungeon->decoyActive)
|
||||
if (gDungeon->decoyIsActive)
|
||||
{
|
||||
s32 i;
|
||||
Entity *target;
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
target = gDungeon->allPokemon[i];
|
||||
target = gDungeon->activePokemon[i];
|
||||
if (EntityExists(target) &&
|
||||
GetEntInfo(target)->waitingStruct.waitingStatus == STATUS_DECOY &&
|
||||
GetEntInfo(target)->curseClassStatus.status == STATUS_DECOY &&
|
||||
CanSeeTarget(pokemon, target))
|
||||
{
|
||||
bool8 enemyDecoy = GetEntInfo(target)->waitingStruct.enemyDecoy;
|
||||
u8 targetingDecoy = TARGETING_DECOY_TEAM;
|
||||
if (enemyDecoy)
|
||||
bool8 applierNonTeamMemberFlag = GetEntInfo(target)->curseClassStatus.applierNonTeamMemberFlag;
|
||||
u8 decoyAITracker = DECOY_AI_TEAM;
|
||||
if (applierNonTeamMemberFlag)
|
||||
{
|
||||
targetingDecoy = TARGETING_DECOY_WILD;
|
||||
decoyAITracker = DECOY_AI_WILD;
|
||||
}
|
||||
pokemonInfo->targetingDecoy = targetingDecoy;
|
||||
pokemonInfo->decoyAITracker = decoyAITracker;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ClearMonsterActionFields(&pokemonInfo->action);
|
||||
if (pokemonInfo->clientType == CLIENT_TYPE_CLIENT)
|
||||
if (pokemonInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||
|
|
@ -138,47 +138,47 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||
{
|
||||
if (!IQSkillIsEnabled(pokemon, IQ_DEDICATED_TRAVELER))
|
||||
{
|
||||
DecideAttack(pokemon);
|
||||
ChooseAIMove(pokemon);
|
||||
if (pokemonInfo->action.action != ACTION_NOTHING)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||
if (pokemonInfo->cringeClassStatus.status == STATUS_CONFUSED)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!CanMove(pokemonInfo->id))
|
||||
if (!GetCanMoveFlag(pokemonInfo->id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
MoveIfPossible(pokemon, TRUE);
|
||||
AIMovement(pokemon, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||
if (pokemonInfo->cringeClassStatus.status == STATUS_CONFUSED)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CanMove(pokemonInfo->id))
|
||||
if (GetCanMoveFlag(pokemonInfo->id))
|
||||
{
|
||||
MoveIfPossible(pokemon, TRUE);
|
||||
AIMovement(pokemon, TRUE);
|
||||
}
|
||||
if (pokemonInfo->action.action > ACTION_PASS_TURN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
DecideAttack(pokemon);
|
||||
ChooseAIMove(pokemon);
|
||||
if (pokemonInfo->action.action <= ACTION_PASS_TURN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
pokemonInfo->aiTarget.aiNotNextToTarget = FALSE;
|
||||
pokemonInfo->aiNextToTarget = FALSE;
|
||||
pokemonInfo->aiAllySkip = FALSE;
|
||||
pokemonInfo->waiting = FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ extern void sub_804AC20(struct Position *);
|
|||
extern void sub_807EC28(bool8);
|
||||
extern void sub_806A5B8(struct Entity *entity);
|
||||
|
||||
void DecideAttack(Entity *pokemon)
|
||||
void ChooseAIMove(Entity *pokemon)
|
||||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
s32 i;
|
||||
|
|
@ -84,17 +84,17 @@ void DecideAttack(Entity *pokemon)
|
|||
if (CannotAttack(pokemon, FALSE) ||
|
||||
ShouldMonsterRunAwayAndShowEffect(pokemon, TRUE) ||
|
||||
HasTactic(pokemon, TACTIC_KEEP_YOUR_DISTANCE) ||
|
||||
(pokemonInfo->volatileStatus.volatileStatus == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance)))
|
||||
(pokemonInfo->cringeClassStatus.status == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pokemonInfo->charging.chargingStatus != STATUS_NONE)
|
||||
if (pokemonInfo->bideClassStatus.status != STATUS_NONE)
|
||||
{
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (pokemonInfo->moves.moves[i].moveFlags & MOVE_FLAG_EXISTS &&
|
||||
MoveMatchesChargingStatus(pokemon, &pokemonInfo->moves.moves[i]) &&
|
||||
pokemonInfo->charging.chargingStatusMoveIndex == i)
|
||||
MoveMatchesBideClassStatus(pokemon, &pokemonInfo->moves.moves[i]) &&
|
||||
pokemonInfo->bideClassStatus.moveSlot == i)
|
||||
{
|
||||
s32 chosenMoveIndex;
|
||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_AI);
|
||||
|
|
@ -206,7 +206,7 @@ void DecideAttack(Entity *pokemon)
|
|||
move->moveFlags & MOVE_FLAG_ENABLED_FOR_AI)
|
||||
{
|
||||
aiPossibleMove[i].canBeUsed = TRUE;
|
||||
if (pokemonInfo->charging.chargingStatus == chargeStatus)
|
||||
if (pokemonInfo->bideClassStatus.status == chargeStatus)
|
||||
{
|
||||
if (move->id == MOVE_CHARGE)
|
||||
{
|
||||
|
|
@ -235,10 +235,10 @@ void DecideAttack(Entity *pokemon)
|
|||
}
|
||||
}
|
||||
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 0;
|
||||
if (!IQSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) && pokemonInfo->charging.chargingStatus != chargeStatus)
|
||||
if (!IQSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) && pokemonInfo->bideClassStatus.status != chargeStatus)
|
||||
{
|
||||
aiPossibleMove[REGULAR_ATTACK_INDEX].canBeUsed = TRUE;
|
||||
if (pokemonInfo->charging.chargingStatus == chargeStatus)
|
||||
if (pokemonInfo->bideClassStatus.status == chargeStatus)
|
||||
{
|
||||
// Never reached? Charge already skips the regular attack in the outer block.
|
||||
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 1;
|
||||
|
|
@ -370,7 +370,7 @@ s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move
|
|||
targetingFlags = GetMoveTargetAndRangeForPokemon(pokemon, move, TRUE);
|
||||
hasStatusChecker = IQSkillIsEnabled(pokemon, IQ_STATUS_CHECKER);
|
||||
aiPossibleMove->canBeUsed = FALSE;
|
||||
if ((pokemonInfo->volatileStatus.volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move)) ||
|
||||
if ((pokemonInfo->cringeClassStatus.status == STATUS_TAUNTED && !MoveIgnoresTaunted(move)) ||
|
||||
(hasStatusChecker && !CanUseOnSelfWithStatusChecker(pokemon, move)))
|
||||
{
|
||||
return 1;
|
||||
|
|
@ -380,7 +380,7 @@ s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move
|
|||
rangeTargetingFlags == TARGETING_FLAG_TARGET_FRONTAL_CONE ||
|
||||
rangeTargetingFlags == TARGETING_FLAG_TARGET_AROUND)
|
||||
{
|
||||
if (pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||
if (pokemonInfo->blinkerClassStatus.status == STATUS_BLINKER)
|
||||
{
|
||||
u8 direction = pokemonInfo->action.direction;
|
||||
i = direction; // Fixes a regswap.
|
||||
|
|
@ -422,7 +422,7 @@ s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move
|
|||
s32 i;
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
Entity *target = gDungeon->allPokemon[i];
|
||||
Entity *target = gDungeon->activePokemon[i];
|
||||
if (EntityExists(target) && CanSeeTarget(pokemon, target))
|
||||
{
|
||||
numPotentialTargets = TryAddTargetToAITargetList(numPotentialTargets, targetingFlags, pokemon, target, move, hasStatusChecker);
|
||||
|
|
@ -467,7 +467,7 @@ s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move
|
|||
}
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
Entity *target = gDungeon->allPokemon[i];
|
||||
Entity *target = gDungeon->activePokemon[i];
|
||||
if (EntityExists(target) && pokemon != target)
|
||||
{
|
||||
s32 direction = GetDirectionTowardsPosition(&pokemon->pos, &target->pos);
|
||||
|
|
@ -491,7 +491,7 @@ s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move
|
|||
s32 i;
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
Entity *target = gDungeon->allPokemon[i];
|
||||
Entity *target = gDungeon->activePokemon[i];
|
||||
if (EntityExists(target))
|
||||
{
|
||||
numPotentialTargets = TryAddTargetToAITargetList(numPotentialTargets, targetingFlags, pokemon, target, move, hasStatusChecker);
|
||||
|
|
@ -674,8 +674,8 @@ bool8 IsAITargetEligible(s32 targetingFlags, Entity *user, Entity *target, Move
|
|||
checkThirdParty:
|
||||
hasTarget = TRUE;
|
||||
if (targetData->shopkeeper == SHOPKEEPER_MODE_SHOPKEEPER ||
|
||||
targetData->clientType == CLIENT_TYPE_DONT_MOVE ||
|
||||
targetData->clientType == CLIENT_TYPE_CLIENT)
|
||||
targetData->monsterBehavior == BEHAVIOR_DIGLETT ||
|
||||
targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET)
|
||||
{
|
||||
returnFalse:
|
||||
return FALSE;
|
||||
|
|
@ -805,7 +805,7 @@ bool8 TargetRegularAttack(Entity *pokemon, u32 *targetDir, bool8 checkPetrified)
|
|||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
s32 numPotentialTargets = 0;
|
||||
s32 direction = pokemonInfo->action.direction;
|
||||
s32 faceTurnLimit = pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER ? 1 : 8;
|
||||
s32 faceTurnLimit = pokemonInfo->blinkerClassStatus.status == STATUS_BLINKER ? 1 : 8;
|
||||
s32 i;
|
||||
s32 potentialAttackTargetDirections[NUM_DIRECTIONS];
|
||||
s32 potentialAttackTargetWeights[NUM_DIRECTIONS];
|
||||
|
|
@ -821,7 +821,7 @@ bool8 TargetRegularAttack(Entity *pokemon, u32 *targetDir, bool8 checkPetrified)
|
|||
GetEntityType(target) == ENTITY_MONSTER &&
|
||||
CanAttackInDirection(pokemon, direction) &&
|
||||
GetTreatmentBetweenMonsters(pokemon, target, FALSE, checkPetrified) == TREATMENT_TREAT_AS_ENEMY &&
|
||||
(!hasStatusChecker || GetEntInfo(target)->immobilize.immobilizeStatus != STATUS_FROZEN))
|
||||
(!hasStatusChecker || GetEntInfo(target)->frozenClassStatus.status != STATUS_FROZEN))
|
||||
{
|
||||
potentialAttackTargetDirections[numPotentialTargets] = direction;
|
||||
potentialAttackTargetWeights[numPotentialTargets] = WeightMove(pokemon, TARGETING_FLAG_TARGET_OTHER, target, TYPE_NONE);
|
||||
|
|
@ -988,14 +988,14 @@ void HandleUseOrbAction(Entity *pokemon)
|
|||
|
||||
if (item->flags & ITEM_FLAG_STICKY) {
|
||||
sub_8045BF8(gFormatBuffer_Items[0], item);
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gItemStickyDoesntWorkText);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gItemStickyDoesntWorkText);
|
||||
return;
|
||||
}
|
||||
|
||||
act = entityInfo->action;
|
||||
|
||||
if (IsBossFight()) {
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrMysteriousPowerPreventedUseMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrMysteriousPowerPreventedUseMessage);
|
||||
r4 = TRUE;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1013,22 +1013,22 @@ void HandleUseOrbAction(Entity *pokemon)
|
|||
}
|
||||
}
|
||||
|
||||
if (entityInfo->volatileStatus.volatileStatus == 1) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gUnknown_80FC714);
|
||||
if (entityInfo->cringeClassStatus.status == 1) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FC714);
|
||||
r4 = FALSE;
|
||||
r8 = FALSE;
|
||||
}
|
||||
else if (entityInfo->volatileStatus.volatileStatus == 7) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gUnknown_80FC718);
|
||||
else if (entityInfo->cringeClassStatus.status == 7) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FC718);
|
||||
r4 = FALSE;
|
||||
r8 = FALSE;
|
||||
}
|
||||
else if (entityInfo->nonVolatile.nonVolatileStatus == 4)
|
||||
else if (entityInfo->burnClassStatus.status == 4)
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gUnknown_80FC6A8);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FC6A8);
|
||||
r4 = FALSE;
|
||||
r8 = FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
}
|
||||
break;
|
||||
case ITEM_ALLURE_SEED:
|
||||
if (pokemonInfo->eyesightStatus.eyesightStatus != STATUS_CROSS_EYED)
|
||||
if (pokemonInfo->blinkerClassStatus.status != STATUS_CROSS_EYED)
|
||||
{
|
||||
if (IsAdjacentToEnemy(targetPokemon))
|
||||
{
|
||||
|
|
@ -219,7 +219,7 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
}
|
||||
break;
|
||||
case ITEM_CHERI_BERRY:
|
||||
if (pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS)
|
||||
if (pokemonInfo->burnClassStatus.status != STATUS_PARALYSIS)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
}
|
||||
break;
|
||||
case ITEM_TOTTER_SEED:
|
||||
if (pokemonInfo->volatileStatus.volatileStatus != STATUS_CONFUSED)
|
||||
if (pokemonInfo->cringeClassStatus.status != STATUS_CONFUSED)
|
||||
{
|
||||
if (IsAdjacentToEnemy(targetPokemon))
|
||||
{
|
||||
|
|
@ -250,8 +250,8 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
}
|
||||
break;
|
||||
case ITEM_PECHA_BERRY:
|
||||
if (pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_POISONED &&
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
if (pokemonInfo->burnClassStatus.status != STATUS_POISONED &&
|
||||
pokemonInfo->burnClassStatus.status != STATUS_BADLY_POISONED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -265,7 +265,7 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
}
|
||||
break;
|
||||
case ITEM_BLINKER_SEED:
|
||||
if (pokemonInfo->eyesightStatus.eyesightStatus != STATUS_BLINKER)
|
||||
if (pokemonInfo->blinkerClassStatus.status != STATUS_BLINKER)
|
||||
{
|
||||
if (IsAdjacentToEnemy(targetPokemon))
|
||||
{
|
||||
|
|
@ -316,9 +316,9 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
itemWeight = 40;
|
||||
break;
|
||||
case ITEM_SLEEP_SEED:
|
||||
if (pokemonInfo->sleep.sleep != STATUS_SLEEP &&
|
||||
pokemonInfo->sleep.sleep != STATUS_NAPPING &&
|
||||
pokemonInfo->sleep.sleep != STATUS_NIGHTMARE)
|
||||
if (pokemonInfo->sleepClassStatus.status != STATUS_SLEEP &&
|
||||
pokemonInfo->sleepClassStatus.status != STATUS_NAPPING &&
|
||||
pokemonInfo->sleepClassStatus.status != STATUS_NIGHTMARE)
|
||||
{
|
||||
if (IsAdjacentToEnemy(targetPokemon))
|
||||
{
|
||||
|
|
@ -335,7 +335,7 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
}
|
||||
break;
|
||||
case ITEM_CHESTO_BERRY:
|
||||
if (pokemonInfo->sleep.sleep != STATUS_SLEEPLESS)
|
||||
if (pokemonInfo->sleepClassStatus.status != STATUS_SLEEPLESS)
|
||||
{
|
||||
itemWeight = 5;
|
||||
}
|
||||
|
|
@ -358,7 +358,7 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
itemWeight = 80;
|
||||
break;
|
||||
case ITEM_RAWST_BERRY:
|
||||
if (pokemonInfo->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||
if (pokemonInfo->burnClassStatus.status == STATUS_BURN)
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
|
@ -388,7 +388,7 @@ u32 GetAIUseItemProbability(Entity *targetPokemon, Item *item, u32 itemTargetFla
|
|||
}
|
||||
break;
|
||||
case ITEM_STUN_SEED:
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
if (pokemonInfo->frozenClassStatus.status == STATUS_PETRIFIED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void sub_807360C(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if(EntityExists(entity))
|
||||
{
|
||||
if(GetEntInfo(entity)->unk152 != 0)
|
||||
|
|
@ -281,7 +281,7 @@ void GetPossibleAIThrownItemDirections(Entity *pokemon, s32 thrownAIFlag, Item *
|
|||
}
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
Entity *targetPokemon = gDungeon->allPokemon[i];
|
||||
Entity *targetPokemon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(targetPokemon) && pokemon != targetPokemon)
|
||||
{
|
||||
s32 targetingFlags;
|
||||
|
|
@ -318,7 +318,7 @@ void GetPossibleAIArcItemTargets(Entity *pokemon, Item *item, Position potential
|
|||
gAIThrowItemActionChoiceCount = 0;
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
Entity *targetPokemon = gDungeon->allPokemon[i];
|
||||
Entity *targetPokemon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(targetPokemon) && pokemon != targetPokemon &&
|
||||
CanSeeTarget(pokemon, targetPokemon) && GetTreatmentBetweenMonsters(pokemon, targetPokemon, FALSE, TRUE) == TREATMENT_TREAT_AS_ENEMY)
|
||||
{
|
||||
|
|
@ -366,7 +366,7 @@ void TargetThrownItem(Entity *pokemon, Entity *targetPokemon, Item *item, s32 ta
|
|||
distanceX = distanceX < 0 ? -distanceX : distanceX;
|
||||
distanceY = pokemon->pos.y - targetPokemon->pos.y;
|
||||
distanceY = distanceY < 0 ? -distanceY : distanceY;
|
||||
if (GetEntInfo(pokemon)->itemStatus.itemStatus == STATUS_NONE)
|
||||
if (GetEntInfo(pokemon)->longTossClassStatus.status == STATUS_NONE)
|
||||
{
|
||||
s32 distance = distanceY < distanceX ? distanceX : distanceY;
|
||||
if (distance > RANGED_ATTACK_RANGE)
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ Entity* GetLeaderIfVisible(Entity *pokemon)
|
|||
{
|
||||
Entity *leader = GetLeader();
|
||||
if (leader &&
|
||||
GetEntInfo(leader)->waitingStruct.waitingStatus != STATUS_DECOY &&
|
||||
GetEntInfo(leader)->curseClassStatus.status != STATUS_DECOY &&
|
||||
GetTreatmentBetweenMonsters(pokemon, leader, FALSE, FALSE) == TREATMENT_TREAT_AS_ALLY &&
|
||||
CanTargetEntity(pokemon, leader))
|
||||
{
|
||||
|
|
@ -169,23 +169,23 @@ bool8 sub_8072CF4(Entity *entity)
|
|||
gUnknown_202F222 = 0;
|
||||
switch(info->action.action) {
|
||||
case ACTION_WALK:
|
||||
if(info->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||
if(info->frozenClassStatus.status == STATUS_SHADOW_HOLD)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_CONSTRICTION)
|
||||
else if(info->frozenClassStatus.status == STATUS_CONSTRICTION)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_INGRAIN)
|
||||
else if(info->frozenClassStatus.status == STATUS_INGRAIN)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||
else if(info->frozenClassStatus.status == STATUS_WRAP)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_WRAPPED)
|
||||
else if(info->frozenClassStatus.status == STATUS_WRAPPED)
|
||||
{
|
||||
_282:
|
||||
info->action.action = ACTION_NOTHING;
|
||||
|
|
@ -210,7 +210,7 @@ bool8 sub_8072CF4(Entity *entity)
|
|||
pos.y = entity->pos.y;
|
||||
sub_80694C0(entity,pos1.x,pos1.y,0);
|
||||
sub_8074FB0(entity,(info->action).direction,&pos);
|
||||
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->transformStatus.transformStatus != STATUS_MOBILE)) &&
|
||||
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->invisibleClassStatus.status != STATUS_MOBILE)) &&
|
||||
(!HasHeldItem(entity,ITEM_MOBILE_SCARF))) {
|
||||
sub_804AE08(&entity->pos);
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ bool8 sub_8072CF4(Entity *entity)
|
|||
break;
|
||||
case ACTION_STAIRS:
|
||||
if ((gDungeon->unk644.dungeonLocation.id == DUNGEON_METEOR_CAVE) && (!gDungeon->deoxysDefeat)) {
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80FA5B4); // It's impossible to go down the stairs now!
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80FA5B4); // It's impossible to go down the stairs now!
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -282,8 +282,8 @@ bool8 sub_8072CF4(Entity *entity)
|
|||
sub_80671A0(entity);
|
||||
break;
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],entity,0);
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80FE6D4);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80FE6D4);
|
||||
break;
|
||||
case ACTION_TALK_FIELD:
|
||||
HandleTalkFieldAction(entity);
|
||||
|
|
@ -310,8 +310,8 @@ bool8 sub_8072CF4(Entity *entity)
|
|||
HandleThrowItemAIAction(entity);
|
||||
break;
|
||||
case ACTION_SECOND_THOUGHTS:
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],entity,0);
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80FE478);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80FE478);
|
||||
break;
|
||||
default:
|
||||
info->action.action = ACTION_PASS_TURN;
|
||||
|
|
@ -339,7 +339,7 @@ bool8 sub_8072CF4(Entity *entity)
|
|||
}
|
||||
}
|
||||
if (bVar4) {
|
||||
TryDisplayDungeonLoggableMessage(entity,*gUnknown_80FD2CC);
|
||||
LogMessageByIdWithPopupCheckUser(entity,*gUnknown_80FD2CC);
|
||||
}
|
||||
}
|
||||
sub_807360C();
|
||||
|
|
@ -358,7 +358,7 @@ bool8 sub_8072CF4(Entity *entity)
|
|||
sub_8046D20();
|
||||
}
|
||||
sub_8041888(0);
|
||||
if (((EntityExists(entity)) && (!info->aiNextToTarget)) && (!bVar14)) {
|
||||
if (((EntityExists(entity)) && (!info->aiAllySkip)) && (!bVar14)) {
|
||||
if (sub_80706A4(entity,&entity->pos) != '\0') {
|
||||
sub_807D148(entity,entity,0,0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ struct CanMoveInDirectionInfo
|
|||
|
||||
const s32 gFaceDirectionIncrements[] = {0, 1, -1, 2, -2, 3, -3, 4, 0, -1, 1, -2, 2, -3, 3, 4};
|
||||
|
||||
void MoveIfPossible(Entity *pokemon, bool8 showRunAwayEffect)
|
||||
void AIMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
||||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
pokemonInfo->aiTarget.aiNotNextToTarget = FALSE;
|
||||
|
|
@ -67,7 +67,7 @@ void MoveIfPossible(Entity *pokemon, bool8 showRunAwayEffect)
|
|||
{
|
||||
pokemonInfo->action.action = ACTION_NOTHING;
|
||||
}
|
||||
else if (pokemonInfo->clientType == CLIENT_TYPE_CLIENT)
|
||||
else if (pokemonInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||
|
|
@ -148,9 +148,9 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||
bool8 canCrossWalls;
|
||||
s32 targetDistance;
|
||||
s32 i;
|
||||
if (gDungeon->decoyActive)
|
||||
if (gDungeon->decoyIsActive)
|
||||
{
|
||||
possibleTargets = gDungeon->allPokemon;
|
||||
possibleTargets = gDungeon->activePokemon;
|
||||
maxPossibleTargets = DUNGEON_MAX_POKEMON;
|
||||
}
|
||||
else if (pokemonInfo->isNotTeamMember)
|
||||
|
|
@ -169,16 +169,16 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||
for (i = 0; i < maxPossibleTargets; i++)
|
||||
{
|
||||
Entity *target = possibleTargets[i];
|
||||
if (EntityExists(target) && GetEntInfo(target)->clientType == CLIENT_TYPE_NONE)
|
||||
if (EntityExists(target) && GetEntInfo(target)->monsterBehavior == BEHAVIOR_FIXED_ENEMY)
|
||||
{
|
||||
if (gDungeon->decoyActive)
|
||||
if (gDungeon->decoyIsActive)
|
||||
{
|
||||
if (GetTreatmentBetweenMonsters(pokemon, target, FALSE, TRUE) != TREATMENT_TREAT_AS_ENEMY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (!pokemonInfo->isNotTeamMember && GetEntInfo(target)->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
else if (!pokemonInfo->isNotTeamMember && GetEntInfo(target)->frozenClassStatus.status == STATUS_PETRIFIED)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -405,7 +405,7 @@ void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
|||
if (!pokemonInfo->isNotTeamMember && !pokemonInfo->recalculateFollow)
|
||||
{
|
||||
pokemonInfo->aiTarget.aiNotNextToTarget = TRUE;
|
||||
pokemonInfo->aiNextToTarget = TRUE;
|
||||
pokemonInfo->aiAllySkip = TRUE;
|
||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||
pokemonInfo->waiting = TRUE;
|
||||
return;
|
||||
|
|
@ -492,11 +492,11 @@ void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
|||
if (pokemonInfo->isTeamLeader)
|
||||
{
|
||||
pokemonInfo->aiTarget.aiNotNextToTarget = FALSE;
|
||||
pokemonInfo->aiNextToTarget = FALSE;
|
||||
pokemonInfo->aiAllySkip = FALSE;
|
||||
}
|
||||
else if (pokemonInfo->aiTarget.aiNotNextToTarget)
|
||||
{
|
||||
pokemonInfo->aiNextToTarget = TRUE;
|
||||
pokemonInfo->aiAllySkip = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -511,9 +511,9 @@ bool8 AvoidEnemies(Entity *pokemon)
|
|||
Entity **possibleTargets;
|
||||
s32 numPossibleTargets;
|
||||
s32 i;
|
||||
if (gDungeon->decoyActive)
|
||||
if (gDungeon->decoyIsActive)
|
||||
{
|
||||
possibleTargets = gDungeon->allPokemon;
|
||||
possibleTargets = gDungeon->activePokemon;
|
||||
numPossibleTargets = DUNGEON_MAX_POKEMON;
|
||||
}
|
||||
else if (pokemonInfo->isNotTeamMember)
|
||||
|
|
@ -534,7 +534,7 @@ bool8 AvoidEnemies(Entity *pokemon)
|
|||
if (EntityExists(target) && CanSeeTarget(pokemon, target))
|
||||
{
|
||||
s32 distance;
|
||||
if (gDungeon->decoyActive && GetTreatmentBetweenMonsters(pokemon, target, FALSE, TRUE) != TREATMENT_TREAT_AS_ENEMY)
|
||||
if (gDungeon->decoyIsActive && GetTreatmentBetweenMonsters(pokemon, target, FALSE, TRUE) != TREATMENT_TREAT_AS_ENEMY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ bool8 sub_8070F3C(Entity * pokemon, Position *pos, s32 direction)
|
|||
(((tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))))) {
|
||||
if (!IsCurrentFixedRoomBossFight())
|
||||
{
|
||||
if (GetEntInfo(pokemon)->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||
if (GetEntInfo(pokemon)->invisibleClassStatus.status == STATUS_MOBILE ||
|
||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
{
|
||||
terrain = CROSSABLE_TERRAIN_WALL;
|
||||
|
|
@ -137,7 +137,7 @@ bool8 sub_8070F80(Entity * pokemon, s32 direction)
|
|||
(((tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))))) {
|
||||
if (!IsCurrentFixedRoomBossFight())
|
||||
{
|
||||
if (GetEntInfo(pokemon)->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||
if (GetEntInfo(pokemon)->invisibleClassStatus.status == STATUS_MOBILE ||
|
||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
{
|
||||
terrain = CROSSABLE_TERRAIN_WALL;
|
||||
|
|
@ -183,7 +183,7 @@ bool8 sub_8071058(Entity * pokemon, s32 direction)
|
|||
(!GetEntInfo(tile->monster)->isNotTeamMember)))) {
|
||||
if (!IsCurrentFixedRoomBossFight())
|
||||
{
|
||||
if (GetEntInfo(pokemon)->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||
if (GetEntInfo(pokemon)->invisibleClassStatus.status == STATUS_MOBILE ||
|
||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
{
|
||||
terrain = CROSSABLE_TERRAIN_WALL;
|
||||
|
|
@ -230,7 +230,7 @@ bool8 CanAttackInDirection(Entity *pokemon, s32 direction)
|
|||
{
|
||||
if (!IsCurrentFixedRoomBossFight())
|
||||
{
|
||||
if (GetEntInfo(pokemon)->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||
if (GetEntInfo(pokemon)->invisibleClassStatus.status == STATUS_MOBILE ||
|
||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
{
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
|
|
@ -282,7 +282,7 @@ bool8 CanAIMonsterMoveInDirection(Entity *pokemon, s32 direction, bool8 *pokemon
|
|||
if (frontTile->object != NULL &&
|
||||
IQSkillIsEnabled(pokemon, IQ_TRAP_AVOIDER) &&
|
||||
GetEntityType(frontTile->object) == ENTITY_TRAP &&
|
||||
(frontTile->object->isVisible || GetEntInfo(pokemon)->eyesightStatus.eyesightStatus == STATUS_EYEDROPS))
|
||||
(frontTile->object->isVisible || GetEntInfo(pokemon)->blinkerClassStatus.status == STATUS_EYEDROPS))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -294,7 +294,7 @@ bool8 CanAIMonsterMoveInDirection(Entity *pokemon, s32 direction, bool8 *pokemon
|
|||
}
|
||||
if (!IsCurrentFixedRoomBossFight())
|
||||
{
|
||||
if (GetEntInfo(pokemon)->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||
if (GetEntInfo(pokemon)->invisibleClassStatus.status == STATUS_MOBILE ||
|
||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
{
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
|
|
@ -337,7 +337,7 @@ bool8 IsAtJunction(Entity *pokemon)
|
|||
u32 crossableTerrain = GetCrossableTerrain(GetEntInfo(pokemon)->id);
|
||||
if (!IsCurrentFixedRoomBossFight())
|
||||
{
|
||||
if (GetEntInfo(pokemon)->transformStatus.transformStatus == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
if (GetEntInfo(pokemon)->invisibleClassStatus.status == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
{
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
|
|
@ -462,7 +462,7 @@ u8 GetTreatmentBetweenMonsters(Entity *pokemon, Entity *targetPokemon, bool8 ign
|
|||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
EntityInfo *targetData = GetEntInfo(targetPokemon);
|
||||
u8 targetingDecoy;
|
||||
u8 decoyAITracker;
|
||||
u8 pokemonTargetingDecoy;
|
||||
bool8 pokemonIsEnemy;
|
||||
bool8 targetIsEnemy;
|
||||
|
|
@ -473,23 +473,23 @@ u8 GetTreatmentBetweenMonsters(Entity *pokemon, Entity *targetPokemon, bool8 ign
|
|||
}
|
||||
if (pokemonInfo->shopkeeper == SHOPKEEPER_MODE_SHOPKEEPER ||
|
||||
targetData->shopkeeper == SHOPKEEPER_MODE_SHOPKEEPER ||
|
||||
pokemonInfo->clientType == CLIENT_TYPE_DONT_MOVE ||
|
||||
targetData->clientType == CLIENT_TYPE_DONT_MOVE ||
|
||||
pokemonInfo->clientType == CLIENT_TYPE_CLIENT ||
|
||||
targetData->clientType == CLIENT_TYPE_CLIENT ||
|
||||
(checkPetrified && !pokemonInfo->isNotTeamMember && targetData->immobilize.immobilizeStatus == STATUS_PETRIFIED) ||
|
||||
(!ignoreInvisible && targetData->transformStatus.transformStatus == STATUS_INVISIBLE && !CanSeeInvisibleMonsters(pokemon)))
|
||||
pokemonInfo->monsterBehavior == BEHAVIOR_DIGLETT ||
|
||||
targetData->monsterBehavior == BEHAVIOR_DIGLETT ||
|
||||
pokemonInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET ||
|
||||
targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET ||
|
||||
(checkPetrified && !pokemonInfo->isNotTeamMember && targetData->frozenClassStatus.status == STATUS_PETRIFIED) ||
|
||||
(!ignoreInvisible && targetData->invisibleClassStatus.status == STATUS_INVISIBLE && !CanSeeInvisibleMonsters(pokemon)))
|
||||
{
|
||||
return TREATMENT_IGNORE;
|
||||
}
|
||||
pokemonTargetingDecoy = pokemonInfo->targetingDecoy;
|
||||
targetingDecoy = TARGETING_DECOY_NONE;
|
||||
if (pokemonTargetingDecoy != TARGETING_DECOY_NONE)
|
||||
pokemonTargetingDecoy = pokemonInfo->decoyAITracker;
|
||||
decoyAITracker = DECOY_AI_NONE;
|
||||
if (pokemonTargetingDecoy != DECOY_AI_NONE)
|
||||
{
|
||||
targetingDecoy = TARGETING_DECOY_WILD;
|
||||
if (pokemonTargetingDecoy == TARGETING_DECOY_TEAM)
|
||||
decoyAITracker = DECOY_AI_WILD;
|
||||
if (pokemonTargetingDecoy == DECOY_AI_TEAM)
|
||||
{
|
||||
targetingDecoy = TARGETING_DECOY_TEAM;
|
||||
decoyAITracker = DECOY_AI_TEAM;
|
||||
}
|
||||
}
|
||||
if (pokemonInfo->shopkeeper != SHOPKEEPER_MODE_NORMAL)
|
||||
|
|
@ -517,11 +517,11 @@ u8 GetTreatmentBetweenMonsters(Entity *pokemon, Entity *targetPokemon, bool8 ign
|
|||
targetIsEnemy = targetData->isNotTeamMember ? TRUE : FALSE;
|
||||
}
|
||||
targetIsDecoy = FALSE;
|
||||
if (targetData->waitingStruct.waitingStatus == STATUS_DECOY)
|
||||
if (targetData->curseClassStatus.status == STATUS_DECOY)
|
||||
{
|
||||
targetIsDecoy = TRUE;
|
||||
}
|
||||
return gTreatmentData[targetingDecoy][pokemonIsEnemy][targetIsEnemy][targetIsDecoy];
|
||||
return gTreatmentData[decoyAITracker][pokemonIsEnemy][targetIsEnemy][targetIsDecoy];
|
||||
}
|
||||
|
||||
u8 sub_807167C(Entity * pokemon, Entity * target)
|
||||
|
|
@ -532,9 +532,9 @@ u8 sub_807167C(Entity * pokemon, Entity * target)
|
|||
|
||||
pokemonEntityData = GetEntInfo(pokemon);
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
if (pokemonEntityData->clientType != CLIENT_TYPE_CLIENT) {
|
||||
if (pokemonEntityData->monsterBehavior != BEHAVIOR_RESCUE_TARGET) {
|
||||
cannotUseItems = IsClientOrTeamBase(pokemonEntityData->joinedAt.joinedAt);
|
||||
if (!cannotUseItems && (pokemonEntityData->shopkeeper == SHOPKEEPER_MODE_NORMAL) && (targetEntityInfo->clientType != CLIENT_TYPE_CLIENT)) {
|
||||
if (!cannotUseItems && (pokemonEntityData->shopkeeper == SHOPKEEPER_MODE_NORMAL) && (targetEntityInfo->monsterBehavior != BEHAVIOR_RESCUE_TARGET)) {
|
||||
cannotUseItems = IsClientOrTeamBase(targetEntityInfo->joinedAt.joinedAt);
|
||||
if (cannotUseItems || (targetEntityInfo->shopkeeper != SHOPKEEPER_MODE_NORMAL)) {
|
||||
error:
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ bool8 CheckVariousStatuses2(Entity *pokemon, bool8 checkBlinker)
|
|||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
|
||||
if ((checkBlinker && pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER))
|
||||
if ((checkBlinker && pokemonInfo->blinkerClassStatus.status == STATUS_BLINKER))
|
||||
return TRUE;
|
||||
if (pokemonInfo->sleep.sleep == STATUS_SLEEP || pokemonInfo->sleep.sleep == STATUS_NAPPING || pokemonInfo->sleep.sleep == STATUS_NIGHTMARE)
|
||||
if (pokemonInfo->sleepClassStatus.status == STATUS_SLEEP || pokemonInfo->sleepClassStatus.status == STATUS_NAPPING || pokemonInfo->sleepClassStatus.status == STATUS_NIGHTMARE)
|
||||
return TRUE;
|
||||
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_PAUSED || pokemonInfo->volatileStatus.volatileStatus == STATUS_INFATUATED)
|
||||
if (pokemonInfo->cringeClassStatus.status == STATUS_PAUSED || pokemonInfo->cringeClassStatus.status == STATUS_INFATUATED)
|
||||
return TRUE;
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
if (pokemonInfo->frozenClassStatus.status == STATUS_PETRIFIED)
|
||||
return TRUE;
|
||||
if (pokemonInfo->terrifiedTurns != 0)
|
||||
return TRUE;
|
||||
|
|
@ -43,34 +43,34 @@ bool8 sub_8070BC0(Entity* entity)
|
|||
EntityInfo *entityInfo = GetEntInfo(entity);
|
||||
|
||||
if (IsChargingAnyTwoTurnMove(entity, FALSE)
|
||||
|| entityInfo->sleep.sleep == STATUS_YAWNING
|
||||
|| entityInfo->sleep.sleep == STATUS_NIGHTMARE
|
||||
|| entityInfo->sleepClassStatus.status == STATUS_YAWNING
|
||||
|| entityInfo->sleepClassStatus.status == STATUS_NIGHTMARE
|
||||
|| ShouldMonsterRunAway(entity)
|
||||
|| entityInfo->muzzled.muzzled == TRUE
|
||||
|| entityInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED
|
||||
|| entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN)
|
||||
|| entityInfo->frozenClassStatus.status == STATUS_PETRIFIED
|
||||
|| entityInfo->frozenClassStatus.status == STATUS_FROZEN)
|
||||
return FALSE;
|
||||
|
||||
if (entityInfo->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||
if (entityInfo->cringeClassStatus.status == STATUS_CONFUSED)
|
||||
return FALSE;
|
||||
if (entityInfo->sleep.sleep == STATUS_SLEEP)
|
||||
if (entityInfo->sleepClassStatus.status == STATUS_SLEEP)
|
||||
return FALSE;
|
||||
if (entityInfo->transformStatus.transformStatus == STATUS_INVISIBLE
|
||||
|| entityInfo->sleep.sleep == STATUS_NAPPING)
|
||||
if (entityInfo->invisibleClassStatus.status == STATUS_INVISIBLE
|
||||
|| entityInfo->sleepClassStatus.status == STATUS_NAPPING)
|
||||
return FALSE;
|
||||
if (entityInfo->volatileStatus.volatileStatus == STATUS_CRINGE)
|
||||
if (entityInfo->cringeClassStatus.status == STATUS_CRINGE)
|
||||
return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAP)
|
||||
return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED
|
||||
|| entityInfo->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED)
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAPPED
|
||||
|| entityInfo->blinkerClassStatus.status == STATUS_CROSS_EYED)
|
||||
return FALSE;
|
||||
if (entityInfo->waitingStruct.waitingStatus == STATUS_DECOY)
|
||||
if (entityInfo->curseClassStatus.status == STATUS_DECOY)
|
||||
return FALSE;
|
||||
if (entityInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||
if (entityInfo->blinkerClassStatus.status == STATUS_BLINKER)
|
||||
return FALSE;
|
||||
if (entityInfo->volatileStatus.volatileStatus != STATUS_INFATUATED
|
||||
&& entityInfo->volatileStatus.volatileStatus != STATUS_PAUSED)
|
||||
if (entityInfo->cringeClassStatus.status != STATUS_INFATUATED
|
||||
&& entityInfo->cringeClassStatus.status != STATUS_PAUSED)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
|
@ -80,7 +80,7 @@ bool8 CheckVariousConditions(Entity *pokemon)
|
|||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
|
||||
if (pokemonInfo->clientType == CLIENT_TYPE_CLIENT
|
||||
if (pokemonInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET
|
||||
|| IsClientOrTeamBase(pokemonInfo->joinedAt.joinedAt)
|
||||
|| (!pokemonInfo->isTeamLeader && ShouldMonsterRunAway(pokemon))
|
||||
|| CheckVariousStatuses2(pokemon, FALSE)
|
||||
|
|
@ -97,11 +97,11 @@ bool8 CheckVariousStatuses(Entity *pokemon)
|
|||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
|
||||
if ((pokemonInfo->sleep.sleep != STATUS_SLEEPLESS && pokemonInfo->sleep.sleep != STATUS_NONE))
|
||||
if ((pokemonInfo->sleepClassStatus.status != STATUS_SLEEPLESS && pokemonInfo->sleepClassStatus.status != STATUS_NONE))
|
||||
return TRUE;
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_FROZEN || pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
if (pokemonInfo->frozenClassStatus.status == STATUS_FROZEN || pokemonInfo->frozenClassStatus.status == STATUS_PETRIFIED)
|
||||
return TRUE;
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||
if (pokemonInfo->bideClassStatus.status == STATUS_BIDE)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
|
@ -112,17 +112,17 @@ bool8 CannotAttack(Entity *pokemon, bool8 skipSleep)
|
|||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
|
||||
if ((skipSleep ||
|
||||
pokemonInfo->sleep.sleep == STATUS_SLEEPLESS ||
|
||||
pokemonInfo->sleep.sleep == STATUS_YAWNING ||
|
||||
pokemonInfo->sleep.sleep == STATUS_NONE) &&
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_FROZEN &&
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_WRAP &&
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_WRAPPED &&
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_PETRIFIED &&
|
||||
pokemonInfo->volatileStatus.volatileStatus != STATUS_CRINGE &&
|
||||
pokemonInfo->volatileStatus.volatileStatus != STATUS_PAUSED &&
|
||||
pokemonInfo->volatileStatus.volatileStatus != STATUS_INFATUATED &&
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS &&
|
||||
pokemonInfo->sleepClassStatus.status == STATUS_SLEEPLESS ||
|
||||
pokemonInfo->sleepClassStatus.status == STATUS_YAWNING ||
|
||||
pokemonInfo->sleepClassStatus.status == STATUS_NONE) &&
|
||||
pokemonInfo->frozenClassStatus.status != STATUS_FROZEN &&
|
||||
pokemonInfo->frozenClassStatus.status != STATUS_WRAP &&
|
||||
pokemonInfo->frozenClassStatus.status != STATUS_WRAPPED &&
|
||||
pokemonInfo->frozenClassStatus.status != STATUS_PETRIFIED &&
|
||||
pokemonInfo->cringeClassStatus.status != STATUS_CRINGE &&
|
||||
pokemonInfo->cringeClassStatus.status != STATUS_PAUSED &&
|
||||
pokemonInfo->cringeClassStatus.status != STATUS_INFATUATED &&
|
||||
pokemonInfo->burnClassStatus.status != STATUS_PARALYSIS &&
|
||||
!ShouldMonsterRunAway(pokemon))
|
||||
return FALSE;
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ bool8 CanMoveInDirection(Entity *pokemon, u32 direction)
|
|||
|
||||
if (!IsCurrentFixedRoomBossFight())
|
||||
{
|
||||
if (GetEntInfo(pokemon)->transformStatus.transformStatus == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
if (GetEntInfo(pokemon)->invisibleClassStatus.status == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
else if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER))
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -182,7 +182,7 @@ static void sub_8044454(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if ((EntityExists(entity)) && (entityInfo = GetEntInfo(entity), (entityInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY))) {
|
||||
if (sub_8044B28()) break;
|
||||
TickStatusHeal(entity);
|
||||
|
|
@ -210,7 +210,7 @@ void sub_80444F4(Entity *pokemon)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if ((EntityExists(entity)) && (pokemon != entity) && (entityInfo = GetEntInfo(entity), (entityInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY))) {
|
||||
if (sub_8044B28()) break;
|
||||
RunMonsterAI(entity, 0);
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ void MusicBoxCreation(void)
|
|||
sub_80416E0(&entity->pixelPos,0x10c,FALSE);
|
||||
sub_80421C0(entity,0xd7);
|
||||
sub_803E708(0x3c,0x41);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],entity,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
|
||||
DisplayDungeonMessage(0,*gUnknown_81053A8,1);
|
||||
sub_803E708(10,0x41);
|
||||
PlaySoundEffect(0xd4);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ void sub_805229C(void)
|
|||
return sub_80526D0(0x50);
|
||||
}
|
||||
|
||||
void TryDisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str)
|
||||
void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str)
|
||||
{
|
||||
if (sub_8045888(pokemon)){
|
||||
DisplayMessageAddToLog(pokemon, str, TRUE);
|
||||
|
|
@ -624,7 +624,7 @@ s32 DisplayDungeonMenuMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const
|
|||
void sub_8052D44(s16 *ids, Entity *leader, Entity *partner)
|
||||
{
|
||||
if (EntityExists(leader)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], leader, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], leader, 0);
|
||||
ids[0] = GetEntInfo(leader)->apparentID;
|
||||
}
|
||||
else {
|
||||
|
|
@ -633,7 +633,7 @@ void sub_8052D44(s16 *ids, Entity *leader, Entity *partner)
|
|||
}
|
||||
|
||||
if (EntityExists(partner)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], partner, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], partner, 0);
|
||||
ids[1] = GetEntInfo(partner)->apparentID;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -513,12 +513,12 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
|
|||
sub_806A1E8(currTarget);
|
||||
TrySendImmobilizeSleepEndMsg(attacker, currTarget);
|
||||
r4 = FALSE;
|
||||
if (!MoveMatchesChargingStatus(attacker, move)) {
|
||||
if (!MoveMatchesBideClassStatus(attacker, move)) {
|
||||
r4 = (MoveRequiresCharging(attacker, move->id) != 0);
|
||||
}
|
||||
|
||||
if (!lightRodRedirect) {
|
||||
if (targetInfo->protection.protectionStatus == STATUS_MAGIC_COAT) {
|
||||
if (targetInfo->reflectClassStatus.status == STATUS_MAGIC_COAT) {
|
||||
if (IsReflectedByMagicCoat(moveId) && sub_8055988(attacker, currTarget)) {
|
||||
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC52C); // The target~27s Magic Coat bounced it back!
|
||||
sub_8041B48(currTarget);
|
||||
|
|
@ -529,7 +529,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
|
|||
moveRedirected = TRUE;
|
||||
}
|
||||
}
|
||||
else if (targetInfo->protection.protectionStatus == STATUS_MIRROR_MOVE) {
|
||||
else if (targetInfo->reflectClassStatus.status == STATUS_MIRROR_MOVE) {
|
||||
s32 target = GetMoveTargetAndRangeForPokemon(attacker, move, FALSE);
|
||||
if (moveId != MOVE_REGULAR_ATTACK
|
||||
&& moveId != MOVE_PROJECTILE
|
||||
|
|
@ -548,11 +548,11 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
|
|||
}
|
||||
}
|
||||
if (!lightRodRedirect) {
|
||||
if (targetInfo->protection.protectionStatus == STATUS_PROTECT) {
|
||||
if (targetInfo->reflectClassStatus.status == STATUS_PROTECT) {
|
||||
s16 targetFlags = GetMoveTargetAndRangeForPokemon(attacker, move, FALSE);
|
||||
s32 targetFlagsAnd = targetFlags & 0xF;
|
||||
if ((targetFlagsAnd == 0 || targetFlagsAnd == 4 || targetFlagsAnd == 5 || targetFlagsAnd == 2) && !r4) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], currTarget, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], currTarget, 0);
|
||||
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC574); // protected itself!
|
||||
moveHits = FALSE;
|
||||
}
|
||||
|
|
@ -565,7 +565,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
|
|||
|
||||
if (moveHits) {
|
||||
if (HasAbility(currTarget, ABILITY_SOUNDPROOF) && IsSoundMove(move)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], currTarget, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], currTarget, 0);
|
||||
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_8100524); // Soundproof suppressed the sound move!
|
||||
moveHits = FALSE;
|
||||
}
|
||||
|
|
@ -1804,19 +1804,19 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
|||
|
||||
attackerInfo->abilityEffectFlags = 0;
|
||||
attackerInfo->unk159 = 0;
|
||||
if (attackerInfo->volatileStatus.volatileStatus == STATUS_CRINGE) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC714); // is cringing!
|
||||
if (attackerInfo->cringeClassStatus.status == STATUS_CRINGE) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC714); // is cringing!
|
||||
return FALSE;
|
||||
}
|
||||
else if (attackerInfo->volatileStatus.volatileStatus == STATUS_INFATUATED) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC718); // is infatuated!
|
||||
else if (attackerInfo->cringeClassStatus.status == STATUS_INFATUATED) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC718); // is infatuated!
|
||||
return FALSE;
|
||||
}
|
||||
else if (attackerInfo->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC6A8); // is paralyzed!
|
||||
else if (attackerInfo->burnClassStatus.status == STATUS_PARALYSIS) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6A8); // is paralyzed!
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1860,7 +1860,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
|||
if (MoveFlagExists(currMove)) {
|
||||
bool32 moveUsable = TRUE;
|
||||
bool32 var_28 = FALSE;
|
||||
bool32 statusMoveMatch = MoveMatchesChargingStatus(attacker, currMove);
|
||||
bool32 statusMoveMatch = MoveMatchesBideClassStatus(attacker, currMove);
|
||||
|
||||
if (currMove->PP != 0) {
|
||||
if (!statusMoveMatch) {
|
||||
|
|
@ -1870,7 +1870,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
|||
else {
|
||||
if (!statusMoveMatch) {
|
||||
sub_80928C0(gFormatBuffer_Items[0], currMove, NULL);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80F93C8); // The move can't be used!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80F93C8); // The move can't be used!
|
||||
moveUsable = FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1885,7 +1885,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
|||
|
||||
assistMove.id = sub_8057144(attacker);
|
||||
sub_80928C0(gFormatBuffer_Items[0], &assistMove, NULL);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FD2DC); // Assist:
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist:
|
||||
moveWasUsed = TryUseChosenMove(attacker, var_34, itemId, arg_0, isLinkedMove, &assistMove);
|
||||
}
|
||||
else {
|
||||
|
|
@ -1903,10 +1903,10 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
|||
|
||||
if (unkBefore == gUnknown_202F208) {
|
||||
if (itemId == 0) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC690); // The currMove failed!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC690); // The currMove failed!
|
||||
}
|
||||
else {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC6A4); // The Orb failed!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6A4); // The Orb failed!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1935,7 +1935,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
|
|||
assistMove.id = sub_8057144(attacker);
|
||||
movePtr = &assistMove;
|
||||
sub_80928C0(gFormatBuffer_Items[0], &assistMove, NULL);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FD2DC); // Assist:
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist:
|
||||
}
|
||||
TryUseChosenMove(attacker, 0, itemId, arg_0, isLinkedMove, movePtr);
|
||||
}
|
||||
|
|
@ -1966,48 +1966,48 @@ static void TriggerTargetAbilityEffect(Entity *attacker)
|
|||
EntityInfo *entInfo = GetEntInfo(attacker);
|
||||
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_ARENA_TRAP) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEEA4); // Arena Trap prevents movement!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEA4); // Arena Trap prevents movement!
|
||||
ImmobilizedStatusTarget(attacker, attacker);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_SHADOW_TAG) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEEC8); // Shadow Tag prevents movement!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEC8); // Shadow Tag prevents movement!
|
||||
ImmobilizedStatusTarget(attacker, attacker);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_MAGNET_PULL) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEEEC); // Magnet Pull prevents movement!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEEC); // Magnet Pull prevents movement!
|
||||
ImmobilizedStatusTarget(attacker, attacker);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_STATIC) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEF0C); // Static caused paralysis!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF0C); // Static caused paralysis!
|
||||
ParalyzeStatusTarget(attacker, attacker, TRUE);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_PRLZ) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEF30); // Effect Spore scattered spores
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF30); // Effect Spore scattered spores
|
||||
ParalyzeStatusTarget(attacker, attacker, TRUE);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_POISON_POINT) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEF4C); // Poison Point struck!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF4C); // Poison Point struck!
|
||||
PoisonedStatusTarget(attacker, attacker, TRUE);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_PSN) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEF50); // Effect Spore scattered spores!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF50); // Effect Spore scattered spores!
|
||||
PoisonedStatusTarget(attacker, attacker, TRUE);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_SLP) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEF54); // Effect Spore scattered spores!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF54); // Effect Spore scattered spores!
|
||||
sub_8075C58(attacker, attacker, CalculateStatusTurns(attacker, gUnknown_80F4E74, TRUE), TRUE);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_FLAME_BODY) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEF74); // Flame Body caused a burn!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF74); // Flame Body caused a burn!
|
||||
BurnedStatusTarget(attacker, attacker, TRUE, TRUE);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_CUTE_CHARM) {
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEF98); // Cute Charm caused infatuation
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF98); // Cute Charm caused infatuation
|
||||
InfatuateStatusTarget(attacker, attacker, TRUE);
|
||||
}
|
||||
if (entInfo->abilityEffectFlags & ABILITY_FLAG_STENCH) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FEFD0); // A horrid stench billowed out
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEFD0); // A horrid stench billowed out
|
||||
sub_80428A0(attacker);
|
||||
entInfo->terrifiedTurns = gUnknown_80F5004;
|
||||
}
|
||||
|
|
@ -2068,7 +2068,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
|
|||
{
|
||||
var_28 = 1;
|
||||
if ((move->id != MOVE_SOLARBEAM || GetApparentWeather(attacker) != WEATHER_SUNNY) && DoesMoveCharge(move->id)) {
|
||||
if (!MoveMatchesChargingStatus(attacker, move)) {
|
||||
if (!MoveMatchesBideClassStatus(attacker, move)) {
|
||||
var_28 = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -2076,7 +2076,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
|
|||
|
||||
SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0);
|
||||
sub_80928C0(gFormatBuffer_Items[0], move, NULL);
|
||||
if (MoveMatchesChargingStatus(attacker, move)) {
|
||||
if (MoveMatchesBideClassStatus(attacker, move)) {
|
||||
msg = gUnknown_80FC72C; // mon loosed move
|
||||
GetEntInfo(attacker)->unkFF = 0;
|
||||
moveUsable = sub_805744C(attacker, move, TRUE);
|
||||
|
|
@ -2096,25 +2096,25 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
|
|||
}
|
||||
|
||||
if (GetEntInfo(attacker)->muzzled.muzzled == TRUE && FailsWhileMuzzled(move->id)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
TryDisplayDungeonLoggableMessage(attacker, msg);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, msg);
|
||||
sub_803E708(0xA, 0x3F);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC710); // is muzzled!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC710); // is muzzled!
|
||||
return FALSE;
|
||||
}
|
||||
else if (!moveUsable) {
|
||||
SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0);
|
||||
if (itemId == 0) {
|
||||
sub_80928C0(gFormatBuffer_Items[0], move, NULL);
|
||||
TryDisplayDungeonLoggableMessage(attacker, msg);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, msg);
|
||||
sub_803E708(0xA, 0x3F);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC6D0); // But the move couldn't be used!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6D0); // But the move couldn't be used!
|
||||
}
|
||||
else {
|
||||
BufferItemName(gFormatBuffer_Items[0], itemId, NULL);
|
||||
TryDisplayDungeonLoggableMessage(attacker, msg);
|
||||
LogMessageByIdWithPopupCheckUser(attacker, msg);
|
||||
sub_803E708(0xA, 0x3F);
|
||||
TryDisplayDungeonLoggableMessage(attacker, gUnknown_80FC6FC); // But Orbs are prevented from being used!
|
||||
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6FC); // But Orbs are prevented from being used!
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -2171,7 +2171,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
|
|||
sub_806A1E8(gUnknown_203B438);
|
||||
}
|
||||
|
||||
if (GetEntInfo(attacker)->volatileStatus.volatileStatus != STATUS_CONFUSED && GetEntInfo(attacker)->volatileStatus.volatileStatus != STATUS_COWERING) {
|
||||
if (GetEntInfo(attacker)->cringeClassStatus.status != STATUS_CONFUSED && GetEntInfo(attacker)->cringeClassStatus.status != STATUS_COWERING) {
|
||||
EntityInfo *entInfo = GetEntInfo(attacker);
|
||||
entInfo->targetPos.x = 0;
|
||||
entInfo->targetPos.y = 0;
|
||||
|
|
@ -2197,8 +2197,8 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
|
|||
|
||||
|
||||
if (gUnknown_202F21A != 0) {
|
||||
SendImmobilizeEndMessage(attacker, attacker);
|
||||
SendLinkedEndMessage(attacker, attacker);
|
||||
EndFrozenClassStatus(attacker, attacker);
|
||||
EndLeechSeedClassStatus(attacker, attacker);
|
||||
}
|
||||
|
||||
if (gUnknown_202F219 != 0 && EntityExists(attacker)) {
|
||||
|
|
@ -2592,7 +2592,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32
|
|||
break;
|
||||
}
|
||||
|
||||
if (MoveRequiresCharging(attacker, move->id) && !MoveMatchesChargingStatus(attacker, move)) {
|
||||
if (MoveRequiresCharging(attacker, move->id) && !MoveMatchesBideClassStatus(attacker, move)) {
|
||||
var_34 = -1;
|
||||
}
|
||||
else {
|
||||
|
|
@ -2672,9 +2672,9 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32
|
|||
bool8 canHitAnyone = FALSE;
|
||||
s32 targetFlags;
|
||||
EntityInfo *attackerInfo = GetEntInfo(attacker);
|
||||
if (attackerInfo->volatileStatus.volatileStatus == STATUS_CONFUSED
|
||||
|| attackerInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER
|
||||
|| attackerInfo->volatileStatus.volatileStatus == STATUS_COWERING)
|
||||
if (attackerInfo->cringeClassStatus.status == STATUS_CONFUSED
|
||||
|| attackerInfo->blinkerClassStatus.status == STATUS_BLINKER
|
||||
|| attackerInfo->cringeClassStatus.status == STATUS_COWERING)
|
||||
{
|
||||
canHitAnyone = TRUE;
|
||||
}
|
||||
|
|
@ -2714,9 +2714,9 @@ static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accu
|
|||
return TRUE;
|
||||
if (move->id == MOVE_REGULAR_ATTACK && IQSkillIsEnabled(attacker, IQ_SURE_HIT_ATTACKER))
|
||||
return TRUE;
|
||||
if (attackerInfo->moveStatus.moveStatus == STATUS_SURE_SHOT)
|
||||
if (attackerInfo->sureShotClassStatus.status == STATUS_SURE_SHOT)
|
||||
return TRUE;
|
||||
if (attackerInfo->moveStatus.moveStatus == STATUS_WHIFFER)
|
||||
if (attackerInfo->sureShotClassStatus.status == STATUS_WHIFFER)
|
||||
return FALSE;
|
||||
if (accuracy > 100)
|
||||
return TRUE;
|
||||
|
|
@ -2786,10 +2786,10 @@ static void SetTargetsForMove(Entity **targetsArray, Entity *attacker, Move *mov
|
|||
s32 targetFlags;
|
||||
s32 targetFlagsAnd;
|
||||
s32 arrId = 0;
|
||||
bool8 canHitPartner = (GetEntInfo(attacker)->volatileStatus.volatileStatus == STATUS_CONFUSED
|
||||
|| GetEntInfo(attacker)->eyesightStatus.eyesightStatus == STATUS_BLINKER
|
||||
|| GetEntInfo(attacker)->volatileStatus.volatileStatus == STATUS_COWERING);
|
||||
bool8 canHitSelf = (GetEntInfo(attacker)->volatileStatus.volatileStatus == STATUS_CONFUSED || GetEntInfo(attacker)->volatileStatus.volatileStatus == STATUS_COWERING);
|
||||
bool8 canHitPartner = (GetEntInfo(attacker)->cringeClassStatus.status == STATUS_CONFUSED
|
||||
|| GetEntInfo(attacker)->blinkerClassStatus.status == STATUS_BLINKER
|
||||
|| GetEntInfo(attacker)->cringeClassStatus.status == STATUS_COWERING);
|
||||
bool8 canHitSelf = (GetEntInfo(attacker)->cringeClassStatus.status == STATUS_CONFUSED || GetEntInfo(attacker)->cringeClassStatus.status == STATUS_COWERING);
|
||||
|
||||
if (IQSkillIsEnabled(attacker, IQ_NONTRAITOR)) {
|
||||
canHitSelf = FALSE;
|
||||
|
|
@ -2797,7 +2797,7 @@ static void SetTargetsForMove(Entity **targetsArray, Entity *attacker, Move *mov
|
|||
}
|
||||
targetFlags = GetMoveTargetAndRangeForPokemon(attacker, move, FALSE);
|
||||
if ((targetFlags & 0xF) == 4) {
|
||||
bool32 usable = MoveMatchesChargingStatus(attacker, move);
|
||||
bool32 usable = MoveMatchesBideClassStatus(attacker, move);
|
||||
if (move->id == MOVE_SOLARBEAM && GetApparentWeather(attacker) == WEATHER_SUNNY) {
|
||||
usable = TRUE;
|
||||
}
|
||||
|
|
@ -2842,7 +2842,7 @@ static void SetTargetsForMove(Entity **targetsArray, Entity *attacker, Move *mov
|
|||
else if (targetFlagsAnd == 0x30) {
|
||||
s32 i;
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
Entity *dungeonMon = gDungeon->allPokemon[i];
|
||||
Entity *dungeonMon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(dungeonMon) && sub_8045A70(attacker, dungeonMon)) {
|
||||
if (dungeonMon == attacker) {
|
||||
arrId = SetNewTarget(arrId, targetsArray, targetFlags, attacker, attacker, move, canHitSelf);
|
||||
|
|
@ -2880,7 +2880,7 @@ static void SetTargetsForMove(Entity **targetsArray, Entity *attacker, Move *mov
|
|||
else if (targetFlagsAnd == 0x60) {
|
||||
s32 i;
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
Entity *dungeonMon = gDungeon->allPokemon[i];
|
||||
Entity *dungeonMon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(dungeonMon)) {
|
||||
arrId = SetNewTarget(arrId, targetsArray, targetFlags, attacker, dungeonMon, move, canHitPartner);
|
||||
}
|
||||
|
|
@ -2908,7 +2908,7 @@ static s32 SetNewTarget(s32 targetArrId, Entity **targetsArray, s32 targetFlags_
|
|||
return targetArrId;
|
||||
if (targetInfo->shopkeeper == SHOPKEEPER_MODE_SHOPKEEPER)
|
||||
return targetArrId;
|
||||
if (targetInfo->clientType == CLIENT_TYPE_DONT_MOVE || targetInfo->clientType == CLIENT_TYPE_CLIENT)
|
||||
if (targetInfo->monsterBehavior == BEHAVIOR_DIGLETT || targetInfo->monsterBehavior == BEHAVIOR_RESCUE_TARGET)
|
||||
return targetArrId;
|
||||
|
||||
if (canHitAnyone) {
|
||||
|
|
@ -2962,7 +2962,7 @@ static s32 SetNewTarget(s32 targetArrId, Entity **targetsArray, s32 targetFlags_
|
|||
struct MultiTurnChargeMove
|
||||
{
|
||||
u16 moveID;
|
||||
u8 chargingStatus;
|
||||
u8 status;
|
||||
};
|
||||
|
||||
const struct MultiTurnChargeMove gMultiTurnChargeMoves[10] = {
|
||||
|
|
@ -2978,7 +2978,7 @@ const struct MultiTurnChargeMove gMultiTurnChargeMoves[10] = {
|
|||
{MOVE_NOTHING, STATUS_NONE}
|
||||
};
|
||||
|
||||
const u32 gMultiTurnChargingStatuses[10] = {
|
||||
const u32 gMultiTurnBideClassStatuses[10] = {
|
||||
STATUS_SOLARBEAM,
|
||||
STATUS_SKY_ATTACK,
|
||||
STATUS_RAZOR_WIND,
|
||||
|
|
@ -3010,7 +3010,7 @@ bool8 MoveCausesPaused(Move *move)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move)
|
||||
bool8 MoveMatchesBideClassStatus(Entity *pokemon, Move *move)
|
||||
{
|
||||
if (!EntityExists(pokemon))
|
||||
{
|
||||
|
|
@ -3027,7 +3027,7 @@ bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move)
|
|||
return FALSE;
|
||||
}
|
||||
if (move->id == gMultiTurnChargeMoves[i].moveID &&
|
||||
pokemonInfo->charging.chargingStatus == gMultiTurnChargeMoves[i].chargingStatus)
|
||||
pokemonInfo->bideClassStatus.status == gMultiTurnChargeMoves[i].status)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -3046,26 +3046,26 @@ bool8 IsChargingAnyTwoTurnMove(Entity *pokemon, bool8 checkCharge)
|
|||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
int i = 0;
|
||||
u8 *chargingStatusPointer = &pokemonInfo->charging.chargingStatus;
|
||||
u8 *chargingStatusPointer2;
|
||||
u8 *bideClassStatusPointer = &pokemonInfo->bideClassStatus.status;
|
||||
u8 *bideClassStatusPointer2;
|
||||
u8 chargeStatus = STATUS_CHARGING;
|
||||
for (; i < 100; i++)
|
||||
{
|
||||
u8 currentStatus = gMultiTurnChargingStatuses[i];
|
||||
u8 chargingStatus;
|
||||
u8 currentStatus = gMultiTurnBideClassStatuses[i];
|
||||
u8 bideClassStatus;
|
||||
if (currentStatus == STATUS_NONE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
chargingStatus = *chargingStatusPointer;
|
||||
chargingStatusPointer2 = &pokemonInfo->charging.chargingStatus;
|
||||
if (chargingStatus == currentStatus)
|
||||
bideClassStatus = *bideClassStatusPointer;
|
||||
bideClassStatusPointer2 = &pokemonInfo->bideClassStatus.status;
|
||||
if (bideClassStatus == currentStatus)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
// BUG: This condition is never reached because the for loop terminates by returning FALSE at the end of the gMultiTurnChargingStatuses array.
|
||||
if (checkCharge && *chargingStatusPointer2 == chargeStatus)
|
||||
// BUG: This condition is never reached because the for loop terminates by returning FALSE at the end of the gMultiTurnBideClassStatuses array.
|
||||
if (checkCharge && *bideClassStatusPointer2 == chargeStatus)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -3081,7 +3081,7 @@ u32 sub_8057144(Entity * pokemon)
|
|||
nMoves = 0;
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
Entity *dungeonMon = gDungeon->allPokemon[i];
|
||||
Entity *dungeonMon = gDungeon->activePokemon[i];
|
||||
if (EntityExists(dungeonMon)) {
|
||||
Move *moves = GetEntInfo(dungeonMon)->moves.moves;
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
|
|
@ -3120,10 +3120,10 @@ bool8 sub_80571F0(Entity * pokemon, Move *move)
|
|||
return TRUE;
|
||||
}
|
||||
else if (entityInfo->unkFF == 2) {
|
||||
if (entityInfo->charging.chargingStatus == STATUS_DIVING) {
|
||||
if (entityInfo->bideClassStatus.status == STATUS_DIVING) {
|
||||
if (move->id == MOVE_WHIRLPOOL || move->id == MOVE_SURF) return FALSE;
|
||||
}
|
||||
else if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||
else if (entityInfo->bideClassStatus.status == STATUS_DIGGING) {
|
||||
moveID = move->id;
|
||||
if (moveID == MOVE_EARTHQUAKE || moveID == MOVE_MAGNITUDE) return FALSE;
|
||||
if (moveID == MOVE_NATURE_POWER) {
|
||||
|
|
@ -3227,11 +3227,11 @@ bool8 CanMonsterUseMove(Entity *pokemon, Move *move, bool8 hasPPChecker)
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move))
|
||||
if (pokemonInfo->cringeClassStatus.status == STATUS_TAUNTED && !MoveIgnoresTaunted(move))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_ENCORE)
|
||||
if (pokemonInfo->cringeClassStatus.status == STATUS_ENCORE)
|
||||
{
|
||||
if (move->id == MOVE_STRUGGLE)
|
||||
{
|
||||
|
|
@ -3259,8 +3259,8 @@ bool8 sub_805744C(Entity * pokemon, Move *move, bool8 param_3)
|
|||
return FALSE;
|
||||
}
|
||||
if (param_3 != 0) {
|
||||
if ((entityInfo->volatileStatus.volatileStatus == STATUS_TAUNTED) && (!MoveIgnoresTaunted(move))) return FALSE;
|
||||
if (entityInfo->volatileStatus.volatileStatus == STATUS_ENCORE) {
|
||||
if ((entityInfo->cringeClassStatus.status == STATUS_TAUNTED) && (!MoveIgnoresTaunted(move))) return FALSE;
|
||||
if (entityInfo->cringeClassStatus.status == STATUS_ENCORE) {
|
||||
if (move->id == MOVE_STRUGGLE) {
|
||||
if((entityInfo->moves.struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0) return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ u8 sub_80703A0(Entity *pokemon, Position *pos)
|
|||
if (pos->x >= DUNGEON_MAX_SIZE_X || pos->y >= DUNGEON_MAX_SIZE_Y)
|
||||
return TRUE;
|
||||
if (tile->monster == NULL && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) {
|
||||
if ((IsCurrentFixedRoomBossFight()) || ((entityInfo->transformStatus.transformStatus != STATUS_MOBILE && (!HasHeldItem(pokemon, ITEM_MOBILE_SCARF))))) {
|
||||
if ((IsCurrentFixedRoomBossFight()) || ((entityInfo->invisibleClassStatus.status != STATUS_MOBILE && (!HasHeldItem(pokemon, ITEM_MOBILE_SCARF))))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
|
|
@ -113,7 +113,7 @@ u8 sub_80703A0(Entity *pokemon, Position *pos)
|
|||
bool8 CanCrossWalls(Entity *pokemon)
|
||||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
if (pokemonInfo->transformStatus.transformStatus == STATUS_MOBILE)
|
||||
if (pokemonInfo->invisibleClassStatus.status == STATUS_MOBILE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -142,7 +142,7 @@ bool8 sub_807049C(Entity *pokemon, Position *pos)
|
|||
if (pos->x >= DUNGEON_MAX_SIZE_X || pos->y >= DUNGEON_MAX_SIZE_Y)
|
||||
return TRUE;
|
||||
if (((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0) && (tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus.transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->invisibleClassStatus.status != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
|
|
@ -230,7 +230,7 @@ bool8 sub_80705F0(Entity *pokemon, Position *pos)
|
|||
if (pos->x >= DUNGEON_MAX_SIZE_X || pos->y >= DUNGEON_MAX_SIZE_Y)
|
||||
return TRUE;
|
||||
if (((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0) && (tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus.transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->invisibleClassStatus.status != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
|
|
@ -271,7 +271,7 @@ bool8 sub_80706A4(Entity *pokemon, Position *pos)
|
|||
return TRUE;
|
||||
if ((((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0))
|
||||
&& (tile->monster == NULL || ((GetEntityType(tile->monster) == ENTITY_MONSTER) && (GetEntInfo(tile->monster) == entityInfo)))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus.transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->invisibleClassStatus.status != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
|
|
@ -318,7 +318,7 @@ s32 CalcSpeedStage(Entity *pokemon)
|
|||
}
|
||||
}
|
||||
|
||||
if (entityInfo->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) {
|
||||
if (entityInfo->burnClassStatus.status == STATUS_PARALYSIS) {
|
||||
speed--;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ extern bool8 sub_805744C(Entity *, Move *, u32);
|
|||
|
||||
bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||
{
|
||||
if (GetEntInfo(target)->protection.protectionStatus == STATUS_SAFEGUARD) {
|
||||
if (GetEntInfo(target)->reflectClassStatus.status == STATUS_SAFEGUARD) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC2FC);
|
||||
}
|
||||
return TRUE;
|
||||
|
|
@ -38,9 +38,9 @@ bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage
|
|||
|
||||
bool8 sub_8071728(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||
{
|
||||
if (GetEntInfo(target)->protection.protectionStatus == STATUS_MIST) {
|
||||
if (GetEntInfo(target)->reflectClassStatus.status == STATUS_MIST) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FC31C);
|
||||
}
|
||||
return TRUE;
|
||||
|
|
@ -48,7 +48,7 @@ bool8 sub_8071728(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||
else {
|
||||
if (HasAbility(target, ABILITY_CLEAR_BODY) || HasAbility(target, ABILITY_WHITE_SMOKE)) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCEFC);
|
||||
}
|
||||
return TRUE;
|
||||
|
|
@ -63,7 +63,7 @@ bool8 sub_80717A4(Entity *pokemon, u16 moveID)
|
|||
s32 index;
|
||||
|
||||
entityInfo = GetEntInfo(pokemon);
|
||||
if ((entityInfo->sleep.sleep != STATUS_SLEEP) && (entityInfo->sleep.sleep != STATUS_NAPPING) && (entityInfo->sleep.sleep != STATUS_NIGHTMARE)) {
|
||||
if ((entityInfo->sleepClassStatus.status != STATUS_SLEEP) && (entityInfo->sleepClassStatus.status != STATUS_NAPPING) && (entityInfo->sleepClassStatus.status != STATUS_NIGHTMARE)) {
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
|
@ -126,7 +126,7 @@ bool8 MonsterIsType(Entity *pokemon, u8 type)
|
|||
bool8 CanSeeInvisibleMonsters(Entity *pokemon)
|
||||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
if (pokemonInfo->eyesightStatus.eyesightStatus != STATUS_EYEDROPS)
|
||||
if (pokemonInfo->blinkerClassStatus.status != STATUS_EYEDROPS)
|
||||
{
|
||||
if (!HasHeldItem(pokemon, ITEM_GOGGLE_SPECS))
|
||||
return FALSE;
|
||||
|
|
@ -252,7 +252,7 @@ bool8 sub_8071A8C(Entity *pokemon)
|
|||
if(EntityExists(pokemon))
|
||||
{
|
||||
pokemonInfo = GetEntInfo(pokemon);
|
||||
if(pokemonInfo->clientType != CLIENT_TYPE_CLIENT)
|
||||
if(pokemonInfo->monsterBehavior != BEHAVIOR_RESCUE_TARGET)
|
||||
{
|
||||
if(!sub_8071A8C_sub(pokemonInfo))
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ static void ReadBelly(DataSerializer *seri, FixedPoint *dst);
|
|||
static void ReadBlame(DataSerializer *seri, const u8 *expected);
|
||||
static bool8 ReadBool8(DataSerializer *seri);
|
||||
static void ReadBytes(DataSerializer *seri, void *dst, s32 numBytes);
|
||||
static void ReadCharging(DataSerializer *seri, Charging *dst);
|
||||
static u8 ReadClientType(DataSerializer *seri);
|
||||
static void ReadBideClassStatus(DataSerializer *seri, BideClassStatus *dst);
|
||||
static u8 ReadMonsterBehavior(DataSerializer *seri);
|
||||
static void ReadDungeonFloor(DataSerializer *seri);
|
||||
static void ReadDungeonItems(DataSerializer *seri);
|
||||
static void ReadDungeonMonsters(DataSerializer *seri);
|
||||
|
|
@ -41,39 +41,39 @@ static void ReadDungeonUnk644(DataSerializer *seri);
|
|||
static void ReadDungeonUnkE240(DataSerializer *seri, unkDungeonE240 *dst);
|
||||
static void ReadDungeonUnkE260(DataSerializer *seri, unkDungeonE260 *dst);
|
||||
static void ReadDungeonVisibility(DataSerializer *seri);
|
||||
static void ReadEyesightStatus(DataSerializer *seri, EyesightStatus *dst);
|
||||
static void ReadBlinkerClassStatus(DataSerializer *seri, BlinkerClassStatus *dst);
|
||||
static s24_8 ReadF24_8(DataSerializer *seri);
|
||||
static void ReadHiddenPower(DataSerializer *seri, HiddenPower *dst);
|
||||
static void ReadImmobilize(DataSerializer *seri, Immobilize *dst);
|
||||
static void ReadFrozenClassStatus(DataSerializer *seri, FrozenClassStatus *dst);
|
||||
static void ReadIQSkills(DataSerializer *seri, u8 *dst);
|
||||
static void ReadItem(DataSerializer *seri, Item *dst);
|
||||
static void ReadItemStatus(DataSerializer *seri, ItemStatus *dst);
|
||||
static void ReadLongTossClassStatus(DataSerializer *seri, LongTossClassStatus *dst);
|
||||
static void ReadJoinedAt(DataSerializer *seri, JoinedAt *dst);
|
||||
static void ReadLinked(DataSerializer *seri, Linked *dst);
|
||||
static void ReadLeechSeedClassStatus(DataSerializer *seri, LeechSeedClassStatus *dst);
|
||||
static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index);
|
||||
static s16 ReadMonsterID(DataSerializer *seri);
|
||||
static u8 ReadMonsterUnk64(DataSerializer *seri);
|
||||
static u8 ReadMonsterUnkFF(DataSerializer *seri);
|
||||
static void ReadMoves(DataSerializer *seri, Moves *dst);
|
||||
static void ReadMoveStatus(DataSerializer *seri, MoveStatus *dst);
|
||||
static void ReadSureShotClassStatus(DataSerializer *seri, SureShotClassStatus *dst);
|
||||
static void ReadMuzzled(DataSerializer *seri, Muzzled *dst);
|
||||
static void ReadNonVolatile(DataSerializer *seri, NonVolatile *dst);
|
||||
static void ReadProtection(DataSerializer *seri, Protection *dst);
|
||||
static void ReadBurnClassStatus(DataSerializer *seri, BurnClassStatus *dst);
|
||||
static void ReadReflectClassStatus(DataSerializer *seri, ReflectClassStatus *dst);
|
||||
static s16 ReadS16(DataSerializer *seri);
|
||||
static void ReadSleep(DataSerializer *seri, Sleep *dst);
|
||||
static void ReadSleepClassStatus(DataSerializer *seri, SleepClassStatus *dst);
|
||||
static void ReadSpeedCounters(DataSerializer *seri, u8 *dst, u32 numCounters);
|
||||
static s32 ReadSpeedStage(DataSerializer *seri);
|
||||
static u8 ReadTactic(DataSerializer *seri);
|
||||
static u8 ReadTargetingDecoy(DataSerializer *seri);
|
||||
static u8 ReadDecoyAITracker(DataSerializer *seri);
|
||||
static void ReadTile(DataSerializer *seri, Tile *dst);
|
||||
static void ReadTilePos(DataSerializer *seri, Position *dst);
|
||||
static void ReadTransformStatus(DataSerializer *seri, TransformStatus *dst);
|
||||
static void ReadInvisibleClassStatus(DataSerializer *seri, InvisibleClassStatus *dst);
|
||||
static u8 ReadType(DataSerializer *seri);
|
||||
static u16 ReadU16(DataSerializer *seri);
|
||||
static u32 ReadU32(DataSerializer *seri);
|
||||
static u8 ReadU8(DataSerializer *seri);
|
||||
static void ReadVolatileStatus(DataSerializer *seri, Volatile *dst);
|
||||
static void ReadWaiting(DataSerializer *seri, Waiting *dst);
|
||||
static void ReadCringeClassStatus(DataSerializer *seri, CringeClassStatus *dst);
|
||||
static void ReadCurseClassStatus(DataSerializer *seri, CurseClassStatus *dst);
|
||||
static void ReadWeather(DataSerializer *seri, Weather *dst);
|
||||
|
||||
static void WriteAbility(DataSerializer *seri, u8 value);
|
||||
|
|
@ -83,8 +83,8 @@ static void WriteBelly(DataSerializer *seri, FixedPoint *src);
|
|||
static void WriteBlame(DataSerializer *seri, const u8 *blame);
|
||||
static void WriteBool8(DataSerializer *seri, bool8 value);
|
||||
static void WriteBytes(DataSerializer *seri, void *src, s32 numBytes);
|
||||
static void WriteCharging(DataSerializer *seri, Charging *src);
|
||||
static void WriteClientType(DataSerializer *seri, u8 value);
|
||||
static void WriteBideClassStatus(DataSerializer *seri, BideClassStatus *src);
|
||||
static void WriteMonsterBehavior(DataSerializer *seri, u8 value);
|
||||
static void WriteDungeonFloor(DataSerializer *seri);
|
||||
static void WriteDungeonItems(DataSerializer *seri);
|
||||
static void WriteDungeonMonsters(DataSerializer *seri);
|
||||
|
|
@ -94,39 +94,39 @@ static void WriteDungeonUnk644(DataSerializer *seri);
|
|||
static void WriteDungeonUnkE240(DataSerializer *seri, unkDungeonE240 *src);
|
||||
static void WriteDungeonUnkE260(DataSerializer *seri, unkDungeonE260 *src);
|
||||
static void WriteDungeonVisibility(DataSerializer *seri);
|
||||
static void WriteEyesightStatus(DataSerializer *seri, EyesightStatus *src);
|
||||
static void WriteBlinkerClassStatus(DataSerializer *seri, BlinkerClassStatus *src);
|
||||
static void WriteF24_8(DataSerializer *seri, s24_8 value);
|
||||
static void WriteHiddenPower(DataSerializer *seri, HiddenPower *src);
|
||||
static void WriteImmobilize(DataSerializer *seri, Immobilize *src);
|
||||
static void WriteFrozenClassStatus(DataSerializer *seri, FrozenClassStatus *src);
|
||||
static void WriteIQSkills(DataSerializer *seri, u8 *src);
|
||||
static void WriteItem(DataSerializer *seri, Item *src);
|
||||
static void WriteItemStatus(DataSerializer *seri, ItemStatus *src);
|
||||
static void WriteLongTossClassStatus(DataSerializer *seri, LongTossClassStatus *src);
|
||||
static void WriteJoinedAt(DataSerializer *seri, JoinedAt *src);
|
||||
static void WriteLinked(DataSerializer *seri, Linked *src);
|
||||
static void WriteLeechSeedClassStatus(DataSerializer *seri, LeechSeedClassStatus *src);
|
||||
static void WriteMonster(DataSerializer *seri, Entity *src);
|
||||
static void WriteMonsterID(DataSerializer *seri, s16 value);
|
||||
static void WriteMonsterUnk64(DataSerializer *seri, u8 value);
|
||||
static void WriteMonsterUnkFF(DataSerializer *seri, u8 value);
|
||||
static void WriteMoves(DataSerializer *seri, Moves *src);
|
||||
static void WriteMoveStatus(DataSerializer *seri, MoveStatus* src);
|
||||
static void WriteSureShotClassStatus(DataSerializer *seri, SureShotClassStatus* src);
|
||||
static void WriteMuzzled(DataSerializer *seri, Muzzled *src);
|
||||
static void WriteNonVolatile(DataSerializer *seri, NonVolatile *src);
|
||||
static void WriteProtection(DataSerializer *seri, Protection *src);
|
||||
static void WriteBurnClassStatus(DataSerializer *seri, BurnClassStatus *src);
|
||||
static void WriteReflectClassStatus(DataSerializer *seri, ReflectClassStatus *src);
|
||||
static void WriteTilePos(DataSerializer *seri, Position *src);
|
||||
static void WriteS16(DataSerializer *seri, s16 value);
|
||||
static void WriteSleep(DataSerializer *seri, Sleep* src);
|
||||
static void WriteSleepClassStatus(DataSerializer *seri, SleepClassStatus* src);
|
||||
static void WriteSpeedCounters(DataSerializer *seri, u8 *src, u32 numCounters);
|
||||
static void WriteSpeedStage(DataSerializer *seri, s32 value);
|
||||
static void WriteTactic(DataSerializer *seri, u8 value);
|
||||
static void WriteTargetingDecoy(DataSerializer *seri, u8 value);
|
||||
static void WriteDecoyAITracker(DataSerializer *seri, u8 value);
|
||||
static void WriteTile(DataSerializer *seri, Tile *src);
|
||||
static void WriteTransformStatus(DataSerializer *seri, TransformStatus *src);
|
||||
static void WriteInvisibleClassStatus(DataSerializer *seri, InvisibleClassStatus *src);
|
||||
static void WriteType(DataSerializer *seri, u8 value);
|
||||
static void WriteU16(DataSerializer *seri, u16 value);
|
||||
static void WriteU32(DataSerializer *seri, u32 value);
|
||||
static void WriteU8(DataSerializer *seri, u8 value);
|
||||
static void WriteVolatile(DataSerializer *seri, Volatile *src);
|
||||
static void WriteWaiting(DataSerializer *seri, Waiting *src);
|
||||
static void WriteCringeClassStatus(DataSerializer *seri, CringeClassStatus *src);
|
||||
static void WriteCurseClassStatus(DataSerializer *seri, CurseClassStatus *src);
|
||||
static void WriteWeather(DataSerializer *seri, Weather *src);
|
||||
|
||||
static Entity* sub_80828E0(s16 id, s16 apparentID, s32 index);
|
||||
|
|
@ -236,7 +236,7 @@ static void WriteDungeonMonsters(DataSerializer *seri)
|
|||
WriteBool8(seri, gDungeon->plusIsActive[1]);
|
||||
WriteBool8(seri, gDungeon->minusIsActive[0]);
|
||||
WriteBool8(seri, gDungeon->minusIsActive[1]);
|
||||
WriteBool8(seri, gDungeon->decoyActive);
|
||||
WriteBool8(seri, gDungeon->decoyIsActive);
|
||||
WriteBool8(seri, gDungeon->unk37FD);
|
||||
WriteBool8(seri, gDungeon->deoxysDefeat);
|
||||
WriteBool8(seri, gDungeon->unk37FF);
|
||||
|
|
@ -330,18 +330,18 @@ static void WriteMonster(DataSerializer *seri, Entity *src)
|
|||
WriteU32(seri, info->unk98);
|
||||
WriteU32(seri, info->unk9C);
|
||||
WriteU32(seri, info->unkA0);
|
||||
WriteSleep(seri, &info->sleep);
|
||||
WriteNonVolatile(seri, &info->nonVolatile);
|
||||
WriteImmobilize(seri, &info->immobilize);
|
||||
WriteVolatile(seri, &info->volatileStatus);
|
||||
WriteCharging(seri, &info->charging);
|
||||
WriteProtection(seri, &info->protection);
|
||||
WriteWaiting(seri, &info->waitingStruct);
|
||||
WriteLinked(seri, &info->linked);
|
||||
WriteMoveStatus(seri, &info->moveStatus);
|
||||
WriteItemStatus(seri, &info->itemStatus);
|
||||
WriteTransformStatus(seri, &info->transformStatus);
|
||||
WriteEyesightStatus(seri, &info->eyesightStatus);
|
||||
WriteSleepClassStatus(seri, &info->sleepClassStatus);
|
||||
WriteBurnClassStatus(seri, &info->burnClassStatus);
|
||||
WriteFrozenClassStatus(seri, &info->frozenClassStatus);
|
||||
WriteCringeClassStatus(seri, &info->cringeClassStatus);
|
||||
WriteBideClassStatus(seri, &info->bideClassStatus);
|
||||
WriteReflectClassStatus(seri, &info->reflectClassStatus);
|
||||
WriteCurseClassStatus(seri, &info->curseClassStatus);
|
||||
WriteLeechSeedClassStatus(seri, &info->leechSeedClassStatus);
|
||||
WriteSureShotClassStatus(seri, &info->sureShotClassStatus);
|
||||
WriteLongTossClassStatus(seri, &info->longTossClassStatus);
|
||||
WriteInvisibleClassStatus(seri, &info->invisibleClassStatus);
|
||||
WriteBlinkerClassStatus(seri, &info->blinkerClassStatus);
|
||||
WriteMuzzled(seri, &info->muzzled);
|
||||
WriteBool8(seri, info->powerEars);
|
||||
WriteBool8(seri, info->scanning);
|
||||
|
|
@ -357,7 +357,7 @@ static void WriteMonster(DataSerializer *seri, Entity *src)
|
|||
WriteU8(seri, info->perishSongTurns);
|
||||
WriteU8(seri, info->unkFE);
|
||||
WriteMonsterUnkFF(seri, info->unkFF);
|
||||
WriteTargetingDecoy(seri, info->targetingDecoy);
|
||||
WriteDecoyAITracker(seri, info->decoyAITracker);
|
||||
WriteSpeedStage(seri, info->speedStage);
|
||||
WriteSpeedCounters(seri, info->speedUpCounters, NUM_SPEED_COUNTERS);
|
||||
WriteSpeedCounters(seri, info->speedDownCounters, NUM_SPEED_COUNTERS);
|
||||
|
|
@ -367,7 +367,7 @@ static void WriteMonster(DataSerializer *seri, Entity *src)
|
|||
WriteMoves(seri, &info->moves);
|
||||
WriteBelly(seri, &info->belly);
|
||||
WriteBelly(seri, &info->maxBelly);
|
||||
WriteBool8(seri, info->aiNextToTarget);
|
||||
WriteBool8(seri, info->aiAllySkip);
|
||||
WriteBool8(seri, info->recalculateFollow);
|
||||
WriteBool8(seri, info->waiting);
|
||||
WriteBool8(seri, info->unk146);
|
||||
|
|
@ -395,7 +395,7 @@ static void WriteMonster(DataSerializer *seri, Entity *src)
|
|||
WriteS16(seri, info->unk1F8);
|
||||
WriteS16(seri, info->mobileTurnTimer);
|
||||
WriteU32(seri, info->expGainedInTurn);
|
||||
WriteClientType(seri, info->clientType);
|
||||
WriteMonsterBehavior(seri, info->monsterBehavior);
|
||||
}
|
||||
|
||||
static void WriteDungeonFloor(DataSerializer *seri)
|
||||
|
|
@ -526,7 +526,7 @@ static void WriteMonsterUnkFF(DataSerializer *seri, u8 value)
|
|||
WriteBytes(seri, &stack, 1);
|
||||
}
|
||||
|
||||
static void WriteTargetingDecoy(DataSerializer *seri, u8 value)
|
||||
static void WriteDecoyAITracker(DataSerializer *seri, u8 value)
|
||||
{
|
||||
u8 stack;
|
||||
|
||||
|
|
@ -551,7 +551,7 @@ static void WriteHiddenPower(DataSerializer *seri, HiddenPower *src)
|
|||
WriteType(seri, src->hiddenPowerType);
|
||||
}
|
||||
|
||||
static void WriteClientType(DataSerializer *seri, u8 value)
|
||||
static void WriteMonsterBehavior(DataSerializer *seri, u8 value)
|
||||
{
|
||||
WriteU8(seri, value);
|
||||
}
|
||||
|
|
@ -572,92 +572,92 @@ static void WriteAITarget(DataSerializer *seri, AITarget* src)
|
|||
WriteTilePos(seri, &src->aiTargetPos);
|
||||
}
|
||||
|
||||
static void WriteSleep(DataSerializer *seri, Sleep* src)
|
||||
static void WriteSleepClassStatus(DataSerializer *seri, SleepClassStatus* src)
|
||||
{
|
||||
WriteBytes(seri, &src->sleep, 1);
|
||||
WriteU8(seri, src->sleepTurns);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
}
|
||||
|
||||
static void WriteNonVolatile(DataSerializer *seri, NonVolatile *src)
|
||||
static void WriteBurnClassStatus(DataSerializer *seri, BurnClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->nonVolatileStatus, 1);
|
||||
WriteU8(seri, src->nonVolatileStatusTurns);
|
||||
WriteU8(seri, src->nonVolatileStatusDamageCountdown);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
WriteU8(seri, src->damageCountdown);
|
||||
WriteU8(seri, src->unk4);
|
||||
}
|
||||
|
||||
static void WriteImmobilize(DataSerializer *seri, Immobilize *src)
|
||||
static void WriteFrozenClassStatus(DataSerializer *seri, FrozenClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->immobilizeStatus, 1);
|
||||
WriteU8(seri, src->immobilizeStatusTurns);
|
||||
WriteU8(seri, src->immobilizeStatusDamageCountdown);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
WriteU8(seri, src->damageCountdown);
|
||||
WriteU32(seri, src->unk4);
|
||||
}
|
||||
|
||||
static void WriteVolatile(DataSerializer *seri, Volatile *src)
|
||||
static void WriteCringeClassStatus(DataSerializer *seri, CringeClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->volatileStatus, 1);
|
||||
WriteU8(seri, src->volatileStatusTurns);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
}
|
||||
|
||||
static void WriteCharging(DataSerializer *seri, Charging *src)
|
||||
static void WriteBideClassStatus(DataSerializer *seri, BideClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->chargingStatus, 1);
|
||||
WriteU8(seri, src->chargingStatusTurns);
|
||||
WriteU8(seri, src->chargingStatusMoveIndex);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
WriteU8(seri, src->moveSlot);
|
||||
}
|
||||
|
||||
static void WriteProtection(DataSerializer *seri, Protection *src)
|
||||
static void WriteReflectClassStatus(DataSerializer *seri, ReflectClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->protectionStatus, 1);
|
||||
WriteU8(seri, src->protectionStatusTurns);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
}
|
||||
|
||||
static void WriteWaiting(DataSerializer *seri, Waiting *src)
|
||||
static void WriteCurseClassStatus(DataSerializer *seri, CurseClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->waitingStatus, 1);
|
||||
WriteBool8(seri, src->enemyDecoy);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteBool8(seri, src->applierNonTeamMemberFlag);
|
||||
WriteBool8(seri, src->unk2);
|
||||
WriteU8(seri, src->waitingStatusTurns);
|
||||
WriteU8(seri, src->curseDamageCountdown);
|
||||
WriteU8(seri, src->turns);
|
||||
WriteU8(seri, src->damageCountdown);
|
||||
}
|
||||
|
||||
static void WriteLinked(DataSerializer *seri, Linked *src)
|
||||
static void WriteLeechSeedClassStatus(DataSerializer *seri, LeechSeedClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->linkedStatus, 1);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU32(seri, src->unk4);
|
||||
WriteU8(seri, src->unk8);
|
||||
WriteU8(seri, src->linkedStatusTurns);
|
||||
WriteU8(seri, src->linkedStatusDamageCountdown);
|
||||
WriteU8(seri, src->turns);
|
||||
WriteU8(seri, src->damageCountdown);
|
||||
}
|
||||
|
||||
static void WriteMoveStatus(DataSerializer *seri, MoveStatus* src)
|
||||
static void WriteSureShotClassStatus(DataSerializer *seri, SureShotClassStatus* src)
|
||||
{
|
||||
WriteBytes(seri, &src->moveStatus, 1);
|
||||
WriteU8(seri, src->moveStatusTurns);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
}
|
||||
|
||||
static void WriteItemStatus(DataSerializer *seri, ItemStatus *src)
|
||||
static void WriteLongTossClassStatus(DataSerializer *seri, LongTossClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->itemStatus, 1);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
}
|
||||
|
||||
static void WriteTransformStatus(DataSerializer *seri, TransformStatus *src)
|
||||
static void WriteInvisibleClassStatus(DataSerializer *seri, InvisibleClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->transformStatus, 1);
|
||||
WriteU8(seri, src->transformStatusTurns);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
}
|
||||
|
||||
static void WriteEyesightStatus(DataSerializer *seri, EyesightStatus *src)
|
||||
static void WriteBlinkerClassStatus(DataSerializer *seri, BlinkerClassStatus *src)
|
||||
{
|
||||
WriteBytes(seri, &src->eyesightStatus, 1);
|
||||
WriteU8(seri, src->eyesightStatusTurns);
|
||||
WriteBytes(seri, &src->status, 1);
|
||||
WriteU8(seri, src->turns);
|
||||
}
|
||||
|
||||
static void WriteMuzzled(DataSerializer *seri, Muzzled *src)
|
||||
{
|
||||
WriteBytes(seri, &src->muzzled, 1);
|
||||
WriteU8(seri, src->muzzledTurns);
|
||||
WriteU8(seri, src->turns);
|
||||
}
|
||||
|
||||
static void WriteMove(DataSerializer *seri, Move *src)
|
||||
|
|
@ -932,7 +932,7 @@ static void ReadDungeonMonsters(DataSerializer *seri)
|
|||
gDungeon->plusIsActive[1] = ReadBool8(seri);
|
||||
gDungeon->minusIsActive[0] = ReadBool8(seri);
|
||||
gDungeon->minusIsActive[1] = ReadBool8(seri);
|
||||
gDungeon->decoyActive = ReadBool8(seri);
|
||||
gDungeon->decoyIsActive = ReadBool8(seri);
|
||||
gDungeon->unk37FD = ReadBool8(seri);
|
||||
gDungeon->deoxysDefeat = ReadBool8(seri);
|
||||
gDungeon->unk37FF = ReadBool8(seri);
|
||||
|
|
@ -1013,18 +1013,18 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index)
|
|||
entInfo.unk98 = ReadU32(seri);
|
||||
entInfo.unk9C = ReadU32(seri);
|
||||
entInfo.unkA0 = ReadU32(seri);
|
||||
ReadSleep(seri, &entInfo.sleep);
|
||||
ReadNonVolatile(seri,&entInfo. nonVolatile);
|
||||
ReadImmobilize(seri, &entInfo.immobilize);
|
||||
ReadVolatileStatus(seri, &entInfo.volatileStatus);
|
||||
ReadCharging(seri, &entInfo.charging);
|
||||
ReadProtection(seri, &entInfo.protection);
|
||||
ReadWaiting(seri, &entInfo.waitingStruct);
|
||||
ReadLinked(seri, &entInfo.linked);
|
||||
ReadMoveStatus(seri, &entInfo.moveStatus);
|
||||
ReadItemStatus(seri, &entInfo.itemStatus);
|
||||
ReadTransformStatus(seri, &entInfo.transformStatus);
|
||||
ReadEyesightStatus(seri, &entInfo.eyesightStatus);
|
||||
ReadSleepClassStatus(seri, &entInfo.sleepClassStatus);
|
||||
ReadBurnClassStatus(seri,&entInfo. burnClassStatus);
|
||||
ReadFrozenClassStatus(seri, &entInfo.frozenClassStatus);
|
||||
ReadCringeClassStatus(seri, &entInfo.cringeClassStatus);
|
||||
ReadBideClassStatus(seri, &entInfo.bideClassStatus);
|
||||
ReadReflectClassStatus(seri, &entInfo.reflectClassStatus);
|
||||
ReadCurseClassStatus(seri, &entInfo.curseClassStatus);
|
||||
ReadLeechSeedClassStatus(seri, &entInfo.leechSeedClassStatus);
|
||||
ReadSureShotClassStatus(seri, &entInfo.sureShotClassStatus);
|
||||
ReadLongTossClassStatus(seri, &entInfo.longTossClassStatus);
|
||||
ReadInvisibleClassStatus(seri, &entInfo.invisibleClassStatus);
|
||||
ReadBlinkerClassStatus(seri, &entInfo.blinkerClassStatus);
|
||||
ReadMuzzled(seri, &entInfo.muzzled);
|
||||
entInfo.powerEars = ReadBool8(seri);
|
||||
entInfo.scanning = ReadBool8(seri);
|
||||
|
|
@ -1041,7 +1041,7 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index)
|
|||
entInfo.unkFE = ReadU8(seri);
|
||||
entInfo.unkFF = ReadMonsterUnkFF(seri);
|
||||
|
||||
entInfo.targetingDecoy = ReadTargetingDecoy(seri);
|
||||
entInfo.decoyAITracker = ReadDecoyAITracker(seri);
|
||||
entInfo.speedStage = ReadSpeedStage(seri);
|
||||
ReadSpeedCounters(seri, entInfo.speedUpCounters, NUM_SPEED_COUNTERS);
|
||||
ReadSpeedCounters(seri, entInfo.speedDownCounters, NUM_SPEED_COUNTERS);
|
||||
|
|
@ -1051,7 +1051,7 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index)
|
|||
ReadMoves(seri, &entInfo.moves);
|
||||
ReadBelly(seri, &entInfo.belly);
|
||||
ReadBelly(seri, &entInfo.maxBelly);
|
||||
entInfo.aiNextToTarget = ReadBool8(seri);
|
||||
entInfo.aiAllySkip = ReadBool8(seri);
|
||||
entInfo.recalculateFollow = ReadBool8(seri);
|
||||
entInfo.waiting = ReadBool8(seri);
|
||||
entInfo.unk146 = ReadBool8(seri);
|
||||
|
|
@ -1079,7 +1079,7 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index)
|
|||
entInfo.unk1F8 = ReadS16(seri);
|
||||
entInfo.mobileTurnTimer = ReadS16(seri);
|
||||
entInfo.expGainedInTurn = ReadU32(seri);
|
||||
entInfo.clientType = ReadClientType(seri);
|
||||
entInfo.monsterBehavior = ReadMonsterBehavior(seri);
|
||||
|
||||
gLeaderPointer = NULL;
|
||||
if (shouldSpawnMon) {
|
||||
|
|
@ -1248,7 +1248,7 @@ void sub_8082B40(void)
|
|||
Position pos;
|
||||
|
||||
for (i = 0; i < DUNGEON_MAX_POKEMON; i++) {
|
||||
entity = gDungeon->allPokemon[i];
|
||||
entity = gDungeon->activePokemon[i];
|
||||
if (EntityExists(entity)) {
|
||||
info = GetEntInfo(entity);
|
||||
entity->axObj.spriteFile = GetSpriteData(info->apparentID);
|
||||
|
|
@ -1310,7 +1310,7 @@ static u8 ReadMonsterUnkFF(DataSerializer *seri)
|
|||
return temp[0];
|
||||
}
|
||||
|
||||
static u8 ReadTargetingDecoy(DataSerializer *seri)
|
||||
static u8 ReadDecoyAITracker(DataSerializer *seri)
|
||||
{
|
||||
u8 temp[4];
|
||||
|
||||
|
|
@ -1340,7 +1340,7 @@ static u8 ReadTactic(DataSerializer *seri)
|
|||
return temp[0];
|
||||
}
|
||||
|
||||
static u8 ReadClientType(DataSerializer *seri)
|
||||
static u8 ReadMonsterBehavior(DataSerializer *seri)
|
||||
{
|
||||
u8 temp[4];
|
||||
|
||||
|
|
@ -1375,92 +1375,92 @@ static void ReadIQSkills(DataSerializer *seri, u8 *dst)
|
|||
ReadBytes(seri, dst, NUM_PICKED_IQ_SKILLS);
|
||||
}
|
||||
|
||||
static void ReadSleep(DataSerializer *seri, Sleep *dst)
|
||||
static void ReadSleepClassStatus(DataSerializer *seri, SleepClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->sleep, 1);
|
||||
dst->sleepTurns = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadNonVolatile(DataSerializer *seri, NonVolatile *dst)
|
||||
static void ReadBurnClassStatus(DataSerializer *seri, BurnClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->nonVolatileStatus, 1);
|
||||
dst->nonVolatileStatusTurns = ReadU8(seri);
|
||||
dst->nonVolatileStatusDamageCountdown = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
dst->damageCountdown = ReadU8(seri);
|
||||
dst->unk4 = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadImmobilize(DataSerializer *seri, Immobilize *dst)
|
||||
static void ReadFrozenClassStatus(DataSerializer *seri, FrozenClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->immobilizeStatus, 1);
|
||||
dst->immobilizeStatusTurns = ReadU8(seri);
|
||||
dst->immobilizeStatusDamageCountdown = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
dst->damageCountdown = ReadU8(seri);
|
||||
dst->unk4 = ReadU32(seri);
|
||||
}
|
||||
|
||||
static void ReadVolatileStatus(DataSerializer *seri, Volatile *dst)
|
||||
static void ReadCringeClassStatus(DataSerializer *seri, CringeClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->volatileStatus, 1);
|
||||
dst->volatileStatusTurns = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadCharging(DataSerializer *seri, Charging *dst)
|
||||
static void ReadBideClassStatus(DataSerializer *seri, BideClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->chargingStatus, 1);
|
||||
dst->chargingStatusTurns = ReadU8(seri);
|
||||
dst->chargingStatusMoveIndex = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
dst->moveSlot = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadProtection(DataSerializer *seri, Protection *dst)
|
||||
static void ReadReflectClassStatus(DataSerializer *seri, ReflectClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->protectionStatus, 1);
|
||||
dst->protectionStatusTurns = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadWaiting(DataSerializer *seri, Waiting *dst)
|
||||
static void ReadCurseClassStatus(DataSerializer *seri, CurseClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->waitingStatus, 1);
|
||||
dst->enemyDecoy = ReadBool8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->applierNonTeamMemberFlag = ReadBool8(seri);
|
||||
dst->unk2 = ReadBool8(seri);
|
||||
dst->waitingStatusTurns = ReadU8(seri);
|
||||
dst->curseDamageCountdown = ReadU8(seri);
|
||||
dst->turns = ReadU8(seri);
|
||||
dst->damageCountdown = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadLinked(DataSerializer *seri, Linked *dst)
|
||||
static void ReadLeechSeedClassStatus(DataSerializer *seri, LeechSeedClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->linkedStatus, 1);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->unk4 = ReadU32(seri);
|
||||
dst->unk8 = ReadU8(seri);
|
||||
dst->linkedStatusTurns = ReadU8(seri);
|
||||
dst->linkedStatusDamageCountdown = ReadU8(seri);
|
||||
dst->turns = ReadU8(seri);
|
||||
dst->damageCountdown = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadMoveStatus(DataSerializer *seri, MoveStatus *dst)
|
||||
static void ReadSureShotClassStatus(DataSerializer *seri, SureShotClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->moveStatus, 1);
|
||||
dst->moveStatusTurns = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadItemStatus(DataSerializer *seri, ItemStatus *dst)
|
||||
static void ReadLongTossClassStatus(DataSerializer *seri, LongTossClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->itemStatus, 1);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
}
|
||||
|
||||
static void ReadTransformStatus(DataSerializer *seri, TransformStatus *dst)
|
||||
static void ReadInvisibleClassStatus(DataSerializer *seri, InvisibleClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->transformStatus, 1);
|
||||
dst->transformStatusTurns = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadEyesightStatus(DataSerializer *seri, EyesightStatus *dst)
|
||||
static void ReadBlinkerClassStatus(DataSerializer *seri, BlinkerClassStatus *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->eyesightStatus, 1);
|
||||
dst->eyesightStatusTurns = ReadU8(seri);
|
||||
ReadBytes(seri, &dst->status, 1);
|
||||
dst->turns = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadMuzzled(DataSerializer *seri, Muzzled *dst)
|
||||
{
|
||||
ReadBytes(seri, &dst->muzzled, 1);
|
||||
dst->muzzledTurns = ReadU8(seri);
|
||||
dst->turns = ReadU8(seri);
|
||||
}
|
||||
|
||||
static void ReadMove(DataSerializer *seri, Move *dst)
|
||||
|
|
@ -1522,7 +1522,7 @@ static void WriteBytes(DataSerializer *seri, void *src, s32 numBytes)
|
|||
curByte++;
|
||||
numBytes--;
|
||||
seri->count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void InitReader(DataSerializer *seri, u8 *buffer, u32 bufLen)
|
||||
|
|
@ -1544,7 +1544,7 @@ static void ReadBytes(DataSerializer *seri, void *dst, s32 numBytes)
|
|||
curByte++;
|
||||
numBytes--;
|
||||
seri->count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void FinishSerializer(DataSerializer *seri)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ void sub_804513C(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
gDungeon->allPokemon[index] = NULL;
|
||||
gDungeon->activePokemon[index] = NULL;
|
||||
}
|
||||
|
||||
for (index = 0; index < DUNGEON_MAX_ITEMS; index++)
|
||||
|
|
@ -132,7 +132,7 @@ void sub_804522C(void) {
|
|||
{
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if(EntityExists(entity))
|
||||
{
|
||||
if(entity == gDungeon->unk181e8.cameraTarget)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Entity *GetPartnerEntity(void)
|
|||
return entity;
|
||||
}
|
||||
}
|
||||
return GetEntityFromClientType(CLIENT_TYPE_PARTNER);
|
||||
return GetEntityFromMonsterBehavior(BEHAVIOR_ALLY);
|
||||
}
|
||||
|
||||
void sub_80854D4(void)
|
||||
|
|
@ -150,15 +150,15 @@ void sub_808563C(DungeonCallback func)
|
|||
}
|
||||
}
|
||||
|
||||
Entity *GetEntityFromClientType(u8 entityType)
|
||||
Entity *GetEntityFromMonsterBehavior(u8 entityType)
|
||||
{
|
||||
Entity * entity;
|
||||
s32 index;
|
||||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
if ((EntityExists(entity)) && (GetEntInfo(entity)->clientType == entityType)) return entity;
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if ((EntityExists(entity)) && (GetEntInfo(entity)->monsterBehavior == entityType)) return entity;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -204,7 +204,7 @@ void sub_8085764(void)
|
|||
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->wildPokemon[index];
|
||||
if ((EntityExists(entity)) && (GetEntInfo(entity)->clientType == CLIENT_TYPE_PARTNER)) {
|
||||
if ((EntityExists(entity)) && (GetEntInfo(entity)->monsterBehavior == BEHAVIOR_ALLY)) {
|
||||
sub_8068FE0(entity,0x207,&stackEntity);
|
||||
}
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ void sub_80857B8(void)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
entityInfo = GetEntInfo(entity);
|
||||
if ((gDungeon->unk4 == 0) && (gDungeon->unk2 == 0)) {
|
||||
|
|
@ -303,7 +303,7 @@ void sub_8085930(s32 direction)
|
|||
entity = gDungeon->wildPokemon[index];
|
||||
if(EntityExists(entity))
|
||||
{
|
||||
if(GetEntInfo(entity)->clientType == CLIENT_TYPE_PARTNER)
|
||||
if(GetEntInfo(entity)->monsterBehavior == BEHAVIOR_ALLY)
|
||||
{
|
||||
if(direction >= NUM_DIRECTIONS)
|
||||
{
|
||||
|
|
@ -341,49 +341,49 @@ void sub_80859F0(s32 direction)
|
|||
}
|
||||
}
|
||||
|
||||
bool8 IsMovingClient(Entity *pokemon)
|
||||
bool8 ShouldRunMonsterAI(Entity *pokemon)
|
||||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
switch (pokemonInfo->clientType)
|
||||
switch (pokemonInfo->monsterBehavior)
|
||||
{
|
||||
case CLIENT_TYPE_CLIENT:
|
||||
case 0x3:
|
||||
case 0x5:
|
||||
case 0x6:
|
||||
case 0x7:
|
||||
case 0x8:
|
||||
case 0x9:
|
||||
case 0xD:
|
||||
case 0xE:
|
||||
case 0xF:
|
||||
case 0x10:
|
||||
case 0x11:
|
||||
case 0x12:
|
||||
case 0x13:
|
||||
case 0x14:
|
||||
case 0x15:
|
||||
case 0x16:
|
||||
case 0x17:
|
||||
case 0x18:
|
||||
case 0x19:
|
||||
case 0x1A:
|
||||
case 0x1B:
|
||||
case 0x1C:
|
||||
case 0x1D:
|
||||
case 0x1E:
|
||||
case 0x1F:
|
||||
case 0x20:
|
||||
case 0x21:
|
||||
case 0x22:
|
||||
case 0x23:
|
||||
case 0x24:
|
||||
case BEHAVIOR_RESCUE_TARGET:
|
||||
case BEHAVIOR_SKARMORY:
|
||||
case BEHAVIOR_5:
|
||||
case BEHAVIOR_6:
|
||||
case BEHAVIOR_MEDICHAM:
|
||||
case BEHAVIOR_ZAPDOS:
|
||||
case BEHAVIOR_MOLTRES:
|
||||
case BEHAVIOR_ARTICUNO:
|
||||
case BEHAVIOR_GROUDON_2:
|
||||
case BEHAVIOR_RAYQUAZA:
|
||||
case BEHAVIOR_16:
|
||||
case BEHAVIOR_MEWTWO:
|
||||
case BEHAVIOR_ENTEI:
|
||||
case BEHAVIOR_RAIKOU:
|
||||
case BEHAVIOR_SUICUNE:
|
||||
case BEHAVIOR_HO_OH:
|
||||
case BEHAVIOR_LATIOS:
|
||||
case BEHAVIOR_REGIROCK:
|
||||
case BEHAVIOR_REGICE:
|
||||
case BEHAVIOR_REGISTEEL:
|
||||
case BEHAVIOR_JIRACHI:
|
||||
case BEHAVIOR_LUGIA:
|
||||
case BEHAVIOR_KYOGRE:
|
||||
case BEHAVIOR_29:
|
||||
case BEHAVIOR_CELEBI:
|
||||
case BEHAVIOR_SMEARGLE:
|
||||
case BEHAVIOR_32:
|
||||
case BEHAVIOR_33:
|
||||
case BEHAVIOR_34:
|
||||
case BEHAVIOR_35:
|
||||
case BEHAVIOR_36:
|
||||
return TRUE;
|
||||
case CLIENT_TYPE_NONE:
|
||||
case CLIENT_TYPE_PARTNER:
|
||||
case CLIENT_TYPE_DONT_MOVE:
|
||||
case 0xA:
|
||||
case 0xB:
|
||||
case 0xC:
|
||||
case BEHAVIOR_FIXED_ENEMY:
|
||||
case BEHAVIOR_ALLY:
|
||||
case BEHAVIOR_DIGLETT:
|
||||
case BEHAVIOR_ALAKAZAM_1:
|
||||
case BEHAVIOR_GROUDON_1:
|
||||
case BEHAVIOR_ALAKAZAM_2:
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,16 +16,16 @@ bool8 CanSeeTarget(Entity *entity, Entity *targetEntity)
|
|||
{
|
||||
if (entity->type == ENTITY_MONSTER)
|
||||
{
|
||||
if (!CanSeeInvisibleMonsters(entity) && GetEntInfo(targetEntity)->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||
if (!CanSeeInvisibleMonsters(entity) && GetEntInfo(targetEntity)->invisibleClassStatus.status == STATUS_INVISIBLE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (GetEntInfo(entity)->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||
if (GetEntInfo(entity)->blinkerClassStatus.status == STATUS_BLINKER)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else if (GetEntInfo(targetEntity)->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||
else if (GetEntInfo(targetEntity)->invisibleClassStatus.status == STATUS_INVISIBLE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -43,16 +43,16 @@ bool8 CanTargetEntity(Entity *entity, Entity *targetEntity)
|
|||
{
|
||||
if (entity->type == ENTITY_MONSTER)
|
||||
{
|
||||
if (!CanSeeInvisibleMonsters(entity) && GetEntInfo(targetEntity)->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||
if (!CanSeeInvisibleMonsters(entity) && GetEntInfo(targetEntity)->invisibleClassStatus.status == STATUS_INVISIBLE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (GetEntInfo(entity)->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||
if (GetEntInfo(entity)->blinkerClassStatus.status == STATUS_BLINKER)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else if (GetEntInfo(targetEntity)->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||
else if (GetEntInfo(targetEntity)->invisibleClassStatus.status == STATUS_INVISIBLE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD14C); // It can only be used on land!
|
||||
}
|
||||
else {
|
||||
if (MoveMatchesChargingStatus(pokemon,move)) {
|
||||
if (MoveMatchesBideClassStatus(pokemon,move)) {
|
||||
HandleDamagingMove(pokemon,target,move,gUnknown_80F4F68,param_4);
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
|
|
@ -451,8 +451,8 @@ bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 para
|
|||
if (targetInfo->HP > targetInfo->maxHPStat) {
|
||||
targetInfo->HP = targetInfo->maxHPStat;
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],attacker,0);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],attacker,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
|
||||
SetExpMultplier(attackerInfo);
|
||||
|
||||
// $m0 and $m1 shared their HP
|
||||
|
|
@ -505,8 +505,8 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
|
|||
}
|
||||
if (isTormented)
|
||||
{
|
||||
if(entityInfo->charging.chargingStatus == STATUS_BIDE) {
|
||||
entityInfo->charging.chargingStatus = STATUS_NONE;
|
||||
if(entityInfo->bideClassStatus.status == STATUS_BIDE) {
|
||||
entityInfo->bideClassStatus.status = STATUS_NONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -590,7 +590,7 @@ bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, u32 pa
|
|||
u8 chargeStatus;
|
||||
|
||||
flag = FALSE;
|
||||
chargeStatus = GetEntInfo(target)->charging.chargingStatus;
|
||||
chargeStatus = GetEntInfo(target)->bideClassStatus.status;
|
||||
uVar3 = 0x100;
|
||||
if (chargeStatus == STATUS_DIVING) {
|
||||
uVar3 = 0x200;
|
||||
|
|
@ -624,7 +624,7 @@ bool8 sub_8057D9C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||
}
|
||||
}
|
||||
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
if (flag) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD350);
|
||||
}
|
||||
|
|
@ -728,7 +728,7 @@ bool8 sub_8057FF4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
|||
if (flashFireStatus != FLASH_FIRE_STATUS_NONE) {
|
||||
if (GetEntInfo(target)->unk152 == 0) {
|
||||
GetEntInfo(target)->unk152 = 1;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
|
||||
if (flashFireStatus == FLASH_FIRE_STATUS_MAXED) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE00); // Fire moves won't become stronger
|
||||
}
|
||||
|
|
@ -780,7 +780,7 @@ bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 param_4
|
|||
|
||||
hasGrudge = FALSE;
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
|
||||
if (entityInfo->grudge) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD2B4);
|
||||
}
|
||||
|
|
@ -852,7 +852,7 @@ bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||
|
||||
r3 = 1;
|
||||
targetInfo = GetEntInfo(target);
|
||||
if(targetInfo->charging.chargingStatus == STATUS_FLYING || targetInfo->charging.chargingStatus == STATUS_BOUNCING)
|
||||
if(targetInfo->bideClassStatus.status == STATUS_FLYING || targetInfo->bideClassStatus.status == STATUS_BOUNCING)
|
||||
r3 = 2;
|
||||
flag = HandleDamagingMove(pokemon,target,move,r3 << 8,param_4) ? TRUE : FALSE;
|
||||
return flag;
|
||||
|
|
@ -880,7 +880,7 @@ bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, Move * move, u32 pa
|
|||
{
|
||||
bool8 flag;
|
||||
|
||||
if (MoveMatchesChargingStatus(pokemon,move)) {
|
||||
if (MoveMatchesBideClassStatus(pokemon,move)) {
|
||||
flag = HandleDamagingMove(pokemon,target,move,gUnknown_80F4F50,param_4) ? TRUE : FALSE;
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
|
|
@ -985,7 +985,7 @@ bool8 sub_8058548(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||
u32 r5;
|
||||
|
||||
r5 = 0x80 << 1;
|
||||
if((GetEntInfo(pokemon)->nonVolatile.nonVolatileStatus) != STATUS_NONE)
|
||||
if((GetEntInfo(pokemon)->burnClassStatus.status) != STATUS_NONE)
|
||||
r5 = gUnknown_80F4F6C;
|
||||
flag = HandleDamagingMove(pokemon,target,move,r5,param_4) ? TRUE : FALSE;
|
||||
return flag;
|
||||
|
|
@ -1011,9 +1011,9 @@ bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para
|
|||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if ((GetEntInfo(target)->protection.protectionStatus == STATUS_REFLECT) || (GetEntInfo(target)->protection.protectionStatus == STATUS_LIGHT_SCREEN)) {
|
||||
if ((GetEntInfo(target)->reflectClassStatus.status == STATUS_REFLECT) || (GetEntInfo(target)->reflectClassStatus.status == STATUS_LIGHT_SCREEN)) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD104); // The barrier was shattered
|
||||
SendProtectionEndMessage(pokemon,target);
|
||||
EndReflectClassStatus(pokemon,target);
|
||||
flag = TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -1040,7 +1040,7 @@ bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, u32 p
|
|||
{
|
||||
bool8 flag;
|
||||
|
||||
if (MoveMatchesChargingStatus(pokemon,move)) {
|
||||
if (MoveMatchesBideClassStatus(pokemon,move)) {
|
||||
flag = HandleDamagingMove(pokemon,target,move,gUnknown_80F4F54,param_4) ? TRUE : FALSE;
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
|
|
@ -1109,9 +1109,9 @@ bool8 sub_80587E8(Entity * pokemon, Entity * target, Move * move, u32 param_4)
|
|||
{
|
||||
bool8 flag;
|
||||
|
||||
if (GetEntInfo(target)->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) {
|
||||
if (GetEntInfo(target)->burnClassStatus.status == STATUS_PARALYSIS) {
|
||||
flag = HandleDamagingMove(pokemon,target,move,0x80 << 2,param_4) ? TRUE : FALSE;
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
EndBurnClassStatus(pokemon, target);
|
||||
}
|
||||
else {
|
||||
flag = HandleDamagingMove(pokemon,target,move,0x80 << 1,param_4) ? TRUE : FALSE;
|
||||
|
|
@ -1237,7 +1237,7 @@ bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param
|
|||
{
|
||||
bool8 flag = FALSE;
|
||||
|
||||
if(MoveMatchesChargingStatus(pokemon, move))
|
||||
if(MoveMatchesBideClassStatus(pokemon, move))
|
||||
{
|
||||
if (HandleDamagingMove(pokemon, target, move, gUnknown_80F4F4C, param_4) != 0) {
|
||||
flag = TRUE;
|
||||
|
|
@ -1409,7 +1409,7 @@ bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, u32 para
|
|||
iVar4->offensiveMultipliers[index] = iVar3->offensiveMultipliers[index];
|
||||
iVar4->defensiveMultipliers[index] = iVar3->defensiveMultipliers[index];
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBD58); // It psyched itself up!
|
||||
SetExpMultplier(iVar4);
|
||||
return TRUE;
|
||||
|
|
@ -1455,7 +1455,7 @@ bool32 sub_8058F04(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
|||
iVar3 = 1;
|
||||
gDungeon->unk181e8.unk18200 = 0xc;
|
||||
gDungeon->unk181e8.unk18204 = 0;
|
||||
if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||
if (entityInfo->bideClassStatus.status == STATUS_DIGGING) {
|
||||
iVar3 = 2;
|
||||
}
|
||||
flag = HandleDamagingMove(pokemon,target,move,iVar3 << 8,param_4);
|
||||
|
|
@ -1799,7 +1799,7 @@ bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param
|
|||
s32 movePower;
|
||||
|
||||
weather = GetApparentWeather(pokemon);
|
||||
if ((weather == WEATHER_SUNNY) || (MoveMatchesChargingStatus(pokemon,move))) {
|
||||
if ((weather == WEATHER_SUNNY) || (MoveMatchesBideClassStatus(pokemon,move))) {
|
||||
movePower = gSolarBeamMovePower;
|
||||
|
||||
if (((weather == WEATHER_SANDSTORM) || (weather == WEATHER_RAIN)) || weather == WEATHER_HAIL) {
|
||||
|
|
@ -1830,7 +1830,7 @@ bool8 FlyMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4)
|
|||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if (MoveMatchesChargingStatus(pokemon,move)) {
|
||||
if (MoveMatchesBideClassStatus(pokemon,move)) {
|
||||
flag = HandleDamagingMove(pokemon,target,move,gUnknown_80F4F5C,param_4) != 0 ? TRUE : FALSE;
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
|
|
@ -1855,7 +1855,7 @@ bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4
|
|||
if (IsTileGround(GetTileAtEntitySafe(pokemon))) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD128);
|
||||
}
|
||||
else if (MoveMatchesChargingStatus(pokemon,move)) {
|
||||
else if (MoveMatchesBideClassStatus(pokemon,move)) {
|
||||
flag = HandleDamagingMove(pokemon,target,move,gUnknown_80F4F64,param_4) != 0 ? TRUE : FALSE;
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
|
|
@ -1894,7 +1894,7 @@ bool8 sub_8059928(Entity * pokemon,Entity * target,Move * move,u32 param_4)
|
|||
|
||||
iVar2 = 1;
|
||||
flag = FALSE;
|
||||
if ((u8)(GetEntInfo(target)->charging.chargingStatus - 7) <= 1){
|
||||
if ((u8)(GetEntInfo(target)->bideClassStatus.status - 7) <= 1){
|
||||
iVar2 = 2;
|
||||
}
|
||||
if (HandleDamagingMove(pokemon,target,move,iVar2 << 8,param_4) != 0)
|
||||
|
|
@ -2188,7 +2188,7 @@ bool8 sub_8059F38(Entity * pokemon,Entity * target,Move * move,u32 param_4)
|
|||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if (MoveMatchesChargingStatus(pokemon, move)) {
|
||||
if (MoveMatchesBideClassStatus(pokemon, move)) {
|
||||
if (HandleDamagingMove(pokemon, target, move, gUnknown_80F4F60, param_4) != 0) {
|
||||
flag = TRUE;
|
||||
if (sub_805727C(pokemon, target, gUnknown_80F4DCC) != 0) {
|
||||
|
|
@ -2278,8 +2278,8 @@ bool8 sub_805A120(Entity * pokemon,Entity * target, Move *move, u32 param_4)
|
|||
r8 = GetEntInfo(target);
|
||||
sp = r8;
|
||||
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
|
||||
if (HasAbility(target, ABILITY_STICKY_HOLD)) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCCE4);
|
||||
return FALSE;
|
||||
|
|
@ -2378,7 +2378,7 @@ bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||
u32 uVar2;
|
||||
|
||||
flag = FALSE;
|
||||
if (GetEntInfo(target)->charging.chargingStatus == STATUS_DIVING) {
|
||||
if (GetEntInfo(target)->bideClassStatus.status == STATUS_DIVING) {
|
||||
uVar2 = 0x200;
|
||||
}
|
||||
else
|
||||
|
|
@ -2596,8 +2596,8 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_
|
|||
|
||||
entityInfo = GetEntInfo(pokemon);
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
if (HasAbility(target, ABILITY_STICKY_HOLD))
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCCE8);
|
||||
|
|
@ -2646,7 +2646,7 @@ static void sub_805A7D4(Entity * pokemon, Entity * target, Item *item, Position
|
|||
SetEntityPixelPos(&stackEntity,(target->pos.x * 0x18 + 4) * 0x100,
|
||||
(target->pos.y * 0x18 + 4) * 0x100);
|
||||
stackEntity.spawnGenID = 0;
|
||||
SetMessageArgument(gFormatBuffer_Items[0],&stackEntity,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Items[0],&stackEntity,0);
|
||||
sub_804652C(pokemon,&stackEntity,item,1,0);
|
||||
}
|
||||
|
||||
|
|
@ -2774,7 +2774,7 @@ bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, u32 para
|
|||
flag = TRUE;
|
||||
}
|
||||
else {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC5CC);
|
||||
}
|
||||
return flag;
|
||||
|
|
@ -2887,7 +2887,7 @@ bool32 sub_805AD54(Entity * pokemon, Entity * target, Move *move, u32 param_4)
|
|||
&& GetTreatmentBetweenMonsters(pokemon,targetEntity,FALSE,FALSE) == TREATMENT_TREAT_AS_ALLY)
|
||||
{
|
||||
EntityInfo *targetInfo = GetEntInfo(targetEntity);
|
||||
if (targetInfo->clientType != CLIENT_TYPE_CLIENT && !IsClientOrTeamBase(targetInfo->joinedAt.joinedAt)) {
|
||||
if (targetInfo->monsterBehavior != BEHAVIOR_RESCUE_TARGET && !IsClientOrTeamBase(targetInfo->joinedAt.joinedAt)) {
|
||||
sub_807D148(pokemon,targetEntity,2,&target->pos);
|
||||
flag = TRUE;
|
||||
SetExpMultplier(info);
|
||||
|
|
|
|||
|
|
@ -114,20 +114,20 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_RAGE:
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_ENRAGED)
|
||||
if (pokemonInfo->bideClassStatus.status == STATUS_ENRAGED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_COUNTER:
|
||||
case MOVE_PURSUIT:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_COUNTER)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_COUNTER)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_MIRROR_MOVE:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MIRROR_MOVE)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_MIRROR_MOVE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -159,7 +159,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
break;
|
||||
case MOVE_BIDE:
|
||||
case MOVE_REVENGE:
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||
if (pokemonInfo->bideClassStatus.status == STATUS_BIDE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -181,7 +181,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
case MOVE_LOCK_ON:
|
||||
case MOVE_MIND_READER:
|
||||
if (pokemonInfo->moveStatus.moveStatus == STATUS_SURE_SHOT)
|
||||
if (pokemonInfo->sureShotClassStatus.status == STATUS_SURE_SHOT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -193,25 +193,25 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_ENDURE:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_ENDURING)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_ENDURING)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_CHARGE:
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_CHARGING)
|
||||
if (pokemonInfo->bideClassStatus.status == STATUS_CHARGING)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_MIST:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MIST)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_MIST)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_LIGHT_SCREEN:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_LIGHT_SCREEN)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_LIGHT_SCREEN)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -223,7 +223,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_INGRAIN:
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_INGRAIN || pokemonInfo->maxHPStat / 2 < pokemonInfo->HP)
|
||||
if (pokemonInfo->frozenClassStatus.status == STATUS_INGRAIN || pokemonInfo->maxHPStat / 2 < pokemonInfo->HP)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -242,7 +242,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
break;
|
||||
case MOVE_DOOM_DESIRE:
|
||||
case MOVE_FUTURE_SIGHT:
|
||||
if (pokemonInfo->moveStatus.moveStatus == STATUS_SET_DAMAGE)
|
||||
if (pokemonInfo->sureShotClassStatus.status == STATUS_SET_DAMAGE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -266,19 +266,19 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_DESTINY_BOND:
|
||||
if (pokemonInfo->linked.linkedStatus == STATUS_DESTINY_BOND)
|
||||
if (pokemonInfo->leechSeedClassStatus.status == STATUS_DESTINY_BOND)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_MIRROR_COAT:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MIRROR_COAT)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_MIRROR_COAT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_REFLECT:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_REFLECT)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_REFLECT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -290,14 +290,14 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_MAGIC_COAT:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MAGIC_COAT)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_MAGIC_COAT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_DETECT:
|
||||
case MOVE_PROTECT:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_PROTECT)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_PROTECT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -321,19 +321,19 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_SAFEGUARD:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_SAFEGUARD)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_SAFEGUARD)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_INVISIFY:
|
||||
if (pokemonInfo->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||
if (pokemonInfo->invisibleClassStatus.status == STATUS_INVISIBLE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_FOCUS_ENERGY:
|
||||
if (pokemonInfo->moveStatus.moveStatus == STATUS_FOCUS_ENERGY)
|
||||
if (pokemonInfo->sureShotClassStatus.status == STATUS_FOCUS_ENERGY)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -395,7 +395,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
case MOVE_DECOY_MAKER:
|
||||
case MOVE_FOLLOW_ME:
|
||||
case MOVE_SUBSTITUTE:
|
||||
if (gDungeon->decoyActive)
|
||||
if (gDungeon->decoyIsActive)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -432,13 +432,13 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_WISH:
|
||||
if (pokemonInfo->isNotTeamMember || pokemonInfo->protection.protectionStatus == STATUS_WISH)
|
||||
if (pokemonInfo->isNotTeamMember || pokemonInfo->reflectClassStatus.status == STATUS_WISH)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_TRANSFORM:
|
||||
if (pokemonInfo->transformStatus.transformStatus == STATUS_TRANSFORMED)
|
||||
if (pokemonInfo->invisibleClassStatus.status == STATUS_TRANSFORMED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -461,7 +461,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_SNATCH:
|
||||
if (pokemonInfo->waitingStruct.waitingStatus == STATUS_SNATCH)
|
||||
if (pokemonInfo->curseClassStatus.status == STATUS_SNATCH)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -483,7 +483,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_CONVERSION_2:
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_CONVERSION2)
|
||||
if (pokemonInfo->reflectClassStatus.status == STATUS_CONVERSION2)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -546,7 +546,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
EntityInfo *userData = GetEntInfo(user);
|
||||
EntityInfo *targetData = GetEntInfo(target);
|
||||
s32 i;
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_FROZEN && MoveCannotHitFrozen(move))
|
||||
if (targetData->frozenClassStatus.status == STATUS_FROZEN && MoveCannotHitFrozen(move))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -564,7 +564,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_YAWN:
|
||||
if (targetData->sleep.sleep == STATUS_YAWNING)
|
||||
if (targetData->sleepClassStatus.status == STATUS_YAWNING)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -574,7 +574,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_NIGHTMARE:
|
||||
if (targetData->sleep.sleep == STATUS_NIGHTMARE)
|
||||
if (targetData->sleepClassStatus.status == STATUS_NIGHTMARE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -592,7 +592,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_ENCORE:
|
||||
if (targetData->volatileStatus.volatileStatus == STATUS_ENCORE)
|
||||
if (targetData->cringeClassStatus.status == STATUS_ENCORE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -646,7 +646,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_SMOKESCREEN:
|
||||
if (targetData->moveStatus.moveStatus == STATUS_WHIFFER)
|
||||
if (targetData->sureShotClassStatus.status == STATUS_WHIFFER)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -659,7 +659,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_WILL_O_WISP:
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||
if (targetData->burnClassStatus.status == STATUS_BURN)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -682,7 +682,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
case MOVE_GLARE:
|
||||
case MOVE_STUN_SPORE:
|
||||
case MOVE_THUNDER_WAVE:
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS)
|
||||
if (targetData->burnClassStatus.status == STATUS_PARALYSIS)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -716,7 +716,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
case MOVE_BLOCK:
|
||||
case MOVE_MEAN_LOOK:
|
||||
case MOVE_SPIDER_WEB:
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||
if (targetData->frozenClassStatus.status == STATUS_SHADOW_HOLD)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -741,7 +741,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
break;
|
||||
}
|
||||
case MOVE_UPROAR:
|
||||
if (targetData->sleep.sleep == STATUS_SLEEPLESS)
|
||||
if (targetData->sleepClassStatus.status == STATUS_SLEEPLESS)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -774,7 +774,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_TAUNT:
|
||||
if (targetData->volatileStatus.volatileStatus == STATUS_TAUNTED)
|
||||
if (targetData->cringeClassStatus.status == STATUS_TAUNTED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -809,7 +809,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
case MOVE_CURSE:
|
||||
if (MonsterIsType(user, TYPE_GHOST))
|
||||
{
|
||||
if (targetData->waitingStruct.waitingStatus == STATUS_CURSED)
|
||||
if (targetData->curseClassStatus.status == STATUS_CURSED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -825,7 +825,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
break;
|
||||
case MOVE_IMPRISON:
|
||||
case MOVE_OBSERVER:
|
||||
if (targetData->volatileStatus.volatileStatus == STATUS_PAUSED)
|
||||
if (targetData->cringeClassStatus.status == STATUS_PAUSED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -837,7 +837,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_LEECH_SEED:
|
||||
if (targetData->linked.linkedStatus == STATUS_LEECH_SEED)
|
||||
if (targetData->leechSeedClassStatus.status == STATUS_LEECH_SEED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -856,34 +856,34 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
}
|
||||
break;
|
||||
case MOVE_ATTRACT:
|
||||
if (targetData->volatileStatus.volatileStatus == STATUS_INFATUATED)
|
||||
if (targetData->cringeClassStatus.status == STATUS_INFATUATED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_WRAP:
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||
if (targetData->frozenClassStatus.status == STATUS_WRAP)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_WRAPPED)
|
||||
if (targetData->frozenClassStatus.status == STATUS_WRAPPED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_TOXIC:
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||
if (targetData->burnClassStatus.status == STATUS_BADLY_POISONED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_POISON_GAS:
|
||||
case MOVE_POISONPOWDER:
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_POISONED)
|
||||
if (targetData->burnClassStatus.status == STATUS_POISONED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||
if (targetData->burnClassStatus.status == STATUS_BADLY_POISONED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -895,7 +895,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||
case MOVE_SWEET_KISS:
|
||||
case MOVE_TEETER_DANCE:
|
||||
case MOVE_TOTTER:
|
||||
if (targetData->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||
if (targetData->cringeClassStatus.status == STATUS_CONFUSED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,17 +151,17 @@ void sub_8075BA4(Entity *param_1, u8 param_2)
|
|||
{
|
||||
EntityInfo * entityInfo = GetEntInfo(param_1);
|
||||
|
||||
if ((param_2 != 0) && (entityInfo->volatileStatus.volatileStatus == STATUS_COWERING)) {
|
||||
if ((param_2 != 0) && (entityInfo->cringeClassStatus.status == STATUS_COWERING)) {
|
||||
entityInfo->action.direction = (entityInfo->action.direction + 4) & DIRECTION_MASK;
|
||||
TargetTileInFront(param_1);
|
||||
}
|
||||
else if (entityInfo->volatileStatus.volatileStatus == STATUS_CONFUSED) {
|
||||
else if (entityInfo->cringeClassStatus.status == STATUS_CONFUSED) {
|
||||
entityInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||
TargetTileInFront(param_1);
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_8075BF4(Entity * pokemon, s32 sleepTurns)
|
||||
u8 sub_8075BF4(Entity * pokemon, s32 sleepClassStatusTurns)
|
||||
{
|
||||
EntityInfo *entityInfo;
|
||||
u32 uVar4;
|
||||
|
|
@ -174,18 +174,18 @@ u8 sub_8075BF4(Entity * pokemon, s32 sleepTurns)
|
|||
{
|
||||
entityInfo = GetEntInfo(pokemon);
|
||||
|
||||
if(entityInfo->sleep.sleep != STATUS_NIGHTMARE && entityInfo->sleep.sleep != STATUS_SLEEP)
|
||||
if(entityInfo->sleepClassStatus.status != STATUS_NIGHTMARE && entityInfo->sleepClassStatus.status != STATUS_SLEEP)
|
||||
{
|
||||
entityInfo->sleep.sleep = STATUS_SLEEP;
|
||||
if ((sleepTurns != 0x7f) && HasAbility(pokemon, ABILITY_EARLY_BIRD) &&
|
||||
(sleepTurns = sleepTurns / 2, sleepTurns < 1)) {
|
||||
sleepTurns = 1;
|
||||
entityInfo->sleepClassStatus.status = STATUS_SLEEP;
|
||||
if ((sleepClassStatusTurns != 0x7f) && HasAbility(pokemon, ABILITY_EARLY_BIRD) &&
|
||||
(sleepClassStatusTurns = sleepClassStatusTurns / 2, sleepClassStatusTurns < 1)) {
|
||||
sleepClassStatusTurns = 1;
|
||||
}
|
||||
entityInfo->sleep.sleepTurns = sleepTurns;
|
||||
entityInfo->sleepClassStatus.turns = sleepClassStatusTurns;
|
||||
}
|
||||
else if(entityInfo->sleep.sleep == STATUS_SLEEP)
|
||||
else if(entityInfo->sleepClassStatus.status == STATUS_SLEEP)
|
||||
uVar4 = 1;
|
||||
else if(entityInfo->sleep.sleep == STATUS_NIGHTMARE)
|
||||
else if(entityInfo->sleepClassStatus.status == STATUS_NIGHTMARE)
|
||||
uVar4 = 2;
|
||||
EntityUpdateStatusSprites(pokemon);
|
||||
}
|
||||
|
|
@ -199,7 +199,7 @@ void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage
|
|||
|
||||
|
||||
if (!CannotSleep(pokemon,target,1,displayMessage)) {
|
||||
sleep = GetEntInfo(target)->sleep.sleep;
|
||||
sleep = GetEntInfo(target)->sleepClassStatus.status;
|
||||
if (sleep == STATUS_SLEEPLESS) {
|
||||
if (displayMessage)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB380);
|
||||
|
|
@ -226,7 +226,7 @@ void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage
|
|||
bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMessage)
|
||||
{
|
||||
if ((!EntityExists(target)) ||
|
||||
((SetMessageArgument(gFormatBuffer_Monsters[0],target,0), param_3 != 0 &&
|
||||
((SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0), param_3 != 0 &&
|
||||
(HasSafeguardStatus(pokemon,target,displayMessage))))) {
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -265,19 +265,19 @@ void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns)
|
|||
hasNightmare = FALSE;
|
||||
if (!CannotSleep(pokemon, target, 1, TRUE)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->sleep.sleep != STATUS_SLEEPLESS) {
|
||||
if (entityInfo->sleepClassStatus.status != STATUS_SLEEPLESS) {
|
||||
sub_8041EC8(target);
|
||||
if (entityInfo->sleep.sleep != STATUS_NIGHTMARE) {
|
||||
entityInfo->sleep.sleepTurns = turns;
|
||||
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleep.sleepTurns >>= 1, entityInfo->sleep.sleepTurns == 0)) {
|
||||
entityInfo->sleep.sleepTurns = 1;
|
||||
if (entityInfo->sleepClassStatus.status != STATUS_NIGHTMARE) {
|
||||
entityInfo->sleepClassStatus.turns = turns;
|
||||
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleepClassStatus.turns >>= 1, entityInfo->sleepClassStatus.turns == 0)) {
|
||||
entityInfo->sleepClassStatus.turns = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hasNightmare = TRUE;
|
||||
}
|
||||
entityInfo->sleep.sleep = STATUS_NIGHTMARE;
|
||||
entityInfo->sleepClassStatus.status = STATUS_NIGHTMARE;
|
||||
sub_806CE68(target,8);
|
||||
if (hasNightmare) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB3CC);
|
||||
|
|
@ -302,19 +302,19 @@ void NappingStatusTarget(Entity * pokemon, Entity * target, s32 turns)
|
|||
isSleeping = FALSE;
|
||||
if (!CannotSleep(pokemon, target, 0, TRUE)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->sleep.sleep != STATUS_SLEEPLESS) {
|
||||
if (entityInfo->sleepClassStatus.status != STATUS_SLEEPLESS) {
|
||||
sub_8041ED8(target);
|
||||
if (entityInfo->sleep.sleep == STATUS_NONE || entityInfo->sleep.sleep == STATUS_YAWNING) {
|
||||
entityInfo->sleep.sleepTurns = turns;
|
||||
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleep.sleepTurns >>= 1, entityInfo->sleep.sleepTurns == 0)) {
|
||||
entityInfo->sleep.sleepTurns = 1;
|
||||
if (entityInfo->sleepClassStatus.status == STATUS_NONE || entityInfo->sleepClassStatus.status == STATUS_YAWNING) {
|
||||
entityInfo->sleepClassStatus.turns = turns;
|
||||
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleepClassStatus.turns >>= 1, entityInfo->sleepClassStatus.turns == 0)) {
|
||||
entityInfo->sleepClassStatus.turns = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isSleeping = TRUE;
|
||||
}
|
||||
entityInfo->sleep.sleep = STATUS_NAPPING;
|
||||
entityInfo->sleepClassStatus.status = STATUS_NAPPING;
|
||||
sub_806CE68(target, 8);
|
||||
if (isSleeping) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB360);
|
||||
|
|
@ -339,21 +339,21 @@ void YawnedStatusTarget(Entity * pokemon, Entity * target, s32 turns)
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->sleep.sleep == STATUS_NONE) {
|
||||
entityInfo->sleep.sleep = STATUS_YAWNING;
|
||||
entityInfo->sleep.sleepTurns = turns;
|
||||
if (entityInfo->sleepClassStatus.status == STATUS_NONE) {
|
||||
entityInfo->sleepClassStatus.status = STATUS_YAWNING;
|
||||
entityInfo->sleepClassStatus.turns = turns;
|
||||
nullsub_91(target);
|
||||
sub_806CE68(target, 8);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB3E0);
|
||||
}
|
||||
else if (((entityInfo->sleep.sleep == STATUS_SLEEP) || (entityInfo->sleep.sleep == STATUS_NIGHTMARE)) || (entityInfo->sleep.sleep == STATUS_NAPPING)) {
|
||||
else if (((entityInfo->sleepClassStatus.status == STATUS_SLEEP) || (entityInfo->sleepClassStatus.status == STATUS_NIGHTMARE)) || (entityInfo->sleepClassStatus.status == STATUS_NAPPING)) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB418);
|
||||
}
|
||||
else if (entityInfo->sleep.sleep == STATUS_SLEEPLESS) {
|
||||
else if (entityInfo->sleepClassStatus.status == STATUS_SLEEPLESS) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB3F8);
|
||||
}
|
||||
else {
|
||||
if (entityInfo->sleep.sleep == STATUS_YAWNING)
|
||||
if (entityInfo->sleepClassStatus.status == STATUS_YAWNING)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB414);
|
||||
else
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB3E0);
|
||||
|
|
@ -372,15 +372,15 @@ void SleeplessStatusTarget(Entity * pokemon, Entity * target)
|
|||
}
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
if ((entityInfo->sleep.sleep == STATUS_SLEEP) || (entityInfo->sleep.sleep == STATUS_NAPPING) || (entityInfo->sleep.sleep == STATUS_NIGHTMARE)) {
|
||||
if ((entityInfo->sleepClassStatus.status == STATUS_SLEEP) || (entityInfo->sleepClassStatus.status == STATUS_NAPPING) || (entityInfo->sleepClassStatus.status == STATUS_NIGHTMARE)) {
|
||||
isAsleep = TRUE;
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
|
||||
if (entityInfo->sleep.sleep != STATUS_SLEEPLESS)
|
||||
if (entityInfo->sleepClassStatus.status != STATUS_SLEEPLESS)
|
||||
{
|
||||
entityInfo->sleep.sleep = STATUS_SLEEPLESS;
|
||||
entityInfo->sleep.sleepTurns = CalculateStatusTurns(target, gUnknown_80F4E7C, FALSE) + 1;
|
||||
entityInfo->sleepClassStatus.status = STATUS_SLEEPLESS;
|
||||
entityInfo->sleepClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E7C, FALSE) + 1;
|
||||
entityInfo->unk165 = 0xFF;
|
||||
entityInfo->unk164 = 0xFF;
|
||||
sub_8041EE8(target);
|
||||
|
|
@ -408,9 +408,9 @@ void PausedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, s32 turns
|
|||
return;
|
||||
}
|
||||
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
|
||||
if (entityInfo->volatileStatus.volatileStatus != STATUS_PAUSED) {
|
||||
entityInfo->volatileStatus.volatileStatus = STATUS_PAUSED;
|
||||
entityInfo->volatileStatus.volatileStatusTurns = turns + 1;
|
||||
if (entityInfo->cringeClassStatus.status != STATUS_PAUSED) {
|
||||
entityInfo->cringeClassStatus.status = STATUS_PAUSED;
|
||||
entityInfo->cringeClassStatus.turns = turns + 1;
|
||||
nullsub_72(target);
|
||||
if (turns == 1) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB480);
|
||||
|
|
@ -440,7 +440,7 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa
|
|||
entityInfo = GetEntInfo(target);
|
||||
if (!HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
if (HasAbility(target,ABILITY_OBLIVIOUS)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (displayMessage) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCC4C);
|
||||
}
|
||||
|
|
@ -448,9 +448,9 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa
|
|||
else
|
||||
{
|
||||
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
|
||||
if (entityInfo->volatileStatus.volatileStatus != STATUS_INFATUATED) {
|
||||
entityInfo->volatileStatus.volatileStatus = STATUS_INFATUATED;
|
||||
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1;
|
||||
if (entityInfo->cringeClassStatus.status != STATUS_INFATUATED) {
|
||||
entityInfo->cringeClassStatus.status = STATUS_INFATUATED;
|
||||
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1;
|
||||
sub_8041EF8(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB50C);
|
||||
}
|
||||
|
|
@ -501,11 +501,11 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
|
|||
else
|
||||
{
|
||||
isNotBurned = TRUE;
|
||||
if (entityInfo->nonVolatile.nonVolatileStatus != STATUS_BURN) {
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_BURN;
|
||||
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E30,TRUE) + 1;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->nonVolatile.unk4 = 0;
|
||||
if (entityInfo->burnClassStatus.status != STATUS_BURN) {
|
||||
entityInfo->burnClassStatus.status = STATUS_BURN;
|
||||
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E30,TRUE) + 1;
|
||||
entityInfo->burnClassStatus.damageCountdown = 0;
|
||||
entityInfo->burnClassStatus.unk4 = 0;
|
||||
isNotBurned = FALSE;
|
||||
if (param_3 != 0) {
|
||||
sub_8041C34(target);
|
||||
|
|
@ -587,14 +587,14 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
|
|||
{
|
||||
isNotPoisoned = TRUE;
|
||||
|
||||
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
if(entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED)
|
||||
{
|
||||
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_POISONED)
|
||||
if(entityInfo->burnClassStatus.status != STATUS_POISONED)
|
||||
{
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_POISONED;
|
||||
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E34,TRUE) + 1;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->nonVolatile.unk4 = 0;
|
||||
entityInfo->burnClassStatus.status = STATUS_POISONED;
|
||||
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E34,TRUE) + 1;
|
||||
entityInfo->burnClassStatus.damageCountdown = 0;
|
||||
entityInfo->burnClassStatus.unk4 = 0;
|
||||
isNotPoisoned = FALSE;
|
||||
sub_8041C6C(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB598);
|
||||
|
|
@ -676,12 +676,12 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM
|
|||
{
|
||||
isNotBadlyPoisoned = TRUE;
|
||||
|
||||
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
if(entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED)
|
||||
{
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_BADLY_POISONED;
|
||||
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E38,TRUE) + 1;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->nonVolatile.unk4 = 0;
|
||||
entityInfo->burnClassStatus.status = STATUS_BADLY_POISONED;
|
||||
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E38,TRUE) + 1;
|
||||
entityInfo->burnClassStatus.damageCountdown = 0;
|
||||
entityInfo->burnClassStatus.unk4 = 0;
|
||||
isNotBadlyPoisoned = FALSE;
|
||||
sub_8041C7C(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB5B4);
|
||||
|
|
@ -731,10 +731,10 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||
return;
|
||||
}
|
||||
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
entityInfo = GetEntInfo(target);
|
||||
|
||||
if ((entityInfo->immobilize.immobilizeStatus != STATUS_FROZEN) && !HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
if ((entityInfo->frozenClassStatus.status != STATUS_FROZEN) && !HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
if (HasAbility(target, ABILITY_MAGMA_ARMOR)) {
|
||||
if (displayMessage)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCDE0);
|
||||
|
|
@ -755,13 +755,13 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP || entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAP || entityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
sub_8041F08(target);
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_FROZEN;
|
||||
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E2C,TRUE) + 1;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
entityInfo->frozenClassStatus.status = STATUS_FROZEN;
|
||||
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E2C,TRUE) + 1;
|
||||
entityInfo->frozenClassStatus.damageCountdown = 0;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB610);
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
|
@ -778,19 +778,19 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s16 param_3, bool32
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage_u8))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP || entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAP || entityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA844);
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->immobilize.immobilizeStatus != STATUS_CONSTRICTION) {
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_CONSTRICTION;
|
||||
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E58,TRUE) + 1;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
entityInfo->immobilize.unk4 = param_3_s32;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->frozenClassStatus.status != STATUS_CONSTRICTION) {
|
||||
entityInfo->frozenClassStatus.status = STATUS_CONSTRICTION;
|
||||
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E58,TRUE) + 1;
|
||||
entityInfo->frozenClassStatus.damageCountdown = 0;
|
||||
entityInfo->frozenClassStatus.unk4 = param_3_s32;
|
||||
nullsub_71(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB628);
|
||||
sub_806CE94(target,8);
|
||||
|
|
@ -808,18 +808,18 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP || entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAP || entityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA844);
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->immobilize.immobilizeStatus != STATUS_SHADOW_HOLD) {
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_SHADOW_HOLD;
|
||||
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E54,TRUE) + 1;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->frozenClassStatus.status != STATUS_SHADOW_HOLD) {
|
||||
entityInfo->frozenClassStatus.status = STATUS_SHADOW_HOLD;
|
||||
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E54,TRUE) + 1;
|
||||
entityInfo->frozenClassStatus.damageCountdown = 0;
|
||||
nullsub_70(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB668);
|
||||
sub_806CE94(target,8);
|
||||
|
|
@ -837,14 +837,14 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP || entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (entityInfo->frozenClassStatus.status == STATUS_WRAP || entityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->immobilize.immobilizeStatus != STATUS_INGRAIN) {
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_INGRAIN;
|
||||
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->frozenClassStatus.status != STATUS_INGRAIN) {
|
||||
entityInfo->frozenClassStatus.status = STATUS_INGRAIN;
|
||||
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1;
|
||||
entityInfo->frozenClassStatus.damageCountdown = 0;
|
||||
nullsub_90(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6A4);
|
||||
}
|
||||
|
|
@ -871,43 +871,43 @@ void WrapTarget(Entity * pokemon, Entity * target)
|
|||
}
|
||||
pokemonEntityData = GetEntInfo(pokemon);
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
if ((u8)(pokemonEntityData->immobilize.immobilizeStatus - 3U) > 1) {
|
||||
if ((targetEntityInfo->immobilize.immobilizeStatus != STATUS_WRAP))
|
||||
if ((u8)(pokemonEntityData->frozenClassStatus.status - 3U) > 1) {
|
||||
if ((targetEntityInfo->frozenClassStatus.status != STATUS_WRAP))
|
||||
{
|
||||
if(targetEntityInfo->immobilize.immobilizeStatus != STATUS_WRAPPED) {
|
||||
pokemonEntityData->immobilize.immobilizeStatus = STATUS_WRAP;
|
||||
pokemonEntityData->immobilize.immobilizeStatusTurns = 0x7f;
|
||||
pokemonEntityData->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
targetEntityInfo->immobilize.immobilizeStatus = STATUS_WRAPPED;
|
||||
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E5C, TRUE) + 1;
|
||||
targetEntityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
if(targetEntityInfo->frozenClassStatus.status != STATUS_WRAPPED) {
|
||||
pokemonEntityData->frozenClassStatus.status = STATUS_WRAP;
|
||||
pokemonEntityData->frozenClassStatus.turns = 0x7f;
|
||||
pokemonEntityData->frozenClassStatus.damageCountdown = 0;
|
||||
targetEntityInfo->frozenClassStatus.status = STATUS_WRAPPED;
|
||||
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E5C, TRUE) + 1;
|
||||
targetEntityInfo->frozenClassStatus.damageCountdown = 0;
|
||||
iVar5 = &pokemonEntityData->unk9C;
|
||||
piVar3 = &gDungeon->unk37F4;
|
||||
*iVar5 = *piVar3;
|
||||
targetEntityInfo->unk9C = *piVar3;
|
||||
*piVar3 +=1;
|
||||
nullsub_69(pokemon, target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6D8);
|
||||
sub_806CE94(target,8);
|
||||
goto _08076C98;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAP) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
if (pokemonEntityData->frozenClassStatus.status == STATUS_WRAP) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6FC);
|
||||
}
|
||||
if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAP) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->frozenClassStatus.status == STATUS_WRAP) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6FC);
|
||||
}
|
||||
if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
if (pokemonEntityData->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB718);
|
||||
}
|
||||
if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB718);
|
||||
}
|
||||
_08076C98:
|
||||
|
|
@ -922,12 +922,12 @@ void sub_8076CB4(s32 param_1)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
entityInfo = GetEntInfo(entity);
|
||||
if (entityInfo->unk9C == param_1) {
|
||||
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||
if ((u8)(entityInfo->frozenClassStatus.status - 3U) < 2) {
|
||||
entityInfo->frozenClassStatus.status = STATUS_NONE;
|
||||
}
|
||||
entityInfo->unk9C = 0;
|
||||
}
|
||||
|
|
@ -946,19 +946,19 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target)
|
|||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||
sub_8041C08(target);
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
if ((u8)(targetEntityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||
if ((u8)(targetEntityInfo->frozenClassStatus.status - 3U) < 2) {
|
||||
sub_8076CB4(targetEntityInfo->unk9C);
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->immobilize.immobilizeStatus != STATUS_PETRIFIED) {
|
||||
targetEntityInfo->immobilize.immobilizeStatus = STATUS_PETRIFIED;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->frozenClassStatus.status != STATUS_PETRIFIED) {
|
||||
targetEntityInfo->frozenClassStatus.status = STATUS_PETRIFIED;
|
||||
if (targetEntityInfo->isTeamLeader) {
|
||||
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EBC,TRUE) + 1;
|
||||
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EBC,TRUE) + 1;
|
||||
}
|
||||
else {
|
||||
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EC0,TRUE) + 1;
|
||||
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EC0,TRUE) + 1;
|
||||
}
|
||||
targetEntityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
targetEntityInfo->frozenClassStatus.damageCountdown = 0;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB7BC);
|
||||
|
||||
}
|
||||
|
|
@ -1003,19 +1003,19 @@ void LowerAttackStageTarget(Entity * pokemon, Entity * target, s32 index, s32 de
|
|||
return;
|
||||
}
|
||||
if (HasHeldItem(target, ITEM_TWIST_BAND)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD550);
|
||||
}
|
||||
else {
|
||||
if ((!HasAbility(target, ABILITY_HYPER_CUTTER)) || (index != STAT_STAGE_ATK)) goto _08076EE4;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA60);
|
||||
}
|
||||
}
|
||||
else {
|
||||
_08076EE4:
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
sub_8041F28(target,index);
|
||||
if (decrement == 1) {
|
||||
strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0E4);
|
||||
|
|
@ -1055,7 +1055,7 @@ void LowerDefenseStageTarget(Entity * pokemon, Entity * target, s32 index, s32 d
|
|||
}
|
||||
if (!param_5 || !sub_8071728(pokemon,target,displayMessage)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
sub_8041F4C(target,index);
|
||||
if (decrement == 1) {
|
||||
strcpy(gFormatBuffer_Items[1],*gUnknown_80FC0E4);
|
||||
|
|
@ -1088,7 +1088,7 @@ void RaiseAttackStageTarget(Entity * pokemon, Entity * target, s32 index, s32 in
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
sub_8041F70(target,index);
|
||||
if (index != STAT_STAGE_ATK) {
|
||||
strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0C8);
|
||||
|
|
@ -1128,7 +1128,7 @@ void RaiseDefenseStageTarget(Entity * pokemon, Entity * target, s32 index, s32 i
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
sub_8041F94(target,index);
|
||||
if (index != STAT_STAGE_DEF) {
|
||||
strcpy(gFormatBuffer_Items[0],*gUnknown_80FC0AC);
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ static void PromptNewQuestion(void)
|
|||
|
||||
static void PrintPersonalityTypeDescription(void)
|
||||
{
|
||||
CopyMonsterNametoBuffer(gFormatBuffer_Monsters[0], sPersonalityTestTracker->StarterID);
|
||||
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[0], sPersonalityTestTracker->StarterID);
|
||||
CreateDialogueBoxAndPortrait(sPersonalityTypeDescriptionTable[sPersonalityTestTracker->playerNature], 0, 0, 0x101);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ unkStruct_203B45C *GetRecruitedPokemon(void)
|
|||
void InitializeRecruitedPokemon(void)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
|
||||
for(index = 0; index < NUM_MONSTERS; index++)
|
||||
{
|
||||
gRecruitedPokemonRef->pokemon[index].unk0 = 0;
|
||||
|
|
@ -51,7 +51,7 @@ void InitializeRecruitedPokemon(void)
|
|||
}
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/wQbZB
|
||||
// https://decomp.me/scratch/wQbZB
|
||||
|
||||
NAKED
|
||||
void sub_808CE74(s16 species, bool8 isLeader, u8 *name)
|
||||
|
|
@ -140,7 +140,7 @@ void sub_808CE74(s16 species, bool8 isLeader, u8 *name)
|
|||
"\tadd r4, sp, 0x58\n"
|
||||
"\tadds r0, r4, 0\n"
|
||||
"\tadds r1, r7, 0\n"
|
||||
"\tbl CopyMonsterNametoBuffer\n"
|
||||
"\tbl CopyMonsterNameToBuffer\n"
|
||||
"\tadd r0, sp, 0x4C\n"
|
||||
"\tadds r1, r4, 0\n"
|
||||
"\tmovs r2, 0xA\n"
|
||||
|
|
@ -228,7 +228,7 @@ void sub_808CE74(s16 species, bool8 isLeader, u8 *name)
|
|||
"_0808CFCC: .4byte gRecruitedPokemonRef");
|
||||
}
|
||||
|
||||
void sub_808CFD0(PokemonStruct1 *pokemon, s16 _species, u8* name, u32 _itemID, DungeonLocation *location, u16 *moveID)
|
||||
void sub_808CFD0(PokemonStruct1 *pokemon, s16 _species, u8* name, u32 _itemID, DungeonLocation *location, u16 *moveID)
|
||||
{
|
||||
u8 name_buffer[20];
|
||||
s32 i;
|
||||
|
|
@ -276,7 +276,7 @@ void sub_808CFD0(PokemonStruct1 *pokemon, s16 _species, u8* name, u32 _itemID, D
|
|||
if (name == NULL) {
|
||||
// HACK
|
||||
register u8 *buffer asm("r0") = name_buffer;
|
||||
CopyMonsterNametoBuffer(buffer, species);
|
||||
CopyMonsterNameToBuffer(buffer, species);
|
||||
BoundedCopyStringtoBuffer(pokemon->name, name_buffer, POKEMON_NAME_LENGTH);
|
||||
}
|
||||
else {
|
||||
|
|
@ -353,6 +353,6 @@ void sub_808D144(PokemonStruct1 *pokemon, struct unkStruct_808D144 *r1)
|
|||
for(i = 0; i < POKEMON_NAME_LENGTH; i++)
|
||||
{
|
||||
pokemon->name[i] = r1->name[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ bool8 ComparePokemonNames(s16 a1, s16 a2)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void CopyMonsterNametoBuffer(u8 * buffer, s16 index)
|
||||
void CopyMonsterNameToBuffer(u8 * buffer, s16 index)
|
||||
{
|
||||
strncpy(buffer, gMonsterParameters[index].species, 0x14);
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ u8 GetRegenSpeed(s16 index)
|
|||
return ((u8)(gMonsterParameters[index].regenSpeed) << 25) >> 24;
|
||||
}
|
||||
|
||||
bool8 CanMove(s16 index)
|
||||
bool8 GetCanMoveFlag(s16 index)
|
||||
{
|
||||
return gMonsterParameters[index].canMove;
|
||||
}
|
||||
|
|
|
|||
254
src/status.c
254
src/status.c
|
|
@ -213,7 +213,7 @@ void UpdateFlashFireBoost(Entity * pokemon, Entity *target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
flashFireBoost = UpdateFlashFireBoost_sub(entityInfo);
|
||||
if (entityInfo->flashFireBoost != flashFireBoost) {
|
||||
entityInfo->flashFireBoost = flashFireBoost;
|
||||
|
|
@ -243,21 +243,21 @@ void ChangeAttackMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage
|
|||
}
|
||||
|
||||
if ((HasHeldItem(target,ITEM_TWIST_BAND)) && (param_4 < 0x100)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD550);
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasAbility(target, ABILITY_HYPER_CUTTER) && (statStage == STAT_STAGE_ATK) && (param_4 < 0x100)) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA60);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
oldMulti = entityInfo->offensiveMultipliers[statStage];
|
||||
|
||||
if (param_4 < 0x100) {
|
||||
|
|
@ -308,7 +308,7 @@ void ChangeDefenseMultiplierTarget(Entity *pokemon, Entity *target, u32 statStag
|
|||
}
|
||||
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
oldMulti = entityInfo->defensiveMultipliers[statStage];
|
||||
|
||||
if (param_4 < 0x100) {
|
||||
|
|
@ -345,7 +345,7 @@ void RaiseAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
sub_8042040(target,statStage);
|
||||
if (statStage != STAT_STAGE_ACCURACY) {
|
||||
strcpy(gFormatBuffer_Items[0],*gUnknown_80FC090);
|
||||
|
|
@ -379,13 +379,13 @@ void LowerAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage,
|
|||
if (HasAbility(target, ABILITY_KEEN_EYE) && (statStage == STAT_STAGE_ACCURACY)){
|
||||
if(displayMessage)
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCA64);
|
||||
}
|
||||
}
|
||||
else {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
sub_8042060(target,statStage);
|
||||
if (entityInfo->hitChanceStages[statStage] != 0) {
|
||||
entityInfo->hitChanceStages[statStage]--;
|
||||
|
|
@ -407,17 +407,17 @@ void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage)
|
|||
if (EntityExists(target)) {
|
||||
if (!HasSafeguardStatus(pokemon, target, displayMessage)) {
|
||||
if (HasAbility(target, ABILITY_INNER_FOCUS)){
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if(displayMessage)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCC18);
|
||||
}
|
||||
else {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if(entityInfo->volatileStatus.volatileStatus != STATUS_CRINGE)
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if(entityInfo->cringeClassStatus.status != STATUS_CRINGE)
|
||||
{
|
||||
entityInfo->volatileStatus.volatileStatus = STATUS_CRINGE;
|
||||
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
|
||||
entityInfo->cringeClassStatus.status = STATUS_CRINGE;
|
||||
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
|
||||
sub_80420A0(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB2E0);
|
||||
}
|
||||
|
|
@ -442,7 +442,7 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) {
|
||||
if (HasAbility(target, ABILITY_LIMBER)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (displayMessage) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FCBF8);
|
||||
}
|
||||
|
|
@ -451,12 +451,12 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
|
|||
{
|
||||
bVar6 = TRUE;
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS) {
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_PARALYSIS;
|
||||
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E50,TRUE) + 1;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->nonVolatile.unk4 = 0;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->burnClassStatus.status != STATUS_PARALYSIS) {
|
||||
entityInfo->burnClassStatus.status = STATUS_PARALYSIS;
|
||||
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E50,TRUE) + 1;
|
||||
entityInfo->burnClassStatus.damageCountdown = 0;
|
||||
entityInfo->burnClassStatus.unk4 = 0;
|
||||
bVar6 = FALSE;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB2AC);
|
||||
sub_8041C1C(target);
|
||||
|
|
@ -503,7 +503,7 @@ void RaiseMovementSpeedTarget(Entity * pokemon, Entity * target, s32 turns, bool
|
|||
turns = CalculateStatusTurns(target,gUnknown_80F4E40,FALSE) + 1;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
movSpeed = CalcSpeedStage(target);
|
||||
if (movSpeed == MAX_SPEED_STAGE) {
|
||||
if (displayMessage)
|
||||
|
|
@ -548,7 +548,7 @@ void LowerMovementSpeedTarget(Entity * pokemon, Entity * target, s32 levels, boo
|
|||
return;
|
||||
}
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
movSpeed = CalcSpeedStage(target);
|
||||
if (movSpeed == 0) {
|
||||
if (displayMessage)
|
||||
|
|
@ -591,7 +591,7 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage
|
|||
return;
|
||||
}
|
||||
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (HasHeldItem(target,ITEM_PERSIM_BAND)) {
|
||||
if (displayMessage)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD500);
|
||||
|
|
@ -606,9 +606,9 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage
|
|||
{
|
||||
sub_8041BE8(target);
|
||||
entityInfo = GetEntInfo(target);
|
||||
if (entityInfo->volatileStatus.volatileStatus != STATUS_CONFUSED) {
|
||||
entityInfo->volatileStatus.volatileStatus = STATUS_CONFUSED;
|
||||
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E4C,TRUE) + 1;
|
||||
if (entityInfo->cringeClassStatus.status != STATUS_CONFUSED) {
|
||||
entityInfo->cringeClassStatus.status = STATUS_CONFUSED;
|
||||
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E4C,TRUE) + 1;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB25C);
|
||||
}
|
||||
else {
|
||||
|
|
@ -625,10 +625,10 @@ void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->volatileStatus.volatileStatus != STATUS_COWERING) {
|
||||
entityInfo->volatileStatus.volatileStatus = STATUS_COWERING;
|
||||
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->cringeClassStatus.status != STATUS_COWERING) {
|
||||
entityInfo->cringeClassStatus.status = STATUS_COWERING;
|
||||
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1;
|
||||
sub_8041BF8(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB940);
|
||||
}
|
||||
|
|
@ -682,7 +682,7 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo
|
|||
EntityUpdateStatusSprites(target);
|
||||
gFormatArgs[0] = HP;
|
||||
gFormatArgs[1] = maxHPStat;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if ((HP == 0) && (maxHPStat == 0)) {
|
||||
if (displayMessage_u8)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB204); // $m0's HP remained unchanged
|
||||
|
|
@ -729,7 +729,7 @@ void HandleScannerOrb(Entity* pokemon, Entity* target)
|
|||
{
|
||||
GetEntInfo(target)->scanning = TRUE;
|
||||
nullsub_75(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAEA0); // Item locations became evident
|
||||
sub_803F580(0);
|
||||
sub_8040A84();
|
||||
|
|
@ -754,7 +754,7 @@ void HandleStairsOrb(Entity* pokemon, Entity* target)
|
|||
{
|
||||
GetEntInfo(target)->stairSpotter = TRUE;
|
||||
nullsub_76(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAEC8);
|
||||
sub_803F580(0);
|
||||
sub_8040A84();
|
||||
|
|
@ -774,7 +774,7 @@ void HandleRadarOrb(Entity* pokemon, Entity* target)
|
|||
{
|
||||
GetEntInfo(target)->powerEars = TRUE;
|
||||
nullsub_77(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAFAC);
|
||||
sub_803F580(0);
|
||||
sub_8040A84();
|
||||
|
|
@ -800,23 +800,23 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||
if (HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
return;
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (MonsterIsType(target, TYPE_GRASS)) {
|
||||
if (displayMessage)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gPtrCantLeechSeedMonMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(entityInfo->linked.linkedStatus)
|
||||
switch(entityInfo->leechSeedClassStatus.status)
|
||||
{
|
||||
case STATUS_DESTINY_BOND:
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAA8C);
|
||||
default:
|
||||
entityInfo->linked.linkedStatus = STATUS_LEECH_SEED;
|
||||
entityInfo->linked.linkedStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB0, TRUE) + 1;
|
||||
entityInfo->linked.linkedStatusDamageCountdown = 0;
|
||||
entityInfo->leechSeedClassStatus.status = STATUS_LEECH_SEED;
|
||||
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EB0, TRUE) + 1;
|
||||
entityInfo->leechSeedClassStatus.damageCountdown = 0;
|
||||
nullsub_78(target);
|
||||
entityInfo->linked.unk8 = 0xff;
|
||||
entityInfo->leechSeedClassStatus.unk8 = 0xff;
|
||||
break;
|
||||
case STATUS_LEECH_SEED:
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE7C);
|
||||
|
|
@ -824,10 +824,10 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||
}
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
if (pokemon == gDungeon->allPokemon[index]) {
|
||||
entityInfo->linked.unk8 = index;
|
||||
if (pokemon == gDungeon->activePokemon[index]) {
|
||||
entityInfo->leechSeedClassStatus.unk8 = index;
|
||||
entityInfo2 = GetEntInfo(pokemon);
|
||||
entityInfo->linked.unk4 = entityInfo2->unk98;
|
||||
entityInfo->leechSeedClassStatus.unk4 = entityInfo2->unk98;
|
||||
}
|
||||
}
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE58);
|
||||
|
|
@ -847,14 +847,14 @@ void sub_8078084(Entity * pokemon)
|
|||
entityInfo = GetEntInfo(pokemon);
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
target = gDungeon->allPokemon[index];
|
||||
target = gDungeon->activePokemon[index];
|
||||
if (EntityExists(target)) {
|
||||
entityInfo2 = GetEntInfo(target);
|
||||
if((u8)(entityInfo2->linked.linkedStatus - 1) <= 1)
|
||||
if((u8)(entityInfo2->leechSeedClassStatus.status - 1) <= 1)
|
||||
{
|
||||
if(entityInfo2->linked.unk4 == entityInfo->unk98)
|
||||
if(entityInfo2->leechSeedClassStatus.unk4 == entityInfo->unk98)
|
||||
{
|
||||
entityInfo2->linked.linkedStatus = STATUS_NONE;
|
||||
entityInfo2->leechSeedClassStatus.status = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
|
|
@ -867,24 +867,24 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
|
|||
EntityInfo *entityInfo;
|
||||
EntityInfo *entityInfo2;
|
||||
s32 index;
|
||||
u8 *linkedStatus;
|
||||
u8 *status;
|
||||
s32 zero;
|
||||
|
||||
if (((EntityExists(target)) && (GetEntityType(pokemon) == ENTITY_MONSTER)) &&
|
||||
(GetEntityType(target) == ENTITY_MONSTER)) {
|
||||
entityInfo = GetEntInfo(pokemon);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
linkedStatus = &entityInfo->linked.linkedStatus;
|
||||
if (entityInfo->linked.linkedStatus != STATUS_DESTINY_BOND)
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
status = &entityInfo->leechSeedClassStatus.status;
|
||||
if (entityInfo->leechSeedClassStatus.status != STATUS_DESTINY_BOND)
|
||||
{
|
||||
if (entityInfo->linked.linkedStatus == STATUS_LEECH_SEED)
|
||||
if (entityInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED)
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA79C);
|
||||
zero = 0;
|
||||
*linkedStatus = STATUS_DESTINY_BOND;
|
||||
entityInfo->linked.linkedStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF0,TRUE) + 1;
|
||||
entityInfo->linked.linkedStatusDamageCountdown = zero;
|
||||
*status = STATUS_DESTINY_BOND;
|
||||
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EF0,TRUE) + 1;
|
||||
entityInfo->leechSeedClassStatus.damageCountdown = zero;
|
||||
nullsub_74(target);
|
||||
entityInfo->linked.unk8 = 0xff;
|
||||
entityInfo->leechSeedClassStatus.unk8 = 0xff;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -893,10 +893,10 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
|
|||
}
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
if (target == gDungeon->allPokemon[index]) {
|
||||
entityInfo->linked.unk8 = index;
|
||||
if (target == gDungeon->activePokemon[index]) {
|
||||
entityInfo->leechSeedClassStatus.unk8 = index;
|
||||
entityInfo2 = GetEntInfo(target);
|
||||
entityInfo->linked.unk4 = entityInfo2->unk98;
|
||||
entityInfo->leechSeedClassStatus.unk4 = entityInfo2->unk98;
|
||||
}
|
||||
}
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBB4C);
|
||||
|
|
@ -910,10 +910,10 @@ void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->moveStatus.moveStatus != STATUS_SURE_SHOT) {
|
||||
entityInfo->moveStatus.moveStatus = STATUS_SURE_SHOT;
|
||||
entityInfo->moveStatus.moveStatusTurns = turns + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->sureShotClassStatus.status != STATUS_SURE_SHOT) {
|
||||
entityInfo->sureShotClassStatus.status = STATUS_SURE_SHOT;
|
||||
entityInfo->sureShotClassStatus.turns = turns + 1;
|
||||
sub_8041CDC(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB73C);
|
||||
}
|
||||
|
|
@ -930,10 +930,10 @@ void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns)
|
|||
|
||||
if (EntityExists(target) && !HasSafeguardStatus(pokemon, target, TRUE)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->moveStatus.moveStatus != STATUS_WHIFFER) {
|
||||
entityInfo->moveStatus.moveStatus = STATUS_WHIFFER;
|
||||
entityInfo->moveStatus.moveStatusTurns = turns + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->sureShotClassStatus.status != STATUS_WHIFFER) {
|
||||
entityInfo->sureShotClassStatus.status = STATUS_WHIFFER;
|
||||
entityInfo->sureShotClassStatus.turns = turns + 1;
|
||||
sub_8041CEC(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB780);
|
||||
}
|
||||
|
|
@ -950,10 +950,10 @@ void FixedDamageStatusTarget(Entity *pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->moveStatus.moveStatus != STATUS_SET_DAMAGE) {
|
||||
entityInfo->moveStatus.moveStatus = STATUS_SET_DAMAGE;
|
||||
entityInfo->moveStatus.moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC4, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->sureShotClassStatus.status != STATUS_SET_DAMAGE) {
|
||||
entityInfo->sureShotClassStatus.status = STATUS_SET_DAMAGE;
|
||||
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EC4, FALSE) + 1;
|
||||
nullsub_79(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB8BC);
|
||||
}
|
||||
|
|
@ -970,10 +970,10 @@ void FocusEnergyStatusTarget(Entity *pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->moveStatus.moveStatus != STATUS_FOCUS_ENERGY) {
|
||||
entityInfo->moveStatus.moveStatus = STATUS_FOCUS_ENERGY;
|
||||
entityInfo->moveStatus.moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC8, FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->sureShotClassStatus.status != STATUS_FOCUS_ENERGY) {
|
||||
entityInfo->sureShotClassStatus.status = STATUS_FOCUS_ENERGY;
|
||||
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EC8, FALSE) + 1;
|
||||
nullsub_80(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB900);
|
||||
}
|
||||
|
|
@ -995,37 +995,37 @@ void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3)
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->curseClassStatus.status == STATUS_DECOY) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB994);
|
||||
}
|
||||
else {
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if ((((EntityExists(entity)) && (target != entity)) &&
|
||||
(u8)(GetEntInfo(entity)->waitingStruct.waitingStatus - 2U) < 2)) {
|
||||
SendWaitingEndMessage(pokemon,entity,STATUS_NONE);
|
||||
(u8)(GetEntInfo(entity)->curseClassStatus.status - 2U) < 2)) {
|
||||
EndCurseClassStatus(pokemon,entity,STATUS_NONE);
|
||||
sub_803E46C(0x2a);
|
||||
}
|
||||
}
|
||||
sub_8041D38(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->waitingStruct.waitingStatus != STATUS_NONE) {
|
||||
SendWaitingEndMessage(pokemon,target, STATUS_DECOY);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->curseClassStatus.status != STATUS_NONE) {
|
||||
EndCurseClassStatus(pokemon,target, STATUS_DECOY);
|
||||
}
|
||||
targetEntityInfo->waitingStruct.waitingStatus = STATUS_DECOY;
|
||||
targetEntityInfo->waitingStruct.enemyDecoy = GetEntInfo(pokemon)->isNotTeamMember;
|
||||
targetEntityInfo->waitingStruct.unk2 = param_3;
|
||||
targetEntityInfo->waitingStruct.waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED0,TRUE) + 1;
|
||||
targetEntityInfo->waitingStruct.curseDamageCountdown = 0;
|
||||
targetEntityInfo->curseClassStatus.status = STATUS_DECOY;
|
||||
targetEntityInfo->curseClassStatus.applierNonTeamMemberFlag = GetEntInfo(pokemon)->isNotTeamMember;
|
||||
targetEntityInfo->curseClassStatus.unk2 = param_3;
|
||||
targetEntityInfo->curseClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4ED0,TRUE) + 1;
|
||||
targetEntityInfo->curseClassStatus.damageCountdown = 0;
|
||||
sub_806CCB4(target,sub_806CEBC(target));
|
||||
gDungeon->decoyActive = TRUE;
|
||||
gDungeon->decoyIsActive = TRUE;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB978);
|
||||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity2 = gDungeon->allPokemon[index];
|
||||
entity2 = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity2)) {
|
||||
entityInfo = GetEntInfo(entity2);
|
||||
entityInfo->aiTarget.aiObjective = AI_STAND_STILL;
|
||||
|
|
@ -1033,7 +1033,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3)
|
|||
entityInfo->aiTarget.aiTargetSpawnGenID = 0;
|
||||
if (!entityInfo->isTeamLeader) {
|
||||
action = entityInfo->action;
|
||||
MoveIfPossible(entity2, TRUE);
|
||||
AIMovement(entity2, TRUE);
|
||||
entityInfo->action = action;
|
||||
}
|
||||
}
|
||||
|
|
@ -1058,19 +1058,19 @@ void CurseStatusTarget(Entity *pokemon, Entity * target)
|
|||
if (HasSafeguardStatus(pokemon,target, TRUE)) {
|
||||
return;
|
||||
}
|
||||
SendWaitingEndMessage(pokemon,target,STATUS_CURSED);
|
||||
EndCurseClassStatus(pokemon,target,STATUS_CURSED);
|
||||
sub_8041D48(target);
|
||||
HP = pokemonEntityData->HP / 2;
|
||||
pokemonEntityData->HP = HP;
|
||||
if (HP == 0) {
|
||||
pokemonEntityData->HP = 1;
|
||||
}
|
||||
if (targetEntityInfo->waitingStruct.waitingStatus != STATUS_CURSED) {
|
||||
targetEntityInfo->waitingStruct.waitingStatus = STATUS_CURSED;
|
||||
targetEntityInfo->waitingStruct.waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA4,TRUE) + 1;
|
||||
targetEntityInfo->waitingStruct.curseDamageCountdown = 0;
|
||||
if (targetEntityInfo->curseClassStatus.status != STATUS_CURSED) {
|
||||
targetEntityInfo->curseClassStatus.status = STATUS_CURSED;
|
||||
targetEntityInfo->curseClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EA4,TRUE) + 1;
|
||||
targetEntityInfo->curseClassStatus.damageCountdown = 0;
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB004);
|
||||
}
|
||||
else {
|
||||
|
|
@ -1090,27 +1090,27 @@ void SnatchStatusTarget(Entity * pokemon, Entity * target)
|
|||
EntityInfo *targetEntityInfo;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
SendWaitingEndMessage(pokemon,target,STATUS_SNATCH);
|
||||
EndCurseClassStatus(pokemon,target,STATUS_SNATCH);
|
||||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
if ((EntityExists(entity)) && (GetEntInfo(entity)->waitingStruct.waitingStatus == STATUS_SNATCH)) {
|
||||
SendWaitingEndMessage(pokemon, entity, STATUS_NONE);
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if ((EntityExists(entity)) && (GetEntInfo(entity)->curseClassStatus.status == STATUS_SNATCH)) {
|
||||
EndCurseClassStatus(pokemon, entity, STATUS_NONE);
|
||||
}
|
||||
}
|
||||
nullsub_81(target);
|
||||
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
if (targetEntityInfo->waitingStruct.waitingStatus != STATUS_SNATCH) {
|
||||
targetEntityInfo->waitingStruct.waitingStatus = STATUS_SNATCH;
|
||||
targetEntityInfo->waitingStruct.waitingStatusTurns= CalculateStatusTurns(target,gUnknown_80F4EA8,FALSE) + 1;
|
||||
targetEntityInfo->waitingStruct.curseDamageCountdown = 0;
|
||||
if (targetEntityInfo->curseClassStatus.status != STATUS_SNATCH) {
|
||||
targetEntityInfo->curseClassStatus.status = STATUS_SNATCH;
|
||||
targetEntityInfo->curseClassStatus.turns= CalculateStatusTurns(target,gUnknown_80F4EA8,FALSE) + 1;
|
||||
targetEntityInfo->curseClassStatus.damageCountdown = 0;
|
||||
}
|
||||
|
||||
gDungeon->snatchPokemon = target;
|
||||
gDungeon->unk17B3C = targetEntityInfo->unk98;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB01C);
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
|
@ -1122,10 +1122,10 @@ void TauntStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->volatileStatus.volatileStatus != STATUS_TAUNTED) {
|
||||
entityInfo->volatileStatus.volatileStatus = STATUS_TAUNTED;
|
||||
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->cringeClassStatus.status != STATUS_TAUNTED) {
|
||||
entityInfo->cringeClassStatus.status = STATUS_TAUNTED;
|
||||
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1;
|
||||
nullsub_73(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB9F0);
|
||||
}
|
||||
|
|
@ -1142,7 +1142,7 @@ void HandleStockpile(Entity * pokemon, Entity * target)
|
|||
|
||||
if ((EntityExists(target))) {
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->stockpileStage < MAX_STOCKPILE_STAGE) {
|
||||
entityInfo->stockpileStage++;
|
||||
sub_804178C(1);
|
||||
|
|
@ -1163,13 +1163,13 @@ void InvisibleStatusTarget(Entity * pokemon, Entity * target)
|
|||
|
||||
if (EntityExists(target)) {
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
if (targetEntityInfo->transformStatus.transformStatus == STATUS_TRANSFORMED) {
|
||||
if (targetEntityInfo->invisibleClassStatus.status == STATUS_TRANSFORMED) {
|
||||
SendTransformEndMessage(pokemon,target);
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->transformStatus.transformStatus != STATUS_INVISIBLE) {
|
||||
targetEntityInfo->transformStatus.transformStatus = STATUS_INVISIBLE;
|
||||
targetEntityInfo->transformStatus.transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EE4,FALSE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (targetEntityInfo->invisibleClassStatus.status != STATUS_INVISIBLE) {
|
||||
targetEntityInfo->invisibleClassStatus.status = STATUS_INVISIBLE;
|
||||
targetEntityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EE4,FALSE) + 1;
|
||||
sub_8041D84(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBA80);
|
||||
}
|
||||
|
|
@ -1187,7 +1187,7 @@ void PerishSongTarget(Entity * pokemon, Entity * target)
|
|||
if (EntityExists(target) && !HasSafeguardStatus(pokemon, target, TRUE)) {
|
||||
nullsub_82(target);
|
||||
entityInfo = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->perishSongTurns == 0) {
|
||||
entityInfo->perishSongTurns = CalculateStatusTurns(target,gUnknown_80F4EEC,FALSE) + 1;
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBB04);
|
||||
|
|
@ -1213,14 +1213,14 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target)
|
|||
if ((EntityInfo->moves.moves[index].moveFlags & MOVE_FLAG_EXISTS) && (movePtr->moveFlags & MOVE_FLAG_LAST_USED)) break;
|
||||
}
|
||||
if ((index == MAX_MON_MOVES) && ((EntityInfo->moves.struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBBD4);
|
||||
}
|
||||
else {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (EntityInfo->volatileStatus.volatileStatus != STATUS_ENCORE) {
|
||||
EntityInfo->volatileStatus.volatileStatus = STATUS_ENCORE;
|
||||
EntityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1;
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (EntityInfo->cringeClassStatus.status != STATUS_ENCORE) {
|
||||
EntityInfo->cringeClassStatus.status = STATUS_ENCORE;
|
||||
EntityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1;
|
||||
nullsub_83(target);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBB94);
|
||||
}
|
||||
|
|
@ -1247,7 +1247,7 @@ void sub_8078A58(Entity *pokemon, Entity *target, s32 param_3, s32 param_4)
|
|||
bellyBefore = targetInfo->maxBelly;
|
||||
targetInfo->maxBelly = FixedPoint_Subtract(bellyBefore, sp0);
|
||||
targetInfo->belly = FixedPoint_Min(targetInfo->belly, targetInfo->maxBelly);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
|
||||
if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->maxBelly)) {
|
||||
sub_8041D9C(target);
|
||||
|
|
@ -1261,7 +1261,7 @@ void sub_8078A58(Entity *pokemon, Entity *target, s32 param_3, s32 param_4)
|
|||
bellyBefore = targetInfo->belly;
|
||||
targetInfo->belly = FixedPoint_Subtract(bellyBefore, sp8);
|
||||
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
|
||||
|
||||
if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->belly)) {
|
||||
nullsub_84(target);
|
||||
|
|
@ -1323,12 +1323,12 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel
|
|||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBE64); // $m0's belly filled up full!
|
||||
}
|
||||
if (FixedPointToInt(sp_0x20) == FixedPointToInt(targetInfo->maxBelly)) {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBDF0); // $m0's belly won't get any bigger!
|
||||
}
|
||||
else {
|
||||
sub_8041DB0(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBDC4); // m0's max belly size increased!
|
||||
}
|
||||
}
|
||||
|
|
@ -1345,7 +1345,7 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel
|
|||
*bellyPtr = *puVar8;
|
||||
}
|
||||
nullsub_85(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (FixedPointToInt(oldBelly) == FixedPointToInt(*bellyPtr)) {
|
||||
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBE14); // $m0's belly didn't change!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target)
|
|||
entityInfo->types[0] = newType;
|
||||
entityInfo->types[1] = TYPE_NONE;
|
||||
entityInfo->isColorChanged = TRUE;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
|
||||
typeString = GetUnformattedTypeString(newType);
|
||||
strcpy(gFormatBuffer_Items[0], typeString);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FEB08);
|
||||
|
|
@ -314,7 +314,7 @@ bool8 sub_805B264(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||
gDungeon->unk181e8.unk18200 = gUnknown_8106A8C[r3];
|
||||
gDungeon->unk181e8.unk18204 = 0;
|
||||
iVar5 = gUnknown_80F4F94[r3];
|
||||
if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||
if (entityInfo->bideClassStatus.status == STATUS_DIGGING) {
|
||||
iVar5 *= 2;
|
||||
}
|
||||
r6 = sub_8055864(pokemon,target,move,iVar5,param_4) ? TRUE : FALSE;
|
||||
|
|
@ -438,7 +438,7 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4
|
|||
}
|
||||
}
|
||||
}
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
if (moveCounter != 0) {
|
||||
SetExpMultplier(entityInfo);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FDCE4);
|
||||
|
|
@ -601,7 +601,7 @@ bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
|
|||
{
|
||||
bool8 flag;
|
||||
|
||||
if (MoveMatchesChargingStatus(pokemon,move)) {
|
||||
if (MoveMatchesBideClassStatus(pokemon,move)) {
|
||||
flag = HandleDamagingMove(pokemon,target,move,gUnknown_80F4F58,param_4) != 0 ? 1 : 0;
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
|
|
@ -696,8 +696,8 @@ bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||
iVar3 = GetEntInfo(pokemon);
|
||||
iVar5 = GetEntInfo(target);
|
||||
iVar6 = GetEntInfo(target);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[1], target, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
|
||||
if (HasAbility(target, ABILITY_STICKY_HOLD)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -857,8 +857,8 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_
|
|||
entityInfo = GetEntInfo(target);
|
||||
targetID = entityInfo->id;
|
||||
oldID = entityInfo->id;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->clientType != CLIENT_TYPE_NONE) {
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (entityInfo->monsterBehavior != BEHAVIOR_FIXED_ENEMY) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD450);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -882,7 +882,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_
|
|||
}
|
||||
}
|
||||
else {
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD450);
|
||||
}
|
||||
return didTransfer;
|
||||
|
|
@ -920,7 +920,7 @@ bool8 sub_805BEC8(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||
|
||||
bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
|
||||
if (gDungeon->unk644.unk2A != 0) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FD4DC); // $m0 can't escape!
|
||||
}
|
||||
|
|
@ -951,7 +951,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 param_
|
|||
bool8 foundTrap = FALSE;
|
||||
tile = GetTileAtEntitySafe(target);
|
||||
if (IsBossFight()) {
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FD1EC);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FD1EC);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
|
@ -1104,7 +1104,7 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4)
|
|||
filledInTile = FALSE;
|
||||
targetInfo = GetEntInfo(target);
|
||||
if (IsBossFight()) {
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FD0B8);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FD0B8);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
|
@ -1155,7 +1155,7 @@ bool8 sub_805C3F8(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
|||
Item stack;
|
||||
Position posStruct = target->pos;
|
||||
|
||||
if(GetEntInfo(target)->clientType != CLIENT_TYPE_NONE)
|
||||
if(GetEntInfo(target)->monsterBehavior != BEHAVIOR_FIXED_ENEMY)
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FF678);
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -24,47 +24,47 @@ extern const char *gPtrInfatuatedMessage[];
|
|||
extern u8 *gUnknown_80F95EC[];
|
||||
extern char *gPtrMoveInterruptedMessage[];
|
||||
|
||||
bool8 HasStatusAffectingActions(Entity *pokemon)
|
||||
bool8 HasStatusThatPreventsActing(Entity *pokemon)
|
||||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||
switch (pokemonInfo->sleep.sleep)
|
||||
switch (pokemonInfo->sleepClassStatus.status)
|
||||
{
|
||||
case STATUS_NIGHTMARE:
|
||||
case STATUS_SLEEP:
|
||||
case STATUS_NAPPING:
|
||||
return TRUE;
|
||||
}
|
||||
switch (pokemonInfo->immobilize.immobilizeStatus)
|
||||
switch (pokemonInfo->frozenClassStatus.status)
|
||||
{
|
||||
case STATUS_FROZEN:
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrFrozenMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrFrozenMessage);
|
||||
return TRUE;
|
||||
case STATUS_WRAP:
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrWrappedAroundMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrWrappedAroundMessage);
|
||||
return TRUE;
|
||||
case STATUS_WRAPPED:
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrWrappedByMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrWrappedByMessage);
|
||||
return TRUE;
|
||||
case STATUS_PETRIFIED:
|
||||
return TRUE;
|
||||
}
|
||||
switch (pokemonInfo->volatileStatus.volatileStatus)
|
||||
switch (pokemonInfo->cringeClassStatus.status)
|
||||
{
|
||||
case STATUS_PAUSED:
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrPausedMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrPausedMessage);
|
||||
return TRUE;
|
||||
case STATUS_INFATUATED:
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrInfatuatedMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrInfatuatedMessage);
|
||||
return TRUE;
|
||||
}
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||
if (pokemonInfo->bideClassStatus.status == STATUS_BIDE)
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gPtrBideMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gPtrBideMessage);
|
||||
return TRUE;
|
||||
}
|
||||
if (pokemonInfo->waitingStruct.waitingStatus == STATUS_DECOY)
|
||||
if (pokemonInfo->curseClassStatus.status == STATUS_DECOY)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||
|
|
@ -76,7 +76,7 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
if (pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||
if (pokemonInfo->blinkerClassStatus.status == STATUS_BLINKER)
|
||||
{
|
||||
if (!CanMoveInDirection(pokemon, pokemonInfo->action.direction))
|
||||
{
|
||||
|
|
@ -93,10 +93,10 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
|||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
return TRUE;
|
||||
}
|
||||
DecideAttack(pokemon);
|
||||
ChooseAIMove(pokemon);
|
||||
return TRUE;
|
||||
}
|
||||
if (pokemonInfo->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED)
|
||||
if (pokemonInfo->blinkerClassStatus.status == STATUS_CROSS_EYED)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||
|
|
@ -117,60 +117,60 @@ bool8 sub_80701A4(Entity *pokemon)
|
|||
|
||||
pokemonInfo = GetEntInfo(pokemon);
|
||||
flag = FALSE;
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
|
||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||
switch(pokemonInfo->sleep.sleep)
|
||||
switch(pokemonInfo->sleepClassStatus.status)
|
||||
{
|
||||
case STATUS_SLEEP:
|
||||
case STATUS_NIGHTMARE:
|
||||
case STATUS_NAPPING:
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80F95EC);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80F95EC);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(pokemonInfo->immobilize.immobilizeStatus)
|
||||
switch(pokemonInfo->frozenClassStatus.status)
|
||||
{
|
||||
case STATUS_FROZEN:
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gPtrFrozenMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gPtrFrozenMessage);
|
||||
return TRUE;
|
||||
case STATUS_WRAP:
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gPtrWrappedAroundMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gPtrWrappedAroundMessage);
|
||||
return TRUE;
|
||||
case STATUS_WRAPPED:
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gPtrWrappedByMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gPtrWrappedByMessage);
|
||||
return TRUE;
|
||||
case STATUS_PETRIFIED:
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(pokemonInfo->volatileStatus.volatileStatus) {
|
||||
switch(pokemonInfo->cringeClassStatus.status) {
|
||||
case STATUS_CONFUSED:
|
||||
flag = TRUE;
|
||||
goto _0807026C;
|
||||
case STATUS_PAUSED:
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gPtrPausedMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gPtrPausedMessage);
|
||||
return TRUE;
|
||||
case STATUS_INFATUATED:
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gPtrInfatuatedMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gPtrInfatuatedMessage);
|
||||
return TRUE;
|
||||
default:
|
||||
case STATUS_NONE:
|
||||
case STATUS_CRINGE:
|
||||
case 8:
|
||||
_0807026C:
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE) {
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gPtrBideMessage);
|
||||
if (pokemonInfo->bideClassStatus.status == STATUS_BIDE) {
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gPtrBideMessage);
|
||||
return TRUE;
|
||||
}
|
||||
else if (((pokemonInfo->charging.chargingStatus != STATUS_NONE) && (pokemonInfo->charging.chargingStatus != STATUS_CHARGING)) && (pokemonInfo->charging.chargingStatus != STATUS_ENRAGED)) {
|
||||
else if (((pokemonInfo->bideClassStatus.status != STATUS_NONE) && (pokemonInfo->bideClassStatus.status != STATUS_CHARGING)) && (pokemonInfo->bideClassStatus.status != STATUS_ENRAGED)) {
|
||||
if (flag) {
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gPtrMoveInterruptedMessage);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gPtrMoveInterruptedMessage);
|
||||
}
|
||||
else {
|
||||
for(index = 0, move = pokemonInfo->moves.moves; index < MAX_MON_MOVES; move++, index++) {
|
||||
if ((move->moveFlags & MOVE_FLAG_EXISTS) &&
|
||||
(MoveMatchesChargingStatus(pokemon,move)) &&
|
||||
(pokemonInfo->charging.chargingStatusMoveIndex == index)) {
|
||||
(MoveMatchesBideClassStatus(pokemon,move)) &&
|
||||
(pokemonInfo->bideClassStatus.moveSlot == index)) {
|
||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_PLAYER);
|
||||
index_1 = index;
|
||||
r7 = &pokemonInfo->action.unk4[1].actionUseIndex;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ s32 sub_8070828(Entity *pokemon, bool8 displayMessage)
|
|||
}
|
||||
if (displayMessage && SetVisualFlags(GetEntInfo(pokemon), 0x40, flag)) {
|
||||
sub_80429B4(pokemon);
|
||||
TryDisplayDungeonLoggableMessage(pokemon, *gUnknown_80FEE80);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, *gUnknown_80FEE80);
|
||||
}
|
||||
if (flag) {
|
||||
return 2;
|
||||
|
|
@ -59,20 +59,20 @@ void SetMessageArgument_2(u8 *buffer, EntityInfo *param_2, s32 colorNum)
|
|||
{
|
||||
if (((gDungeon->unk181e8.blinded ||
|
||||
gDungeon->unk181e8.hallucinating) ||
|
||||
(param_2->transformStatus.transformStatus == STATUS_INVISIBLE)) &&
|
||||
(param_2->invisibleClassStatus.status == STATUS_INVISIBLE)) &&
|
||||
(param_2->isNotTeamMember))
|
||||
{
|
||||
strcpy(buffer, *gUnknown_80F8988);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (param_2->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||
if (param_2->curseClassStatus.status == STATUS_DECOY) {
|
||||
strcpy(buffer, *gUnknown_80F8968);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (param_2->isNotTeamMember) {
|
||||
if ((param_2->joinedAt.joinedAt == 0x4A) || (param_2->clientType == CLIENT_TYPE_CLIENT)) {
|
||||
if ((param_2->joinedAt.joinedAt == 0x4A) || (param_2->monsterBehavior == BEHAVIOR_RESCUE_TARGET)) {
|
||||
CopyYellowMonsterNametoBuffer(buffer, param_2->apparentID);
|
||||
}
|
||||
else
|
||||
|
|
@ -88,7 +88,7 @@ void SetMessageArgument_2(u8 *buffer, EntityInfo *param_2, s32 colorNum)
|
|||
|
||||
void sub_8070968(u8 *buffer, EntityInfo *entityInfo, s32 colorNum)
|
||||
{
|
||||
if (entityInfo->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||
if (entityInfo->curseClassStatus.status == STATUS_DECOY) {
|
||||
sprintfStatic(buffer, gUnknown_8106FA4, colorNum + 0x30, *gUnknown_80F8974);
|
||||
}
|
||||
else if (entityInfo->isNotTeamMember) {
|
||||
|
|
@ -103,20 +103,20 @@ void sub_80709C8(u8 *buffer, EntityInfo *entityInfo)
|
|||
{
|
||||
if (((gDungeon->unk181e8.blinded ||
|
||||
gDungeon->unk181e8.hallucinating) ||
|
||||
(entityInfo->transformStatus.transformStatus == STATUS_INVISIBLE)) &&
|
||||
(entityInfo->invisibleClassStatus.status == STATUS_INVISIBLE)) &&
|
||||
(entityInfo->isNotTeamMember))
|
||||
{
|
||||
strcpy(buffer, *gUnknown_80F8994);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (entityInfo->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||
if (entityInfo->curseClassStatus.status == STATUS_DECOY) {
|
||||
strcpy(buffer, *gUnknown_80F8974);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (entityInfo->isNotTeamMember) {
|
||||
CopyMonsterNametoBuffer(buffer, entityInfo->apparentID);
|
||||
CopyMonsterNameToBuffer(buffer, entityInfo->apparentID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -130,18 +130,18 @@ bool8 HasNegativeStatus(Entity *pokemon)
|
|||
{
|
||||
EntityInfo *pokemonInfo = GetEntInfo(pokemon);
|
||||
s32 i;
|
||||
if (pokemonInfo->sleep.sleep == STATUS_SLEEP ||
|
||||
pokemonInfo->sleep.sleep == STATUS_NIGHTMARE ||
|
||||
pokemonInfo->sleep.sleep == STATUS_YAWNING ||
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_NONE ||
|
||||
(pokemonInfo->immobilize.immobilizeStatus != STATUS_INGRAIN && pokemonInfo->immobilize.immobilizeStatus != STATUS_NONE) ||
|
||||
pokemonInfo->volatileStatus.volatileStatus != STATUS_NONE ||
|
||||
pokemonInfo->waitingStruct.waitingStatus == STATUS_CURSED ||
|
||||
pokemonInfo->waitingStruct.waitingStatus == STATUS_DECOY ||
|
||||
pokemonInfo->linked.linkedStatus == STATUS_LEECH_SEED ||
|
||||
pokemonInfo->moveStatus.moveStatus == STATUS_WHIFFER ||
|
||||
pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER ||
|
||||
pokemonInfo->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED ||
|
||||
if (pokemonInfo->sleepClassStatus.status == STATUS_SLEEP ||
|
||||
pokemonInfo->sleepClassStatus.status == STATUS_NIGHTMARE ||
|
||||
pokemonInfo->sleepClassStatus.status == STATUS_YAWNING ||
|
||||
pokemonInfo->burnClassStatus.status != STATUS_NONE ||
|
||||
(pokemonInfo->frozenClassStatus.status != STATUS_INGRAIN && pokemonInfo->frozenClassStatus.status != STATUS_NONE) ||
|
||||
pokemonInfo->cringeClassStatus.status != STATUS_NONE ||
|
||||
pokemonInfo->curseClassStatus.status == STATUS_CURSED ||
|
||||
pokemonInfo->curseClassStatus.status == STATUS_DECOY ||
|
||||
pokemonInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED ||
|
||||
pokemonInfo->sureShotClassStatus.status == STATUS_WHIFFER ||
|
||||
pokemonInfo->blinkerClassStatus.status == STATUS_BLINKER ||
|
||||
pokemonInfo->blinkerClassStatus.status == STATUS_CROSS_EYED ||
|
||||
pokemonInfo->muzzled.muzzled == TRUE ||
|
||||
pokemonInfo->exposed ||
|
||||
pokemonInfo->perishSongTurns != 0)
|
||||
|
|
@ -168,9 +168,9 @@ bool8 HasNegativeStatus(Entity *pokemon)
|
|||
|
||||
bool8 IsSleeping(Entity *pokemon)
|
||||
{
|
||||
if (GetEntInfo(pokemon)->sleep.sleep != STATUS_SLEEP &&
|
||||
GetEntInfo(pokemon)->sleep.sleep != STATUS_NAPPING &&
|
||||
GetEntInfo(pokemon)->sleep.sleep != STATUS_NIGHTMARE)
|
||||
if (GetEntInfo(pokemon)->sleepClassStatus.status != STATUS_SLEEP &&
|
||||
GetEntInfo(pokemon)->sleepClassStatus.status != STATUS_NAPPING &&
|
||||
GetEntInfo(pokemon)->sleepClassStatus.status != STATUS_NIGHTMARE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ bool8 PosHasItem(Position *pos)
|
|||
{
|
||||
struct Tile *tile;
|
||||
Entity *entity;
|
||||
|
||||
|
||||
tile = GetTile(pos->x,pos->y);
|
||||
entity = tile->object;
|
||||
if ((entity != NULL) && (GetEntityType(entity) == ENTITY_ITEM)) {
|
||||
|
|
@ -106,7 +106,7 @@ Entity *GetMonsterAtPos(Position *pos)
|
|||
{
|
||||
struct Tile *tile;
|
||||
Entity *entity;
|
||||
|
||||
|
||||
tile = GetTile(pos->x,pos->y);
|
||||
entity = tile->monster;
|
||||
if ((entity != NULL) && (entity->type == ENTITY_MONSTER)) {
|
||||
|
|
@ -123,7 +123,7 @@ bool8 sub_804AD34(Position *pos)
|
|||
s32 y;
|
||||
bool8 iVar8;
|
||||
s32 index;
|
||||
|
||||
|
||||
iVar8 = 0;
|
||||
tile = GetTileSafe(pos->x,pos->y);
|
||||
if (!(tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)))
|
||||
|
|
@ -144,7 +144,7 @@ bool8 sub_804AD34(Position *pos)
|
|||
if (iVar8 != 0) {
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
sub_806CF98(entity);
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ bool8 sub_804AE08(Position *pos)
|
|||
s32 x;
|
||||
s32 y;
|
||||
bool8 uVar6;
|
||||
|
||||
|
||||
uVar6 = FALSE;
|
||||
tile = GetTileSafe(pos->x,pos->y);
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ void sub_804AE84(Position *pos)
|
|||
Entity * entity;
|
||||
s32 index;
|
||||
s32 y;
|
||||
|
||||
|
||||
tile = GetTileSafe(pos->x,pos->y);
|
||||
if ((tile->unk4 & 0x10) != 0) {
|
||||
tile->unk4 = tile->unk4 & 0xffef;
|
||||
|
|
@ -205,7 +205,7 @@ void sub_804AE84(Position *pos)
|
|||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeon->allPokemon[index];
|
||||
entity = gDungeon->activePokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
sub_806CF98(entity);
|
||||
}
|
||||
|
|
|
|||
14
src/trap.c
14
src/trap.c
|
|
@ -279,10 +279,10 @@ void sub_807FE9C(Entity *pokemon, Position *pos, int param_3, char param_4)
|
|||
sub_8049ED4();
|
||||
sub_804225C(pokemon,pos,trapData->id);
|
||||
if (gDungeon->unk181e8.blinded) {
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FD7F4);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FD7F4);
|
||||
}
|
||||
else {
|
||||
TryDisplayDungeonLoggableMessage(pokemon,(gUnknown_80FD7F8)[trapData->id]);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,(gUnknown_80FD7F8)[trapData->id]);
|
||||
}
|
||||
}
|
||||
if (target != NULL) {
|
||||
|
|
@ -538,7 +538,7 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile)
|
|||
flag = FALSE;
|
||||
if (target != NULL) {
|
||||
if (IsBossFight()) {
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FED0C); // But nothing happened...
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FED0C); // But nothing happened...
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -558,11 +558,11 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile)
|
|||
gDungeon->unk2 = 2;
|
||||
return;
|
||||
}
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80F9728);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80F9728);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMessageArgument(gFormatBuffer_Monsters[0],target,0);
|
||||
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
|
||||
if (info->isNotTeamMember) {
|
||||
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80F970C); // $m0 fell into the pitfall!
|
||||
}
|
||||
|
|
@ -619,11 +619,11 @@ void HandleSummonTrap(Entity *pokemon,Position *pos)
|
|||
sub_80421EC(pos,0x194);
|
||||
if (pokemonSummonCount == 0) {
|
||||
_ret:
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FED04);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FED04);
|
||||
}
|
||||
else
|
||||
{
|
||||
TryDisplayDungeonLoggableMessage(pokemon,*gUnknown_80FED00);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon,*gUnknown_80FED00);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,4 @@ void SetTrap(Tile *tile, u8 id)
|
|||
}
|
||||
sub_8049ED4();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ bool8 sub_806E100(unkStruct_80943A8 *param_1, Entity *pokemon, Entity *target, u
|
|||
gDungeon->unk134.fill16E[8] = TRUE;
|
||||
F48_16_SMul(param_1,param_1, &gUnknown_8106F1C);
|
||||
}
|
||||
if ((type == TYPE_ELECTRIC) && (pokemonInfo->charging.chargingStatus == STATUS_CHARGING)) {
|
||||
if ((type == TYPE_ELECTRIC) && (pokemonInfo->bideClassStatus.status == STATUS_CHARGING)) {
|
||||
gDungeon->unk134.fill16E[9] = TRUE;
|
||||
F48_16_SMul(param_1,param_1, &gUnknown_8106F0C);
|
||||
}
|
||||
|
|
@ -394,7 +394,7 @@ s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType)
|
|||
{
|
||||
return 2;
|
||||
}
|
||||
if (moveType == TYPE_ELECTRIC && userData->charging.chargingStatus == STATUS_CHARGING)
|
||||
if (moveType == TYPE_ELECTRIC && userData->bideClassStatus.status == STATUS_CHARGING)
|
||||
{
|
||||
weight *= 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user