Fixes Defiant interaction with Court Changed Sticky Web + Fickle Beam description (#5093)

* Fixes Court Changed Sticky Web deactivating Defiant/Competitive

* Fixes Fickle Beam's description

* Alternative fix

* Remove extra newLine
This commit is contained in:
PhallenTree 2024-08-06 09:45:30 +01:00 committed by GitHub
parent 9e9825853e
commit 67f049fddb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 62 additions and 3 deletions

View File

@ -6356,6 +6356,7 @@ BattleScript_StickyWebOnSwitchInPrintStatMsg:
BattleScript_StickyWebOnSwitchInEnd:
restoretarget
restoreattacker
setbyte sSTICKY_WEB_STAT_DROP, 0
return
BattleScript_PerishSongTakesLife::

View File

@ -1137,7 +1137,6 @@ void PrepareStringBattle(u16 stringId, u32 battler)
&& ((gSpecialStatuses[gBattlerTarget].changedStatsBattlerId != gBattlerTarget) || gBattleScripting.stickyWebStatDrop == 1)
&& !(gBattleScripting.stickyWebStatDrop == 1 && gSideTimers[targetSide].stickyWebBattlerSide == targetSide)) // Sticky Web must have been set by the foe
{
gBattleScripting.stickyWebStatDrop = 0;
gBattlerAbility = gBattlerTarget;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_AbilityRaisesDefenderStat;

View File

@ -20420,8 +20420,8 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
{
.name = COMPOUND_STRING("Fickle Beam"),
.description = COMPOUND_STRING(
"Shoots a beam of light. Sometimes\n"
"twice as strong."),
"Shoots a beam of light.\n"
"Sometimes twice as strong."),
.effect = EFFECT_FICKLE_BEAM,
.power = 80,
.type = TYPE_DRAGON,

View File

@ -139,6 +139,65 @@ SINGLE_BATTLE_TEST("Defiant activates after Sticky Web lowers Speed")
}
}
SINGLE_BATTLE_TEST("Defiant doesn't activate after Sticky Web lowers Speed if Court Changed")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_MANKEY) { Ability(ABILITY_DEFIANT); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_STICKY_WEB); MOVE(opponent, MOVE_COURT_CHANGE); }
TURN { SWITCH(player, 1); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_STICKY_WEB, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_COURT_CHANGE, opponent);
// Switch-in - Sticky Web activates
SEND_IN_MESSAGE("Mankey");
MESSAGE("Mankey was caught in a Sticky Web!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Mankey's Speed fell!");
// Defiant doesn't activate
NONE_OF {
ABILITY_POPUP(player, ABILITY_DEFIANT);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Mankey's Attack sharply rose!");
}
}
}
SINGLE_BATTLE_TEST("Defiant correctly activates after Sticky Web lowers Speed if Court Changed")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_MANKEY) { Ability(ABILITY_DEFIANT); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_STICKY_WEB); MOVE(opponent, MOVE_COURT_CHANGE); }
TURN { SWITCH(player, 1); }
TURN { MOVE(opponent, MOVE_GROWL);}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_STICKY_WEB, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_COURT_CHANGE, opponent);
// Switch-in - Sticky Web activates
SEND_IN_MESSAGE("Mankey");
MESSAGE("Mankey was caught in a Sticky Web!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Mankey's Speed fell!");
// Defiant doesn't activate
NONE_OF {
ABILITY_POPUP(player, ABILITY_DEFIANT);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Mankey's Attack sharply rose!");
}
// Defiant triggers correctly after Sticky Web
ANIMATION(ANIM_TYPE_MOVE, MOVE_GROWL, opponent);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Mankey's Attack fell!");
ABILITY_POPUP(player, ABILITY_DEFIANT);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Mankey's Attack sharply rose!");
}
}
DOUBLE_BATTLE_TEST("Defiant is activated by Cotton Down for non-ally pokemon")
{