mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Beak Blast
This commit is contained in:
parent
7799e49e3a
commit
0202b75822
@ -1774,6 +1774,10 @@
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro setbeakblast battler:req
|
||||
various \battler, VARIOUS_SET_BEAK_BLAST
|
||||
.endm
|
||||
|
||||
@ helpful macros
|
||||
.macro setstatchanger stat:req, stages:req, down:req
|
||||
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
||||
|
@ -822,6 +822,7 @@ gBattleAnims_General::
|
||||
.4byte General_SlideOffScreen @ B_ANIM_SLIDE_OFFSCREEN
|
||||
.4byte General_RestoreBg @ B_ANIM_RESTORE_BG
|
||||
.4byte General_TotemFlare @ B_ANIM_TOTEM_FLARE
|
||||
.4byte General_BeakBlastSetUp @ B_ANIM_BEAK_BLAST_SETUP
|
||||
|
||||
.align 2
|
||||
gBattleAnims_Special::
|
||||
@ -11673,7 +11674,7 @@ Move_INSTRUCT::
|
||||
blendoff
|
||||
end
|
||||
|
||||
Move_BEAK_BLAST::
|
||||
General_BeakBlastSetUp:
|
||||
loadspritegfx ANIM_TAG_SMALL_EMBER @Fire
|
||||
playsewithpan SE_M_DRAGON_RAGE, SOUND_PAN_ATTACKER
|
||||
delay 0x3
|
||||
@ -11681,7 +11682,7 @@ Move_BEAK_BLAST::
|
||||
launchtemplate gFireSpiralOutwardSpriteTemplate 0x3 0x4 0x0 0x0 0x38 0x0
|
||||
waitforvisualfinish
|
||||
end
|
||||
BeakBlastUnleash:
|
||||
Move_BEAK_BLAST::
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_ATK 0x2 0x0 0x9 0x1F
|
||||
waitforvisualfinish
|
||||
|
@ -374,7 +374,37 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectMeteorBeam
|
||||
.4byte BattleScript_EffectRisingVoltage
|
||||
.4byte BattleScript_EffectCorrosiveGas
|
||||
.4byte BattleScript_EffectBeakBlast
|
||||
|
||||
BattleScript_EffectBeakBlast::
|
||||
attackcanceler
|
||||
jumpifnodamage BattleScript_HitFromAccCheck
|
||||
ppreduce
|
||||
printstring STRINGID_PKMNLOSTFOCUS
|
||||
waitmessage 0x40
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_BeakBlastSetUp::
|
||||
setbeakblast BS_ATTACKER
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
waitmessage 0x1
|
||||
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
|
||||
printstring STRINGID_HEATUPBEAK
|
||||
waitmessage 0x40
|
||||
end2
|
||||
|
||||
BattleScript_BeakBlastBurn::
|
||||
jumpifstatus BS_TARGET, STATUS1_BURN, BattleScript_AlreadyBurned
|
||||
jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected
|
||||
jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_BeakBlastBurnReturn
|
||||
setmoveeffect MOVE_EFFECT_BURN | MOVE_EFFECT_AFFECTS_USER
|
||||
seteffectprimary
|
||||
BattleScript_BeakBlastBurnReturn:
|
||||
return
|
||||
BattleScript_EffectCorrosiveGas::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||
|
@ -144,6 +144,7 @@ struct ProtectStruct
|
||||
u32 usedThroatChopPreventedMove:1;
|
||||
u32 micle:1;
|
||||
u32 custap:1; // also quick claw
|
||||
u32 beakBlastCharge:1;
|
||||
u32 physicalDmg;
|
||||
u32 specialDmg;
|
||||
u8 physicalBattlerId;
|
||||
|
@ -370,5 +370,7 @@ extern const u8 BattleScript_NotAffectedAbilityPopUp[];
|
||||
extern const u8 BattleScript_BattlerShookOffTaunt[];
|
||||
extern const u8 BattleScript_BattlerGotOverItsInfatuation[];
|
||||
extern const u8 BattleScript_MeltedItem[];
|
||||
extern const u8 BattleScript_BeakBlastSetUp[];
|
||||
extern const u8 BattleScript_BeakBlastBurn[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
@ -523,6 +523,7 @@
|
||||
#define B_ANIM_SLIDE_OFFSCREEN 26 // for Emergency Exit
|
||||
#define B_ANIM_RESTORE_BG 27 // for Terrain Endings
|
||||
#define B_ANIM_TOTEM_FLARE 28 // Totem boosts aura flare
|
||||
#define B_ANIM_BEAK_BLAST_SETUP 29
|
||||
|
||||
// special animations table (gBattleAnims_Special)
|
||||
#define B_ANIM_LVL_UP 0
|
||||
|
@ -358,7 +358,8 @@
|
||||
#define EFFECT_METEOR_BEAM 352
|
||||
#define EFFECT_RISING_VOLTAGE 353
|
||||
#define EFFECT_CORROSIVE_GAS 354
|
||||
#define EFFECT_BEAK_BLAST 355
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 355
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 356
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -174,6 +174,7 @@
|
||||
#define VARIOUS_TOTEM_BOOST 103
|
||||
#define VARIOUS_TRY_ACTIVATE_GRIM_NEIGH 104
|
||||
#define VARIOUS_TRY_SET_CORROSIVE_GAS 105
|
||||
#define VARIOUS_SET_BEAK_BLAST 106
|
||||
|
||||
// Cmd_manipulatedamage
|
||||
#define DMG_CHANGE_SIGN 0
|
||||
|
@ -573,8 +573,9 @@
|
||||
#define STRINGID_PKMNINSNAPTRAP 569
|
||||
#define STRINGID_METEORBEAMCHARGING 570
|
||||
#define STRINGID_ITEMMELTED 571
|
||||
#define STRINGID_HEATUPBEAK 572
|
||||
|
||||
#define BATTLESTRINGS_COUNT 572
|
||||
#define BATTLESTRINGS_COUNT 573
|
||||
|
||||
// The below IDs are all indexes into battle message tables,
|
||||
// used to determine which of a set of messages to print.
|
||||
|
@ -4598,13 +4598,19 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
||||
{
|
||||
gActiveBattler = gBattlerAttacker = gBattleStruct->focusPunchBattlerId;
|
||||
gBattleStruct->focusPunchBattlerId++;
|
||||
if (gChosenMoveByBattler[gActiveBattler] == MOVE_FOCUS_PUNCH
|
||||
&& !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
|
||||
if (!(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
|
||||
&& !(gDisableStructs[gBattlerAttacker].truantCounter)
|
||||
&& !(gProtectStructs[gActiveBattler].noValidMoves))
|
||||
{
|
||||
BattleScriptExecute(BattleScript_FocusPunchSetUp);
|
||||
return;
|
||||
switch(gChosenMoveByBattler[gActiveBattler])
|
||||
{
|
||||
case MOVE_FOCUS_PUNCH:
|
||||
BattleScriptExecute(BattleScript_FocusPunchSetUp);
|
||||
return;
|
||||
case MOVE_BEAK_BLAST:
|
||||
BattleScriptExecute(BattleScript_BeakBlastSetUp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -699,9 +699,11 @@ static const u8 sText_PkmnShookOffTheTaunt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX
|
||||
static const u8 sText_PkmnGotOverItsInfatuation[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} got over\nits infatuation!");
|
||||
static const u8 sText_MeteorBeamCharging[] = _("{B_ATK_NAME_WITH_PREFIX} is overflowing\nwith space energy!");
|
||||
static const u8 sText_PkmnItemMelted[] = _("{B_ATK_NAME_WITH_PREFIX} corroded\n{B_DEF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}!");
|
||||
static const u8 sText_HeatingUpBeak[] = _("{B_ATK_NAME_WITH_PREFIX} started\nheating up its beak!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_HEATUPBEAK - 12] = sText_HeatingUpBeak,
|
||||
[STRINGID_ITEMMELTED - 12] = sText_PkmnItemMelted,
|
||||
[STRINGID_METEORBEAMCHARGING - 12] = sText_MeteorBeamCharging,
|
||||
[STRINGID_PKMNINSNAPTRAP - 12] = sText_PkmnInSnapTrap,
|
||||
|
@ -4807,6 +4807,12 @@ static void Cmd_moveend(void)
|
||||
gBattlescriptCurrInstr = BattleScript_BanefulBunkerEffect;
|
||||
effect = 1;
|
||||
}
|
||||
else if (gProtectStructs[gBattlerTarget].beakBlastCharge)
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_BeakBlastBurn;
|
||||
effect = 1;
|
||||
}
|
||||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
@ -7867,6 +7873,7 @@ static void Cmd_various(void)
|
||||
case MOVE_MIRROR_COAT:
|
||||
case MOVE_METAL_BURST:
|
||||
case MOVE_ME_FIRST:
|
||||
case MOVE_BEAK_BLAST:
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
break;
|
||||
default:
|
||||
@ -8457,6 +8464,9 @@ static void Cmd_various(void)
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
}
|
||||
return;
|
||||
case VARIOUS_SET_BEAK_BLAST:
|
||||
gProtectStructs[gActiveBattler].beakBlastCharge = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr += 3;
|
||||
|
@ -10127,7 +10127,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
|
||||
[MOVE_BEAK_BLAST] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER,
|
||||
.effect = EFFECT_BEAK_BLAST,
|
||||
.power = 100,
|
||||
.type = TYPE_FLYING,
|
||||
.accuracy = 100,
|
||||
|
Loading…
Reference in New Issue
Block a user