mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 21:19:53 +00:00
more work
This commit is contained in:
parent
7efd9c44fc
commit
4cf3126551
@ -5,48 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_808193C
|
||||
sub_808193C:
|
||||
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
|
||||
ldrb r1, [r4, 0x3]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083060
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_808193C
|
||||
|
||||
thumb_func_start sub_8081968
|
||||
sub_8081968:
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8082FA8
|
||||
ldrb r1, [r4, 0x8]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083060
|
||||
ldrb r1, [r4, 0x9]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083060
|
||||
ldr r1, [r4, 0x4]
|
||||
adds r0, r5, 0
|
||||
bl sub_8083078
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8081968
|
||||
|
||||
thumb_func_start sub_8081994
|
||||
sub_8081994:
|
||||
push {r4,r5,lr}
|
||||
|
@ -67,13 +67,30 @@ typedef struct AITarget
|
||||
|
||||
} AITarget;
|
||||
|
||||
|
||||
typedef struct Sleep
|
||||
{
|
||||
/* 0x0 */ u8 sleep;
|
||||
/* 0x1 */ u8 sleepTurns;
|
||||
} Sleep;
|
||||
|
||||
typedef struct NonVolatile
|
||||
{
|
||||
/* 0x0 */ u8 nonVolatileStatus;
|
||||
/* 0x1 */ u8 nonVolatileStatusTurns;
|
||||
/* 0x2 */ u8 nonVolatileStatusDamageCountdown;
|
||||
/* 0x3 */ u8 unk4;
|
||||
} 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;
|
||||
|
||||
|
||||
// size: 0x208
|
||||
typedef struct EntityInfo
|
||||
@ -138,16 +155,8 @@ typedef struct EntityInfo
|
||||
// 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 */ u8 nonVolatileStatus;
|
||||
/* 0xAD */ u8 nonVolatileStatusTurns;
|
||||
/* 0xAE */ u8 nonVolatileStatusDamageCountdown;
|
||||
u8 fillAF;
|
||||
/* 0xB0 */ u8 immobilizeStatus;
|
||||
u8 fillB1[0xB4 - 0xB1];
|
||||
/* 0xB4 */ s32 unkB4;
|
||||
/* 0xB8 */ u8 immobilizeStatusTurns;
|
||||
/* 0xB9 */ u8 immobilizeStatusDamageCountdown;
|
||||
u8 fillBA[0xBC - 0xBA];
|
||||
/* 0xAC */ NonVolatile nonVolatile;
|
||||
/* 0xB0 */ Immobilize immobilize;
|
||||
/* 0xBC */ u8 volatileStatus;
|
||||
/* 0xBD */ u8 volatileStatusTurns;
|
||||
u8 fillBE[0xC0 - 0xBE];
|
||||
|
@ -213,8 +213,8 @@ void EntityUpdateStatusSprites(Entity *entity)
|
||||
spriteStatus = gStatusSpriteMasks_SleepStatus[entityInfo->sleep.sleep];
|
||||
}
|
||||
spriteStatus = spriteStatus |
|
||||
gStatusSpriteMasks_NonVolatileStatus[entityInfo->nonVolatileStatus] |
|
||||
gStatusSpriteMasks_ImmobilizeStatus[entityInfo->immobilizeStatus] |
|
||||
gStatusSpriteMasks_NonVolatileStatus[entityInfo->nonVolatile.nonVolatileStatus] |
|
||||
gStatusSpriteMasks_ImmobilizeStatus[entityInfo->immobilize.immobilizeStatus] |
|
||||
gStatusSpriteMasks_VolatileStatus[entityInfo->volatileStatus] |
|
||||
gStatusSpriteMasks_ChargingStatus[entityInfo->chargingStatus] |
|
||||
gStatusSpriteMasks_ProtectionStatus[entityInfo->protectionStatus] |
|
||||
|
@ -545,7 +545,7 @@ void EyedropSeedItemAction(Entity *pokemon, Entity *target)
|
||||
|
||||
void CheriBerryItemAction(Entity *pokemon, Entity *target)
|
||||
{
|
||||
if(target->info->nonVolatileStatus == STATUS_PARALYSIS)
|
||||
if(target->info->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS)
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
else
|
||||
// Pointer to "But nothing happened!"
|
||||
@ -554,7 +554,7 @@ void CheriBerryItemAction(Entity *pokemon, Entity *target)
|
||||
|
||||
void PechaBerryItemAction(Entity *pokemon, Entity *target)
|
||||
{
|
||||
if((u8)(target->info->nonVolatileStatus - 2) <= 1)
|
||||
if((u8)(target->info->nonVolatile.nonVolatileStatus - 2) <= 1)
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
else
|
||||
// Pointer to "But nothing happened!"
|
||||
@ -599,7 +599,7 @@ void DoomSeedItemAction(Entity *pokemon, Entity *target)
|
||||
|
||||
void RawstBerryItemAction(Entity *pokemon, Entity *target)
|
||||
{
|
||||
if(target->info->nonVolatileStatus == STATUS_BURN)
|
||||
if(target->info->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
else
|
||||
{
|
||||
@ -708,7 +708,7 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
|
||||
else {
|
||||
uVar1 = gUnknown_80F4FA4;
|
||||
}
|
||||
if (entityInfo_1->immobilizeStatus == STATUS_FROZEN) {
|
||||
if (entityInfo_1->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(pokemon, target);
|
||||
}
|
||||
sub_806F370(pokemon, target, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
@ -731,7 +731,7 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
|
||||
else {
|
||||
uVar1 = gUnknown_80F4FA6;
|
||||
}
|
||||
if (entityInfo->immobilizeStatus == STATUS_FROZEN) {
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||
SendImmobilizeEndMessage(pokemon, entity);
|
||||
}
|
||||
sub_806F370(pokemon, entity, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||
|
@ -1225,7 +1225,7 @@ void SendNonVolatileEndMessage(Entity * pokemon, Entity * target)
|
||||
}
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
switch(entityInfo->nonVolatileStatus) {
|
||||
switch(entityInfo->nonVolatile.nonVolatileStatus) {
|
||||
case STATUS_NONE:
|
||||
case 5:
|
||||
break;
|
||||
@ -1241,7 +1241,7 @@ void SendNonVolatileEndMessage(Entity * pokemon, Entity * target)
|
||||
break;
|
||||
|
||||
}
|
||||
entityInfo->nonVolatileStatus = STATUS_NONE;
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
@ -1256,7 +1256,7 @@ void SendImmobilizeEndMessage(Entity * pokemon, Entity *target)
|
||||
}
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
switch(entityInfo->immobilizeStatus) {
|
||||
switch(entityInfo->immobilize.immobilizeStatus) {
|
||||
case STATUS_NONE:
|
||||
case 8:
|
||||
break;
|
||||
@ -1280,7 +1280,7 @@ void SendImmobilizeEndMessage(Entity * pokemon, Entity *target)
|
||||
sub_80522F4(pokemon,target, *gPtrMonNoLongerPetrifiedMessage);
|
||||
break;
|
||||
}
|
||||
entityInfo->immobilizeStatus = STATUS_NONE;
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
if (isFrozen) {
|
||||
sub_8042A74(target);
|
||||
@ -1580,7 +1580,7 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target)
|
||||
|
||||
entityInfo = target->info;
|
||||
flag = FALSE;
|
||||
if (entityInfo->immobilizeStatus == 6) {
|
||||
if (entityInfo->immobilize.immobilizeStatus == 6) {
|
||||
SendImmobilizeEndMessage(pokemon, target);
|
||||
flag = TRUE;
|
||||
}
|
||||
@ -1648,10 +1648,10 @@ void SendThawedMessage(Entity *pokemon, Entity *target)
|
||||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
if (entityInfo->immobilizeStatus == STATUS_FROZEN) {
|
||||
entityInfo->immobilizeStatus = STATUS_NONE;
|
||||
entityInfo->immobilizeStatusTurns = 0;
|
||||
entityInfo->immobilizeStatusDamageCountdown = 0;
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||
entityInfo->immobilize.immobilizeStatusTurns = 0;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FA8BC); // $m0 thawed out!
|
||||
EntityUpdateStatusSprites(target);
|
||||
|
@ -75,7 +75,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
||||
EntityInfo *pokemonInfo = pokemon->info;
|
||||
if (pokemonInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY)
|
||||
{
|
||||
if (pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
{
|
||||
SendImmobilizeEndMessage(pokemon, pokemon);
|
||||
}
|
||||
|
@ -808,7 +808,7 @@ bool8 TargetRegularAttack(Entity *pokemon, u32 *targetDir, bool8 checkPetrified)
|
||||
GetEntityType(target) == ENTITY_MONSTER &&
|
||||
CanAttackInDirection(pokemon, direction) &&
|
||||
CanTarget(pokemon, target, FALSE, checkPetrified) == TARGET_CAPABILITY_CAN_TARGET &&
|
||||
(!hasStatusChecker || target->info->immobilizeStatus != STATUS_FROZEN))
|
||||
(!hasStatusChecker || target->info->immobilize.immobilizeStatus != STATUS_FROZEN))
|
||||
{
|
||||
potentialAttackTargetDirections[numPotentialTargets] = direction;
|
||||
potentialAttackTargetWeights[numPotentialTargets] = WeightMove(pokemon, TARGETING_FLAG_TARGET_OTHER, target, TYPE_NONE);
|
||||
|
@ -219,7 +219,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
||||
}
|
||||
break;
|
||||
case ITEM_CHERI_BERRY:
|
||||
if (pokemonInfo->nonVolatileStatus != STATUS_PARALYSIS)
|
||||
if (pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -250,8 +250,8 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
||||
}
|
||||
break;
|
||||
case ITEM_PECHA_BERRY:
|
||||
if (pokemonInfo->nonVolatileStatus != STATUS_POISONED &&
|
||||
pokemonInfo->nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
if (pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_POISONED &&
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -358,7 +358,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
||||
itemWeight = 80;
|
||||
break;
|
||||
case ITEM_RAWST_BERRY:
|
||||
if (pokemonInfo->nonVolatileStatus == STATUS_BURN)
|
||||
if (pokemonInfo->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
@ -388,7 +388,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
||||
}
|
||||
break;
|
||||
case ITEM_STUN_SEED:
|
||||
if (pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -173,23 +173,23 @@ bool8 sub_8072CF4(Entity *entity)
|
||||
gUnknown_202F222 = 0;
|
||||
switch(info->action.action) {
|
||||
case ACTION_WALK:
|
||||
if(info->immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||
if(info->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilizeStatus == STATUS_CONSTRICTION)
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_CONSTRICTION)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilizeStatus == STATUS_INGRAIN)
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_INGRAIN)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilizeStatus == STATUS_WRAP)
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||
{
|
||||
goto _282;
|
||||
}
|
||||
else if(info->immobilizeStatus == STATUS_WRAPPED)
|
||||
else if(info->immobilize.immobilizeStatus == STATUS_WRAPPED)
|
||||
{
|
||||
_282:
|
||||
info->action.action = ACTION_NOTHING;
|
||||
|
@ -178,7 +178,7 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (!pokemonInfo->isNotTeamMember && target->info->immobilizeStatus == STATUS_PETRIFIED)
|
||||
else if (!pokemonInfo->isNotTeamMember && target->info->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ u8 CanTarget(Entity *pokemon, Entity *targetPokemon, bool8 ignoreInvisible, bool
|
||||
targetData->clientType == CLIENT_TYPE_DONT_MOVE ||
|
||||
pokemonInfo->clientType == CLIENT_TYPE_CLIENT ||
|
||||
targetData->clientType == CLIENT_TYPE_CLIENT ||
|
||||
(checkPetrified && !pokemonInfo->isNotTeamMember && targetData->immobilizeStatus == STATUS_PETRIFIED) ||
|
||||
(checkPetrified && !pokemonInfo->isNotTeamMember && targetData->immobilize.immobilizeStatus == STATUS_PETRIFIED) ||
|
||||
(!ignoreInvisible && targetData->transformStatus == STATUS_INVISIBLE && !CanSeeInvisibleMonsters(pokemon)))
|
||||
{
|
||||
return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET;
|
||||
|
@ -27,7 +27,7 @@ bool8 CannotMove(Entity *pokemon, bool8 checkBlinker)
|
||||
|| pokemonInfo->sleep.sleep == STATUS_NIGHTMARE
|
||||
|| pokemonInfo->volatileStatus == STATUS_PAUSED
|
||||
|| pokemonInfo->volatileStatus == STATUS_INFATUATED
|
||||
|| pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
||||
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
return TRUE;
|
||||
|
||||
if (pokemonInfo->terrifiedTurns != 0)
|
||||
@ -45,8 +45,8 @@ bool8 sub_8070BC0(Entity* entity)
|
||||
|| entityInfo->sleep.sleep == STATUS_NIGHTMARE
|
||||
|| ShouldMonsterRunAway(entity)
|
||||
|| entityInfo->muzzled == TRUE
|
||||
|| entityInfo->immobilizeStatus == STATUS_PETRIFIED
|
||||
|| entityInfo->immobilizeStatus == STATUS_FROZEN)
|
||||
|| entityInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED
|
||||
|| entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN)
|
||||
return FALSE;
|
||||
|
||||
if (entityInfo->volatileStatus == STATUS_CONFUSED)
|
||||
@ -58,9 +58,9 @@ bool8 sub_8070BC0(Entity* entity)
|
||||
return FALSE;
|
||||
if (entityInfo->volatileStatus == STATUS_CRINGE)
|
||||
return FALSE;
|
||||
if (entityInfo->immobilizeStatus == STATUS_WRAP)
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||
return FALSE;
|
||||
if (entityInfo->immobilizeStatus == STATUS_WRAPPED
|
||||
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED
|
||||
|| entityInfo->eyesightStatus == STATUS_CROSS_EYED)
|
||||
return FALSE;
|
||||
if (entityInfo->waitingStatus == STATUS_DECOY)
|
||||
@ -106,8 +106,8 @@ bool8 HasStatusThatPreventsActing(Entity *pokemon)
|
||||
|
||||
if ((pokemonInfo->sleep.sleep != STATUS_SLEEPLESS
|
||||
&& pokemonInfo->sleep.sleep != STATUS_NONE)
|
||||
|| pokemonInfo->immobilizeStatus == STATUS_FROZEN
|
||||
|| pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
||||
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_FROZEN
|
||||
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||
return TRUE;
|
||||
|
||||
if (pokemonInfo->chargingStatus == STATUS_BIDE)
|
||||
@ -124,14 +124,14 @@ bool8 CannotAttack(Entity *pokemon, bool8 skipSleep)
|
||||
pokemonInfo->sleep.sleep == STATUS_SLEEPLESS ||
|
||||
pokemonInfo->sleep.sleep == STATUS_YAWNING ||
|
||||
pokemonInfo->sleep.sleep == STATUS_NONE) &&
|
||||
pokemonInfo->immobilizeStatus != STATUS_FROZEN &&
|
||||
pokemonInfo->immobilizeStatus != STATUS_WRAP &&
|
||||
pokemonInfo->immobilizeStatus != STATUS_WRAPPED &&
|
||||
pokemonInfo->immobilizeStatus != STATUS_PETRIFIED &&
|
||||
pokemonInfo->immobilize.immobilizeStatus != STATUS_FROZEN &&
|
||||
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->nonVolatileStatus != STATUS_PARALYSIS &&
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS &&
|
||||
!ShouldMonsterRunAway(pokemon))
|
||||
return FALSE;
|
||||
|
||||
|
@ -304,7 +304,7 @@ s32 CalcSpeedStage(Entity *pokemon)
|
||||
}
|
||||
}
|
||||
|
||||
if (entityInfo->nonVolatileStatus == STATUS_PARALYSIS) {
|
||||
if (entityInfo->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) {
|
||||
speed--;
|
||||
}
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ bool8 sub_8058548(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
||||
u32 r5;
|
||||
|
||||
r5 = 0x80 << 1;
|
||||
if((pokemon->info->nonVolatileStatus) != STATUS_NONE)
|
||||
if((pokemon->info->nonVolatile.nonVolatileStatus) != STATUS_NONE)
|
||||
r5 = gUnknown_80F4F6C;
|
||||
flag = sub_8055640(pokemon,target,move,r5,param_4) ? TRUE : FALSE;
|
||||
return flag;
|
||||
@ -1259,7 +1259,7 @@ bool8 sub_80587E8(Entity * pokemon, Entity * target, Move * move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
if (target->info->nonVolatileStatus == STATUS_PARALYSIS) {
|
||||
if (target->info->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) {
|
||||
flag = sub_8055640(pokemon,target,move,0x80 << 2,param_4) ? TRUE : FALSE;
|
||||
SendNonVolatileEndMessage(pokemon, target);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_INGRAIN:
|
||||
if (pokemonInfo->immobilizeStatus == STATUS_INGRAIN || pokemonInfo->maxHPStat / 2 < pokemonInfo->HP)
|
||||
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_INGRAIN || pokemonInfo->maxHPStat / 2 < pokemonInfo->HP)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -546,7 +546,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
||||
EntityInfo *userData = user->info;
|
||||
EntityInfo *targetData = target->info;
|
||||
s32 i;
|
||||
if (targetData->immobilizeStatus == STATUS_FROZEN && MoveCannotHitFrozen(move))
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_FROZEN && MoveCannotHitFrozen(move))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -659,7 +659,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_WILL_O_WISP:
|
||||
if (targetData->nonVolatileStatus == STATUS_BURN)
|
||||
if (targetData->nonVolatile.nonVolatileStatus == 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->nonVolatileStatus == STATUS_PARALYSIS)
|
||||
if (targetData->nonVolatile.nonVolatileStatus == 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->immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -862,28 +862,28 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
||||
}
|
||||
break;
|
||||
case MOVE_WRAP:
|
||||
if (targetData->immobilizeStatus == STATUS_WRAP)
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (targetData->immobilizeStatus == STATUS_WRAPPED)
|
||||
if (targetData->immobilize.immobilizeStatus == STATUS_WRAPPED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_TOXIC:
|
||||
if (targetData->nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case MOVE_POISON_GAS:
|
||||
case MOVE_POISONPOWDER:
|
||||
if (targetData->nonVolatileStatus == STATUS_POISONED)
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_POISONED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (targetData->nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -505,11 +505,11 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
|
||||
else
|
||||
{
|
||||
isNotBurned = TRUE;
|
||||
if (entityInfo->nonVolatileStatus != STATUS_BURN) {
|
||||
entityInfo->nonVolatileStatus = STATUS_BURN;
|
||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E30,TRUE) + 1;
|
||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->fillAF = 0;
|
||||
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;
|
||||
isNotBurned = FALSE;
|
||||
if (param_3 != 0) {
|
||||
sub_8041C34(target);
|
||||
@ -591,14 +591,14 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
|
||||
{
|
||||
isNotPoisoned = TRUE;
|
||||
|
||||
if(entityInfo->nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
{
|
||||
if(entityInfo->nonVolatileStatus != STATUS_POISONED)
|
||||
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_POISONED)
|
||||
{
|
||||
entityInfo->nonVolatileStatus = STATUS_POISONED;
|
||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E34,TRUE) + 1;
|
||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->fillAF = 0;
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_POISONED;
|
||||
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E34,TRUE) + 1;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->nonVolatile.unk4 = 0;
|
||||
isNotPoisoned = FALSE;
|
||||
sub_8041C6C(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB598);
|
||||
@ -680,12 +680,12 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM
|
||||
{
|
||||
isNotBadlyPoisoned = TRUE;
|
||||
|
||||
if(entityInfo->nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||
{
|
||||
entityInfo->nonVolatileStatus = STATUS_BADLY_POISONED;
|
||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E38,TRUE) + 1;
|
||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->fillAF = 0;
|
||||
entityInfo->nonVolatile.nonVolatileStatus = STATUS_BADLY_POISONED;
|
||||
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E38,TRUE) + 1;
|
||||
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->nonVolatile.unk4 = 0;
|
||||
isNotBadlyPoisoned = FALSE;
|
||||
sub_8041C7C(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB5B4);
|
||||
@ -738,7 +738,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||
entityInfo = target->info;
|
||||
|
||||
if ((entityInfo->immobilizeStatus != STATUS_FROZEN) && !HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
if ((entityInfo->immobilize.immobilizeStatus != STATUS_FROZEN) && !HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||
if (HasAbility(target, ABILITY_MAGMA_ARMOR)) {
|
||||
if (displayMessage)
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FCDE0);
|
||||
@ -759,13 +759,13 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((u8)(entityInfo->immobilizeStatus - 3) <= 1) {
|
||||
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3) <= 1) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
sub_8041F08(target);
|
||||
entityInfo->immobilizeStatus = STATUS_FROZEN;
|
||||
entityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E2C,TRUE) + 1;
|
||||
entityInfo->immobilizeStatusDamageCountdown = 0;
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_FROZEN;
|
||||
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E2C,TRUE) + 1;
|
||||
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB610);
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
@ -782,19 +782,19 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s16 param_3, bool32
|
||||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage_u8))) {
|
||||
entityInfo = target->info;
|
||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
||||
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
else if (entityInfo->immobilizeStatus == STATUS_INGRAIN) {
|
||||
else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FA844);
|
||||
}
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->immobilizeStatus != STATUS_CONSTRICTION) {
|
||||
entityInfo->immobilizeStatus = STATUS_CONSTRICTION;
|
||||
entityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E58,TRUE) + 1;
|
||||
entityInfo->immobilizeStatusDamageCountdown = 0;
|
||||
entityInfo->unkB4 = param_3_s32;
|
||||
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;
|
||||
nullsub_71(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB628);
|
||||
sub_806CE94(target,8);
|
||||
@ -812,18 +812,18 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target)
|
||||
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||
entityInfo = target->info;
|
||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
||||
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
else if (entityInfo->immobilizeStatus == STATUS_INGRAIN) {
|
||||
else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FA844);
|
||||
}
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->immobilizeStatus != STATUS_SHADOW_HOLD) {
|
||||
entityInfo->immobilizeStatus = STATUS_SHADOW_HOLD;
|
||||
entityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E54,TRUE) + 1;
|
||||
entityInfo->immobilizeStatusDamageCountdown = 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;
|
||||
nullsub_70(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB668);
|
||||
sub_806CE94(target,8);
|
||||
@ -843,14 +843,14 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target)
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
entityInfo2 = entityInfo;
|
||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
||||
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||
sub_8076CB4(entityInfo->unk9C);
|
||||
}
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo2->immobilizeStatus != STATUS_INGRAIN) {
|
||||
entityInfo2->immobilizeStatus = STATUS_INGRAIN;
|
||||
entityInfo2->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1;
|
||||
entityInfo2->immobilizeStatusDamageCountdown = 0;
|
||||
if (entityInfo2->immobilize.immobilizeStatus != STATUS_INGRAIN) {
|
||||
entityInfo2->immobilize.immobilizeStatus = STATUS_INGRAIN;
|
||||
entityInfo2->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1;
|
||||
entityInfo2->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
nullsub_90(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB6A4);
|
||||
}
|
||||
@ -877,16 +877,16 @@ void WrapTarget(Entity * pokemon, Entity * target)
|
||||
}
|
||||
pokemonEntityData = pokemon->info;
|
||||
targetEntityInfo = target->info;
|
||||
if ((u8)(pokemonEntityData->immobilizeStatus - 3U) > 1) {
|
||||
if ((targetEntityInfo->immobilizeStatus != STATUS_WRAP))
|
||||
if ((u8)(pokemonEntityData->immobilize.immobilizeStatus - 3U) > 1) {
|
||||
if ((targetEntityInfo->immobilize.immobilizeStatus != STATUS_WRAP))
|
||||
{
|
||||
if(targetEntityInfo->immobilizeStatus != STATUS_WRAPPED) {
|
||||
pokemonEntityData->immobilizeStatus = STATUS_WRAP;
|
||||
pokemonEntityData->immobilizeStatusTurns = 0x7f;
|
||||
pokemonEntityData->immobilizeStatusDamageCountdown = 0;
|
||||
targetEntityInfo->immobilizeStatus = STATUS_WRAPPED;
|
||||
targetEntityInfo->immobilizeStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E5C, TRUE) + 1;
|
||||
targetEntityInfo->immobilizeStatusDamageCountdown = 0;
|
||||
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;
|
||||
iVar5 = &pokemonEntityData->unk9C;
|
||||
piVar3 = &gDungeon->unk37F4;
|
||||
*iVar5 = *piVar3;
|
||||
@ -900,19 +900,19 @@ void WrapTarget(Entity * pokemon, Entity * target)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pokemonEntityData->immobilizeStatus == STATUS_WRAP) {
|
||||
if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAP) {
|
||||
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB6FC);
|
||||
}
|
||||
if (targetEntityInfo->immobilizeStatus == STATUS_WRAP) {
|
||||
if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAP) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB6FC);
|
||||
}
|
||||
if (pokemonEntityData->immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB718);
|
||||
}
|
||||
if (targetEntityInfo->immobilizeStatus == STATUS_WRAPPED) {
|
||||
if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB718);
|
||||
}
|
||||
@ -932,8 +932,8 @@ void sub_8076CB4(s32 param_1)
|
||||
if (EntityExists(entity)) {
|
||||
entityInfo = entity->info;
|
||||
if (entityInfo->unk9C == param_1) {
|
||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
||||
entityInfo->immobilizeStatus = STATUS_NONE;
|
||||
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||
}
|
||||
entityInfo->unk9C = 0;
|
||||
}
|
||||
@ -952,19 +952,19 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target)
|
||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||
sub_8041C08(target);
|
||||
targetEntityInfo = target->info;
|
||||
if ((u8)(targetEntityInfo->immobilizeStatus - 3U) < 2) {
|
||||
if ((u8)(targetEntityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||
sub_8076CB4(targetEntityInfo->unk9C);
|
||||
}
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (targetEntityInfo->immobilizeStatus != STATUS_PETRIFIED) {
|
||||
targetEntityInfo->immobilizeStatus = STATUS_PETRIFIED;
|
||||
if (targetEntityInfo->immobilize.immobilizeStatus != STATUS_PETRIFIED) {
|
||||
targetEntityInfo->immobilize.immobilizeStatus = STATUS_PETRIFIED;
|
||||
if (targetEntityInfo->isTeamLeader) {
|
||||
targetEntityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EBC,TRUE) + 1;
|
||||
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EBC,TRUE) + 1;
|
||||
}
|
||||
else {
|
||||
targetEntityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EC0,TRUE) + 1;
|
||||
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EC0,TRUE) + 1;
|
||||
}
|
||||
targetEntityInfo->immobilizeStatusDamageCountdown = 0;
|
||||
targetEntityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB7BC);
|
||||
|
||||
}
|
||||
|
10
src/status.c
10
src/status.c
@ -441,11 +441,11 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
|
||||
bVar6 = TRUE;
|
||||
entityInfo = target->info;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if (entityInfo->nonVolatileStatus != STATUS_PARALYSIS) {
|
||||
entityInfo->nonVolatileStatus = STATUS_PARALYSIS;
|
||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E50,TRUE) + 1;
|
||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
||||
entityInfo->fillAF = 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;
|
||||
bVar6 = FALSE;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FB2AC);
|
||||
sub_8041C1C(target);
|
||||
|
@ -38,7 +38,7 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
||||
case STATUS_NAPPING:
|
||||
return TRUE;
|
||||
}
|
||||
switch (pokemonInfo->immobilizeStatus)
|
||||
switch (pokemonInfo->immobilize.immobilizeStatus)
|
||||
{
|
||||
case STATUS_FROZEN:
|
||||
SendMessage(pokemon, *gPtrFrozenMessage);
|
||||
@ -130,7 +130,7 @@ bool8 sub_80701A4(Entity *pokemon)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
switch(pokemonInfo->immobilizeStatus)
|
||||
switch(pokemonInfo->immobilize.immobilizeStatus)
|
||||
{
|
||||
case STATUS_FROZEN:
|
||||
SendMessage(pokemon,*gPtrFrozenMessage);
|
||||
|
@ -133,8 +133,8 @@ bool8 HasNegativeStatus(Entity *pokemon)
|
||||
if (pokemonInfo->sleep.sleep == STATUS_SLEEP ||
|
||||
pokemonInfo->sleep.sleep == STATUS_NIGHTMARE ||
|
||||
pokemonInfo->sleep.sleep == STATUS_YAWNING ||
|
||||
pokemonInfo->nonVolatileStatus != STATUS_NONE ||
|
||||
(pokemonInfo->immobilizeStatus != STATUS_INGRAIN && pokemonInfo->immobilizeStatus != STATUS_NONE) ||
|
||||
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_NONE ||
|
||||
(pokemonInfo->immobilize.immobilizeStatus != STATUS_INGRAIN && pokemonInfo->immobilize.immobilizeStatus != STATUS_NONE) ||
|
||||
pokemonInfo->volatileStatus != STATUS_NONE ||
|
||||
pokemonInfo->waitingStatus == STATUS_CURSED ||
|
||||
pokemonInfo->waitingStatus == STATUS_DECOY ||
|
||||
|
36
src/trap_1.c
36
src/trap_1.c
@ -56,9 +56,9 @@ void sub_8081A74(void *, u8*);
|
||||
void sub_8081A58(void *, u8*);
|
||||
void sub_8081A24(void *, u8*);
|
||||
void sub_8081994(void *, u8*);
|
||||
void sub_8081968(void *, u8*);
|
||||
void sub_808193C(void *, u8*);
|
||||
void sub_8081920(unkStruct_8094924 *param_1, Sleep* param_2);
|
||||
void sub_8081968(unkStruct_8094924 *param_1, Immobilize *param_2);
|
||||
void sub_808193C(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 SaveHiddenPower(unkStruct_8094924 *param_1, HiddenPower *param_2);
|
||||
void sub_80819B0(void *, u8 *);
|
||||
@ -242,8 +242,8 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
u32 *puStack_94;
|
||||
u8 *puStack_90;
|
||||
Sleep *puStack_8c;
|
||||
u8 *puStack_88;
|
||||
u8 *puStack_84;
|
||||
NonVolatile *puStack_88;
|
||||
Immobilize *puStack_84;
|
||||
u8 *puStack_80;
|
||||
u8 *puStack_7c;
|
||||
u8 *puStack_78;
|
||||
@ -336,8 +336,8 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
puStack_98 = &info->unk9C;
|
||||
puStack_94 = &info->unkA0;
|
||||
puStack_8c = &info->sleep;
|
||||
puStack_88 = &info->nonVolatileStatus;
|
||||
puStack_84 = &info->immobilizeStatus;
|
||||
puStack_88 = &info->nonVolatile;
|
||||
puStack_84 = &info->immobilize;
|
||||
puStack_80 = &info->volatileStatus;
|
||||
puStack_7c = &info->chargingStatus;
|
||||
puStack_78 = &info->protectionStatus;
|
||||
@ -379,7 +379,7 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
||||
sub_8083078(param_1,*puStack_9c);
|
||||
sub_8083078(param_1,*puStack_98);
|
||||
sub_8083078(param_1,*puStack_94);
|
||||
sub_8081920(param_1,puStack_8c);
|
||||
SaveEntitySleep(param_1,puStack_8c);
|
||||
sub_808193C(param_1,puStack_88);
|
||||
sub_8081968(param_1,puStack_84);
|
||||
sub_8081994(param_1,puStack_80);
|
||||
@ -617,8 +617,26 @@ void sub_80818E4(unkStruct_8094924 *param_1, AITarget* param_2)
|
||||
SavePosition(param_1, ¶m_2->aiTargetPos);
|
||||
}
|
||||
|
||||
void sub_8081920(unkStruct_8094924 *param_1, Sleep* param_2)
|
||||
void SaveEntitySleep(unkStruct_8094924 *param_1, Sleep* param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->sleep, 1);
|
||||
sub_8083060(param_1, param_2->sleepTurns);
|
||||
}
|
||||
|
||||
void sub_808193C(unkStruct_8094924 *param_1, NonVolatile *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->nonVolatileStatus, 1);
|
||||
sub_8083060(param_1, param_2->nonVolatileStatusTurns);
|
||||
sub_8083060(param_1, param_2->nonVolatileStatusDamageCountdown);
|
||||
sub_8083060(param_1, param_2->unk4);
|
||||
}
|
||||
|
||||
void sub_8081968(unkStruct_8094924 *param_1, Immobilize *param_2)
|
||||
{
|
||||
sub_8082FA8(param_1, ¶m_2->immobilizeStatus, 1);
|
||||
sub_8083060(param_1, param_2->immobilizeStatusTurns);
|
||||
sub_8083060(param_1, param_2->immobilizeStatusDamageCountdown);
|
||||
sub_8083078(param_1, param_2->unk4);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user