Added CRY_MODE_DYNAMAX (#6933)

This commit is contained in:
Eduardo Quezada 2025-06-30 12:45:09 -04:00 committed by GitHub
parent c5b939a312
commit 7a0cbc12d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 17 additions and 3 deletions

View File

@ -36122,7 +36122,7 @@ gBattleAnimMove_GMaxGoldRush::
@@@ DYNAMAX AND MAX RAIDS
gBattleAnimGeneral_DynamaxGrowth:: @ PORTED FROM CFRU
createvisualtask SoundTask_PlayCryWithEcho, 2, ANIM_ATTACKER, 2
createvisualtask SoundTask_PlayDynamaxCry, 0
delay 8
createvisualtask AnimTask_DynamaxGrowth, 0x5, 0x1, 0x0
waitforvisualfinish

View File

@ -33,6 +33,7 @@
#define CRY_MODE_GROWL_2 10 // For 2nd cry used by the move Growl
#define CRY_MODE_WEAK 11 // Used when a Pokémon is unhealthy
#define CRY_MODE_WEAK_DOUBLES 12 // Equivalent to CRY_MODE_DOUBLES for CRY_MODE_WEAK
#define CRY_MODE_DYNAMAX 13 // Used during Dynamax
// Given to SoundTask_PlayDoubleCry to determine which cry mode to use. Values are arbitrary
#define DOUBLE_CRY_ROAR 2

View File

@ -311,6 +311,13 @@ void SoundTask_PlayCryWithEcho(u8 taskId)
DestroyAnimVisualTask(taskId);
}
void SoundTask_PlayDynamaxCry(u8 taskId)
{
u16 species = (GetIllusionMonSpecies(gBattleAnimAttacker) != SPECIES_NONE) ? GetIllusionMonSpecies(gBattleAnimAttacker) : gAnimBattlerSpecies[gBattleAnimAttacker];
PlayCry_ByMode(species, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER), CRY_MODE_DYNAMAX);
gTasks[taskId].func = SoundTask_WaitForCry;
}
static void SoundTask_PlayCryWithEcho_Step(u8 taskId)
{
u16 species = gTasks[taskId].tSpecies;

View File

@ -1673,12 +1673,12 @@ static void HandleInput_PokemonSpriteVisualizer(u8 taskId)
if (JOY_NEW(L_BUTTON) && (Backsprite->callback == SpriteCallbackDummy))
{
PlayCryInternal(data->currentmonId, 0, 120, 10, 0);
PlayCryInternal(data->currentmonId, 0, 120, 10, CRY_MODE_NORMAL);
LaunchAnimationTaskForBackSprite(Backsprite, data->animIdBack-1);
}
if (JOY_NEW(R_BUTTON) && (Frontsprite->callback == SpriteCallbackDummy))
{
PlayCryInternal(data->currentmonId, 0, 120, 10, 0);
PlayCryInternal(data->currentmonId, 0, 120, 10, CRY_MODE_NORMAL);
if (HasTwoFramesAnimation(data->currentmonId))
StartSpriteAnim(Frontsprite, 1);

View File

@ -456,6 +456,12 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode)
case CRY_MODE_WEAK:
pitch = 15000;
break;
case CRY_MODE_DYNAMAX:
length = 255;
release = 255;
pitch = 12150;
chorus = 200;
break;
}
SetPokemonCryVolume(volume);