Fix strong winds effect not working on moves

pull/58/head
Flashfyre 2024-04-07 23:18:04 -04:00
parent 8b382dd42e
commit a0e2427974
1 changed files with 4 additions and 1 deletions

View File

@ -1096,6 +1096,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
typeMultiplier.value = 1; typeMultiplier.value = 1;
if (this.getTypes(true, true).find(t => move.isTypeImmune(t))) if (this.getTypes(true, true).find(t => move.isTypeImmune(t)))
typeMultiplier.value = 0; typeMultiplier.value = 0;
// Handle strong winds lowering effectiveness of types super effective against pure flying
if (this.scene.arena.weather?.weatherType === WeatherType.STRONG_WINDS && !this.scene.arena.weather.isEffectSuppressed(this.scene) && typeMultiplier.value >= 2 && this.isOfType(Type.FLYING) && getTypeDamageMultiplier(move.type, Type.FLYING) === 2)
typeMultiplier.value /= 2;
switch (moveCategory) { switch (moveCategory) {
case MoveCategory.PHYSICAL: case MoveCategory.PHYSICAL: