mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
Merge pull request #1863 from LOuroboros/soulDewBE
Added a battle config for the Soul Dew
This commit is contained in:
commit
6c70a6b872
@ -170,6 +170,7 @@
|
||||
#define B_X_ITEMS_BUFF GEN_7 // In Gen7+, the X Items raise a stat by 2 stages instead of 1.
|
||||
#define B_MENTAL_HERB GEN_5 // In Gen5+, the Mental Herb cures Infatuation, Taunt, Encore, Torment, Heal Block, and Disable
|
||||
#define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items.
|
||||
#define B_SOUL_DEW_BOOST GEN_7 // In Gens3-6, Soul Dew boosts Lati@s' Sp. Atk and Sp. Def. In Gen7+ it boosts the power of their Psychic and Dragon type moves instead.
|
||||
|
||||
// Flag settings
|
||||
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
|
||||
|
@ -8075,7 +8075,11 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
MulModifier(&modifier, holdEffectModifier);
|
||||
break;
|
||||
case HOLD_EFFECT_SOUL_DEW:
|
||||
#if B_SOUL_DEW_BOOST >= GEN_7
|
||||
if ((gBattleMons[battlerAtk].species == SPECIES_LATIAS || gBattleMons[battlerAtk].species == SPECIES_LATIOS) && (moveType == TYPE_PSYCHIC || moveType == TYPE_DRAGON))
|
||||
#else
|
||||
if ((gBattleMons[battlerAtk].species == SPECIES_LATIAS || gBattleMons[battlerAtk].species == SPECIES_LATIOS) && !(gBattleTypeFlags & BATTLE_TYPE_FRONTIER))
|
||||
#endif
|
||||
MulModifier(&modifier, holdEffectModifier);
|
||||
break;
|
||||
case HOLD_EFFECT_GEMS:
|
||||
@ -8488,6 +8492,14 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
|
||||
if (!usesDefStat)
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
#if B_SOUL_DEW_BOOST <= GEN_6
|
||||
case HOLD_EFFECT_SOUL_DEW:
|
||||
if ((gBattleMons[battlerDef].species == SPECIES_LATIAS || gBattleMons[battlerDef].species == SPECIES_LATIOS)
|
||||
&& !(gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
|
||||
&& !usesDefStat)
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
// sandstorm sp.def boost for rock types
|
||||
|
Loading…
x
Reference in New Issue
Block a user