Contrary stat drop anim with Spectral Thief (#4824)

* Contrary stat drop anim with Spectral Thief

* Are you happy now agbcc? I hope I w
This commit is contained in:
DizzyEggg 2024-06-19 13:40:46 +02:00 committed by GitHub
parent 74f53a7e18
commit c3b1701c16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3584,6 +3584,7 @@ void SetMoveEffect(bool32 primary, bool32 certain)
case MOVE_EFFECT_SPECTRAL_THIEF: case MOVE_EFFECT_SPECTRAL_THIEF:
if (!NoAliveMonsForEitherParty()) if (!NoAliveMonsForEitherParty())
{ {
bool32 contrary = (GetBattlerAbility(gBattlerAttacker) == ABILITY_CONTRARY);
gBattleStruct->stolenStats[0] = 0; // Stats to steal. gBattleStruct->stolenStats[0] = 0; // Stats to steal.
gBattleScripting.animArg1 = 0; gBattleScripting.animArg1 = 0;
for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++) for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++)
@ -3605,16 +3606,16 @@ void SetMoveEffect(bool32 primary, bool32 certain)
if (gBattleScripting.animArg1 == 0) if (gBattleScripting.animArg1 == 0)
{ {
if (byTwo) if (byTwo)
gBattleScripting.animArg1 = STAT_ANIM_PLUS2 + i; gBattleScripting.animArg1 = (contrary ? STAT_ANIM_MINUS2 : STAT_ANIM_PLUS2) + i;
else else
gBattleScripting.animArg1 = STAT_ANIM_PLUS1 + i; gBattleScripting.animArg1 = (contrary ? STAT_ANIM_MINUS1 : STAT_ANIM_PLUS1) + i;
} }
else else
{ {
if (byTwo) if (byTwo)
gBattleScripting.animArg1 = STAT_ANIM_MULTIPLE_PLUS2; gBattleScripting.animArg1 = (contrary ? STAT_ANIM_MULTIPLE_MINUS2 : STAT_ANIM_MULTIPLE_PLUS2);
else else
gBattleScripting.animArg1 = STAT_ANIM_MULTIPLE_PLUS1; gBattleScripting.animArg1 = (contrary ? STAT_ANIM_MULTIPLE_MINUS1 : STAT_ANIM_MULTIPLE_PLUS1);
} }
} }
} }