sovereignx/test/battle/move_effect/doodle.c
Nephrite ab75ad6d02
Ability flags update (#3886)
* Added five ability flags

Omitted duplicate flags that are basically "can't copy" (Role Play, Receiver, Entrainment, Skill Swap), didn't bother adding Neutralizing Gas flag,

* Mold Breaker and Trace

* Gastro Acid, Simple Beam, Worry Seed

Decided to keep the Simple Beam/Worry Seed functions

* Entrainment done

* Skill Swap

* Doodle/Role Play + flag descriptions

Also adjusted Doodle test

* Wandering Spirit, Mummy, Neutralizing Gas

Neutralizing Gas really only needs to check for other mons with Neutralizing Gas, otherwise unsuppressable abilities are handled separately.

* Renamed flags
2024-01-01 15:03:34 +01:00

83 lines
2.7 KiB
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_DOODLE].effect == EFFECT_DOODLE);
}
DOUBLE_BATTLE_TEST("Doodle gives the target's ability to user and ally")
{
GIVEN {
PLAYER(SPECIES_WYNAUT);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
MESSAGE("Wynaut copied Foe Torchic's Blaze!");
MESSAGE("Wynaut copied Foe Torchic's Blaze!");
} THEN {
EXPECT(playerLeft->ability == ABILITY_BLAZE);
EXPECT(playerRight->ability == ABILITY_BLAZE);
}
}
DOUBLE_BATTLE_TEST("Doodle can't copy a banned ability")
{
GIVEN {
PLAYER(SPECIES_WYNAUT);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_GREAT_TUSK) { Ability(ABILITY_PROTOSYNTHESIS); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
NONE_OF {
MESSAGE("Wynaut copied Foe Great Tusk's Protosynthesis!");
MESSAGE("Wynaut copied Foe Great Tusk's Protosynthesis!");
}
} THEN {
EXPECT(playerLeft->ability != ABILITY_PROTOSYNTHESIS);
EXPECT(playerRight->ability != ABILITY_PROTOSYNTHESIS);
}
}
DOUBLE_BATTLE_TEST("Doodle fails if user has a banned Ability")
{
GIVEN {
PLAYER(SPECIES_CRAMORANT) { Ability(ABILITY_GULP_MISSILE); }
PLAYER(SPECIES_WYNAUT) { Ability(ABILITY_SHADOW_TAG); }
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
MESSAGE("But it failed!");
} THEN {
EXPECT(playerLeft->ability == ABILITY_GULP_MISSILE);
EXPECT(playerRight->ability == ABILITY_SHADOW_TAG);
}
}
DOUBLE_BATTLE_TEST("Doodle fails if partner has a banned Ability")
{
GIVEN {
PLAYER(SPECIES_WYNAUT) { Ability(ABILITY_SHADOW_TAG); }
PLAYER(SPECIES_CRAMORANT) { Ability(ABILITY_GULP_MISSILE); }
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
MESSAGE("But it failed!");
} THEN {
EXPECT(playerLeft->ability == ABILITY_SHADOW_TAG);
EXPECT(playerRight->ability == ABILITY_GULP_MISSILE);
}
}