mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Turned Stone Axe's and Ceaseless Edge's effects into MOVE_EFFECTs
This commit is contained in:
parent
7e398ce80e
commit
72566e6323
@ -441,14 +441,18 @@ BattleScript_EffectStoneAxe::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
seteffectwithchance
|
||||
tryfaintmon BS_TARGET
|
||||
setstealthrock BattleScript_ButItFailed
|
||||
printstring STRINGID_POINTEDSTONESFLOAT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setmoveeffect MOVE_EFFECT_STEALTH_ROCK
|
||||
seteffectprimary
|
||||
moveendall
|
||||
end
|
||||
|
||||
BattleScript_StealthRockActivates::
|
||||
setstealthrock BattleScript_MoveEnd
|
||||
printstring STRINGID_POINTEDSTONESFLOAT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectDireClaw::
|
||||
setmoveeffect MOVE_EFFECT_DIRE_CLAW
|
||||
goto BattleScript_EffectHit
|
||||
@ -472,14 +476,18 @@ BattleScript_EffectCeaselessEdge::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
seteffectwithchance
|
||||
tryfaintmon BS_TARGET
|
||||
trysetspikes BattleScript_ButItFailedAtkStringPpReduce
|
||||
printstring STRINGID_SPIKESSCATTERED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setmoveeffect MOVE_EFFECT_SPIKES
|
||||
seteffectprimary
|
||||
moveendall
|
||||
end
|
||||
|
||||
BattleScript_SpikesActivate::
|
||||
trysetspikes BattleScript_MoveEnd
|
||||
printstring STRINGID_SPIKESSCATTERED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectTeatime::
|
||||
attackcanceler
|
||||
attackstring
|
||||
|
@ -448,6 +448,8 @@ extern const u8 BattleScript_SupremeOverlordActivates[];
|
||||
extern const u8 BattleScript_CostarActivates[];
|
||||
extern const u8 BattleScript_ToxicDebrisActivates[];
|
||||
extern const u8 BattleScript_EarthEaterActivates[];
|
||||
extern const u8 BattleScript_StealthRockActivates[];
|
||||
extern const u8 BattleScript_SpikesActivate[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
@ -372,8 +372,10 @@
|
||||
#define MOVE_EFFECT_TRAP_BOTH 70
|
||||
#define MOVE_EFFECT_DOUBLE_SHOCK 71
|
||||
#define MOVE_EFFECT_DIRE_CLAW 72
|
||||
#define MOVE_EFFECT_STEALTH_ROCK 73
|
||||
#define MOVE_EFFECT_SPIKES 74
|
||||
|
||||
#define NUM_MOVE_EFFECTS 73
|
||||
#define NUM_MOVE_EFFECTS 75
|
||||
|
||||
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
||||
#define MOVE_EFFECT_CERTAIN 0x8000
|
||||
|
@ -2789,6 +2789,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
bool32 mirrorArmorReflected = (GetBattlerAbility(gBattlerTarget) == ABILITY_MIRROR_ARMOR);
|
||||
u32 flags = 0;
|
||||
u16 battlerAbility;
|
||||
bool8 activateAfterFaint = FALSE;
|
||||
|
||||
if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_1ST_HIT
|
||||
&& gBattleMons[gBattlerTarget].hp != 0
|
||||
@ -2806,6 +2807,10 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
gBattleStruct->moveEffect2 = gBattleScripting.moveEffect;
|
||||
gBattlescriptCurrInstr++;
|
||||
return;
|
||||
case MOVE_EFFECT_STEALTH_ROCK:
|
||||
case MOVE_EFFECT_SPIKES:
|
||||
activateAfterFaint = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (gBattleScripting.moveEffect & MOVE_EFFECT_AFFECTS_USER)
|
||||
@ -2838,6 +2843,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
INCREMENT_RESET_RETURN
|
||||
|
||||
if (gBattleMons[gEffectBattler].hp == 0
|
||||
&& !activateAfterFaint
|
||||
&& gBattleScripting.moveEffect != MOVE_EFFECT_PAYDAY
|
||||
&& gBattleScripting.moveEffect != MOVE_EFFECT_STEAL_ITEM
|
||||
&& gBattleScripting.moveEffect != MOVE_EFFECT_BUG_BITE)
|
||||
@ -3659,6 +3665,20 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
SetMoveEffect(TRUE, 0);
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_STEALTH_ROCK:
|
||||
if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_STEALTH_ROCK))
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_StealthRockActivates;
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_SPIKES:
|
||||
if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_SPIKES))
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_SpikesActivate;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user