From e60e6b600839eac03098436bd234642936310bff Mon Sep 17 00:00:00 2001 From: sneed <56992013+Sneed69@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:19:54 +0300 Subject: [PATCH] Fix Mirror Armor and Sticky Web interaction (#4713) * fix Mirror Armor and Sticky Web interaction * fix strings --- data/battle_scripts_1.s | 5 ++++- test/battle/move_effect/sticky_web.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 1e4bf43ebc..b85aac1825 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3213,7 +3213,8 @@ BattleScript_MirrorArmorReflectStickyWeb: call BattleScript_AbilityPopUp setattackertostickywebuser jumpifbyteequal gBattlerAttacker, gBattlerTarget, BattleScript_StickyWebOnSwitchInEnd @ Sticky web user not on field -> no stat loss - goto BattleScript_MirrorArmorReflectStatLoss + call BattleScript_MirrorArmorReflectStatLoss + goto BattleScript_StickyWebOnSwitchInEnd BattleScript_StatDown:: playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 @@ -6338,6 +6339,7 @@ BattleScript_ToxicSpikesPoisoned:: BattleScript_StickyWebOnSwitchIn:: savetarget + saveattacker copybyte gBattlerTarget, sBATTLER setbyte sSTICKY_WEB_STAT_DROP, 1 printstring STRINGID_STICKYWEBSWITCHIN @@ -6356,6 +6358,7 @@ BattleScript_StickyWebOnSwitchInPrintStatMsg: waitmessage B_WAIT_TIME_LONG BattleScript_StickyWebOnSwitchInEnd: restoretarget + restoreattacker return BattleScript_PerishSongTakesLife:: diff --git a/test/battle/move_effect/sticky_web.c b/test/battle/move_effect/sticky_web.c index e3c96ca2fa..80ab04b469 100644 --- a/test/battle/move_effect/sticky_web.c +++ b/test/battle/move_effect/sticky_web.c @@ -129,8 +129,14 @@ DOUBLE_BATTLE_TEST("Sticky Web has correct interactions with Mirror Armor - the ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, BATTLER_OPPONENT); if (opponentSetUpper == 0) { MESSAGE("Foe Caterpie's Speed fell!"); + NONE_OF { + MESSAGE("Foe Caterpie was caught in a Sticky Web!"); + } } else { MESSAGE("Foe Weedle's Speed fell!"); + NONE_OF { + MESSAGE("Foe Weedle was caught in a Sticky Web!"); + } } } }