mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-20 19:23:38 +01:00
trap move related code cleanup
This commit is contained in:
parent
6be8151981
commit
86b436782a
@ -475,4 +475,7 @@
|
||||
// For the second argument of GetMoveTarget, when no target override is needed
|
||||
#define NO_TARGET_OVERRIDE 0
|
||||
|
||||
// Makes sure gWrappedStringIds and sTrappingMoves have the same size
|
||||
#define TRAPPING_MOVES_COUNT 9
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_H
|
||||
|
@ -1562,7 +1562,7 @@ const u16 gFirstTurnOfTwoStringIds[] =
|
||||
};
|
||||
|
||||
// Index copied from move's index in sTrappingMoves
|
||||
const u16 gWrappedStringIds[] =
|
||||
const u16 gWrappedStringIds[TRAPPING_MOVES_COUNT] =
|
||||
{
|
||||
STRINGID_PKMNSQUEEZEDBYBIND, // MOVE_BIND
|
||||
STRINGID_PKMNWRAPPEDBY, // MOVE_WRAP
|
||||
|
@ -279,9 +279,9 @@ static const s32 sExperienceScalingFactors[] =
|
||||
159767,
|
||||
};
|
||||
|
||||
static const u16 sTrappingMoves[] =
|
||||
static const u16 sTrappingMoves[TRAPPING_MOVES_COUNT] =
|
||||
{
|
||||
MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, MOVE_MAGMA_STORM, MOVE_INFESTATION, MOVE_SNAP_TRAP, 0xFFFF
|
||||
MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, MOVE_MAGMA_STORM, MOVE_INFESTATION, MOVE_SNAP_TRAP,
|
||||
};
|
||||
|
||||
#define STAT_CHANGE_WORKED 0
|
||||
@ -3037,10 +3037,8 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleScripting.moveEffect];
|
||||
|
||||
for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; ; gBattleCommunication[MULTISTRING_CHOOSER]++)
|
||||
for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; gBattleCommunication[MULTISTRING_CHOOSER] < TRAPPING_MOVES_COUNT; gBattleCommunication[MULTISTRING_CHOOSER]++)
|
||||
{
|
||||
if (gBattleCommunication[MULTISTRING_CHOOSER] > ARRAY_COUNT(sTrappingMoves) - 1)
|
||||
break;
|
||||
if (sTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]] == gCurrentMove)
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user