2023-07-25 08:59:26 +01:00
|
|
|
#include "global.h"
|
2023-08-12 20:00:15 +01:00
|
|
|
#include "test/battle.h"
|
2023-07-25 08:59:26 +01:00
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
|
|
|
ASSUME(gMovesInfo[MOVE_ROLE_PLAY].effect == EFFECT_ROLE_PLAY);
|
2023-07-25 08:59:26 +01:00
|
|
|
}
|
|
|
|
|
2023-12-22 14:05:35 +00:00
|
|
|
SINGLE_BATTLE_TEST("Sword of Ruin reduces Defense if opposing mon's ability doesn't match")
|
2023-07-25 08:59:26 +01:00
|
|
|
{
|
2023-12-22 14:05:35 +00:00
|
|
|
s16 damage[2];
|
2023-07-25 08:59:26 +01:00
|
|
|
|
|
|
|
GIVEN {
|
2023-12-22 14:05:35 +00:00
|
|
|
PLAYER(SPECIES_CHIEN_PAO) { Ability(ABILITY_SWORD_OF_RUIN); }
|
2023-07-25 08:59:26 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
2023-12-22 14:05:35 +00:00
|
|
|
TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_ROLE_PLAY); }
|
2023-07-25 08:59:26 +01:00
|
|
|
TURN { MOVE(player, MOVE_TACKLE); }
|
|
|
|
} SCENE {
|
2023-12-22 14:05:35 +00:00
|
|
|
ABILITY_POPUP(player, ABILITY_SWORD_OF_RUIN);
|
|
|
|
MESSAGE("Chien-Pao's Sword of Ruin weakened the Defense of all surrounding Pokémon!");
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
|
|
|
HP_BAR(opponent, captureDamage: &damage[0]);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_ROLE_PLAY, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
|
|
|
HP_BAR(opponent, captureDamage: &damage[1]);
|
|
|
|
} THEN {
|
|
|
|
EXPECT_MUL_EQ(damage[1], Q_4_12(1.33), damage[0]);
|
2023-07-25 08:59:26 +01:00
|
|
|
}
|
|
|
|
}
|
2024-05-06 18:59:37 +01:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Sword of Ruin's message displays correctly after all battlers fainted - Player")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(gMovesInfo[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { HP(1);}
|
|
|
|
PLAYER(SPECIES_CHIEN_PAO);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponent, MOVE_EXPLOSION); SEND_OUT(player, 1); SEND_OUT(opponent, 1); }
|
|
|
|
TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_RUINATION); }
|
|
|
|
} SCENE {
|
|
|
|
HP_BAR(opponent, hp: 0);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, opponent);
|
|
|
|
// Everyone faints.
|
|
|
|
MESSAGE("Go! Chien-Pao!");
|
2024-06-22 18:39:01 +01:00
|
|
|
MESSAGE("2 sent out Wobbuffet!");
|
2024-05-06 18:59:37 +01:00
|
|
|
ABILITY_POPUP(player, ABILITY_SWORD_OF_RUIN);
|
|
|
|
MESSAGE("Chien-Pao's Sword of Ruin weakened the Defense of all surrounding Pokémon!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Sword of Ruin's message displays correctly after all battlers fainted - Opponent")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(gMovesInfo[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { HP(1);}
|
|
|
|
OPPONENT(SPECIES_CHIEN_PAO);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_EXPLOSION); SEND_OUT(player, 1); SEND_OUT(opponent, 1); }
|
|
|
|
TURN { MOVE(player, MOVE_RUINATION); MOVE(opponent, MOVE_TACKLE); }
|
|
|
|
} SCENE {
|
|
|
|
HP_BAR(player, hp: 0);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, player);
|
|
|
|
// Everyone faints.
|
2024-06-04 00:59:28 +01:00
|
|
|
SEND_IN_MESSAGE("Wobbuffet");
|
2024-05-06 18:59:37 +01:00
|
|
|
MESSAGE("2 sent out Chien-Pao!");
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_SWORD_OF_RUIN);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Chien-Pao's Sword of Ruin weakened the Defense of all surrounding Pokémon!");
|
2024-05-06 18:59:37 +01:00
|
|
|
}
|
|
|
|
}
|