2022-12-24 05:13:42 +00:00
|
|
|
#include "global.h"
|
2023-08-12 20:00:15 +01:00
|
|
|
#include "test/battle.h"
|
2022-12-24 05:13:42 +00:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Poison Point inflicts poison on contact")
|
|
|
|
{
|
|
|
|
u32 move;
|
|
|
|
PARAMETRIZE { move = MOVE_TACKLE; }
|
|
|
|
PARAMETRIZE { move = MOVE_SWIFT; }
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_TACKLE].makesContact);
|
|
|
|
ASSUME(!gMovesInfo[MOVE_SWIFT].makesContact);
|
2022-12-24 05:13:42 +00:00
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_NIDORAN_M) { Ability(ABILITY_POISON_POINT); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, move); }
|
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
2024-01-29 11:51:32 +00:00
|
|
|
if (gMovesInfo[move].makesContact) {
|
2022-12-24 05:13:42 +00:00
|
|
|
ABILITY_POPUP(opponent, ABILITY_POISON_POINT);
|
|
|
|
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, player);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("Wobbuffet was poisoned by the opposing Nidoran♂'s Poison Point!");
|
2022-12-24 05:13:42 +00:00
|
|
|
STATUS_ICON(player, poison: TRUE);
|
|
|
|
} else {
|
2023-10-24 08:55:32 +01:00
|
|
|
NONE_OF {
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_POISON_POINT);
|
|
|
|
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, player);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("Wobbuffet was poisoned by the opposing Nidoran♂'s Poison Point!");
|
2023-10-24 08:55:32 +01:00
|
|
|
STATUS_ICON(player, poison: TRUE);
|
|
|
|
}
|
2022-12-24 05:13:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-06-18 19:13:44 +01:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Poison Point triggers 30% of the time")
|
|
|
|
{
|
|
|
|
PASSES_RANDOMLY(3, 10, RNG_POISON_POINT);
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(B_ABILITY_TRIGGER_CHANCE >= GEN_4);
|
|
|
|
ASSUME(gMovesInfo[MOVE_TACKLE].makesContact);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_NIDORAN_M) { Ability(ABILITY_POISON_POINT); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_TACKLE); }
|
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_POISON_POINT);
|
|
|
|
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, player);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("Wobbuffet was poisoned by the opposing Nidoran♂'s Poison Point!");
|
2024-06-18 19:13:44 +01:00
|
|
|
STATUS_ICON(player, poison: TRUE);
|
|
|
|
}
|
|
|
|
}
|