From 6232b046b1f0e140880f99cfcb993381533b594a Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Sat, 13 Nov 2021 12:40:45 +1300 Subject: [PATCH] Fix Burn Up Now works properly with and without Parental Bond. It wasn't broken before, but its interaction with Parental Bond was. --- data/battle_scripts_1.s | 23 +++-------------------- include/constants/battle.h | 3 ++- src/battle_script_commands.c | 5 +++++ 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index a11510689..0353c9133 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -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 diff --git a/include/constants/battle.h b/include/constants/battle.h index 6b8698720..5a95d1853 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -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 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index a4a3f39e0..f8548f522 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -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; } } }