Compare commits

..

No commits in common. "dc30dd33b226a22d3ce32df4d8f442f53f2ed04e" and "cf06ff3b8d3bca1195150533b9f72f46271b167f" have entirely different histories.

141 changed files with 290 additions and 519 deletions

46
package-lock.json generated
View File

@ -37,7 +37,6 @@
"typescript-eslint": "^7.10.0",
"vite": "^4.5.0",
"vite-plugin-fs": "^0.4.4",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.4.0",
"vitest-canvas-mock": "^0.3.3"
},
@ -3394,12 +3393,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/globrex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
"integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==",
"dev": true
},
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@ -6058,26 +6051,6 @@
"typescript": ">=4.2.0"
}
},
"node_modules/tsconfck": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.0.tgz",
"integrity": "sha512-CMjc5zMnyAjcS9sPLytrbFmj89st2g+JYtY/c02ug4Q+CZaAtCgbyviI0n1YvjZE/pzoc6FbNsINS13DOL1B9w==",
"dev": true,
"bin": {
"tsconfck": "bin/tsconfck.js"
},
"engines": {
"node": "^18 || >=20"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/tsconfig-paths": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
@ -6989,25 +6962,6 @@
"node": ">=14"
}
},
"node_modules/vite-tsconfig-paths": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz",
"integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==",
"dev": true,
"dependencies": {
"debug": "^4.1.1",
"globrex": "^0.1.2",
"tsconfck": "^3.0.3"
},
"peerDependencies": {
"vite": "*"
},
"peerDependenciesMeta": {
"vite": {
"optional": true
}
}
},
"node_modules/vitest": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.2.tgz",

View File

@ -36,7 +36,6 @@
"typescript-eslint": "^7.10.0",
"vite": "^4.5.0",
"vite-plugin-fs": "^0.4.4",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.4.0",
"vitest-canvas-mock": "^0.3.3"
},
@ -54,6 +53,7 @@
"node": ">=20.0.0"
},
"imports": {
"#enums": "./enums",
"#enums/*": "./enums/*",
"#app": "./src/main.js",
"#app/*": "./src/*",

View File

@ -52,18 +52,8 @@ import * as Overrides from "./overrides";
import {InputsController} from "./inputs-controller";
import {UiInputs} from "./ui-inputs";
import { NewArenaEvent } from "./events/battle-scene";
import { Abilities, BattleSpec, BattleStyle, Biome, EaseType, ExpNotification, MoneyFormat, Moves, PlayerGender, UiTheme, Species} from "#enums";
import ArenaFlyout from "./ui/arena-flyout";
import { EaseType } from "#enums/ease-type";
import { Abilities } from "#enums/abilities";
import { BattleSpec } from "#enums/battle-spec";
import { BattleStyle } from "#enums/battle-style";
import { Biome } from "#enums/biome";
import { ExpNotification } from "#enums/exp-notification";
import { MoneyFormat } from "#enums/money-format";
import { Moves } from "#enums/moves";
import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { UiTheme } from "#enums/ui-theme";
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";

View File

@ -4,14 +4,10 @@ import { Command } from "./ui/command-ui-handler";
import * as Utils from "./utils";
import Trainer, { TrainerVariant } from "./field/trainer";
import { GameMode } from "./game-mode";
import { BattleSpec, Moves, PlayerGender, Species, TrainerType } from "#enums";
import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/modifier";
import { PokeballType } from "./data/pokeball";
import {trainerConfigs} from "#app/data/trainer-config";
import { BattleSpec } from "#enums/battle-spec";
import { Moves } from "#enums/moves";
import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type";
export enum BattleType {
WILD,

View File

@ -1,4 +1,4 @@
import {Button} from "#enums/buttons";
import {Button} from "#enums";
import {SettingKeyboard} from "#app/system/settings/settings-keyboard";
const cfg_keyboard_qwerty = {

View File

@ -1,4 +1,4 @@
import {Device} from "#enums/devices";
import {Device} from "#enums";
/**
* Retrieves the key associated with the specified keycode from the mapping.

View File

@ -1,5 +1,5 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
/**
* Dualshock mapping

View File

@ -1,5 +1,5 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
/**
* Generic pad mapping

View File

@ -1,5 +1,5 @@
import {SettingGamepad} from "#app/system/settings/settings-gamepad.js";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
/**
* Nintendo Pro Controller mapping

View File

@ -1,5 +1,5 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
/**
* 081f-e401 - UnlicensedSNES

View File

@ -1,5 +1,5 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
/**
* Generic pad mapping

View File

@ -6,6 +6,7 @@ import { MovePhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "
import { getPokemonMessage, getPokemonNameWithAffix } from "../messages";
import { Weather, WeatherType } from "./weather";
import { BattlerTag } from "./battler-tags";
import { ArenaTagType, Abilities, BattlerTagType, Moves, Species } from "#enums";
import { StatusEffect, getNonVolatileStatusEffects, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect";
import { Gender } from "./gender";
import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, FlinchAttr, OneHitKOAttr, HitHealAttr, allMoves, StatusMove, SelfStatusMove, VariablePowerAttr, applyMoveAttrs, IncrementMovePriorityAttr, VariableMoveTypeAttr, RandomMovesetMoveAttr, RandomMoveAttr, NaturePowerAttr, CopyMoveAttr } from "./move";
@ -19,11 +20,6 @@ import { Command } from "../ui/command-ui-handler";
import { BerryModifierType } from "#app/modifier/modifier-type";
import { getPokeballName } from "./pokeball";
import { BattlerIndex } from "#app/battle";
import { Abilities } from "#enums/abilities";
import { ArenaTagType } from "#enums/arena-tag-type";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
export class Ability implements Localizable {
public id: Abilities;
@ -677,9 +673,7 @@ export class PostDefendHpGatedStatChangeAbAttr extends PostDefendAbAttr {
applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean {
const hpGateFlat: integer = Math.ceil(pokemon.getMaxHp() * this.hpGate);
const lastAttackReceived = pokemon.turnData.attacksReceived[pokemon.turnData.attacksReceived.length - 1];
const damageReceived = lastAttackReceived?.damage || 0;
if (this.condition(pokemon, attacker, move) && (pokemon.hp <= hpGateFlat && (pokemon.hp + damageReceived) > hpGateFlat)) {
if (this.condition(pokemon, attacker, move) && (pokemon.hp <= hpGateFlat && (pokemon.hp + lastAttackReceived.damage) > hpGateFlat)) {
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, (this.selfTarget ? pokemon : attacker).getBattlerIndex(), true, this.stats, this.levels));
return true;
}

View File

@ -6,11 +6,9 @@ import PokemonSpecies, { PokemonForm, SpeciesFormKey, allSpecies } from "./pokem
import { GrowthRate } from "./exp";
import { Type } from "./type";
import { allAbilities } from "./ability";
import { Abilities, Moves, Species } from "#enums";
import { pokemonFormLevelMoves } from "./pokemon-level-moves";
import { tmSpecies } from "./tms";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
const targetMap = {
"specific-move": MoveTarget.ATTACKER,

View File

@ -7,14 +7,11 @@ import Pokemon, { HitResult, PokemonMove } from "../field/pokemon";
import { MoveEffectPhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase} from "../phases";
import { StatusEffect } from "./status-effect";
import { BattlerIndex } from "../battle";
import { Abilities, ArenaTagType, BattlerTagType, Moves } from "#enums";
import { BlockNonDirectDamageAbAttr, ProtectStatAbAttr, applyAbAttrs } from "./ability";
import { BattleStat } from "./battle-stat";
import { CommonAnim, CommonBattleAnim } from "./battle-anims";
import i18next from "i18next";
import { Abilities } from "#enums/abilities";
import { ArenaTagType } from "#enums/arena-tag-type";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
export enum ArenaTagSide {
BOTH,

View File

@ -5,7 +5,7 @@ import Pokemon from "../field/pokemon";
import * as Utils from "../utils";
import { BattlerIndex } from "../battle";
import { Element } from "json-stable-stringify";
import { Moves } from "#enums/moves";
import { Moves } from "#enums";
//import fs from 'vite-plugin-fs/browser';
export enum AnimFrameTarget {

View File

@ -8,15 +8,12 @@ import * as Utils from "../utils";
import { ChargeAttr, MoveFlags, allMoves } from "./move";
import { Type } from "./type";
import { BlockNonDirectDamageAbAttr, FlinchEffectAbAttr, ReverseDrainAbAttr, applyAbAttrs } from "./ability";
import { Abilities, BattlerTagType, Moves, Species } from "#enums";
import { TerrainType } from "./terrain";
import { WeatherType } from "./weather";
import { BattleStat } from "./battle-stat";
import { allAbilities } from "./ability";
import { SpeciesFormChangeManualTrigger } from "./pokemon-forms";
import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
export enum BattlerTagLapseType {
FAINT,

View File

@ -2,12 +2,11 @@ import { PokemonHealPhase, StatChangePhase } from "../phases";
import { getPokemonMessage } from "../messages";
import Pokemon, { HitResult } from "../field/pokemon";
import { BattleStat } from "./battle-stat";
import { BattlerTagType, BerryType } from "#enums";
import { getStatusEffectHealText } from "./status-effect";
import * as Utils from "../utils";
import { DoubleBerryEffectAbAttr, ReduceBerryUseThresholdAbAttr, applyAbAttrs } from "./ability";
import i18next from "../plugins/i18n";
import { BattlerTagType } from "#enums/battler-tag-type";
import { BerryType } from "#enums/berry-type";
export function getBerryName(berryType: BerryType): string {
return i18next.t(`berry:${BerryType[berryType]}.name`);

View File

@ -1,12 +1,9 @@
import { Type } from "./type";
import * as Utils from "../utils";
import beautify from "json-beautify";
import { Biome, Species, TimeOfDay, TrainerType } from "#enums";
import {pokemonEvolutions, SpeciesFormEvolution} from "./pokemon-evolutions";
import i18next from "i18next";
import { Biome } from "#enums/biome";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
import { TrainerType } from "#enums/trainer-type";
export function getBiomeName(biome: Biome | -1) {
if (biome === -1) {

View File

@ -1,4 +1,5 @@
import * as Utils from "../utils";
import { Challenges, TrainerType, Species } from "#enums";
import i18next from "#app/plugins/i18n.js";
import { GameData } from "#app/system/game-data.js";
import PokemonSpecies, { getPokemonSpecies, speciesStarters } from "./pokemon-species";
@ -7,9 +8,6 @@ import { BattleType, FixedBattleConfig } from "#app/battle.js";
import Trainer, { TrainerVariant } from "#app/field/trainer.js";
import { GameMode } from "#app/game-mode.js";
import { Type } from "./type";
import { Challenges } from "#enums/challenges";
import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type";
/**
* An enum for all the challenge types. The parameter entries on these describe the

View File

@ -1,10 +1,9 @@
import { PartyMemberStrength } from "#enums/party-member-strength";
import { Species } from "#enums/species";
import BattleScene from "../battle-scene";
import { PlayerPokemon } from "../field/pokemon";
import { Starter } from "../ui/starter-select-ui-handler";
import * as Utils from "../utils";
import PokemonSpecies, { PokemonSpeciesForm, getPokemonSpecies, getPokemonSpeciesForm, speciesStarters } from "./pokemon-species";
import { PartyMemberStrength, Species } from "#enums";
export interface DailyRunConfig {
seed: integer;

View File

@ -1,6 +1,5 @@
import { BattleSpec } from "#enums/battle-spec";
import { TrainerType } from "#enums/trainer-type";
import {trainerConfigs} from "./trainer-config";
import {BattleSpec, TrainerType} from "#enums";
export interface TrainerTypeMessages {
encounter?: string | string[],

View File

@ -1,7 +1,6 @@
import { Moves, Species } from "#enums";
import { allMoves } from "./move";
import * as Utils from "../utils";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
export const speciesEggMoves = {

View File

@ -1,8 +1,7 @@
import BattleScene from "../battle-scene";
import PokemonSpecies, { getPokemonSpecies, speciesStarters } from "./pokemon-species";
import { EggTier, Species } from "#enums";
import i18next from "../plugins/i18n";
import { EggTier } from "#enums/egg-type";
import { Species } from "#enums/species";
export const EGG_SEED = 1073741824;
@ -28,7 +27,7 @@ export class Egg {
}
isManaphyEgg(): boolean {
return this.tier === EggTier.COMMON && !(this.id % 204);
return this.tier === EggTier.COMMON && !(this.id % 255);
}
getKey(): string {

View File

@ -10,6 +10,7 @@ import * as Utils from "../utils";
import { WeatherType } from "./weather";
import { ArenaTagSide, ArenaTrapTag } from "./arena-tag";
import { UnswappableAbilityAbAttr, UncopiableAbilityAbAttr, UnsuppressableAbilityAbAttr, BlockRecoilDamageAttr, BlockOneHitKOAbAttr, IgnoreContactAbAttr, MaxMultiHitAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr, applyPostDefendAbAttrs, PostDefendContactApplyStatusEffectAbAttr, MoveAbilityBypassAbAttr, ReverseDrainAbAttr, FieldPreventExplosiveMovesAbAttr, ForceSwitchOutImmunityAbAttr, BlockItemTheftAbAttr, applyPostAttackAbAttrs, ConfusionOnStatusEffectAbAttr, HealFromBerryUseAbAttr } from "./ability";
import { Abilities, ArenaTagType, BattlerTagType, Biome, Moves, Species } from "#enums";
import { allAbilities } from "./ability";
import { PokemonHeldItemModifier, BerryModifier, PreserveBerryModifier } from "../modifier/modifier";
import { BattlerIndex } from "../battle";
@ -20,12 +21,6 @@ import { ModifierPoolType } from "#app/modifier/modifier-type";
import { Command } from "../ui/command-ui-handler";
import i18next, { Localizable } from "../plugins/i18n";
import { getBerryEffectFunc } from "./berry";
import { Abilities } from "#enums/abilities";
import { ArenaTagType } from "#enums/arena-tag-type";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
export enum MoveCategory {
PHYSICAL,
@ -1540,14 +1535,6 @@ export class IncrementMovePriorityAttr extends MoveAttr {
}
}
/**
* Attribute used for attack moves that hit multiple times per use, e.g. Bullet Seed.
*
* Applied at the beginning of {@linkcode MoveEffectPhase}.
*
* @extends MoveAttr
* @see {@linkcode apply}
*/
export class MultiHitAttr extends MoveAttr {
private multiHitType: MultiHitType;
@ -1557,28 +1544,43 @@ export class MultiHitAttr extends MoveAttr {
this.multiHitType = multiHitType !== undefined ? multiHitType : MultiHitType._2_TO_5;
}
/**
* Set the hit count of an attack based on this attribute instance's {@linkcode MultiHitType}.
* If the target has an immunity to this attack's types, the hit count will always be 1.
*
* @param user {@linkcode Pokemon} that used the attack
* @param target {@linkcode Pokemon} targeted by the attack
* @param move {@linkcode Move} being used
* @param args [0] {@linkcode Utils.IntegerHolder} storing the hit count of the attack
* @returns True
*/
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
let hitTimes: integer;
if (target.getAttackMoveEffectiveness(user, new PokemonMove(move.id)) === 0) {
// If there is a type immunity, the attack will stop no matter what
hitTimes = 1;
} else {
const hitType = new Utils.IntegerHolder(this.multiHitType);
applyMoveAttrs(ChangeMultiHitTypeAttr, user, target, move, hitType);
hitTimes = this.getHitCount(user, target);
const hitType = new Utils.IntegerHolder(this.multiHitType);
applyMoveAttrs(ChangeMultiHitTypeAttr, user, target, move, hitType);
switch (hitType.value) {
case MultiHitType._2_TO_5:
{
const rand = user.randSeedInt(16);
const hitValue = new Utils.IntegerHolder(rand);
applyAbAttrs(MaxMultiHitAbAttr, user, null, hitValue);
if (hitValue.value >= 10) {
hitTimes = 2;
} else if (hitValue.value >= 4) {
hitTimes = 3;
} else if (hitValue.value >= 2) {
hitTimes = 4;
} else {
hitTimes = 5;
}
}
break;
case MultiHitType._2:
hitTimes = 2;
break;
case MultiHitType._3:
hitTimes = 3;
break;
case MultiHitType._10:
hitTimes = 10;
break;
case MultiHitType.BEAT_UP:
const party = user.isPlayer() ? user.scene.getParty() : user.scene.getEnemyParty();
// No status means the ally pokemon can contribute to Beat Up
hitTimes = party.reduce((total, pokemon) => {
return total + (pokemon.id === user.id ? 1 : pokemon?.status && pokemon.status.effect !== StatusEffect.NONE ? 0 : 1);
}, 0);
}
(args[0] as Utils.IntegerHolder).value = hitTimes;
return true;
}
@ -1586,49 +1588,6 @@ export class MultiHitAttr extends MoveAttr {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return -5;
}
/**
* Calculate the number of hits that an attack should have given this attribute's
* {@linkcode MultiHitType}.
*
* @param user {@linkcode Pokemon} using the attack
* @param target {@linkcode Pokemon} targeted by the attack
* @returns The number of hits this attack should deal
*/
getHitCount(user: Pokemon, target: Pokemon): integer {
switch (this.multiHitType) {
case MultiHitType._2_TO_5:
{
const rand = user.randSeedInt(16);
const hitValue = new Utils.IntegerHolder(rand);
applyAbAttrs(MaxMultiHitAbAttr, user, null, hitValue);
if (hitValue.value >= 10) {
return 2;
} else if (hitValue.value >= 4) {
return 3;
} else if (hitValue.value >= 2) {
return 4;
} else {
return 5;
}
}
case MultiHitType._2:
return 2;
break;
case MultiHitType._3:
return 3;
break;
case MultiHitType._10:
return 10;
break;
case MultiHitType.BEAT_UP:
const party = user.isPlayer() ? user.scene.getParty() : user.scene.getEnemyParty();
// No status means the ally pokemon can contribute to Beat Up
return party.reduce((total, pokemon) => {
return total + (pokemon.id === user.id ? 1 : pokemon?.status && pokemon.status.effect !== StatusEffect.NONE ? 0 : 1);
}, 0);
}
}
}
export class ChangeMultiHitTypeAttr extends MoveAttr {
@ -7552,14 +7511,8 @@ export function initMoves() {
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, false, 1)
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, true, false, 1)
.bitingMove(),
new SelfStatusMove(Moves.STUFF_CHEEKS, Type.NORMAL, -1, 10, 100, 0, 8) // TODO: Stuff Cheeks should not be selectable when the user does not have a berry, see wiki
.attr(EatBerryAttr)
.attr(StatChangeAttr, BattleStat.DEF, 2, true)
.condition((user) => {
const userBerries = user.scene.findModifiers(m => m instanceof BerryModifier);
return userBerries.length > 0;
})
.partial(),
new SelfStatusMove(Moves.STUFF_CHEEKS, Type.NORMAL, -1, 10, 100, 0, 8)
.unimplemented(),
new SelfStatusMove(Moves.NO_RETREAT, Type.FIGHTING, -1, 5, 100, 0, 8)
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true)
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, true, true, 1),

View File

@ -1,7 +1,7 @@
import { Stat, getStatName } from "./pokemon-stat";
import * as Utils from "../utils";
import { TextStyle, getBBCodeFrag } from "../ui/text";
import { UiTheme } from "#enums/ui-theme";
import { UiTheme } from "#enums";
import i18next from "i18next";
export enum Nature {

View File

@ -6,11 +6,8 @@ import { Type } from "./type";
import * as Utils from "../utils";
import { SpeciesFormKey } from "./pokemon-species";
import { WeatherType } from "./weather";
import { Biome, Moves, Species, TimeOfDay } from "#enums";
import { Nature } from "./nature";
import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
export enum SpeciesWildEvolutionDelay {
NONE,

View File

@ -3,10 +3,7 @@ import Pokemon from "../field/pokemon";
import { SpeciesFormKey } from "./pokemon-species";
import { StatusEffect } from "./status-effect";
import { MoveCategory, allMoves } from "./move";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
import { Abilities, Moves, Species, TimeOfDay } from "#enums";
export enum FormChangeItem {
NONE,

View File

@ -1,5 +1,4 @@
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Moves, Species } from "#enums";
export type LevelMoves = ([integer, Moves])[];

View File

@ -1,4 +1,4 @@
import { Abilities, PartyMemberStrength, Species } from "#enums";
import BattleScene, { AnySound } from "../battle-scene";
import { Variant, variantColorCache } from "./variant";
import { variantData } from "./variant";
@ -15,9 +15,6 @@ import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-
import { VariantSet } from "./variant";
import i18next, { Localizable } from "../plugins/i18n";
import { Stat } from "./pokemon-stat";
import { Abilities } from "#enums/abilities";
import { PartyMemberStrength } from "#enums/party-member-strength";
import { Species } from "#enums/species";
export enum Region {
NORMAL,

View File

@ -1,6 +1,5 @@
import { ModifierTier } from "../modifier/modifier-tier";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Moves, Species } from "#enums";
interface TmSpecies {
[key: integer]: Array<Species | Array<Species | string>>

View File

@ -10,12 +10,9 @@ import {Type} from "./type";
import {doubleBattleDialogue} from "./dialogue";
import {PersistentModifier} from "../modifier/modifier";
import {TrainerVariant} from "../field/trainer";
import {Moves, PartyMemberStrength, Species, TrainerType} from "#enums";
import {getIsInitialized, initI18n} from "#app/plugins/i18n";
import i18next from "i18next";
import { Moves } from "#enums/moves";
import { PartyMemberStrength } from "#enums/party-member-strength";
import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type";
export enum TrainerPoolTier {
COMMON,

View File

@ -1,4 +1,4 @@
import { TrainerType } from "#enums/trainer-type";
import { TrainerType } from "#enums";
import * as Utils from "../utils";
class TrainerNameConfig {

View File

@ -1,4 +1,4 @@
import { Biome } from "#enums/biome";
import { Biome } from "#enums";
import { getPokemonMessage, getPokemonNameWithAffix } from "../messages";
import Pokemon from "../field/pokemon";
import { Type } from "./type";

View File

@ -9,11 +9,10 @@ import { PlayerPokemon } from "./field/pokemon";
import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species";
import { achvs } from "./system/achv";
import { pokemonPrevolutions } from "./data/pokemon-evolutions";
import { EggTier, Species } from "#enums";
import PokemonInfoContainer from "./ui/pokemon-info-container";
import EggCounterContainer from "./ui/egg-counter-container";
import { EggCountChangedEvent } from "./events/egg";
import { EggTier } from "#enums/egg-type";
import { Species } from "#enums/species";
/**
* Class that represents egg hatching

25
src/enums/index.ts Normal file
View File

@ -0,0 +1,25 @@
export * from "./abilities";
export * from "./arena-tag-type";
export * from "./battle-spec";
export * from "./battle-style";
export * from "./battler-tag-type";
export * from "./berry-type";
export * from "./biome";
export * from "./buttons";
export * from "./challenges";
export * from "./devices";
export * from "./ease-type";
export * from "./egg-type";
export * from "./exp-notification";
export * from "./game-data-type";
export * from "./money-format";
export * from "./moves";
export * from "./money-format";
export * from "./party-member-strength";
export * from "./passive";
export * from "./player-gender";
export * from "./species";
export * from "./time-of-day";
export * from "./trainer-type";
export * from "./ui-theme";

View File

@ -2164,3 +2164,15 @@ export enum Species {
/**{@link https://bulbapedia.bulbagarden.net/wiki/Ursaluna_(Pokémon) | Source} */
BLOODMOON_URSALUNA = 8901,
}
export const defaultStarterSpecies: Species[] = [
Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE,
Species.CHIKORITA, Species.CYNDAQUIL, Species.TOTODILE,
Species.TREECKO, Species.TORCHIC, Species.MUDKIP,
Species.TURTWIG, Species.CHIMCHAR, Species.PIPLUP,
Species.SNIVY, Species.TEPIG, Species.OSHAWOTT,
Species.CHESPIN, Species.FENNEKIN, Species.FROAKIE,
Species.ROWLET, Species.LITTEN, Species.POPPLIO,
Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE,
Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY
];

View File

@ -1,5 +1,5 @@
import { ArenaTagSide } from "#app/data/arena-tag.js";
import { ArenaTagType } from "#enums/arena-tag-type";
import { ArenaTagType } from "#enums";
import { TerrainType } from "#app/data/terrain.js";
import { WeatherType } from "#app/data/weather.js";

View File

@ -1,5 +1,6 @@
import BattleScene from "../battle-scene";
import { BiomePoolTier, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools } from "../data/biomes";
import { ArenaTagType, Biome, Moves, Species, TimeOfDay, TrainerType } from "#enums";
import * as Utils from "../utils";
import PokemonSpecies, { getPokemonSpecies } from "../data/pokemon-species";
import { Weather, WeatherType, getTerrainClearMessage, getTerrainStartMessage, getWeatherClearMessage, getWeatherStartMessage } from "../data/weather";
@ -14,12 +15,6 @@ import { PostTerrainChangeAbAttr, PostWeatherChangeAbAttr, applyPostTerrainChang
import Pokemon from "./pokemon";
import * as Overrides from "../overrides";
import { WeatherChangedEvent, TerrainChangedEvent, TagAddedEvent, TagRemovedEvent } from "../events/arena";
import { ArenaTagType } from "#enums/arena-tag-type";
import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
import { TrainerType } from "#enums/trainer-type";
export class Arena {
public scene: BattleScene;

View File

@ -22,6 +22,7 @@ import { BattlerTag, BattlerTagLapseType, EncoreTag, HelpingHandTag, HighestStat
import { WeatherType } from "../data/weather";
import { TempBattleStat } from "../data/temp-battle-stat";
import { ArenaTagSide, WeakenMoveScreenTag, WeakenMoveTypeTag } from "../data/arena-tag";
import { Abilities, ArenaTagType, Moves, BattlerTagType, Species, Biome, BattleSpec, BerryType } from "#enums";
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr, ConditionalCritAbAttr, applyFieldBattleStatMultiplierAbAttrs, FieldMultiplyBattleStatAbAttr } from "../data/ability";
import PokemonData from "../system/pokemon-data";
import { BattlerIndex } from "../battle";
@ -41,14 +42,6 @@ import i18next from "../plugins/i18n";
import { speciesEggMoves } from "../data/egg-moves";
import { ModifierTier } from "../modifier/modifier-tier";
import { applyChallenges, ChallengeType } from "#app/data/challenge.js";
import { Abilities } from "#enums/abilities";
import { ArenaTagType } from "#enums/arena-tag-type";
import { BattleSpec } from "#enums/battle-spec";
import { BattlerTagType } from "#enums/battler-tag-type";
import { BerryType } from "#enums/berry-type";
import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
export enum FieldPosition {
CENTER,

View File

@ -11,6 +11,7 @@ import {
trainerPartyTemplates,
signatureSpecies
} from "../data/trainer-config";
import {PartyMemberStrength, Species, TrainerType} from "#enums";
import {EnemyPokemon} from "./pokemon";
import * as Utils from "../utils";
import {PersistentModifier} from "../modifier/modifier";
@ -18,9 +19,6 @@ import {trainerNamePools} from "../data/trainer-names";
import {ArenaTagSide, ArenaTrapTag} from "#app/data/arena-tag";
import {getIsInitialized, initI18n} from "#app/plugins/i18n";
import i18next from "i18next";
import { PartyMemberStrength } from "#enums/party-member-strength";
import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type";
export enum TrainerVariant {
DEFAULT,

View File

@ -7,7 +7,7 @@ import { EndEvolutionPhase, EvolutionPhase } from "./evolution-phase";
import Pokemon, { EnemyPokemon, PlayerPokemon } from "./field/pokemon";
import { Mode } from "./ui/ui";
import PartyUiHandler from "./ui/party-ui-handler";
import { BattleSpec } from "#enums/battle-spec";
import { BattleSpec } from "#enums";
import { BattlePhase, MovePhase, PokemonHealPhase } from "./phases";
import { getTypeRgb } from "./data/type";

View File

@ -2,12 +2,11 @@ import i18next from "i18next";
import { classicFixedBattles, FixedBattleConfig, FixedBattleConfigs } from "./battle";
import BattleScene from "./battle-scene";
import { allChallenges, applyChallenges, Challenge, ChallengeType, copyChallenge } from "./data/challenge";
import { Biome, Species } from "#enums";
import PokemonSpecies, { allSpecies } from "./data/pokemon-species";
import { Arena } from "./field/arena";
import * as Overrides from "./overrides";
import * as Utils from "./utils";
import { Biome } from "#enums/biome";
import { Species } from "#enums/species";
export enum GameModes {
CLASSIC,

View File

@ -10,6 +10,7 @@ import {Mode} from "./ui/ui";
import SettingsGamepadUiHandler from "./ui/settings/settings-gamepad-ui-handler";
import SettingsKeyboardUiHandler from "./ui/settings/settings-keyboard-ui-handler";
import cfg_keyboard_qwerty from "./configs/inputs/cfg_keyboard_qwerty";
import {Button, Device} from "#enums";
import {
assign,
getButtonWithKeycode,
@ -19,8 +20,6 @@ import BattleScene from "./battle-scene";
import {SettingGamepad} from "#app/system/settings/settings-gamepad.js";
import {SettingKeyboard} from "#app/system/settings/settings-keyboard";
import TouchControl from "#app/touch-controls";
import { Button } from "#enums/buttons";
import { Device } from "#enums/devices";
export interface DeviceMapping {
[key: string]: number;

View File

@ -1,4 +1,5 @@
import { GachaType } from "./data/egg";
import { Biome, TrainerType } from "#enums";
import { trainerConfigs } from "./data/trainer-config";
import { getBiomeHasProps } from "./field/arena";
import CacheBustedLoaderPlugin from "./plugins/cache-busted-loader-plugin";
@ -20,8 +21,6 @@ import { initChallenges } from "./data/challenge";
import i18next from "i18next";
import { initStatsKeys } from "./ui/game-stats-ui-handler";
import { initVouchers } from "./system/voucher";
import { Biome } from "#enums/biome";
import { TrainerType } from "#enums/trainer-type";
export class LoadingScene extends SceneBase {
constructor() {

View File

@ -2931,7 +2931,7 @@ export const move: MoveTranslationEntries = {
},
bouncyBubble: {
name: "Vapodrenaje",
effect: "Ataca lanzando proyectiles de agua y recupera una cantidad de PS equivalente a la del daño causado.",
effect: "Ataca lanzando proyectiles de agua y recupera una cantidad de PS equivalente a la mitad del daño causado.",
},
buzzyBuzz: {
name: "Joltioparálisis",

View File

@ -2931,7 +2931,7 @@ export const move: MoveTranslationEntries = {
},
"bouncyBubble": {
name: "Évo-Thalasso",
effect: "Ladversaire est frappé par des bulles deau qui sont ensuite absorbées pour récupérer un nombre de PV égal aux dégâts infligés à lennemi."
effect: "Évoli frappe ladversaire avec des bulles deau quil absorbe ensuite pour récupérer un nombre de PV égal à la moitié des dégâts infligés à lennemi."
},
"buzzyBuzz": {
name: "Évo-Dynamo",

View File

@ -2931,7 +2931,7 @@ export const move: MoveTranslationEntries = {
},
bouncyBubble: {
name: "Bollaslurp",
effect: "Chi la usa colpisce il bersaglio con una raffica di bolle, per poi assorbirle e recuperare una quantità di PS pari alla del danno inferto.",
effect: "Chi la usa colpisce il bersaglio con una raffica di bolle, per poi assorbirle e recuperare una quantità di PS pari alla metà del danno inferto.",
},
buzzyBuzz: {
name: "Elettrozap",

View File

@ -2937,7 +2937,7 @@ export const move: MoveTranslationEntries = {
},
bouncyBubble: {
name: "생생버블",
effect: "물덩어리를 부딪쳐서 공격한다. 물을 흡수하여 데미지의 절만큼 HP를 회복한다."
effect: "물덩어리를 부딪쳐서 공격한다. 물을 흡수하여 데미지의 절만큼 HP를 회복한다."
},
buzzyBuzz: {
name: "찌릿찌릿일렉",

View File

@ -2931,7 +2931,7 @@ export const move: MoveTranslationEntries = {
},
"bouncyBubble": {
name: "活活气泡",
effect: "投掷水球进行攻击。吸水后\n能回复等同于造成的伤害\n的HP",
effect: "投掷水球进行攻击。吸水后\n能回复等同于造成的伤害\n的HP",
},
"buzzyBuzz": {
name: "麻麻电击",

View File

@ -2817,7 +2817,7 @@ export const move: MoveTranslationEntries = {
},
bouncyBubble: {
name: "活活氣泡",
effect: "投擲水球進行攻擊。吸水後\n能回覆等同於造成的傷害\n的HP",
effect: "投擲水球進行攻擊。吸水後\n能回覆等同於造成的傷害\n的HP",
},
buzzyBuzz: {
name: "麻麻電擊",

View File

@ -1,4 +1,4 @@
import { BattleSpec } from "#enums/battle-spec";
import { BattleSpec } from "#enums";
import Pokemon from "./field/pokemon";
import i18next from "./plugins/i18n";

View File

@ -1,5 +1,6 @@
import * as Modifiers from "./modifier";
import { AttackMove, allMoves } from "../data/move";
import { Abilities, BattlerTagType, BerryType, Moves } from "#enums";
import { PokeballType, getPokeballCatchMultiplier, getPokeballName } from "../data/pokeball";
import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from "../field/pokemon";
import { EvolutionItem, pokemonEvolutions } from "../data/pokemon-evolutions";
@ -22,10 +23,6 @@ import i18next from "#app/plugins/i18n";
import { getModifierTierTextTint } from "#app/ui/text";
import * as Overrides from "../overrides";
import { MoneyMultiplierModifier } from "./modifier";
import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type";
import { BerryType } from "#enums/berry-type";
import { Moves } from "#enums/moves";
const outputModifierData = false;
const useMaxWeightForOutput = false;

View File

@ -13,8 +13,7 @@ import { getPokemonMessage } from "../messages";
import * as Utils from "../utils";
import { TempBattleStat } from "../data/temp-battle-stat";
import { getBerryEffectFunc, getBerryPredicate } from "../data/berry";
import { BattlerTagType} from "#enums/battler-tag-type";
import { BerryType } from "#enums/berry-type";
import { BattlerTagType, BerryType } from "#enums";
import { StatusEffect, getStatusEffectHealText } from "../data/status-effect";
import { achvs } from "../system/achv";
import { VoucherType } from "../system/voucher";

View File

@ -1,3 +1,4 @@
import { Species, Abilities, Biome, Moves, BerryType, TimeOfDay } from "#enums";
import { WeatherType } from "./data/weather";
import { Variant } from "./data/variant";
import { TempBattleStat } from "./data/temp-battle-stat";
@ -10,12 +11,6 @@ import { Gender } from "./data/gender";
import { StatusEffect } from "./data/status-effect";
import { modifierTypes } from "./modifier/modifier-type";
import { allSpecies } from "./data/pokemon-species"; // eslint-disable-line @typescript-eslint/no-unused-vars
import { Abilities } from "#enums/abilities";
import { BerryType } from "#enums/berry-type";
import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
/**
* Overrides for testing different in game situations

View File

@ -1,6 +1,7 @@
import BattleScene, { bypassLogin } from "./battle-scene";
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
import * as Utils from "./utils";
import { Abilities, ArenaTagType, BattleSpec, BattleStyle, BattlerTagType, Biome, ExpNotification, Moves, PlayerGender, Species, TrainerType } from "#enums";
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, BypassRedirectAttr, FixedDamageAttr, PostVictoryStatChangeAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr, IncrementMovePriorityAttr } from "./data/move";
import { Mode } from "./ui/ui";
import { Command } from "./ui/command-ui-handler";
@ -54,17 +55,6 @@ import * as Overrides from "./overrides";
import { TextStyle, addTextObject } from "./ui/text";
import { Type } from "./data/type";
import { BerryUsedEvent, EncounterPhaseEvent, MoveUsedEvent, TurnEndEvent, TurnInitEvent } from "./events/battle-scene";
import { Abilities } from "#enums/abilities";
import { ArenaTagType } from "#enums/arena-tag-type";
import { BattleSpec } from "#enums/battle-spec";
import { BattleStyle } from "#enums/battle-style";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Biome } from "#enums/biome";
import { ExpNotification } from "#enums/exp-notification";
import { Moves } from "#enums/moves";
import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type";
export class LoginPhase extends Phase {

View File

@ -3,7 +3,7 @@ import BattleScene from "../battle-scene";
import { TurnHeldItemTransferModifier } from "../modifier/modifier";
import i18next from "../plugins/i18n";
import * as Utils from "../utils";
import { PlayerGender } from "#enums/player-gender";
import { PlayerGender } from "#enums";
import { ParseKeys } from "i18next";
import { Challenge, SingleGenerationChallenge, SingleTypeChallenge } from "#app/data/challenge.js";

View File

@ -1,6 +1,6 @@
import { Arena } from "../field/arena";
import { ArenaTag } from "../data/arena-tag";
import { Biome } from "#enums/biome";
import { Biome } from "#enums";
import { Weather } from "../data/weather";
import { Terrain } from "#app/data/terrain.js";

View File

@ -2,6 +2,7 @@ import BattleScene, { PokeballCounts, bypassLogin } from "../battle-scene";
import Pokemon, { EnemyPokemon, PlayerPokemon } from "../field/pokemon";
import { pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions";
import PokemonSpecies, { allSpecies, getPokemonSpecies, noStarterFormKeys, speciesStarters } from "../data/pokemon-species";
import { Species, defaultStarterSpecies, Moves, Device, PlayerGender, GameDataType } from "#enums";
import * as Utils from "../utils";
import * as Overrides from "../overrides";
import PokemonData from "./pokemon-data";
@ -34,23 +35,6 @@ import { TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena.js";
import { EnemyAttackStatusEffectChanceModifier } from "../modifier/modifier";
import { StatusEffect } from "#app/data/status-effect.js";
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";
export const defaultStarterSpecies: Species[] = [
Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE,
Species.CHIKORITA, Species.CYNDAQUIL, Species.TOTODILE,
Species.TREECKO, Species.TORCHIC, Species.MUDKIP,
Species.TURTWIG, Species.CHIMCHAR, Species.PIPLUP,
Species.SNIVY, Species.TEPIG, Species.OSHAWOTT,
Species.CHESPIN, Species.FENNEKIN, Species.FROAKIE,
Species.ROWLET, Species.LITTEN, Species.POPPLIO,
Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE,
Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY
];
const saveKey = "x0i2O7WRiANTqPmZ"; // Temporary; secure encryption is not yet necessary

View File

@ -1,5 +1,6 @@
import { BattleType } from "../battle";
import BattleScene from "../battle-scene";
import { Biome, Species, Moves } from "#enums";
import { Gender } from "../data/gender";
import { Nature } from "../data/nature";
import { PokeballType } from "../data/pokeball";
@ -9,9 +10,6 @@ import Pokemon, { EnemyPokemon, PokemonMove, PokemonSummonData } from "../field/
import { TrainerSlot } from "../data/trainer-config";
import { Variant } from "#app/data/variant";
import { loadBattlerTag } from "../data/battler-tags";
import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
export default class PokemonData {
public id: integer;

View File

@ -2,7 +2,7 @@ import BattleScene from "../../battle-scene";
import SettingsGamepadUiHandler from "../../ui/settings/settings-gamepad-ui-handler";
import {Mode} from "../../ui/ui";
import {truncateString} from "../../utils";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
import {SettingKeyboard} from "#app/system/settings/settings-keyboard";
export enum SettingGamepad {

View File

@ -1,4 +1,4 @@
import {Button} from "#enums/buttons";
import {Button} from "#enums";
import BattleScene from "#app/battle-scene";
import {Mode} from "#app/ui/ui";
import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler";

View File

@ -3,11 +3,9 @@ import i18next from "i18next";
import BattleScene from "../../battle-scene";
import { hasTouchscreen } from "../../touch-controls";
import { updateWindowType } from "../../ui/ui-theme";
import { PlayerGender, MoneyFormat, EaseType } from "#enums";
import { CandyUpgradeNotificationChangedEvent } from "../../events/battle-scene";
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";
const MUTE = "Mute";
const VOLUME_OPTIONS = new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : MUTE);
@ -463,7 +461,8 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
if (scene.ui) {
const cancelHandler = () => {
scene.ui.revertMode();
(scene.ui.getHandler() as SettingsUiHandler).setOptionCursor(0, 0, true);
const languageSetting = Setting.find(setting => setting.key === SettingKeys.Language);
(scene.ui.getHandler() as SettingsUiHandler).setOptionCursor(Setting.indexOf(languageSetting), 0, true);
};
const changeLocaleHandler = (locale: string): boolean => {
try {

View File

@ -1,5 +1,5 @@
import BattleScene from "../battle-scene";
import { TrainerType } from "#enums/trainer-type";
import { TrainerType } from "#enums";
import Trainer, { TrainerVariant } from "../field/trainer";
export default class TrainerData {

View File

@ -1,8 +1,7 @@
import BattleScene from "../battle-scene";
import i18next from "../plugins/i18n";
import { Achv, AchvTier, achvs, getAchievementDescription } from "./achv";
import { PlayerGender } from "#enums/player-gender";
import { TrainerType } from "#enums/trainer-type";
import { PlayerGender, TrainerType } from "#enums";
export enum VoucherType {
REGULAR,

View File

@ -2,9 +2,9 @@ import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vi
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import * as Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Moves } from "#enums";
import { Abilities } from "#enums";
import { Species } from "#enums";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";

View File

@ -2,9 +2,9 @@ import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vi
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import * as Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Moves } from "#enums";
import { Abilities } from "#enums";
import { Species } from "#enums";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities, Species, Moves} from "#enums";
import {
CommandPhase, DamagePhase, EncounterPhase,
EnemyCommandPhase, SelectStarterPhase,
@ -13,9 +14,6 @@ import {generateStarter, getMovePosition} from "#app/test/utils/gameManagerUtils
import {Command} from "#app/ui/command-ui-handler";
import {Status, StatusEffect} from "#app/data/status-effect";
import {GameModes, getGameMode} from "#app/game-mode";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Abilities - Intimidate", () => {

View File

@ -2,8 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities} from "#enums/abilities";
import {Species} from "#enums/species";
import {Abilities, Species} from "#enums";
import {
CommandPhase,
} from "#app/phases";

View File

@ -2,16 +2,16 @@ import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager";
import * as Overrides from "#app/overrides";
import { Species } from "#enums/species";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums";
import { Abilities } from "#enums";
import { Moves } from "#enums";
import { getMovePosition } from "../utils/gameManagerUtils";
import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js";
import { allMoves } from "#app/data/move.js";
import { BattlerTagType } from "#enums/battler-tag-type";
import { BattlerTagType } from "#enums";
import { Weather, WeatherType } from "#app/data/weather.js";
import { Type } from "#app/data/type.js";
import { Biome } from "#enums/biome";
import { Biome } from "#enums";
import { PlayerPokemon } from "#app/field/pokemon.js";
const TIMEOUT = 20 * 1000;

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities, Moves, Species} from "#enums";
import {
CommandPhase,
EnemyCommandPhase,
@ -12,9 +13,6 @@ import {Stat} from "#app/data/pokemon-stat";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import {Command} from "#app/ui/command-ui-handler";
import {BattleStat} from "#app/data/battle-stat";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Abilities - Moxie", () => {

View File

@ -2,9 +2,9 @@ import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vi
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import * as Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Moves } from "#enums";
import { Abilities } from "#enums";
import { Species } from "#enums";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";

View File

@ -2,16 +2,16 @@ import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager";
import * as Overrides from "#app/overrides";
import { Species } from "#enums/species";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums";
import { Abilities } from "#enums";
import { Moves } from "#enums";
import { getMovePosition } from "../utils/gameManagerUtils";
import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js";
import { allMoves } from "#app/data/move.js";
import { BattlerTagType } from "#enums/battler-tag-type";
import { BattlerTagType } from "#enums";
import { Weather, WeatherType } from "#app/data/weather.js";
import { Type } from "#app/data/type.js";
import { Biome } from "#enums/biome";
import { Biome } from "#enums";
import { PlayerPokemon } from "#app/field/pokemon.js";
const TIMEOUT = 20 * 1000;

View File

@ -3,15 +3,15 @@ import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {
MoveEndPhase, TurnEndPhase,
CommandPhase,
EnemyCommandPhase, MoveEndPhase, TurnEndPhase,
} from "#app/phases";
import {Mode} from "#app/ui/ui";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import {Command} from "#app/ui/command-ui-handler";
import { Abilities, BattlerTagType, Moves, Species } from "#enums";
import { BattleStat } from "#app/data/battle-stat.js";
import { TerrainType } from "#app/data/terrain.js";
import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
// See also: TypeImmunityAbAttr
describe("Abilities - Sap Sipper", () => {
@ -47,9 +47,15 @@ describe("Abilities - Sap Sipper", () => {
const startingOppHp = game.scene.currentBattle.enemyParty[0].hp;
game.doAttack(getMovePosition(game.scene, 0, moveToUse));
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
game.scene.ui.setMode(Mode.FIGHT, (game.scene.getCurrentPhase() as CommandPhase).getFieldIndex());
});
game.onNextPrompt("CommandPhase", Mode.FIGHT, () => {
const movePosition = getMovePosition(game.scene, 0, moveToUse);
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
});
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase);
expect(startingOppHp - game.scene.getEnemyParty()[0].hp).toBe(0);
expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1);
@ -66,9 +72,15 @@ describe("Abilities - Sap Sipper", () => {
await game.startBattle();
game.doAttack(getMovePosition(game.scene, 0, moveToUse));
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
game.scene.ui.setMode(Mode.FIGHT, (game.scene.getCurrentPhase() as CommandPhase).getFieldIndex());
});
game.onNextPrompt("CommandPhase", Mode.FIGHT, () => {
const movePosition = getMovePosition(game.scene, 0, moveToUse);
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
});
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase);
expect(game.scene.getEnemyParty()[0].status).toBeUndefined();
expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1);
@ -85,36 +97,21 @@ describe("Abilities - Sap Sipper", () => {
await game.startBattle();
game.doAttack(getMovePosition(game.scene, 0, moveToUse));
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
game.scene.ui.setMode(Mode.FIGHT, (game.scene.getCurrentPhase() as CommandPhase).getFieldIndex());
});
game.onNextPrompt("CommandPhase", Mode.FIGHT, () => {
const movePosition = getMovePosition(game.scene, 0, moveToUse);
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
});
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase);
expect(game.scene.arena.terrain).toBeDefined();
expect(game.scene.arena.terrain.terrainType).toBe(TerrainType.GRASSY);
expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(0);
});
it("activate once against multi-hit grass attacks", async() => {
const moveToUse = Moves.BULLET_SEED;
const enemyAbility = Abilities.SAP_SIPPER;
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(enemyAbility);
await game.startBattle();
const startingOppHp = game.scene.currentBattle.enemyParty[0].hp;
game.doAttack(getMovePosition(game.scene, 0, moveToUse));
await game.phaseInterceptor.to(TurnEndPhase);
expect(startingOppHp - game.scene.getEnemyParty()[0].hp).toBe(0);
expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1);
});
it("do not activate against status moves that target the user", async() => {
const moveToUse = Moves.SPIKY_SHIELD;
const ability = Abilities.SAP_SIPPER;
@ -138,29 +135,4 @@ describe("Abilities - Sap Sipper", () => {
expect(game.scene.getParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(0);
expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase");
});
/*
// TODO Add METRONOME outcome override
// To run this testcase, manually modify the METRONOME move to always give SAP_SIPPER, then uncomment
it("activate once against multi-hit grass attacks (metronome)", async() => {
const moveToUse = Moves.METRONOME;
const enemyAbility = Abilities.SAP_SIPPER;
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(enemyAbility);
await game.startBattle();
const startingOppHp = game.scene.currentBattle.enemyParty[0].hp;
game.doAttack(getMovePosition(game.scene, 0, moveToUse));
await game.phaseInterceptor.to(TurnEndPhase);
expect(startingOppHp - game.scene.getEnemyParty()[0].hp).toBe(0);
expect(game.scene.getEnemyParty()[0].summonData.battleStats[BattleStat.ATK]).toBe(1);
});
*/
});

View File

@ -2,9 +2,9 @@ import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vi
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import * as Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Moves } from "#enums";
import { Abilities } from "#enums";
import { Species } from "#enums";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";

View File

@ -2,9 +2,9 @@ import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vi
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import * as Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Moves } from "#enums";
import { Abilities } from "#enums";
import { Species } from "#enums";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";

View File

@ -6,11 +6,8 @@ import {
TurnEndPhase,
} from "#app/phases";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import { Abilities, BattlerTagType, Moves, Species } from "#enums";
import { BattleStat } from "#app/data/battle-stat.js";
import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
// See also: TypeImmunityAbAttr
describe("Abilities - Volt Absorb", () => {

View File

@ -16,13 +16,11 @@ import {
} from "#app/phases";
import { Mode } from "#app/ui/ui";
import { Stat } from "#app/data/pokemon-stat";
import { Abilities, Moves, Species } from "#enums";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler";
import { QuietFormChangePhase } from "#app/form-change-phase";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
const TIMEOUT = 20 * 1000;

View File

@ -2,9 +2,9 @@ import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vi
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import * as Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Moves } from "#enums";
import { Abilities } from "#enums";
import { Species } from "#enums";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities, Species, Moves, Button} from "#enums";
import {
CommandPhase, EnemyCommandPhase, SelectTargetPhase,
TurnStartPhase
@ -11,10 +12,6 @@ import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import {Command} from "#app/ui/command-ui-handler";
import {Stat} from "#app/data/pokemon-stat";
import TargetSelectUiHandler from "#app/ui/target-select-ui-handler";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import {Button} from "#enums/buttons";
describe("Battle order", () => {

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import {generateStarter, getMovePosition,} from "#app/test/utils/gameManagerUtils";
import {Mode} from "#app/ui/ui";
import {GameModes} from "#app/game-mode";
import {Species, Moves, PlayerGender, Abilities} from "#enums";
import * as overrides from "../../overrides";
import {Command} from "#app/ui/command-ui-handler";
import {
@ -20,10 +21,6 @@ import GameManager from "#app/test/utils/gameManager";
import Phaser from "phaser";
import {allSpecies} from "#app/data/pokemon-species";
import { getGameMode } from "#app/game-mode.js";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
describe("Test Battle Phase", () => {
let phaserGame: Phaser.Game;

View File

@ -2,9 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import GameManager from "#app/test/utils/gameManager";
import Phaser from "phaser";
import * as overrides from "#app/overrides";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import {Species, Moves, Abilities} from "#enums";
describe("Test Battle Phase", () => {
let phaserGame: Phaser.Game;

View File

@ -1,14 +1,12 @@
import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest";
import {Mode} from "#app/ui/ui";
import {Species, Moves, Abilities} from "#enums";
import * as overrides from "../../overrides";
import {
CommandPhase,
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import Phaser from "phaser";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Test Battle Phase", () => {
let phaserGame: Phaser.Game;

View File

@ -1,7 +1,7 @@
import {beforeAll, describe, expect, it} from "vitest";
import BattleScene from "../../battle-scene";
import { getLegendaryGachaSpeciesForTimestamp } from "#app/data/egg.js";
import { Species } from "#enums/species";
import { Species } from "#enums";
import Phaser from "phaser";
describe("getLegendaryGachaSpeciesForTimestamp", () => {

View File

@ -5,7 +5,7 @@ async function importModule() {
try {
initStatsKeys();
const { PokemonMove } = await import("#app/field/pokemon");
const { Species } = await import("#enums/species");
const { Species } = await import("#enums");
return {
PokemonMove,
Species,

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities, Moves, Species} from "#enums";
import {
CommandPhase,
EnemyCommandPhase,
@ -12,9 +13,6 @@ import {Mode} from "#app/ui/ui";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import {Command} from "#app/ui/command-ui-handler";
import {StatusEffect} from "#app/data/status-effect";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Items - Toxic orb", () => {

View File

@ -1,7 +1,7 @@
import {afterEach, beforeAll, describe, expect, it} from "vitest";
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import {Species} from "#enums/species";
import {Species} from "#enums";
import i18next from "i18next";
import {initI18n} from "#app/plugins/i18n";

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities, Moves, Species} from "#enums";
import {
CommandPhase,
EnemyCommandPhase,
@ -12,9 +13,6 @@ import {Stat} from "#app/data/pokemon-stat";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import {Command} from "#app/ui/command-ui-handler";
import {BattleStat} from "#app/data/battle-stat";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Moves - Growth", () => {

View File

@ -2,12 +2,10 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities, Moves, Species} from "#enums";
import {
CommandPhase
} from "#app/phases";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Moves - Spikes", () => {

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Moves, Species} from "#enums";
import {
CommandPhase,
EnemyCommandPhase, TurnEndPhase,
@ -10,8 +11,6 @@ import {Mode} from "#app/ui/ui";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import {Command} from "#app/ui/command-ui-handler";
import {Stat} from "#app/data/pokemon-stat";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Moves - Tackle", () => {

View File

@ -2,6 +2,7 @@ import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import {Abilities, Moves, Species} from "#enums";
import {
CommandPhase,
EnemyCommandPhase,
@ -11,9 +12,6 @@ import {Mode} from "#app/ui/ui";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import {Command} from "#app/ui/command-ui-handler";
import {BattleStat} from "#app/data/battle-stat";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
describe("Moves - Tail whip", () => {

View File

@ -1,4 +1,5 @@
import {beforeEach, describe, expect, it} from "vitest";
import {Button, Device} from "#enums";
import {deepCopy} from "#app/utils";
import {
getKeyWithKeycode,
@ -9,8 +10,6 @@ import {InGameManip} from "#app/test/settingMenu/helpers/inGameManip";
import {InterfaceConfig} from "#app/inputs-controller";
import cfg_keyboard_qwerty from "#app/configs/inputs/cfg_keyboard_qwerty";
import {SettingKeyboard} from "#app/system/settings/settings-keyboard";
import { Device } from "#enums/devices";
import { Button } from "#enums/buttons";
describe("Test Rebinding", () => {

View File

@ -15,9 +15,7 @@ import {OptionSelectItem} from "#app/ui/abstact-option-select-ui-handler";
import {Gender} from "#app/data/gender";
import {allSpecies} from "#app/data/pokemon-species";
import {Nature} from "#app/data/nature";
import { Button } from "#enums/buttons";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import {Abilities, Button, Species} from "#enums";
describe("UI - Starter select", () => {

View File

@ -22,13 +22,9 @@ import {EnemyPokemon, PlayerPokemon} from "#app/field/pokemon";
import {MockClock} from "#app/test/utils/mocks/mockClock";
import {Command} from "#app/ui/command-ui-handler";
import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler";
import {Button, ExpNotification, GameDataType, PlayerGender, Species} from "#enums";
import PartyUiHandler, {PartyUiMode} from "#app/ui/party-ui-handler";
import Trainer from "#app/field/trainer";
import { ExpNotification } from "#enums/exp-notification";
import { GameDataType } from "#enums/game-data-type";
import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { Button } from "#enums/buttons";
/**
* Class to manage the game state and transitions between phases.

View File

@ -1,7 +1,7 @@
// Function to convert Blob to string
import {getDailyRunStarters} from "#app/data/daily-run";
import {Gender} from "#app/data/gender";
import {Species} from "#enums/species";
import {Species} from "#enums";
import {Starter} from "#app/ui/starter-select-ui-handler";
import {GameModes, getGameMode} from "#app/game-mode";
import {getPokemonSpecies, getPokemonSpeciesForm} from "#app/data/pokemon-species";

View File

@ -1,4 +1,4 @@
import {Button} from "#enums/buttons";
import {Button} from "#enums";
import EventEmitter = Phaser.Events.EventEmitter;
import BattleScene from "./battle-scene";

View File

@ -5,7 +5,7 @@ import MessageUiHandler from "./ui/message-ui-handler";
import StarterSelectUiHandler from "./ui/starter-select-ui-handler";
import {Setting, SettingKeys, settingIndex} from "./system/settings/settings";
import SettingsUiHandler from "./ui/settings/settings-ui-handler";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
import SettingsGamepadUiHandler from "./ui/settings/settings-gamepad-ui-handler";
import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler";
import BattleScene from "./battle-scene";

View File

@ -5,7 +5,7 @@ import UiHandler from "./ui-handler";
import { addWindow } from "./ui-theme";
import * as Utils from "../utils";
import { argbFromRgba } from "@material/material-color-utilities";
import {Button} from "#enums/buttons";
import {Button} from "#enums";
export interface OptionSelectConfig {
xOffset?: number;

View File

@ -2,7 +2,7 @@ import BattleScene from "../battle-scene";
import { Achv, getAchievementDescription } from "../system/achv";
import { Voucher } from "../system/voucher";
import { TextStyle, addTextObject } from "./text";
import { PlayerGender } from "#enums/player-gender";
import { PlayerGender } from "#enums";
export default class AchvBar extends Phaser.GameObjects.Container {
private defaultWidth: number;

View File

@ -1,5 +1,5 @@
import BattleScene from "../battle-scene";
import { Button } from "#enums/buttons";
import { Button, PlayerGender } from "#enums";
import i18next from "../plugins/i18n";
import { Achv, achvs, getAchievementDescription } from "../system/achv";
import MessageUiHandler from "./message-ui-handler";
@ -7,7 +7,6 @@ import { addTextObject, TextStyle } from "./text";
import { Mode } from "./ui";
import { addWindow } from "./ui-theme";
import { ParseKeys } from "i18next";
import { PlayerGender } from "#enums/player-gender";
export default class AchvsUiHandler extends MessageUiHandler {
private achvsContainer: Phaser.GameObjects.Container;

View File

@ -6,7 +6,7 @@ import { TerrainType } from "#app/data/terrain.js";
import { addWindow, WindowVariant } from "./ui-theme";
import { ArenaEvent, ArenaEventType, TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena.js";
import { BattleSceneEventType, TurnEndEvent } from "../events/battle-scene";
import { ArenaTagType } from "#enums/arena-tag-type";
import { ArenaTagType } from "#enums";
import TimeOfDayWidget from "./time-of-day-widget";
import * as Utils from "../utils";

Some files were not shown because too many files have changed in this diff Show More