diff --git a/calc/src/mechanics/gen4.ts b/calc/src/mechanics/gen4.ts index 59c1aac9d..656ef34b5 100644 --- a/calc/src/mechanics/gen4.ts +++ b/calc/src/mechanics/gen4.ts @@ -144,8 +144,9 @@ export function calculateDPP( let typeEffectiveness = type1Effectiveness * type2Effectiveness; - // Iron Ball ignores Klutz in generation 4 - if (typeEffectiveness === 0 && move.hasType('Ground') && defender.hasItem('Iron Ball')) { + // Klutz doesn't let Iron Ball ground in generation 4 + if (typeEffectiveness === 0 && move.hasType('Ground') && + (defender.hasItem('Iron Ball') && !defender.hasAbility('Klutz'))) { if (type1Effectiveness === 0) { type1Effectiveness = 1; } else if (defender.types[1] && type2Effectiveness === 0) { diff --git a/calc/src/mechanics/util.ts b/calc/src/mechanics/util.ts index 7ff91b9c7..e707d60b0 100644 --- a/calc/src/mechanics/util.ts +++ b/calc/src/mechanics/util.ts @@ -190,9 +190,11 @@ export function checkForecast(pokemon: Pokemon, weather?: Weather) { } export function checkItem(pokemon: Pokemon, magicRoomActive?: boolean) { + // Pokemon with Klutz still get their speed dropped in generation 4 + if (pokemon.gen.num === 4 && pokemon.hasItem('Iron Ball')) return; if ( pokemon.hasAbility('Klutz') && !EV_ITEMS.includes(pokemon.item!) || - magicRoomActive + magicRoomActive ) { pokemon.item = '' as ItemName; }