2023-02-03 00:22:02 +01:00
|
|
|
#include "global.h"
|
2023-08-12 21:00:15 +02:00
|
|
|
#include "test/battle.h"
|
2023-02-03 00:22:02 +01:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Compound Eyes raises accuracy")
|
|
|
|
{
|
2023-02-20 21:06:01 +01:00
|
|
|
PASSES_RANDOMLY(91, 100, RNG_ACCURACY);
|
2023-02-03 00:22:02 +01:00
|
|
|
GIVEN {
|
|
|
|
ASSUME(gBattleMoves[MOVE_THUNDER].accuracy == 70);
|
2023-05-07 08:50:29 +02:00
|
|
|
PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); }
|
2023-02-03 00:22:02 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_THUNDER); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDER, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Compound Eyes does not affect OHKO moves")
|
|
|
|
{
|
2023-02-20 21:06:01 +01:00
|
|
|
PASSES_RANDOMLY(30, 100, RNG_ACCURACY);
|
2023-02-03 00:22:02 +01:00
|
|
|
GIVEN {
|
|
|
|
ASSUME(gBattleMoves[MOVE_FISSURE].accuracy == 30);
|
|
|
|
ASSUME(gBattleMoves[MOVE_FISSURE].effect == EFFECT_OHKO);
|
2023-05-07 08:50:29 +02:00
|
|
|
PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); }
|
2023-02-03 00:22:02 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_FISSURE); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_FISSURE, player);
|
|
|
|
HP_BAR(opponent, hp: 0);
|
|
|
|
}
|
|
|
|
}
|