B_SYMBIOSIS_GEMS tests (#8534)
This commit is contained in:
parent
ded6a0fe18
commit
68aa18d0cb
@ -135,7 +135,7 @@
|
||||
F(STURDY, sturdy, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
|
||||
F(PLUS_MINUS_INTERACTION, plusMinusInteraction, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
|
||||
F(WEATHER_FORMS, weatherForms, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
|
||||
F(SYMBIOSIS_GEMS, symbiosisGems, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
|
||||
F(SYMBIOSIS_GEMS, symbiosisGems, (u32, GEN_COUNT - 1)) \
|
||||
F(ABSORBING_ABILITY_STRING, absorbingAbilityString, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
|
||||
F(REDIRECT_ABILITY_IMMUNITY, redirectAbilityImmunity, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
|
||||
F(REDIRECT_ABILITY_ALLIES, redirectAbilityAllies, (u32, GEN_COUNT - 1)) /* TODO: use in tests */ \
|
||||
|
||||
@ -6295,7 +6295,7 @@ static void Cmd_moveend(void)
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if ((gSpecialStatuses[i].berryReduced
|
||||
|| (B_SYMBIOSIS_GEMS >= GEN_7 && gSpecialStatuses[i].gemBoost))
|
||||
|| (GetConfig(CONFIG_SYMBIOSIS_GEMS) >= GEN_7 && gSpecialStatuses[i].gemBoost))
|
||||
&& TryTriggerSymbiosis(i, BATTLE_PARTNER(i)))
|
||||
{
|
||||
BestowItem(BATTLE_PARTNER(i), i);
|
||||
@ -8810,7 +8810,7 @@ static bool32 TrySymbiosis(u32 battler, u32 itemId, bool32 moveEnd)
|
||||
&& gBattleStruct->changedItems[battler] == ITEM_NONE
|
||||
&& GetBattlerHoldEffect(battler) != HOLD_EFFECT_EJECT_BUTTON
|
||||
&& GetBattlerHoldEffect(battler) != HOLD_EFFECT_EJECT_PACK
|
||||
&& (B_SYMBIOSIS_GEMS < GEN_7 || !(gSpecialStatuses[battler].gemBoost))
|
||||
&& (GetConfig(CONFIG_SYMBIOSIS_GEMS) < GEN_7 || !(gSpecialStatuses[battler].gemBoost))
|
||||
&& GetMoveEffect(gCurrentMove) != EFFECT_FLING //Fling and damage-reducing berries are handled separately.
|
||||
&& !gSpecialStatuses[battler].berryReduced
|
||||
&& TryTriggerSymbiosis(battler, BATTLE_PARTNER(battler)))
|
||||
|
||||
@ -132,3 +132,49 @@ DOUBLE_BATTLE_TEST("Symbiosis transfers its item to an ally after it consumes a
|
||||
EXPECT_EQ(playerRight->item, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Symbiosis transfers its item after Gem consumption and move execution (Gen7+)")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(GetItemHoldEffect(ITEM_NORMAL_GEM) == HOLD_EFFECT_GEMS);
|
||||
WITH_CONFIG(CONFIG_SYMBIOSIS_GEMS, GEN_7);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_NORMAL_GEM); }
|
||||
PLAYER(SPECIES_ORANGURU) { Ability(ABILITY_SYMBIOSIS); Item(ITEM_TOXIC_ORB); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_SCRATCH, target: opponentLeft); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerLeft);
|
||||
MESSAGE("The Normal Gem strengthened Wobbuffet's power!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, playerLeft);
|
||||
ABILITY_POPUP(playerRight, ABILITY_SYMBIOSIS);
|
||||
STATUS_ICON(playerLeft, STATUS1_TOXIC_POISON);
|
||||
} THEN {
|
||||
EXPECT_EQ(playerLeft->item, ITEM_TOXIC_ORB);
|
||||
EXPECT_EQ(playerRight->item, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Symbiosis transfers its item after Gem consumption, but before move execution (Gen6)")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(GetItemHoldEffect(ITEM_NORMAL_GEM) == HOLD_EFFECT_GEMS);
|
||||
WITH_CONFIG(CONFIG_SYMBIOSIS_GEMS, GEN_6);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_NORMAL_GEM); }
|
||||
PLAYER(SPECIES_ORANGURU) { Ability(ABILITY_SYMBIOSIS); Item(ITEM_TOXIC_ORB); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_SCRATCH, target: opponentLeft); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerLeft);
|
||||
MESSAGE("The Normal Gem strengthened Wobbuffet's power!");
|
||||
ABILITY_POPUP(playerRight, ABILITY_SYMBIOSIS);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, playerLeft);
|
||||
STATUS_ICON(playerLeft, STATUS1_TOXIC_POISON);
|
||||
} THEN {
|
||||
EXPECT_EQ(playerLeft->item, ITEM_TOXIC_ORB);
|
||||
EXPECT_EQ(playerRight->item, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user