Fix some abilities preventing stat dropping move effects when used on self (#4696)

* Move SOLAR_POWER_HP_DROP label

* Abilities don't prevent self stat dropping effects

Hyper cutter does not stop MOVE_EFFECT_ATK_MINUS_1 and MOVE_EFFECT_ATK_MINUS_2.
Big Pecks does not stop MOVE_EFFECT_DEF_MINUS_1 and MOVE_EFFECT_DEF_MINUS_2.
Keen Eye and Illuminate do not stop MOVE_EFFECT_ACC_MINUS_1 and MOVE_EFFECT_ACC_MINUS_2.
This commit is contained in:
sneed 2024-06-02 19:20:00 +03:00 committed by GitHub
parent 2d1ef1fcd7
commit ad8576d548
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3350,7 +3350,10 @@ void SetMoveEffect(bool32 primary, bool32 certain)
case MOVE_EFFECT_SP_DEF_MINUS_1:
case MOVE_EFFECT_ACC_MINUS_1:
case MOVE_EFFECT_EVS_MINUS_1:
flags = affectsUser;
if (affectsUser == MOVE_EFFECT_AFFECTS_USER)
flags = MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN;
else
flags = 0;
if (mirrorArmorReflected)
flags |= (STAT_CHANGE_ALLOW_PTR * !affectsUser);
else
@ -3400,7 +3403,10 @@ void SetMoveEffect(bool32 primary, bool32 certain)
case MOVE_EFFECT_SP_DEF_MINUS_2:
case MOVE_EFFECT_ACC_MINUS_2:
case MOVE_EFFECT_EVS_MINUS_2:
flags = affectsUser;
if (affectsUser == MOVE_EFFECT_AFFECTS_USER)
flags = MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN;
else
flags = 0;
if (mirrorArmorReflected && !affectsUser)
flags |= STAT_CHANGE_ALLOW_PTR;
if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(2) | STAT_BUFF_NEGATIVE,