Fix Magma Storm

Fix the strings and animation displayed when Magma Storm. Also move gTrappingMoves to battle_script_message.c as it's only sued in this file, and this allows ARRAY_COUNT(sTrappingMoves) to replace the constant in SetMoveEffect.
This commit is contained in:
BuffelSaft 2021-11-05 18:22:52 +13:00
parent a8d44f84a1
commit bf786c6c9a
7 changed files with 49 additions and 19 deletions

View File

@ -24037,6 +24037,7 @@ General_TurnTrap:
jumpargeq 0, TRAP_ANIM_WHIRLPOOL, Status_Whirlpool
jumpargeq 0, TRAP_ANIM_CLAMP, Status_Clamp
jumpargeq 0, TRAP_ANIM_SAND_TOMB, Status_SandTomb
jumpargeq 0, TRAP_ANIM_MAGMA_STORM, Status_MagmaStorm
jumpargeq 0, TRAP_ANIM_INFESTATION, Status_Infestation
goto Status_BindWrap
Status_BindWrap:
@ -24063,6 +24064,32 @@ Status_FireSpin:
stopsound
end
Status_MagmaStorm:
loadspritegfx ANIM_TAG_SMALL_EMBER
fadetobg BG_MAGMA_STORM
waitbgfadeout
createvisualtask AnimTask_MoveSeismicTossBg, 3
playsewithpan SE_M_SACRED_FIRE2, SOUND_PAN_TARGET
loopsewithpan SE_M_SACRED_FIRE2, SOUND_PAN_TARGET, 5, 8
createvisualtask AnimTask_SeismicTossBgAccelerateDownAtEnd, 3
createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 2, 47, 1
createvisualtask AnimTask_BlendColorCycle, 2, 6, 4, 2, 2, 0, 12, RGB(22, 9, 7)
call FireSpinEffect
call FireSpinEffect
createvisualtask AnimTask_BlendColorCycle, 2, 6, 4, 2, 2, 0, 12, RGB(22, 9, 7)
call FireSpinEffect
call FireSpinEffect
createvisualtask AnimTask_BlendColorCycle, 2, 6, 4, 2, 2, 0, 12, RGB(22, 9, 7)
call FireSpinEffect
restorebg
waitbgfadeout
setarg 7, 0xFFF
waitbgfadein
stopsound
clearmonbg ANIM_DEF_PARTNER
blendoff
end
Status_Whirlpool:
loadspritegfx ANIM_TAG_WATER_ORB
monbg ANIM_DEF_PARTNER

View File

@ -310,6 +310,5 @@ extern const u8 gText_BattleTourney[];
extern const u16 gMissStringIds[];
extern const u16 gStatUpStringIds[];
extern const u16 gTrappingMoves[];
#endif // GUARD_BATTLE_MESSAGE_H

View File

@ -565,7 +565,8 @@
#define TRAP_ANIM_WHIRLPOOL 2
#define TRAP_ANIM_CLAMP 3
#define TRAP_ANIM_SAND_TOMB 4
#define TRAP_ANIM_INFESTATION 5
#define TRAP_ANIM_MAGMA_STORM 5
#define TRAP_ANIM_INFESTATION 6
// Weather defines for battle animation scripts.
#define ANIM_WEATHER_NONE 0

View File

@ -410,7 +410,7 @@
#define STRINGID_PKMNTWISTEDDIMENSIONS 406
#define STRINGID_POINTEDSTONESFLOAT 407
#define STRINGID_CLOAKEDINMYSTICALMOONLIGHT 408
#define STRINGID_TRAPPERBYSWIRLINGMAGMA 409
#define STRINGID_TRAPPEDBYSWIRLINGMAGMA 409
#define STRINGID_VANISHEDINSTANTLY 410
#define STRINGID_PROTECTEDTEAM 411
#define STRINGID_SHAREDITSGUARD 412

View File

@ -2496,6 +2496,8 @@ void AnimTask_GetTrappedMoveAnimId(u8 taskId)
gBattleAnimArgs[0] = TRAP_ANIM_CLAMP;
else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_SAND_TOMB)
gBattleAnimArgs[0] = TRAP_ANIM_SAND_TOMB;
else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_MAGMA_STORM)
gBattleAnimArgs[0] = TRAP_ANIM_MAGMA_STORM;
else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_INFESTATION)
gBattleAnimArgs[0] = TRAP_ANIM_INFESTATION;
else

View File

@ -1200,7 +1200,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
[STRINGID_PKMNTWISTEDDIMENSIONS - 12] = sText_PkmnTwistedDimensions,
[STRINGID_POINTEDSTONESFLOAT - 12] = sText_PointedStonesFloat,
[STRINGID_CLOAKEDINMYSTICALMOONLIGHT - 12] = sText_CloakedInMysticalMoonlight,
[STRINGID_TRAPPERBYSWIRLINGMAGMA - 12] = sText_TrappedBySwirlingMagma,
[STRINGID_TRAPPEDBYSWIRLINGMAGMA - 12] = sText_TrappedBySwirlingMagma,
[STRINGID_VANISHEDINSTANTLY - 12] = sText_VanishedInstantly,
[STRINGID_PROTECTEDTEAM - 12] = sText_ProtectedTeam,
[STRINGID_SHAREDITSGUARD - 12] = sText_SharedItsGuard,
@ -1535,7 +1535,7 @@ const u16 gFirstTurnOfTwoStringIds[] =
[B_MSG_TURN1_FREEZE_SHOCK] = STRINGID_CLOAKEDINAFREEZINGLIGHT,
};
// Index copied from move's index in gTrappingMoves
// Index copied from move's index in sTrappingMoves
const u16 gWrappedStringIds[] =
{
STRINGID_PKMNSQUEEZEDBYBIND, // MOVE_BIND
@ -1544,6 +1544,7 @@ const u16 gWrappedStringIds[] =
STRINGID_PKMNCLAMPED, // MOVE_CLAMP
STRINGID_PKMNTRAPPEDINVORTEX, // MOVE_WHIRLPOOL
STRINGID_PKMNTRAPPEDBYSANDTOMB, // MOVE_SAND_TOMB
STRINGID_TRAPPEDBYSWIRLINGMAGMA, // MOVE_MAGMA_STORM
STRINGID_INFESTATION, // MOVE_INFESTATION
};
@ -1755,11 +1756,6 @@ const u16 gCaughtMonStringIds[] =
[B_MSG_LANETTES_BOX_FULL] = STRINGID_PKMNBOXLANETTESPCFULL,
};
const u16 gTrappingMoves[] =
{
MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, MOVE_INFESTATION, 0xFFFF
};
const u16 gRoomsStringIds[] =
{
STRINGID_PKMNTWISTEDDIMENSIONS, STRINGID_TRICKROOMENDS,

View File

@ -279,6 +279,11 @@ static const s32 sExperienceScalingFactors[] =
159767,
};
static const u16 sTrappingMoves[] =
{
MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, MOVE_MAGMA_STORM, MOVE_INFESTATION, 0xFFFF
};
#define STAT_CHANGE_WORKED 0
#define STAT_CHANGE_DIDNT_WORK 1
@ -2978,9 +2983,9 @@ void SetMoveEffect(bool32 primary, u32 certain)
for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; ; gBattleCommunication[MULTISTRING_CHOOSER]++)
{
if (gBattleCommunication[MULTISTRING_CHOOSER] > 5)
if (gBattleCommunication[MULTISTRING_CHOOSER] > ARRAY_COUNT(sTrappingMoves))
break;
if (gTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]] == gCurrentMove)
if (sTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]] == gCurrentMove)
break;
}
}