mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-28 04:34:28 +01:00
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
SINGLE_BATTLE_TEST("Paralysis reduces Speed by 50%")
|
|
{
|
|
u16 playerSpeed;
|
|
bool32 playerFirst;
|
|
PARAMETRIZE { playerSpeed = 98; playerFirst = FALSE; }
|
|
PARAMETRIZE { playerSpeed = 102; playerFirst = TRUE; }
|
|
GIVEN {
|
|
ASSUME(B_PARALYSIS_SPEED >= GEN_7);
|
|
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); Speed(playerSpeed); }
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(50); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); }
|
|
} SCENE {
|
|
if (playerFirst) {
|
|
ONE_OF {
|
|
MESSAGE("Wobbuffet used Celebrate!");
|
|
MESSAGE("Wobbuffet is paralyzed! It can't move!");
|
|
}
|
|
MESSAGE("Foe Wobbuffet used Celebrate!");
|
|
} else {
|
|
MESSAGE("Foe Wobbuffet used Celebrate!");
|
|
ONE_OF {
|
|
MESSAGE("Wobbuffet used Celebrate!");
|
|
MESSAGE("Wobbuffet is paralyzed! It can't move!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Paralysis has a 25% chance of skipping the turn")
|
|
{
|
|
PASSES_RANDOMLY(25, 100, RNG_PARALYSIS);
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); }
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_CELEBRATE); }
|
|
} SCENE {
|
|
MESSAGE("Wobbuffet is paralyzed! It can't move!");
|
|
}
|
|
}
|