Rough Skin damage config

This commit is contained in:
Eduardo Quezada D'Ottone 2021-10-24 20:07:22 -03:00
parent 8699db942b
commit 70aeaf288f
2 changed files with 6 additions and 1 deletions

View file

@ -108,6 +108,7 @@
#define B_PSYWAVE_DMG GEN_7 // Psywave's damage formula. See Cmd_psywavedamageeffect.
#define B_PAYBACK_SWITCH_BOOST GEN_7 // In Gen5+, if the opponent switches out, Payback's damage will no longer be doubled.
#define B_HIDDEN_POWER_DMG GEN_7 // In Gen6+, Hidden Power's base power was set to always be 60. Before, it was determined by the mon's IVs.
#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.
// Type settings
#define B_GHOSTS_ESCAPE GEN_7 // In Gen6+, Ghost-type Pokémon can escape even when blocked by abilities such as Shadow Tag.

View file

@ -4884,7 +4884,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
&& TARGET_TURN_DAMAGED
&& IsMoveMakingContact(move, gBattlerAttacker))
{
#if B_ROUGH_SKIN_DMG >= GEN_4
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 8;
#else
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 16;
#endif
if (gBattleMoveDamage == 0)
gBattleMoveDamage = 1;
PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gLastUsedAbility);