From 6f541bb4490021907d43d3bface6edb5ebcbe45f Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Sat, 8 Feb 2025 16:42:25 -0500 Subject: [PATCH] Fix Liquid Ooze + Leech Seed Test (#6217) Co-authored-by: ghoulslash --- data/battle_scripts_1.s | 4 ++++ test/battle/ability/liquid_ooze.c | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 7f796eb0be..8f739ac707 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -5952,10 +5952,14 @@ BattleScript_SafeguardEnds:: waitmessage B_WAIT_TIME_LONG end2 +@ Leech Seed end turn effect +@ attacker is the victim +@ target is the leech seeder (recieving HP) BattleScript_LeechSeedTurnDrainLiquidOoze:: call BattleScript_LeechSeedTurnDrain copybyte gBattlerAbility, gBattlerAttacker call BattleScript_AbilityPopUp + copybyte gBattlerAttacker, gBattlerTarget @ needed to get liquid ooze message correct goto BattleScript_LeechSeedTurnDrainGainHp BattleScript_LeechSeedTurnDrainHealBlock:: diff --git a/test/battle/ability/liquid_ooze.c b/test/battle/ability/liquid_ooze.c index 6398a0be2b..fb20522937 100644 --- a/test/battle/ability/liquid_ooze.c +++ b/test/battle/ability/liquid_ooze.c @@ -108,9 +108,11 @@ SINGLE_BATTLE_TEST("Liquid Ooze causes Strength Sap users to lose HP instead of } } -SINGLE_BATTLE_TEST("Liquid Ooze causes leech seedee to faint before seeder") +/* * https://bulbapedia.bulbagarden.net/wiki/Liquid_Ooze_(Ability)#In_battle: + * If the recipient of Leech Seed's effect were to faint due to Liquid Ooze on the same turn as the victim of Leech Seed, then the victim faints before the recipient. This means that the victim's team loses the battle if both teams had their final Pokémon sent out. + */ +SINGLE_BATTLE_TEST("Liquid Ooze causes leech seed victim to faint before seeder") { - KNOWN_FAILING; // Message fails u16 ability; PARAMETRIZE { ability = ABILITY_CLEAR_BODY; } PARAMETRIZE { ability = ABILITY_LIQUID_OOZE; } @@ -120,16 +122,17 @@ SINGLE_BATTLE_TEST("Liquid Ooze causes leech seedee to faint before seeder") } WHEN { TURN { MOVE(player, MOVE_LEECH_SEED); } } SCENE { + // Player seeds opponent MESSAGE("Bulbasaur used Leech Seed!"); // Drain at end of turn ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_LEECH_SEED_DRAIN, opponent); if (ability != ABILITY_LIQUID_OOZE) { - MESSAGE("The opposing Tentacool's health is sapped by Leech Seed!"); MESSAGE("The opposing Tentacool fainted!"); + MESSAGE("The opposing Tentacool's health is sapped by Leech Seed!"); } else { + MESSAGE("The opposing Tentacool fainted!"); ABILITY_POPUP(opponent, ABILITY_LIQUID_OOZE); MESSAGE("Bulbasaur sucked up the liquid ooze!"); - MESSAGE("The opposing Tentacool fainted!"); MESSAGE("Bulbasaur fainted!"); } }