diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 80bf559209..0406d20a98 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -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. diff --git a/src/battle_util.c b/src/battle_util.c index 33dd0f5de1..9515a1f325 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4884,7 +4884,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && TARGET_TURN_DAMAGED && IsMoveMakingContact(move, gBattlerAttacker)) { - gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 8; + #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);