mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 12:14:20 +01:00
32c3c33376
My bad ^^;
67 lines
2.1 KiB
C
67 lines
2.1 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_TACKLE].makesContact);
|
|
ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE);
|
|
ASSUME(gBattleMoves[MOVE_TACKLE].makesContact);
|
|
ASSUME(gBattleMoves[MOVE_FIRE_PUNCH].makesContact);
|
|
ASSUME(gBattleMoves[MOVE_FIRE_PUNCH].type == TYPE_FIRE);
|
|
ASSUME(P_GEN_7_POKEMON == TRUE);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Fluffy halves damage taken from moves that make direct contact", s16 damage)
|
|
{
|
|
u32 ability;
|
|
PARAMETRIZE { ability = ABILITY_KLUTZ; }
|
|
PARAMETRIZE { ability = ABILITY_FLUFFY; }
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_STUFFUL) { Ability(ability); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_TACKLE); }
|
|
} SCENE {
|
|
MESSAGE("Wobbuffet used Tackle!");
|
|
HP_BAR(opponent, captureDamage: &results[i].damage);
|
|
} FINALLY {
|
|
EXPECT_MUL_EQ(results[0].damage, UQ_4_12(0.5), results[1].damage);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Fluffy doubles damage taken from fire type moves", s16 damage)
|
|
{
|
|
u32 ability;
|
|
PARAMETRIZE { ability = ABILITY_KLUTZ; }
|
|
PARAMETRIZE { ability = ABILITY_FLUFFY; }
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_STUFFUL) { Ability(ability); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_EMBER); }
|
|
} SCENE {
|
|
MESSAGE("Wobbuffet used Ember!");
|
|
HP_BAR(opponent, captureDamage: &results[i].damage);
|
|
} FINALLY {
|
|
EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Fluffy does not alter damage of fire-type moves that make direct contact", s16 damage)
|
|
{
|
|
u32 ability;
|
|
PARAMETRIZE { ability = ABILITY_KLUTZ; }
|
|
PARAMETRIZE { ability = ABILITY_FLUFFY; }
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_STUFFUL) { Ability(ability); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_FIRE_PUNCH); }
|
|
} SCENE {
|
|
MESSAGE("Wobbuffet used Fire Punch!");
|
|
HP_BAR(opponent, captureDamage: &results[i].damage);
|
|
} FINALLY {
|
|
EXPECT_EQ(results[0].damage, results[1].damage);
|
|
}
|
|
}
|