2022-12-24 06:13:42 +01:00
|
|
|
#include "global.h"
|
2023-08-12 21:00:15 +02:00
|
|
|
#include "test/battle.h"
|
2022-12-24 06:13:42 +01:00
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
|
|
|
ASSUME(gBattleMoves[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN);
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Sand Attack lowers Accuracy")
|
|
|
|
{
|
|
|
|
ASSUME(gBattleMoves[MOVE_SCRATCH].accuracy == 100);
|
2023-02-20 21:06:01 +01:00
|
|
|
PASSES_RANDOMLY(gBattleMoves[MOVE_SCRATCH].accuracy * 3 / 4, 100, RNG_ACCURACY);
|
2022-12-24 06:13:42 +01:00
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_SAND_ATTACK); MOVE(opponent, MOVE_SCRATCH); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SAND_ATTACK, player);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
|
|
|
MESSAGE("Foe Wobbuffet's accuracy fell!");
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, opponent);
|
|
|
|
}
|
|
|
|
}
|