mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
add throat spray
This commit is contained in:
parent
d5d2cac60c
commit
db6f9d05ec
@ -5616,6 +5616,21 @@ BattleScript_TargetItemStatRaise::
|
|||||||
removeitem BS_TARGET
|
removeitem BS_TARGET
|
||||||
BattleScript_TargetItemStatRaiseRemoveItemRet:
|
BattleScript_TargetItemStatRaiseRemoveItemRet:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_AttackerItemStatRaise::
|
||||||
|
copybyte sBATTLER, gBattlerAttacker
|
||||||
|
statbuffchange 0, BattleScript_AttackerItemStatRaiseRet
|
||||||
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackerItemStatRaiseRet
|
||||||
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||||
|
waitanimation
|
||||||
|
setgraphicalstatchangevalues
|
||||||
|
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_USINGXTHEYOFZN
|
||||||
|
waitmessage 0x40
|
||||||
|
removeitem BS_ATTACKER
|
||||||
|
BattleScript_AttackerItemStatRaiseRet:
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_MistProtected::
|
BattleScript_MistProtected::
|
||||||
pause 0x20
|
pause 0x20
|
||||||
|
@ -350,5 +350,6 @@ extern const u8 BattleScript_EmergencyExitWild[];
|
|||||||
extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
|
extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
|
||||||
extern const u8 BattleScript_CheekPouchActivates[];
|
extern const u8 BattleScript_CheekPouchActivates[];
|
||||||
extern const u8 BattleScript_AnnounceAirLockCloudNine[];
|
extern const u8 BattleScript_AnnounceAirLockCloudNine[];
|
||||||
|
extern const u8 BattleScript_AttackerItemStatRaise[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -5007,18 +5007,21 @@ static void Cmd_moveend(void)
|
|||||||
gBattleScripting.moveendState++;
|
gBattleScripting.moveendState++;
|
||||||
break;
|
break;
|
||||||
case MOVEEND_EJECT_BUTTON:
|
case MOVEEND_EJECT_BUTTON:
|
||||||
if (gCurrentMove != MOVE_DRAGON_TAIL && gCurrentMove != MOVE_CIRCLE_THROW)
|
/*if (gCurrentMove != MOVE_DRAGON_TAIL && gCurrentMove != MOVE_CIRCLE_THROW)
|
||||||
{
|
{
|
||||||
u8 battlers[4] = {0, 1, 2, 3};
|
u8 battlers[4] = {0, 1, 2, 3};
|
||||||
SortBattlersBySpeed
|
SortBattlersBySpeed
|
||||||
}
|
}
|
||||||
|
|
||||||
BattleScript_ForceRandomSwitch
|
BattleScript_ForceRandomSwitch*/
|
||||||
|
gBattleScripting.moveendState++;
|
||||||
|
break;
|
||||||
case MOVEEND_RED_CARD:
|
case MOVEEND_RED_CARD:
|
||||||
|
gBattleScripting.moveendState++;
|
||||||
|
break;
|
||||||
case MOVEEND_EJECT_PACK:
|
case MOVEEND_EJECT_PACK:
|
||||||
|
gBattleScripting.moveendState++;
|
||||||
|
break;
|
||||||
case MOVEEND_LIFE_ORB:
|
case MOVEEND_LIFE_ORB:
|
||||||
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LIFE_ORB
|
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LIFE_ORB
|
||||||
&& IsBattlerAlive(gBattlerAttacker)
|
&& IsBattlerAlive(gBattlerAttacker)
|
||||||
|
@ -5738,44 +5738,55 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEMEFFECT_KINGSROCK_SHELLBELL:
|
case ITEMEFFECT_KINGSROCK_SHELLBELL:
|
||||||
if (gBattleMoveDamage)
|
switch (atkHoldEffect)
|
||||||
{
|
{
|
||||||
switch (atkHoldEffect)
|
case HOLD_EFFECT_FLINCH:
|
||||||
|
if (gBattleMoveDamage != 0 // need to have done damage
|
||||||
|
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
|
&& TARGET_TURN_DAMAGED
|
||||||
|
&& (Random() % 100) < atkHoldEffectParam
|
||||||
|
&& gBattleMoves[gCurrentMove].flags & FLAG_KINGSROCK_AFFECTED
|
||||||
|
&& gBattleMons[gBattlerTarget].hp)
|
||||||
{
|
{
|
||||||
case HOLD_EFFECT_FLINCH:
|
gBattleScripting.moveEffect = MOVE_EFFECT_FLINCH;
|
||||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
BattleScriptPushCursor();
|
||||||
&& TARGET_TURN_DAMAGED
|
SetMoveEffect(FALSE, 0);
|
||||||
&& (Random() % 100) < atkHoldEffectParam
|
BattleScriptPop();
|
||||||
&& gBattleMoves[gCurrentMove].flags & FLAG_KINGSROCK_AFFECTED
|
|
||||||
&& gBattleMons[gBattlerTarget].hp)
|
|
||||||
{
|
|
||||||
gBattleScripting.moveEffect = MOVE_EFFECT_FLINCH;
|
|
||||||
BattleScriptPushCursor();
|
|
||||||
SetMoveEffect(FALSE, 0);
|
|
||||||
BattleScriptPop();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case HOLD_EFFECT_SHELL_BELL:
|
|
||||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
|
||||||
&& gSpecialStatuses[gBattlerTarget].dmg != 0
|
|
||||||
&& gSpecialStatuses[gBattlerTarget].dmg != 0xFFFF
|
|
||||||
&& gBattlerAttacker != gBattlerTarget
|
|
||||||
&& gBattleMons[gBattlerAttacker].hp != gBattleMons[gBattlerAttacker].maxHP
|
|
||||||
&& gBattleMons[gBattlerAttacker].hp != 0)
|
|
||||||
{
|
|
||||||
gLastUsedItem = atkItem;
|
|
||||||
gPotentialItemEffectBattler = gBattlerAttacker;
|
|
||||||
gBattleScripting.battler = gBattlerAttacker;
|
|
||||||
gBattleMoveDamage = (gSpecialStatuses[gBattlerTarget].dmg / atkHoldEffectParam) * -1;
|
|
||||||
if (gBattleMoveDamage == 0)
|
|
||||||
gBattleMoveDamage = -1;
|
|
||||||
gSpecialStatuses[gBattlerTarget].dmg = 0;
|
|
||||||
BattleScriptPushCursor();
|
|
||||||
gBattlescriptCurrInstr = BattleScript_ItemHealHP_Ret;
|
|
||||||
effect++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case HOLD_EFFECT_SHELL_BELL:
|
||||||
|
if (gBattleMoveDamage != 0 // need to have done damage
|
||||||
|
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
|
&& gSpecialStatuses[gBattlerTarget].dmg != 0
|
||||||
|
&& gSpecialStatuses[gBattlerTarget].dmg != 0xFFFF
|
||||||
|
&& gBattlerAttacker != gBattlerTarget
|
||||||
|
&& gBattleMons[gBattlerAttacker].hp != gBattleMons[gBattlerAttacker].maxHP
|
||||||
|
&& gBattleMons[gBattlerAttacker].hp != 0)
|
||||||
|
{
|
||||||
|
gLastUsedItem = atkItem;
|
||||||
|
gPotentialItemEffectBattler = gBattlerAttacker;
|
||||||
|
gBattleScripting.battler = gBattlerAttacker;
|
||||||
|
gBattleMoveDamage = (gSpecialStatuses[gBattlerTarget].dmg / atkHoldEffectParam) * -1;
|
||||||
|
if (gBattleMoveDamage == 0)
|
||||||
|
gBattleMoveDamage = -1;
|
||||||
|
gSpecialStatuses[gBattlerTarget].dmg = 0;
|
||||||
|
BattleScriptPushCursor();
|
||||||
|
gBattlescriptCurrInstr = BattleScript_ItemHealHP_Ret;
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HOLD_EFFECT_THROAT_SPRAY: // doesn't need to be a damaging move
|
||||||
|
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
|
&& gBattleMons[gBattlerAttacker].hp != 0
|
||||||
|
&& gBattleMoves[gCurrentMove].flags & FLAG_SOUND)
|
||||||
|
{
|
||||||
|
gLastUsedItem = atkItem;
|
||||||
|
gBattleScripting.statChanger = SET_STATCHANGER(STAT_SPATK, 1, FALSE);
|
||||||
|
effect = ITEM_STATS_CHANGE;
|
||||||
|
BattleScriptPushCursor();
|
||||||
|
gBattlescriptCurrInstr = BattleScript_AttackerItemStatRaise;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEMEFFECT_TARGET:
|
case ITEMEFFECT_TARGET:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user