Fixed Tangling Hair + Mirror Armor interaction
This commit is contained in:
parent
b1f0fbdf89
commit
e9b2f33084
4 changed files with 10 additions and 7 deletions
|
@ -8552,7 +8552,7 @@ BattleScript_GooeyActivates::
|
|||
waitstate
|
||||
call BattleScript_AbilityPopUp
|
||||
swapattackerwithtarget @ for defiant, mirror armor
|
||||
seteffectsecondary
|
||||
seteffectsecondary MOVE_EFFECT_SPD_MINUS_1
|
||||
swapattackerwithtarget
|
||||
return
|
||||
|
||||
|
|
|
@ -2831,7 +2831,10 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
|||
&& !primary && gBattleScripting.moveEffect <= MOVE_EFFECT_CONFUSION)
|
||||
INCREMENT_RESET_RETURN
|
||||
|
||||
if (TestIfSheerForceAffected(gBattlerAttacker, gCurrentMove) && !primary && gBattleScripting.moveEffect != MOVE_EFFECT_CHARGING)
|
||||
if (!(gHitMarker & HITMARKER_STATUS_ABILITY_EFFECT)
|
||||
&& TestIfSheerForceAffected(gBattlerAttacker, gCurrentMove)
|
||||
&& !primary
|
||||
&& gBattleScripting.moveEffect != MOVE_EFFECT_CHARGING)
|
||||
INCREMENT_RESET_RETURN
|
||||
|
||||
if (gBattleMons[gEffectBattler].hp == 0 && !activateAfterFaint)
|
||||
|
@ -3310,12 +3313,14 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
|||
case MOVE_EFFECT_ACC_MINUS_1:
|
||||
case MOVE_EFFECT_EVS_MINUS_1:
|
||||
flags = affectsUser;
|
||||
if (mirrorArmorReflected && !affectsUser)
|
||||
flags |= STAT_CHANGE_ALLOW_PTR;
|
||||
if (mirrorArmorReflected)
|
||||
flags |= (STAT_CHANGE_ALLOW_PTR * !affectsUser);
|
||||
else
|
||||
flags |= STAT_CHANGE_UPDATE_MOVE_EFFECT;
|
||||
|
||||
if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(1) | STAT_BUFF_NEGATIVE,
|
||||
gBattleScripting.moveEffect - MOVE_EFFECT_ATK_MINUS_1 + 1,
|
||||
flags | STAT_CHANGE_UPDATE_MOVE_EFFECT, gBattlescriptCurrInstr + 1))
|
||||
flags, gBattlescriptCurrInstr + 1))
|
||||
{
|
||||
if (!mirrorArmorReflected)
|
||||
gBattlescriptCurrInstr++;
|
||||
|
|
|
@ -5320,7 +5320,6 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
|||
&& IsMoveMakingContact(move, gBattlerAttacker))
|
||||
{
|
||||
SET_STATCHANGER(STAT_SPEED, 1, TRUE);
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_SPD_MINUS_1;
|
||||
PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gLastUsedAbility);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_GooeyActivates;
|
||||
|
|
|
@ -198,7 +198,6 @@ DOUBLE_BATTLE_TEST("Mirror Armor lowers Speed of the partner Pokemon after Court
|
|||
|
||||
SINGLE_BATTLE_TEST("Mirror Armor reflects Tangling Hair speed drop")
|
||||
{
|
||||
KNOWN_FAILING;
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_TANGLING_HAIR); }
|
||||
OPPONENT(SPECIES_CORVIKNIGHT) { Ability(ABILITY_MIRROR_ARMOR); }
|
||||
|
|
Loading…
Reference in a new issue