Add more abilities and move contact flag
This commit is contained in:
1 parent
18679241e9
commit
005cc9b7d5
10 files changed
+2596
-2077
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user