sovereignx/test/battle/move_effect/thousand_arrows.c

56 lines
1.7 KiB
C
Raw Normal View History

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 12:33:04 +01:00
#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(MoveHasAdditionalEffect(MOVE_THOUSAND_ARROWS, MOVE_EFFECT_SMACK_DOWN) == TRUE);
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 12:33:04 +01:00
ASSUME(gMovesInfo[MOVE_THOUSAND_ARROWS].ignoreTypeIfFlyingAndUngrounded == TRUE);
}
SINGLE_BATTLE_TEST("Thousand Arrows does not ground mons behind substitutes")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_SKARMORY);
} WHEN {
TURN { MOVE(opponent, MOVE_SUBSTITUTE); MOVE(player, MOVE_THOUSAND_ARROWS); }
} SCENE {
NOT MESSAGE("Foe Skarmory fell straight down!");
}
}
SINGLE_BATTLE_TEST("Thousand Arrows does neutral damage to non-grounded Flying types regardless of other typings")
{
u32 pokemon;
PARAMETRIZE { pokemon = SPECIES_SKARMORY; }
PARAMETRIZE { pokemon = SPECIES_SCYTHER; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(pokemon);
} WHEN {
TURN { MOVE(player, MOVE_THOUSAND_ARROWS); }
TURN { MOVE(player, MOVE_THOUSAND_ARROWS); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_THOUSAND_ARROWS, player);
if (pokemon == SPECIES_SKARMORY) {
MESSAGE("Foe Skarmory fell straight down!");
MESSAGE("Foe Skarmory used Celebrate!");
} else {
MESSAGE("Foe Scyther fell straight down!");
MESSAGE("Foe Scyther used Celebrate!");
}
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
MESSAGE("Congratulations, 1!");
2024-05-13 16:18:39 +01:00
MESSAGE("Wobbuffet used Thousand Arrows!");
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 12:33:04 +01:00
ANIMATION(ANIM_TYPE_MOVE, MOVE_THOUSAND_ARROWS, player);
if (pokemon == SPECIES_SKARMORY)
{
MESSAGE("It's super effective!");
}
else
{
MESSAGE("It's not very effective…");
}
}
}