mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 20:32:17 +02:00
Merge branch 'beta' into move/tar_shot
This commit is contained in:
commit
387ebcf862
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@ -1,3 +1,3 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
|
||||
export type ConditionFn = (scene: BattleScene, args?: any[]) => boolean;
|
||||
|
2
src/@types/i18next.d.ts
vendored
2
src/@types/i18next.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import { type enConfig } from "#app/locales/en/config.js";
|
||||
import { type enConfig } from "#app/locales/en/config";
|
||||
import { TOptions } from "i18next";
|
||||
|
||||
//TODO: this needs to be type properly in the future
|
||||
|
@ -63,7 +63,7 @@ import { Moves } from "#enums/moves";
|
||||
import { PlayerGender } from "#enums/player-gender";
|
||||
import { Species } from "#enums/species";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import { TimedEventManager } from "#app/timed-event-manager.js";
|
||||
import { TimedEventManager } from "#app/timed-event-manager";
|
||||
import i18next from "i18next";
|
||||
import { TrainerType } from "#enums/trainer-type";
|
||||
import { battleSpecDialogue } from "./data/dialogue";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {SettingGamepad} from "#app/system/settings/settings-gamepad.js";
|
||||
import {SettingGamepad} from "#app/system/settings/settings-gamepad";
|
||||
import {Button} from "#enums/buttons";
|
||||
|
||||
/**
|
||||
|
@ -1,18 +1,18 @@
|
||||
import * as Utils from "../utils";
|
||||
import i18next from "i18next";
|
||||
import { defaultStarterSpecies, DexAttrProps, GameData } from "#app/system/game-data.js";
|
||||
import { defaultStarterSpecies, DexAttrProps, GameData } from "#app/system/game-data";
|
||||
import PokemonSpecies, { getPokemonSpecies, getPokemonSpeciesForm, speciesStarters } from "./pokemon-species";
|
||||
import Pokemon, { PokemonMove } from "#app/field/pokemon.js";
|
||||
import { BattleType, FixedBattleConfig } from "#app/battle.js";
|
||||
import Trainer, { TrainerVariant } from "#app/field/trainer.js";
|
||||
import { GameMode } from "#app/game-mode.js";
|
||||
import Pokemon, { PokemonMove } from "#app/field/pokemon";
|
||||
import { BattleType, FixedBattleConfig } from "#app/battle";
|
||||
import Trainer, { TrainerVariant } from "#app/field/trainer";
|
||||
import { GameMode } from "#app/game-mode";
|
||||
import { Type } from "./type";
|
||||
import { Challenges } from "#enums/challenges";
|
||||
import { Species } from "#enums/species";
|
||||
import { TrainerType } from "#enums/trainer-type";
|
||||
import { Nature } from "./nature";
|
||||
import { Moves } from "#app/enums/moves.js";
|
||||
import { TypeColor, TypeShadow } from "#app/enums/color.js";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import { TypeColor, TypeShadow } from "#app/enums/color";
|
||||
import { pokemonEvolutions } from "./pokemon-evolutions";
|
||||
import { pokemonFormChanges } from "./pokemon-forms";
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { PlayerPokemon } from "#app/field/pokemon";
|
||||
import i18next from "i18next";
|
||||
import { EggTier } from "#enums/egg-type";
|
||||
import { Species } from "#enums/species";
|
||||
import { EggSourceType } from "#app/enums/egg-source-types.js";
|
||||
import { EggSourceType } from "#app/enums/egg-source-types";
|
||||
|
||||
export const EGG_SEED = 1073741824;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { TimeOfDay } from "#enums/time-of-day";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import i18next from "i18next";
|
||||
import { WeatherType } from "./weather";
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { Type } from "./type";
|
||||
import * as Utils from "../utils";
|
||||
import { ChangeMovePriorityAbAttr, applyAbAttrs } from "./ability";
|
||||
import { ProtectAttr } from "./move";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import i18next from "i18next";
|
||||
|
||||
export enum TerrainType {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VariantTier } from "#app/enums/variant-tier.js";
|
||||
import { VariantTier } from "#app/enums/variant-tier";
|
||||
|
||||
export type Variant = 0 | 1 | 2;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ArenaTagSide } from "#app/data/arena-tag.js";
|
||||
import { ArenaTagSide } from "#app/data/arena-tag";
|
||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||
import { TerrainType } from "#app/data/terrain.js";
|
||||
import { WeatherType } from "#app/data/weather.js";
|
||||
import { TerrainType } from "#app/data/terrain";
|
||||
import { WeatherType } from "#app/data/weather";
|
||||
|
||||
/** Alias for all {@linkcode ArenaEvent} type strings */
|
||||
export enum ArenaEventType {
|
||||
|
@ -60,7 +60,7 @@ export class Arena {
|
||||
this.scene.arenaBg.setTexture(`${biomeKey}_bg`);
|
||||
this.scene.arenaBgTransition.setTexture(`${biomeKey}_bg`);
|
||||
|
||||
// Redo this on initialise because during save/load the current wave isn't always
|
||||
// Redo this on initialize because during save/load the current wave isn't always
|
||||
// set correctly during construction
|
||||
this.updatePoolsForTimeOfDay();
|
||||
}
|
||||
@ -289,7 +289,7 @@ export class Arena {
|
||||
|
||||
/**
|
||||
* Sets weather to the override specified in overrides.ts
|
||||
* @param weather new weather to set of type WeatherType
|
||||
* @param weather new {@linkcode WeatherType} to set
|
||||
* @returns true to force trySetWeather to return true
|
||||
*/
|
||||
trySetWeatherOverride(weather: WeatherType): boolean {
|
||||
@ -301,8 +301,8 @@ export class Arena {
|
||||
|
||||
/**
|
||||
* Attempts to set a new weather to the battle
|
||||
* @param weather new weather to set of type WeatherType
|
||||
* @param hasPokemonSource is the new weather from a pokemon
|
||||
* @param weather {@linkcode WeatherType} new {@linkcode WeatherType} to set
|
||||
* @param hasPokemonSource boolean if the new weather is from a pokemon
|
||||
* @returns true if new weather set, false if no weather provided or attempting to set the same weather as currently in use
|
||||
*/
|
||||
trySetWeather(weather: WeatherType, hasPokemonSource: boolean): boolean {
|
||||
@ -573,6 +573,12 @@ export class Arena {
|
||||
this.ignoreAbilities = ignoreAbilities;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies each `ArenaTag` in this Arena, based on which side (self, enemy, or both) is passed in as a parameter
|
||||
* @param tagType Either an {@linkcode ArenaTagType} string, or an actual {@linkcode ArenaTag} class to filter which ones to apply
|
||||
* @param side {@linkcode ArenaTagSide} which side's arena tags to apply
|
||||
* @param args array of parameters that the called upon tags may need
|
||||
*/
|
||||
applyTagsForSide(tagType: ArenaTagType | Constructor<ArenaTag>, side: ArenaTagSide, ...args: unknown[]): void {
|
||||
let tags = typeof tagType === "string"
|
||||
? this.tags.filter(t => t.tagType === tagType)
|
||||
@ -583,11 +589,28 @@ export class Arena {
|
||||
tags.forEach(t => t.apply(this, args));
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the specified tag to both sides (ie: both user and trainer's tag that match the Tag specified)
|
||||
* by calling {@linkcode applyTagsForSide()}
|
||||
* @param tagType Either an {@linkcode ArenaTagType} string, or an actual {@linkcode ArenaTag} class to filter which ones to apply
|
||||
* @param args array of parameters that the called upon tags may need
|
||||
*/
|
||||
applyTags(tagType: ArenaTagType | Constructor<ArenaTag>, ...args: unknown[]): void {
|
||||
this.applyTagsForSide(tagType, ArenaTagSide.BOTH, ...args);
|
||||
}
|
||||
|
||||
addTag(tagType: ArenaTagType, turnCount: integer, sourceMove: Moves | undefined, sourceId: integer, side: ArenaTagSide = ArenaTagSide.BOTH, quiet: boolean = false, targetIndex?: BattlerIndex): boolean {
|
||||
/**
|
||||
* Adds a new tag to the arena
|
||||
* @param tagType {@linkcode ArenaTagType} the tag being added
|
||||
* @param turnCount How many turns the tag lasts
|
||||
* @param sourceMove {@linkcode Moves} the move the tag came from, or `undefined` if not from a move
|
||||
* @param sourceId The ID of the pokemon in play the tag came from (see {@linkcode BattleScene.getPokemonById})
|
||||
* @param side {@linkcode ArenaTagSide} which side(s) the tag applies to
|
||||
* @param quiet If a message should be queued on screen to announce the tag being added
|
||||
* @param targetIndex The {@linkcode BattlerIndex} of the target pokemon
|
||||
* @returns `false` if there already exists a tag of this type in the Arena
|
||||
*/
|
||||
addTag(tagType: ArenaTagType, turnCount: number, sourceMove: Moves | undefined, sourceId: number, side: ArenaTagSide = ArenaTagSide.BOTH, quiet: boolean = false, targetIndex?: BattlerIndex): boolean {
|
||||
const existingTag = this.getTagOnSide(tagType, side);
|
||||
if (existingTag) {
|
||||
existingTag.onOverlap(this);
|
||||
@ -600,6 +623,7 @@ export class Arena {
|
||||
return false;
|
||||
}
|
||||
|
||||
// creates a new tag object
|
||||
const newTag = getArenaTag(tagType, turnCount || 0, sourceMove, sourceId, targetIndex, side);
|
||||
if (newTag) {
|
||||
this.tags.push(newTag);
|
||||
@ -613,6 +637,11 @@ export class Arena {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to get a tag from the Arena via {@linkcode getTagOnSide} that applies to both sides
|
||||
* @param tagType The {@linkcode ArenaTagType} or {@linkcode ArenaTag} to get
|
||||
* @returns either the {@linkcode ArenaTag}, or `undefined` if it isn't there
|
||||
*/
|
||||
getTag(tagType: ArenaTagType | Constructor<ArenaTag>): ArenaTag | undefined {
|
||||
return this.getTagOnSide(tagType, ArenaTagSide.BOTH);
|
||||
}
|
||||
@ -621,16 +650,35 @@ export class Arena {
|
||||
return !!this.getTag(tagType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to get a tag from the Arena from a specific side (the tag passed in has to either apply to both sides, or the specific side only)
|
||||
*
|
||||
* eg: `MIST` only applies to the user's side, while `MUD_SPORT` applies to both user and enemy side
|
||||
* @param tagType The {@linkcode ArenaTagType} or {@linkcode ArenaTag} to get
|
||||
* @param side The {@linkcode ArenaTagSide} to look at
|
||||
* @returns either the {@linkcode ArenaTag}, or `undefined` if it isn't there
|
||||
*/
|
||||
getTagOnSide(tagType: ArenaTagType | Constructor<ArenaTag>, side: ArenaTagSide): ArenaTag | undefined {
|
||||
return typeof(tagType) === "string"
|
||||
? this.tags.find(t => t.tagType === tagType && (side === ArenaTagSide.BOTH || t.side === ArenaTagSide.BOTH || t.side === side))
|
||||
: this.tags.find(t => t instanceof tagType && (side === ArenaTagSide.BOTH || t.side === ArenaTagSide.BOTH || t.side === side));
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses {@linkcode findTagsOnSide} to filter (using the parameter function) for specific tags that apply to both sides
|
||||
* @param tagPredicate a function mapping {@linkcode ArenaTag}s to `boolean`s
|
||||
* @returns array of {@linkcode ArenaTag}s from which the Arena's tags return true and apply to both sides
|
||||
*/
|
||||
findTags(tagPredicate: (t: ArenaTag) => boolean): ArenaTag[] {
|
||||
return this.findTagsOnSide(tagPredicate, ArenaTagSide.BOTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns specific tags from the arena that pass the `tagPredicate` function passed in as a parameter, and apply to the given side
|
||||
* @param tagPredicate a function mapping {@linkcode ArenaTag}s to `boolean`s
|
||||
* @param side The {@linkcode ArenaTagSide} to look at
|
||||
* @returns array of {@linkcode ArenaTag}s from which the Arena's tags return `true` and apply to the given side
|
||||
*/
|
||||
findTagsOnSide(tagPredicate: (t: ArenaTag) => boolean, side: ArenaTagSide): ArenaTag[] {
|
||||
return this.tags.filter(t => tagPredicate(t) && (side === ArenaTagSide.BOTH || t.side === ArenaTagSide.BOTH || t.side === side));
|
||||
}
|
||||
|
@ -1431,22 +1431,26 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
let multiplier = types.map(defType => {
|
||||
const multiplier = new Utils.NumberHolder(getTypeDamageMultiplier(moveType, defType));
|
||||
applyChallenges(this.scene.gameMode, ChallengeType.TYPE_EFFECTIVENESS, multiplier);
|
||||
if (source) {
|
||||
const ignoreImmunity = new Utils.BooleanHolder(false);
|
||||
if (source.isActive(true) && source.hasAbilityWithAttr(IgnoreTypeImmunityAbAttr)) {
|
||||
applyAbAttrs(IgnoreTypeImmunityAbAttr, source, ignoreImmunity, simulated, moveType, defType);
|
||||
}
|
||||
if (ignoreImmunity.value) {
|
||||
return 1;
|
||||
if (multiplier.value === 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
const exposedTags = this.findTags(tag => tag instanceof ExposedTag) as ExposedTag[];
|
||||
if (exposedTags.some(t => t.ignoreImmunity(defType, moveType))) {
|
||||
return 1;
|
||||
if (multiplier.value === 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
const multiplier = new Utils.NumberHolder(getTypeDamageMultiplier(moveType, defType));
|
||||
applyChallenges(this.scene.gameMode, ChallengeType.TYPE_EFFECTIVENESS, multiplier);
|
||||
return multiplier.value;
|
||||
}).reduce((acc, cur) => acc * cur, 1) as TypeDamageMultiplier;
|
||||
|
||||
@ -4505,6 +4509,7 @@ export interface AttackMoveResult {
|
||||
}
|
||||
|
||||
export class PokemonSummonData {
|
||||
/** [Atk, Def, SpAtk, SpDef, Spd, Acc, Eva] */
|
||||
public statStages: number[] = [ 0, 0, 0, 0, 0, 0, 0 ];
|
||||
public moveQueue: QueuedMove[] = [];
|
||||
public tags: BattlerTag[] = [];
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
getIconForLatestInput, swap,
|
||||
} from "#app/configs/inputs/configHandler";
|
||||
import BattleScene from "./battle-scene";
|
||||
import {SettingGamepad} from "#app/system/settings/settings-gamepad.js";
|
||||
import {SettingGamepad} from "#app/system/settings/settings-gamepad";
|
||||
import {SettingKeyboard} from "#app/system/settings/settings-keyboard";
|
||||
import TouchControl from "#app/touch-controls";
|
||||
import { Button } from "#enums/buttons";
|
||||
|
@ -4,8 +4,8 @@ import InvertPostFX from "./pipelines/invert";
|
||||
import { version } from "../package.json";
|
||||
import UIPlugin from "phaser3-rex-plugins/templates/ui/ui-plugin";
|
||||
import BBCodeTextPlugin from "phaser3-rex-plugins/plugins/bbcodetext-plugin";
|
||||
import InputTextPlugin from "phaser3-rex-plugins/plugins/inputtext-plugin.js";
|
||||
import TransitionImagePackPlugin from "phaser3-rex-plugins/templates/transitionimagepack/transitionimagepack-plugin.js";
|
||||
import InputTextPlugin from "phaser3-rex-plugins/plugins/inputtext-plugin";
|
||||
import TransitionImagePackPlugin from "phaser3-rex-plugins/templates/transitionimagepack/transitionimagepack-plugin";
|
||||
import { LoadingScene } from "./loading-scene";
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { BerryType } from "#enums/berry-type";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { PermanentStat, TEMP_BATTLE_STATS, TempBattleStat, Stat, getStatKey } from "#app/enums/stat";
|
||||
|
||||
const outputModifierData = false;
|
||||
|
@ -26,9 +26,9 @@ import i18next from "i18next";
|
||||
|
||||
import { allMoves } from "#app/data/move";
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
import { LearnMovePhase } from "#app/phases/learn-move-phase.js";
|
||||
import { LevelUpPhase } from "#app/phases/level-up-phase.js";
|
||||
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase.js";
|
||||
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
||||
import { LevelUpPhase } from "#app/phases/level-up-phase";
|
||||
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
|
||||
|
||||
export type ModifierPredicate = (modifier: Modifier) => boolean;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { ModifierTier } from "#app/modifier/modifier-tier.js";
|
||||
import { regenerateModifierPoolThresholds, ModifierPoolType, getEnemyBuffModifierForWave } from "#app/modifier/modifier-type.js";
|
||||
import { EnemyPersistentModifier } from "#app/modifier/modifier.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { ModifierTier } from "#app/modifier/modifier-tier";
|
||||
import { regenerateModifierPoolThresholds, ModifierPoolType, getEnemyBuffModifierForWave } from "#app/modifier/modifier-type";
|
||||
import { EnemyPersistentModifier } from "#app/modifier/modifier";
|
||||
import { Phase } from "#app/phase";
|
||||
|
||||
export class AddEnemyBuffModifierPhase extends Phase {
|
||||
constructor(scene: BattleScene) {
|
||||
|
@ -1,17 +1,17 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { getPokeballCatchMultiplier, getPokeballAtlasKey, getPokeballTintColor, doPokeballBounceAnim } from "#app/data/pokeball.js";
|
||||
import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect.js";
|
||||
import { PokeballType } from "#app/enums/pokeball.js";
|
||||
import { StatusEffect } from "#app/enums/status-effect.js";
|
||||
import { addPokeballOpenParticles, addPokeballCaptureStars } from "#app/field/anims.js";
|
||||
import { EnemyPokemon } from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { PokemonHeldItemModifier } from "#app/modifier/modifier.js";
|
||||
import { achvs } from "#app/system/achv.js";
|
||||
import { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler.js";
|
||||
import { SummaryUiMode } from "#app/ui/summary-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { getPokeballCatchMultiplier, getPokeballAtlasKey, getPokeballTintColor, doPokeballBounceAnim } from "#app/data/pokeball";
|
||||
import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect";
|
||||
import { PokeballType } from "#app/enums/pokeball";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import { addPokeballOpenParticles, addPokeballCaptureStars } from "#app/field/anims";
|
||||
import { EnemyPokemon } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { PokemonHeldItemModifier } from "#app/modifier/modifier";
|
||||
import { achvs } from "#app/system/achv";
|
||||
import { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler";
|
||||
import { SummaryUiMode } from "#app/ui/summary-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
import { VictoryPhase } from "./victory-phase";
|
||||
|
@ -28,7 +28,7 @@ export class AttemptRunPhase extends PokemonPhase {
|
||||
|
||||
applyAbAttrs(RunSuccessAbAttr, playerPokemon, null, false, escapeChance);
|
||||
|
||||
if (Utils.randSeedInt(100) < escapeChance.value) {
|
||||
if (playerPokemon.randSeedInt(100) < escapeChance.value) {
|
||||
this.scene.playSound("se/flee");
|
||||
this.scene.queueMessage(i18next.t("battle:runAwaySuccess"), null, true, 500);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { applyPostBattleAbAttrs, PostBattleAbAttr } from "#app/data/ability.js";
|
||||
import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier.js";
|
||||
import { applyPostBattleAbAttrs, PostBattleAbAttr } from "#app/data/ability";
|
||||
import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { GameOverPhase } from "./game-over-phase";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { TrainerSlot } from "#app/data/trainer-config.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { TrainerSlot } from "#app/data/trainer-config";
|
||||
import { Phase } from "#app/phase";
|
||||
|
||||
export class BattlePhase extends Phase {
|
||||
constructor(scene: BattleScene) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { applyAbAttrs, PreventBerryUseAbAttr, HealFromBerryUseAbAttr } from "#app/data/ability.js";
|
||||
import { CommonAnim } from "#app/data/battle-anims.js";
|
||||
import { BerryUsedEvent } from "#app/events/battle-scene.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { BerryModifier } from "#app/modifier/modifier.js";
|
||||
import { applyAbAttrs, PreventBerryUseAbAttr, HealFromBerryUseAbAttr } from "#app/data/ability";
|
||||
import { CommonAnim } from "#app/data/battle-anims";
|
||||
import { BerryUsedEvent } from "#app/events/battle-scene";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { BerryModifier } from "#app/modifier/modifier";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { FieldPhase } from "./field-phase";
|
||||
import { CommonAnimPhase } from "./common-anim-phase";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattleStyle } from "#app/enums/battle-style.js";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattleStyle } from "#app/enums/battle-style";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { PostSummonPhase } from "./post-summon-phase";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { CommonAnim, CommonBattleAnim } from "#app/data/battle-anims.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { CommonAnim, CommonBattleAnim } from "#app/data/battle-anims";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class CommonAnimPhase extends PokemonPhase {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { BattleSpec } from "#app/enums/battle-spec.js";
|
||||
import { DamageResult, HitResult } from "#app/field/pokemon.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { BattleSpec } from "#app/enums/battle-spec";
|
||||
import { DamageResult, HitResult } from "#app/field/pokemon";
|
||||
import * as Utils from "#app/utils";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class DamagePhase extends PokemonPhase {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { PlayerGender } from "#app/enums/player-gender.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { addTextObject, TextStyle } from "#app/ui/text.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { PlayerGender } from "#app/enums/player-gender";
|
||||
import { Phase } from "#app/phase";
|
||||
import { addTextObject, TextStyle } from "#app/ui/text";
|
||||
import i18next from "i18next";
|
||||
|
||||
export class EndCardPhase extends Phase {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
|
||||
export class EndEvolutionPhase extends Phase {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { EnemyPokemon } from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { EnemyPokemon } from "#app/field/pokemon";
|
||||
import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase";
|
||||
|
||||
export abstract class EnemyPartyMemberPokemonPhase extends PartyMemberPokemonPhase {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { ExpBoosterModifier } from "#app/modifier/modifier.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { ExpBoosterModifier } from "#app/modifier/modifier";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase";
|
||||
import { LevelUpPhase } from "./level-up-phase";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import Pokemon from "#app/field/pokemon";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
type PokemonFunc = (pokemon: Pokemon) => void;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { ModifierTypeFunc } from "#app/modifier/modifier-type.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { ModifierTypeFunc } from "#app/modifier/modifier-type";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import { ModifierRewardPhase } from "./modifier-reward-phase";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class HidePartyExpBarPhase extends BattlePhase {
|
||||
|
@ -1,12 +1,12 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims.js";
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms.js";
|
||||
import { Moves } from "#app/enums/moves.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import EvolutionSceneHandler from "#app/ui/evolution-scene-handler.js";
|
||||
import { SummaryUiMode } from "#app/ui/summary-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims";
|
||||
import { allMoves } from "#app/data/move";
|
||||
import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import EvolutionSceneHandler from "#app/ui/evolution-scene-handler";
|
||||
import { SummaryUiMode } from "#app/ui/summary-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import { FieldPhase } from "./field-phase";
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { ExpNotification } from "#app/enums/exp-notification.js";
|
||||
import { EvolutionPhase } from "#app/phases/evolution-phase.js";
|
||||
import { PlayerPokemon } from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { LevelAchv } from "#app/system/achv.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { ExpNotification } from "#app/enums/exp-notification";
|
||||
import { EvolutionPhase } from "#app/phases/evolution-phase";
|
||||
import { PlayerPokemon } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { LevelAchv } from "#app/system/achv";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase";
|
||||
import { LearnMovePhase } from "./learn-move-phase";
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { updateUserInfo } from "#app/account.js";
|
||||
import BattleScene, { bypassLogin } from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { handleTutorial, Tutorial } from "#app/tutorial.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import { updateUserInfo } from "#app/account";
|
||||
import BattleScene, { bypassLogin } from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { handleTutorial, Tutorial } from "#app/tutorial";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next, { t } from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { SelectGenderPhase } from "./select-gender-phase";
|
||||
import { UnavailablePhase } from "./unavailable-phase";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
|
||||
export class MessagePhase extends Phase {
|
||||
private text: string;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { ModifierType, ModifierTypeFunc, getModifierType } from "#app/modifier/modifier-type.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { ModifierType, ModifierTypeFunc, getModifierType } from "#app/modifier/modifier-type";
|
||||
import i18next from "i18next";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { ArenaTagType } from "#app/enums/arena-tag-type.js";
|
||||
import { MoneyMultiplierModifier } from "#app/modifier/modifier.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { ArenaTagType } from "#app/enums/arena-tag-type";
|
||||
import { MoneyMultiplierModifier } from "#app/modifier/modifier";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class MoneyRewardPhase extends BattlePhase {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { initMoveAnim, loadMoveAnimAssets, MoveAnim } from "#app/data/battle-anims.js";
|
||||
import { allMoves, SelfStatusMove } from "#app/data/move.js";
|
||||
import { Moves } from "#app/enums/moves.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { initMoveAnim, loadMoveAnimAssets, MoveAnim } from "#app/data/battle-anims";
|
||||
import { allMoves, SelfStatusMove } from "#app/data/move";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import * as Utils from "#app/utils";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class MoveAnimTestPhase extends BattlePhase {
|
||||
|
@ -1,18 +1,18 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { applyPreAttackAbAttrs, AddSecondStrikeAbAttr, IgnoreMoveEffectsAbAttr, applyPostDefendAbAttrs, PostDefendAbAttr, applyPostAttackAbAttrs, PostAttackAbAttr, MaxMultiHitAbAttr, AlwaysHitAbAttr } from "#app/data/ability.js";
|
||||
import { ArenaTagSide, ConditionalProtectTag } from "#app/data/arena-tag.js";
|
||||
import { MoveAnim } from "#app/data/battle-anims.js";
|
||||
import { BattlerTagLapseType, ProtectedTag, SemiInvulnerableTag } from "#app/data/battler-tags.js";
|
||||
import { MoveTarget, applyMoveAttrs, OverrideMoveEffectAttr, MultiHitAttr, AttackMove, FixedDamageAttr, VariableTargetAttr, MissEffectAttr, MoveFlags, applyFilteredMoveAttrs, MoveAttr, MoveEffectAttr, MoveEffectTrigger, ChargeAttr, MoveCategory, NoEffectAttr, HitsTagAttr } from "#app/data/move.js";
|
||||
import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms.js";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type.js";
|
||||
import { Moves } from "#app/enums/moves.js";
|
||||
import Pokemon, { PokemonMove, MoveResult, HitResult } from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { PokemonMultiHitModifier, FlinchChanceModifier, EnemyAttackStatusEffectChanceModifier, ContactHeldItemTransferChanceModifier, HitHealModifier } from "#app/modifier/modifier.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { applyPreAttackAbAttrs, AddSecondStrikeAbAttr, IgnoreMoveEffectsAbAttr, applyPostDefendAbAttrs, PostDefendAbAttr, applyPostAttackAbAttrs, PostAttackAbAttr, MaxMultiHitAbAttr, AlwaysHitAbAttr } from "#app/data/ability";
|
||||
import { ArenaTagSide, ConditionalProtectTag } from "#app/data/arena-tag";
|
||||
import { MoveAnim } from "#app/data/battle-anims";
|
||||
import { BattlerTagLapseType, ProtectedTag, SemiInvulnerableTag } from "#app/data/battler-tags";
|
||||
import { MoveTarget, applyMoveAttrs, OverrideMoveEffectAttr, MultiHitAttr, AttackMove, FixedDamageAttr, VariableTargetAttr, MissEffectAttr, MoveFlags, applyFilteredMoveAttrs, MoveAttr, MoveEffectAttr, MoveEffectTrigger, ChargeAttr, MoveCategory, NoEffectAttr, HitsTagAttr } from "#app/data/move";
|
||||
import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import Pokemon, { PokemonMove, MoveResult, HitResult } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { PokemonMultiHitModifier, FlinchChanceModifier, EnemyAttackStatusEffectChanceModifier, ContactHeldItemTransferChanceModifier, HitHealModifier } from "#app/modifier/modifier";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class MoveEffectPhase extends PokemonPhase {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { BattlerTagLapseType } from "#app/data/battler-tags.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { BattlerTagLapseType } from "#app/data/battler-tags";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class MoveEndPhase extends PokemonPhase {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/move.js";
|
||||
import Pokemon, { PokemonMove } from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/move";
|
||||
import Pokemon, { PokemonMove } from "#app/field/pokemon";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class MoveHeaderPhase extends BattlePhase {
|
||||
|
@ -1,21 +1,21 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { applyAbAttrs, applyPostMoveUsedAbAttrs, applyPreAttackAbAttrs, BlockRedirectAbAttr, IncreasePpAbAttr, PokemonTypeChangeAbAttr, PostMoveUsedAbAttr, RedirectMoveAbAttr } from "#app/data/ability.js";
|
||||
import { CommonAnim } from "#app/data/battle-anims.js";
|
||||
import { BattlerTagLapseType, CenterOfAttentionTag } from "#app/data/battler-tags.js";
|
||||
import { allMoves, applyMoveAttrs, BypassRedirectAttr, BypassSleepAttr, ChargeAttr, CopyMoveAttr, HealStatusEffectAttr, MoveFlags, PreMoveMessageAttr } from "#app/data/move.js";
|
||||
import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms.js";
|
||||
import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect.js";
|
||||
import { Type } from "#app/data/type.js";
|
||||
import { getTerrainBlockMessage } from "#app/data/weather.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type.js";
|
||||
import { Moves } from "#app/enums/moves.js";
|
||||
import { StatusEffect } from "#app/enums/status-effect.js";
|
||||
import { MoveUsedEvent } from "#app/events/battle-scene.js";
|
||||
import Pokemon, { MoveResult, PokemonMove, TurnMove } from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { applyAbAttrs, applyPostMoveUsedAbAttrs, applyPreAttackAbAttrs, BlockRedirectAbAttr, IncreasePpAbAttr, PokemonTypeChangeAbAttr, PostMoveUsedAbAttr, RedirectMoveAbAttr } from "#app/data/ability";
|
||||
import { CommonAnim } from "#app/data/battle-anims";
|
||||
import { BattlerTagLapseType, CenterOfAttentionTag } from "#app/data/battler-tags";
|
||||
import { allMoves, applyMoveAttrs, BypassRedirectAttr, BypassSleepAttr, ChargeAttr, CopyMoveAttr, HealStatusEffectAttr, MoveFlags, PreMoveMessageAttr } from "#app/data/move";
|
||||
import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms";
|
||||
import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect";
|
||||
import { Type } from "#app/data/type";
|
||||
import { getTerrainBlockMessage } from "#app/data/weather";
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import { MoveUsedEvent } from "#app/events/battle-scene";
|
||||
import Pokemon, { MoveResult, PokemonMove, TurnMove } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import * as Utils from "#app/utils";
|
||||
import i18next from "i18next";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { CommonAnimPhase } from "./common-anim-phase";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { applyAbAttrs, PostBiomeChangeAbAttr } from "#app/data/ability.js";
|
||||
import { getRandomWeatherType } from "#app/data/weather.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { applyAbAttrs, PostBiomeChangeAbAttr } from "#app/data/ability";
|
||||
import { getRandomWeatherType } from "#app/data/weather";
|
||||
import { NextEncounterPhase } from "./next-encounter-phase";
|
||||
|
||||
export class NewBiomeEncounterPhase extends NextEncounterPhase {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { EncounterPhase } from "./encounter-phase";
|
||||
|
||||
export class NextEncounterPhase extends EncounterPhase {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims.js";
|
||||
import { getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect.js";
|
||||
import { StatusEffect } from "#app/enums/status-effect.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims";
|
||||
import { getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import Pokemon from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
import { PostTurnStatusEffectPhase } from "./post-turn-status-effect-phase";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
|
||||
export class OutdatedPhase extends Phase {
|
||||
constructor(scene: BattleScene) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import * as Utils from "#app/utils";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class PartyHealPhase extends BattlePhase {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import Pokemon from "#app/field/pokemon";
|
||||
import { FieldPhase } from "./field-phase";
|
||||
|
||||
export abstract class PartyMemberPokemonPhase extends FieldPhase {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
import Pokemon from "#app/field/pokemon";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { ShowAbilityPhase } from "./show-ability-phase";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { PlayerPokemon } from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { PlayerPokemon } from "#app/field/pokemon";
|
||||
import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase";
|
||||
|
||||
export abstract class PlayerPartyMemberPokemonPhase extends PartyMemberPokemonPhase {
|
||||
|
@ -1,14 +1,14 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { CommonAnim } from "#app/data/battle-anims.js";
|
||||
import { getStatusEffectHealText } from "#app/data/status-effect.js";
|
||||
import { StatusEffect } from "#app/enums/status-effect.js";
|
||||
import { HitResult, DamageResult } from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { HealingBoosterModifier } from "#app/modifier/modifier.js";
|
||||
import { HealAchv } from "#app/system/achv.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { CommonAnim } from "#app/data/battle-anims";
|
||||
import { getStatusEffectHealText } from "#app/data/status-effect";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import { HitResult, DamageResult } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { HealingBoosterModifier } from "#app/modifier/modifier";
|
||||
import { HealAchv } from "#app/system/achv";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { CommonAnimPhase } from "./common-anim-phase";
|
||||
|
||||
export class PokemonHealPhase extends CommonAnimPhase {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import Pokemon from "#app/field/pokemon";
|
||||
import { FieldPhase } from "./field-phase";
|
||||
|
||||
export abstract class PokemonPhase extends FieldPhase {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { EndCardPhase } from "./end-card-phase";
|
||||
import { TitlePhase } from "./title-phase";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { applyPostSummonAbAttrs, PostSummonAbAttr } from "#app/data/ability.js";
|
||||
import { ArenaTrapTag } from "#app/data/arena-tag.js";
|
||||
import { StatusEffect } from "#app/enums/status-effect.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { applyPostSummonAbAttrs, PostSummonAbAttr } from "#app/data/ability";
|
||||
import { ArenaTrapTag } from "#app/data/arena-tag";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class PostSummonPhase extends PokemonPhase {
|
||||
|
@ -1,12 +1,12 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { applyAbAttrs, BlockNonDirectDamageAbAttr, BlockStatusDamageAbAttr, ReduceBurnDamageAbAttr } from "#app/data/ability.js";
|
||||
import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims.js";
|
||||
import { getStatusEffectActivationText } from "#app/data/status-effect.js";
|
||||
import { BattleSpec } from "#app/enums/battle-spec.js";
|
||||
import { StatusEffect } from "#app/enums/status-effect.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { applyAbAttrs, BlockNonDirectDamageAbAttr, BlockStatusDamageAbAttr, ReduceBurnDamageAbAttr } from "#app/data/ability";
|
||||
import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims";
|
||||
import { getStatusEffectActivationText } from "#app/data/status-effect";
|
||||
import { BattleSpec } from "#app/enums/battle-spec";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import * as Utils from "#app/utils";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class PostTurnStatusEffectPhase extends PokemonPhase {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { SemiInvulnerableTag } from "#app/data/battler-tags.js";
|
||||
import { SpeciesFormChange, getSpeciesFormChangeMessage } from "#app/data/pokemon-forms.js";
|
||||
import { getTypeRgb } from "#app/data/type.js";
|
||||
import { BattleSpec } from "#app/enums/battle-spec.js";
|
||||
import Pokemon, { EnemyPokemon } from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { SemiInvulnerableTag } from "#app/data/battler-tags";
|
||||
import { SpeciesFormChange, getSpeciesFormChangeMessage } from "#app/data/pokemon-forms";
|
||||
import { getTypeRgb } from "#app/data/type";
|
||||
import { BattleSpec } from "#app/enums/battle-spec";
|
||||
import Pokemon, { EnemyPokemon } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { MovePhase } from "./move-phase";
|
||||
import { PokemonHealPhase } from "./pokemon-heal-phase";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import * as Utils from "#app/utils";
|
||||
|
||||
export class ReloadSessionPhase extends Phase {
|
||||
private systemDataStr: string | null;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
||||
import { SwitchSummonPhase } from "./switch-summon-phase";
|
||||
|
||||
export class ReturnPhase extends SwitchSummonPhase {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import PokemonSpecies from "#app/data/pokemon-species.js";
|
||||
import { ModifierTypeFunc } from "#app/modifier/modifier-type.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import PokemonSpecies from "#app/data/pokemon-species";
|
||||
import { ModifierTypeFunc } from "#app/modifier/modifier-type";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import { ModifierRewardPhase } from "./modifier-reward-phase";
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims.js";
|
||||
import { Stat } from "#app/enums/stat.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { getTextColor, TextStyle } from "#app/ui/text.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims";
|
||||
import { Stat } from "#app/enums/stat";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { getTextColor, TextStyle } from "#app/ui/text";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { biomeLinks, getBiomeName } from "#app/data/biomes.js";
|
||||
import { Biome } from "#app/enums/biome.js";
|
||||
import { MoneyInterestModifier, MapModifier } from "#app/modifier/modifier.js";
|
||||
import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { biomeLinks, getBiomeName } from "#app/data/biomes";
|
||||
import { Biome } from "#app/enums/biome";
|
||||
import { MoneyInterestModifier, MapModifier } from "#app/modifier/modifier";
|
||||
import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { PartyHealPhase } from "./party-heal-phase";
|
||||
import { SwitchBiomePhase } from "./switch-biome-phase";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
|
||||
export class SelectChallengePhase extends Phase {
|
||||
constructor(scene: BattleScene) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { PlayerGender } from "#app/enums/player-gender.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { SettingKeys } from "#app/system/settings/settings.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { PlayerGender } from "#app/enums/player-gender";
|
||||
import { Phase } from "#app/phase";
|
||||
import { SettingKeys } from "#app/system/settings/settings";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
|
||||
export class SelectGenderPhase extends Phase {
|
||||
|
@ -1,12 +1,12 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { ModifierTier } from "#app/modifier/modifier-tier.js";
|
||||
import { regenerateModifierPoolThresholds, ModifierTypeOption, ModifierType, getPlayerShopModifierTypeOptionsForWave, PokemonModifierType, FusePokemonModifierType, PokemonMoveModifierType, TmModifierType, RememberMoveModifierType, PokemonPpRestoreModifierType, PokemonPpUpModifierType, ModifierPoolType, getPlayerModifierTypeOptions } from "#app/modifier/modifier-type.js";
|
||||
import { ExtraModifierModifier, Modifier, PokemonHeldItemModifier } from "#app/modifier/modifier.js";
|
||||
import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "#app/ui/modifier-select-ui-handler.js";
|
||||
import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { ModifierTier } from "#app/modifier/modifier-tier";
|
||||
import { regenerateModifierPoolThresholds, ModifierTypeOption, ModifierType, getPlayerShopModifierTypeOptionsForWave, PokemonModifierType, FusePokemonModifierType, PokemonMoveModifierType, TmModifierType, RememberMoveModifierType, PokemonPpRestoreModifierType, PokemonPpUpModifierType, ModifierPoolType, getPlayerModifierTypeOptions } from "#app/modifier/modifier-type";
|
||||
import { ExtraModifierModifier, Modifier, PokemonHeldItemModifier } from "#app/modifier/modifier";
|
||||
import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "#app/ui/modifier-select-ui-handler";
|
||||
import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import Overrides from "#app/overrides";
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { applyChallenges, ChallengeType } from "#app/data/challenge.js";
|
||||
import { Gender } from "#app/data/gender.js";
|
||||
import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms.js";
|
||||
import { getPokemonSpecies } from "#app/data/pokemon-species.js";
|
||||
import { Species } from "#app/enums/species.js";
|
||||
import { PlayerPokemon } from "#app/field/pokemon.js";
|
||||
import { overrideModifiers, overrideHeldItems } from "#app/modifier/modifier.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler.js";
|
||||
import { Starter } from "#app/ui/starter-select-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { applyChallenges, ChallengeType } from "#app/data/challenge";
|
||||
import { Gender } from "#app/data/gender";
|
||||
import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms";
|
||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
||||
import { Species } from "#app/enums/species";
|
||||
import { PlayerPokemon } from "#app/field/pokemon";
|
||||
import { overrideModifiers, overrideHeldItems } from "#app/modifier/modifier";
|
||||
import { Phase } from "#app/phase";
|
||||
import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler";
|
||||
import { Starter } from "#app/ui/starter-select-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
|
||||
import { TitlePhase } from "./title-phase";
|
||||
import Overrides from "#app/overrides";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { Command } from "#app/ui/command-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { CommandPhase } from "./command-phase";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class ShinySparklePhase extends PokemonPhase {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { PokemonPhase } from "./pokemon-phase";
|
||||
|
||||
export class ShowAbilityPhase extends PokemonPhase {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { ExpNotification } from "#app/enums/exp-notification.js";
|
||||
import { ExpBoosterModifier } from "#app/modifier/modifier.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { ExpNotification } from "#app/enums/exp-notification";
|
||||
import { ExpBoosterModifier } from "#app/modifier/modifier";
|
||||
import * as Utils from "#app/utils";
|
||||
import { HidePartyExpBarPhase } from "./hide-party-exp-bar-phase";
|
||||
import { LevelUpPhase } from "./level-up-phase";
|
||||
import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { PlayerGender } from "#app/enums/player-gender.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { PlayerGender } from "#app/enums/player-gender";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class ShowTrainerPhase extends BattlePhase {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import i18next from "i18next";
|
||||
import { SummonPhase } from "./summon-phase";
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattleType } from "#app/battle.js";
|
||||
import { getPokeballAtlasKey, getPokeballTintColor } from "#app/data/pokeball.js";
|
||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms.js";
|
||||
import { TrainerSlot } from "#app/data/trainer-config.js";
|
||||
import { PlayerGender } from "#app/enums/player-gender.js";
|
||||
import { addPokeballOpenParticles } from "#app/field/anims.js";
|
||||
import Pokemon, { FieldPosition } from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattleType } from "#app/battle";
|
||||
import { getPokeballAtlasKey, getPokeballTintColor } from "#app/data/pokeball";
|
||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
||||
import { TrainerSlot } from "#app/data/trainer-config";
|
||||
import { PlayerGender } from "#app/enums/player-gender";
|
||||
import { addPokeballOpenParticles } from "#app/field/anims";
|
||||
import Pokemon, { FieldPosition } from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import i18next from "i18next";
|
||||
import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase";
|
||||
import { PostSummonPhase } from "./post-summon-phase";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Biome } from "#app/enums/biome.js";
|
||||
import { getBiomeKey } from "#app/field/arena.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Biome } from "#app/enums/biome";
|
||||
import { getBiomeKey } from "#app/field/arena";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class SwitchBiomePhase extends BattlePhase {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { SwitchSummonPhase } from "./switch-summon-phase";
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr } from "#app/data/ability.js";
|
||||
import { allMoves, ForceSwitchOutAttr } from "#app/data/move.js";
|
||||
import { getPokeballTintColor } from "#app/data/pokeball.js";
|
||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms.js";
|
||||
import { TrainerSlot } from "#app/data/trainer-config.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { SwitchEffectTransferModifier } from "#app/modifier/modifier.js";
|
||||
import { Command } from "#app/ui/command-ui-handler.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr } from "#app/data/ability";
|
||||
import { allMoves, ForceSwitchOutAttr } from "#app/data/move";
|
||||
import { getPokeballTintColor } from "#app/data/pokeball";
|
||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
||||
import { TrainerSlot } from "#app/data/trainer-config";
|
||||
import Pokemon from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { SwitchEffectTransferModifier } from "#app/modifier/modifier";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import i18next from "i18next";
|
||||
import { PostSummonPhase } from "./post-summon-phase";
|
||||
import { SummonPhase } from "./summon-phase";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { MessagePhase } from "./message-phase";
|
||||
|
||||
export class TestMessagePhase extends MessagePhase {
|
||||
|
@ -1,21 +1,21 @@
|
||||
import { loggedInUser } from "#app/account.js";
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattleType } from "#app/battle.js";
|
||||
import { getDailyRunStarters, fetchDailyRunSeed } from "#app/data/daily-run.js";
|
||||
import { Gender } from "#app/data/gender.js";
|
||||
import { getBiomeKey } from "#app/field/arena.js";
|
||||
import { GameModes, GameMode, getGameMode } from "#app/game-mode.js";
|
||||
import { regenerateModifierPoolThresholds, ModifierPoolType, modifierTypes, getDailyRunStarterModifiers } from "#app/modifier/modifier-type.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { SessionSaveData } from "#app/system/game-data.js";
|
||||
import { Unlockables } from "#app/system/unlockables.js";
|
||||
import { vouchers } from "#app/system/voucher.js";
|
||||
import { OptionSelectItem, OptionSelectConfig } from "#app/ui/abstact-option-select-ui-handler.js";
|
||||
import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import { loggedInUser } from "#app/account";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattleType } from "#app/battle";
|
||||
import { getDailyRunStarters, fetchDailyRunSeed } from "#app/data/daily-run";
|
||||
import { Gender } from "#app/data/gender";
|
||||
import { getBiomeKey } from "#app/field/arena";
|
||||
import { GameModes, GameMode, getGameMode } from "#app/game-mode";
|
||||
import { regenerateModifierPoolThresholds, ModifierPoolType, modifierTypes, getDailyRunStarterModifiers } from "#app/modifier/modifier-type";
|
||||
import { Phase } from "#app/phase";
|
||||
import { SessionSaveData } from "#app/system/game-data";
|
||||
import { Unlockables } from "#app/system/unlockables";
|
||||
import { vouchers } from "#app/system/voucher";
|
||||
import { OptionSelectItem, OptionSelectConfig } from "#app/ui/abstact-option-select-ui-handler";
|
||||
import { SaveSlotUiMode } from "#app/ui/save-slot-select-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import { Modifier } from "#app/modifier/modifier.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { Modifier } from "#app/modifier/modifier";
|
||||
import { CheckSwitchPhase } from "./check-switch-phase";
|
||||
import { EncounterPhase } from "./encounter-phase";
|
||||
import { SelectChallengePhase } from "./select-challenge-phase";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { FieldPosition } from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { FieldPosition } from "#app/field/pokemon";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
|
||||
export class ToggleDoublePositionPhase extends BattlePhase {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { trainerConfigs } from "#app/data/trainer-config.js";
|
||||
import { TrainerType } from "#app/enums/trainer-type.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { trainerConfigs } from "#app/data/trainer-config";
|
||||
import { TrainerType } from "#app/enums/trainer-type";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { TestMessagePhase } from "./test-message-phase";
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { getCharVariantFromDialogue } from "#app/data/dialogue.js";
|
||||
import { TrainerType } from "#app/enums/trainer-type.js";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type.js";
|
||||
import { vouchers } from "#app/system/voucher.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { getCharVariantFromDialogue } from "#app/data/dialogue";
|
||||
import { TrainerType } from "#app/enums/trainer-type";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
import { vouchers } from "#app/system/voucher";
|
||||
import i18next from "i18next";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import * as Utils from "#app/utils";
|
||||
import { BattlePhase } from "./battle-phase";
|
||||
import { ModifierRewardPhase } from "./modifier-reward-phase";
|
||||
import { MoneyRewardPhase } from "./money-reward-phase";
|
||||
|
@ -1,12 +1,12 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { applyPostTurnAbAttrs, PostTurnAbAttr } from "#app/data/ability.js";
|
||||
import { BattlerTagLapseType } from "#app/data/battler-tags.js";
|
||||
import { TerrainType } from "#app/data/terrain.js";
|
||||
import { WeatherType } from "#app/enums/weather-type.js";
|
||||
import { TurnEndEvent } from "#app/events/battle-scene.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { TurnHealModifier, EnemyTurnHealModifier, EnemyStatusEffectHealChanceModifier, TurnStatusEffectModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { applyPostTurnAbAttrs, PostTurnAbAttr } from "#app/data/ability";
|
||||
import { BattlerTagLapseType } from "#app/data/battler-tags";
|
||||
import { TerrainType } from "#app/data/terrain";
|
||||
import { WeatherType } from "#app/enums/weather-type";
|
||||
import { TurnEndEvent } from "#app/events/battle-scene";
|
||||
import Pokemon from "#app/field/pokemon";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { TurnHealModifier, EnemyTurnHealModifier, EnemyStatusEffectHealChanceModifier, TurnStatusEffectModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier";
|
||||
import i18next from "i18next";
|
||||
import { FieldPhase } from "./field-phase";
|
||||
import { PokemonHealPhase } from "./pokemon-heal-phase";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { TurnInitEvent } from "#app/events/battle-scene.js";
|
||||
import { PlayerPokemon } from "#app/field/pokemon.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { TurnInitEvent } from "#app/events/battle-scene";
|
||||
import { PlayerPokemon } from "#app/field/pokemon";
|
||||
import i18next from "i18next";
|
||||
import { FieldPhase } from "./field-phase";
|
||||
import { ToggleDoublePositionPhase } from "./toggle-double-position-phase";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { LoginPhase } from "./login-phase";
|
||||
|
||||
export class UnavailablePhase extends Phase {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { Phase } from "#app/phase.js";
|
||||
import { Unlockables, getUnlockableName } from "#app/system/unlockables.js";
|
||||
import { Mode } from "#app/ui/ui.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Phase } from "#app/phase";
|
||||
import { Unlockables, getUnlockableName } from "#app/system/unlockables";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import i18next from "i18next";
|
||||
|
||||
export class UnlockPhase extends Phase {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BattleScene from "#app/battle-scene.js";
|
||||
import { BattlerIndex, BattleType } from "#app/battle.js";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type.js";
|
||||
import { ExpShareModifier, ExpBalanceModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier } from "#app/modifier/modifier.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { BattlerIndex, BattleType } from "#app/battle";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
import { ExpShareModifier, ExpBalanceModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier } from "#app/modifier/modifier";
|
||||
import * as Utils from "#app/utils";
|
||||
import Overrides from "#app/overrides";
|
||||
import { BattleEndPhase } from "./battle-end-phase";
|
||||
import { NewBattlePhase } from "./new-battle-phase";
|
||||
|
@ -2,7 +2,7 @@ import BattleScene from "#app/battle-scene";
|
||||
import { applyPreWeatherEffectAbAttrs, SuppressWeatherEffectAbAttr, PreWeatherDamageAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPostWeatherLapseAbAttrs, PostWeatherLapseAbAttr } from "#app/data/ability.js";
|
||||
import { CommonAnim } from "#app/data/battle-anims";
|
||||
import { Weather, getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weather";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type.js";
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||
import { WeatherType } from "#app/enums/weather-type";
|
||||
import Pokemon, { HitResult } from "#app/field/pokemon";
|
||||
import * as Utils from "#app/utils";
|
||||
|
@ -2,17 +2,17 @@ import i18next from "i18next";
|
||||
import LanguageDetector from "i18next-browser-languagedetector";
|
||||
import processor, { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor";
|
||||
|
||||
import { caEsConfig} from "#app/locales/ca_ES/config.js";
|
||||
import { deConfig } from "#app/locales/de/config.js";
|
||||
import { enConfig } from "#app/locales/en/config.js";
|
||||
import { esConfig } from "#app/locales/es/config.js";
|
||||
import { frConfig } from "#app/locales/fr/config.js";
|
||||
import { itConfig } from "#app/locales/it/config.js";
|
||||
import { koConfig } from "#app/locales/ko/config.js";
|
||||
import { jaConfig } from "#app/locales/ja/config.js";
|
||||
import { ptBrConfig } from "#app/locales/pt_BR/config.js";
|
||||
import { zhCnConfig } from "#app/locales/zh_CN/config.js";
|
||||
import { zhTwConfig } from "#app/locales/zh_TW/config.js";
|
||||
import { caEsConfig} from "#app/locales/ca_ES/config";
|
||||
import { deConfig } from "#app/locales/de/config";
|
||||
import { enConfig } from "#app/locales/en/config";
|
||||
import { esConfig } from "#app/locales/es/config";
|
||||
import { frConfig } from "#app/locales/fr/config";
|
||||
import { itConfig } from "#app/locales/it/config";
|
||||
import { koConfig } from "#app/locales/ko/config";
|
||||
import { jaConfig } from "#app/locales/ja/config";
|
||||
import { ptBrConfig } from "#app/locales/pt_BR/config";
|
||||
import { zhCnConfig } from "#app/locales/zh_CN/config";
|
||||
import { zhTwConfig } from "#app/locales/zh_TW/config";
|
||||
|
||||
interface LoadingFontFaceProperty {
|
||||
face: FontFace,
|
||||
|
@ -2,7 +2,7 @@ import { Arena } from "../field/arena";
|
||||
import { ArenaTag } from "../data/arena-tag";
|
||||
import { Biome } from "#enums/biome";
|
||||
import { Weather } from "../data/weather";
|
||||
import { Terrain } from "#app/data/terrain.js";
|
||||
import { Terrain } from "#app/data/terrain";
|
||||
|
||||
export default class ArenaData {
|
||||
public biome: Biome;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Challenge, copyChallenge } from "#app/data/challenge.js";
|
||||
import { Challenge, copyChallenge } from "#app/data/challenge";
|
||||
|
||||
export default class ChallengeData {
|
||||
public id: integer;
|
||||
|
@ -2,7 +2,7 @@ import { EggTier } from "#enums/egg-type";
|
||||
import { Species } from "#enums/species";
|
||||
import { VariantTier } from "#enums/variant-tiers";
|
||||
import { EGG_SEED, Egg } from "../data/egg";
|
||||
import { EggSourceType } from "#app/enums/egg-source-types.js";
|
||||
import { EggSourceType } from "#app/enums/egg-source-types";
|
||||
|
||||
export default class EggData {
|
||||
public id: integer;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import i18next from "i18next";
|
||||
import BattleScene, { PokeballCounts, bypassLogin } from "../battle-scene";
|
||||
import Pokemon, { EnemyPokemon, PlayerPokemon } from "../field/pokemon";
|
||||
import { pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions";
|
||||
import { pokemonPrevolutions } from "../data/pokemon-evolutions";
|
||||
import PokemonSpecies, { allSpecies, getPokemonSpecies, noStarterFormKeys, speciesStarters } from "../data/pokemon-species";
|
||||
import * as Utils from "../utils";
|
||||
import Overrides from "#app/overrides";
|
||||
@ -27,24 +27,25 @@ import { Tutorial } from "../tutorial";
|
||||
import { speciesEggMoves } from "../data/egg-moves";
|
||||
import { allMoves } from "../data/move";
|
||||
import { TrainerVariant } from "../field/trainer";
|
||||
import { Variant, variantData } from "#app/data/variant";
|
||||
import { Variant } from "#app/data/variant";
|
||||
import {setSettingGamepad, SettingGamepad, settingGamepadDefaults} from "./settings/settings-gamepad";
|
||||
import {setSettingKeyboard, SettingKeyboard} from "#app/system/settings/settings-keyboard";
|
||||
import { TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena.js";
|
||||
import { EnemyAttackStatusEffectChanceModifier } from "../modifier/modifier";
|
||||
import { StatusEffect } from "#app/data/status-effect.js";
|
||||
import { TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena";
|
||||
import * as Modifier from "../modifier/modifier";
|
||||
import { StatusEffect } from "#app/data/status-effect";
|
||||
import ChallengeData from "./challenge-data";
|
||||
import { Device } from "#enums/devices";
|
||||
import { GameDataType } from "#enums/game-data-type";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { PlayerGender } from "#enums/player-gender";
|
||||
import { Species } from "#enums/species";
|
||||
import { applyChallenges, ChallengeType } from "#app/data/challenge.js";
|
||||
import { WeatherType } from "#app/enums/weather-type.js";
|
||||
import { TerrainType } from "#app/data/terrain.js";
|
||||
import { OutdatedPhase } from "#app/phases/outdated-phase.js";
|
||||
import { ReloadSessionPhase } from "#app/phases/reload-session-phase.js";
|
||||
import { applyChallenges, ChallengeType } from "#app/data/challenge";
|
||||
import { WeatherType } from "#app/enums/weather-type";
|
||||
import { TerrainType } from "#app/data/terrain";
|
||||
import { OutdatedPhase } from "#app/phases/outdated-phase";
|
||||
import { ReloadSessionPhase } from "#app/phases/reload-session-phase";
|
||||
import { RUN_HISTORY_LIMIT } from "#app/ui/run-history-ui-handler";
|
||||
import { applySessionDataPatches, applySettingsDataPatches, applySystemDataPatches } from "./version-converter";
|
||||
|
||||
export const defaultStarterSpecies: Species[] = [
|
||||
Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE,
|
||||
@ -93,7 +94,7 @@ export function decrypt(data: string, bypassLogin: boolean): string {
|
||||
: (data: string) => AES.decrypt(data, saveKey).toString(enc.Utf8))(data);
|
||||
}
|
||||
|
||||
interface SystemSaveData {
|
||||
export interface SystemSaveData {
|
||||
trainerId: integer;
|
||||
secretId: integer;
|
||||
gender: PlayerGender;
|
||||
@ -456,17 +457,14 @@ export class GameData {
|
||||
|
||||
localStorage.setItem(`data_${loggedInUser?.username}`, encrypt(systemDataStr, bypassLogin));
|
||||
|
||||
/*const versions = [ this.scene.game.config.gameVersion, data.gameVersion || '0.0.0' ];
|
||||
|
||||
if (versions[0] !== versions[1]) {
|
||||
const [ versionNumbers, oldVersionNumbers ] = versions.map(ver => ver.split('.').map(v => parseInt(v)));
|
||||
}*/
|
||||
const lsItemKey = `runHistoryData_${loggedInUser?.username}`;
|
||||
const lsItem = localStorage.getItem(lsItemKey);
|
||||
if (!lsItem) {
|
||||
localStorage.setItem(lsItemKey, "");
|
||||
}
|
||||
|
||||
applySystemDataPatches(systemData);
|
||||
|
||||
this.trainerId = systemData.trainerId;
|
||||
this.secretId = systemData.secretId;
|
||||
|
||||
@ -474,9 +472,7 @@ export class GameData {
|
||||
|
||||
this.saveSetting(SettingKeys.Player_Gender, systemData.gender === PlayerGender.FEMALE ? 1 : 0);
|
||||
|
||||
const initStarterData = !systemData.starterData;
|
||||
|
||||
if (initStarterData) {
|
||||
if (!systemData.starterData) {
|
||||
this.initStarterData();
|
||||
|
||||
if (systemData["starterMoveData"]) {
|
||||
@ -494,25 +490,20 @@ export class GameData {
|
||||
}
|
||||
|
||||
this.migrateStarterAbilities(systemData, this.starterData);
|
||||
} else {
|
||||
if ([ "1.0.0", "1.0.1" ].includes(systemData.gameVersion)) {
|
||||
this.migrateStarterAbilities(systemData);
|
||||
}
|
||||
//this.fixVariantData(systemData);
|
||||
this.fixStarterData(systemData);
|
||||
// Migrate ability starter data if empty for caught species
|
||||
Object.keys(systemData.starterData).forEach(sd => {
|
||||
if (systemData.dexData[sd].caughtAttr && !systemData.starterData[sd].abilityAttr) {
|
||||
systemData.starterData[sd].abilityAttr = 1;
|
||||
|
||||
const starterIds = Object.keys(this.starterData).map(s => parseInt(s) as Species);
|
||||
for (const s of starterIds) {
|
||||
this.starterData[s].candyCount += this.dexData[s].caughtCount;
|
||||
this.starterData[s].candyCount += this.dexData[s].hatchedCount * 2;
|
||||
if (this.dexData[s].caughtAttr & DexAttr.SHINY) {
|
||||
this.starterData[s].candyCount += 4;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.starterData = systemData.starterData;
|
||||
}
|
||||
|
||||
if (systemData.gameStats) {
|
||||
if (systemData.gameStats.legendaryPokemonCaught !== undefined && systemData.gameStats.subLegendaryPokemonCaught === undefined) {
|
||||
this.fixLegendaryStats(systemData);
|
||||
}
|
||||
this.gameStats = systemData.gameStats;
|
||||
}
|
||||
|
||||
@ -558,17 +549,6 @@ export class GameData {
|
||||
this.consolidateDexData(this.dexData);
|
||||
this.defaultDexData = null;
|
||||
|
||||
if (initStarterData) {
|
||||
const starterIds = Object.keys(this.starterData).map(s => parseInt(s) as Species);
|
||||
for (const s of starterIds) {
|
||||
this.starterData[s].candyCount += this.dexData[s].caughtCount;
|
||||
this.starterData[s].candyCount += this.dexData[s].hatchedCount * 2;
|
||||
if (this.dexData[s].caughtAttr & DexAttr.SHINY) {
|
||||
this.starterData[s].candyCount += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resolve(true);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@ -747,6 +727,7 @@ export class GameData {
|
||||
setSetting(this.scene, setting, valueIndex);
|
||||
|
||||
settings[setting] = valueIndex;
|
||||
settings["gameVersion"] = this.scene.game.config.gameVersion;
|
||||
|
||||
localStorage.setItem("settings", JSON.stringify(settings));
|
||||
|
||||
@ -857,13 +838,7 @@ export class GameData {
|
||||
|
||||
const settings = JSON.parse(localStorage.getItem("settings")!); // TODO: is this bang correct?
|
||||
|
||||
// TODO: Remove this block after save migration is implemented
|
||||
if (settings.hasOwnProperty("REROLL_TARGET") && !settings.hasOwnProperty(SettingKeys.Shop_Cursor_Target)) {
|
||||
settings[SettingKeys.Shop_Cursor_Target] = settings["REROLL_TARGET"];
|
||||
delete settings["REROLL_TARGET"];
|
||||
localStorage.setItem("settings", JSON.stringify(settings));
|
||||
}
|
||||
// End of block to remove
|
||||
applySettingsDataPatches(settings);
|
||||
|
||||
for (const setting of Object.keys(settings)) {
|
||||
setSetting(this.scene, setting, settings[setting]);
|
||||
@ -1090,10 +1065,8 @@ export class GameData {
|
||||
// TODO
|
||||
//scene.arena.tags = sessionData.arena.tags;
|
||||
|
||||
const modifiersModule = await import("../modifier/modifier");
|
||||
|
||||
for (const modifierData of sessionData.modifiers) {
|
||||
const modifier = modifierData.toModifier(scene, modifiersModule[modifierData.className]);
|
||||
const modifier = modifierData.toModifier(scene, Modifier[modifierData.className]);
|
||||
if (modifier) {
|
||||
scene.addModifier(modifier, true);
|
||||
}
|
||||
@ -1102,7 +1075,7 @@ export class GameData {
|
||||
scene.updateModifiers(true);
|
||||
|
||||
for (const enemyModifierData of sessionData.enemyModifiers) {
|
||||
const modifier = enemyModifierData.toModifier(scene, modifiersModule[enemyModifierData.className]);
|
||||
const modifier = enemyModifierData.toModifier(scene, Modifier[enemyModifierData.className]);
|
||||
if (modifier) {
|
||||
scene.addEnemyModifier(modifier, true);
|
||||
}
|
||||
@ -1226,7 +1199,7 @@ export class GameData {
|
||||
}
|
||||
|
||||
parseSessionData(dataStr: string): SessionSaveData {
|
||||
return JSON.parse(dataStr, (k: string, v: any) => {
|
||||
const sessionData = JSON.parse(dataStr, (k: string, v: any) => {
|
||||
/*const versions = [ scene.game.config.gameVersion, sessionData.gameVersion || '0.0.0' ];
|
||||
|
||||
if (versions[0] !== versions[1]) {
|
||||
@ -1258,7 +1231,7 @@ export class GameData {
|
||||
if (md?.className === "ExpBalanceModifier") { // Temporarily limit EXP Balance until it gets reworked
|
||||
md.stackCount = Math.min(md.stackCount, 4);
|
||||
}
|
||||
if (md instanceof EnemyAttackStatusEffectChanceModifier && md.effect === StatusEffect.FREEZE || md.effect === StatusEffect.SLEEP) {
|
||||
if (md instanceof Modifier.EnemyAttackStatusEffectChanceModifier && md.effect === StatusEffect.FREEZE || md.effect === StatusEffect.SLEEP) {
|
||||
continue;
|
||||
}
|
||||
ret.push(new PersistentModifierData(md, player));
|
||||
@ -1283,6 +1256,10 @@ export class GameData {
|
||||
|
||||
return v;
|
||||
}) as SessionSaveData;
|
||||
|
||||
applySessionDataPatches(sessionData);
|
||||
|
||||
return sessionData;
|
||||
}
|
||||
|
||||
saveAll(scene: BattleScene, skipVerification: boolean = false, sync: boolean = false, useCachedSession: boolean = false, useCachedSystem: boolean = false): Promise<boolean> {
|
||||
@ -1885,75 +1862,4 @@ export class GameData {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fixVariantData(systemData: SystemSaveData): void {
|
||||
const starterIds = Object.keys(this.starterData).map(s => parseInt(s) as Species);
|
||||
const starterData = systemData.starterData;
|
||||
const dexData = systemData.dexData;
|
||||
if (starterIds.find(id => (dexData[id].caughtAttr & DexAttr.VARIANT_2 || dexData[id].caughtAttr & DexAttr.VARIANT_3) && !variantData[id])) {
|
||||
for (const s of starterIds) {
|
||||
const species = getPokemonSpecies(s);
|
||||
if (variantData[s]) {
|
||||
const tempCaughtAttr = dexData[s].caughtAttr;
|
||||
let seenVariant2 = false;
|
||||
let seenVariant3 = false;
|
||||
const checkEvoSpecies = (es: Species) => {
|
||||
seenVariant2 ||= !!(dexData[es].seenAttr & DexAttr.VARIANT_2);
|
||||
seenVariant3 ||= !!(dexData[es].seenAttr & DexAttr.VARIANT_3);
|
||||
if (pokemonEvolutions.hasOwnProperty(es)) {
|
||||
for (const pe of pokemonEvolutions[es]) {
|
||||
checkEvoSpecies(pe.speciesId);
|
||||
}
|
||||
}
|
||||
};
|
||||
checkEvoSpecies(s);
|
||||
if (dexData[s].caughtAttr & DexAttr.VARIANT_2 && !seenVariant2) {
|
||||
dexData[s].caughtAttr ^= DexAttr.VARIANT_2;
|
||||
}
|
||||
if (dexData[s].caughtAttr & DexAttr.VARIANT_3 && !seenVariant3) {
|
||||
dexData[s].caughtAttr ^= DexAttr.VARIANT_3;
|
||||
}
|
||||
starterData[s].abilityAttr = (tempCaughtAttr & DexAttr.DEFAULT_VARIANT ? AbilityAttr.ABILITY_1 : 0)
|
||||
| (tempCaughtAttr & DexAttr.VARIANT_2 && species.ability2 ? AbilityAttr.ABILITY_2 : 0)
|
||||
| (tempCaughtAttr & DexAttr.VARIANT_3 && species.abilityHidden ? AbilityAttr.ABILITY_HIDDEN : 0);
|
||||
} else {
|
||||
const tempCaughtAttr = dexData[s].caughtAttr;
|
||||
if (dexData[s].caughtAttr & DexAttr.VARIANT_2) {
|
||||
dexData[s].caughtAttr ^= DexAttr.VARIANT_2;
|
||||
}
|
||||
if (dexData[s].caughtAttr & DexAttr.VARIANT_3) {
|
||||
dexData[s].caughtAttr ^= DexAttr.VARIANT_3;
|
||||
}
|
||||
starterData[s].abilityAttr = (tempCaughtAttr & DexAttr.DEFAULT_VARIANT ? AbilityAttr.ABILITY_1 : 0)
|
||||
| (tempCaughtAttr & DexAttr.VARIANT_2 && species.ability2 ? AbilityAttr.ABILITY_2 : 0)
|
||||
| (tempCaughtAttr & DexAttr.VARIANT_3 && species.abilityHidden ? AbilityAttr.ABILITY_HIDDEN : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fixStarterData(systemData: SystemSaveData): void {
|
||||
for (const starterId of defaultStarterSpecies) {
|
||||
systemData.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
||||
systemData.dexData[starterId].caughtAttr |= DexAttr.FEMALE;
|
||||
}
|
||||
}
|
||||
|
||||
fixLegendaryStats(systemData: SystemSaveData): void {
|
||||
systemData.gameStats.subLegendaryPokemonSeen = 0;
|
||||
systemData.gameStats.subLegendaryPokemonCaught = 0;
|
||||
systemData.gameStats.subLegendaryPokemonHatched = 0;
|
||||
allSpecies.filter(s => s.subLegendary).forEach(s => {
|
||||
const dexEntry = systemData.dexData[s.speciesId];
|
||||
systemData.gameStats.subLegendaryPokemonSeen += dexEntry.seenCount;
|
||||
systemData.gameStats.legendaryPokemonSeen = Math.max(systemData.gameStats.legendaryPokemonSeen - dexEntry.seenCount, 0);
|
||||
systemData.gameStats.subLegendaryPokemonCaught += dexEntry.caughtCount;
|
||||
systemData.gameStats.legendaryPokemonCaught = Math.max(systemData.gameStats.legendaryPokemonCaught - dexEntry.caughtCount, 0);
|
||||
systemData.gameStats.subLegendaryPokemonHatched += dexEntry.hatchedCount;
|
||||
systemData.gameStats.legendaryPokemonHatched = Math.max(systemData.gameStats.legendaryPokemonHatched - dexEntry.hatchedCount, 0);
|
||||
});
|
||||
systemData.gameStats.subLegendaryPokemonSeen = Math.max(systemData.gameStats.subLegendaryPokemonSeen, systemData.gameStats.subLegendaryPokemonCaught);
|
||||
systemData.gameStats.legendaryPokemonSeen = Math.max(systemData.gameStats.legendaryPokemonSeen, systemData.gameStats.legendaryPokemonCaught);
|
||||
systemData.gameStats.mythicalPokemonSeen = Math.max(systemData.gameStats.mythicalPokemonSeen, systemData.gameStats.mythicalPokemonCaught);
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,11 @@ import { PersistentModifier } from "../modifier/modifier";
|
||||
import { GeneratedPersistentModifierType, ModifierType, ModifierTypeGenerator, getModifierTypeFuncById } from "../modifier/modifier-type";
|
||||
|
||||
export default class ModifierData {
|
||||
private player: boolean;
|
||||
private typeId: string;
|
||||
private typePregenArgs: any[];
|
||||
private args: any[];
|
||||
private stackCount: integer;
|
||||
public player: boolean;
|
||||
public typeId: string;
|
||||
public typePregenArgs: any[];
|
||||
public args: any[];
|
||||
public stackCount: integer;
|
||||
|
||||
public className: string;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import SettingsUiHandler from "#app/ui/settings/settings-ui-handler";
|
||||
import { EaseType } from "#enums/ease-type";
|
||||
import { MoneyFormat } from "#enums/money-format";
|
||||
import { PlayerGender } from "#enums/player-gender";
|
||||
import { getIsInitialized, initI18n } from "#app/plugins/i18n.js";
|
||||
import { getIsInitialized, initI18n } from "#app/plugins/i18n";
|
||||
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
||||
|
||||
function getTranslation(key: string): string {
|
||||
|
137
src/system/version-converter.ts
Normal file
137
src/system/version-converter.ts
Normal file
@ -0,0 +1,137 @@
|
||||
import { allSpecies } from "#app/data/pokemon-species.js";
|
||||
import { AbilityAttr, defaultStarterSpecies, DexAttr, SessionSaveData, SystemSaveData } from "./game-data";
|
||||
import { SettingKeys } from "./settings/settings";
|
||||
|
||||
const LATEST_VERSION = "1.0.5";
|
||||
|
||||
export function applySessionDataPatches(data: SessionSaveData) {
|
||||
const curVersion = data.gameVersion;
|
||||
if (curVersion !== LATEST_VERSION) {
|
||||
switch (curVersion) {
|
||||
case "1.0.0":
|
||||
case "1.0.1":
|
||||
case "1.0.2":
|
||||
case "1.0.3":
|
||||
case "1.0.4":
|
||||
// --- PATCHES ---
|
||||
|
||||
// Fix Battle Items, Vitamins, and Lures
|
||||
data.modifiers.forEach((m) => {
|
||||
if (m.className === "PokemonBaseStatModifier") {
|
||||
m.className = "BaseStatModifier";
|
||||
} else if (m.className === "PokemonResetNegativeStatStageModifier") {
|
||||
m.className = "ResetNegativeStatStageModifier";
|
||||
} else if (m.className === "TempBattleStatBoosterModifier") {
|
||||
m.className = "TempStatStageBoosterModifier";
|
||||
m.typeId = "TEMP_STAT_STAGE_BOOSTER";
|
||||
|
||||
// Migration from TempBattleStat to Stat
|
||||
const newStat = m.typePregenArgs[0] + 1;
|
||||
m.typePregenArgs[0] = newStat;
|
||||
|
||||
// From [ stat, battlesLeft ] to [ stat, maxBattles, battleCount ]
|
||||
m.args = [ newStat, 5, m.args[1] ];
|
||||
} else if (m.className === "DoubleBattleChanceBoosterModifier") {
|
||||
let maxBattles: number;
|
||||
switch (m.typeId) {
|
||||
case "MAX_LURE":
|
||||
maxBattles = 30;
|
||||
break;
|
||||
case "SUPER_LURE":
|
||||
maxBattles = 15;
|
||||
break;
|
||||
default:
|
||||
maxBattles = 10;
|
||||
break;
|
||||
}
|
||||
|
||||
// From [ battlesLeft ] to [ maxBattles, battleCount ]
|
||||
m.args = [ maxBattles, m.args[0] ];
|
||||
}
|
||||
});
|
||||
|
||||
data.enemyModifiers.forEach((m) => {
|
||||
if (m.className === "PokemonBaseStatModifier") {
|
||||
m.className = "BaseStatModifier";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
data.gameVersion = LATEST_VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
export function applySystemDataPatches(data: SystemSaveData) {
|
||||
const curVersion = data.gameVersion;
|
||||
if (curVersion !== LATEST_VERSION) {
|
||||
switch (curVersion) {
|
||||
case "1.0.0":
|
||||
case "1.0.1":
|
||||
case "1.0.2":
|
||||
case "1.0.3":
|
||||
case "1.0.4":
|
||||
// --- LEGACY PATCHES ---
|
||||
if (data.starterData) {
|
||||
// Migrate ability starter data if empty for caught species
|
||||
Object.keys(data.starterData).forEach(sd => {
|
||||
if (data.dexData[sd].caughtAttr && !data.starterData[sd].abilityAttr) {
|
||||
data.starterData[sd].abilityAttr = 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Fix Legendary Stats
|
||||
if (data.gameStats && (data.gameStats.legendaryPokemonCaught !== undefined && data.gameStats.subLegendaryPokemonCaught === undefined)) {
|
||||
data.gameStats.subLegendaryPokemonSeen = 0;
|
||||
data.gameStats.subLegendaryPokemonCaught = 0;
|
||||
data.gameStats.subLegendaryPokemonHatched = 0;
|
||||
allSpecies.filter(s => s.subLegendary).forEach(s => {
|
||||
const dexEntry = data.dexData[s.speciesId];
|
||||
data.gameStats.subLegendaryPokemonSeen += dexEntry.seenCount;
|
||||
data.gameStats.legendaryPokemonSeen = Math.max(data.gameStats.legendaryPokemonSeen - dexEntry.seenCount, 0);
|
||||
data.gameStats.subLegendaryPokemonCaught += dexEntry.caughtCount;
|
||||
data.gameStats.legendaryPokemonCaught = Math.max(data.gameStats.legendaryPokemonCaught - dexEntry.caughtCount, 0);
|
||||
data.gameStats.subLegendaryPokemonHatched += dexEntry.hatchedCount;
|
||||
data.gameStats.legendaryPokemonHatched = Math.max(data.gameStats.legendaryPokemonHatched - dexEntry.hatchedCount, 0);
|
||||
});
|
||||
data.gameStats.subLegendaryPokemonSeen = Math.max(data.gameStats.subLegendaryPokemonSeen, data.gameStats.subLegendaryPokemonCaught);
|
||||
data.gameStats.legendaryPokemonSeen = Math.max(data.gameStats.legendaryPokemonSeen, data.gameStats.legendaryPokemonCaught);
|
||||
data.gameStats.mythicalPokemonSeen = Math.max(data.gameStats.mythicalPokemonSeen, data.gameStats.mythicalPokemonCaught);
|
||||
}
|
||||
|
||||
// --- PATCHES ---
|
||||
|
||||
// Fix Starter Data
|
||||
if (data.gameVersion) {
|
||||
for (const starterId of defaultStarterSpecies) {
|
||||
data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
|
||||
data.dexData[starterId].caughtAttr |= DexAttr.FEMALE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data.gameVersion = LATEST_VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
export function applySettingsDataPatches(settings: Object) {
|
||||
const curVersion = settings.hasOwnProperty("gameVersion") ? settings["gameVersion"] : "1.0.0";
|
||||
if (curVersion !== LATEST_VERSION) {
|
||||
switch (curVersion) {
|
||||
case "1.0.0":
|
||||
case "1.0.1":
|
||||
case "1.0.2":
|
||||
case "1.0.3":
|
||||
case "1.0.4":
|
||||
// --- PATCHES ---
|
||||
|
||||
// Fix Reward Cursor Target
|
||||
if (settings.hasOwnProperty("REROLL_TARGET") && !settings.hasOwnProperty(SettingKeys.Shop_Cursor_Target)) {
|
||||
settings[SettingKeys.Shop_Cursor_Target] = settings["REROLL_TARGET"];
|
||||
delete settings["REROLL_TARGET"];
|
||||
localStorage.setItem("settings", JSON.stringify(settings));
|
||||
}
|
||||
}
|
||||
// Note that the current game version will be written at `saveSettings`
|
||||
}
|
||||
}
|
@ -3,8 +3,8 @@ import i18next from "i18next";
|
||||
import { AchvTier, achvs, getAchievementDescription } from "./achv";
|
||||
import { PlayerGender } from "#enums/player-gender";
|
||||
import { TrainerType } from "#enums/trainer-type";
|
||||
import { ConditionFn } from "#app/@types/common.js";
|
||||
import { trainerConfigs } from "#app/data/trainer-config.js";
|
||||
import { ConditionFn } from "#app/@types/common";
|
||||
import { trainerConfigs } from "#app/data/trainer-config";
|
||||
|
||||
export enum VoucherType {
|
||||
REGULAR,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import { Species } from "#app/enums/species";
|
||||
import { HitResult } from "#app/field/pokemon.js";
|
||||
import { HitResult } from "#app/field/pokemon";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DamagePhase } from "#app/phases/damage-phase.js";
|
||||
import { DamagePhase } from "#app/phases/damage-phase";
|
||||
import { toDmgValue } from "#app/utils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user