Fixed Liquid Voice's dynamic type for normal moves (#6092)
This commit is contained in:
parent
c372a3bf82
commit
4dc2bc69aa
@ -6028,9 +6028,17 @@ u32 GetDynamicMoveType(struct Pokemon *mon, u32 move, u32 battler, u8 *ateBoost)
|
||||
break;
|
||||
}
|
||||
|
||||
if (moveType == TYPE_NORMAL
|
||||
&& ((!gMain.inBattle || TrySetAteType(move, battler, ability))
|
||||
&& GetActiveGimmick(battler) != GIMMICK_DYNAMAX))
|
||||
if (gMovesInfo[move].soundMove && ability == ABILITY_LIQUID_VOICE)
|
||||
{
|
||||
return TYPE_WATER;
|
||||
}
|
||||
else if (moveEffect == EFFECT_AURA_WHEEL && species == SPECIES_MORPEKO_HANGRY)
|
||||
{
|
||||
return TYPE_DARK;
|
||||
}
|
||||
else if (moveType == TYPE_NORMAL
|
||||
&& ((!gMain.inBattle || TrySetAteType(move, battler, ability))
|
||||
&& GetActiveGimmick(battler) != GIMMICK_DYNAMAX))
|
||||
{
|
||||
if (gMain.inBattle && ateBoost != NULL)
|
||||
*ateBoost = TRUE;
|
||||
@ -6045,14 +6053,6 @@ u32 GetDynamicMoveType(struct Pokemon *mon, u32 move, u32 battler, u8 *ateBoost)
|
||||
*ateBoost = TRUE;
|
||||
return TYPE_NORMAL;
|
||||
}
|
||||
else if (gMovesInfo[move].soundMove && ability == ABILITY_LIQUID_VOICE)
|
||||
{
|
||||
return TYPE_WATER;
|
||||
}
|
||||
else if (moveEffect == EFFECT_AURA_WHEEL && species == SPECIES_MORPEKO_HANGRY)
|
||||
{
|
||||
return TYPE_DARK;
|
||||
}
|
||||
|
||||
return TYPE_NONE;
|
||||
}
|
||||
|
||||
21
test/battle/ability/liquid_voice.c
Normal file
21
test/battle/ability/liquid_voice.c
Normal file
@ -0,0 +1,21 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_HYPER_VOICE].type == TYPE_NORMAL);
|
||||
ASSUME(gMovesInfo[MOVE_HYPER_VOICE].power > 0);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Liquid voice turns a sound move into a Water-type move")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_TYPHLOSION);
|
||||
OPPONENT(SPECIES_PRIMARINA) { Ability(ABILITY_LIQUID_VOICE); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_HYPER_VOICE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPER_VOICE, opponent);
|
||||
MESSAGE("It's super effective!");
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user