add HITMARKER_DISABLE_ANIMATION for bug bite consumeberry (#3607)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com> Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
parent
b72581985c
commit
8c4058c7a8
3 changed files with 16 additions and 15 deletions
|
@ -749,10 +749,10 @@ BattleScript_TeatimeLoop:
|
||||||
jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb
|
jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb
|
||||||
jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor
|
jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor
|
||||||
jumpifteainvulnerable BS_TARGET, BattleScript_Teatimevul @ in semi-invulnerable state OR held item is not a Berry
|
jumpifteainvulnerable BS_TARGET, BattleScript_Teatimevul @ in semi-invulnerable state OR held item is not a Berry
|
||||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
orword gHitMarker, HITMARKER_DISABLE_ANIMATION | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
||||||
setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries
|
setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries
|
||||||
consumeberry BS_TARGET, TRUE @ consume the berry, then restore the item from changedItems
|
consumeberry BS_TARGET, TRUE @ consume the berry, then restore the item from changedItems
|
||||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
bicword gHitMarker, HITMARKER_DISABLE_ANIMATION | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
||||||
setbyte sBERRY_OVERRIDE, FALSE
|
setbyte sBERRY_OVERRIDE, FALSE
|
||||||
removeitem BS_TARGET
|
removeitem BS_TARGET
|
||||||
moveendto MOVEEND_NEXT_TARGET
|
moveendto MOVEEND_NEXT_TARGET
|
||||||
|
@ -1052,9 +1052,9 @@ BattleScript_EffectFlingConsumeBerry:
|
||||||
savebattleritem BS_TARGET
|
savebattleritem BS_TARGET
|
||||||
battleritemtolastuseditem BS_TARGET
|
battleritemtolastuseditem BS_TARGET
|
||||||
setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries
|
setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries
|
||||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
orword gHitMarker, HITMARKER_DISABLE_ANIMATION
|
||||||
consumeberry BS_TARGET, TRUE
|
consumeberry BS_TARGET, TRUE
|
||||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
bicword gHitMarker, HITMARKER_DISABLE_ANIMATION
|
||||||
setbyte sBERRY_OVERRIDE, 0
|
setbyte sBERRY_OVERRIDE, 0
|
||||||
restorebattleritem BS_TARGET
|
restorebattleritem BS_TARGET
|
||||||
BattleScript_FlingEnd:
|
BattleScript_FlingEnd:
|
||||||
|
@ -1327,9 +1327,9 @@ BattleScript_EffectStuffCheeks::
|
||||||
waitanimation
|
waitanimation
|
||||||
BattleScript_StuffCheeksEatBerry:
|
BattleScript_StuffCheeksEatBerry:
|
||||||
setbyte sBERRY_OVERRIDE, 1
|
setbyte sBERRY_OVERRIDE, 1
|
||||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
orword gHitMarker, HITMARKER_DISABLE_ANIMATION
|
||||||
consumeberry BS_ATTACKER, TRUE
|
consumeberry BS_ATTACKER, TRUE
|
||||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
bicword gHitMarker, HITMARKER_DISABLE_ANIMATION
|
||||||
setbyte sBERRY_OVERRIDE, 0
|
setbyte sBERRY_OVERRIDE, 0
|
||||||
removeitem BS_ATTACKER
|
removeitem BS_ATTACKER
|
||||||
setstatchanger STAT_DEF, 2, FALSE
|
setstatchanger STAT_DEF, 2, FALSE
|
||||||
|
@ -1593,11 +1593,11 @@ BattleScript_MoveEffectIncinerate::
|
||||||
BattleScript_MoveEffectBugBite::
|
BattleScript_MoveEffectBugBite::
|
||||||
printstring STRINGID_BUGBITE
|
printstring STRINGID_BUGBITE
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
orword gHitMarker, HITMARKER_DISABLE_ANIMATION
|
||||||
setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries
|
setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries
|
||||||
savetarget
|
savetarget
|
||||||
consumeberry BS_ATTACKER, FALSE
|
consumeberry BS_ATTACKER, FALSE
|
||||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
bicword gHitMarker, HITMARKER_DISABLE_ANIMATION
|
||||||
setbyte sBERRY_OVERRIDE, 0
|
setbyte sBERRY_OVERRIDE, 0
|
||||||
trysymbiosis
|
trysymbiosis
|
||||||
restoretarget
|
restoretarget
|
||||||
|
|
|
@ -193,7 +193,7 @@
|
||||||
#define HITMARKER_WAKE_UP_CLEAR (1 << 4) // Cleared when waking up. Never set or checked.
|
#define HITMARKER_WAKE_UP_CLEAR (1 << 4) // Cleared when waking up. Never set or checked.
|
||||||
#define HITMARKER_SKIP_DMG_TRACK (1 << 5)
|
#define HITMARKER_SKIP_DMG_TRACK (1 << 5)
|
||||||
#define HITMARKER_DESTINYBOND (1 << 6)
|
#define HITMARKER_DESTINYBOND (1 << 6)
|
||||||
#define HITMARKER_NO_ANIMATIONS (1 << 7)
|
#define HITMARKER_NO_ANIMATIONS (1 << 7) // set from battleSceneOff. Never changed during battle
|
||||||
#define HITMARKER_IGNORE_SUBSTITUTE (1 << 8)
|
#define HITMARKER_IGNORE_SUBSTITUTE (1 << 8)
|
||||||
#define HITMARKER_NO_ATTACKSTRING (1 << 9)
|
#define HITMARKER_NO_ATTACKSTRING (1 << 9)
|
||||||
#define HITMARKER_ATTACKSTRING_PRINTED (1 << 10)
|
#define HITMARKER_ATTACKSTRING_PRINTED (1 << 10)
|
||||||
|
@ -203,6 +203,7 @@
|
||||||
#define HITMARKER_SYNCHRONISE_EFFECT (1 << 14)
|
#define HITMARKER_SYNCHRONISE_EFFECT (1 << 14)
|
||||||
#define HITMARKER_RUN (1 << 15)
|
#define HITMARKER_RUN (1 << 15)
|
||||||
#define HITMARKER_IGNORE_DISGUISE (1 << 16)
|
#define HITMARKER_IGNORE_DISGUISE (1 << 16)
|
||||||
|
#define HITMARKER_DISABLE_ANIMATION (1 << 17) // disable animations during battle scripts, e.g. for Bug Bite
|
||||||
// 3 free spots because of change in handling of UNDERGROUND/UNDERWATER/ON AIR
|
// 3 free spots because of change in handling of UNDERGROUND/UNDERWATER/ON AIR
|
||||||
#define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19)
|
#define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19)
|
||||||
#define HITMARKER_PASSIVE_DAMAGE (1 << 20)
|
#define HITMARKER_PASSIVE_DAMAGE (1 << 20)
|
||||||
|
|
|
@ -2159,7 +2159,7 @@ static void Cmd_attackanimation(void)
|
||||||
if (gBattleControllerExecFlags)
|
if (gBattleControllerExecFlags)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((gHitMarker & HITMARKER_NO_ANIMATIONS)
|
if ((gHitMarker & (HITMARKER_NO_ANIMATIONS | HITMARKER_DISABLE_ANIMATION))
|
||||||
&& gCurrentMove != MOVE_TRANSFORM
|
&& gCurrentMove != MOVE_TRANSFORM
|
||||||
&& gCurrentMove != MOVE_SUBSTITUTE
|
&& gCurrentMove != MOVE_SUBSTITUTE
|
||||||
// In a wild double battle gotta use the teleport animation if two wild pokemon are alive.
|
// In a wild double battle gotta use the teleport animation if two wild pokemon are alive.
|
||||||
|
@ -4920,7 +4920,7 @@ static void PlayAnimation(u32 battler, u8 animId, const u16 *argPtr, const u8 *n
|
||||||
MarkBattlerForControllerExec(battler);
|
MarkBattlerForControllerExec(battler);
|
||||||
gBattlescriptCurrInstr = nextInstr;
|
gBattlescriptCurrInstr = nextInstr;
|
||||||
}
|
}
|
||||||
else if (gHitMarker & HITMARKER_NO_ANIMATIONS && animId != B_ANIM_RESTORE_BG)
|
else if (gHitMarker & (HITMARKER_NO_ANIMATIONS | HITMARKER_DISABLE_ANIMATION) && animId != B_ANIM_RESTORE_BG)
|
||||||
{
|
{
|
||||||
BattleScriptPush(nextInstr);
|
BattleScriptPush(nextInstr);
|
||||||
gBattlescriptCurrInstr = BattleScript_Pausex20;
|
gBattlescriptCurrInstr = BattleScript_Pausex20;
|
||||||
|
@ -5502,7 +5502,7 @@ static void Cmd_moveend(void)
|
||||||
break;
|
break;
|
||||||
case MOVEEND_ATTACKER_INVISIBLE: // make attacker sprite invisible
|
case MOVEEND_ATTACKER_INVISIBLE: // make attacker sprite invisible
|
||||||
if (gStatuses3[gBattlerAttacker] & (STATUS3_SEMI_INVULNERABLE)
|
if (gStatuses3[gBattlerAttacker] & (STATUS3_SEMI_INVULNERABLE)
|
||||||
&& gHitMarker & HITMARKER_NO_ANIMATIONS)
|
&& gHitMarker & (HITMARKER_NO_ANIMATIONS | HITMARKER_DISABLE_ANIMATION))
|
||||||
{
|
{
|
||||||
BtlController_EmitSpriteInvisibility(gBattlerAttacker, BUFFER_A, TRUE);
|
BtlController_EmitSpriteInvisibility(gBattlerAttacker, BUFFER_A, TRUE);
|
||||||
MarkBattlerForControllerExec(gBattlerAttacker);
|
MarkBattlerForControllerExec(gBattlerAttacker);
|
||||||
|
@ -7446,7 +7446,7 @@ static void Cmd_statusanimation(void)
|
||||||
u32 battler = GetBattlerForBattleScript(cmd->battler);
|
u32 battler = GetBattlerForBattleScript(cmd->battler);
|
||||||
if (!(gStatuses3[battler] & STATUS3_SEMI_INVULNERABLE)
|
if (!(gStatuses3[battler] & STATUS3_SEMI_INVULNERABLE)
|
||||||
&& gDisableStructs[battler].substituteHP == 0
|
&& gDisableStructs[battler].substituteHP == 0
|
||||||
&& !(gHitMarker & HITMARKER_NO_ANIMATIONS))
|
&& !(gHitMarker & (HITMARKER_NO_ANIMATIONS | HITMARKER_DISABLE_ANIMATION)))
|
||||||
{
|
{
|
||||||
BtlController_EmitStatusAnimation(battler, BUFFER_A, FALSE, gBattleMons[battler].status1);
|
BtlController_EmitStatusAnimation(battler, BUFFER_A, FALSE, gBattleMons[battler].status1);
|
||||||
MarkBattlerForControllerExec(battler);
|
MarkBattlerForControllerExec(battler);
|
||||||
|
@ -7465,7 +7465,7 @@ static void Cmd_status2animation(void)
|
||||||
u32 status2ToAnim = cmd->status2;
|
u32 status2ToAnim = cmd->status2;
|
||||||
if (!(gStatuses3[battler] & STATUS3_SEMI_INVULNERABLE)
|
if (!(gStatuses3[battler] & STATUS3_SEMI_INVULNERABLE)
|
||||||
&& gDisableStructs[battler].substituteHP == 0
|
&& gDisableStructs[battler].substituteHP == 0
|
||||||
&& !(gHitMarker & HITMARKER_NO_ANIMATIONS))
|
&& !(gHitMarker & (HITMARKER_NO_ANIMATIONS | HITMARKER_DISABLE_ANIMATION)))
|
||||||
{
|
{
|
||||||
BtlController_EmitStatusAnimation(battler, BUFFER_A, TRUE, gBattleMons[battler].status2 & status2ToAnim);
|
BtlController_EmitStatusAnimation(battler, BUFFER_A, TRUE, gBattleMons[battler].status2 & status2ToAnim);
|
||||||
MarkBattlerForControllerExec(battler);
|
MarkBattlerForControllerExec(battler);
|
||||||
|
@ -7484,7 +7484,7 @@ static void Cmd_chosenstatusanimation(void)
|
||||||
u32 wantedStatus = cmd->status;
|
u32 wantedStatus = cmd->status;
|
||||||
if (!(gStatuses3[battler] & STATUS3_SEMI_INVULNERABLE)
|
if (!(gStatuses3[battler] & STATUS3_SEMI_INVULNERABLE)
|
||||||
&& gDisableStructs[battler].substituteHP == 0
|
&& gDisableStructs[battler].substituteHP == 0
|
||||||
&& !(gHitMarker & HITMARKER_NO_ANIMATIONS))
|
&& !(gHitMarker & (HITMARKER_NO_ANIMATIONS | HITMARKER_DISABLE_ANIMATION)))
|
||||||
{
|
{
|
||||||
BtlController_EmitStatusAnimation(battler, BUFFER_A, cmd->isStatus2, wantedStatus);
|
BtlController_EmitStatusAnimation(battler, BUFFER_A, cmd->isStatus2, wantedStatus);
|
||||||
MarkBattlerForControllerExec(battler);
|
MarkBattlerForControllerExec(battler);
|
||||||
|
|
Loading…
Reference in a new issue