2023-12-22 15:45:55 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_DOODLE].effect == EFFECT_DOODLE);
|
2023-12-22 15:45:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DOUBLE_BATTLE_TEST("Doodle gives the target's ability to user and ally")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WYNAUT);
|
|
|
|
PLAYER(SPECIES_WYNAUT);
|
2023-12-22 17:25:23 +00:00
|
|
|
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); }
|
2023-12-22 15:45:55 +00:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
|
2023-12-22 17:25:23 +00:00
|
|
|
MESSAGE("Wynaut copied Foe Torchic's Blaze!");
|
|
|
|
MESSAGE("Wynaut copied Foe Torchic's Blaze!");
|
2023-12-22 15:45:55 +00:00
|
|
|
} THEN {
|
2023-12-22 17:25:23 +00:00
|
|
|
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 {
|
|
|
|
NONE_OF {
|
2024-10-10 17:36:01 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
|
2023-12-22 17:25:23 +00:00
|
|
|
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 {
|
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 14:03:34 +00:00
|
|
|
PLAYER(SPECIES_CRAMORANT) { Ability(ABILITY_GULP_MISSILE); }
|
2023-12-22 17:25:23 +00:00
|
|
|
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 {
|
2024-10-10 17:36:01 +01:00
|
|
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
|
2023-12-22 17:25:23 +00:00
|
|
|
MESSAGE("But it failed!");
|
|
|
|
} THEN {
|
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 14:03:34 +00:00
|
|
|
EXPECT(playerLeft->ability == ABILITY_GULP_MISSILE);
|
2023-12-22 17:25:23 +00:00
|
|
|
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); }
|
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 14:03:34 +00:00
|
|
|
PLAYER(SPECIES_CRAMORANT) { Ability(ABILITY_GULP_MISSILE); }
|
2023-12-22 17:25:23 +00:00
|
|
|
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(playerLeft, MOVE_DOODLE, target: opponentLeft); }
|
|
|
|
} SCENE {
|
2024-10-10 17:36:01 +01:00
|
|
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, playerLeft);
|
2023-12-22 17:25:23 +00:00
|
|
|
MESSAGE("But it failed!");
|
|
|
|
} THEN {
|
|
|
|
EXPECT(playerLeft->ability == ABILITY_SHADOW_TAG);
|
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 14:03:34 +00:00
|
|
|
EXPECT(playerRight->ability == ABILITY_GULP_MISSILE);
|
2023-12-22 15:45:55 +00:00
|
|
|
}
|
|
|
|
}
|
2024-10-10 17:36:01 +01:00
|
|
|
|
|
|
|
DOUBLE_BATTLE_TEST("Doodle fails if ally's ability can't be suppressed")
|
|
|
|
{
|
|
|
|
u32 species, ability;
|
|
|
|
|
|
|
|
PARAMETRIZE { species = SPECIES_ARCEUS; ability = ABILITY_MULTITYPE; }
|
|
|
|
PARAMETRIZE { species = SPECIES_DARMANITAN; ability = ABILITY_ZEN_MODE; }
|
|
|
|
PARAMETRIZE { species = SPECIES_AEGISLASH; ability = ABILITY_STANCE_CHANGE; }
|
|
|
|
PARAMETRIZE { species = SPECIES_MINIOR; ability = ABILITY_SHIELDS_DOWN; }
|
|
|
|
PARAMETRIZE { species = SPECIES_WISHIWASHI; ability = ABILITY_SCHOOLING; }
|
|
|
|
PARAMETRIZE { species = SPECIES_MIMIKYU; ability = ABILITY_DISGUISE; }
|
|
|
|
PARAMETRIZE { species = SPECIES_GRENINJA_BATTLE_BOND; ability = ABILITY_BATTLE_BOND; }
|
|
|
|
PARAMETRIZE { species = SPECIES_ZYGARDE; ability = ABILITY_POWER_CONSTRUCT; }
|
|
|
|
PARAMETRIZE { species = SPECIES_KOMALA; ability = ABILITY_COMATOSE; }
|
|
|
|
PARAMETRIZE { species = SPECIES_SILVALLY; ability = ABILITY_RKS_SYSTEM; }
|
|
|
|
PARAMETRIZE { species = SPECIES_CRAMORANT; ability = ABILITY_GULP_MISSILE; }
|
|
|
|
PARAMETRIZE { species = SPECIES_EISCUE; ability = ABILITY_ICE_FACE; }
|
|
|
|
PARAMETRIZE { species = SPECIES_CALYREX_ICE; ability = ABILITY_AS_ONE_ICE_RIDER; }
|
|
|
|
PARAMETRIZE { species = SPECIES_CALYREX_SHADOW; ability = ABILITY_AS_ONE_SHADOW_RIDER; }
|
|
|
|
PARAMETRIZE { species = SPECIES_PALAFIN_ZERO; ability = ABILITY_ZERO_TO_HERO; }
|
|
|
|
PARAMETRIZE { species = SPECIES_TATSUGIRI; ability = ABILITY_COMMANDER; }
|
|
|
|
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); }
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); }
|
|
|
|
OPPONENT(species) { Ability(ability); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponentLeft, MOVE_DOODLE, target: playerLeft); }
|
|
|
|
} SCENE {
|
|
|
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOODLE, opponentLeft);
|
|
|
|
MESSAGE("But it failed!");
|
|
|
|
}
|
|
|
|
}
|