2024-05-15 19:48:10 +01:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
|
|
|
ASSUME(gMovesInfo[MOVE_CHARM].effect == EFFECT_ATTACK_DOWN_2);
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Charm lowers Attack by 2 stages", s16 damage)
|
|
|
|
{
|
|
|
|
bool32 lowerAttack;
|
|
|
|
PARAMETRIZE { lowerAttack = FALSE; }
|
|
|
|
PARAMETRIZE { lowerAttack = TRUE; }
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
if (lowerAttack) TURN { MOVE(player, MOVE_CHARM); }
|
|
|
|
TURN { MOVE(opponent, MOVE_TACKLE); }
|
|
|
|
} SCENE {
|
|
|
|
if (lowerAttack) {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CHARM, player);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Wobbuffet's Attack harshly fell!");
|
2024-05-15 19:48:10 +01:00
|
|
|
}
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
|
|
|
HP_BAR(player, captureDamage: &results[i].damage);
|
|
|
|
} FINALLY {
|
|
|
|
EXPECT_MUL_EQ(results[1].damage, Q_4_12(2.0), results[0].damage);
|
|
|
|
}
|
|
|
|
}
|