Handled Mimicry's interaction with Steel Roller's effect

This commit is contained in:
LOuroboros 2021-11-03 21:04:34 -03:00
parent f6628e301f
commit b931e34172
4 changed files with 13 additions and 0 deletions

View File

@ -1883,6 +1883,10 @@
.4byte \ptr
.endm
.macro trytorevertmimicry
various BS_ATTACKER, VARIOUS_TRY_TO_REVERT_MIMICRY
.endm
@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7

View File

@ -660,6 +660,7 @@ BattleScript_EffectRemoveTerrain:
resultmessage
waitmessage B_WAIT_TIME_LONG
removeterrain
trytorevertmimicry
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 4, BattleScript_MoveEnd
printfromtable gTerrainEndingStringIds
waitmessage B_WAIT_TIME_LONG

View File

@ -199,6 +199,7 @@
#define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 126
#define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 127
#define VARIOUS_TRY_TO_APPLY_MIMICRY 128
#define VARIOUS_TRY_TO_REVERT_MIMICRY 129
// Cmd_manipulatedamage
#define DMG_CHANGE_SIGN 0

View File

@ -9039,6 +9039,13 @@ static void Cmd_various(void)
gBattlescriptCurrInstr += 7;
return;
}
case VARIOUS_TRY_TO_REVERT_MIMICRY:
for (i = 0; i < gBattlersCount; i++)
{
if (GetBattlerAbility(i) == ABILITY_MIMICRY)
RestoreBattlerOriginalTypes(i);
}
break;
}
gBattlescriptCurrInstr += 3;