Changes taget bit of Flower Shield (#5698)
This commit is contained in:
parent
612c8d3ff6
commit
194f7644b8
4 changed files with 40 additions and 4 deletions
|
@ -507,7 +507,7 @@
|
|||
#define MOVE_TARGET_FOES_AND_ALLY (1 << 5)
|
||||
#define MOVE_TARGET_OPPONENTS_FIELD (1 << 6)
|
||||
#define MOVE_TARGET_ALLY (1 << 7)
|
||||
#define MOVE_TARGET_ALL_BATTLERS ((1 << 8) | MOVE_TARGET_USER)
|
||||
#define MOVE_TARGET_ALL_BATTLERS ((1 << 8) | MOVE_TARGET_USER) // No functionality for status moves
|
||||
|
||||
// For the second argument of GetMoveTarget, when no target override is needed
|
||||
#define NO_TARGET_OVERRIDE 0
|
||||
|
|
|
@ -8492,7 +8492,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
|
|||
.type = TYPE_NORMAL,
|
||||
.accuracy = 0,
|
||||
.pp = 40,
|
||||
.target = MOVE_TARGET_USER,
|
||||
.target = MOVE_TARGET_USER, // Targeting is handled through the script
|
||||
.priority = 0,
|
||||
.category = DAMAGE_CATEGORY_STATUS,
|
||||
.zMove = { .effect = Z_EFFECT_ATK_UP_1 },
|
||||
|
@ -14421,7 +14421,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
|
|||
.type = TYPE_FAIRY,
|
||||
.accuracy = 0,
|
||||
.pp = 10,
|
||||
.target = MOVE_TARGET_ALL_BATTLERS,
|
||||
.target = MOVE_TARGET_USER, // The targeting of Flower Shield is handled through a script
|
||||
.priority = 0,
|
||||
.category = DAMAGE_CATEGORY_STATUS,
|
||||
.zMove = { .effect = Z_EFFECT_DEF_UP_1 },
|
||||
|
|
37
test/battle/move_effect/flower_shield.c
Normal file
37
test/battle/move_effect/flower_shield.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_FLOWER_SHIELD].effect == EFFECT_FLOWER_SHIELD);
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Flower Shield raises the defense of all grass type pokemon")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gSpeciesInfo[SPECIES_TANGELA].types[0] == TYPE_GRASS);
|
||||
ASSUME(gSpeciesInfo[SPECIES_TANGROWTH].types[0] == TYPE_GRASS);
|
||||
ASSUME(gSpeciesInfo[SPECIES_SUNKERN].types[0] == TYPE_GRASS);
|
||||
ASSUME(gSpeciesInfo[SPECIES_SUNFLORA].types[0] == TYPE_GRASS);
|
||||
PLAYER(SPECIES_TANGELA);
|
||||
PLAYER(SPECIES_TANGROWTH);
|
||||
OPPONENT(SPECIES_SUNKERN);
|
||||
OPPONENT(SPECIES_SUNFLORA);
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_FLOWER_SHIELD); MOVE(playerRight, MOVE_CELEBRATE); }
|
||||
} SCENE {
|
||||
MESSAGE("Tangela used Flower Shield!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FLOWER_SHIELD, playerLeft);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
|
||||
MESSAGE("Tangela's Defense rose!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FLOWER_SHIELD, playerLeft);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft);
|
||||
MESSAGE("The opposing Sunkern's Defense rose!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FLOWER_SHIELD, playerLeft);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight);
|
||||
MESSAGE("Tangrowth's Defense rose!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FLOWER_SHIELD, playerLeft);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight);
|
||||
MESSAGE("The opposing Sunflora's Defense rose!");
|
||||
}
|
||||
}
|
|
@ -537,7 +537,6 @@ DOUBLE_BATTLE_TEST("Crafty Shield protects self and ally from Confide and Decora
|
|||
DOUBLE_BATTLE_TEST("Crafty Shield does not protect against moves that target all battlers")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_FLOWER_SHIELD].target == MOVE_TARGET_ALL_BATTLERS);
|
||||
ASSUME(gSpeciesInfo[SPECIES_TANGELA].types[0] == TYPE_GRASS);
|
||||
ASSUME(gSpeciesInfo[SPECIES_TANGROWTH].types[0] == TYPE_GRASS);
|
||||
ASSUME(gSpeciesInfo[SPECIES_SUNKERN].types[0] == TYPE_GRASS);
|
||||
|
|
Loading…
Reference in a new issue