mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
fix stuff cheeks w new consumeberry impl
This commit is contained in:
parent
f6f4227f49
commit
cdd37ad1bb
@ -1785,8 +1785,9 @@
|
|||||||
various \battler, VARIOUS_TRY_ACTIVATE_GRIM_NEIGH
|
various \battler, VARIOUS_TRY_ACTIVATE_GRIM_NEIGH
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro consumeberry battler:req
|
.macro consumeberry battler:req, frombattler:req
|
||||||
various \battler, VARIOUS_CONSUME_BERRY
|
various \battler, VARIOUS_CONSUME_BERRY
|
||||||
|
.byte \frombattler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro activateitemeffects battler:req
|
.macro activateitemeffects battler:req
|
||||||
|
@ -661,7 +661,7 @@ BattleScript_EffectFlingConsumeBerry:
|
|||||||
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_NO_ANIMATIONS
|
||||||
consumeberry BS_TARGET
|
consumeberry BS_TARGET, TRUE
|
||||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||||
setbyte sBERRY_OVERRIDE, 0
|
setbyte sBERRY_OVERRIDE, 0
|
||||||
restorebattleritem BS_TARGET
|
restorebattleritem BS_TARGET
|
||||||
@ -1058,9 +1058,10 @@ BattleScript_EffectStuffCheeks::
|
|||||||
BattleScript_StuffCheeksEatBerry:
|
BattleScript_StuffCheeksEatBerry:
|
||||||
setbyte sBERRY_OVERRIDE, TRUE
|
setbyte sBERRY_OVERRIDE, TRUE
|
||||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||||
consumeberry BS_ATTACKER
|
consumeberry BS_ATTACKER, TRUE
|
||||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||||
setbyte sBERRY_OVERRIDE, FALSE
|
setbyte sBERRY_OVERRIDE, FALSE
|
||||||
|
removeitem BS_ATTACKER
|
||||||
setstatchanger STAT_DEF, 2, FALSE
|
setstatchanger STAT_DEF, 2, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StuffCheeksEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StuffCheeksEnd
|
||||||
setgraphicalstatchangevalues
|
setgraphicalstatchangevalues
|
||||||
@ -1350,7 +1351,7 @@ BattleScript_MoveEffectBugBite::
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||||
setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries
|
setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries
|
||||||
consumeberry BS_ATTACKER
|
consumeberry BS_ATTACKER, FALSE
|
||||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||||
setbyte sBERRY_OVERRIDE, FALSE
|
setbyte sBERRY_OVERRIDE, FALSE
|
||||||
return
|
return
|
||||||
|
@ -9276,12 +9276,19 @@ static void Cmd_various(void)
|
|||||||
break;
|
break;
|
||||||
case VARIOUS_CONSUME_BERRY:
|
case VARIOUS_CONSUME_BERRY:
|
||||||
if (gBattleScripting.overrideBerryRequirements == 2)
|
if (gBattleScripting.overrideBerryRequirements == 2)
|
||||||
break;
|
{
|
||||||
|
gBattlescriptCurrInstr += 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gBattlescriptCurrInstr[3])
|
||||||
|
gLastUsedItem = gBattleMons[gActiveBattler].item;
|
||||||
|
|
||||||
gBattleScripting.battler = gEffectBattler = gBattlerTarget = gActiveBattler; // Cover all berry effect battlerId cases. e.g. ChangeStatBuffs uses target ID
|
gBattleScripting.battler = gEffectBattler = gBattlerTarget = gActiveBattler; // Cover all berry effect battlerId cases. e.g. ChangeStatBuffs uses target ID
|
||||||
if (ItemBattleEffects(ITEMEFFECT_USE_LAST_ITEM, gActiveBattler, FALSE))
|
if (ItemBattleEffects(ITEMEFFECT_USE_LAST_ITEM, gActiveBattler, FALSE))
|
||||||
return;
|
return;
|
||||||
break;
|
gBattlescriptCurrInstr += 4;
|
||||||
|
return;
|
||||||
case VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL:
|
case VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL:
|
||||||
{
|
{
|
||||||
bool8 canDoPrimalReversion = FALSE;
|
bool8 canDoPrimalReversion = FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user