sovereignx/test/battle/move_effect/wake_up_slap.c
hedara90 ebdc9ffc39
Fixed some moves' on-hit effects bypassing Substitutes where they shouldn't and some other things discovered along the way (#4558)
* Fixed some moves' on-hit effects bypassing Substitutes where they shouldn't.
Fixed Sparkling Aria interaction with Shield Dust in Singles vs Doubles.
Fixed Wake-Up Slap and Smelling Salts getting boosted damage where they shouldn't vs Substitutes.

* Cleaned up check for Sparkling Aria+Shield Dust interaction and fixed for agbcc.
Fixed logic for checking if moves should do extra damage on statused targets.
Wrote tests for Wake-Up Slap and Smelling Salts receicing extra damage on statused targets.
Wrote tests to check Thousand Arrows type effectiveness vs ungrounded Flying types.

* Update src/battle_util.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update src/battle_script_commands.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update src/battle_script_commands.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/ability/shield_dust.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/item_effect/covert_cloak.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/item_effect/covert_cloak.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/item_effect/covert_cloak.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/move_effect/smelling_salts.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/move_effect/thousand_arrows.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/move_effect/wake_up_slap.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/move_effect/wake_up_slap.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Update test/battle/move_effect/wake_up_slap.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

---------

Co-authored-by: Hedara <hedara90@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-05-13 13:33:04 +02:00

57 lines
2 KiB
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gMovesInfo[MOVE_WAKE_UP_SLAP].additionalEffects->moveEffect == MOVE_EFFECT_REMOVE_STATUS);
ASSUME(gMovesInfo[MOVE_WAKE_UP_SLAP].argument == STATUS1_SLEEP);
}
SINGLE_BATTLE_TEST("Wake-Up Slap does not cure paralyzed pokemons behind substitutes or get increased power")
{
u32 ability;
PARAMETRIZE { ability = ABILITY_INNER_FOCUS; }
PARAMETRIZE { ability = ABILITY_INFILTRATOR; }
GIVEN {
PLAYER(SPECIES_CROBAT) { Ability(ability); }
OPPONENT(SPECIES_SEISMITOAD);
} WHEN {
TURN { MOVE(opponent, MOVE_SUBSTITUTE); MOVE(player, MOVE_SING); }
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_WAKE_UP_SLAP); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_WAKE_UP_SLAP, player);
if (ability == ABILITY_INNER_FOCUS) {
MESSAGE("The SUBSTITUTE took damage for Foe Seismitoad!");
NONE_OF
{
MESSAGE("Foe Seismitoad's SUBSTITUTE faded!"); // Smelling Salts does 86 damage, the sub has 122 HP, if hitting a sub it shouldn't get boosted damage.
MESSAGE("Foe Seismitoad woke up!");
STATUS_ICON(opponent, none: TRUE);
}
} else {
MESSAGE("Foe Seismitoad woke up!");
STATUS_ICON(opponent, none: TRUE);
}
}
}
SINGLE_BATTLE_TEST("Wake-Up Slap get incread power vs. sleeping targets")
{
u32 status1;
PARAMETRIZE { status1 = STATUS1_SLEEP; }
PARAMETRIZE { status1 = STATUS1_NONE; }
GIVEN {
PLAYER(SPECIES_CROBAT);
OPPONENT(SPECIES_LOTAD) { Status1(status1); }
} WHEN {
TURN { MOVE(player, MOVE_WAKE_UP_SLAP); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_WAKE_UP_SLAP, player);
if (status1 == STATUS1_SLEEP) {
MESSAGE("Foe Lotad fainted!");
} else {
NOT MESSAGE("Foe Lotad fainted!");
MESSAGE("Foe Lotad used Celebrate!");
}
}
}