Fix Mirror Armor and Sticky Web interaction (#4713)

* fix Mirror Armor and Sticky Web interaction

* fix strings
This commit is contained in:
sneed 2024-06-03 22:19:54 +03:00 committed by GitHub
parent 6dc8b82e92
commit e60e6b6008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -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::

View File

@ -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!");
}
}
}
}