mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Adrenaline Orb
This commit is contained in:
parent
d56aaf7c0b
commit
40ce053ce1
@ -1741,6 +1741,10 @@
|
||||
.byte \battler2
|
||||
.endm
|
||||
|
||||
.macro setlastuseditem battler:req
|
||||
various \battler, VARIOUS_SET_LAST_USED_ITEM
|
||||
.endm
|
||||
|
||||
@ helpful macros
|
||||
.macro setstatchanger stat:req, stages:req, down:req
|
||||
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
||||
|
@ -6626,6 +6626,22 @@ BattleScript_82DB4AF::
|
||||
printstring STRINGID_PKMNTRANSFORMED
|
||||
waitmessage 0x40
|
||||
return
|
||||
|
||||
BattleScript_TryAdrenalineOrb:
|
||||
jumpifnoholdeffect BS_TARGET, HOLD_EFFECT_ADRENALINE_ORB, BattleScript_TryAdrenalineOrbRet
|
||||
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPEED, 12, BattleScript_TryAdrenalineOrbRet
|
||||
setstatchanger STAT_SPEED, 1, FALSE
|
||||
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_TryAdrenalineOrbRet
|
||||
playanimation BS_TARGET, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
copybyte sBATTLER, gBattlerTarget
|
||||
setlastuseditem BS_TARGET
|
||||
printstring STRINGID_USINGXTHEYOFZN
|
||||
waitmessage 0x40
|
||||
removeitem BS_TARGET
|
||||
BattleScript_TryAdrenalineOrbRet:
|
||||
return
|
||||
|
||||
BattleScript_IntimidateActivatesEnd3::
|
||||
call BattleScript_PauseIntimidateActivates
|
||||
@ -6635,9 +6651,9 @@ BattleScript_PauseIntimidateActivates:
|
||||
pause 0x20
|
||||
BattleScript_IntimidateActivates::
|
||||
setbyte gBattlerTarget, 0x0
|
||||
setstatchanger STAT_ATK, 1, TRUE
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_IntimidateActivatesLoop:
|
||||
setstatchanger STAT_ATK, 1, TRUE
|
||||
trygetintimidatetarget BattleScript_IntimidateActivatesReturn
|
||||
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_IntimidateActivatesLoopIncrement
|
||||
jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented
|
||||
@ -6649,6 +6665,7 @@ BattleScript_IntimidateActivatesLoop:
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printstring STRINGID_PKMNCUTSATTACKWITH
|
||||
waitmessage 0x40
|
||||
call BattleScript_TryAdrenalineOrb
|
||||
BattleScript_IntimidateActivatesLoopIncrement:
|
||||
addbyte gBattlerTarget, 0x1
|
||||
goto BattleScript_IntimidateActivatesLoop
|
||||
@ -6658,6 +6675,7 @@ BattleScript_IntimidatePrevented:
|
||||
pause 0x20
|
||||
printstring STRINGID_PREVENTEDFROMWORKING
|
||||
waitmessage 0x40
|
||||
call BattleScript_TryAdrenalineOrb
|
||||
goto BattleScript_IntimidateActivatesLoopIncrement
|
||||
|
||||
BattleScript_DroughtActivates::
|
||||
|
@ -159,6 +159,7 @@
|
||||
#define VARIOUS_HANDLE_TYPE_IMMUNITY 96
|
||||
#define VARIOUS_JUMP_IF_NO_HOLD_EFFECT 97
|
||||
#define VARIOUS_INFATUATE_WITH_BATTLER 98
|
||||
#define VARIOUS_SET_LAST_USED_ITEM 99
|
||||
|
||||
// Cmd_manipulatedamage
|
||||
#define DMG_CHANGE_SIGN 0
|
||||
|
@ -6856,6 +6856,9 @@ static void Cmd_various(void)
|
||||
gBattleMons[gActiveBattler].status2 |= STATUS2_INFATUATED_WITH(GetBattlerForBattleScript(gBattlescriptCurrInstr[3]));
|
||||
gBattlescriptCurrInstr += 4;
|
||||
return;
|
||||
case VARIOUS_SET_LAST_USED_ITEM:
|
||||
gLastUsedItem = gBattleMons[gActiveBattler].item;
|
||||
break;
|
||||
case VARIOUS_TRY_FAIRY_LOCK:
|
||||
if (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user