Fix gems activating for moves that don't deal type damage (#6789)
This commit is contained in:
parent
8cc289ef35
commit
5e190d0782
@ -6074,7 +6074,10 @@ void SetTypeBeforeUsingMove(u32 move, u32 battler)
|
||||
gBattleStruct->dynamicMoveType = TYPE_ELECTRIC | F_DYNAMIC_TYPE_SET;
|
||||
|
||||
// Check if a gem should activate.
|
||||
if (holdEffect == HOLD_EFFECT_GEMS && GetBattleMoveType(move) == ItemId_GetSecondaryId(heldItem))
|
||||
if (holdEffect == HOLD_EFFECT_GEMS
|
||||
&& GetBattleMoveType(move) == ItemId_GetSecondaryId(heldItem)
|
||||
&& GetMoveEffect(move) != EFFECT_PLEDGE
|
||||
&& GetMovePower(move) > 1)
|
||||
{
|
||||
gSpecialStatuses[battler].gemParam = GetBattlerHoldEffectParam(battler);
|
||||
gSpecialStatuses[battler].gemBoost = TRUE;
|
||||
|
||||
@ -2202,7 +2202,6 @@ static void Cmd_adjustdamage(void)
|
||||
&& !(gBattleStruct->moveResultFlags[gBattlerTarget] & MOVE_RESULT_NO_EFFECT)
|
||||
&& !(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
|
||||
&& gBattleMons[gBattlerAttacker].item
|
||||
&& moveEffect != EFFECT_PLEDGE
|
||||
&& gCurrentMove != MOVE_STRUGGLE)
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
|
||||
@ -87,3 +87,19 @@ SINGLE_BATTLE_TEST("Gem is consumed if the move type is changed")
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FEINT_ATTACK, player);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Gem is not consumed if a no type damage move is used") //ie. Counter, Psywave, Super Fang. All these moves have 1 base power.
|
||||
{
|
||||
ASSUME(GetMovePower(MOVE_PSYWAVE) == 1);
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_PSYCHIC_GEM); };
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_PSYWAVE); }
|
||||
} SCENE {
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
MESSAGE("The Psychic Gem strengthened Wobbuffet's power!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user