Add weather change abilities

pull/1/head
Flashfyre 2023-05-04 10:25:11 -04:00
parent 85caa97b72
commit 884c5cc40f
2 changed files with 8 additions and 3 deletions

View File

@ -25,7 +25,7 @@ import { Gender } from "./data/gender";
import { Weather, WeatherType, getRandomWeatherType, getWeatherDamageMessage, getWeatherLapseMessage } from "./data/weather";
import { TempBattleStat } from "./data/temp-battle-stat";
import { ArenaTrapTag, TrickRoomTag } from "./data/arena-tag";
import { ArenaTrapAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreWeatherDamageAbAttr, ProtectStatAttr, SuppressWeatherEffectAbAttr, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreWeatherEffectAbAttrs } from "./data/ability";
import { ArenaTrapAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreWeatherDamageAbAttr, ProtectStatAttr, SuppressWeatherEffectAbAttr, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreWeatherEffectAbAttrs } from "./data/ability";
import { Unlockables, getUnlockableName } from "./system/unlockables";
export class CheckLoadPhase extends BattlePhase {
@ -184,6 +184,8 @@ export class EncounterPhase extends BattlePhase {
this.scene.arena.applyTags(ArenaTrapTag, this.scene.getEnemyPokemon());
applyPostSummonAbAttrs(PostSummonAbAttr, this.scene.getEnemyPokemon());
// TODO: Remove
//this.scene.unshiftPhase(new SelectModifierPhase(this.scene));
@ -402,7 +404,6 @@ export class SummonPhase extends BattlePhase {
playerPokemon.getSprite().clearTint();
playerPokemon.resetSummonData();
this.scene.time.delayedCall(1000, () => this.end());
this.scene.arena.applyTags(ArenaTrapTag, playerPokemon);
}
});
}
@ -415,6 +416,10 @@ export class SummonPhase extends BattlePhase {
if (this.scene.getPlayerPokemon().shiny)
this.scene.unshiftPhase(new ShinySparklePhase(this.scene, true));
this.scene.arena.applyTags(ArenaTrapTag, this.scene.getPlayerPokemon());
applyPostSummonAbAttrs(PostSummonAbAttr, this.scene.getPlayerPokemon());
super.end();
}
}

View File

@ -23,7 +23,7 @@ import { WeatherType } from './data/weather';
import { TempBattleStat } from './data/temp-battle-stat';
import { WeakenMoveTypeTag } from './data/arena-tag';
import { Biome } from './data/biome';
import { Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, abilities, applyBattleStatMultiplierAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs } from './data/ability';
import { Abilities, Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, abilities, applyBattleStatMultiplierAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs } from './data/ability';
import PokemonData from './system/pokemon-data';
export default abstract class Pokemon extends Phaser.GameObjects.Container {