mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Merge pull request #2197 from AsparagusEduardo/BE_explosion
Config for Explosion halving defense
This commit is contained in:
commit
30a494f964
@ -160,6 +160,7 @@
|
||||
#define B_ROUGH_SKIN_DMG GEN_7 // In Gen4+, Rough Skin contact damage is 1/8th of max HP instead of 1/16th. This will also affect Iron Barbs.
|
||||
#define B_KNOCK_OFF_DMG GEN_8 // In Gen6+, Knock Off deals 50% more damage when knocking off an item.
|
||||
#define B_SPORT_DMG_REDUCTION GEN_7 // In Gen5+, Water/Mud Sport reduce Fire/Electric Damage by 67% instead of 50%.
|
||||
#define B_EXPLOSION_DEFENSE GEN_7 // In Gen5+, Self-Destruct and Explosion don't halve the targets' defense.
|
||||
|
||||
// Type settings
|
||||
#define B_GHOSTS_ESCAPE GEN_7 // In Gen6+, abilities like Shadow Tag or moves like Mean Look fail on Ghost-type Pokémon. They can also escape any Wild Battle.
|
||||
|
@ -8831,6 +8831,12 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
|
||||
usesDefStat = FALSE;
|
||||
}
|
||||
|
||||
#if B_EXPLOSION_DEFENSE <= GEN_4
|
||||
// Self-destruct / Explosion cut defense in half
|
||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION)
|
||||
defStat /= 2;
|
||||
#endif
|
||||
|
||||
// critical hits ignore positive stat changes
|
||||
if (isCrit && defStage > DEFAULT_STAT_STAGE)
|
||||
defStage = DEFAULT_STAT_STAGE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user