2023-07-17 15:30:59 +01:00
|
|
|
#include "global.h"
|
2023-08-12 20:00:15 +01:00
|
|
|
#include "test/battle.h"
|
2023-07-17 15:30:59 +01:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Electromorphosis sets up Charge when hit by any move")
|
|
|
|
{
|
|
|
|
s16 dmgBefore, dmgAfter;
|
|
|
|
u16 move;
|
|
|
|
|
|
|
|
PARAMETRIZE {move = MOVE_TACKLE; }
|
|
|
|
PARAMETRIZE {move = MOVE_GUST; }
|
|
|
|
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
|
|
|
ASSUME(gMovesInfo[MOVE_GUST].power != 0);
|
|
|
|
ASSUME(gMovesInfo[MOVE_GUST].category == DAMAGE_CATEGORY_SPECIAL);
|
|
|
|
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
|
|
|
ASSUME(gMovesInfo[MOVE_THUNDER_SHOCK].power != 0);
|
|
|
|
ASSUME(gMovesInfo[MOVE_THUNDER_SHOCK].type == TYPE_ELECTRIC);
|
2023-07-17 15:30:59 +01:00
|
|
|
|
2023-12-14 23:19:28 +00:00
|
|
|
PLAYER(SPECIES_BELLIBOLT) { Ability(ABILITY_ELECTROMORPHOSIS); Speed(10); }
|
2023-07-17 15:30:59 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET) {Ability(ABILITY_LIMBER); Speed(5) ;} // Limber, so it doesn't get paralyzed.
|
|
|
|
}
|
|
|
|
WHEN {
|
2023-12-14 23:19:28 +00:00
|
|
|
TURN { MOVE(player, MOVE_THUNDER_SHOCK), MOVE(opponent, move); }
|
|
|
|
TURN { MOVE(player, MOVE_THUNDER_SHOCK), MOVE(opponent, move); }
|
2023-07-17 15:30:59 +01:00
|
|
|
} SCENE {
|
2023-12-14 23:19:28 +00:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDER_SHOCK, player);
|
2023-07-17 15:30:59 +01:00
|
|
|
HP_BAR(opponent, captureDamage: &dmgBefore);
|
|
|
|
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
|
|
|
HP_BAR(player);
|
|
|
|
ABILITY_POPUP(player, ABILITY_ELECTROMORPHOSIS);
|
|
|
|
if (move == MOVE_TACKLE) {
|
2023-12-14 23:19:28 +00:00
|
|
|
MESSAGE("Being hit by Tackle charged Bellibolt with power!");
|
2023-07-17 15:30:59 +01:00
|
|
|
}
|
|
|
|
else {
|
2023-12-14 23:19:28 +00:00
|
|
|
MESSAGE("Being hit by Gust charged Bellibolt with power!");
|
2023-07-17 15:30:59 +01:00
|
|
|
}
|
|
|
|
|
2023-12-14 23:19:28 +00:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDER_SHOCK, player);
|
2023-07-17 15:30:59 +01:00
|
|
|
HP_BAR(opponent, captureDamage: &dmgAfter);
|
|
|
|
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
|
|
|
HP_BAR(player);
|
|
|
|
ABILITY_POPUP(player, ABILITY_ELECTROMORPHOSIS);
|
|
|
|
if (move == MOVE_TACKLE) {
|
2023-12-14 23:19:28 +00:00
|
|
|
MESSAGE("Being hit by Tackle charged Bellibolt with power!");
|
2023-07-17 15:30:59 +01:00
|
|
|
}
|
|
|
|
else {
|
2023-12-14 23:19:28 +00:00
|
|
|
MESSAGE("Being hit by Gust charged Bellibolt with power!");
|
2023-07-17 15:30:59 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
THEN {
|
|
|
|
EXPECT_MUL_EQ(dmgBefore, Q_4_12(2.0), dmgAfter);
|
|
|
|
}
|
|
|
|
}
|