IsFinalStrikeEffect uses effect instead of move (#4917)
* IsFinalStrikeEffect uses effect instead of move * Update test/battle/ability/parental_bond.c --------- Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
parent
93f5ca2481
commit
60c7588532
2 changed files with 26 additions and 3 deletions
|
@ -357,7 +357,7 @@ static void DrawLevelUpBannerText(void);
|
|||
static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite *sprite);
|
||||
static bool32 CriticalCapture(u32 odds);
|
||||
static void BestowItem(u32 battlerAtk, u32 battlerDef);
|
||||
static bool8 IsFinalStrikeEffect(u16 move);
|
||||
static bool8 IsFinalStrikeEffect(u32 moveEffect);
|
||||
static void TryUpdateRoundTurnOrder(void);
|
||||
static bool32 ChangeOrderTargetAfterAttacker(void);
|
||||
void ApplyExperienceMultipliers(s32 *expAmount, u8 expGetterMonId, u8 faintedBattler);
|
||||
|
@ -15876,10 +15876,9 @@ bool32 IsMoveAffectedByParentalBond(u32 move, u32 battler)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 IsFinalStrikeEffect(u16 move)
|
||||
static bool8 IsFinalStrikeEffect(u32 moveEffect)
|
||||
{
|
||||
u32 i;
|
||||
u16 moveEffect = gMovesInfo[move].effect;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sFinalStrikeOnlyEffects); i++)
|
||||
{
|
||||
|
|
|
@ -239,6 +239,30 @@ SINGLE_BATTLE_TEST("Parental Bond has no affect on multi hit moves and they stil
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Parental Bond Smack Down effect triggers after 2nd hit")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SMACK_DOWN].category != DAMAGE_CATEGORY_STATUS);
|
||||
ASSUME(gMovesInfo[MOVE_SMACK_DOWN].strikeCount < 2);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_SMACK_DOWN, MOVE_EFFECT_SMACK_DOWN));
|
||||
PLAYER(SPECIES_KANGASKHAN) { Item(ITEM_KANGASKHANITE); }
|
||||
OPPONENT(SPECIES_SKARMORY);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SMACK_DOWN, megaEvolve: TRUE); }
|
||||
} SCENE {
|
||||
MESSAGE("Kangaskhan's Kangaskhanite is reacting to 1's Mega Ring!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, player);
|
||||
MESSAGE("Kangaskhan has Mega Evolved into Mega Kangaskhan!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SMACK_DOWN, player);
|
||||
HP_BAR(opponent);
|
||||
NOT MESSAGE("Foe Skarmory fell straight down!");
|
||||
HP_BAR(opponent);
|
||||
MESSAGE("Foe Skarmory fell straight down!");
|
||||
} THEN {
|
||||
EXPECT_EQ(player->species, SPECIES_KANGASKHAN_MEGA);
|
||||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Parental Bond tests");
|
||||
|
||||
// Temporary TODO: Convert Bulbapedia description into tests.
|
||||
|
|
Loading…
Reference in a new issue