2023-07-19 09:59:36 +01:00
|
|
|
#include "global.h"
|
2023-08-12 20:00:15 +01:00
|
|
|
#include "test/battle.h"
|
2023-07-19 09:59:36 +01:00
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_FURY_CUTTER].type == TYPE_BUG);
|
2024-12-20 11:20:46 +00:00
|
|
|
ASSUME(!IS_MOVE_STATUS(MOVE_FURY_CUTTER));
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_FEINT_ATTACK].type == TYPE_DARK);
|
2024-12-20 11:20:46 +00:00
|
|
|
ASSUME(!IS_MOVE_STATUS(MOVE_FEINT_ATTACK));
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_SHADOW_PUNCH].type == TYPE_GHOST);
|
2024-12-20 11:20:46 +00:00
|
|
|
ASSUME(!IS_MOVE_STATUS(MOVE_SHADOW_PUNCH));
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_TACKLE].type == TYPE_NORMAL);
|
2024-12-20 11:20:46 +00:00
|
|
|
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
2023-07-19 09:59:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Rattled boosts speed by 1 when hit by Bug, Dark or Ghost type move")
|
|
|
|
{
|
|
|
|
u16 move;
|
|
|
|
PARAMETRIZE { move = MOVE_FURY_CUTTER; }
|
|
|
|
PARAMETRIZE { move = MOVE_FEINT_ATTACK; }
|
|
|
|
PARAMETRIZE { move = MOVE_SHADOW_PUNCH; }
|
|
|
|
PARAMETRIZE { move = MOVE_TACKLE; }
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) {Speed(42) ;}
|
|
|
|
OPPONENT(SPECIES_SUDOWOODO) {Speed(40); Ability(ABILITY_RATTLED);}
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, move); }
|
|
|
|
TURN { MOVE(player, move); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
if (move != MOVE_TACKLE) {
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_RATTLED);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Sudowoodo's Speed rose!");
|
2023-07-19 09:59:36 +01:00
|
|
|
}
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Sudowoodo used Celebrate!");
|
2023-07-19 09:59:36 +01:00
|
|
|
// Sudowoodo is now faster
|
|
|
|
if (move != MOVE_TACKLE){
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Sudowoodo used Celebrate!");
|
2023-07-19 09:59:36 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_RATTLED);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Sudowoodo's Speed rose!");
|
2023-07-19 09:59:36 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
|
|
|
HP_BAR(opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Sudowoodo used Celebrate!");
|
2023-07-19 09:59:36 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Rattled boosts speed by 1 when affected by Intimidate")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(B_UPDATED_INTIMIDATE >= GEN_8);
|
|
|
|
PLAYER(SPECIES_GYARADOS) {Ability(ABILITY_INTIMIDATE); }
|
|
|
|
OPPONENT(SPECIES_SUDOWOODO) {Ability(ABILITY_RATTLED); }
|
|
|
|
} WHEN {
|
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
ABILITY_POPUP(player, ABILITY_INTIMIDATE);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
2024-10-26 23:50:20 +01:00
|
|
|
MESSAGE("Gyarados's Intimidate cuts the opposing Sudowoodo's Attack!");
|
2023-07-19 09:59:36 +01:00
|
|
|
ABILITY_POPUP(opponent, ABILITY_RATTLED);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Sudowoodo's Speed rose!");
|
2023-07-19 09:59:36 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Rattled triggers correctly when hit by U-Turn") // Specific test here, because of #3124
|
|
|
|
{
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_U_TURN].effect == EFFECT_HIT_ESCAPE);
|
|
|
|
ASSUME(gMovesInfo[MOVE_U_TURN].type == TYPE_BUG);
|
2023-07-19 09:59:36 +01:00
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
PLAYER(SPECIES_WYNAUT);
|
|
|
|
OPPONENT(SPECIES_SUDOWOODO) {Ability(ABILITY_RATTLED); }
|
|
|
|
OPPONENT(SPECIES_SUDOWOODO);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_U_TURN); SEND_OUT(player, 1); }
|
|
|
|
} SCENE {
|
2023-07-26 08:42:29 +01:00
|
|
|
MESSAGE("Wobbuffet used U-turn!");
|
2023-07-19 09:59:36 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_RATTLED);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Sudowoodo's Speed rose!");
|
2024-06-04 00:59:28 +01:00
|
|
|
SEND_IN_MESSAGE("Wynaut");
|
2023-07-19 09:59:36 +01:00
|
|
|
}
|
|
|
|
}
|