add throat spray
This commit is contained in:
parent
d5d2cac60c
commit
db6f9d05ec
4 changed files with 70 additions and 40 deletions
|
@ -5616,6 +5616,21 @@ BattleScript_TargetItemStatRaise::
|
|||
removeitem BS_TARGET
|
||||
BattleScript_TargetItemStatRaiseRemoveItemRet:
|
||||
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::
|
||||
pause 0x20
|
||||
|
|
|
@ -350,5 +350,6 @@ extern const u8 BattleScript_EmergencyExitWild[];
|
|||
extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
|
||||
extern const u8 BattleScript_CheekPouchActivates[];
|
||||
extern const u8 BattleScript_AnnounceAirLockCloudNine[];
|
||||
extern const u8 BattleScript_AttackerItemStatRaise[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
|
|
@ -5007,18 +5007,21 @@ static void Cmd_moveend(void)
|
|||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
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};
|
||||
SortBattlersBySpeed
|
||||
}
|
||||
|
||||
BattleScript_ForceRandomSwitch
|
||||
|
||||
BattleScript_ForceRandomSwitch*/
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_RED_CARD:
|
||||
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_EJECT_PACK:
|
||||
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_LIFE_ORB:
|
||||
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_LIFE_ORB
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
|
|
|
@ -5738,44 +5738,55 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||
}
|
||||
break;
|
||||
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:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& (Random() % 100) < atkHoldEffectParam
|
||||
&& 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;
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_FLINCH;
|
||||
BattleScriptPushCursor();
|
||||
SetMoveEffect(FALSE, 0);
|
||||
BattleScriptPop();
|
||||
}
|
||||
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;
|
||||
case ITEMEFFECT_TARGET:
|
||||
|
|
Loading…
Reference in a new issue