mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +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
|
||||
.endm
|
||||
|
||||
.macro consumeberry battler:req
|
||||
.macro consumeberry battler:req, frombattler:req
|
||||
various \battler, VARIOUS_CONSUME_BERRY
|
||||
.byte \frombattler
|
||||
.endm
|
||||
|
||||
.macro activateitemeffects battler:req
|
||||
|
@ -661,7 +661,7 @@ BattleScript_EffectFlingConsumeBerry:
|
||||
battleritemtolastuseditem BS_TARGET
|
||||
setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries
|
||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
consumeberry BS_TARGET
|
||||
consumeberry BS_TARGET, TRUE
|
||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
setbyte sBERRY_OVERRIDE, 0
|
||||
restorebattleritem BS_TARGET
|
||||
@ -1058,9 +1058,10 @@ BattleScript_EffectStuffCheeks::
|
||||
BattleScript_StuffCheeksEatBerry:
|
||||
setbyte sBERRY_OVERRIDE, TRUE
|
||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
consumeberry BS_ATTACKER
|
||||
consumeberry BS_ATTACKER, TRUE
|
||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
setbyte sBERRY_OVERRIDE, FALSE
|
||||
removeitem BS_ATTACKER
|
||||
setstatchanger STAT_DEF, 2, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StuffCheeksEnd
|
||||
setgraphicalstatchangevalues
|
||||
@ -1350,7 +1351,7 @@ BattleScript_MoveEffectBugBite::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries
|
||||
consumeberry BS_ATTACKER
|
||||
consumeberry BS_ATTACKER, FALSE
|
||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
setbyte sBERRY_OVERRIDE, FALSE
|
||||
return
|
||||
|
@ -9276,12 +9276,19 @@ static void Cmd_various(void)
|
||||
break;
|
||||
case VARIOUS_CONSUME_BERRY:
|
||||
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
|
||||
if (ItemBattleEffects(ITEMEFFECT_USE_LAST_ITEM, gActiveBattler, FALSE))
|
||||
return;
|
||||
break;
|
||||
gBattlescriptCurrInstr += 4;
|
||||
return;
|
||||
case VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL:
|
||||
{
|
||||
bool8 canDoPrimalReversion = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user