Fix Burn Up

Now works properly with and without Parental Bond. It wasn't broken before, but its interaction with Parental Bond was.
This commit is contained in:
BuffelSaft 2021-11-13 12:40:45 +13:00
parent e407883b58
commit 6232b046b1
3 changed files with 10 additions and 21 deletions

View File

@ -814,27 +814,10 @@ BattleScript_EffectBurnUp:
ppreduce
jumpiftype BS_ATTACKER, TYPE_FIRE, BattleScript_BurnUpWorks
goto BattleScript_ButItFailed
BattleScript_BurnUpWorks:
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
losetype BS_ATTACKER, TYPE_FIRE
printstring STRINGID_ATTACKERLOSTFIRETYPE
waitmessage B_WAIT_TIME_LONG
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd
setmoveeffect MOVE_EFFECT_BURN_UP | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_BurnUpRemoveType::
losetype BS_ATTACKER, TYPE_FIRE

View File

@ -358,8 +358,9 @@
#define MOVE_EFFECT_BUG_BITE 0x45
#define MOVE_EFFECT_RECOIL_HP_25 0x46
#define MOVE_EFFECT_RELIC_SONG 0x47
#define MOVE_EFFECT_BURN_UP 0x48
#define NUM_MOVE_EFFECTS 0x48
#define NUM_MOVE_EFFECTS 0x49
#define MOVE_EFFECT_AFFECTS_USER 0x4000
#define MOVE_EFFECT_CERTAIN 0x8000

View File

@ -3443,6 +3443,11 @@ void SetMoveEffect(bool32 primary, u32 certain)
}
}
break;
case MOVE_EFFECT_BURN_UP:
// This seems unnecessary but is done to make it work properly with Parental Bond
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_BurnUpRemoveType;
break;
}
}
}