Add more abilities and move contact flag

This commit is contained in:
Flashfyre committed 2023-04-27 14:30:03 -04:00
1 parent 18679241e9
commit 005cc9b7d5
10 files changed
+2596 -2077

No files matched your search

+17
View File
@@ -4,6 +4,8 @@ import Pokemon from "../pokemon";
import { Type } from "./type";
import Move, { AttackMove } from "./move";
import * as Utils from "../utils";
import BattleScene from "../battle-scene";
import { SuppressWeatherEffectAbAttr, applyPreWeatherEffectAbAttrs } from "./ability";
export enum WeatherType {
NONE,
@@ -96,6 +98,21 @@ export class Weather {
return false;
}
isEffectSuppressed(scene: BattleScene): boolean {
const playerPokemon = scene.getPlayerPokemon();
const enemyPokemon = scene.getEnemyPokemon();
const cancelled = new Utils.BooleanHolder(false);
if (playerPokemon)
applyPreWeatherEffectAbAttrs(SuppressWeatherEffectAbAttr, playerPokemon, this, cancelled, true);
if (enemyPokemon)
applyPreWeatherEffectAbAttrs(SuppressWeatherEffectAbAttr, enemyPokemon, this, cancelled, true);
return cancelled.value;
}
}
export function getWeatherStartMessage(weatherType: WeatherType) {