diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 4744292486..d838029648 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -2417,6 +2417,43 @@ Move_CIRCLE_THROW: end Move_INCINERATE: + loadspritegfx ANIM_TAG_SMALL_EMBER + monbg ANIM_TARGET + monbgprio_28 ANIM_TARGET + setalpha 12, 8 + delay 1 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + playsewithpan SE_W172, SOUND_PAN_ATTACKER + createvisualtask AnimTask_SwayMon, 5, 0, 3, 0xc00, 8, ANIM_TARGET + createvisualtask AnimTask_SwayMon, 5, 0, 3, 0xc00, 8, ANIM_DEF_PARTNER + delay 3 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + delay 3 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + playsewithpan SE_W172, SOUND_PAN_ATTACKER + delay 3 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + delay 3 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + playsewithpan SE_W172, SOUND_PAN_ATTACKER + delay 3 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + delay 3 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + playsewithpan SE_W172, SOUND_PAN_ATTACKER + delay 3 + createsprite gIncinerateSpriteTemplate, ANIM_TARGET, 2, 6, 20, 0, -16, 24, 20 + delay 5 + createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 8, 1 + createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 5, 0, 8, 1 + createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_TARGET, RGB_RED, 12, 1, 1 + createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_DEF_PARTNER, RGB_RED, 12, 1, 1 + playsewithpan SE_W172, SOUND_PAN_ATTACKER + delay 5 + createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 3, 0, 0, 9 + waitforvisualfinish + clearmonbg ANIM_TARGET + blendoff end Move_QUASH: diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 808d2733c0..8416d89398 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -353,6 +353,16 @@ gBattleScriptsForMoveEffects:: @ 82D86A8 .4byte BattleScript_EffectLaserFocus .4byte BattleScript_EffectMagneticFlux .4byte BattleScript_EffectGearUp + .4byte BattleScript_EffectIncinerate + +BattleScript_EffectIncinerate: + setmoveeffect MOVE_EFFECT_INCINERATE | MOVE_EFFECT_CERTAIN + goto BattleScript_EffectHit + +BattleScript_MoveEffectIncinerate:: + printstring STRINGID_INCINERATEBURN + waitmessage 0x40 + return BattleScript_EffectCoreEnforcer: setmoveeffect MOVE_EFFECT_CORE_ENFORCER | MOVE_EFFECT_CERTAIN diff --git a/include/battle_scripts.h b/include/battle_scripts.h index b5b57f855c..8b5e3c18d8 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -321,5 +321,6 @@ extern const u8 BattleScript_AirBaloonMsgPop[]; extern const u8 BattleScript_ItemHurtRet[]; extern const u8 BattleScript_ToxicOrb[]; extern const u8 BattleScript_FlameOrb[]; +extern const u8 BattleScript_MoveEffectIncinerate[]; #endif // GUARD_BATTLE_SCRIPTS_H diff --git a/include/constants/battle.h b/include/constants/battle.h index 42b80d173f..c36da4753a 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -330,6 +330,7 @@ #define MOVE_EFFECT_HAPPY_HOUR 0x41 #define MOVE_EFFECT_CORE_ENFORCER 0x42 #define MOVE_EFFECT_THROAT_CHOP 0x43 +#define MOVE_EFFECT_INCINERATE 0x44 #define MOVE_EFFECT_AFFECTS_USER 0x4000 #define MOVE_EFFECT_CERTAIN 0x8000 diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 4d8b8b222b..778b24b01d 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -341,5 +341,6 @@ #define EFFECT_LASER_FOCUS 335 #define EFFECT_MAGNETIC_FLUX 336 #define EFFECT_GEAR_UP 337 +#define EFFECT_INCINERATE 338 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 711512edf4..49cf4836da 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -537,6 +537,7 @@ #define STRINGID_TARGETATEITEM 533 #define STRINGID_AIRBALLOONFLOAT 534 #define STRINGID_AIRBALLOONPOP 535 +#define STRINGID_INCINERATEBURN 536 #define BATTLESTRINGS_COUNT 530 diff --git a/src/battle_message.c b/src/battle_message.c index e98a20798c..7a23c2ba37 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -662,9 +662,11 @@ static const u8 sText_BerryDmgReducing[] = _("{B_LAST_ITEM} weakened the damage\ static const u8 sText_TargetAteItem[] = _("{B_DEF_NAME_WITH_PREFIX} ate its {B_LAST_ITEM}!"); static const u8 sText_AirBalloonFloat[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} floats in the air\nwith its {B_LAST_ITEM}!"); static const u8 sText_AirBalloonPop[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_LAST_ITEM} popped!"); +static const u8 sText_IncinerateBurn[] = _("{B_EFF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nwas burnt up!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_INCINERATEBURN - 12] = sText_IncinerateBurn, [STRINGID_AIRBALLOONPOP - 12] = sText_AirBalloonPop, [STRINGID_AIRBALLOONFLOAT - 12] = sText_AirBalloonFloat, [STRINGID_TARGETATEITEM - 12] = sText_TargetAteItem, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ae2cb028f9..aaea462f96 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2876,6 +2876,19 @@ void SetMoveEffect(bool32 primary, u32 certain) gDisableStructs[gEffectBattler].throatChopTimer = 2; gBattlescriptCurrInstr++; break; + case MOVE_EFFECT_INCINERATE: + if (GetBattlerHoldEffect(gEffectBattler, FALSE) == HOLD_EFFECT_GEMS + || (gBattleMons[gEffectBattler].item >= FIRST_BERRY_INDEX && gBattleMons[gEffectBattler].item <= LAST_BERRY_INDEX)) + { + gLastUsedItem = gBattleMons[gEffectBattler].item; + gBattleMons[gEffectBattler].item = 0; + gActiveBattler = gEffectBattler; + BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gEffectBattler].item); + MarkBattlerForControllerExec(gActiveBattler); + BattleScriptPush(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_MoveEffectIncinerate; + } + break; } } } diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index dec05ad6c0..c74a57ed4d 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -7153,7 +7153,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_INCINERATE] = { - .effect = EFFECT_PLACEHOLDER, // Needs a custom move effect + .effect = EFFECT_INCINERATE, .power = 60, .type = TYPE_FIRE, .accuracy = 100, diff --git a/src/fire.c b/src/fire.c index d428dc13be..969d16a418 100644 --- a/src/fire.c +++ b/src/fire.c @@ -256,6 +256,30 @@ const struct SpriteTemplate gEmberFlareSpriteTemplate = .callback = AnimEmberFlare, }; +const union AnimCmd gIncinerateAnim1[] = +{ + ANIMCMD_FRAME(0, 2), + ANIMCMD_FRAME(16, 4), + ANIMCMD_FRAME(32, 2), + ANIMCMD_JUMP(0), +}; + +const union AnimCmd *const gIncinerateAnims[] = +{ + gIncinerateAnim1, +}; + +const struct SpriteTemplate gIncinerateSpriteTemplate = +{ + .tileTag = ANIM_TAG_SMALL_EMBER, + .paletteTag = ANIM_TAG_SMALL_EMBER, + .oam = &gUnknown_08524914, + .anims = gIncinerateAnims, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = TranslateAnimSpriteToTargetMonLocation, +}; + const struct SpriteTemplate gUnknown_08595504 = { .tileTag = ANIM_TAG_SMALL_EMBER, @@ -653,7 +677,7 @@ void AnimFireRing(struct Sprite *sprite) } static void AnimFireRingStep1(struct Sprite *sprite) -{ +{ UpdateFireRingCircleOffset(sprite); if (++sprite->data[0] == 0x12) @@ -713,7 +737,7 @@ static void UpdateFireRingCircleOffset(struct Sprite *sprite) // arg 1: initial y pixel offset // arg 2: duration // arg 3: x delta -// arg 4: y delta +// arg 4: y delta // AnimFireCross(struct Sprite *sprite) static void AnimFireCross(struct Sprite *sprite) { @@ -1093,7 +1117,7 @@ static void sub_8109AFC(struct Sprite *sprite) case 2: sprite->pos2.x = Sin(sprite->data[2], sprite->data[4]); sprite->data[2] = (sprite->data[2] + 4) & 0xFF; - + if (++sprite->data[3] == 31) { sprite->pos1.x += sprite->pos2.x;