diff --git a/asm/code_807E5AC.s b/asm/code_807E5AC.s index 084893b9e..f8426f4b8 100644 --- a/asm/code_807E5AC.s +++ b/asm/code_807E5AC.s @@ -1034,7 +1034,7 @@ _0807EEA0: adds r1, r5, 0 movs r2, 0x3 adds r3, r6, 0 - bl sub_807D148 + bl WarpTarget b _0807EE72 _0807EEAE: movs r6, 0 @@ -2301,7 +2301,7 @@ _0807F8BE: mov r1, r8 movs r2, 0 movs r3, 0 - bl sub_807D148 + bl WarpTarget b _0807F8FA .align 2, 0 _0807F8D0: .4byte gAdjacentTileOffsets diff --git a/include/code_807CD9C.h b/include/code_807CD9C.h index aeb0a8c4e..380747ec2 100644 --- a/include/code_807CD9C.h +++ b/include/code_807CD9C.h @@ -2,7 +2,7 @@ #define CODE_807CD9C_H void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction); -void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos); +void WarpTarget(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos); void sub_807D3CC(Entity *param_1); #endif /* ifndef CODE_807CD9C_H */ diff --git a/include/constants/dungeon_action.h b/include/constants/dungeon_action.h index bd209b2d0..7ffe68b7d 100644 --- a/include/constants/dungeon_action.h +++ b/include/constants/dungeon_action.h @@ -31,6 +31,7 @@ enum DungeonAction ACTION_UNK21 = 0x21, ACTION_EAT_AI = 0x23, ACTION_THROW_ITEM_AI = 0x24, + ACTION_STEPPED_ON_TRAP = 0x25, ACTION_STAIRS = 0x26, ACTION_THROW_STRAIGHT_PLAYER = 0x27, ACTION_USE_LINK_BOX = 0x2C, diff --git a/include/move_effects_target.h b/include/move_effects_target.h index 6c12cbf88..e2b6d0544 100644 --- a/include/move_effects_target.h +++ b/include/move_effects_target.h @@ -4,7 +4,7 @@ #include "structs/dungeon_entity.h" u8 sub_8075BF4(Entity * pokemon, s32 sleepClassStatusTurns); -void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, bool8 displayMessage); +void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, bool8 displayMessage); bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMessage); void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns); void NappingStatusTarget(Entity * pokemon, Entity * target, s32 turns); diff --git a/include/status_actions.h b/include/status_actions.h index 500d52bc2..74add8fdd 100644 --- a/include/status_actions.h +++ b/include/status_actions.h @@ -15,12 +15,12 @@ bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par bool8 StruggleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 sub_805BA44(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 TakeawayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 sub_805BB64(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 SwitcherOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 StayawayOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 CleanseOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); -bool8 SiestaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SlumberOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 TwoEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 SilenceOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); bool8 ScannerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -34,8 +34,7 @@ bool8 TrawlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 EscapeOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); bool8 DroughtOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 TrapbustOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4); -bool8 sub_805C080(Entity *pokemon, Entity *target, Move *move, s32 param_4); -bool8 sub_805C128(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RollcallOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 OneShotOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); diff --git a/include/trap.h b/include/trap.h index e6a6ad899..767eaba30 100644 --- a/include/trap.h +++ b/include/trap.h @@ -11,7 +11,7 @@ bool8 sub_807FD84(Entity *entity); bool8 sub_807FE04(DungeonPos *pos, char param_2); bool8 sub_807FE44(DungeonPos *pos, char param_2); void GetTrapName(u8 *buffer, u8 trapIndex); -void sub_807FE9C(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); +void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); void HandleMudTrap(Entity *pokemon, Entity *target); void HandleStickyTrap(Entity *pokemon, Entity *target); void HandleGrimyTrap(Entity *pokemon, Entity *target); @@ -26,6 +26,8 @@ void HandleSelfdestructTrap(Entity *pokemon, Entity *target); void HandleExplosionTrap(Entity *pokemon, Entity *target); void HandlePPZeroTrap(Entity *pokemon, Entity *target); void HandleWonderTile(Entity *pokemon, Entity *target); +void HandleSealTrap(Entity *pokemon, Entity *target); +void HandleWhirlwindTrap(Entity *entity, Entity *target); // code_807FCD4.s extern void HandleSealTrap(Entity *pokemon, Entity *target); diff --git a/src/called_move_data.c b/src/called_move_data.c index a00518861..ba28f735d 100644 --- a/src/called_move_data.c +++ b/src/called_move_data.c @@ -22,7 +22,7 @@ extern bool8 ReturnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 p extern bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CrunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -43,7 +43,7 @@ extern bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s3 extern bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059190(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -70,7 +70,7 @@ extern bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s3 extern bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -81,7 +81,7 @@ extern bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, extern bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD04(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -135,7 +135,7 @@ const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES] {MOVE_FLAME_WHEEL, FlameWheelMoveAction}, {MOVE_GUST, GustMoveAction}, {MOVE_DISABLE, DisableMoveAction}, - {MOVE_CRUNCH, CrunchMoveAction}, + {MOVE_CRUNCH, ShadowBallMoveAction}, {MOVE_BITE, BiteMoveAction}, {MOVE_THUNDER, ThunderMoveAction}, {MOVE_ENDEAVOR, EndeavorMoveAction}, @@ -156,7 +156,7 @@ const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES] {MOVE_SUBMISSION, sub_8058E5C}, {MOVE_LICK, LickMoveAction}, {MOVE_FISSURE, FissureMoveAction}, - {MOVE_EXTRASENSORY, sub_8059190}, + {MOVE_EXTRASENSORY, ExtrasensoryMoveAction}, {MOVE_ABSORB, AbsorbMoveAction}, {MOVE_SKILL_SWAP, SkillSwapMoveAction}, {MOVE_HEADBUTT, HeadbuttMoveAction}, @@ -183,7 +183,7 @@ const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES] {MOVE_TRICK, TrickMoveAction}, {MOVE_TRIPLE_KICK, TripleKickMoveAction}, {MOVE_MUD_SLAP, MudSlapMoveAction}, - {MOVE_THIEF, sub_805A2A0}, + {MOVE_THIEF, ThiefMoveAction}, {MOVE_ROLE_PLAY, RolePlayMoveAction}, {MOVE_LEER, LeerMoveAction}, {MOVE_PAY_DAY, PayDayMoveAction}, @@ -194,7 +194,7 @@ const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES] {MOVE_KNOCK_OFF, KnockOffMoveAction}, {MOVE_SECRET_POWER, SecretPowerMoveAction}, {MOVE_DIZZY_PUNCH, sub_805AC90}, - {MOVE_IMPRISON, sub_805AD04}, + {MOVE_IMPRISON, ObserverOrbAction}, {MOVE_FEATHERDANCE, FeatherDanceMoveAction}, {MOVE_BEAT_UP, BeatUpMoveAction}, {MOVE_BLAST_BURN, BlastBurnMoveAction}, @@ -228,11 +228,11 @@ const struct CalledMove gNaturePowerCalledMoves[] = {MOVE_SURF, HandleRegularDamagingMove}, {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_STUN_SPORE, StunSporeMoveAction}, @@ -242,9 +242,9 @@ const struct CalledMove gNaturePowerCalledMoves[] = {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_EARTHQUAKE, HandleRegularDamagingMove}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, @@ -255,14 +255,14 @@ const struct CalledMove gNaturePowerCalledMoves[] = {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_RAZOR_LEAF, HandleRegularDamagingMove}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_RAZOR_LEAF, HandleRegularDamagingMove}, {MOVE_RAZOR_LEAF, HandleRegularDamagingMove}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, @@ -279,14 +279,14 @@ const struct CalledMove gNaturePowerCalledMoves[] = {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_EARTHQUAKE, HandleRegularDamagingMove}, {MOVE_BUBBLEBEAM, sub_8058580}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_SWIFT, HandleRegularDamagingMove}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, {MOVE_STUN_SPORE, StunSporeMoveAction}, - {MOVE_SHADOW_BALL, CrunchMoveAction}, + {MOVE_SHADOW_BALL, ShadowBallMoveAction}, {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_STUN_SPORE, StunSporeMoveAction}, {MOVE_ROCK_SLIDE, RockSlideMoveAction}, diff --git a/src/code_8048480.c b/src/code_8048480.c index 57d5ce899..97651a482 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -473,7 +473,7 @@ UNUSED void nullsub_205(void) { } void SleepSeedItemAction(Entity *pokemon, Entity *target) { - sub_8075C58(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); } void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4) @@ -555,7 +555,7 @@ void PechaBerryItemAction(Entity *pokemon, Entity *target) void WarpSeedItemAction(Entity *pokemon, Entity *target) { - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); } void ChestoBerryItemAction(Entity *pokemon, Entity *target) diff --git a/src/code_805D8C8_1.c b/src/code_805D8C8_1.c index dd846cf94..c501b3ca9 100644 --- a/src/code_805D8C8_1.c +++ b/src/code_805D8C8_1.c @@ -68,8 +68,7 @@ extern void sub_8083D30(void); extern void sub_8083D08(void); extern void sub_806A6E8(Entity *); extern bool8 sub_8047084(s32 itemFlag); -extern void sub_807FE9C(Entity *pokemon, DungeonPos *pos, int param_3, - char param_4); +extern void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); extern void sub_8045DB4(DungeonPos *, u32); bool8 sub_807EF48(void); void sub_806A2BC(Entity *a0, u8 a1); @@ -1630,7 +1629,7 @@ void sub_805EE30(void) break; } if (!r7) { - sub_807FE9C(leader, &leader->pos, 0, 1); + HandleTrap(leader, &leader->pos, 0, 1); } } break; diff --git a/src/code_8066D04.c b/src/code_8066D04.c index 647166dac..1c5eb7a32 100644 --- a/src/code_8066D04.c +++ b/src/code_8066D04.c @@ -177,7 +177,7 @@ void HandleGiveItemAction(Entity *param_1) } sub_806A6E8(entity); if (sub_80706A4(entity,&entity->pos) != 0) { - sub_807D148(param_1,entity,0,0); + WarpTarget(param_1,entity,0,0); } if (!info2->isTeamLeader) { info2->flags = info2->flags | MOVEMENT_FLAG_UNK_14; @@ -218,7 +218,7 @@ void HandleTakeItemAction(Entity *param_1) LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8D7C); sub_806A6E8(entity); if (sub_80706A4(entity,&entity->pos) != 0) { - sub_807D148(param_1,entity,0,0); + WarpTarget(param_1,entity,0,0); } if (!info->isTeamLeader) { info->flags |= MOVEMENT_FLAG_UNK_14; @@ -262,7 +262,7 @@ void sub_8066BD4(Entity *param_1) PlaySoundEffect(0x14d); LogMessageByIdWithPopupCheckUser(param_1,*gUnknown_80F8DB4); if (sub_80706A4(entity,&entity->pos) != 0) { - sub_807D148(param_1,entity,0,0); + WarpTarget(param_1,entity,0,0); } if (!info->isTeamLeader) { info->flags = info->flags | MOVEMENT_FLAG_UNK_14; diff --git a/src/code_8073CF0.c b/src/code_8073CF0.c index f3faeb8b1..39bb9e81d 100644 --- a/src/code_8073CF0.c +++ b/src/code_8073CF0.c @@ -45,7 +45,7 @@ extern bool8 sub_80461C8(DungeonPos *, u32); extern void sub_805229C(void); extern void sub_807E8F0(Entity *); extern void sub_80444F4(Entity *pokemon); -extern void sub_807D148(Entity *pokemon, Entity *r1, u32 r2, DungeonPos *r3); +extern void WarpTarget(Entity *pokemon, Entity *r1, u32 r2, DungeonPos *r3); extern void sub_80420B8(Entity *pokemon); extern void sub_8041C4C(Entity *pokemon, u32 r1); extern void sub_805E804(void); @@ -300,7 +300,7 @@ void sub_8074094(Entity *entity) UseAttack(NULL); if (!EntityExists(entity) || sub_8044B28()) return; - sub_807D148(entity, entity, 0, NULL); + WarpTarget(entity, entity, 0, NULL); if (entityInfo->isTeamLeader) { gDungeon->unk1 = 0; gDungeon->unk5C0 = -1; @@ -1031,7 +1031,7 @@ bool8 UseAttack(Entity *a0) sub_806A5B8(mon); if (sub_80706A4(mon, &mon->pos)) { - sub_807D148(mon, mon, 0, NULL); + WarpTarget(mon, mon, 0, NULL); } } } diff --git a/src/code_8075708.c b/src/code_8075708.c index 5eeefe47b..b89fdec07 100644 --- a/src/code_8075708.c +++ b/src/code_8075708.c @@ -105,7 +105,7 @@ void sub_8075708(Entity *entity) } _ret: if (!bVar2) { - sub_807FE9C(entity, &entity->pos, 0, 1); + HandleTrap(entity, &entity->pos, 0, 1); } break; case ENTITY_ITEM: diff --git a/src/code_8077274_1.c b/src/code_8077274_1.c index 32a72f514..a4c5d1a1b 100644 --- a/src/code_8077274_1.c +++ b/src/code_8077274_1.c @@ -1188,7 +1188,7 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8 case STATUS_YAWNING: if (param_3) { entityInfo->sleepClassStatus.status = STATUS_NONE; - sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE); + SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE); return; } TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA734); diff --git a/src/code_807CD9C.c b/src/code_807CD9C.c index 120cdaa1c..2af5b6e00 100644 --- a/src/code_807CD9C.c +++ b/src/code_807CD9C.c @@ -168,7 +168,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) } sub_806A5B8(target); if (sub_80706A4(target,&target->pos)) { - sub_807D148(target,target,0,0); + WarpTarget(target,target,0,0); } if (!EntityExists(target)) { return; @@ -239,7 +239,7 @@ _0807D11E: sub_803E46C(0x1a); } -void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos) +void WarpTarget(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos) { EntityInfo *info; u32 direction; @@ -1073,7 +1073,7 @@ void HandlePounceOrbAction(Entity *pokemon, Entity *target, u8 r2) { sub_806A5B8(target); if(sub_80706A4(target, &target->pos)) - sub_807D148(target, target, 0, 0); + WarpTarget(target, target, 0, 0); if(EntityExists(target)) { sub_806CE68(target, 8); @@ -1253,7 +1253,7 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target) { if (EntityExists(entity)) { sub_806A5B8(entity); if ((EntityExists(entity)) && (sub_80706A4(entity,&entity->pos))) { - sub_807D148(entity,entity,0,0); + WarpTarget(entity,entity,0,0); } } } diff --git a/src/dungeon_ai_leader.c b/src/dungeon_ai_leader.c index 5c1204ac1..49072107e 100644 --- a/src/dungeon_ai_leader.c +++ b/src/dungeon_ai_leader.c @@ -297,8 +297,8 @@ bool8 sub_8072CF4(Entity *entity) case ACTION_REGULAR_ATTACK: sub_8067904(entity, MOVE_REGULAR_ATTACK); break; - case 0x25: - sub_807FE9C(entity,&entity->pos,0,0); + case ACTION_STEPPED_ON_TRAP: + HandleTrap(entity,&entity->pos,0,0); break; case ACTION_PICK_UP_AI: HandlePickUpAIAction(entity); @@ -360,7 +360,7 @@ bool8 sub_8072CF4(Entity *entity) sub_8041888(0); if (((EntityExists(entity)) && (!info->aiAllySkip)) && (!bVar14)) { if (sub_80706A4(entity,&entity->pos) != '\0') { - sub_807D148(entity,entity,0,0); + WarpTarget(entity,entity,0,0); } sub_8074094(entity); sub_8071DA4(entity); diff --git a/src/dungeon_move.c b/src/dungeon_move.c index 389f529bd..131da29b6 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -99,7 +99,7 @@ extern bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, u3 extern bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4); extern bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CrunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -121,7 +121,7 @@ extern bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s3 extern bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059190(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -149,7 +149,7 @@ extern bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s3 extern bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -161,7 +161,7 @@ extern bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, extern bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AD04(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -233,7 +233,7 @@ extern bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s3 extern bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058A08(Entity *pokemon, Entity *target, Move *move, s32 param_4); +extern bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); @@ -855,7 +855,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move case MOVE_EXTRASENSORY: case MOVE_HYPER_FANG: case MOVE_BONE_CLUB: - moveHadEffect = sub_8059190(attacker, currTarget, move, itemId); + moveHadEffect = ExtrasensoryMoveAction(attacker, currTarget, move, itemId); break; case MOVE_BITE: case MOVE_NEEDLE_ARM: @@ -872,7 +872,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move break; case MOVE_CRUNCH: case MOVE_SHADOW_BALL: - moveHadEffect = CrunchMoveAction(attacker, currTarget, move, itemId); + moveHadEffect = ShadowBallMoveAction(attacker, currTarget, move, itemId); break; case MOVE_DIZZY_PUNCH: case MOVE_WATER_PULSE: @@ -1139,15 +1139,15 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = TrickMoveAction(attacker, currTarget, move, itemId); break; case MOVE_TAKEAWAY: - moveHadEffect = TakeawayMoveAction(attacker, currTarget, move, itemId); + moveHadEffect = ThiefAction(attacker, currTarget, move, itemId); break; case MOVE_THIEF: case MOVE_COVET: - moveHadEffect = sub_805A2A0(attacker, currTarget, move, itemId); + moveHadEffect = ThiefMoveAction(attacker, currTarget, move, itemId); break; case MOVE_AGILITY: case MOVE_SPEED_BOOST: - moveHadEffect = sub_8058A08(attacker, currTarget, move, itemId); + moveHadEffect = AgilityMoveAction(attacker, currTarget, move, itemId); break; case MOVE_PURSUIT: case MOVE_COUNTER: @@ -1234,7 +1234,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move moveHadEffect = RadarOrbAction(attacker, currTarget, move, itemId); break; case MOVE_SIESTA: - moveHadEffect = SiestaMoveAction(attacker, currTarget, move, itemId); + moveHadEffect = SlumberOrbAction(attacker, currTarget, move, itemId); break; case MOVE_SMELLINGSALT: moveHadEffect = SmellingSaltMoveAction(attacker, currTarget, move, itemId); @@ -1515,10 +1515,10 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move break; case MOVE_IMPRISON: case MOVE_OBSERVER: - moveHadEffect = sub_805AD04(attacker, currTarget, move, itemId); + moveHadEffect = ObserverOrbAction(attacker, currTarget, move, itemId); break; case MOVE_WILD_CALL: - moveHadEffect = sub_805C080(attacker, currTarget, move, itemId); + moveHadEffect = RollcallOrbAction(attacker, currTarget, move, itemId); break; case MOVE_REVIVER: moveHadEffect = ReviverOrbAction(attacker, currTarget, move, itemId); @@ -1644,7 +1644,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move if (!sub_8044B28()) { if (EntityExists(attacker) && GetEntInfo(attacker)->unk154 != 0) { GetEntInfo(attacker)->unk154 = 0; - sub_807D148(attacker, attacker, 0, NULL); + WarpTarget(attacker, attacker, 0, NULL); } if (EntityExists(attacker) && GetEntInfo(attacker)->unk155 != 0) { GetEntInfo(attacker)->unk155 = 0; @@ -1995,7 +1995,7 @@ static void TriggerTargetAbilityEffect(Entity *attacker) } if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_SLP) { LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF54); // Effect Spore scattered spores! - sub_8075C58(attacker, attacker, CalculateStatusTurns(attacker, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(attacker, attacker, CalculateStatusTurns(attacker, gUnknown_80F4E74, TRUE), TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_FLAME_BODY) { LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF74); // Flame Body caused a burn! diff --git a/src/move_actions.c b/src/move_actions.c index bc46c6c2b..f571ec53f 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -309,7 +309,7 @@ bool8 YawnMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4) // NOTE: Is there a better name for this? bool8 BasicSleepMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4) { - sub_8075C58(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); return TRUE; } @@ -917,7 +917,7 @@ bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return local_18; } -bool8 CrunchMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -1084,8 +1084,6 @@ bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, u32 pa return flag; } - -// NOTE: almost the same as sub_8058D44 and sub_805AFA4 in status_actions.c bool8 ReversalMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) { s32 index; @@ -1204,7 +1202,7 @@ bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param return TRUE; } -bool8 sub_8058A08(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { RaiseMovementSpeedTarget(pokemon, target, 0, TRUE); return TRUE; @@ -1370,8 +1368,6 @@ bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } - -// NOTE: same as sub_8058770 bool8 WaterSpoutMoveAction(Entity * pokemon, Entity * target, Move * move, u32 param_4) { s32 index; @@ -1427,7 +1423,7 @@ bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4) bool8 flag; flag = FALSE; - if ((HandleDamagingMove(pokemon, target, move, 0x80 << 1, param_4) != 0) && (EntityExists(pokemon))) { + if ((HandleDamagingMove(pokemon, target, move, 0x100, param_4) != 0) && (EntityExists(pokemon))) { iVar2 = GetEntInfo(pokemon)->maxHPStat; if (iVar2 < 0) { iVar2 = iVar2 + 7; @@ -1566,7 +1562,7 @@ bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4 return flag; } -bool8 sub_8059190(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { bool8 flag; @@ -2071,7 +2067,7 @@ bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, u32 param_4) bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); return TRUE; } @@ -2360,9 +2356,9 @@ bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4 return flag; } -bool8 sub_805A2A0(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { - return TakeawayMoveAction(pokemon, target, move, param_4); + return ThiefAction(pokemon, target, move, param_4); } bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) @@ -2630,7 +2626,7 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_ sub_805A7D4(pokemon,target,&heldItem,&pos); if (sub_80706A4(target, &target->pos) != 0) { - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); } return TRUE; } @@ -2748,7 +2744,7 @@ _0805AA5E: sub_804535C(target, NULL); pos = r9; if (sub_80706A4(target, pos)) { - sub_807D148(pokemon,target,0,0); + WarpTarget(pokemon,target,0,0); } if (GetEntInfo(target)->isTeamLeader) { sub_804AC20(r9); @@ -2805,7 +2801,7 @@ bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, Move *move, u32 p PoisonedStatusTarget(pokemon,target,FALSE); break; case 1: - sub_8075C58(pokemon,target,CalculateStatusTurns(target,gUnknown_80F4E74,TRUE),FALSE); + SleepStatusTarget(pokemon,target,CalculateStatusTurns(target,gUnknown_80F4E74,TRUE),FALSE); break; case 2: LowerMovementSpeedTarget(pokemon,target,1,FALSE); @@ -2857,7 +2853,7 @@ bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) return TRUE; } -bool8 sub_805AD04(Entity *pokemon, Entity *target, Move *move, u32 param_4) +bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { PausedStatusTarget(pokemon, target, 1, CalculateStatusTurns(target, &gUnknown_80F4EE0, TRUE), TRUE); return TRUE; @@ -2894,7 +2890,7 @@ bool32 BeatUpMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param { EntityInfo *targetInfo = GetEntInfo(targetEntity); if (targetInfo->monsterBehavior != BEHAVIOR_RESCUE_TARGET && !IsClientOrTeamBase(targetInfo->joinedAt.id)) { - sub_807D148(pokemon,targetEntity,2,&target->pos); + WarpTarget(pokemon,targetEntity,2,&target->pos); flag = TRUE; SetExpMultplier(info); } diff --git a/src/move_effects_target.c b/src/move_effects_target.c index f34bd5771..efa3e59b0 100644 --- a/src/move_effects_target.c +++ b/src/move_effects_target.c @@ -192,7 +192,7 @@ u8 sub_8075BF4(Entity * pokemon, s32 sleepClassStatusTurns) return uVar4; } -void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage) +void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage) { u8 sleep; u8 cVar2; diff --git a/src/status_actions.c b/src/status_actions.c index 76dc53fdf..66c1db3bc 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -75,7 +75,7 @@ extern void WrapTarget(Entity *, Entity *); // TODO having matching issues when this isn't s32.. (move_effects_target.h) extern void SqueezedStatusTarget(Entity *, Entity *, s32, bool32); -extern void sub_8075C58(Entity *, Entity *, s32, s32); +extern void SleepStatusTarget(Entity *, Entity *, s32, s32); extern void DealDamageToEntity(Entity *, s32, u32, u32); extern bool8 MoveRequiresCharging(Entity* pokemon,u16 moveID); @@ -678,12 +678,12 @@ bool8 sub_805BA44(Entity * pokemon, Entity * target, Move *move, s32 param_4) return TRUE; } -bool8 TakeawayMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 ThiefAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - EntityInfo *iVar2; - EntityInfo *iVar3; - EntityInfo *iVar5; - EntityInfo *iVar6; + EntityInfo *pokemonInfo1; + EntityInfo *pokemonInfo2; + EntityInfo *targetInfo1; + EntityInfo *targetInfo2; bool8 flag; Item *pokeItem; Item *targetItem; @@ -692,10 +692,10 @@ bool8 TakeawayMoveAction(Entity * pokemon, Entity * target, Move *move, s32 para if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) { flag = TRUE; if (sub_805727C(pokemon,target, 0) != 0) { - iVar2 = GetEntInfo(pokemon); - iVar3 = GetEntInfo(pokemon); - iVar5 = GetEntInfo(target); - iVar6 = GetEntInfo(target); + pokemonInfo1 = GetEntInfo(pokemon); + pokemonInfo2 = GetEntInfo(pokemon); + targetInfo1 = GetEntInfo(target); + targetInfo2 = GetEntInfo(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); if (HasAbility(target, ABILITY_STICKY_HOLD)) { @@ -706,8 +706,8 @@ bool8 TakeawayMoveAction(Entity * pokemon, Entity * target, Move *move, s32 para return TRUE; } else { - pokeItem = &iVar2->heldItem; - targetItem = &iVar5->heldItem; + pokeItem = &pokemonInfo1->heldItem; + targetItem = &targetInfo1->heldItem; if ((pokeItem->flags & ITEM_FLAG_EXISTS) != 0) { TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC654); // $m0 has an item already! return TRUE; @@ -717,11 +717,11 @@ bool8 TakeawayMoveAction(Entity * pokemon, Entity * target, Move *move, s32 para return TRUE; } else { - iVar3->heldItem = iVar6->heldItem; + pokemonInfo2->heldItem = targetInfo2->heldItem; ZeroOutItem(targetItem); sub_806A6E8(pokemon); sub_806A6E8(target); - SetExpMultplier(iVar3); + SetExpMultplier(pokemonInfo2); TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FC614); // Got $m1's item! } } @@ -745,7 +745,7 @@ bool8 SwitcherOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param bool8 StayawayOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - sub_807D148(pokemon, target, 1, NULL); + WarpTarget(pokemon, target, 1, NULL); return TRUE; } @@ -787,9 +787,9 @@ bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_ return isItemCleaned; } -bool8 SiestaMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) +bool8 SlumberOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { - sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); + SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE); return TRUE; } @@ -994,7 +994,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 param_ return foundTrap; } -bool8 sub_805C080(Entity * pokemon, Entity *target, Move *move, s32 param_4) +bool8 RollcallOrbAction(Entity * pokemon, Entity *target, Move *move, s32 param_4) { Entity **possibleTargets; s32 numPossibleTargets; @@ -1015,7 +1015,7 @@ bool8 sub_805C080(Entity * pokemon, Entity *target, Move *move, s32 param_4) targetEntity = possibleTargets[index]; if (((EntityExists(targetEntity)) && (pokemon != targetEntity)) && (GetTreatmentBetweenMonsters(pokemon,targetEntity,TRUE,FALSE) == TREATMENT_TREAT_AS_ALLY)) { - sub_807D148(pokemon,targetEntity,2,&pokemon->pos); + WarpTarget(pokemon,targetEntity,2,&pokemon->pos); foundTarget = TRUE; } } diff --git a/src/trap.c b/src/trap.c index 4b3d1d3f1..6f45aaf54 100644 --- a/src/trap.c +++ b/src/trap.c @@ -213,7 +213,7 @@ void GetTrapName(u8 *buffer, u8 trapIndex) strcpy(buffer, gTrapNames[trapIndex]); } -void sub_807FE9C(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) +void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) { Tile *tile; bool8 flag1; @@ -435,7 +435,7 @@ void HandleSpinTrap(Entity *pokemon, Entity *target) void HandleWarpTrap(Entity *pokemon, Entity *target) { if(target != NULL) - sub_807D148(pokemon, target, 0, NULL); + WarpTarget(pokemon, target, 0, NULL); } void HandleSlumberTrap(Entity *pokemon, Entity *target) @@ -445,7 +445,7 @@ void HandleSlumberTrap(Entity *pokemon, Entity *target) if(target != NULL) { turns = CalculateStatusTurns(target, gUnknown_80F4E74, TRUE); - sub_8075C58(pokemon, target, turns, TRUE); + SleepStatusTarget(pokemon, target, turns, TRUE); } }