mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-05 02:40:56 +01:00
Add Fell Stinger
This commit is contained in:
parent
d991d669da
commit
f51812d0fe
@ -1389,6 +1389,10 @@
|
|||||||
various \battler, VARIOUS_TRY_ACTIVATE_MOXIE
|
various \battler, VARIOUS_TRY_ACTIVATE_MOXIE
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro tryactivatefellstinger battler
|
||||||
|
various \battler, VARIOUS_TRY_ACTIVATE_FELL_STINGER
|
||||||
|
.endm
|
||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat, stages, down
|
.macro setstatchanger stat, stages, down
|
||||||
setbyte sSTATCHANGER \stat | \stages << 4 | \down << 7
|
setbyte sSTATCHANGER \stat | \stages << 4 | \down << 7
|
||||||
|
@ -155,7 +155,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
|||||||
.4byte BattleScript_EffectDefenseUpHit
|
.4byte BattleScript_EffectDefenseUpHit
|
||||||
.4byte BattleScript_EffectAttackUpHit
|
.4byte BattleScript_EffectAttackUpHit
|
||||||
.4byte BattleScript_EffectAllStatsUpHit
|
.4byte BattleScript_EffectAllStatsUpHit
|
||||||
.4byte BattleScript_EffectUnused8d
|
.4byte BattleScript_EffectFellStinger
|
||||||
.4byte BattleScript_EffectBellyDrum
|
.4byte BattleScript_EffectBellyDrum
|
||||||
.4byte BattleScript_EffectPsychUp
|
.4byte BattleScript_EffectPsychUp
|
||||||
.4byte BattleScript_EffectMirrorCoat
|
.4byte BattleScript_EffectMirrorCoat
|
||||||
@ -590,7 +590,7 @@ BattleScript_EffectUnused60:
|
|||||||
BattleScript_EffectFalseSwipe:
|
BattleScript_EffectFalseSwipe:
|
||||||
BattleScript_EffectAlwaysCrit:
|
BattleScript_EffectAlwaysCrit:
|
||||||
BattleScript_EffectPursuit:
|
BattleScript_EffectPursuit:
|
||||||
BattleScript_EffectUnused8d:
|
BattleScript_EffectFellStinger:
|
||||||
BattleScript_EffectPlaceholder209:
|
BattleScript_EffectPlaceholder209:
|
||||||
BattleScript_EffectHit::
|
BattleScript_EffectHit::
|
||||||
BattleScript_EffectLowKick:
|
BattleScript_EffectLowKick:
|
||||||
@ -3202,6 +3202,7 @@ BattleScript_FaintTarget::
|
|||||||
cleareffectsonfaint BS_TARGET
|
cleareffectsonfaint BS_TARGET
|
||||||
printstring STRINGID_TARGETFAINTED
|
printstring STRINGID_TARGETFAINTED
|
||||||
tryactivatemoxie BS_ATTACKER
|
tryactivatemoxie BS_ATTACKER
|
||||||
|
tryactivatefellstinger BS_ATTACKER
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_GiveExp::
|
BattleScript_GiveExp::
|
||||||
@ -4829,6 +4830,16 @@ BattleScript_AttackerAbilityStatRaise::
|
|||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_FellStingerRaisesStat::
|
||||||
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_FellStingerRaisesAtkEnd
|
||||||
|
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_FellStingerRaisesAtkEnd
|
||||||
|
setgraphicalstatchangevalues
|
||||||
|
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
|
printfromtable gStatUpStringIds
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_FellStingerRaisesAtkEnd:
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_AttackerAbilityStatRaiseEnd3::
|
BattleScript_AttackerAbilityStatRaiseEnd3::
|
||||||
call BattleScript_AttackerAbilityStatRaise
|
call BattleScript_AttackerAbilityStatRaise
|
||||||
end3
|
end3
|
||||||
|
@ -321,5 +321,6 @@ extern const u8 BattleScript_SolarPowerActivates[];
|
|||||||
extern const u8 BattleScript_CursedBodyActivates[];
|
extern const u8 BattleScript_CursedBodyActivates[];
|
||||||
extern const u8 BattleScript_MummyActivates[];
|
extern const u8 BattleScript_MummyActivates[];
|
||||||
extern const u8 BattleScript_WeakArmorActivates[];
|
extern const u8 BattleScript_WeakArmorActivates[];
|
||||||
|
extern const u8 BattleScript_FellStingerRaisesStat[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
#define EFFECT_DEFENSE_UP_HIT 138
|
#define EFFECT_DEFENSE_UP_HIT 138
|
||||||
#define EFFECT_ATTACK_UP_HIT 139
|
#define EFFECT_ATTACK_UP_HIT 139
|
||||||
#define EFFECT_ALL_STATS_UP_HIT 140
|
#define EFFECT_ALL_STATS_UP_HIT 140
|
||||||
#define EFFECT_UNUSED_8D 141
|
#define EFFECT_FELL_STINGER 141
|
||||||
#define EFFECT_BELLY_DRUM 142
|
#define EFFECT_BELLY_DRUM 142
|
||||||
#define EFFECT_PSYCH_UP 143
|
#define EFFECT_PSYCH_UP 143
|
||||||
#define EFFECT_MIRROR_COAT 144
|
#define EFFECT_MIRROR_COAT 144
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
#define VARIOUS_CLEAR_STATUS 32
|
#define VARIOUS_CLEAR_STATUS 32
|
||||||
#define VARIOUS_RESTORE_PP 33
|
#define VARIOUS_RESTORE_PP 33
|
||||||
#define VARIOUS_TRY_ACTIVATE_MOXIE 34
|
#define VARIOUS_TRY_ACTIVATE_MOXIE 34
|
||||||
|
#define VARIOUS_TRY_ACTIVATE_FELL_STINGER 35
|
||||||
|
|
||||||
// atk80, dmg manipulation
|
// atk80, dmg manipulation
|
||||||
#define ATK80_DMG_CHANGE_SIGN 0
|
#define ATK80_DMG_CHANGE_SIGN 0
|
||||||
|
@ -6784,7 +6784,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_GEN6] =
|
|||||||
.split = SPLIT_STATUS,
|
.split = SPLIT_STATUS,
|
||||||
},
|
},
|
||||||
{ // MOVE_FELL_STINGER
|
{ // MOVE_FELL_STINGER
|
||||||
.effect = EFFECT_PLACEHOLDER_209,
|
.effect = EFFECT_FELL_STINGER,
|
||||||
.power = 50,
|
.power = 50,
|
||||||
.type = TYPE_BUG,
|
.type = TYPE_BUG,
|
||||||
.accuracy = 100,
|
.accuracy = 100,
|
||||||
|
@ -6160,6 +6160,20 @@ static void atk75_useitemonopponent(void)
|
|||||||
gBattlescriptCurrInstr += 1;
|
gBattlescriptCurrInstr += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool32 HasAttackerFaintedTarget(void)
|
||||||
|
{
|
||||||
|
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
|
&& gBattleMoves[gCurrentMove].power != 0
|
||||||
|
&& (gLastHitBy[gBattlerTarget] == 0xFF || gLastHitBy[gBattlerTarget] == gBattlerAttacker)
|
||||||
|
&& gBattleStruct->moveTarget[gBattlerAttacker] == gBattlerTarget
|
||||||
|
&& gBattlerTarget != gBattlerAttacker
|
||||||
|
&& gCurrentTurnActionNumber == GetBattlerTurnOrderNum(gBattlerAttacker)
|
||||||
|
&& gChosenMove == gChosenMoveByBattler[gBattlerAttacker])
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static void atk76_various(void)
|
static void atk76_various(void)
|
||||||
{
|
{
|
||||||
u8 side;
|
u8 side;
|
||||||
@ -6372,10 +6386,7 @@ static void atk76_various(void)
|
|||||||
break;
|
break;
|
||||||
case VARIOUS_TRY_ACTIVATE_MOXIE:
|
case VARIOUS_TRY_ACTIVATE_MOXIE:
|
||||||
if (GetBattlerAbility(gActiveBattler) == ABILITY_MOXIE
|
if (GetBattlerAbility(gActiveBattler) == ABILITY_MOXIE
|
||||||
&& (gLastHitBy[gBattlerTarget] == 0xFF || gLastHitBy[gBattlerTarget] == gBattlerAttacker)
|
&& HasAttackerFaintedTarget()
|
||||||
&& gBattleStruct->moveTarget[gBattlerAttacker] == gBattlerTarget
|
|
||||||
&& gBattlerTarget != gBattlerAttacker
|
|
||||||
&& gCurrentTurnActionNumber == GetBattlerTurnOrderNum(gBattlerAttacker)
|
|
||||||
&& !IsBattleLostForPlayer()
|
&& !IsBattleLostForPlayer()
|
||||||
&& !IsBattleWonForPlayer()
|
&& !IsBattleWonForPlayer()
|
||||||
&& gBattleMons[gBattlerAttacker].statStages[STAT_ATK] != 0xC)
|
&& gBattleMons[gBattlerAttacker].statStages[STAT_ATK] != 0xC)
|
||||||
@ -6388,6 +6399,24 @@ static void atk76_various(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case VARIOUS_TRY_ACTIVATE_FELL_STINGER:
|
||||||
|
if (gBattleMoves[gCurrentMove].effect == EFFECT_FELL_STINGER
|
||||||
|
&& HasAttackerFaintedTarget()
|
||||||
|
&& !IsBattleLostForPlayer()
|
||||||
|
&& !IsBattleWonForPlayer()
|
||||||
|
&& gBattleMons[gBattlerAttacker].statStages[STAT_ATK] != 0xC)
|
||||||
|
{
|
||||||
|
if (gBattleMons[gBattlerAttacker].statStages[STAT_ATK] >= 0xB)
|
||||||
|
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
||||||
|
else
|
||||||
|
SET_STATCHANGER(STAT_ATK, 2, FALSE);
|
||||||
|
|
||||||
|
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK);
|
||||||
|
BattleScriptPush(gBattlescriptCurrInstr + 3);
|
||||||
|
gBattlescriptCurrInstr = BattleScript_FellStingerRaisesStat;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 3;
|
gBattlescriptCurrInstr += 3;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user