mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-12 02:56:01 -05:00
more decomp work
This commit is contained in:
@@ -5,54 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8081994
|
||||
sub_8081994:
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8082FA8
|
||||
ldrb r1, [r4, 0x1]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083060
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8081994
|
||||
|
||||
thumb_func_start sub_80819B0
|
||||
sub_80819B0:
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8082FA8
|
||||
ldrb r1, [r4, 0x1]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083060
|
||||
ldrb r1, [r4, 0x2]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083060
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80819B0
|
||||
|
||||
thumb_func_start sub_80819D4
|
||||
sub_80819D4:
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8082FA8
|
||||
ldrb r1, [r4, 0x1]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083060
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80819D4
|
||||
|
||||
thumb_func_start sub_80819F0
|
||||
sub_80819F0:
|
||||
push {r4,r5,lr}
|
||||
|
||||
@@ -53,7 +53,6 @@ typedef struct JoinedAt
|
||||
/* 0x1 */ u8 unk1;
|
||||
} JoinedAt;
|
||||
|
||||
|
||||
typedef struct AITarget
|
||||
{
|
||||
/* 0x0 */ u8 aiObjective;
|
||||
@@ -84,13 +83,29 @@ typedef struct NonVolatile
|
||||
typedef struct Immobilize
|
||||
{
|
||||
/* 0x0 */ u8 immobilizeStatus;
|
||||
u8 fill1[0x4 - 0x1];
|
||||
/* 0x4 */ s32 unk4;
|
||||
/* 0x8 */ u8 immobilizeStatusTurns;
|
||||
/* 0x9 */ u8 immobilizeStatusDamageCountdown;
|
||||
u8 fillA[0xC - 0xA];
|
||||
} Immobilize;
|
||||
|
||||
typedef struct Volatile
|
||||
{
|
||||
/* 0x0 */ u8 volatileStatus;
|
||||
/* 0x1 */ u8 volatileStatusTurns;
|
||||
} Volatile;
|
||||
|
||||
typedef struct Charging
|
||||
{
|
||||
/* 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;
|
||||
|
||||
typedef struct Protection
|
||||
{
|
||||
/* 0x0 */ u8 protectionStatus;
|
||||
/* 0x1 */ u8 protectionStatusTurns;
|
||||
} Protection;
|
||||
|
||||
// size: 0x208
|
||||
typedef struct EntityInfo
|
||||
@@ -157,19 +172,12 @@ typedef struct EntityInfo
|
||||
/* 0xA8 */ Sleep sleep;
|
||||
/* 0xAC */ NonVolatile nonVolatile;
|
||||
/* 0xB0 */ Immobilize immobilize;
|
||||
/* 0xBC */ u8 volatileStatus;
|
||||
/* 0xBD */ u8 volatileStatusTurns;
|
||||
u8 fillBE[0xC0 - 0xBE];
|
||||
/* 0xC0 */ u8 chargingStatus;
|
||||
/* 0xC1 */ u8 chargingStatusTurns;
|
||||
/* 0xC2 */ u8 chargingStatusMoveIndex; // The position of the move in the Pokémon's moveset that triggered the status.
|
||||
u8 fillC3;
|
||||
/* 0xC4 */ u8 protectionStatus;
|
||||
/* 0xC5 */ u8 protectionStatusTurns;
|
||||
u8 fillC6[0xC8 - 0xC6];
|
||||
/* 0xBC */ Volatile Volatile;
|
||||
/* 0xC0 */ Charging charging;
|
||||
/* 0xC4 */ Protection protection;
|
||||
/* 0xC8 */ u8 waitingStatus;
|
||||
/* 0xC9 */ bool8 enemyDecoy; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
||||
u8 fillCA;
|
||||
u8 unkCA;
|
||||
/* 0xCB */ u8 waitingStatusTurns;
|
||||
/* 0xCC */ u8 curseDamageCountdown;
|
||||
u8 fillCD[0xD0 - 0xCD];
|
||||
|
||||
@@ -76,7 +76,7 @@ bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move)
|
||||
return FALSE;
|
||||
}
|
||||
if (move->id == gMultiTurnChargeMoves[i].moveID &&
|
||||
pokemonInfo->chargingStatus == gMultiTurnChargeMoves[i].chargingStatus)
|
||||
pokemonInfo->charging.chargingStatus == gMultiTurnChargeMoves[i].chargingStatus)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ bool8 IsCharging(Entity *pokemon, bool8 checkCharge)
|
||||
{
|
||||
EntityInfo *pokemonInfo = pokemon->info;
|
||||
int i = 0;
|
||||
u8 *chargingStatusPointer = &pokemonInfo->chargingStatus;
|
||||
u8 *chargingStatusPointer = &pokemonInfo->charging.chargingStatus;
|
||||
u8 *chargingStatusPointer2;
|
||||
u8 chargeStatus = STATUS_CHARGING;
|
||||
for (; i < 100; i++)
|
||||
@@ -107,7 +107,7 @@ bool8 IsCharging(Entity *pokemon, bool8 checkCharge)
|
||||
return FALSE;
|
||||
}
|
||||
chargingStatus = *chargingStatusPointer;
|
||||
chargingStatusPointer2 = &pokemonInfo->chargingStatus;
|
||||
chargingStatusPointer2 = &pokemonInfo->charging.chargingStatus;
|
||||
if (chargingStatus == currentStatus)
|
||||
{
|
||||
return TRUE;
|
||||
|
||||
@@ -215,9 +215,9 @@ void EntityUpdateStatusSprites(Entity *entity)
|
||||
spriteStatus = spriteStatus |
|
||||
gStatusSpriteMasks_NonVolatileStatus[entityInfo->nonVolatile.nonVolatileStatus] |
|
||||
gStatusSpriteMasks_ImmobilizeStatus[entityInfo->immobilize.immobilizeStatus] |
|
||||
gStatusSpriteMasks_VolatileStatus[entityInfo->volatileStatus] |
|
||||
gStatusSpriteMasks_ChargingStatus[entityInfo->chargingStatus] |
|
||||
gStatusSpriteMasks_ProtectionStatus[entityInfo->protectionStatus] |
|
||||
gStatusSpriteMasks_VolatileStatus[entityInfo->Volatile.volatileStatus] |
|
||||
gStatusSpriteMasks_ChargingStatus[entityInfo->charging.chargingStatus] |
|
||||
gStatusSpriteMasks_ProtectionStatus[entityInfo->protection.protectionStatus] |
|
||||
gStatusSpriteMasks_WaitingStatus[entityInfo->waitingStatus] |
|
||||
gStatusSpriteMasks_LinkedStatus[entityInfo->linkedStatus] |
|
||||
gStatusSpriteMasks_MoveStatus[entityInfo->moveStatus] |
|
||||
|
||||
@@ -209,7 +209,7 @@ void sub_806A120(Entity * pokemon, Entity * target, Move* move)
|
||||
EntityInfo *entityInfo;
|
||||
|
||||
if ((((EntityExists(pokemon)) && (EntityExists(target))) && (pokemon != target))
|
||||
&& (entityInfo = target->info, entityInfo->protectionStatus == STATUS_CONVERSION2)) {
|
||||
&& (entityInfo = target->info, entityInfo->protection.protectionStatus == STATUS_CONVERSION2)) {
|
||||
moveType = GetMoveTypeForMonster(pokemon, move);
|
||||
uVar2_u32 = sub_8092364(moveType);
|
||||
if (uVar2_u32 != TYPE_NONE) {
|
||||
|
||||
@@ -159,7 +159,7 @@ u8 sub_806CEBC(Entity *entity)
|
||||
else
|
||||
return 7;
|
||||
}
|
||||
if (entityInfo2->chargingStatus == STATUS_BIDE)
|
||||
if (entityInfo2->charging.chargingStatus == STATUS_BIDE)
|
||||
return 11;
|
||||
return 7;
|
||||
}
|
||||
|
||||
@@ -681,18 +681,18 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if ((entityInfo->chargingStatus == newStatus) && (newStatus == STATUS_ENRAGED)) {
|
||||
if ((entityInfo->charging.chargingStatus == newStatus) && (newStatus == STATUS_ENRAGED)) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC074);
|
||||
}
|
||||
else {
|
||||
entityInfo->chargingStatus = newStatus;
|
||||
entityInfo->charging.chargingStatus = newStatus;
|
||||
|
||||
for(index = 0; index < MAX_MON_MOVES; index++)
|
||||
{
|
||||
movePtr = &entityInfo->moves[index];
|
||||
if(movePtr == move)
|
||||
{
|
||||
entityInfo->chargingStatusMoveIndex = index;
|
||||
entityInfo->charging.chargingStatusMoveIndex = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -707,11 +707,11 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
|
||||
entityInfo->unkFF = 2;
|
||||
}
|
||||
if (newStatus == STATUS_BIDE) {
|
||||
entityInfo->chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E9C, FALSE) + 1;
|
||||
entityInfo->charging.chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E9C, FALSE) + 1;
|
||||
entityInfo->unkA0 = 0;
|
||||
}
|
||||
if (newStatus == STATUS_ENRAGED) {
|
||||
entityInfo->chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA0, FALSE) + 1;
|
||||
entityInfo->charging.chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA0, FALSE) + 1;
|
||||
}
|
||||
sub_8041BD0(target,uVar5);
|
||||
sub_80522F4(pokemon,target,message);
|
||||
@@ -740,8 +740,8 @@ void sub_8079764(Entity * pokemon)
|
||||
|
||||
if (EntityExists(pokemon)) {
|
||||
entityInfo = pokemon->info;
|
||||
if ((entityInfo->chargingStatus != STATUS_BIDE) && (entityInfo->chargingStatus != STATUS_ENRAGED)) {
|
||||
entityInfo->chargingStatus = STATUS_NONE;
|
||||
if ((entityInfo->charging.chargingStatus != STATUS_BIDE) && (entityInfo->charging.chargingStatus != STATUS_ENRAGED)) {
|
||||
entityInfo->charging.chargingStatus = STATUS_NONE;
|
||||
entityInfo->unk14A = 0;
|
||||
entityInfo->unkFF = 0;
|
||||
}
|
||||
@@ -756,15 +756,15 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus == newStatus) {
|
||||
if (entityInfo->protection.protectionStatus == newStatus) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB10C);
|
||||
}
|
||||
else {
|
||||
nullsub_57(target);
|
||||
if ((entityInfo->protectionStatus != STATUS_COUNTER) && (entityInfo->protectionStatus != STATUS_MINI_COUNTER)) {
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E98, FALSE) + 1;
|
||||
if ((entityInfo->protection.protectionStatus != STATUS_COUNTER) && (entityInfo->protection.protectionStatus != STATUS_MINI_COUNTER)) {
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E98, FALSE) + 1;
|
||||
}
|
||||
entityInfo->protectionStatus = newStatus;
|
||||
entityInfo->protection.protectionStatus = newStatus;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB0E0);
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
@@ -778,9 +778,9 @@ void SafeguardStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_SAFEGUARD) {
|
||||
entityInfo->protectionStatus = STATUS_SAFEGUARD;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_SAFEGUARD) {
|
||||
entityInfo->protection.protectionStatus = STATUS_SAFEGUARD;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1;
|
||||
nullsub_58(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB048);
|
||||
}
|
||||
@@ -798,9 +798,9 @@ void MistStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_MIST) {
|
||||
entityInfo->protectionStatus = STATUS_MIST;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MIST) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MIST;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1;
|
||||
nullsub_59(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB09C);
|
||||
}
|
||||
@@ -818,9 +818,9 @@ void WishStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_WISH) {
|
||||
entityInfo->protectionStatus = STATUS_WISH;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_WISH) {
|
||||
entityInfo->protection.protectionStatus = STATUS_WISH;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1;
|
||||
sub_8041B34(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FAE1C);
|
||||
}
|
||||
@@ -838,9 +838,9 @@ void MagicCoatStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_MAGIC_COAT) {
|
||||
entityInfo->protectionStatus = STATUS_MAGIC_COAT;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MAGIC_COAT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MAGIC_COAT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1;
|
||||
nullsub_60(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FAF5C);
|
||||
}
|
||||
@@ -858,9 +858,9 @@ void LightScreenStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_LIGHT_SCREEN) {
|
||||
entityInfo->protectionStatus = STATUS_LIGHT_SCREEN;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_LIGHT_SCREEN) {
|
||||
entityInfo->protection.protectionStatus = STATUS_LIGHT_SCREEN;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1;
|
||||
nullsub_61(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB130);
|
||||
}
|
||||
@@ -878,9 +878,9 @@ void ReflectStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_REFLECT) {
|
||||
entityInfo->protectionStatus = STATUS_REFLECT;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_REFLECT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_REFLECT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1;
|
||||
nullsub_62(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB17C);
|
||||
}
|
||||
@@ -898,9 +898,9 @@ void ProtectStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
nullsub_63(target);
|
||||
entityInfo = target->info;
|
||||
if (entityInfo->protectionStatus != STATUS_PROTECT) {
|
||||
entityInfo->protectionStatus = STATUS_PROTECT;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_PROTECT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_PROTECT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB9B0);
|
||||
}
|
||||
@@ -919,9 +919,9 @@ void MirrorCoatStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_MIRROR_COAT) {
|
||||
entityInfo->protectionStatus = STATUS_MIRROR_COAT;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MIRROR_COAT) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MIRROR_COAT;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1;
|
||||
nullsub_64(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBAC0);
|
||||
}
|
||||
@@ -939,9 +939,9 @@ void EndureStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_ENDURING) {
|
||||
entityInfo->protectionStatus = STATUS_ENDURING;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_ENDURING) {
|
||||
entityInfo->protection.protectionStatus = STATUS_ENDURING;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1;
|
||||
nullsub_65(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBBF0);
|
||||
}
|
||||
@@ -959,9 +959,9 @@ void MirrorMoveStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_MIRROR_MOVE) {
|
||||
entityInfo->protectionStatus = STATUS_MIRROR_MOVE;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_MIRROR_MOVE) {
|
||||
entityInfo->protection.protectionStatus = STATUS_MIRROR_MOVE;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1;
|
||||
nullsub_66(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBC38);
|
||||
}
|
||||
@@ -984,9 +984,9 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target)
|
||||
else
|
||||
{
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_CONVERSION2) {
|
||||
entityInfo->protectionStatus = STATUS_CONVERSION2;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_CONVERSION2) {
|
||||
entityInfo->protection.protectionStatus = STATUS_CONVERSION2;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1;
|
||||
nullsub_67(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBC7C);
|
||||
}
|
||||
@@ -1005,9 +1005,9 @@ void VitalThrowStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->protectionStatus != STATUS_VITAL_THROW) {
|
||||
entityInfo->protectionStatus = STATUS_VITAL_THROW;
|
||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1;
|
||||
if (entityInfo->protection.protectionStatus != STATUS_VITAL_THROW) {
|
||||
entityInfo->protection.protectionStatus = STATUS_VITAL_THROW;
|
||||
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1;
|
||||
nullsub_68(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBCC8);
|
||||
}
|
||||
@@ -1296,7 +1296,7 @@ void SendVolatileEndMessage(Entity * pokemon, Entity *target)
|
||||
}
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
switch(entityInfo->volatileStatus) {
|
||||
switch(entityInfo->Volatile.volatileStatus) {
|
||||
case STATUS_NONE:
|
||||
case 8:
|
||||
break;
|
||||
@@ -1322,7 +1322,7 @@ void SendVolatileEndMessage(Entity * pokemon, Entity *target)
|
||||
sub_80522F4(pokemon,target, *gPtrMonNoLongerCringingMessage);
|
||||
break;
|
||||
}
|
||||
entityInfo->volatileStatus = STATUS_NONE;
|
||||
entityInfo->Volatile.volatileStatus = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
CalcSpeedStage(target);
|
||||
}
|
||||
@@ -1336,7 +1336,7 @@ void SendProtectionEndMessage(Entity * pokemon, Entity *target)
|
||||
}
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
switch(entityInfo->protectionStatus) {
|
||||
switch(entityInfo->protection.protectionStatus) {
|
||||
case STATUS_NONE:
|
||||
case 0xF:
|
||||
break;
|
||||
@@ -1381,7 +1381,7 @@ void SendProtectionEndMessage(Entity * pokemon, Entity *target)
|
||||
SendMessage(target,*gUnknown_80FAB40);
|
||||
break;
|
||||
}
|
||||
entityInfo->protectionStatus = STATUS_NONE;
|
||||
entityInfo->protection.protectionStatus = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pokemonInfo->volatileStatus == STATUS_CONFUSED)
|
||||
if (pokemonInfo->Volatile.volatileStatus == STATUS_CONFUSED)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
}
|
||||
@@ -159,7 +159,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pokemonInfo->volatileStatus == STATUS_CONFUSED)
|
||||
if (pokemonInfo->Volatile.volatileStatus == STATUS_CONFUSED)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||
}
|
||||
|
||||
@@ -67,17 +67,17 @@ void DecideAttack(Entity *pokemon)
|
||||
if (CannotAttack(pokemon, FALSE) ||
|
||||
ShouldMonsterRunAwayAndShowEffect(pokemon, TRUE) ||
|
||||
HasTactic(pokemon, TACTIC_KEEP_YOUR_DISTANCE) ||
|
||||
(pokemonInfo->volatileStatus == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance)))
|
||||
(pokemonInfo->Volatile.volatileStatus == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pokemonInfo->chargingStatus != STATUS_NONE)
|
||||
if (pokemonInfo->charging.chargingStatus != STATUS_NONE)
|
||||
{
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (pokemonInfo->moves[i].moveFlags & MOVE_FLAG_EXISTS &&
|
||||
MoveMatchesChargingStatus(pokemon, &pokemonInfo->moves[i]) &&
|
||||
pokemonInfo->chargingStatusMoveIndex == i)
|
||||
pokemonInfo->charging.chargingStatusMoveIndex == i)
|
||||
{
|
||||
s32 chosenMoveIndex;
|
||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_AI);
|
||||
@@ -189,7 +189,7 @@ void DecideAttack(Entity *pokemon)
|
||||
move->moveFlags & MOVE_FLAG_ENABLED_FOR_AI)
|
||||
{
|
||||
aiPossibleMove[i].canBeUsed = TRUE;
|
||||
if (pokemonInfo->chargingStatus == chargeStatus)
|
||||
if (pokemonInfo->charging.chargingStatus == chargeStatus)
|
||||
{
|
||||
if (move->id == MOVE_CHARGE)
|
||||
{
|
||||
@@ -218,10 +218,10 @@ void DecideAttack(Entity *pokemon)
|
||||
}
|
||||
}
|
||||
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 0;
|
||||
if (!IQSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) && pokemonInfo->chargingStatus != chargeStatus)
|
||||
if (!IQSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) && pokemonInfo->charging.chargingStatus != chargeStatus)
|
||||
{
|
||||
aiPossibleMove[REGULAR_ATTACK_INDEX].canBeUsed = TRUE;
|
||||
if (pokemonInfo->chargingStatus == chargeStatus)
|
||||
if (pokemonInfo->charging.chargingStatus == chargeStatus)
|
||||
{
|
||||
// Never reached? Charge already skips the regular attack in the outer block.
|
||||
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 1;
|
||||
@@ -353,7 +353,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 == STATUS_TAUNTED && !MoveIgnoresTaunted(move)) ||
|
||||
if ((pokemonInfo->Volatile.volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move)) ||
|
||||
(hasStatusChecker && !CanUseOnSelfWithStatusChecker(pokemon, move)))
|
||||
{
|
||||
return 1;
|
||||
|
||||
@@ -233,7 +233,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
||||
}
|
||||
break;
|
||||
case ITEM_TOTTER_SEED:
|
||||
if (pokemonInfo->volatileStatus != STATUS_CONFUSED)
|
||||
if (pokemonInfo->Volatile.volatileStatus != STATUS_CONFUSED)
|
||||
{
|
||||
if (CanTargetAdjacentPokemon(targetPokemon))
|
||||
{
|
||||
|
||||
@@ -25,8 +25,8 @@ bool8 CannotMove(Entity *pokemon, bool8 checkBlinker)
|
||||
|| pokemonInfo->sleep.sleep == STATUS_SLEEP
|
||||
|| pokemonInfo->sleep.sleep == STATUS_NAPPING
|
||||
|| pokemonInfo->sleep.sleep == STATUS_NIGHTMARE
|
||||
|| pokemonInfo->volatileStatus == STATUS_PAUSED
|
||||
|| pokemonInfo->volatileStatus == STATUS_INFATUATED
|
||||
|| pokemonInfo->Volatile.volatileStatus == STATUS_PAUSED
|
||||
|| pokemonInfo->Volatile.volatileStatus == STATUS_INFATUATED
|
||||
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
return TRUE;
|
||||
|
||||
@@ -49,14 +49,14 @@ bool8 sub_8070BC0(Entity* entity)
|
||||
|| entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN)
|
||||
return FALSE;
|
||||
|
||||
if (entityInfo->volatileStatus == STATUS_CONFUSED)
|
||||
if (entityInfo->Volatile.volatileStatus == STATUS_CONFUSED)
|
||||
return FALSE;
|
||||
if (entityInfo->sleep.sleep == STATUS_SLEEP)
|
||||
return FALSE;
|
||||
if (entityInfo->transformStatus == STATUS_INVISIBLE
|
||||
|| entityInfo->sleep.sleep == STATUS_NAPPING)
|
||||
return FALSE;
|
||||
if (entityInfo->volatileStatus == STATUS_CRINGE)
|
||||
if (entityInfo->Volatile.volatileStatus == STATUS_CRINGE)
|
||||
return FALSE;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||
return FALSE;
|
||||
@@ -67,8 +67,8 @@ bool8 sub_8070BC0(Entity* entity)
|
||||
return FALSE;
|
||||
if (entityInfo->eyesightStatus == STATUS_BLINKER)
|
||||
return FALSE;
|
||||
if (entityInfo->volatileStatus != STATUS_INFATUATED
|
||||
&& entityInfo->volatileStatus != STATUS_PAUSED)
|
||||
if (entityInfo->Volatile.volatileStatus != STATUS_INFATUATED
|
||||
&& entityInfo->Volatile.volatileStatus != STATUS_PAUSED)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@@ -110,7 +110,7 @@ bool8 HasStatusThatPreventsActing(Entity *pokemon)
|
||||
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
return TRUE;
|
||||
|
||||
if (pokemonInfo->chargingStatus == STATUS_BIDE)
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@@ -128,9 +128,9 @@ bool8 CannotAttack(Entity *pokemon, bool8 skipSleep)
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_WRAP &&
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_WRAPPED &&
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_PETRIFIED &&
|
||||
pokemonInfo->volatileStatus != STATUS_CRINGE &&
|
||||
pokemonInfo->volatileStatus != STATUS_PAUSED &&
|
||||
pokemonInfo->volatileStatus != STATUS_INFATUATED &&
|
||||
pokemonInfo->Volatile.volatileStatus != STATUS_CRINGE &&
|
||||
pokemonInfo->Volatile.volatileStatus != STATUS_PAUSED &&
|
||||
pokemonInfo->Volatile.volatileStatus != STATUS_INFATUATED &&
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS &&
|
||||
!ShouldMonsterRunAway(pokemon))
|
||||
return FALSE;
|
||||
|
||||
@@ -28,7 +28,7 @@ extern void sub_80522F4(Entity *r1, Entity *r2, u32);
|
||||
|
||||
bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||
{
|
||||
if (target->info->protectionStatus == STATUS_SAFEGUARD) {
|
||||
if (target->info->protection.protectionStatus == STATUS_SAFEGUARD) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,gUnknown_80FC2FC);
|
||||
@@ -40,7 +40,7 @@ bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage
|
||||
|
||||
bool8 sub_8071728(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||
{
|
||||
if (target->info->protectionStatus == STATUS_MIST) {
|
||||
if (target->info->protection.protectionStatus == STATUS_MIST) {
|
||||
if (displayMessage) {
|
||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||
sub_80522F4(pokemon, target, gUnknown_80FC31C);
|
||||
|
||||
@@ -595,8 +595,8 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
|
||||
}
|
||||
if (isTormented)
|
||||
{
|
||||
if(entityInfo->chargingStatus == STATUS_BIDE) {
|
||||
entityInfo->chargingStatus = STATUS_NONE;
|
||||
if(entityInfo->charging.chargingStatus == STATUS_BIDE) {
|
||||
entityInfo->charging.chargingStatus = STATUS_NONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -680,7 +680,7 @@ bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, u32 pa
|
||||
u8 chargeStatus;
|
||||
|
||||
flag = FALSE;
|
||||
chargeStatus = target->info->chargingStatus;
|
||||
chargeStatus = target->info->charging.chargingStatus;
|
||||
uVar3 = 0x100;
|
||||
if (chargeStatus == STATUS_DIVING) {
|
||||
uVar3 = 0x200;
|
||||
@@ -984,7 +984,7 @@ bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
||||
u32 r3;
|
||||
|
||||
r3 = 1;
|
||||
if((u8)(target->info->chargingStatus - 7) <= 1)
|
||||
if((u8)(target->info->charging.chargingStatus - 7) <= 1)
|
||||
r3 = 2;
|
||||
flag = sub_8055640(pokemon,target,move,r3 << 8,param_4) ? TRUE : FALSE;
|
||||
return flag;
|
||||
@@ -1143,7 +1143,7 @@ bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para
|
||||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if ((target->info->protectionStatus == STATUS_REFLECT) || (target->info->protectionStatus == STATUS_LIGHT_SCREEN)) {
|
||||
if ((target->info->protection.protectionStatus == STATUS_REFLECT) || (target->info->protection.protectionStatus == STATUS_LIGHT_SCREEN)) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FD104); // The barrier was shattered
|
||||
SendProtectionEndMessage(pokemon,target);
|
||||
flag = TRUE;
|
||||
@@ -1627,7 +1627,7 @@ bool32 sub_8058F04(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||
iVar3 = 1;
|
||||
gDungeon->unk18200 = 0xc;
|
||||
gDungeon->unk18204 = 0;
|
||||
if (entityInfo->chargingStatus == STATUS_DIGGING) {
|
||||
if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||
iVar3 = 2;
|
||||
}
|
||||
flag = sub_8055640(pokemon,target,move,iVar3 << 8,param_4);
|
||||
@@ -2210,7 +2210,7 @@ bool8 sub_8059928(Entity * pokemon,Entity * target,Move * move,u32 param_4)
|
||||
|
||||
iVar2 = 1;
|
||||
flag = FALSE;
|
||||
if ((u8)(target->info->chargingStatus - 7) <= 1){
|
||||
if ((u8)(target->info->charging.chargingStatus - 7) <= 1){
|
||||
iVar2 = 2;
|
||||
}
|
||||
if (sub_8055640(pokemon,target,move,iVar2 << 8,param_4) != 0)
|
||||
@@ -2696,7 +2696,7 @@ bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
||||
u32 uVar2;
|
||||
|
||||
flag = FALSE;
|
||||
if (target->info->chargingStatus == STATUS_DIVING) {
|
||||
if (target->info->charging.chargingStatus == STATUS_DIVING) {
|
||||
uVar2 = 0x200;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -114,20 +114,20 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_RAGE:
|
||||
if (pokemonInfo->chargingStatus == STATUS_ENRAGED)
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_ENRAGED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_COUNTER:
|
||||
case MOVE_PURSUIT:
|
||||
if (pokemonInfo->protectionStatus == STATUS_COUNTER)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_COUNTER)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_MIRROR_MOVE:
|
||||
if (pokemonInfo->protectionStatus == STATUS_MIRROR_MOVE)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MIRROR_MOVE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
break;
|
||||
case MOVE_BIDE:
|
||||
case MOVE_REVENGE:
|
||||
if (pokemonInfo->chargingStatus == STATUS_BIDE)
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -193,25 +193,25 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_ENDURE:
|
||||
if (pokemonInfo->protectionStatus == STATUS_ENDURING)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_ENDURING)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_CHARGE:
|
||||
if (pokemonInfo->chargingStatus == STATUS_CHARGING)
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_CHARGING)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_MIST:
|
||||
if (pokemonInfo->protectionStatus == STATUS_MIST)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MIST)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_LIGHT_SCREEN:
|
||||
if (pokemonInfo->protectionStatus == STATUS_LIGHT_SCREEN)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_LIGHT_SCREEN)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -272,13 +272,13 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_MIRROR_COAT:
|
||||
if (pokemonInfo->protectionStatus == STATUS_MIRROR_COAT)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MIRROR_COAT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_REFLECT:
|
||||
if (pokemonInfo->protectionStatus == STATUS_REFLECT)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_REFLECT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -290,14 +290,14 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_MAGIC_COAT:
|
||||
if (pokemonInfo->protectionStatus == STATUS_MAGIC_COAT)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_MAGIC_COAT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_DETECT:
|
||||
case MOVE_PROTECT:
|
||||
if (pokemonInfo->protectionStatus == STATUS_PROTECT)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_PROTECT)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_SAFEGUARD:
|
||||
if (pokemonInfo->protectionStatus == STATUS_SAFEGUARD)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_SAFEGUARD)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -432,7 +432,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_WISH:
|
||||
if (pokemonInfo->isNotTeamMember || pokemonInfo->protectionStatus == STATUS_WISH)
|
||||
if (pokemonInfo->isNotTeamMember || pokemonInfo->protection.protectionStatus == STATUS_WISH)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -483,7 +483,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_CONVERSION_2:
|
||||
if (pokemonInfo->protectionStatus == STATUS_CONVERSION2)
|
||||
if (pokemonInfo->protection.protectionStatus == STATUS_CONVERSION2)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -592,7 +592,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_ENCORE:
|
||||
if (targetData->volatileStatus == STATUS_ENCORE)
|
||||
if (targetData->Volatile.volatileStatus == STATUS_ENCORE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -774,7 +774,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_TAUNT:
|
||||
if (targetData->volatileStatus == STATUS_TAUNTED)
|
||||
if (targetData->Volatile.volatileStatus == STATUS_TAUNTED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -825,7 +825,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
||||
break;
|
||||
case MOVE_IMPRISON:
|
||||
case MOVE_OBSERVER:
|
||||
if (targetData->volatileStatus == STATUS_PAUSED)
|
||||
if (targetData->Volatile.volatileStatus == STATUS_PAUSED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -856,7 +856,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_ATTRACT:
|
||||
if (targetData->volatileStatus == STATUS_INFATUATED)
|
||||
if (targetData->Volatile.volatileStatus == STATUS_INFATUATED)
|
||||
{
|
||||
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 == STATUS_CONFUSED)
|
||||
if (targetData->Volatile.volatileStatus == STATUS_CONFUSED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -155,11 +155,11 @@ void sub_8075BA4(Entity *param_1, u8 param_2)
|
||||
{
|
||||
EntityInfo * entityInfo = param_1->info;
|
||||
|
||||
if ((param_2 != 0) && (entityInfo->volatileStatus == STATUS_COWERING)) {
|
||||
if ((param_2 != 0) && (entityInfo->Volatile.volatileStatus == STATUS_COWERING)) {
|
||||
entityInfo->action.direction = (entityInfo->action.direction + 4) & DIRECTION_MASK;
|
||||
TargetTileInFront(param_1);
|
||||
}
|
||||
else if (entityInfo->volatileStatus == STATUS_CONFUSED) {
|
||||
else if (entityInfo->Volatile.volatileStatus == STATUS_CONFUSED) {
|
||||
entityInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||
TargetTileInFront(param_1);
|
||||
}
|
||||
@@ -412,9 +412,9 @@ void PausedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, s32 turns
|
||||
return;
|
||||
}
|
||||
SetMessageArgument_2(gAvailablePokemonNames,entityInfo,0);
|
||||
if (entityInfo->volatileStatus != STATUS_PAUSED) {
|
||||
entityInfo->volatileStatus = STATUS_PAUSED;
|
||||
entityInfo->volatileStatusTurns = turns + 1;
|
||||
if (entityInfo->Volatile.volatileStatus != STATUS_PAUSED) {
|
||||
entityInfo->Volatile.volatileStatus = STATUS_PAUSED;
|
||||
entityInfo->Volatile.volatileStatusTurns = turns + 1;
|
||||
nullsub_72(target);
|
||||
if (turns == 1) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB480);
|
||||
@@ -452,9 +452,9 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa
|
||||
else
|
||||
{
|
||||
SetMessageArgument_2(gAvailablePokemonNames,entityInfo,0);
|
||||
if (entityInfo->volatileStatus != STATUS_INFATUATED) {
|
||||
entityInfo->volatileStatus = STATUS_INFATUATED;
|
||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1;
|
||||
if (entityInfo->Volatile.volatileStatus != STATUS_INFATUATED) {
|
||||
entityInfo->Volatile.volatileStatus = STATUS_INFATUATED;
|
||||
entityInfo->Volatile.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1;
|
||||
sub_8041EF8(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB50C);
|
||||
}
|
||||
|
||||
@@ -99,10 +99,10 @@ bool8 sub_80571F0(Entity * pokemon, Move *move)
|
||||
return TRUE;
|
||||
}
|
||||
else if (entityInfo->unkFF == 2) {
|
||||
if (entityInfo->chargingStatus == STATUS_DIVING) {
|
||||
if (entityInfo->charging.chargingStatus == STATUS_DIVING) {
|
||||
if (move->id == MOVE_WHIRLPOOL || move->id == MOVE_SURF) return FALSE;
|
||||
}
|
||||
else if (entityInfo->chargingStatus == STATUS_DIGGING) {
|
||||
else if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||
moveID = move->id;
|
||||
if (moveID == MOVE_EARTHQUAKE || moveID == MOVE_MAGNITUDE) return FALSE;
|
||||
if (moveID == MOVE_NATURE_POWER) {
|
||||
@@ -225,11 +225,11 @@ bool8 CanMonsterUseMove(Entity *pokemon, Move *move, bool8 hasPPChecker)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (pokemonInfo->volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move))
|
||||
if (pokemonInfo->Volatile.volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (pokemonInfo->volatileStatus == STATUS_ENCORE)
|
||||
if (pokemonInfo->Volatile.volatileStatus == STATUS_ENCORE)
|
||||
{
|
||||
if (move->id == MOVE_STRUGGLE)
|
||||
{
|
||||
@@ -257,8 +257,8 @@ bool8 sub_805744C(Entity * pokemon, Move *move, bool8 param_3)
|
||||
return FALSE;
|
||||
}
|
||||
if (param_3 != 0) {
|
||||
if ((entityInfo->volatileStatus == STATUS_TAUNTED) && (!MoveIgnoresTaunted(move))) return FALSE;
|
||||
if (entityInfo->volatileStatus == STATUS_ENCORE) {
|
||||
if ((entityInfo->Volatile.volatileStatus == STATUS_TAUNTED) && (!MoveIgnoresTaunted(move))) return FALSE;
|
||||
if (entityInfo->Volatile.volatileStatus == STATUS_ENCORE) {
|
||||
if (move->id == MOVE_STRUGGLE) {
|
||||
if((entityInfo->struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0) return FALSE;
|
||||
}
|
||||
|
||||
32
src/status.c
32
src/status.c
@@ -403,10 +403,10 @@ void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage)
|
||||
else {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if(entityInfo->volatileStatus != STATUS_CRINGE)
|
||||
if(entityInfo->Volatile.volatileStatus != STATUS_CRINGE)
|
||||
{
|
||||
entityInfo->volatileStatus = STATUS_CRINGE;
|
||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
|
||||
entityInfo->Volatile.volatileStatus = STATUS_CRINGE;
|
||||
entityInfo->Volatile.volatileStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
|
||||
sub_80420A0(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB2E0);
|
||||
}
|
||||
@@ -595,9 +595,9 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage
|
||||
{
|
||||
sub_8041BE8(target);
|
||||
entityInfo = target->info;
|
||||
if (entityInfo->volatileStatus != STATUS_CONFUSED) {
|
||||
entityInfo->volatileStatus = STATUS_CONFUSED;
|
||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E4C,TRUE) + 1;
|
||||
if (entityInfo->Volatile.volatileStatus != STATUS_CONFUSED) {
|
||||
entityInfo->Volatile.volatileStatus = STATUS_CONFUSED;
|
||||
entityInfo->Volatile.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E4C,TRUE) + 1;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB25C);
|
||||
}
|
||||
else {
|
||||
@@ -615,9 +615,9 @@ void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->volatileStatus != STATUS_COWERING) {
|
||||
entityInfo->volatileStatus = STATUS_COWERING;
|
||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1;
|
||||
if (entityInfo->Volatile.volatileStatus != STATUS_COWERING) {
|
||||
entityInfo->Volatile.volatileStatus = STATUS_COWERING;
|
||||
entityInfo->Volatile.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1;
|
||||
sub_8041BF8(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB940);
|
||||
}
|
||||
@@ -1005,7 +1005,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3)
|
||||
}
|
||||
targetEntityInfo->waitingStatus = STATUS_DECOY;
|
||||
targetEntityInfo->enemyDecoy = pokemon->info->isNotTeamMember;
|
||||
targetEntityInfo->fillCA = param_3;
|
||||
targetEntityInfo->unkCA = param_3;
|
||||
targetEntityInfo->waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED0,TRUE) + 1;
|
||||
targetEntityInfo->curseDamageCountdown = 0;
|
||||
sub_806CCB4(target,sub_806CEBC(target));
|
||||
@@ -1114,9 +1114,9 @@ void TauntStatusTarget(Entity * pokemon, Entity * target)
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->volatileStatus != STATUS_TAUNTED) {
|
||||
entityInfo->volatileStatus = STATUS_TAUNTED;
|
||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1;
|
||||
if (entityInfo->Volatile.volatileStatus != STATUS_TAUNTED) {
|
||||
entityInfo->Volatile.volatileStatus = STATUS_TAUNTED;
|
||||
entityInfo->Volatile.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1;
|
||||
nullsub_73(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB9F0);
|
||||
}
|
||||
@@ -1211,9 +1211,9 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target)
|
||||
}
|
||||
else {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (EntityInfo->volatileStatus != STATUS_ENCORE) {
|
||||
EntityInfo->volatileStatus = STATUS_ENCORE;
|
||||
EntityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1;
|
||||
if (EntityInfo->Volatile.volatileStatus != STATUS_ENCORE) {
|
||||
EntityInfo->Volatile.volatileStatus = STATUS_ENCORE;
|
||||
EntityInfo->Volatile.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1;
|
||||
nullsub_83(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBB94);
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ bool8 sub_805B264(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||
gDungeon->unk18200 = gUnknown_8106A8C[r3];
|
||||
gDungeon->unk18204 = 0;
|
||||
iVar5 = gUnknown_80F4F94[r3];
|
||||
if (entityInfo->chargingStatus == STATUS_DIGGING) {
|
||||
if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||
iVar5 *= 2;
|
||||
}
|
||||
r6 = sub_8055864(pokemon,target,move,iVar5,param_4) ? TRUE : FALSE;
|
||||
|
||||
@@ -52,7 +52,7 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
||||
case STATUS_PETRIFIED:
|
||||
return TRUE;
|
||||
}
|
||||
switch (pokemonInfo->volatileStatus)
|
||||
switch (pokemonInfo->Volatile.volatileStatus)
|
||||
{
|
||||
case STATUS_PAUSED:
|
||||
SendMessage(pokemon, *gPtrPausedMessage);
|
||||
@@ -61,7 +61,7 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
||||
SendMessage(pokemon, *gPtrInfatuatedMessage);
|
||||
return TRUE;
|
||||
}
|
||||
if (pokemonInfo->chargingStatus == STATUS_BIDE)
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||
{
|
||||
SendMessage(pokemon, *gPtrBideMessage);
|
||||
return TRUE;
|
||||
@@ -145,7 +145,7 @@ bool8 sub_80701A4(Entity *pokemon)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(pokemonInfo->volatileStatus) {
|
||||
switch(pokemonInfo->Volatile.volatileStatus) {
|
||||
case STATUS_CONFUSED:
|
||||
flag = TRUE;
|
||||
goto _0807026C;
|
||||
@@ -160,11 +160,11 @@ bool8 sub_80701A4(Entity *pokemon)
|
||||
case STATUS_CRINGE:
|
||||
case 8:
|
||||
_0807026C:
|
||||
if (pokemonInfo->chargingStatus == STATUS_BIDE) {
|
||||
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE) {
|
||||
SendMessage(pokemon,*gPtrBideMessage);
|
||||
return TRUE;
|
||||
}
|
||||
else if (((pokemonInfo->chargingStatus != STATUS_NONE) && (pokemonInfo->chargingStatus != STATUS_CHARGING)) && (pokemonInfo->chargingStatus != STATUS_ENRAGED)) {
|
||||
else if (((pokemonInfo->charging.chargingStatus != STATUS_NONE) && (pokemonInfo->charging.chargingStatus != STATUS_CHARGING)) && (pokemonInfo->charging.chargingStatus != STATUS_ENRAGED)) {
|
||||
if (flag) {
|
||||
SendMessage(pokemon,*gPtrMoveInterruptedMessage);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ bool8 sub_80701A4(Entity *pokemon)
|
||||
for(index = 0, move = pokemonInfo->moves; index < MAX_MON_MOVES; move++, index++) {
|
||||
if ((move->moveFlags & MOVE_FLAG_EXISTS) &&
|
||||
(MoveMatchesChargingStatus(pokemon,move)) &&
|
||||
(pokemonInfo->chargingStatusMoveIndex == index)) {
|
||||
(pokemonInfo->charging.chargingStatusMoveIndex == index)) {
|
||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_PLAYER);
|
||||
index_1 = index;
|
||||
r7 = &pokemonInfo->action.unk4[1].actionUseIndex;
|
||||
|
||||
@@ -135,7 +135,7 @@ bool8 HasNegativeStatus(Entity *pokemon)
|
||||
pokemonInfo->sleep.sleep == STATUS_YAWNING ||
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_NONE ||
|
||||
(pokemonInfo->immobilize.immobilizeStatus != STATUS_INGRAIN && pokemonInfo->immobilize.immobilizeStatus != STATUS_NONE) ||
|
||||
pokemonInfo->volatileStatus != STATUS_NONE ||
|
||||
pokemonInfo->Volatile.volatileStatus != STATUS_NONE ||
|
||||
pokemonInfo->waitingStatus == STATUS_CURSED ||
|
||||
pokemonInfo->waitingStatus == STATUS_DECOY ||
|
||||
pokemonInfo->linkedStatus == STATUS_LEECH_SEED ||
|
||||
|
||||
72
src/trap_1.c
72
src/trap_1.c
@@ -46,7 +46,7 @@ void sub_80817B0(unkStruct_8094924 *param_1, u32 param_2);
|
||||
void SavePosition(void*, Position *);
|
||||
void sub_80818E4(unkStruct_8094924 *param_1, AITarget* param_2);
|
||||
void sub_8081B54(void *, u8 *);
|
||||
void sub_808186C(unkStruct_8094924 *param_1, s32 param_2);
|
||||
void SaveSpeedStage(unkStruct_8094924 *param_1, s32 param_2);
|
||||
void sub_8081854(unkStruct_8094924 *param_1, s32 param_2);
|
||||
void sub_808183C(unkStruct_8094924 *param_1, s32 param_2);
|
||||
void sub_8081AB8(void *, bool8 *);
|
||||
@@ -55,17 +55,17 @@ void sub_8081A80(void *, u8*);
|
||||
void sub_8081A74(void *, u8*);
|
||||
void sub_8081A58(void *, u8*);
|
||||
void sub_8081A24(void *, u8*);
|
||||
void sub_8081994(void *, u8*);
|
||||
void sub_8081968(unkStruct_8094924 *param_1, Immobilize *param_2);
|
||||
void sub_808193C(unkStruct_8094924 *param_1, NonVolatile *param_2);
|
||||
void SaveVolatile(unkStruct_8094924 *param_1, Volatile *param_2);
|
||||
void SaveImmobilize(unkStruct_8094924 *param_1, Immobilize *param_2);
|
||||
void SaveNonVolatile(unkStruct_8094924 *param_1, NonVolatile *param_2);
|
||||
void SaveEntitySleep(unkStruct_8094924 *param_1, Sleep* param_2);
|
||||
void sub_8081880(unkStruct_8094924 *param_1, u8 param_2);
|
||||
void SaveTactic(unkStruct_8094924 *param_1, u8 param_2);
|
||||
void SaveHiddenPower(unkStruct_8094924 *param_1, HiddenPower *param_2);
|
||||
void sub_80819B0(void *, u8 *);
|
||||
void sub_80819D4(void *, u8 *);
|
||||
void SaveCharging(unkStruct_8094924 *param_1, Charging *param_2);
|
||||
void SaveProtection(unkStruct_8094924 *param_1, Protection *param_2);
|
||||
void sub_80819F0(void *, u8 *);
|
||||
void SaveSpeedCounters(void *, u8 *, u32);
|
||||
void sub_80818B8(unkStruct_8094924 *param_1, u8 param_2);
|
||||
void SaveClientType(unkStruct_8094924 *param_1, u8 param_2);
|
||||
void sub_803E708(u32, u32);
|
||||
void sub_80421C0(Entity *, u32);
|
||||
void sub_804687C(Entity *, Position *, Position *, Item *, u32);
|
||||
@@ -244,9 +244,9 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
Sleep *puStack_8c;
|
||||
NonVolatile *puStack_88;
|
||||
Immobilize *puStack_84;
|
||||
u8 *puStack_80;
|
||||
u8 *puStack_7c;
|
||||
u8 *puStack_78;
|
||||
Volatile *puStack_80;
|
||||
Charging *puStack_7c;
|
||||
Protection *puStack_78;
|
||||
u8 *puStack_74;
|
||||
u8 *puStack_70;
|
||||
u8 *puStack_6c;
|
||||
@@ -338,9 +338,9 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
puStack_8c = &info->sleep;
|
||||
puStack_88 = &info->nonVolatile;
|
||||
puStack_84 = &info->immobilize;
|
||||
puStack_80 = &info->volatileStatus;
|
||||
puStack_7c = &info->chargingStatus;
|
||||
puStack_78 = &info->protectionStatus;
|
||||
puStack_80 = &info->Volatile;
|
||||
puStack_7c = &info->charging;
|
||||
puStack_78 = &info->protection;
|
||||
puStack_74 = &info->waitingStatus;
|
||||
puStack_70 = &info->linkedStatus;
|
||||
puStack_6c = &info->moveStatus;
|
||||
@@ -374,17 +374,17 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
sub_80818E4(param_1,temp3);
|
||||
sub_8081B54(param_1,temp2);
|
||||
sub_8081B54(param_1,temp1);
|
||||
sub_8081880(param_1,*puStack_a0);
|
||||
SaveTactic(param_1,*puStack_a0);
|
||||
SaveHiddenPower(param_1,psStack_a4);
|
||||
sub_8083078(param_1,*puStack_9c);
|
||||
sub_8083078(param_1,*puStack_98);
|
||||
sub_8083078(param_1,*puStack_94);
|
||||
SaveEntitySleep(param_1,puStack_8c);
|
||||
sub_808193C(param_1,puStack_88);
|
||||
sub_8081968(param_1,puStack_84);
|
||||
sub_8081994(param_1,puStack_80);
|
||||
sub_80819B0(param_1,puStack_7c);
|
||||
sub_80819D4(param_1,puStack_78);
|
||||
SaveNonVolatile(param_1,puStack_88);
|
||||
SaveImmobilize(param_1,puStack_84);
|
||||
SaveVolatile(param_1,puStack_80);
|
||||
SaveCharging(param_1,puStack_7c);
|
||||
SaveProtection(param_1,puStack_78);
|
||||
sub_80819F0(param_1,puStack_74);
|
||||
sub_8081A24(param_1,puStack_70);
|
||||
sub_8081A58(param_1,puStack_6c);
|
||||
@@ -407,7 +407,7 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
sub_8083060(param_1,*puStack_28);
|
||||
sub_808183C(param_1,*puStack_24);
|
||||
sub_8081854(param_1,info->targetingDecoy);
|
||||
sub_808186C(param_1,info->speedStage);
|
||||
SaveSpeedStage(param_1,info->speedStage);
|
||||
SaveSpeedCounters(param_1,info->speedUpCounters,NUM_SPEED_COUNTERS);
|
||||
SaveSpeedCounters(param_1,info->speedDownCounters,NUM_SPEED_COUNTERS);
|
||||
sub_8083060(param_1,info->stockpileStage);
|
||||
@@ -444,7 +444,7 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
sub_8083048(param_1,info->unk1F8);
|
||||
sub_8083048(param_1,info->mobileTurnTimer);
|
||||
sub_8083078(param_1,info->expGainedInTurn);
|
||||
sub_80818B8(param_1,*puStack_90);
|
||||
SaveClientType(param_1,*puStack_90);
|
||||
}
|
||||
|
||||
void sub_8081454(unkStruct_8094924 *param_1)
|
||||
@@ -580,12 +580,12 @@ void sub_8081854(unkStruct_8094924 *param_1, s32 param_2)
|
||||
sub_8082FA8(param_1, &stack, 1);
|
||||
}
|
||||
|
||||
void sub_808186C(unkStruct_8094924 *param_1, s32 param_2)
|
||||
void SaveSpeedStage(unkStruct_8094924 *param_1, s32 param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2, 4);
|
||||
}
|
||||
|
||||
void sub_8081880(unkStruct_8094924 *param_1, u8 param_2)
|
||||
void SaveTactic(unkStruct_8094924 *param_1, u8 param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2, 1);
|
||||
}
|
||||
@@ -596,7 +596,7 @@ void SaveHiddenPower(unkStruct_8094924 *param_1, HiddenPower *param_2)
|
||||
sub_808180C(param_1, param_2->hiddenPowerType);
|
||||
}
|
||||
|
||||
void sub_80818B8(unkStruct_8094924 *param_1, u8 param_2)
|
||||
void SaveClientType(unkStruct_8094924 *param_1, u8 param_2)
|
||||
{
|
||||
sub_8083060(param_1, param_2);
|
||||
}
|
||||
@@ -623,7 +623,7 @@ void SaveEntitySleep(unkStruct_8094924 *param_1, Sleep* param_2)
|
||||
sub_8083060(param_1, param_2->sleepTurns);
|
||||
}
|
||||
|
||||
void sub_808193C(unkStruct_8094924 *param_1, NonVolatile *param_2)
|
||||
void SaveNonVolatile(unkStruct_8094924 *param_1, NonVolatile *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->nonVolatileStatus, 1);
|
||||
sub_8083060(param_1, param_2->nonVolatileStatusTurns);
|
||||
@@ -631,7 +631,7 @@ void sub_808193C(unkStruct_8094924 *param_1, NonVolatile *param_2)
|
||||
sub_8083060(param_1, param_2->unk4);
|
||||
}
|
||||
|
||||
void sub_8081968(unkStruct_8094924 *param_1, Immobilize *param_2)
|
||||
void SaveImmobilize(unkStruct_8094924 *param_1, Immobilize *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->immobilizeStatus, 1);
|
||||
sub_8083060(param_1, param_2->immobilizeStatusTurns);
|
||||
@@ -639,4 +639,22 @@ void sub_8081968(unkStruct_8094924 *param_1, Immobilize *param_2)
|
||||
sub_8083078(param_1, param_2->unk4);
|
||||
}
|
||||
|
||||
void SaveVolatile(unkStruct_8094924 *param_1, Volatile *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->volatileStatus, 1);
|
||||
sub_8083060(param_1, param_2->volatileStatusTurns);
|
||||
}
|
||||
|
||||
void SaveCharging(unkStruct_8094924 *param_1, Charging *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->chargingStatus, 1);
|
||||
sub_8083060(param_1, param_2->chargingStatusTurns);
|
||||
sub_8083060(param_1, param_2->chargingStatusMoveIndex);
|
||||
}
|
||||
|
||||
void SaveProtection(unkStruct_8094924 *param_1, Protection *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->protectionStatus, 1);
|
||||
sub_8083060(param_1, param_2->protectionStatusTurns);
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
if (moveType == TYPE_ELECTRIC && userData->chargingStatus == STATUS_CHARGING)
|
||||
if (moveType == TYPE_ELECTRIC && userData->charging.chargingStatus == STATUS_CHARGING)
|
||||
{
|
||||
weight *= 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user