neutralizing gas switchout

This commit is contained in:
ghoulslash 2021-10-30 09:13:08 -04:00
parent 28bc7dc14d
commit 4b0325dbe4
2 changed files with 11 additions and 3 deletions

View file

@ -8916,13 +8916,20 @@ BattleScript_DarkTypePreventsPrankster::
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
goto BattleScript_MoveEnd
sByteFour:
.byte MAX_BATTLERS_COUNT
BattleScript_NeutralizingGasExits::
savetarget
pause B_WAIT_TIME_SHORT
printstring STRINGID_NEUTRALIZINGGASOVER
waitmessage B_WAIT_TIME_LONG
setbyte gBattlerTarget, 0
BattleScript_NeutralizingGasExitsLoop:
jumpifbyteequal gEffectBattler, gBattlerTarget, BattleScript_NeutralizingGasExitsIncrement @ skip over battler switching out
switchinabilities BS_TARGET
BattleScript_NeutralizingGasExitsIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_NeutralizingGasExitsLoop
jumpifbytenotequal gBattlerTarget, sByteFour, BattleScript_NeutralizingGasExitsLoop @ SOMEHOW, comparing to gBattlersCount is problematic.
restoretarget
return

View file

@ -12293,8 +12293,9 @@ static void Cmd_switchoutabilities(void)
if (gBattleMons[gActiveBattler].ability == ABILITY_NEUTRALIZING_GAS)
{
gBattleMons[gActiveBattler].ability = 0;
BattleScriptPushCursor();
gBattleMons[gActiveBattler].ability = ABILITY_NONE;
gEffectBattler = gActiveBattler;
BattleScriptPush(gBattlescriptCurrInstr);
gBattlescriptCurrInstr = BattleScript_NeutralizingGasExits;
}
else