mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 12:07:38 +01:00
Implemented Stench's battle effect
And updated its description.
This commit is contained in:
parent
d270dee6bc
commit
9f83c9b574
@ -706,6 +706,43 @@ void HandleAction_ActionFinished(void)
|
||||
|
||||
// rom const data
|
||||
|
||||
static const u8 sMovesNotAffectedByStench[] =
|
||||
{
|
||||
[MOVE_AIR_SLASH] = 1,
|
||||
[MOVE_ASTONISH] = 1,
|
||||
[MOVE_BITE] = 1,
|
||||
[MOVE_BONE_CLUB] = 1,
|
||||
[MOVE_DARK_PULSE] = 1,
|
||||
[MOVE_DOUBLE_IRON_BASH] = 1,
|
||||
[MOVE_DRAGON_RUSH] = 1,
|
||||
[MOVE_EXTRASENSORY] = 1,
|
||||
[MOVE_FAKE_OUT] = 1,
|
||||
[MOVE_FIERY_WRATH] = 1,
|
||||
[MOVE_FIRE_FANG] = 1,
|
||||
[MOVE_FLING] = 1,
|
||||
[MOVE_FLOATY_FALL] = 1,
|
||||
[MOVE_HEADBUTT] = 1,
|
||||
[MOVE_HEART_STAMP] = 1,
|
||||
[MOVE_HYPER_FANG] = 1,
|
||||
[MOVE_ICE_FANG] = 1,
|
||||
[MOVE_ICICLE_CRASH] = 1,
|
||||
[MOVE_IRON_HEAD] = 1,
|
||||
[MOVE_NEEDLE_ARM] = 1,
|
||||
[MOVE_NONE] = 1,
|
||||
[MOVE_ROCK_SLIDE] = 1,
|
||||
[MOVE_ROLLING_KICK] = 1,
|
||||
[MOVE_SECRET_POWER] = 1,
|
||||
[MOVE_SKY_ATTACK] = 1,
|
||||
[MOVE_SNORE] = 1,
|
||||
[MOVE_STEAMROLLER] = 1,
|
||||
[MOVE_STOMP] = 1,
|
||||
[MOVE_THUNDER_FANG] = 1,
|
||||
[MOVE_TWISTER] = 1,
|
||||
[MOVE_WATERFALL] = 1,
|
||||
[MOVE_ZEN_HEADBUTT] = 1,
|
||||
[MOVE_ZING_ZAP] = 1,
|
||||
};
|
||||
|
||||
static const u8 sAbilitiesAffectedByMoldBreaker[] =
|
||||
{
|
||||
[ABILITY_BATTLE_ARMOR] = 1,
|
||||
@ -4807,6 +4844,21 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_STENCH:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& gBattleMons[gBattlerTarget].hp != 0
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& (Random() % 10) == 0
|
||||
&& !IS_MOVE_STATUS(move)
|
||||
&& !sMovesNotAffectedByStench[gCurrentMove])
|
||||
{
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_FLINCH;
|
||||
BattleScriptPushCursor();
|
||||
SetMoveEffect(FALSE, 0);
|
||||
BattleScriptPop();
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_MOVE_END_OTHER: // Abilities that activate on *another* battler's moveend: Dancer, Soul-Heart, Receiver, Symbiosis
|
||||
|
@ -1,5 +1,5 @@
|
||||
static const u8 sNoneDescription[] = _("No special ability.");
|
||||
static const u8 sStenchDescription[] = _("Helps repel wild POKéMON.");
|
||||
static const u8 sStenchDescription[] = _("May cause a foe to flinch.");
|
||||
static const u8 sDrizzleDescription[] = _("Summons rain in battle.");
|
||||
static const u8 sSpeedBoostDescription[] = _("Gradually boosts Speed.");
|
||||
static const u8 sBattleArmorDescription[] = _("Blocks critical hits.");
|
||||
|
Loading…
Reference in New Issue
Block a user