Set BP of Gyro Ball for attackers with 0 speed to 1 (#7270)

Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
hedara90 2025-07-04 11:11:21 +02:00 committed by GitHub
parent f74a23f44d
commit beb576f4c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8183,10 +8183,20 @@ static inline u32 CalcMoveBasePower(struct DamageCalculationData *damageCalcData
basePower = sSpeedDiffPowerTable[speed];
break;
case EFFECT_GYRO_BALL:
basePower = ((25 * GetBattlerTotalSpeedStat(battlerDef)) / GetBattlerTotalSpeedStat(battlerAtk)) + 1;
if (basePower > 150)
basePower = 150;
break;
{
u32 attackerSpeed = GetBattlerTotalSpeedStat(battlerAtk);
if (attackerSpeed == 0)
{
basePower = 1;
}
else
{
basePower = ((25 * GetBattlerTotalSpeedStat(battlerDef)) / attackerSpeed) + 1;
if (basePower > 150)
basePower = 150;
}
break;
}
case EFFECT_ECHOED_VOICE:
// gBattleStruct->sameMoveTurns incremented in ppreduce
if (gBattleStruct->sameMoveTurns[battlerAtk] != 0)