From 205ce2cd10bf50543f62fcbd58f820d1754f5ebe Mon Sep 17 00:00:00 2001 From: cawtds <38510667+cawtds@users.noreply.github.com> Date: Wed, 28 Aug 2024 01:02:30 +0200 Subject: [PATCH] fix psystrike animation --- src/battle_anim_normal.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/battle_anim_normal.c b/src/battle_anim_normal.c index 86f8106a8..b203d41a8 100644 --- a/src/battle_anim_normal.c +++ b/src/battle_anim_normal.c @@ -783,15 +783,16 @@ static void AnimTask_FlashAnimTagWithColor_Step2(u8 taskId) void AnimTask_InvertScreenColor(u8 taskId) { u32 selectedPalettes = 0; - u8 attackerBattler = gBattleAnimAttacker; - u8 targetBattler = gBattleAnimTarget; - if (gBattleAnimArgs[0] & 0x100) + if (gBattleAnimArgs[0] & 0x1) selectedPalettes = GetBattlePalettesMask(TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE); - if (gBattleAnimArgs[1] & 0x100) - selectedPalettes |= (0x10000 << attackerBattler); - if (gBattleAnimArgs[2] & 0x100) - selectedPalettes |= (0x10000 << targetBattler); + if (gBattleAnimArgs[0] & 0x2) + selectedPalettes |= (0x10000 << gBattleAnimAttacker); + if (gBattleAnimArgs[0] & 0x4) + selectedPalettes |= (0x10000 << gBattleAnimTarget); + if (gBattleAnimArgs[0] & 0x8 && IsBattlerAlive(BATTLE_PARTNER(gBattleAnimTarget))) + selectedPalettes |= (0x10000 << BATTLE_PARTNER(gBattleAnimTarget)); + InvertPlttBuffer(selectedPalettes); DestroyAnimVisualTask(taskId); }