Fixed B_PSYWAVE_DMG (#7557)

This commit is contained in:
Eduardo Quezada 2025-08-15 03:03:21 -04:00 committed by GitHub
parent 65b316625f
commit 4986e06cae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@
#define B_BURN_DAMAGE GEN_LATEST // In Gen7+, burn damage is 1/16th of max HP instead of 1/8th. Also applies to Frostbite.
#define B_BURN_FACADE_DMG GEN_LATEST // In Gen6+, burn's effect of lowering the Attack stat no longer applies to Facade.
#define B_BINDING_DAMAGE GEN_LATEST // In Gen6+, binding damage is 1/8 of max HP instead of 1/16. (With Binding Band, 1/6 and 1/8 respectively.)
#define B_PSYWAVE_DMG GEN_LATEST // Psywave's damage formula. See Cmd_psywavedamageeffect.
#define B_PSYWAVE_DMG GEN_LATEST // Psywave's damage formula. See DoFixedDamageMoveCalc for details.
#define B_PAYBACK_SWITCH_BOOST GEN_LATEST // In Gen5+, if the opponent switches out, Payback's damage will no longer be doubled.
#define B_HIDDEN_POWER_DMG GEN_LATEST // 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_LATEST // In Gen4+, Rough Skin contact damage is 1/8th of max HP instead of 1/16th. This will also affect Iron Barbs.

View File

@ -9493,7 +9493,7 @@ static inline s32 DoFixedDamageMoveCalc(struct DamageCalculationData *damageCalc
dmg = gBattleMons[damageCalcData->battlerAtk].level;
break;
case EFFECT_PSYWAVE:
randDamage = B_PSYWAVE_DMG >= GEN_6 ? (Random() % 101) : ((Random() % 11) * 10);
randDamage = B_PSYWAVE_DMG >= GEN_5 ? (Random() % 101) : ((Random() % 11) * 10);
dmg = gBattleMons[damageCalcData->battlerAtk].level * (randDamage + 50) / 100;
break;
case EFFECT_FIXED_DAMAGE_ARG: