diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3e6b8bf6d0d..a30cb642a46 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -30,7 +30,7 @@ - [ ] The PR is self-contained and cannot be split into smaller PRs? - [ ] Have I provided a clear explanation of the changes? - [ ] Have I considered writing automated tests for the issue? -- [ ] If I have text, did I add make it translatable and added a key in the English language? +- [ ] If I have text, did I make it translatable and add a key in the English locale file(s)? - [ ] Have I tested the changes (manually)? - [ ] Are all unit tests still passing? (`npm run test`) - [ ] Are the changes visual? diff --git a/public/images/types_ja.png b/public/images/types_ja.png index e60d8e071aa..a6f3b00607f 100644 Binary files a/public/images/types_ja.png and b/public/images/types_ja.png differ diff --git a/public/images/ui/egg_summary_bg.png b/public/images/ui/egg_summary_bg.png index b4ee3d86a50..e81934b9d75 100644 Binary files a/public/images/ui/egg_summary_bg.png and b/public/images/ui/egg_summary_bg.png differ diff --git a/src/@types/common.ts b/src/@types/common.ts index 6868d766008..fcd946656dc 100644 --- a/src/@types/common.ts +++ b/src/@types/common.ts @@ -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; diff --git a/src/@types/i18next.d.ts b/src/@types/i18next.d.ts index d895659acef..9e8418a8977 100644 --- a/src/@types/i18next.d.ts +++ b/src/@types/i18next.d.ts @@ -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 diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 4ca785faf99..16498bcd9c4 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -4,7 +4,7 @@ import Pokemon, { PlayerPokemon, EnemyPokemon } from "./field/pokemon"; import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies } from "./data/pokemon-species"; import { Constructor, isNullOrUndefined } from "#app/utils"; import * as Utils from "./utils"; -import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, TurnHeldItemTransferModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier, overrideModifiers, overrideHeldItems } from "./modifier/modifier"; +import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, TurnHeldItemTransferModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier, overrideModifiers, overrideHeldItems, PokemonIncrementingStatModifier, ExpShareModifier, ExpBalanceModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier } from "./modifier/modifier"; import { PokeballType } from "./data/pokeball"; import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets, populateAnims } from "./data/battle-anims"; import { Phase } from "./phase"; @@ -73,7 +73,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"; @@ -96,10 +96,13 @@ import { TurnInitPhase } from "./phases/turn-init-phase"; import { ShopCursorTarget } from "./enums/shop-cursor-target"; import MysteryEncounter from "./data/mystery-encounters/mystery-encounter"; import { allMysteryEncounters, ANTI_VARIANCE_WEIGHT_MODIFIER, AVERAGE_ENCOUNTERS_PER_RUN_TARGET, BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT, mysteryEncountersByBiome, WEIGHT_INCREMENT_ON_SPAWN_MISS } from "./data/mystery-encounters/mystery-encounters"; -import { MysteryEncounterData } from "#app/data/mystery-encounters/mystery-encounter-data"; +import { MysteryEncounterSaveData } from "#app/data/mystery-encounters/mystery-encounter-save-data"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import HeldModifierConfig from "#app/interfaces/held-modifier-config"; +import { ExpPhase } from "#app/phases/exp-phase"; +import { ShowPartyExpBarPhase } from "#app/phases/show-party-exp-bar-phase"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; @@ -253,7 +256,7 @@ export default class BattleScene extends SceneBase { public money: integer; public pokemonInfoContainer: PokemonInfoContainer; private party: PlayerPokemon[]; - public mysteryEncounterData: MysteryEncounterData = new MysteryEncounterData(null); + public mysteryEncounterSaveData: MysteryEncounterSaveData = new MysteryEncounterSaveData(null); public lastMysteryEncounter?: MysteryEncounter; /** Combined Biome and Wave count text */ private biomeWaveText: Phaser.GameObjects.Text; @@ -1168,8 +1171,8 @@ export default class BattleScene extends SceneBase { const roll = Utils.randSeedInt(256); // Base spawn weight is BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT/256, and increases by WEIGHT_INCREMENT_ON_SPAWN_MISS/256 for each missed attempt at spawning an encounter on a valid floor - const sessionEncounterRate = this.mysteryEncounterData.encounterSpawnChance; - const encounteredEvents = this.mysteryEncounterData.encounteredEvents; + const sessionEncounterRate = this.mysteryEncounterSaveData.encounterSpawnChance; + const encounteredEvents = this.mysteryEncounterSaveData.encounteredEvents; // If total number of encounters is lower than expected for the run, slightly favor a new encounter spawn (reverse as well) // Reduces occurrence of runs with total encounters significantly different from AVERAGE_ENCOUNTERS_PER_RUN_TARGET @@ -1185,9 +1188,9 @@ export default class BattleScene extends SceneBase { if (canSpawn && roll < successRate) { newBattleType = BattleType.MYSTERY_ENCOUNTER; // Reset base spawn weight - this.mysteryEncounterData.encounterSpawnChance = BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT; + this.mysteryEncounterSaveData.encounterSpawnChance = BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT; } else { - this.mysteryEncounterData.encounterSpawnChance = sessionEncounterRate + WEIGHT_INCREMENT_ON_SPAWN_MISS; + this.mysteryEncounterSaveData.encounterSpawnChance = sessionEncounterRate + WEIGHT_INCREMENT_ON_SPAWN_MISS; } } } @@ -2917,6 +2920,100 @@ export default class BattleScene extends SceneBase { this.shiftPhase(); } + applyPartyExp(expValue: number, pokemonDefeated: boolean, useWaveIndexMultiplier?: boolean, pokemonParticipantIds?: Set): void { + const participantIds = pokemonParticipantIds ?? this.currentBattle.playerParticipantIds; + const party = this.getParty(); + const expShareModifier = this.findModifier(m => m instanceof ExpShareModifier) as ExpShareModifier; + const expBalanceModifier = this.findModifier(m => m instanceof ExpBalanceModifier) as ExpBalanceModifier; + const multipleParticipantExpBonusModifier = this.findModifier(m => m instanceof MultipleParticipantExpBonusModifier) as MultipleParticipantExpBonusModifier; + const nonFaintedPartyMembers = party.filter(p => p.hp); + const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < this.getMaxExpLevel()); + const partyMemberExp: number[] = []; + // EXP value calculation is based off Pokemon.getExpValue + if (useWaveIndexMultiplier) { + expValue = Math.floor(expValue * this.currentBattle.waveIndex / 5 + 1); + } + + if (participantIds.size > 0) { + if (this.currentBattle.battleType === BattleType.TRAINER || this.currentBattle.mysteryEncounter?.encounterMode === MysteryEncounterMode.TRAINER_BATTLE) { + expValue = Math.floor(expValue * 1.5); + } else if (this.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER && this.currentBattle.mysteryEncounter) { + expValue = Math.floor(expValue * this.currentBattle.mysteryEncounter.expMultiplier); + } + for (const partyMember of nonFaintedPartyMembers) { + const pId = partyMember.id; + const participated = participantIds.has(pId); + if (participated && pokemonDefeated) { + partyMember.addFriendship(2); + const machoBraceModifier = partyMember.getHeldItems().find(m => m instanceof PokemonIncrementingStatModifier); + if (machoBraceModifier && machoBraceModifier.stackCount < machoBraceModifier.getMaxStackCount(this)) { + machoBraceModifier.stackCount++; + this.updateModifiers(true, true); + partyMember.updateInfo(); + } + } + if (!expPartyMembers.includes(partyMember)) { + continue; + } + if (!participated && !expShareModifier) { + partyMemberExp.push(0); + continue; + } + let expMultiplier = 0; + if (participated) { + expMultiplier += (1 / participantIds.size); + if (participantIds.size > 1 && multipleParticipantExpBonusModifier) { + expMultiplier += multipleParticipantExpBonusModifier.getStackCount() * 0.2; + } + } else if (expShareModifier) { + expMultiplier += (expShareModifier.getStackCount() * 0.2) / participantIds.size; + } + if (partyMember.pokerus) { + expMultiplier *= 1.5; + } + if (Overrides.XP_MULTIPLIER_OVERRIDE !== null) { + expMultiplier = Overrides.XP_MULTIPLIER_OVERRIDE; + } + const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier); + this.applyModifiers(PokemonExpBoosterModifier, true, partyMember, pokemonExp); + partyMemberExp.push(Math.floor(pokemonExp.value)); + } + + if (expBalanceModifier) { + let totalLevel = 0; + let totalExp = 0; + expPartyMembers.forEach((expPartyMember, epm) => { + totalExp += partyMemberExp[epm]; + totalLevel += expPartyMember.level; + }); + + const medianLevel = Math.floor(totalLevel / expPartyMembers.length); + + const recipientExpPartyMemberIndexes: number[] = []; + expPartyMembers.forEach((expPartyMember, epm) => { + if (expPartyMember.level <= medianLevel) { + recipientExpPartyMemberIndexes.push(epm); + } + }); + + const splitExp = Math.floor(totalExp / recipientExpPartyMemberIndexes.length); + + expPartyMembers.forEach((_partyMember, pm) => { + partyMemberExp[pm] = Phaser.Math.Linear(partyMemberExp[pm], recipientExpPartyMemberIndexes.indexOf(pm) > -1 ? splitExp : 0, 0.2 * expBalanceModifier.getStackCount()); + }); + } + + for (let pm = 0; pm < expPartyMembers.length; pm++) { + const exp = partyMemberExp[pm]; + + if (exp) { + const partyMemberIndex = party.indexOf(expPartyMembers[pm]); + this.unshiftPhase(expPartyMembers[pm].isOnField() ? new ExpPhase(this, partyMemberIndex, exp) : new ShowPartyExpBarPhase(this, partyMemberIndex, exp)); + } + } + } + } + /** * Loads or generates a mystery encounter * @param override - used to load session encounter when restarting game, etc. @@ -2932,13 +3029,13 @@ export default class BattleScene extends SceneBase { } // Check for queued encounters first - if (!encounter && this.mysteryEncounterData?.nextEncounterQueue && this.mysteryEncounterData.nextEncounterQueue.length > 0) { + if (!encounter && this.mysteryEncounterSaveData?.queuedEncounters && this.mysteryEncounterSaveData.queuedEncounters.length > 0) { let i = 0; - while (i < this.mysteryEncounterData.nextEncounterQueue.length && !!encounter) { - const candidate = this.mysteryEncounterData.nextEncounterQueue[i]; - const forcedChance = candidate[1]; + while (i < this.mysteryEncounterSaveData.queuedEncounters.length && !!encounter) { + const candidate = this.mysteryEncounterSaveData.queuedEncounters[i]; + const forcedChance = candidate.spawnPercent; if (Utils.randSeedInt(100) < forcedChance) { - encounter = allMysteryEncounters[candidate[0]]; + encounter = allMysteryEncounters[candidate.type]; } i++; @@ -2955,7 +3052,7 @@ export default class BattleScene extends SceneBase { const tierWeights = [MysteryEncounterTier.COMMON, MysteryEncounterTier.GREAT, MysteryEncounterTier.ULTRA, MysteryEncounterTier.ROGUE]; // Adjust tier weights by previously encountered events to lower odds of only Common/Great in run - this.mysteryEncounterData.encounteredEvents.forEach(seenEncounterData => { + this.mysteryEncounterSaveData.encounteredEvents.forEach(seenEncounterData => { if (seenEncounterData.tier === MysteryEncounterTier.COMMON) { tierWeights[0] = tierWeights[0] - 6; } else if (seenEncounterData.tier === MysteryEncounterTier.GREAT) { @@ -2976,7 +3073,7 @@ export default class BattleScene extends SceneBase { let availableEncounters: MysteryEncounter[] = []; // New encounter should never be the same as the most recent encounter - const previousEncounter = this.mysteryEncounterData.encounteredEvents.length > 0 ? this.mysteryEncounterData.encounteredEvents[this.mysteryEncounterData.encounteredEvents.length - 1].type : null; + const previousEncounter = this.mysteryEncounterSaveData.encounteredEvents.length > 0 ? this.mysteryEncounterSaveData.encounteredEvents[this.mysteryEncounterSaveData.encounteredEvents.length - 1].type : null; const biomeMysteryEncounters = mysteryEncountersByBiome.get(this.arena.biomeType) ?? []; // If no valid encounters exist at tier, checks next tier down, continuing until there are some encounters available while (availableEncounters.length === 0 && tier !== null) { @@ -2995,9 +3092,9 @@ export default class BattleScene extends SceneBase { if (previousEncounter !== null && encounterType === previousEncounter) { // Previous encounter was not this one return false; } - if (this.mysteryEncounterData.encounteredEvents.length > 0 && // Encounter has not exceeded max allowed encounters + if (this.mysteryEncounterSaveData.encounteredEvents.length > 0 && // Encounter has not exceeded max allowed encounters (encounterCandidate.maxAllowedEncounters && encounterCandidate.maxAllowedEncounters > 0) - && this.mysteryEncounterData.encounteredEvents.filter(e => e.type === encounterType).length >= encounterCandidate.maxAllowedEncounters) { + && this.mysteryEncounterSaveData.encounteredEvents.filter(e => e.type === encounterType).length >= encounterCandidate.maxAllowedEncounters) { return false; } return true; diff --git a/src/configs/inputs/pad_procon.ts b/src/configs/inputs/pad_procon.ts index 8cb707f882a..be751cc3acc 100644 --- a/src/configs/inputs/pad_procon.ts +++ b/src/configs/inputs/pad_procon.ts @@ -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"; /** diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 00000000000..a2f7e47b996 --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const PLAYER_PARTY_MAX_SIZE = 6; diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 058185b47f6..51500d07098 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1984,6 +1984,33 @@ export class ExposedTag extends BattlerTag { } } +/** + * Tag that doubles the type effectiveness of Fire-type moves. + * @extends BattlerTag + */ +export class TarShotTag extends BattlerTag { + constructor() { + super(BattlerTagType.TAR_SHOT, BattlerTagLapseType.CUSTOM, 0); + } + + /** + * If the Pokemon is terastallized, the tag cannot be added. + * @param {Pokemon} pokemon the {@linkcode Pokemon} to which the tag is added + * @returns whether the tag is applied + */ + override canAdd(pokemon: Pokemon): boolean { + return !pokemon.isTerastallized(); + } + + override onAdd(pokemon: Pokemon): void { + pokemon.scene.queueMessage(i18next.t("battlerTags:tarShotOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); + } +} + +/** + * Tag that adds extra post-summon effects to a battle for a specific Pokemon + * Currently used only in MysteryEncounters to provide start of fight stat buffs + */ export class MysteryEncounterPostSummonTag extends BattlerTag { constructor(sourceMove: Moves) { super(BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON, BattlerTagLapseType.CUSTOM, 1, sourceMove); @@ -2016,6 +2043,15 @@ export class MysteryEncounterPostSummonTag extends BattlerTag { } } +/** + * Retrieves a {@linkcode BattlerTag} based on the provided tag type, turn count, source move, and source ID. + * + * @param {BattlerTagType} tagType the type of the {@linkcode BattlerTagType}. + * @param turnCount the turn count. + * @param {Moves} sourceMove the source {@linkcode Moves}. + * @param sourceId the source ID. + * @returns {BattlerTag} the corresponding {@linkcode BattlerTag} object. + */ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, sourceMove: Moves, sourceId: number): BattlerTag { switch (tagType) { case BattlerTagType.RECHARGING: @@ -2156,6 +2192,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source case BattlerTagType.GULP_MISSILE_ARROKUDA: case BattlerTagType.GULP_MISSILE_PIKACHU: return new GulpMissileTag(tagType, sourceMove); + case BattlerTagType.TAR_SHOT: + return new TarShotTag(); case BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON: return new MysteryEncounterPostSummonTag(sourceMove); case BattlerTagType.NONE: diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 62751b92f9c..2205519c532 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -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"; diff --git a/src/data/egg.ts b/src/data/egg.ts index a227cc2cf8d..bf137610b3a 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -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; diff --git a/src/data/move.ts b/src/data/move.ts index 19014c0eb30..21b859b22ac 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -3472,7 +3472,7 @@ export class SpitUpPowerAttr extends VariablePowerAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const stockpilingTag = user.getTag(StockpilingTag); - if (stockpilingTag !== null && stockpilingTag.stockpiledCount > 0) { + if (stockpilingTag && stockpilingTag.stockpiledCount > 0) { const power = args[0] as Utils.IntegerHolder; power.value = this.multiplier * stockpilingTag.stockpiledCount; return true; @@ -3490,7 +3490,7 @@ export class SwallowHealAttr extends HealAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const stockpilingTag = user.getTag(StockpilingTag); - if (stockpilingTag !== null && stockpilingTag?.stockpiledCount > 0) { + if (stockpilingTag && stockpilingTag.stockpiledCount > 0) { const stockpiled = stockpilingTag.stockpiledCount; let healRatio: number; @@ -8644,7 +8644,7 @@ export function initMoves() { .condition((user, target, move) => user.getTag(TrappedTag)?.sourceMove !== Moves.NO_RETREAT), // fails if the user is currently trapped by No Retreat new StatusMove(Moves.TAR_SHOT, Type.ROCK, 100, 15, -1, 0, 8) .attr(StatStageChangeAttr, [ Stat.SPD ], -1) - .partial(), + .attr(AddBattlerTagAttr, BattlerTagType.TAR_SHOT, false), new StatusMove(Moves.MAGIC_POWDER, Type.PSYCHIC, 100, 20, -1, 0, 8) .attr(ChangeTypeAttr, Type.PSYCHIC) .powderMove(), diff --git a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts index 2454526da4a..0b6e6a4314c 100644 --- a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts +++ b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts @@ -129,7 +129,7 @@ export const ClowningAroundEncounter: MysteryEncounter = }, { // Blacephalon has the random ability from pool, and 2 entirely random types to fit with the theme of the encounter species: getPokemonSpecies(Species.BLACEPHALON), - mysteryEncounterData: new MysteryEncounterPokemonData(undefined, ability, undefined, [randSeedInt(18), randSeedInt(18)]), + mysteryEncounterPokemonData: new MysteryEncounterPokemonData(undefined, ability, undefined, [randSeedInt(18), randSeedInt(18)]), isBoss: true, moveSet: [Moves.TRICK, Moves.HYPNOSIS, Moves.SHADOW_BALL, Moves.MIND_BLOWN] }, @@ -344,10 +344,10 @@ export const ClowningAroundEncounter: MysteryEncounter = } } newTypes.push(secondType); - if (!pokemon.mysteryEncounterData) { - pokemon.mysteryEncounterData = new MysteryEncounterPokemonData(undefined, undefined, undefined, newTypes); + if (!pokemon.mysteryEncounterPokemonData) { + pokemon.mysteryEncounterPokemonData = new MysteryEncounterPokemonData(undefined, undefined, undefined, newTypes); } else { - pokemon.mysteryEncounterData.types = newTypes; + pokemon.mysteryEncounterPokemonData.types = newTypes; } } }) @@ -410,10 +410,10 @@ function displayYesNoOptions(scene: BattleScene, resolve) { function onYesAbilitySwap(scene: BattleScene, resolve) { const onPokemonSelected = (pokemon: PlayerPokemon) => { // Do ability swap - if (!pokemon.mysteryEncounterData) { - pokemon.mysteryEncounterData = new MysteryEncounterPokemonData(undefined, Abilities.AERILATE); + if (!pokemon.mysteryEncounterPokemonData) { + pokemon.mysteryEncounterPokemonData = new MysteryEncounterPokemonData(undefined, Abilities.AERILATE); } - pokemon.mysteryEncounterData.ability = scene.currentBattle.mysteryEncounter!.misc.ability; + pokemon.mysteryEncounterPokemonData.ability = scene.currentBattle.mysteryEncounter!.misc.ability; scene.currentBattle.mysteryEncounter!.setDialogueToken("chosenPokemon", pokemon.getNameToRender()); scene.ui.setMode(Mode.MESSAGE).then(() => resolve(true)); }; diff --git a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts index b3429041cc1..314255fe383 100644 --- a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts +++ b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts @@ -1,4 +1,4 @@ -import { EnemyPartyConfig, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterRewards, transitionMysteryEncounterIntroVisuals, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { EnemyPartyConfig, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterRewards } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from "#app/field/pokemon"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; @@ -132,13 +132,16 @@ export const DancingLessonsEncounter: MysteryEncounter = const oricorioData = new PokemonData(enemyPokemon); const oricorio = scene.addEnemyPokemon(species, scene.currentBattle.enemyLevels![0], TrainerSlot.NONE, false, oricorioData); - oricorio.setVisible(false); - oricorio.loadAssets().then(() => oricorio.setVisible(true)); // Adds a real Pokemon sprite to the field (required for the animation) - scene.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy()); + scene.getEnemyParty().forEach(enemyPokemon => { + scene.field.remove(enemyPokemon, true); + }); scene.currentBattle.enemyParty = [oricorio]; scene.field.add(oricorio); + // Spawns on offscreen field + oricorio.x -= 300; + encounter.loadAssets.push(oricorio.loadAssets()); const config: EnemyPartyConfig = { levelAdditiveMultiplier: 1, @@ -177,8 +180,6 @@ export const DancingLessonsEncounter: MysteryEncounter = // Pick battle const encounter = scene.currentBattle.mysteryEncounter!; - transitionMysteryEncounterIntroVisuals(scene, true, true, 500); - encounter.startOfBattleEffects.push({ sourceBattlerIndex: BattlerIndex.ENEMY, targets: [BattlerIndex.PLAYER], @@ -186,6 +187,7 @@ export const DancingLessonsEncounter: MysteryEncounter = ignorePp: true }); + await hideOricorioPokemon(scene); setEncounterRewards(scene, { guaranteedModifierTypeFuncs: [modifierTypes.BATON], fillRemaining: true }); await initBattleWithEnemyConfig(scene, encounter.enemyPartyConfigs[0]); }) @@ -220,6 +222,7 @@ export const DancingLessonsEncounter: MysteryEncounter = }) .withOptionPhase(async (scene: BattleScene) => { // Learn its Dance + hideOricorioPokemon(scene); leaveEncounterWithoutBattle(scene, true); }) .build() @@ -291,10 +294,28 @@ export const DancingLessonsEncounter: MysteryEncounter = } } - transitionMysteryEncounterIntroVisuals(scene, true, true, 500); + hideOricorioPokemon(scene); await catchPokemon(scene, oricorio, null, PokeballType.POKEBALL, false); leaveEncounterWithoutBattle(scene, true); }) .build() ) .build(); + +function hideOricorioPokemon(scene: BattleScene) { + return new Promise(resolve => { + const oricorioSprite = scene.getEnemyParty()[0]; + scene.tweens.add({ + targets: oricorioSprite, + x: "+=16", + y: "-=16", + alpha: 0, + ease: "Sine.easeInOut", + duration: 750, + onComplete: () => { + scene.field.remove(oricorioSprite, true); + resolve(); + } + }); + }); +} diff --git a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts index 493f5364e0b..c4227f08f90 100644 --- a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts +++ b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts @@ -40,7 +40,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.DELIBIRDY) .withEncounterTier(MysteryEncounterTier.GREAT) .withSceneWaveRangeRequirement(10, 180) - .withSceneRequirement(new MoneyRequirement(0, 2.75)) // Must have enough money for it to spawn at the very least + .withSceneRequirement(new MoneyRequirement(0, 2)) // Must have enough money for it to spawn at the very least .withPrimaryPokemonRequirement(new CombinationPokemonRequirement( // Must also have either option 2 or 3 available to spawn new HeldItemRequirement(OPTION_2_ALLOWED_MODIFIERS), new HeldItemRequirement(OPTION_3_DISALLOWED_MODIFIERS, 1, true) @@ -91,7 +91,7 @@ export const DelibirdyEncounter: MysteryEncounter = .withOption( MysteryEncounterOptionBuilder .newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_DEFAULT) - .withSceneMoneyRequirement(0, 2.75) // Must have money to spawn + .withSceneMoneyRequirement(0, 2) // Must have money to spawn .withDialogue({ buttonLabel: `${namespace}.option.1.label`, buttonTooltip: `${namespace}.option.1.tooltip`, diff --git a/src/data/mystery-encounters/encounters/field-trip-encounter.ts b/src/data/mystery-encounters/encounters/field-trip-encounter.ts index 794caf36f93..ce6e3382158 100644 --- a/src/data/mystery-encounters/encounters/field-trip-encounter.ts +++ b/src/data/mystery-encounters/encounters/field-trip-encounter.ts @@ -10,6 +10,7 @@ import MysteryEncounter, { MysteryEncounterBuilder } from "../mystery-encounter" import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { Stat } from "#enums/stat"; +import i18next from "i18next"; /** i18n namespace for the encounter */ const namespace = "mysteryEncounter:fieldTrip"; @@ -60,11 +61,6 @@ export const FieldTripEncounter: MysteryEncounter = buttonLabel: `${namespace}.option.1.label`, buttonTooltip: `${namespace}.option.1.tooltip`, secondOptionPrompt: `${namespace}.second_option_prompt`, - selected: [ - { - text: `${namespace}.option.selected`, - }, - ], }) .withPreOptionPhase(async (scene: BattleScene): Promise => { const encounter = scene.currentBattle.mysteryEncounter!; @@ -75,44 +71,8 @@ export const FieldTripEncounter: MysteryEncounter = label: move.getName(), handler: () => { // Pokemon and move selected - const correctMove = move.getMove().category === MoveCategory.PHYSICAL; - encounter.setDialogueToken("moveCategory", "Physical"); - if (!correctMove) { - encounter.options[0].dialogue!.selected = [ - { - text: `${namespace}.option.incorrect`, - speaker: `${namespace}.speaker`, - }, - { - text: `${namespace}.option.lesson_learned`, - }, - ]; - encounter.dialogue.outro = [ - { - text: `${namespace}.outro_bad`, - speaker: `${namespace}.speaker`, - }, - ]; - setEncounterExp(scene, scene.getParty().map((p) => p.id), 50); - } else { - encounter.setDialogueToken("pokeName", pokemon.getNameToRender()); - encounter.setDialogueToken("move", move.getName()); - encounter.options[0].dialogue!.selected = [ - { - text: `${namespace}.option.selected`, - }, - ]; - encounter.dialogue.outro = [ - { - text: `${namespace}.outro_good`, - speaker: `${namespace}.speaker`, - }, - ]; - setEncounterExp(scene, [pokemon.id], 100); - } - encounter.misc = { - correctMove: correctMove, - }; + encounter.setDialogueToken("moveCategory", i18next.t(`${namespace}.physical`)); + pokemonAndMoveChosen(scene, pokemon, move, MoveCategory.PHYSICAL); return true; }, }; @@ -146,11 +106,6 @@ export const FieldTripEncounter: MysteryEncounter = buttonLabel: `${namespace}.option.2.label`, buttonTooltip: `${namespace}.option.2.tooltip`, secondOptionPrompt: `${namespace}.second_option_prompt`, - selected: [ - { - text: `${namespace}.option.selected`, - }, - ], }) .withPreOptionPhase(async (scene: BattleScene): Promise => { const encounter = scene.currentBattle.mysteryEncounter!; @@ -161,50 +116,8 @@ export const FieldTripEncounter: MysteryEncounter = label: move.getName(), handler: () => { // Pokemon and move selected - const correctMove = move.getMove().category === MoveCategory.SPECIAL; - encounter.setDialogueToken("moveCategory", "Special"); - if (!correctMove) { - encounter.options[1].dialogue!.selected = [ - { - text: `${namespace}.option.incorrect`, - speaker: `${namespace}.speaker`, - }, - { - text: `${namespace}.option.lesson_learned`, - }, - ]; - encounter.dialogue.outro = [ - { - text: `${namespace}.outro_bad`, - speaker: `${namespace}.speaker`, - }, - ]; - encounter.dialogue.outro = [ - { - text: `${namespace}.outro_bad`, - speaker: `${namespace}.speaker`, - }, - ]; - setEncounterExp(scene, scene.getParty().map((p) => p.id), 50); - } else { - encounter.setDialogueToken("pokeName", pokemon.getNameToRender()); - encounter.setDialogueToken("move", move.getName()); - encounter.options[1].dialogue!.selected = [ - { - text: `${namespace}.option.selected`, - }, - ]; - encounter.dialogue.outro = [ - { - text: `${namespace}.outro_good`, - speaker: `${namespace}.speaker`, - }, - ]; - setEncounterExp(scene, [pokemon.id], 100); - } - encounter.misc = { - correctMove: correctMove, - }; + encounter.setDialogueToken("moveCategory", i18next.t(`${namespace}.special`)); + pokemonAndMoveChosen(scene, pokemon, move, MoveCategory.SPECIAL); return true; }, }; @@ -238,11 +151,6 @@ export const FieldTripEncounter: MysteryEncounter = buttonLabel: `${namespace}.option.3.label`, buttonTooltip: `${namespace}.option.3.tooltip`, secondOptionPrompt: `${namespace}.second_option_prompt`, - selected: [ - { - text: `${namespace}.option.selected`, - }, - ], }) .withPreOptionPhase(async (scene: BattleScene): Promise => { const encounter = scene.currentBattle.mysteryEncounter!; @@ -253,44 +161,8 @@ export const FieldTripEncounter: MysteryEncounter = label: move.getName(), handler: () => { // Pokemon and move selected - const correctMove = move.getMove().category === MoveCategory.STATUS; - encounter.setDialogueToken("moveCategory", "Status"); - if (!correctMove) { - encounter.options[2].dialogue!.selected = [ - { - text: `${namespace}.option.incorrect`, - speaker: `${namespace}.speaker`, - }, - { - text: `${namespace}.option.lesson_learned`, - }, - ]; - encounter.dialogue.outro = [ - { - text: `${namespace}.outro_bad`, - speaker: `${namespace}.speaker`, - }, - ]; - setEncounterExp(scene, scene.getParty().map((p) => p.id), 50); - } else { - encounter.setDialogueToken("pokeName", pokemon.getNameToRender()); - encounter.setDialogueToken("move", move.getName()); - encounter.options[2].dialogue!.selected = [ - { - text: `${namespace}.option.selected`, - }, - ]; - encounter.dialogue.outro = [ - { - text: `${namespace}.outro_good`, - speaker: `${namespace}.speaker`, - }, - ]; - setEncounterExp(scene, [pokemon.id], 100); - } - encounter.misc = { - correctMove: correctMove, - }; + encounter.setDialogueToken("moveCategory", i18next.t(`${namespace}.status`)); + pokemonAndMoveChosen(scene, pokemon, move, MoveCategory.STATUS); return true; }, }; @@ -318,3 +190,42 @@ export const FieldTripEncounter: MysteryEncounter = .build() ) .build(); + +function pokemonAndMoveChosen(scene: BattleScene, pokemon: PlayerPokemon, move: PokemonMove, correctMoveCategory: MoveCategory) { + const encounter = scene.currentBattle.mysteryEncounter!; + const correctMove = move.getMove().category === correctMoveCategory; + if (!correctMove) { + encounter.selectedOption!.dialogue!.selected = [ + { + text: `${namespace}.option.selected`, + }, + { + text: `${namespace}.incorrect`, + speaker: `${namespace}.speaker`, + }, + { + text: `${namespace}.incorrect_exp`, + }, + ]; + setEncounterExp(scene, scene.getParty().map((p) => p.id), 50); + } else { + encounter.setDialogueToken("pokeName", pokemon.getNameToRender()); + encounter.setDialogueToken("move", move.getName()); + encounter.selectedOption!.dialogue!.selected = [ + { + text: `${namespace}.option.selected`, + }, + { + text: `${namespace}.correct`, + speaker: `${namespace}.speaker`, + }, + { + text: `${namespace}.correct_exp`, + }, + ]; + setEncounterExp(scene, [pokemon.id], 100); + } + encounter.misc = { + correctMove: correctMove, + }; +} diff --git a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts b/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts index 91bb8d47752..e7a4f42f65a 100644 --- a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts @@ -76,13 +76,16 @@ export const TheStrongStuffEncounter: MysteryEncounter = species: getPokemonSpecies(Species.SHUCKLE), isBoss: true, bossSegments: 5, - mysteryEncounterData: new MysteryEncounterPokemonData(1.25), + mysteryEncounterPokemonData: new MysteryEncounterPokemonData(1.25), nature: Nature.BOLD, moveSet: [Moves.INFESTATION, Moves.SALT_CURE, Moves.GASTRO_ACID, Moves.HEAL_ORDER], modifierConfigs: [ { modifier: generateModifierType(scene, modifierTypes.BERRY, [BerryType.SITRUS]) as PokemonHeldItemModifierType }, + { + modifier: generateModifierType(scene, modifierTypes.BERRY, [BerryType.ENIGMA]) as PokemonHeldItemModifierType + }, { modifier: generateModifierType(scene, modifierTypes.BERRY, [BerryType.APICOT]) as PokemonHeldItemModifierType }, diff --git a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts index 42850d4ef84..3d8b078e6b7 100644 --- a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts +++ b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts @@ -369,10 +369,10 @@ async function doNewTeamPostProcess(scene: BattleScene, transformations: Pokemon newType = randSeedInt(18) as Type; } newTypes.push(newType); - if (!newPokemon.mysteryEncounterData) { - newPokemon.mysteryEncounterData = new MysteryEncounterPokemonData(undefined, undefined, undefined, newTypes); + if (!newPokemon.mysteryEncounterPokemonData) { + newPokemon.mysteryEncounterPokemonData = new MysteryEncounterPokemonData(undefined, undefined, undefined, newTypes); } else { - newPokemon.mysteryEncounterData.types = newTypes; + newPokemon.mysteryEncounterPokemonData.types = newTypes; } for (const item of transformation.heldItems) { diff --git a/src/data/mystery-encounters/mystery-encounter-requirements.ts b/src/data/mystery-encounters/mystery-encounter-requirements.ts index fbeaccd50f9..53eaa162dc2 100644 --- a/src/data/mystery-encounters/mystery-encounter-requirements.ts +++ b/src/data/mystery-encounters/mystery-encounter-requirements.ts @@ -123,11 +123,11 @@ export class PreviousEncounterRequirement extends EncounterSceneRequirement { } meetsRequirement(scene: BattleScene): boolean { - return scene.mysteryEncounterData.encounteredEvents.some(e => e.type === this.previousEncounterRequirement); + return scene.mysteryEncounterSaveData.encounteredEvents.some(e => e.type === this.previousEncounterRequirement); } getDialogueToken(scene: BattleScene, pokemon?: PlayerPokemon): [string, string] { - return ["previousEncounter", scene.mysteryEncounterData.encounteredEvents.find(e => e.type === this.previousEncounterRequirement)?.[0].toString() ?? ""]; + return ["previousEncounter", scene.mysteryEncounterSaveData.encounteredEvents.find(e => e.type === this.previousEncounterRequirement)?.[0].toString() ?? ""]; } } diff --git a/src/data/mystery-encounters/mystery-encounter-data.ts b/src/data/mystery-encounters/mystery-encounter-save-data.ts similarity index 66% rename from src/data/mystery-encounters/mystery-encounter-data.ts rename to src/data/mystery-encounters/mystery-encounter-save-data.ts index a16dc5ecb7d..c91f0857f83 100644 --- a/src/data/mystery-encounters/mystery-encounter-data.ts +++ b/src/data/mystery-encounters/mystery-encounter-save-data.ts @@ -7,20 +7,27 @@ export class SeenEncounterData { type: MysteryEncounterType; tier: MysteryEncounterTier; waveIndex: number; + selectedOption: number; - constructor(type: MysteryEncounterType, tier: MysteryEncounterTier, waveIndex: number) { + constructor(type: MysteryEncounterType, tier: MysteryEncounterTier, waveIndex: number, selectedOption?: number) { this.type = type; this.tier = tier; this.waveIndex = waveIndex; + this.selectedOption = selectedOption ?? -1; } } -export class MysteryEncounterData { +export interface QueuedEncounter { + type: MysteryEncounterType; + spawnPercent: number; // Out of 100 +} + +export class MysteryEncounterSaveData { encounteredEvents: SeenEncounterData[] = []; encounterSpawnChance: number = BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT; - nextEncounterQueue: [MysteryEncounterType, integer][] = []; + queuedEncounters: QueuedEncounter[] = []; - constructor(data: MysteryEncounterData | null) { + constructor(data: MysteryEncounterSaveData | null) { if (!isNullOrUndefined(data)) { Object.assign(this, data); } diff --git a/src/data/mystery-encounters/mystery-encounter.ts b/src/data/mystery-encounters/mystery-encounter.ts index bd3ff77cbb3..4d6fb4310ee 100644 --- a/src/data/mystery-encounters/mystery-encounter.ts +++ b/src/data/mystery-encounters/mystery-encounter.ts @@ -224,6 +224,10 @@ export default class MysteryEncounter implements IMysteryEncounter { * Defaults to 1 */ expMultiplier: number; + /** + * Can add any asset load promises here during onInit() to make sure the scene awaits the loads properly + */ + loadAssets: Promise[]; /** * Generic property to set any custom data required for the encounter * Extremely useful for carrying state/data between onPreOptionPhase/onOptionPhase/onPostOptionPhase @@ -260,6 +264,7 @@ export default class MysteryEncounter implements IMysteryEncounter { this.introVisuals = undefined; this.misc = null; this.expMultiplier = 1; + this.loadAssets = []; } /** diff --git a/src/data/mystery-encounters/utils/encounter-phase-utils.ts b/src/data/mystery-encounters/utils/encounter-phase-utils.ts index d5c246934d1..197a75d3b4b 100644 --- a/src/data/mystery-encounters/utils/encounter-phase-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-phase-utils.ts @@ -4,7 +4,6 @@ import MysteryEncounterOption from "#app/data/mystery-encounters/mystery-encount import { AVERAGE_ENCOUNTERS_PER_RUN_TARGET, WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/data/mystery-encounters/mystery-encounters"; import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import Pokemon, { FieldPosition, PlayerPokemon, PokemonMove, PokemonSummonData } from "#app/field/pokemon"; -import { ExpBalanceModifier, ExpShareModifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier } from "#app/modifier/modifier"; import { CustomModifierSettings, ModifierPoolType, ModifierType, ModifierTypeGenerator, ModifierTypeOption, modifierTypes, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type"; import { MysteryEncounterBattlePhase, MysteryEncounterBattleStartCleanupPhase, MysteryEncounterPhase, MysteryEncounterRewardsPhase } from "#app/phases/mystery-encounter-phases"; import PokemonData from "#app/system/pokemon-data"; @@ -27,7 +26,6 @@ import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; import { Status, StatusEffect } from "#app/data/status-effect"; import { TrainerConfig, trainerConfigs, TrainerSlot } from "#app/data/trainer-config"; import PokemonSpecies from "#app/data/pokemon-species"; -import Overrides from "#app/overrides"; import { Egg, IEggOptions } from "#app/data/egg"; import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data"; import HeldModifierConfig from "#app/interfaces/held-modifier-config"; @@ -36,9 +34,8 @@ import { EggLapsePhase } from "#app/phases/egg-lapse-phase"; import { TrainerVictoryPhase } from "#app/phases/trainer-victory-phase"; import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { GameOverPhase } from "#app/phases/game-over-phase"; -import { ExpPhase } from "#app/phases/exp-phase"; -import { ShowPartyExpBarPhase } from "#app/phases/show-party-exp-bar-phase"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { PartyExpPhase } from "#app/phases/party-exp-phase"; /** * Animates exclamation sprite over trainer's head at start of encounter @@ -72,7 +69,7 @@ export interface EnemyPokemonConfig { isBoss: boolean; bossSegments?: number; bossSegmentModifier?: number; // Additive to the determined segment number - mysteryEncounterData?: MysteryEncounterPokemonData; + mysteryEncounterPokemonData?: MysteryEncounterPokemonData; formIndex?: number; abilityIndex?: number; level?: number; @@ -146,7 +143,9 @@ export async function initBattleWithEnemyConfig(scene: BattleScene, partyConfig: battle.enemyLevels = new Array(numEnemies).fill(null).map(() => scene.currentBattle.getLevelForWave()); } - scene.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy()); + scene.getEnemyParty().forEach(enemyPokemon => { + scene.field.remove(enemyPokemon, true); + }); battle.enemyParty = []; battle.double = doubleBattle; @@ -229,8 +228,8 @@ export async function initBattleWithEnemyConfig(scene: BattleScene, partyConfig: } // Set custom mystery encounter data fields (such as sprite scale, custom abilities, types, etc.) - if (!isNullOrUndefined(config.mysteryEncounterData)) { - enemyPokemon.mysteryEncounterData = config.mysteryEncounterData!; + if (!isNullOrUndefined(config.mysteryEncounterPokemonData)) { + enemyPokemon.mysteryEncounterPokemonData = config.mysteryEncounterPokemonData!; } // Set Boss @@ -635,90 +634,11 @@ export function setEncounterRewards(scene: BattleScene, customShopRewards?: Cust * https://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_effort_value_yield_(Generation_IX) * @param useWaveIndex - set to false when directly passing the the full exp value instead of baseExpValue */ -export function setEncounterExp(scene: BattleScene, participantId: integer | integer[], baseExpValue: number, useWaveIndex: boolean = true) { +export function setEncounterExp(scene: BattleScene, participantId: number | number[], baseExpValue: number, useWaveIndex: boolean = true) { const participantIds = Array.isArray(participantId) ? participantId : [participantId]; scene.currentBattle.mysteryEncounter!.doEncounterExp = (scene: BattleScene) => { - const party = scene.getParty(); - const expShareModifier = scene.findModifier(m => m instanceof ExpShareModifier) as ExpShareModifier; - const expBalanceModifier = scene.findModifier(m => m instanceof ExpBalanceModifier) as ExpBalanceModifier; - const multipleParticipantExpBonusModifier = scene.findModifier(m => m instanceof MultipleParticipantExpBonusModifier) as MultipleParticipantExpBonusModifier; - const nonFaintedPartyMembers = party.filter(p => p.hp); - const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < scene.getMaxExpLevel()); - const partyMemberExp: number[] = []; - // EXP value calculation is based off Pokemon.getExpValue - let expValue = Math.floor(baseExpValue * (useWaveIndex ? scene.currentBattle.waveIndex : 1) / 5 + 1); - - if (participantIds?.length > 0) { - if (scene.currentBattle.mysteryEncounter!.encounterMode === MysteryEncounterMode.TRAINER_BATTLE) { - expValue = Math.floor(expValue * 1.5); - } - for (const partyMember of nonFaintedPartyMembers) { - const pId = partyMember.id; - const participated = participantIds.includes(pId); - if (participated) { - partyMember.addFriendship(2); - } - if (!expPartyMembers.includes(partyMember)) { - continue; - } - if (!participated && !expShareModifier) { - partyMemberExp.push(0); - continue; - } - let expMultiplier = 0; - if (participated) { - expMultiplier += (1 / participantIds.length); - if (participantIds.length > 1 && multipleParticipantExpBonusModifier) { - expMultiplier += multipleParticipantExpBonusModifier.getStackCount() * 0.2; - } - } else if (expShareModifier) { - expMultiplier += (expShareModifier.getStackCount() * 0.2) / participantIds.length; - } - if (partyMember.pokerus) { - expMultiplier *= 1.5; - } - if (Overrides.XP_MULTIPLIER_OVERRIDE !== null) { - expMultiplier = Overrides.XP_MULTIPLIER_OVERRIDE; - } - const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier); - scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, pokemonExp); - partyMemberExp.push(Math.floor(pokemonExp.value)); - } - - if (expBalanceModifier) { - let totalLevel = 0; - let totalExp = 0; - expPartyMembers.forEach((expPartyMember, epm) => { - totalExp += partyMemberExp[epm]; - totalLevel += expPartyMember.level; - }); - - const medianLevel = Math.floor(totalLevel / expPartyMembers.length); - - const recipientExpPartyMemberIndexes: number[] = []; - expPartyMembers.forEach((expPartyMember, epm) => { - if (expPartyMember.level <= medianLevel) { - recipientExpPartyMemberIndexes.push(epm); - } - }); - - const splitExp = Math.floor(totalExp / recipientExpPartyMemberIndexes.length); - - expPartyMembers.forEach((_partyMember, pm) => { - partyMemberExp[pm] = Phaser.Math.Linear(partyMemberExp[pm], recipientExpPartyMemberIndexes.indexOf(pm) > -1 ? splitExp : 0, 0.2 * expBalanceModifier.getStackCount()); - }); - } - - for (let pm = 0; pm < expPartyMembers.length; pm++) { - const exp = partyMemberExp[pm]; - - if (exp) { - const partyMemberIndex = party.indexOf(expPartyMembers[pm]); - scene.unshiftPhase(expPartyMembers[pm].isOnField() ? new ExpPhase(scene, partyMemberIndex, exp) : new ShowPartyExpBarPhase(scene, partyMemberIndex, exp)); - } - } - } + scene.unshiftPhase(new PartyExpPhase(scene, baseExpValue, useWaveIndex, new Set(participantIds))); return true; }; diff --git a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts index 2a408c9742f..f73c25ddaf7 100644 --- a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts @@ -7,7 +7,6 @@ import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, import { PlayerGender } from "#enums/player-gender"; import { addPokeballCaptureStars, addPokeballOpenParticles } from "#app/field/anims"; import { getStatusEffectCatchRateMultiplier, StatusEffect } from "#app/data/status-effect"; -import { BattlerIndex } from "#app/battle"; import { achvs } from "#app/system/achv"; import { Mode } from "#app/ui/ui"; import { PartyOption, PartyUiMode } from "#app/ui/party-ui-handler"; @@ -482,7 +481,7 @@ function failCatch(scene: BattleScene, pokemon: EnemyPokemon, originalY: number, * @param isObtain */ export async function catchPokemon(scene: BattleScene, pokemon: EnemyPokemon, pokeball: Phaser.GameObjects.Sprite | null, pokeballType: PokeballType, showCatchObtainMessage: boolean = true, isObtain: boolean = false): Promise { - scene.unshiftPhase(new VictoryPhase(scene, BattlerIndex.ENEMY, true)); + scene.unshiftPhase(new VictoryPhase(scene, pokemon.id, true)); const speciesForm = !pokemon.fusionSpecies ? pokemon.getSpeciesForm() : pokemon.getFusionSpeciesForm(); diff --git a/src/data/pokemon-forms.ts b/src/data/pokemon-forms.ts index bc815b91f3a..0d3e511bcba 100644 --- a/src/data/pokemon-forms.ts +++ b/src/data/pokemon-forms.ts @@ -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"; diff --git a/src/data/terrain.ts b/src/data/terrain.ts index d4789078af7..6db68b92239 100644 --- a/src/data/terrain.ts +++ b/src/data/terrain.ts @@ -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 { diff --git a/src/data/variant.ts b/src/data/variant.ts index 48369d112db..b7a01a4be89 100644 --- a/src/data/variant.ts +++ b/src/data/variant.ts @@ -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; diff --git a/src/enums/battler-tag-type.ts b/src/enums/battler-tag-type.ts index 942e4771fc7..d8d7619dfe1 100644 --- a/src/enums/battler-tag-type.ts +++ b/src/enums/battler-tag-type.ts @@ -73,5 +73,6 @@ export enum BattlerTagType { SHELL_TRAP = "SHELL_TRAP", DRAGON_CHEER = "DRAGON_CHEER", NO_RETREAT = "NO_RETREAT", + TAR_SHOT = "TAR_SHOT", MYSTERY_ENCOUNTER_POST_SUMMON = "MYSTERY_ENCOUNTER_POST_SUMMON", } diff --git a/src/events/arena.ts b/src/events/arena.ts index 9fbbe572601..c05e67d353c 100644 --- a/src/events/arena.ts +++ b/src/events/arena.ts @@ -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 { diff --git a/src/field/arena.ts b/src/field/arena.ts index 9a0eb19c910..fd6bf1a2b53 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -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, 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, ...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 | 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, 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)); } diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 2362c3bdda6..0d9b39654f0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -17,7 +17,7 @@ import { initMoveAnim, loadMoveAnimAssets } from "../data/battle-anims"; import { Status, StatusEffect, getRandomStatus } from "../data/status-effect"; import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition, FusionSpeciesFormEvolution } from "../data/pokemon-evolutions"; import { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "../data/tms"; -import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, MoveRestrictionBattlerTag, ExposedTag, DragonCheerTag, CritBoostTag, TrappedTag } from "../data/battler-tags"; +import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, MoveRestrictionBattlerTag, ExposedTag, DragonCheerTag, CritBoostTag, TrappedTag, TarShotTag } from "../data/battler-tags"; import { WeatherType } from "../data/weather"; import { ArenaTagSide, NoCritTag, WeakenMoveScreenTag } from "../data/arena-tag"; import { Ability, AbAttr, StatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentStatStagesAbAttr, MoveImmunityAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyStatMultiplierAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr, ConditionalCritAbAttr, applyFieldStatMultiplierAbAttrs, FieldMultiplyStatAbAttr, AddSecondStrikeAbAttr, UserFieldStatusEffectImmunityAbAttr, UserFieldBattlerTagImmunityAbAttr, BattlerTagImmunityAbAttr, MoveTypeChangeAbAttr, FullHpResistTypeAbAttr, applyCheckTrappedAbAttrs, CheckTrappedAbAttr } from "../data/ability"; @@ -58,6 +58,7 @@ import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-phase"; import { Challenges } from "#enums/challenges"; +import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data"; export enum FieldPosition { @@ -112,7 +113,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { public battleData: PokemonBattleData; public battleSummonData: PokemonBattleSummonData; public turnData: PokemonTurnData; - public mysteryEncounterData: MysteryEncounterPokemonData; + public mysteryEncounterPokemonData: MysteryEncounterPokemonData; /** Used by Mystery Encounters to execute pokemon-specific logic (such as stat boosts) at start of battle */ public mysteryEncounterBattleEffects?: (pokemon: Pokemon) => void; @@ -201,7 +202,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.fusionGender = dataSource.fusionGender; this.fusionLuck = dataSource.fusionLuck; this.usedTMs = dataSource.usedTMs ?? []; - this.mysteryEncounterData = dataSource.mysteryEncounterData ?? new MysteryEncounterPokemonData(); + this.mysteryEncounterPokemonData = dataSource.mysteryEncounterPokemonData ?? new MysteryEncounterPokemonData(); } else { this.id = Utils.randSeedInt(4294967296); this.ivs = ivs || Utils.getIvsFromId(this.id); @@ -249,7 +250,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } this.luck = (this.shiny ? this.variant + 1 : 0) + (this.fusionShiny ? this.fusionVariant + 1 : 0); this.fusionLuck = this.luck; - this.mysteryEncounterData = new MysteryEncounterPokemonData(); + this.mysteryEncounterPokemonData = new MysteryEncounterPokemonData(); } this.generateName(); @@ -577,8 +578,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const formKey = this.getFormKey(); if (formKey.indexOf(SpeciesFormKey.GIGANTAMAX) > -1 || formKey.indexOf(SpeciesFormKey.ETERNAMAX) > -1) { return 1.5; - } else if (!isNullOrUndefined(this.mysteryEncounterData.spriteScale) && this.mysteryEncounterData.spriteScale !== 0) { - return this.mysteryEncounterData.spriteScale!; + } else if (!isNullOrUndefined(this.mysteryEncounterPokemonData.spriteScale) && this.mysteryEncounterPokemonData.spriteScale !== 0) { + return this.mysteryEncounterPokemonData.spriteScale!; } return 1; } @@ -1078,13 +1079,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const teraType = this.getTeraType(); if (teraType !== Type.UNKNOWN) { types.push(teraType); + if (forDefend) { + return types; + } } } if (!types.length || !includeTeraType) { - if (this.mysteryEncounterData.types && this.mysteryEncounterData.types.length > 0) { + if (this.mysteryEncounterPokemonData.types && this.mysteryEncounterPokemonData.types.length > 0) { // "Permanent" override for a Pokemon's normal types, currently only used by Mystery Encounters - this.mysteryEncounterData.types.forEach(t => types.push(t)); + this.mysteryEncounterPokemonData.types.forEach(t => types.push(t)); } else if (!ignoreOverride && this.summonData?.types && this.summonData.types.length > 0) { this.summonData.types.forEach(t => types.push(t)); } else { @@ -1146,8 +1150,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (Overrides.OPP_ABILITY_OVERRIDE && !this.isPlayer()) { return allAbilities[Overrides.OPP_ABILITY_OVERRIDE]; } - if (this.mysteryEncounterData?.ability) { - return allAbilities[this.mysteryEncounterData.ability]; + if (this.mysteryEncounterPokemonData?.ability) { + return allAbilities[this.mysteryEncounterPokemonData.ability]; } if (this.isFusion()) { return allAbilities[this.getFusionSpeciesForm(ignoreOverride).getAbility(this.fusionAbilityIndex)]; @@ -1173,8 +1177,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (Overrides.OPP_PASSIVE_ABILITY_OVERRIDE && !this.isPlayer()) { return allAbilities[Overrides.OPP_PASSIVE_ABILITY_OVERRIDE]; } - if (this.mysteryEncounterData?.passive) { - return allAbilities[this.mysteryEncounterData.passive]; + if (this.mysteryEncounterPokemonData?.passive) { + return allAbilities[this.mysteryEncounterPokemonData.passive]; } let starterSpeciesId = this.species.speciesId; @@ -1358,9 +1362,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } const trappedByAbility = new Utils.BooleanHolder(false); + const opposingField = this.isPlayer() ? this.scene.getEnemyField() : this.scene.getPlayerField(); - this.scene.getEnemyField()!.forEach(enemyPokemon => - applyCheckTrappedAbAttrs(CheckTrappedAbAttr, enemyPokemon, trappedByAbility, this, trappedAbMessages, simulated) + opposingField.forEach(opponent => + applyCheckTrappedAbAttrs(CheckTrappedAbAttr, opponent, trappedByAbility, this, trappedAbMessages, simulated) ); return (trappedByAbility.value || !!this.getTag(TrappedTag)); @@ -1386,7 +1391,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { /** * Calculates the effectiveness of a move against the Pokémon. - * + * This includes modifiers from move and ability attributes. * @param source {@linkcode Pokemon} The attacking Pokémon. * @param move {@linkcode Move} The move being used by the attacking Pokémon. * @param ignoreAbility Whether to ignore abilities that might affect type effectiveness or immunity (defaults to `false`). @@ -1406,10 +1411,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { : 1); applyMoveAttrs(VariableMoveTypeMultiplierAttr, source, this, move, typeMultiplier); - if (this.getTypes().find(t => move.isTypeImmune(source, this, t))) { + if (this.getTypes(true, true).find(t => move.isTypeImmune(source, this, t))) { typeMultiplier.value = 0; } + if (this.getTag(TarShotTag) && (this.getMoveType(move) === Type.FIRE)) { + typeMultiplier.value *= 2; + } + const cancelledHolder = cancelled ?? new Utils.BooleanHolder(false); if (!ignoreAbility) { applyPreDefendAbAttrs(TypeImmunityAbAttr, this, source, move, cancelledHolder, simulated, typeMultiplier); @@ -1441,7 +1450,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } /** - * Calculates the type effectiveness multiplier for an attack type + * Calculates the move's type effectiveness multiplier based on the target's type/s. * @param moveType {@linkcode Type} the type of the move being used * @param source {@linkcode Pokemon} the Pokemon using the move * @param ignoreStrongWinds whether or not this ignores strong winds (anticipation, forewarn, stealth rocks) @@ -1465,22 +1474,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; @@ -4541,17 +4554,29 @@ export class EnemyPokemon extends Pokemon { return BattlerIndex.ENEMY + this.getFieldIndex(); } - addToParty(pokeballType: PokeballType) { + /** + * Add a new pokemon to the player's party (at `slotIndex` if set). + * @param pokeballType the type of pokeball the pokemon was caught with + * @param slotIndex an optional index to place the pokemon in the party + * @returns the pokemon that was added or null if the pokemon could not be added + */ + addToParty(pokeballType: PokeballType, slotIndex: number = -1) { const party = this.scene.getParty(); let ret: PlayerPokemon | null = null; - if (party.length < 6) { + if (party.length < PLAYER_PARTY_MAX_SIZE) { this.pokeball = pokeballType; this.metLevel = this.level; this.metBiome = this.scene.arena.biomeType; this.metSpecies = this.species.speciesId; const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.variant, this.ivs, this.nature, this); - party.push(newPokemon); + + if (Utils.isBetween(slotIndex, 0, PLAYER_PARTY_MAX_SIZE - 1)) { + party.splice(slotIndex, 0, newPokemon); + } else { + party.push(newPokemon); + } + ret = newPokemon; this.scene.triggerPokemonFormChange(newPokemon, SpeciesFormChangeActiveTrigger, true); } @@ -4584,6 +4609,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[] = []; diff --git a/src/inputs-controller.ts b/src/inputs-controller.ts index 652e3d58062..bb3cfcbeb3b 100644 --- a/src/inputs-controller.ts +++ b/src/inputs-controller.ts @@ -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"; diff --git a/src/locales/de/ability-trigger.json b/src/locales/de/ability-trigger.json index 60f3432df98..379692c45ae 100644 --- a/src/locales/de/ability-trigger.json +++ b/src/locales/de/ability-trigger.json @@ -12,6 +12,7 @@ "typeImmunityHeal": "{{abilityName}} von {{pokemonNameWithAffix}} füllte einige KP auf!", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}} vermeidet Schaden mit {{abilityName}}!", "disguiseAvoidedDamage": "Die Tarnung von {{pokemonNameWithAffix}} ist aufgeflogen!!", + "fullHpResistType": "Der Panzer von {{pokemonNameWithAffix}} funkelt und verzerrt die Wechselwirkungen zwischen den Typen!", "moveImmunity": "Es hat keine Wirkung auf {{pokemonNameWithAffix}}...", "reverseDrain": "{{pokemonNameWithAffix}} saugt Kloakensoße auf!", "postDefendTypeChange": "{{abilityName}} von {{pokemonNameWithAffix}} macht es zu einem {{typeName}}-Typ!", @@ -51,6 +52,7 @@ "postSummonTeravolt": "{{pokemonNameWithAffix}} strahlt eine knisternde Aura aus!", "postSummonDarkAura": "{{pokemonNameWithAffix}} strahlt eine dunkle Aura aus!", "postSummonFairyAura": "{{pokemonNameWithAffix}} strahlt eine Feenaura aus!", + "postSummonAuraBreak": "{{pokemonNameWithAffix}} kehrt die Wirkung aller Aura-Fähigkeiten um!", "postSummonNeutralizingGas": "Reaktionsgas von {{pokemonNameWithAffix}} hat sich in der Umgebung ausgebreitet!", "postSummonAsOneGlastrier": "{{pokemonNameWithAffix}} verfügt über zwei Fähigkeiten!", "postSummonAsOneSpectrier": "{{pokemonNameWithAffix}} verfügt über zwei Fähigkeiten!", @@ -59,4 +61,4 @@ "postSummonTabletsOfRuin": "Unheilstafeln von {{pokemonNameWithAffix}} schwächt {{statName}} aller Pokémon im Umkreis!", "postSummonBeadsOfRuin": "Unheilsjuwelen von {{pokemonNameWithAffix}} schwächt {{statName}} aller Pokémon im Umkreis!", "preventBerryUse": "{{pokemonNameWithAffix}} kriegt vor Anspannung keine Beeren mehr runter!" -} \ No newline at end of file +} diff --git a/src/locales/de/battle.json b/src/locales/de/battle.json index 05205b001b6..38e36d4b2da 100644 --- a/src/locales/de/battle.json +++ b/src/locales/de/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}} ist noch nicht implementiert und kann nicht ausgewählt werden.", "moveNoPP": "Es sind keine AP für diese Attacke mehr übrig!", "moveDisabled": "{{moveName}} ist deaktiviert!", + "disableInterruptedMove": "{{moveName}} von {{pokemonNameWithAffix}} ist blockiert!", "noPokeballForce": "Eine unsichtbare Kraft verhindert die Nutzung von Pokébällen.", "noPokeballTrainer": "Du kannst das Pokémon eines anderen Trainers nicht fangen!", "noPokeballMulti": "Du kannst erst einen Pokéball werfen, wenn nur noch ein Pokémon übrig ist!", @@ -96,4 +97,4 @@ "congratulations": "Glückwunsch!", "beatModeFirstTime": "{{speciesName}} hat den {{gameMode}} Modus zum ersten Mal beendet! Du erhältst {{newModifier}}!", "eggSkipPrompt": "Zur Ei-Zusammenfassung springen?" -} \ No newline at end of file +} diff --git a/src/locales/de/battler-tags.json b/src/locales/de/battler-tags.json index 5509cc11b0a..e65e1ddfe75 100644 --- a/src/locales/de/battler-tags.json +++ b/src/locales/de/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "{{pokemonNameWithAffix}} wurde durch {{moveName}} verletzt!", "cursedOnAdd": "{{pokemonNameWithAffix}} nimmt einen Teil seiner KP und legt einen Fluch auf {{pokemonName}}!", "cursedLapse": "{{pokemonNameWithAffix}} wurde durch den Fluch verletzt!", - "stockpilingOnAdd": "{{pokemonNameWithAffix}} hortet {{stockpiledCount}}!" -} \ No newline at end of file + "stockpilingOnAdd": "{{pokemonNameWithAffix}} hortet {{stockpiledCount}}!", + "disabledOnAdd": " {{moveName}} von {{pokemonNameWithAffix}} wurde blockiert!", + "disabledLapse": "{{moveName}} von {{pokemonNameWithAffix}} ist nicht länger blockiert!" +} diff --git a/src/locales/de/menu.json b/src/locales/de/menu.json index e5c1c700425..0e2ba4dc0b3 100644 --- a/src/locales/de/menu.json +++ b/src/locales/de/menu.json @@ -51,5 +51,7 @@ "renamePokemon": "Pokémon umbennenen", "rename": "Umbenennen", "nickname": "Spitzname", - "errorServerDown": "Ups! Es gab einen Fehler beim Versuch\nden Server zu kontaktieren\nLasse dieses Fenster offen\nDu wirst automatisch neu verbunden." -} \ No newline at end of file + "errorServerDown": "Ups! Es gab einen Fehler beim Versuch\nden Server zu kontaktieren\nLasse dieses Fenster offen\nDu wirst automatisch neu verbunden.", + "noSaves": "Du hast keine gespeicherten Dateien!", + "tooManySaves": "Du hast zu viele gespeicherte Dateien!" +} diff --git a/src/locales/de/modifier-type.json b/src/locales/de/modifier-type.json index 8e2372cb447..7c7972343d6 100644 --- a/src/locales/de/modifier-type.json +++ b/src/locales/de/modifier-type.json @@ -47,10 +47,14 @@ "description": "Ändert das Wesen zu {{natureName}}. Schaltet dieses Wesen permanent für diesen Starter frei." }, "DoubleBattleChanceBoosterModifierType": { - "description": "Verdoppelt die Wahrscheinlichkeit, dass die nächsten {{battleCount}} Begegnungen mit wilden Pokémon ein Doppelkampf sind." + "description": "Vervierfacht die Chance, dass ein Kampf ein Doppelkampf wird, für bis zu {{battleCount}} Kämpfe." }, "TempStatStageBoosterModifierType": { - "description": "Erhöht die {{stat}} aller Teammitglieder für 5 Kämpfe um eine Stufe." + "description": "Erhöht {{stat}} aller Teammitglieder um {{amount}} für bis zu 5 Kämpfe.", + "extra": { + "stage": "eine Stufe", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "Erhöht die Stärke aller {{moveType}}-Attacken eines Pokémon um 20%." diff --git a/src/locales/en/ability-trigger.json b/src/locales/en/ability-trigger.json index a7383cea16b..da21d80e3c7 100644 --- a/src/locales/en/ability-trigger.json +++ b/src/locales/en/ability-trigger.json @@ -3,7 +3,7 @@ "badDreams": "{{pokemonName}} is tormented!", "costar": "{{pokemonName}} copied {{allyName}}'s stat changes!", "iceFaceAvoidedDamage": "{{pokemonNameWithAffix}} avoided\ndamage with {{abilityName}}!", - "perishBody": "{{pokemonName}}'s {{abilityName}}\nwill faint both pokemon in 3 turns!", + "perishBody": "{{pokemonName}}'s {{abilityName}}\nwill faint both Pokémon in 3 turns!", "poisonHeal": "{{pokemonName}}'s {{abilityName}}\nrestored its HP a little!", "trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!", "windPowerCharged": "Being hit by {{moveName}} charged {{pokemonName}} with power!", @@ -61,4 +61,4 @@ "postSummonTabletsOfRuin": "{{pokemonNameWithAffix}}'s Tablets of Ruin lowered the {{statName}}\nof all surrounding Pokémon!", "postSummonBeadsOfRuin": "{{pokemonNameWithAffix}}'s Beads of Ruin lowered the {{statName}}\nof all surrounding Pokémon!", "preventBerryUse": "{{pokemonNameWithAffix}} is too\nnervous to eat berries!" -} \ No newline at end of file +} diff --git a/src/locales/en/battler-tags.json b/src/locales/en/battler-tags.json index 222aee4087c..5c351fc6961 100644 --- a/src/locales/en/battler-tags.json +++ b/src/locales/en/battler-tags.json @@ -69,5 +69,6 @@ "cursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!", "stockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!", "disabledOnAdd": "{{pokemonNameWithAffix}}'s {{moveName}}\nwas disabled!", - "disabledLapse": "{{pokemonNameWithAffix}}'s {{moveName}}\nis no longer disabled." + "disabledLapse": "{{pokemonNameWithAffix}}'s {{moveName}}\nis no longer disabled.", + "tarShotOnAdd": "{{pokemonNameWithAffix}} became weaker to fire!" } diff --git a/src/locales/en/challenges.json b/src/locales/en/challenges.json index 7d330401407..7792755d626 100644 --- a/src/locales/en/challenges.json +++ b/src/locales/en/challenges.json @@ -1,6 +1,6 @@ { "title": "Challenge Modifiers", - "illegalEvolution": "{{pokemon}} changed into an ineligble pokémon\nfor this challenge!", + "illegalEvolution": "{{pokemon}} changed into an ineligible Pokémon\nfor this challenge!", "noneSelected": "None Selected", "singleGeneration": { "name": "Mono Gen", @@ -34,4 +34,4 @@ "value.0": "Off", "value.1": "On" } -} \ No newline at end of file +} diff --git a/src/locales/en/mystery-encounters/field-trip-dialogue.json b/src/locales/en/mystery-encounters/field-trip-dialogue.json index d688fe7af97..61900d56cd7 100644 --- a/src/locales/en/mystery-encounters/field-trip-dialogue.json +++ b/src/locales/en/mystery-encounters/field-trip-dialogue.json @@ -18,11 +18,14 @@ "label": "A Status Move", "tooltip": "(+) Status Item Rewards" }, - "selected": "{{pokeName}} shows off an awesome display of {{move}}!", - "incorrect": "...$That isn't a {{moveCategory}} move!$I'm sorry, but I can't give you anything.", - "lesson_learned": "Looks like you learned a valuable lesson?$Your Pokémon also gained some knowledge." + "selected": "{{pokeName}} shows off an awesome display of {{move}}!" }, "second_option_prompt": "Choose a move for your Pokémon to use.", - "outro_good": "Thank you so much for your kindness!\nI hope the items I had were helpful!", - "outro_bad": "Come along children, we'll\nfind a better demonstration elsewhere." + "incorrect": "...$That isn't a {{moveCategory}} move!\nI'm sorry, but I can't give you anything.$Come along children, we'll\nfind a better demonstration elsewhere.", + "incorrect_exp": "Looks like you learned a valuable lesson?$Your Pokémon also gained some experience.", + "correct": "Thank you so much for your kindness!\nI hope these items might be of use to you!", + "correct_exp": "{{pokeName}} also gained some valuable experience!", + "status": "Status", + "physical": "Physical", + "special": "Special" } \ No newline at end of file diff --git a/src/locales/en/mystery-encounters/uncommon-breed-dialogue.json b/src/locales/en/mystery-encounters/uncommon-breed-dialogue.json index a1fef9a0001..e6f5b3d3fcd 100644 --- a/src/locales/en/mystery-encounters/uncommon-breed-dialogue.json +++ b/src/locales/en/mystery-encounters/uncommon-breed-dialogue.json @@ -8,7 +8,7 @@ "label": "Battle the Pokémon", "tooltip": "(-) Tricky Battle\n(+) Strong Catchable Foe", "selected": "You approach the\n{{enemyPokemon}} without fear.", - "stat_boost": "The {{enemyPokemon}} heightened abilities boost its stats!" + "stat_boost": "The {{enemyPokemon}}'s heightened abilities boost its stats!" }, "2": { "label": "Give It Food", diff --git a/src/locales/es/ability-trigger.json b/src/locales/es/ability-trigger.json index 8bbcc80662c..4380c84b8e9 100644 --- a/src/locales/es/ability-trigger.json +++ b/src/locales/es/ability-trigger.json @@ -12,6 +12,7 @@ "blockItemTheft": "¡{{pokemonNameWithAffix}} evitó el robo gracias a {{abilityName}}!", "typeImmunityHeal": "¡{{pokemonNameWithAffix}} restauró algunos de sus PS gracias a {{abilityName}}!", "nonSuperEffectiveImmunity": "¡{{pokemonNameWithAffix}} evitó el daño gracias a {{abilityName}}!", + "fullHpResistType": "¡{{pokemonNameWithAffix}} ha hecho brillar su caparazón\ny ha alterado su compatibilidad entre tipos!", "moveImmunity": "¡No afecta a {{pokemonNameWithAffix}}!", "reverseDrain": "¡{{pokemonNameWithAffix}} absorbió lodo líquido!", "postDefendTypeChange": "¡{{abilityName}} de {{pokemonNameWithAffix}} cambió a tipo {{typeName}}!", @@ -51,6 +52,7 @@ "postSummonTeravolt": "¡{{pokemonNameWithAffix}} irradia un aura chisporroteante!", "postSummonDarkAura": "¡{{pokemonNameWithAffix}} irradia un aura oscura!", "postSummonFairyAura": "¡{{pokemonNameWithAffix}} irradia un aura feérica!", + "postSummonAuraBreak": "¡{{pokemonNameWithAffix}} ha invertido todas las auras!", "postSummonNeutralizingGas": "¡El Gas Reactivo de {{pokemonNameWithAffix}} se propaga por toda la zona!", "postSummonAsOneGlastrier": "¡{{pokemonNameWithAffix}} tiene dos Habilidades!", "postSummonAsOneSpectrier": "¡{{pokemonNameWithAffix}} tiene dos Habilidades!", diff --git a/src/locales/es/battle.json b/src/locales/es/battle.json index 8573f74a94e..c79315f297b 100644 --- a/src/locales/es/battle.json +++ b/src/locales/es/battle.json @@ -42,6 +42,7 @@ "moveNotImplemented": "{{moveName}} aún no está implementado y no se puede seleccionar.", "moveNoPP": "¡No hay suficientes PP\npara este movimiento!", "moveDisabled": "!No puede usar {{moveName}} porque ha sido anulado!", + "disableInterruptedMove": "¡Se ha anulado el movimiento {{moveName}}\nde {{pokemonNameWithAffix}}!", "noPokeballForce": "Una fuerza misteriosa\nte impide usar Poké Balls.", "noPokeballTrainer": "¡No puedes atrapar a los\nPokémon de los demás!", "noPokeballMulti": "¡No se pueden lanzar Poké Balls\ncuando hay más de un Pokémon!", @@ -85,4 +86,4 @@ "statSeverelyFell_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} han bajado muchísimo!", "statWontGoAnyLower_one": "¡El {{stats}} de {{pokemonNameWithAffix}} no puede bajar más!", "statWontGoAnyLower_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} no pueden bajar más!" -} \ No newline at end of file +} diff --git a/src/locales/es/battler-tags.json b/src/locales/es/battler-tags.json index d917b6c74b5..891fda53c5d 100644 --- a/src/locales/es/battler-tags.json +++ b/src/locales/es/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "¡{{moveName}} ha herido a {{pokemonNameWithAffix}}!", "cursedOnAdd": "¡{{pokemonNameWithAffix}} sacrifica algunos PS y maldice a {{pokemonName}}!", "cursedLapse": "¡{{pokemonNameWithAffix}} es víctima de una maldición!", - "stockpilingOnAdd": "¡{{pokemonNameWithAffix}} ha reservado energía por {{stockpiledCount}}ª vez!" + "stockpilingOnAdd": "¡{{pokemonNameWithAffix}} ha reservado energía por {{stockpiledCount}}ª vez!", + "disabledOnAdd": "¡Se ha anulado el movimiento {{moveName}}\nde {{pokemonNameWithAffix}}!", + "disabledLapse": "¡El movimiento {{moveName}} de {{pokemonNameWithAffix}} \n ya no está anulado!" } diff --git a/src/locales/es/menu.json b/src/locales/es/menu.json index 3f2caafac21..ef1ae93dd82 100644 --- a/src/locales/es/menu.json +++ b/src/locales/es/menu.json @@ -51,5 +51,7 @@ "renamePokemon": "Renombrar Pokémon.", "rename": "Renombrar", "nickname": "Apodo", - "errorServerDown": "¡Ups! Ha habido un problema al contactar con el servidor.\n\nPuedes mantener esta ventana abierta, el juego se reconectará automáticamente." + "errorServerDown": "¡Ups! Ha habido un problema al contactar con el servidor.\n\nPuedes mantener esta ventana abierta, el juego se reconectará automáticamente.", + "noSaves": "No tienes ninguna partida guardada registrada!", + "tooManySaves": "¡Tienes demasiadas partidas guardadas registradas!" } diff --git a/src/locales/es/modifier-type.json b/src/locales/es/modifier-type.json index e18cb19244d..3ac4d85f793 100644 --- a/src/locales/es/modifier-type.json +++ b/src/locales/es/modifier-type.json @@ -47,10 +47,14 @@ "description": "Cambia la naturaleza de un Pokémon a {{natureName}} y desbloquea permanentemente dicha naturaleza para el inicial." }, "DoubleBattleChanceBoosterModifierType": { - "description": "Duplica la posibilidad de que un encuentro sea una combate doble durante {{battleCount}} combates." + "description": "Cuadruplica la posibilidad de que un encuentro sea una combate doble durante {{battleCount}} combates." }, "TempStatStageBoosterModifierType": { - "description": "Aumenta la est. {{stat}} de todos los miembros del equipo en 1 nivel durante 5 combates." + "description": "Aumenta la est. {{stat}} de todos los miembros del equipo en {{amount}} durante 5 combates.", + "extra": { + "stage": "1 nivel", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "Aumenta la potencia de los movimientos de tipo {{moveType}} de un Pokémon en un 20%." diff --git a/src/locales/fr/ability-trigger.json b/src/locales/fr/ability-trigger.json index d10fc18a146..761242b3d94 100644 --- a/src/locales/fr/ability-trigger.json +++ b/src/locales/fr/ability-trigger.json @@ -3,14 +3,15 @@ "badDreams": "{{pokemonName}} a le sommeil agité !", "costar": "{{pokemonName}} copie les changements de stats\nde {{allyName}} !", "iceFaceAvoidedDamage": "{{pokemonNameWithAffix}} évite les dégâts\navec {{abilityName}} !", - "perishBody": "{{abilityName}} de {{pokemonName}}\nmettra les deux Pokémon K.O. dans trois tours !", - "poisonHeal": "{{abilityName}} de {{pokemonName}}\nrestaure un peu ses PV !", + "perishBody": "{{abilityName}} de {{pokemonName}}\nmettra les deux Pokémon K.O. dans trois tours !", + "poisonHeal": "{{abilityName}} de {{pokemonName}}\nrestaure un peu ses PV !", "trace": "{{pokemonName}} copie le talent {{abilityName}}\nde {{targetName}} !", - "windPowerCharged": "{{pokemonName}} a été touché par la capacité {{moveName}} et se charge en électricité !", + "windPowerCharged": "{{pokemonName}} a été touché par la capacité {{moveName}} et se charge en électricité !", "quickDraw": "Tir Vif permet à {{pokemonName}}\nd’agir plus vite que d’habitude !", "blockItemTheft": "{{abilityName}} de {{pokemonNameWithAffix}}\nempêche son objet d’être volé !", - "typeImmunityHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", + "typeImmunityHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}} évite\nles dégâts avec {{abilityName}} !", + "fullHpResistType": "{{pokemonNameWithAffix}} fait briller sa carapace\net fausse les affinités de type !", "disguiseAvoidedDamage": "Le déguisement de {{pokemonNameWithAffix}}\ntombe !", "moveImmunity": "Ça n’affecte pas {{pokemonNameWithAffix}}…", "reverseDrain": "{{pokemonNameWithAffix}} aspire\nle suintement !", @@ -33,12 +34,12 @@ "battlerTagImmunity": "{{abilityName}} de {{pokemonNameWithAffix}}\nempêche {{battlerTagName}} !", "forewarn": "La capacité {{moveName}}\nde {{pokemonNameWithAffix}} a été détectée !", "frisk": "{{pokemonNameWithAffix}} fouille {{opponentName}}\net trouve son talent {{opponentAbilityName}} !", - "postWeatherLapseHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", + "postWeatherLapseHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", "postWeatherLapseDamage": "{{pokemonNameWithAffix}} est blessé\npar son talent {{abilityName}} !", "postTurnLootCreateEatenBerry": "{{pokemonNameWithAffix}} a récolté\nune {{berryName}} !", - "postTurnHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", + "postTurnHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", "fetchBall": "{{pokemonNameWithAffix}} trouve\nune {{pokeballName}} !", - "healFromBerryUse": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", + "healFromBerryUse": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaure un peu ses PV !", "arenaTrap": "{{pokemonNameWithAffix}} empêche\nles changements grâce à son talent {{abilityName}} !", "postBattleLoot": "{{pokemonNameWithAffix}} ramasse\nl’objet {{itemName}} !", "postFaintContactDamage": "{{pokemonNameWithAffix}} est blessé\npar son talent {{abilityName}} !", @@ -49,8 +50,9 @@ "postSummonAnticipation": "{{pokemonNameWithAffix}}\nest tout tremblant !", "postSummonTurboblaze": "{{pokemonNameWithAffix}} dégage\nune aura de flammes incandescentes !", "postSummonTeravolt": "{{pokemonNameWithAffix}} dégage\nune aura électrique instable !", - "postSummonDarkAura": "{{pokemonNameWithAffix}} dégage\nune aura ténébreuse !", + "postSummonDarkAura": "{{pokemonNameWithAffix}} dégage\nune aura ténébreuse !", "postSummonFairyAura": "{{pokemonNameWithAffix}} dégage\nune aura enchanteresse !", + "postSummonAuraBreak": "{{pokemonNameWithAffix}} inverse\ntoutes les auras !", "postSummonNeutralizingGas": "Le gaz inhibiteur {{pokemonNameWithAffix}}\nenvahit les lieux !", "postSummonAsOneGlastrier": "{{pokemonNameWithAffix}}\na deux talents !", "postSummonAsOneSpectrier": "{{pokemonNameWithAffix}}\na deux talents !", diff --git a/src/locales/fr/achv.json b/src/locales/fr/achv.json index 3e95f9326ca..a557a423db7 100644 --- a/src/locales/fr/achv.json +++ b/src/locales/fr/achv.json @@ -227,7 +227,7 @@ "name": "Angry Birds" }, "MONO_POISON": { - "name": "Touche moi je t’empoisonne !" + "name": "Touche moi je t’empoisonne !" }, "MONO_GROUND": { "name": "Prévisions : Séisme" @@ -242,7 +242,7 @@ "name": "SOS Fantômes" }, "MONO_STEEL": { - "name": "De type Acier !" + "name": "De type Acier !" }, "MONO_FIRE": { "name": "Allumer le feu" diff --git a/src/locales/fr/arena-tag.json b/src/locales/fr/arena-tag.json index c3c705290fa..9cb2f342068 100644 --- a/src/locales/fr/arena-tag.json +++ b/src/locales/fr/arena-tag.json @@ -54,4 +54,4 @@ "safeguardOnRemove": "Le terrain n’est plus protégé\npar le voile mystérieux !", "safeguardOnRemovePlayer": "Votre équipe n’est plus protégée\npar le voile mystérieux !", "safeguardOnRemoveEnemy": "L’équipe ennemie n’est plus protégée\npar le voile mystérieux !" -} \ No newline at end of file +} diff --git a/src/locales/fr/battle.json b/src/locales/fr/battle.json index b8da3a953ae..7b78c963187 100644 --- a/src/locales/fr/battle.json +++ b/src/locales/fr/battle.json @@ -1,70 +1,71 @@ { "bossAppeared": "Un {{bossName}} apparait.", - "trainerAppeared": "Un combat est lancé\npar {{trainerName}} !", - "trainerAppearedDouble": "Un combat est lancé\npar {{trainerName}} !", + "trainerAppeared": "Un combat est lancé\npar {{trainerName}} !", + "trainerAppearedDouble": "Un combat est lancé\npar {{trainerName}} !", "trainerSendOut": "{{pokemonName}} est envoyé par\n{{trainerName}} !", - "singleWildAppeared": "Un {{pokemonName}} sauvage apparait !", - "multiWildAppeared": "Un {{pokemonName1}} et un {{pokemonName2}}\nsauvages apparaissent !", - "playerComeBack": "{{pokemonName}} !\nReviens !", - "trainerComeBack": "{{trainerName}} retire {{pokemonName}} !", - "playerGo": "{{pokemonName}} ! Go !", - "trainerGo": "{{pokemonName}} est envoyé par\n{{trainerName}} !", - "switchQuestion": "Voulez-vous changer\nvotre {{pokemonName}} ?", - "trainerDefeated": "Vous avez battu\n{{trainerName}} !", - "moneyWon": "Vous remportez\n{{moneyAmount}} ₽ !", + "singleWildAppeared": "Un {{pokemonName}} sauvage apparait !", + "multiWildAppeared": "Un {{pokemonName1}} et un {{pokemonName2}}\nsauvages apparaissent !", + "playerComeBack": "{{pokemonName}} !\nReviens !", + "trainerComeBack": "{{trainerName}} retire\n{{pokemonName}} !", + "playerGo": "{{pokemonName}} ! Go !", + "trainerGo": "{{pokemonName}} est envoyé par\n{{trainerName}} !", + "switchQuestion": "Voulez-vous changer\n{{pokemonName}} ?", + "trainerDefeated": "Vous avez battu\n{{trainerName}} !", + "moneyWon": "Vous remportez\n{{moneyAmount}} ₽ !", "moneyPickedUp": "Vous obtenez {{moneyAmount}} ₽ !", - "pokemonCaught": "Vous avez attrapé {{pokemonName}} !", + "pokemonCaught": "Vous avez attrapé\n{{pokemonName}} !", "addedAsAStarter": "{{pokemonName}} est ajouté\ncomme starter !", "partyFull": "Votre équipe est pleine.\nRelâcher un Pokémon pour {{pokemonName}} ?", - "pokemon": "Pokémon", - "sendOutPokemon": "{{pokemonName}} ! Go !", + "pokemon": "de Pokémon", + "sendOutPokemon": "{{pokemonName}} ! Go !", "hitResultCriticalHit": "Coup critique !", "hitResultSuperEffective": "C’est super efficace !", "hitResultNotVeryEffective": "Ce n’est pas très efficace…", "hitResultNoEffect": "Ça n’affecte pas {{pokemonName}}…", "hitResultImmune": "{{pokemonName}} n’est pas affecté !", "hitResultOneHitKO": "K.O. en un coup !", - "attackFailed": "Mais cela échoue !", + "attackFailed": "Mais cela échoue !", "attackMissed": "{{pokemonNameWithAffix}}\névite l’attaque !", - "attackHitsCount": "Touché {{count}} fois !", + "attackHitsCount": "Touché {{count}} fois !", "rewardGain": "Vous recevez\n{{modifierName}} !", - "expGain": "{{pokemonName}} gagne\n{{exp}} Points d’Exp !", - "levelUp": "{{pokemonName}} monte au\nN. {{level}} !", - "learnMove": "{{pokemonName}} apprend\n{{moveName}} !", + "expGain": "{{pokemonName}} gagne\n{{exp}} Points d’Exp !", + "levelUp": "{{pokemonName}} monte au\nN. {{level}} !", + "learnMove": "{{pokemonName}} apprend\n{{moveName}} !", "learnMovePrompt": "{{pokemonName}} veut apprendre\n{{moveName}}.", "learnMoveLimitReached": "Cependant, {{pokemonName}} connait\ndéjà quatre capacités.", - "learnMoveReplaceQuestion": "Voulez-vous oublier une capacité\net la remplacer par {{moveName}} ?", - "learnMoveStopTeaching": "Arrêter d’apprendre\n{{moveName}} ?", + "learnMoveReplaceQuestion": "Voulez-vous oublier une capacité\net la remplacer par {{moveName}} ?", + "learnMoveStopTeaching": "Arrêter d’apprendre\n{{moveName}} ?", "learnMoveNotLearned": "{{pokemonName}} n’a pas appris\n{{moveName}}.", - "learnMoveForgetQuestion": "Quelle capacité doit être oubliée ?", + "learnMoveForgetQuestion": "Quelle capacité doit être oubliée ?", "learnMoveForgetSuccess": "{{pokemonName}} oublie comment\nutiliser {{moveName}}.", "countdownPoof": "@d{32}1, @d{15}2, @d{15}et@d{15}… @d{15}… @d{15}… @d{15}@s{se/pb_bounce_1}Tadaaa !", "learnMoveAnd": "Et…", - "levelCapUp": "La limite de niveau\na été augmentée à {{levelCap}} !", + "levelCapUp": "La limite de niveau\na été augmentée à {{levelCap}} !", "moveNotImplemented": "{{moveName}} n’est pas encore implémenté et ne peut pas être sélectionné.", "moveNoPP": "Il n’y a plus de PP pour\ncette capacité !", - "moveDisabled": "{{moveName}} est sous entrave !", + "moveDisabled": "{{moveName}} est sous entrave !", + "disableInterruptedMove": "Il y a une entrave sur la capacité {{moveName}}\nde{{pokemonNameWithAffix}} !", "noPokeballForce": "Une force mystérieuse\nempêche l’utilisation des Poké Balls.", - "noPokeballTrainer": "Le Dresseur détourne la Ball\nVoler, c’est mal !", - "noPokeballMulti": "Impossible ! On ne peut pas viser\nquand il y a deux Pokémon !", - "noPokeballStrong": "Le Pokémon est trop fort pour être capturé !\nVous devez d’abord l’affaiblir !", + "noPokeballTrainer": "Le Dresseur détourne la Ball\nVoler, c’est mal !", + "noPokeballMulti": "Impossible ! On ne peut pas viser\nquand il y a deux Pokémon !", + "noPokeballStrong": "Le Pokémon est trop fort pour être capturé !\nVous devez d’abord l’affaiblir !", "noEscapeForce": "Une force mystérieuse\nempêche la fuite.", - "noEscapeTrainer": "On ne s’enfuit pas d’un\ncombat de Dresseurs !", - "noEscapePokemon": "{{moveName}} de {{pokemonName}}\nempêche {{escapeVerb}} !", - "runAwaySuccess": "Vous prenez la fuite !", - "runAwayCannotEscape": "Fuite impossible !", + "noEscapeTrainer": "On ne s’enfuit pas d’un\ncombat de Dresseurs !", + "noEscapePokemon": "{{moveName}} de {{pokemonName}}\nempêche {{escapeVerb}} !", + "runAwaySuccess": "Vous prenez la fuite !", + "runAwayCannotEscape": "Fuite impossible !", "escapeVerbSwitch": "le changement", "escapeVerbFlee": "la fuite", - "notDisabled": "La capacité {{moveName}}\nde {{pokemonName}} n’est plus sous entrave !", + "notDisabled": "La capacité {{moveName}}\nde {{pokemonName}} n’est plus sous entrave !", "turnEndHpRestore": "{{pokemonName}} récupère des PV !", "hpIsFull": "Les PV de {{pokemonName}}\nsont au maximum !", - "skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre d’objet ?", + "skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre d’objet ?", "itemStackFull": "Quantité maximale de {{fullItemName}} atteinte.\nVous recevez {{itemName}} à la place.", - "eggHatching": "Hein ?", - "ivScannerUseQuestion": "Utiliser le Scanner d’IV\nsur {{pokemonName}} ?", + "eggHatching": "Hein ?", + "ivScannerUseQuestion": "Utiliser le Scanner d’IV\nsur {{pokemonName}} ?", "wildPokemonWithAffix": "{{pokemonName}} sauvage", "foePokemonWithAffix": "{{pokemonName}} ennemi", - "useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !", + "useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !", "stealEatBerry": "{{pokemonName}} vole et mange\nla {{berryName}} de {{targetName}} !", "ppHealBerry": "La {{berryName}} de {{pokemonNameWithAffix}}\nrestaure les PP de sa capacité {{moveName}} !", "hpHealBerry": "La {{berryName}} de {{pokemonNameWithAffix}}\nrestaure son énergie !", @@ -73,27 +74,27 @@ "fainted": "{{pokemonNameWithAffix}}\nest K.O. !", "statsAnd": "et", "stats": "Les stats", - "statRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente !", - "statRose_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent !", - "statSharplyRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente beaucoup !", - "statSharplyRose_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent beaucoup !", - "statRoseDrastically_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente énormément !", - "statRoseDrastically_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent énormément !", - "statWontGoAnyHigher_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus augmenter !", - "statWontGoAnyHigher_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus augmenter !", - "statFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse !", - "statFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent !", - "statHarshlyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse beaucoup !", - "statHarshlyFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent beaucoup !", - "statSeverelyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse énormément !", - "statSeverelyFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent énormément !", - "statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus baisser !", - "statWontGoAnyLower_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus baisser !", - "transformedIntoType": "{{pokemonName}} transformed\ninto the {{type}} type!", - "ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !", - "retryBattle": "Voulez-vous réessayer depuis le début du combat ?", + "statRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente !", + "statRose_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent !", + "statSharplyRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente beaucoup !", + "statSharplyRose_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent beaucoup !", + "statRoseDrastically_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente énormément !", + "statRoseDrastically_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent énormément !", + "statWontGoAnyHigher_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus augmenter !", + "statWontGoAnyHigher_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus augmenter !", + "statFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse !", + "statFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent !", + "statHarshlyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse beaucoup !", + "statHarshlyFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent beaucoup !", + "statSeverelyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse énormément !", + "statSeverelyFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent énormément !", + "statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus baisser !", + "statWontGoAnyLower_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus baisser !", + "transformedIntoType": "{{pokemonName}} prend\nle type {{type}} !", + "ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !", + "retryBattle": "Voulez-vous réessayer depuis le début du combat ?", "unlockedSomething": "{{unlockedThing}}\na été débloqué.", - "congratulations": "Félicitations !", - "beatModeFirstTime": "{{speciesName}} a battu le mode {{gameMode}} pour la première fois !\nVous avez reçu {{newModifier}} !", - "eggSkipPrompt": "Aller directement au résumé des Œufs éclos ?" + "congratulations": "Félicitations !", + "beatModeFirstTime": "{{speciesName}} a battu le mode {{gameMode}} pour la première fois !\nVous avez reçu {{newModifier}} !", + "eggSkipPrompt": "Aller directement au résumé des Œufs éclos ?" } diff --git a/src/locales/fr/battler-tags.json b/src/locales/fr/battler-tags.json index 46b086938b3..f523eb7f07d 100644 --- a/src/locales/fr/battler-tags.json +++ b/src/locales/fr/battler-tags.json @@ -29,8 +29,8 @@ "nightmareOnAdd": "{{pokemonNameWithAffix}} commence à cauchemarder !", "nightmareOnOverlap": "{{pokemonNameWithAffix}} est\ndéjà prisonnier d’un cauchemar !", "nightmareLapse": "{{pokemonNameWithAffix}}est\nprisonnier d’un cauchemar !", - "encoreOnAdd": "{{pokemonNameWithAffix}} !\nEncore une fois !", - "encoreOnRemove": "{{pokemonNameWithAffix}} n’est\nplus obligé d’utiliser la même capacité !", + "encoreOnAdd": "{{pokemonNameWithAffix}} !\nEncore une fois !", + "encoreOnRemove": "{{pokemonNameWithAffix}} n’est\nplus obligé d’utiliser la même capacité !", "helpingHandOnAdd": "{{pokemonNameWithAffix}} est prêt\nà aider {{pokemonName}} !", "ingrainLapse": "{{pokemonNameWithAffix}} absorbe\ndes nutriments avec ses racines !", "ingrainOnTrap": "{{pokemonNameWithAffix}}\nplante ses racines !", @@ -50,22 +50,24 @@ "protectedOnAdd": "{{pokemonNameWithAffix}}\nest prêt à se protéger !", "protectedLapse": "{{pokemonNameWithAffix}}\nse protège !", "enduringOnAdd": "{{pokemonNameWithAffix}} se prépare\nà encaisser les coups !", - "enduringLapse": "{{pokemonNameWithAffix}}\nencaisse les coups !", - "sturdyLapse": "{{pokemonNameWithAffix}}\nencaisse les coups !", + "enduringLapse": "{{pokemonNameWithAffix}}\nencaisse les coups !", + "sturdyLapse": "{{pokemonNameWithAffix}}\nencaisse les coups !", "perishSongLapse": "Le compte à rebours de Requiem\nde {{pokemonNameWithAffix}} descend à {{turnCount}} !", - "centerOfAttentionOnAdd": "{{pokemonNameWithAffix}} devient\nle centre de l’attention !", - "truantLapse": "{{pokemonNameWithAffix}} paresse !", - "slowStartOnAdd": "{{pokemonNameWithAffix}}\nn’arrive pas à se motiver !", - "slowStartOnRemove": "{{pokemonNameWithAffix}}\narrive enfin à s’y mettre sérieusement !", - "highestStatBoostOnAdd": "{{statName}} de {{pokemonNameWithAffix}}\nest renforcée !", - "highestStatBoostOnRemove": "L’effet du talent {{abilityName}}\nde {{pokemonNameWithAffix}} se dissipe !", - "magnetRisenOnAdd": "{{pokemonNameWithAffix}} lévite\nsur un champ magnétique !", - "magnetRisenOnRemove": "Le magnétisme de{{pokemonNameWithAffix}}\nse dissipe !", + "centerOfAttentionOnAdd": "{{pokemonNameWithAffix}} devient\nle centre de l’attention !", + "truantLapse": "{{pokemonNameWithAffix}} paresse !", + "slowStartOnAdd": "{{pokemonNameWithAffix}}\nn’arrive pas à se motiver !", + "slowStartOnRemove": "{{pokemonNameWithAffix}}\narrive enfin à s’y mettre sérieusement !", + "highestStatBoostOnAdd": "{{statName}} de {{pokemonNameWithAffix}}\nest renforcée !", + "highestStatBoostOnRemove": "L’effet du talent {{abilityName}}\nde {{pokemonNameWithAffix}} se dissipe !", + "magnetRisenOnAdd": "{{pokemonNameWithAffix}} lévite\nsur un champ magnétique !", + "magnetRisenOnRemove": "Le magnétisme de{{pokemonNameWithAffix}}\nse dissipe !", "critBoostOnAdd": "{{pokemonNameWithAffix}}\nest prêt à tout donner !", "critBoostOnRemove": "{{pokemonNameWithAffix}} se détend.", - "saltCuredOnAdd": "{{pokemonNameWithAffix}}\nest couvert de sel !", + "saltCuredOnAdd": "{{pokemonNameWithAffix}}\nest couvert de sel !", "saltCuredLapse": "{{pokemonNameWithAffix}} est blessé\npar la capacité {{moveName}} !", "cursedOnAdd": "{{pokemonNameWithAffix}} sacrifie des PV\net lance une malédiction sur {{pokemonName}} !", "cursedLapse": "{{pokemonNameWithAffix}} est touché par la malédiction !", - "stockpilingOnAdd": "{{pokemonNameWithAffix}} utilise\nla capacité Stockage {{stockpiledCount}} fois !" -} \ No newline at end of file + "stockpilingOnAdd": "{{pokemonNameWithAffix}} utilise\nla capacité Stockage {{stockpiledCount}} fois !", + "disabledOnAdd": "La capacité {{moveName}}\nde {{pokemonNameWithAffix}} est mise sous entrave !", + "disabledLapse": "La capacité {{moveName}}\nde {{pokemonNameWithAffix}} n’est plus sous entrave !" +} diff --git a/src/locales/fr/command-ui-handler.json b/src/locales/fr/command-ui-handler.json index a991c618820..82733837375 100644 --- a/src/locales/fr/command-ui-handler.json +++ b/src/locales/fr/command-ui-handler.json @@ -3,5 +3,5 @@ "ball": "Ball", "pokemon": "Pokémon", "run": "Fuite", - "actionMessage": "Que doit faire\n{{pokemonName}} ?" -} \ No newline at end of file + "actionMessage": "Que doit faire\n{{pokemonName}} ?" +} diff --git a/src/locales/fr/dialogue-double-battle.json b/src/locales/fr/dialogue-double-battle.json index d35e9d87ced..fbc5d56ed26 100644 --- a/src/locales/fr/dialogue-double-battle.json +++ b/src/locales/fr/dialogue-double-battle.json @@ -1,83 +1,83 @@ { "blue_red_double": { "encounter": { - "1": "Blue : Hé Red, montrons-lui de quel bois on se chauffe !\n$Red : …\n$Blue : Voilà la puissance du Bourg Palette !" + "1": "Blue : Hé Red, montrons-lui de quel bois on se chauffe !\n$Red : …\n$Blue : Voilà la puissance du Bourg Palette !" }, "victory": { - "1": "Blue : C’était un magnifique combat !\n$Red : …" + "1": "Blue : C’était un magnifique combat !\n$Red : …" } }, "red_blue_double": { "encounter": { - "1": "Red : … !\n$Blue : Il est pas très loquace.\n$Blue : Mais ne te laisse pas avoir, ça reste un Maitre Pokémon !" + "1": "Red : … !\n$Blue : Il est pas très loquace.\n$Blue : Mais ne te laisse pas avoir, ça reste un Maitre Pokémon !" }, "victory": { - "1": "Red : … !\n$Blue : La prochaine fois, on va te battre !" + "1": "Red : … !\n$Blue : La prochaine fois, on va te battre !" } }, "tate_liza_double": { "encounter": { - "1": "Lévy : Héhéhé… Tu en fais une drôle de tête.\n$Tatia : Tu ne t’attendais pas à rencontrer deux Champions, n’est-ce pas ?\n$Lévy : Nous sommes des jumeaux !\n$Tatia : Nous n’avons pas besoin de parler entre nous !\n$Lévy : Tu crois pouvoir briser…\n$Tatia : … Notre duo parfait ?" + "1": "Lévy : Héhéhé… Tu en fais une drôle de tête.\n$Tatia : Tu ne t’attendais pas à rencontrer deux Champions, n’est-ce pas ?\n$Lévy : Nous sommes des jumeaux !\n$Tatia : Nous n’avons pas besoin de parler entre nous !\n$Lévy : Tu crois pouvoir briser…\n$Tatia : … Notre duo parfait ?" }, "victory": { - "1": "Lévy : Quoi ? Notre combinaison était parfaite !\n$Tatia : Nous avons encore besoin d’entrainement…" + "1": "Lévy : Quoi ? Notre combinaison était parfaite !\n$Tatia : Nous avons encore besoin d’entrainement…" } }, "liza_tate_double": { "encounter": { - "1": "Tatia : Hihih… Si tu voyais ta tête !\n$Lévy : Oui, nous sommes deux Champions en un !\n$Tatia : Voici mon frère, Lévy…\n$Lévy : … Et ma sœur, Tatia !\n$Tatia : Tu ne penses pas que notre combinaison est parfaite ?" + "1": "Tatia : Hihih… Si tu voyais ta tête !\n$Lévy : Oui, nous sommes deux Champions en un !\n$Tatia : Voici mon frère, Lévy…\n$Lévy : … Et ma sœur, Tatia !\n$Tatia : Tu ne penses pas que notre combinaison est parfaite ?" }, "victory": { - "1": "Tatia : Quoi ? Notre combinaison…\n$Lévy : … a échoué !" + "1": "Tatia : Quoi ? Notre combinaison…\n$Lévy : … a échoué !" } }, "wallace_steven_double": { "encounter": { - "1": "Pierre R. : Marc, montrons-lui la puissance des Maitres !\n$Marc : Tu vas gouter au pouvoir de Hoenn !\n$Pierre R. : C’est parti !" + "1": "Pierre R. : Marc, montrons-lui la puissance des Maitres !\n$Marc : Tu vas gouter au pouvoir de Hoenn !\n$Pierre R. : C’est parti !" }, "victory": { - "1": "Pierre R. : C’était un beau combat !\n$Marc : Ce sera notre tour la prochaine fois !" + "1": "Pierre R. : C’était un beau combat !\n$Marc : Ce sera notre tour la prochaine fois !" } }, "steven_wallace_double": { "encounter": { - "1": "Pierre R. : Excuse-moi, aurais-tu des Pokémon rares ?\n$Marc : Pierre… Nous sommes là pour nous battre, pas pour frimer avec nos Pokémon.\n$Pierre R. : Oh… Je vois… Commençons alors !" + "1": "Pierre R. : Excuse-moi, aurais-tu des Pokémon rares ?\n$Marc : Pierre… Nous sommes là pour nous battre, pas pour frimer avec nos Pokémon.\n$Pierre R. : Oh… Je vois… Commençons alors !" }, "victory": { - "1": "Pierre R. : Bien, maintenant que ce combat est clos, montrons-nous nos Pokémon !\n$Marc : Pierre…" + "1": "Pierre R. : Bien, maintenant que ce combat est clos, montrons-nous nos Pokémon !\n$Marc : Pierre…" } }, "alder_iris_double": { "encounter": { - "1": "Goyah : Nous sommes l’élite des Dresseurs d’Unys !\n$Iris : Rien de mieux que des combats contre des prodiges !" + "1": "Goyah : Nous sommes l’élite des Dresseurs d’Unys !\n$Iris : Rien de mieux que des combats contre des prodiges !" }, "victory": { - "1": "Goyah : INCROYABLE ! T’es trop doué !\n$Iris : On gagnera la prochaine fois !" + "1": "Goyah : INCROYABLE ! T’es trop doué !\n$Iris : On gagnera la prochaine fois !" } }, "iris_alder_double": { "encounter": { - "1": "Iris : Bienvenue, Dresseur ! Je suis LA Maitresse d’Unys !\n$Goyah : Iris, concentre-toi s’il te plait…" + "1": "Iris : Bienvenue, Dresseur ! Je suis LA Maitresse d’Unys !\n$Goyah : Iris, concentre-toi s’il te plait…" }, "victory": { - "1": "Iris : On a tout donné et pourtant…\n$Goyah : Cette défaite ne pourra que nous être bénéfique !" + "1": "Iris : On a tout donné et pourtant…\n$Goyah : Cette défaite ne pourra que nous être bénéfique !" } }, "piers_marnie_double": { "encounter": { - "1": "Rosemary : Frérot, montrons-lui la puissance de Smashings !\n$Peterson : Nous sommes les ténèbres !" + "1": "Rosemary : Frérot, montrons-lui la puissance de Smashings !\n$Peterson : Nous sommes les ténèbres !" }, "victory": { - "1": "Rosemary : T’as amené la lumière dans les ténèbres !\n$Peterson : P’têtre un peu trop…" + "1": "Rosemary : T’as amené la lumière dans les ténèbres !\n$Peterson : P’têtre un peu trop…" } }, "marnie_piers_double": { "encounter": { - "1": "Peterson : Chauds pour un concert ?\n$Rosemary : Frérot… Il est pas là pour chanter, mais se battre…", - "1_female": "Peterson : Chauds pour un concert ?\n$Rosemary : Frérot… Elle est pas là pour chanter, mais se battre…" + "1": "Peterson : Chauds pour un concert ?\n$Rosemary : Frérot… Il est pas là pour chanter, mais se battre…", + "1_female": "Peterson : Chauds pour un concert ?\n$Rosemary : Frérot… Elle est pas là pour chanter, mais se battre…" }, "victory": { - "1": "Peterson : Ça c’est du rock !\n$Rosemary : Frérot…" + "1": "Peterson : Ça c’est du rock !\n$Rosemary : Frérot…" } } } diff --git a/src/locales/fr/dialogue-final-boss.json b/src/locales/fr/dialogue-final-boss.json index c5a5e3b7d89..b7226ebb480 100644 --- a/src/locales/fr/dialogue-final-boss.json +++ b/src/locales/fr/dialogue-final-boss.json @@ -1,6 +1,6 @@ { - "encounter": "Une fois de plus, te revoilà.\nSais-tu que ce n’est point là ta première venue ?\n$Tu as été appelé ici parce que t’y es déjà venu.\nUn nombre inimaginable de fois.\n$Mais allons-y, faisons le décompte.\nTu en es très précisément à ton {{cycleCount}}e cycle.\n$Chaque cycle réinitialise ton souvenir du précédent.\nMais étrangement, des bribes subsistent en toi.\n$Jusqu’à maintenant, tu as toujours échoué. Mais je ressens quelque chose de différent cette fois-ci.\n\n$Tu es la seule présence ici, bien que j’ai le sentiment d’en ressentir… une autre.\n$Vas-tu enfin me livrer un affrontement digne de ce nom ?\nCe challenge dont je rêve depuis un millénaire ?\n$Commençons.", - "encounter_female": "Une fois de plus, te revoilà.\nSais-tu que ce n’est point là ta première venue ?\n$Tu as été appelée ici parce que t’y es déjà venue.\nUn nombre inimaginable de fois.\n$Mais allons-y, faisons le décompte.\nTu en es très précisément à ton {{cycleCount}}e cycle.\n$Chaque cycle réinitialise ton souvenir du précédent.\nMais étrangement, des bribes subsistent en toi.\n$Jusqu’à maintenant, tu as toujours échoué. Mais je ressens quelque chose de différent cette fois-ci.\n\n$Tu es la seule présence ici, bien que j’ai le sentiment d’en ressentir… une autre.\n$Vas-tu enfin me livrer un affrontement digne de ce nom ?\nCe challenge dont je rêve depuis un millénaire ?\n$Commençons.", + "encounter": "Une fois de plus, te revoilà.\nSais-tu que ce n’est point là ta première venue ?\n$Tu as été appelé ici parce que t’y es déjà venu.\nUn nombre inimaginable de fois.\n$Mais allons-y, faisons le décompte.\nTu en es très précisément à ton {{cycleCount}}e cycle.\n$Chaque cycle réinitialise ton souvenir du précédent.\nMais étrangement, des bribes subsistent en toi.\n$Jusqu’à maintenant, tu as toujours échoué. Mais je ressens quelque chose de différent cette fois-ci.\n\n$Tu es la seule présence ici, bien que j’ai le sentiment d’en ressentir… une autre.\n$Vas-tu enfin me livrer un affrontement digne de ce nom ?\nCe challenge dont je rêve depuis un millénaire ?\n$Commençons.", + "encounter_female": "Une fois de plus, te revoilà.\nSais-tu que ce n’est point là ta première venue ?\n$Tu as été appelée ici parce que t’y es déjà venue.\nUn nombre inimaginable de fois.\n$Mais allons-y, faisons le décompte.\nTu en es très précisément à ton {{cycleCount}}e cycle.\n$Chaque cycle réinitialise ton souvenir du précédent.\nMais étrangement, des bribes subsistent en toi.\n$Jusqu’à maintenant, tu as toujours échoué. Mais je ressens quelque chose de différent cette fois-ci.\n\n$Tu es la seule présence ici, bien que j’ai le sentiment d’en ressentir… une autre.\n$Vas-tu enfin me livrer un affrontement digne de ce nom ?\nCe challenge dont je rêve depuis un millénaire ?\n$Commençons.", "firstStageWin": "Je vois. Cette présence était bien réelle.\nJe n’ai donc plus besoin de retenir mes coups.\n$Ne me déçoit pas.", "secondStageWin": "… Magnifique." -} \ No newline at end of file +} diff --git a/src/locales/fr/dialogue-misc.json b/src/locales/fr/dialogue-misc.json index c8c781002b9..864bd53eab5 100644 --- a/src/locales/fr/dialogue-misc.json +++ b/src/locales/fr/dialogue-misc.json @@ -1,6 +1,6 @@ { - "ending": "@c{shock}T’es revenu ?@d{32} Ça veut dire…@d{96} que t’as gagné ?!\n@c{smile_ehalf}J’aurais dû m’en douter.\n$@c{smile_eclosed}Bien sûr… J’ai toujours eu ce sentiment.\n@c{smile}C’est fini maintenant hein ? T’as brisé ce cycle.\n$@c{smile_ehalf}T’as aussi accompli ton rêve non ?\nTu n’as pas connu la moindre défaite.\n$Je serai la seule à me souvenir de ce que t’as fait.\n@c{angry_mopen}Je tâcherai de ne pas oublier !\n$@c{smile_wave_wink}J’déconne !@d{64} @c{smile}Jamais j’oublierai.@d{32}\nTa légende vivra à jamais dans nos cœurs.\n$@c{smile_wave}Bon,@d{64} il se fait tard…@d{96} je crois ?\nDifficile à dire ici.\n$Rentrons, @c{smile_wave_wink}et demain on se fera un p’tit combat, comme au bon vieux temps ?", - "ending_female": "@c{smile}Oh ? T’as gagné ?@d{96} @c{smile_eclosed}J’aurais dû m’en douter.\nMais te voilà enfin de retour.\n$@c{smile}C’est terminé.@d{64} T’as brisé ce cycle infernal.\n$@c{serious_smile_fists}T’as aussi accompli ton rêve non ?\nTu n’as pas connu la moindre défaite.\n$@c{neutral}Je suis le seul à me souvenir de ce que t’as fait.@d{96}\nJe pense que ça ira, non ?\n$@c{serious_smile_fists}Ta légende vivra à jamais dans nos cœurs.\n$@c{smile_eclosed}Bref, j’en ai un peu marre de ce endroit, pas toi ? Rentrons à la maison.\n$@c{serious_smile_fists}On se fera un p’tit combat une fois rentrés ?\nSi t’es d’accord.", - "ending_endless": "Félicitations ! Vous avez atteint la fin actuelle.\nPlus de contenu à venir bientôt !", + "ending": "@c{shock}T’es revenu ?@d{32} Ça veut dire…@d{96} que t’as gagné ?!\n@c{smile_ehalf}J’aurais dû m’en douter.\n$@c{smile_eclosed}Bien sûr… J’ai toujours eu ce sentiment.\n@c{smile}C’est fini maintenant hein ? T’as brisé ce cycle.\n$@c{smile_ehalf}T’as aussi accompli ton rêve non ?\nTu n’as pas connu la moindre défaite.\n$Je serai la seule à me souvenir de ce que t’as fait.\n@c{angry_mopen}Je tâcherai de ne pas oublier !\n$@c{smile_wave_wink}J’déconne !@d{64} @c{smile}Jamais j’oublierai.@d{32}\nTa légende vivra à jamais dans nos cœurs.\n$@c{smile_wave}Bon,@d{64} il se fait tard…@d{96} je crois ?\nDifficile à dire ici.\n$Rentrons, @c{smile_wave_wink}et demain on se fera un p’tit combat, comme au bon vieux temps ?", + "ending_female": "@c{smile}Oh ? T’as gagné ?@d{96} @c{smile_eclosed}J’aurais dû m’en douter.\nMais te voilà enfin de retour.\n$@c{smile}C’est terminé.@d{64} T’as brisé ce cycle infernal.\n$@c{serious_smile_fists}T’as aussi accompli ton rêve non ?\nTu n’as pas connu la moindre défaite.\n$@c{neutral}Je suis le seul à me souvenir de ce que t’as fait.@d{96}\nJe pense que ça ira, non ?\n$@c{serious_smile_fists}Ta légende vivra à jamais dans nos cœurs.\n$@c{smile_eclosed}Bref, j’en ai un peu marre de ce endroit, pas toi ? Rentrons à la maison.\n$@c{serious_smile_fists}On se fera un p’tit combat une fois rentrés ?\nSi t’es d’accord.", + "ending_endless": "Félicitations ! Vous avez atteint la fin actuelle.\nPlus de contenu à venir bientôt !", "ending_name": "Les devs" } diff --git a/src/locales/fr/dialogue.json b/src/locales/fr/dialogue.json index d9d13a8f1e8..dddd0d8e5b7 100644 --- a/src/locales/fr/dialogue.json +++ b/src/locales/fr/dialogue.json @@ -1,50 +1,50 @@ { "youngster": { "encounter": { - "1": "Hé ! Combat ?", - "2": "Toi aussi tu débutes ?", - "3": "Hé, j’me souviens pas de ta tête. Combat !", - "4": "J’ai perdu, alors j’essaye de capturer d’autres Pokémon.\nHé, t’as l’air faible toi ! Allez, combat !", - "5": "On s’connait ? J’ai comme un doute. Dans tous les cas, sympa de te rencontrer !", - "6": "Allez, c’est parti !", - "7": "Attention, me voilà !\nTu vas voir comment j’suis fort !", - "8": "Coucou… Tu veux voir mes bô Pokémon ?", - "9": "Trêve de mondanités. Ramène-toi quand tu le sens !", + "1": "Hé ! Combat ?", + "2": "Toi aussi tu débutes ?", + "3": "Hé, j’me souviens pas de ta tête. Combat !", + "4": "J’ai perdu, alors j’essaye de capturer d’autres Pokémon.\nHé, t’as l’air faible toi ! Allez, combat !", + "5": "On s’connait ? J’ai comme un doute. Dans tous les cas, sympa de te rencontrer !", + "6": "Allez, c’est parti !", + "7": "Attention, me voilà !\nTu vas voir comment j’suis fort !", + "8": "Coucou… Tu veux voir mes bô Pokémon ?", + "9": "Trêve de mondanités. Ramène-toi quand tu le sens !", "10": "Baisse pas ta garde si tu veux pas pleurer d’avoir perdu face à un gamin.", - "11": "J’ai tout donné pour élever mes Pokémon. Attention à toi si tu leur fait du mal !", - "12": "Incroyable que t’y sois parvenu ! Mais la suite va pas être une partie de plaisir.", - "12_female": "Incroyable que t’y sois parvenue ! Mais la suite va pas être une partie de plaisir.", - "13": "Les combats sont éternels ! Bienvenue dans un monde sans fin !" + "11": "J’ai tout donné pour élever mes Pokémon. Attention à toi si tu leur fait du mal !", + "12": "Incroyable que t’y sois parvenu ! Mais la suite va pas être une partie de plaisir.", + "12_female": "Incroyable que t’y sois parvenue ! Mais la suite va pas être une partie de plaisir.", + "13": "Les combats sont éternels ! Bienvenue dans un monde sans fin !" }, "victory": { - "1": "Hé, mais t’es trop fort !", - "1_female": "Hé, mais t’es trop forte !", - "2": "En vrai j’avais aucune chance hein ?", - "3": "J’te retrouverai un jour, et là j’te battrai !", + "1": "Hé, mais t’es trop fort !", + "1_female": "Hé, mais t’es trop forte !", + "2": "En vrai j’avais aucune chance hein ?", + "3": "J’te retrouverai un jour, et là j’te battrai !", "4": "Arg… J’ai plus aucun Pokémon.", - "5": "Non… IMPOSSIBLE ! Pourquoi j’ai encore perdu…", - "6": "Non ! J’ai perdu !", - "7": "Waah ! T’es trop incroyable ! J’suis bouche bée !", + "5": "Non… IMPOSSIBLE ! Pourquoi j’ai encore perdu…", + "6": "Non ! J’ai perdu !", + "7": "Waah ! T’es trop incroyable ! J’suis bouche bée !", "8": "Pourquoi… Comment… Pourtant on est les plus forts, mes Pokémon et moi…", - "9": "J’perdrai pas la prochaine fois ! Remettons ça un jour !", - "10": "Weeeesh ! Tu vois que j’suis qu’un gamin ? C’est pas juste de me bully comme ça !", - "11": "Tes Pokémon sont trop incroyables !\n… P’tit échange ?", - "12": "Je me suis fait un peu aider plus tôt, mais de quel taf je parlais ?", - "13": "Ahaha ! Et voilà, ça y est !\nT’es déjà comme chez toi dans ce monde !" + "9": "J’perdrai pas la prochaine fois ! Remettons ça un jour !", + "10": "Weeeesh ! Tu vois que j’suis qu’un gamin ? C’est pas juste de me bully comme ça !", + "11": "Tes Pokémon sont trop incroyables !\n… P’tit échange ?", + "12": "Je me suis fait un peu aider plus tôt, mais de quel taf je parlais ?", + "13": "Ahaha ! Et voilà, ça y est !\nT’es déjà comme chez toi dans ce monde !" } }, "lass": { "encounter": { - "1": "Affrontons-nous, d’accord ?", - "2": "T’as l’air d’un nouveau Dresseur. Battons nous !", - "2_female": "T’as l’air d’une nouvelle Dresseuse. Battons nous !", - "3": "Je te connais pas. Ça te dis de te battre ?", - "4": "Prenons du bon temps avec ce combat Pokémon !", - "5": "Je vais t’apprendre à te battre avec tes Pokémon !", + "1": "Affrontons-nous, d’accord ?", + "2": "T’as l’air d’un nouveau Dresseur. Battons nous !", + "2_female": "T’as l’air d’une nouvelle Dresseuse. Battons nous !", + "3": "Je te connais pas. Ça te dis de te battre ?", + "4": "Prenons du bon temps avec ce combat Pokémon !", + "5": "Je vais t’apprendre à te battre avec tes Pokémon !", "6": "Un combat doit toujours être pris au sérieux.\nT’es prêt à te battre ?", - "6_female": "Un combat doit toujours être pris au sérieux.\nT’es prête à te battre ?", + "6_female": "Un combat doit toujours être pris au sérieux.\nT’es prête à te battre ?", "7": "Tu seras pas jeune éternellement. T’as qu’une chance pendant un combat. Bientôt, tu seras plus qu’un souvenir.", - "8": "Tu ferais mieux d’y aller doucement avec moi. Mais je vais me battre sérieusement !", + "8": "Tu ferais mieux d’y aller doucement avec moi. Mais je vais me battre sérieusement !", "9": "Je m’ennuie à l’école. Y’a rien à y faire. *Baille*\nJe me bats juste pour passer le temps." }, "victory": { @@ -52,12 +52,12 @@ "2": "Je ne pensais pas que je perdrais comme ça…", "2_female": "Je pensais pas que je perdrais comme ça…", "3": "J’espère que j’aurai ma revanche un jour.", - "4": "C’était super amusant ! Mais ce combat m’a épuisée…", - "5": "Tu m’as appris une belle leçon ! T’es vraiment incroyable !", - "6": "Vraiment ? J’ai perdu… ? C’est des choses qui arrivent, ça me déprime mais tu es vraiment très cool.", - "6_female": "Vraiment ? J’ai perdu… ? C’est des choses qui arrivent, ça me déprime mais t’es vraiment très cool.", + "4": "C’était super amusant ! Mais ce combat m’a épuisée…", + "5": "Tu m’as appris une belle leçon ! T’es vraiment incroyable !", + "6": "Vraiment ? J’ai perdu… ? C’est des choses qui arrivent, ça me déprime mais tu es vraiment très cool.", + "6_female": "Vraiment ? J’ai perdu… ? C’est des choses qui arrivent, ça me déprime mais t’es vraiment très cool.", "7": "J’ai pas besoin de ce genre de souvenirs.\n*Suppression de mémoire en cours…*", - "8": "Hé ! Je t’avais dit d’y aller doucement avec moi ! Mais t’es vraiment si cool quand tu te bats sérieusement…", + "8": "Hé ! Je t’avais dit d’y aller doucement avec moi ! Mais t’es vraiment si cool quand tu te bats sérieusement…", "9": "J’en ai marre des combats Pokémon…\nJe vais chercher d’autres trucs à faire…" } }, @@ -123,7 +123,7 @@ "encounter": { "1": "C’est l’heure de plonger dans le vif !", "2": "C’est le moment de surfer sur les vagues de la victoire !", - "3": "Je vais t’éclabousser de mon talent !" + "3": "Je vais t’éclabousser de mon talent !" }, "victory": { "1": "Tu m’as complètement séché", @@ -169,10 +169,10 @@ }, "parasol_lady": { "encounter": { - "1": "Honorons ce terrain de combat avec élégance et équilibre !" + "1": "Honorons ce terrain de combat avec élégance et équilibre !" }, "victory": { - "1": "Mon élégance demeure inébranlable !" + "1": "Mon élégance demeure inébranlable !" } }, "rocket_grunt": { @@ -528,14 +528,14 @@ "3": "Ouah ! T’es super balèze !" }, "defeat": { - "1": "Qu’en dis-tu? C’est ça, la puissance des Pokémon Eau !", + "1": "Qu’en dis-tu ? C’est ça, la puissance des Pokémon Eau !", "2": "J’espère que t’as pris note des élégantes techniques de nage de mes Pokémon !", "3": "Tes Pokémon ne jouent visiblement pas dans le même bassin…" } }, "lt_surge": { "encounter": { - "1": "T’as pas froid aux yeux, soldat ! Les combats Pokémon, c’est la guerre !", + "1": "T’as pas froid aux yeux, soldat ! Les combats Pokémon, c’est la guerre !", "2": "Tu as du guts pour venir me fight ici ! Je vais te shock !", "3": "Compte tes dents, tu vas morfler !\nMes Pokémon Électrik vont t’atomiser !" }, @@ -573,56 +573,56 @@ }, "alder": { "encounter": { - "1": "Prépare-toi pour un combat contre le meilleur Dresseur d’Unys !" + "1": "Prépare-toi pour un combat contre le meilleur Dresseur d’Unys !" }, "victory": { - "1": "Bien joué ! Tu as sans aucun doute un talent inégalé." + "1": "Bien joué ! Tu as sans aucun doute un talent inégalé." }, "defeat": { - "1": "Une brise fraiche traverse mon cœur…\n$Quel effort extraordinaire !" + "1": "Une brise fraiche traverse mon cœur…\n$Quel effort extraordinaire !" } }, "kieran": { "encounter": { - "1": "Grâce à un travail acharné, je deviens de plus en plus fort !\n$Je ne perdrai pas." + "1": "Grâce à un travail acharné, je deviens de plus en plus fort !\n$Je ne perdrai pas." }, "victory": { - "1": "Je n’y crois pas…\n$Quel combat amusant et palpitant !" + "1": "Je n’y crois pas…\n$Quel combat amusant et palpitant !" }, "defeat": { - "1": "Eh beh, quel combat !\n$Il est temps pour toi de t’entrainer encore plus dur." + "1": "Eh beh, quel combat !\n$Il est temps pour toi de t’entrainer encore plus dur." } }, "rival": { "encounter": { - "1": "@c{smile}Ah, je te cherchais ! Je savais que t’étais pressée de partir, mais je m’attendais quand même à un au revoir…\n$@c{smile_eclosed}T’as finalement décidé de réaliser ton rêve ?\nJ’ai peine à y croire.\n$@c{serious_smile_fists}Vu que t’es là, ça te dis un petit combat ?\nJe voudrais quand même m’assurer que t’es prête.\n$@c{serious_mopen_fists}Surtout ne te retiens pas et donne-moi tout ce que t’as !" + "1": "@c{smile}Ah, je te cherchais ! Je savais que t’étais pressée de partir, mais je m’attendais quand même à un au revoir…\n$@c{smile_eclosed}T’as finalement décidé de réaliser ton rêve ?\nJ’ai peine à y croire.\n$@c{serious_smile_fists}Vu que t’es là, ça te dis un petit combat ?\nJe voudrais quand même m’assurer que t’es prête.\n$@c{serious_mopen_fists}Surtout ne te retiens pas et donne-moi tout ce que t’as !" }, "victory": { - "1": "@c{shock}Wah… Tu m’as vraiment lavé.\nT’es vraiment une débutante ?\n$@c{smile}T’as peut-être eu de la chance, mais…\nPeut-être que t’arriveras jusqu’au bout du chemin.\n$D’ailleurs, le prof m’a demandé de te filer ces objets.\nIls ont l’air sympas.\n$@c{serious_smile_fists}Bonne chance à toi !" + "1": "@c{shock}Wah… Tu m’as vraiment lavé.\nT’es vraiment une débutante ?\n$@c{smile}T’as peut-être eu de la chance, mais…\nPeut-être que t’arriveras jusqu’au bout du chemin.\n$D’ailleurs, le prof m’a demandé de te filer ces objets.\nIls ont l’air sympas.\n$@c{serious_smile_fists}Bonne chance à toi !" } }, "rival_female": { "encounter": { - "1": "@c{smile_wave}Ah, te voilà ! Je t’ai cherché partout !\n@c{angry_mopen}On oublie de dire au revoir à sa meilleure amie ?\n$@c{smile_ehalf}T’as décidé de réaliser ton rêve, hein ?\nCe jour est donc vraiment arrivé…\n$@c{smile}Je veux bien te pardonner de m’avoir oubliée,\nà une condition. @c{smile_wave_wink}Que tu m’affronte !\n$@c{angry_mopen}Donne tout ! Ce serait dommage que ton aventure finisse avant d’avoir commencé, hein ?" + "1": "@c{smile_wave}Ah, te voilà ! Je t’ai cherché partout !\n@c{angry_mopen}On oublie de dire au revoir à sa meilleure amie ?\n$@c{smile_ehalf}T’as décidé de réaliser ton rêve, hein ?\nCe jour est donc vraiment arrivé…\n$@c{smile}Je veux bien te pardonner de m’avoir oubliée,\nà une condition. @c{smile_wave_wink}Que tu m’affronte !\n$@c{angry_mopen}Donne tout ! Ce serait dommage que ton aventure finisse avant d’avoir commencé, hein ?" }, "victory": { - "1": "@c{shock}Tu viens de commencer et t’es déjà si fort ?!@d{96}\n@c{angry}T’as triché non ? Avoue !\n$@c{smile_wave_wink}J’déconne !@d{64} @c{smile_eclosed}J’ai perdu dans les règles…\nJ’ai le sentiment que tu vas très bien t’en sortir.\n$@c{smile}D’ailleurs, le prof veut que je te donne ces quelques objets. Ils te seront utiles, pour sûr !\n$@c{smile_wave}Fais de ton mieux, comme toujours !\nJe crois fort en toi !" + "1": "@c{shock}Tu viens de commencer et t’es déjà si fort ?!@d{96}\n@c{angry}T’as triché non ? Avoue !\n$@c{smile_wave_wink}J’déconne !@d{64} @c{smile_eclosed}J’ai perdu dans les règles…\nJ’ai le sentiment que tu vas très bien t’en sortir.\n$@c{smile}D’ailleurs, le prof veut que je te donne ces quelques objets. Ils te seront utiles, pour sûr !\n$@c{smile_wave}Fais de ton mieux, comme toujours !\nJe crois fort en toi !" } }, "rival_2": { "encounter": { - "1": "@c{smile}Hé, toi aussi t’es là ?\n@c{smile_eclosed}Toujours invaincue, hein… ?\n$@c{serious_mopen_fists}Je sais que j’ai l’air de t’avoir suivie ici, mais c’est pas complètement vrai.\n$@c{serious_smile_fists}Pour être honnête, ça me démangeait d’avoir une revanche depuis que tu m’as battu.\n$Je me suis beaucoup entrainé, alors sois sure que je vais pas retenir mes coups cette fois.\n$@c{serious_mopen_fists}Et comme la dernière fois, ne te retiens pas !\nC’est parti !" + "1": "@c{smile}Hé, toi aussi t’es là ?\n@c{smile_eclosed}Toujours invaincue, hein… ?\n$@c{serious_mopen_fists}Je sais que j’ai l’air de t’avoir suivie ici, mais c’est pas complètement vrai.\n$@c{serious_smile_fists}Pour être honnête, ça me démangeait d’avoir une revanche depuis que tu m’as battu.\n$Je me suis beaucoup entrainé, alors sois sure que je vais pas retenir mes coups cette fois.\n$@c{serious_mopen_fists}Et comme la dernière fois, ne te retiens pas !\nC’est parti !" }, "victory": { - "1": "@c{neutral_eclosed}Oh. Je crois que j’ai trop pris la confiance.\n$@c{smile}Pas grave, c’est OK. Je me doutais que ça arriverait.\n@c{serious_mopen_fists}Je vais juste devoir encore plus m’entrainer !\n\n$@c{smile}Ah, et pas que t’aies réellement besoin d’aide, mais j’ai ça en trop sur moi qui pourrait t’intéresser.\n\n$@c{serious_smile_fists}Mais n’espère plus en avoir d’autres !\nJe peux pas passer mon temps à aider mon adversaire.\n$@c{smile}Bref, prends soin de toi !" + "1": "@c{neutral_eclosed}Oh. Je crois que j’ai trop pris la confiance.\n$@c{smile}Pas grave, c’est OK. Je me doutais que ça arriverait.\n@c{serious_mopen_fists}Je vais juste devoir encore plus m’entrainer !\n\n$@c{smile}Ah, et pas que t’aies réellement besoin d’aide, mais j’ai ça en trop sur moi qui pourrait t’intéresser.\n\n$@c{serious_smile_fists}Mais n’espère plus en avoir d’autres !\nJe peux pas passer mon temps à aider mon adversaire.\n$@c{smile}Bref, prends soin de toi !" } }, "rival_2_female": { "encounter": { - "1": "@c{smile_wave}Hé, sympa de te croiser ici. T’as toujours l’air invaincu. @c{angry_mopen}Eh… Pas mal !\n$@c{angry_mopen}Je sais à quoi tu penses et non, je t’espionne pas.\n@c{smile_eclosed}C’est juste que j’étais aussi dans le coin.\n$@c{smile_ehalf}Heureuse pour toi, mais je veux juste te rappeler que c’est pas grave de perdre parfois.\n$@c{smile}On apprend de nos erreurs, souvent plus que si on ne connaissait que le succès.\n$@c{angry_mopen}Dans tous les cas je me suis bien entrainée pour cette revanche, t’as intérêt à tout donner !" + "1": "@c{smile_wave}Hé, sympa de te croiser ici. T’as toujours l’air invaincu. @c{angry_mopen}Eh… Pas mal !\n$@c{angry_mopen}Je sais à quoi tu penses et non, je t’espionne pas.\n@c{smile_eclosed}C’est juste que j’étais aussi dans le coin.\n$@c{smile_ehalf}Heureuse pour toi, mais je veux juste te rappeler que c’est pas grave de perdre parfois.\n$@c{smile}On apprend de nos erreurs, souvent plus que si on ne connaissait que le succès.\n$@c{angry_mopen}Dans tous les cas je me suis bien entrainée pour cette revanche, t’as intérêt à tout donner !" }, "victory": { - "1": "@c{neutral}Je… J’étais pas encore supposée perdre…\n$@c{smile}Bon. Ça veut juste dire que je vais devoir encore plus m’entrainer !\n$@c{smile_wave}J’ai aussi ça en rab pour toi !\n@c{smile_wave_wink}Inutile de me remercier ~.\n$@c{angry_mopen}C’étaient les derniers, terminé les cadeaux après ceux-là !\n$@c{smile_wave}Allez, tiens le coup !" + "1": "@c{neutral}Je… J’étais pas encore supposée perdre…\n$@c{smile}Bon. Ça veut juste dire que je vais devoir encore plus m’entrainer !\n$@c{smile_wave}J’ai aussi ça en rab pour toi !\n@c{smile_wave_wink}Inutile de me remercier ~.\n$@c{angry_mopen}C’étaient les derniers, terminé les cadeaux après ceux-là !\n$@c{smile_wave}Allez, tiens le coup !" }, "defeat": { "1": "Je suppose que c’est parfois normal de perdre…" @@ -630,18 +630,18 @@ }, "rival_3": { "encounter": { - "1": "@c{smile}Hé, mais qui voilà ! Ça fait un bail.\n@c{neutral}T’es… toujours invaincue ? Incroyable.\n$@c{neutral_eclosed}Tout est devenu un peu… étrange.\nC’est plus pareil sans toi au village.\n$@c{serious}Je sais que c’est égoïste, mais j’ai besoin d’expier ça.\n@c{neutral_eclosed}Je crois que tout ça te dépasse.\n$@c{serious}Ne jamais perdre, c’est juste irréaliste.\nGrandir, c’est parfois aussi savoir perdre.\n$@c{neutral_eclosed}T’as un beau parcours, mais il y a encore tellement à venir et ça va pas s’arranger. @c{neutral}T’es prête pour ça ?\n$@c{serious_mopen_fists}Si tu l’es, alors prouve-le." + "1": "@c{smile}Hé, mais qui voilà ! Ça fait un bail.\n@c{neutral}T’es… toujours invaincue ? Incroyable.\n$@c{neutral_eclosed}Tout est devenu un peu… étrange.\nC’est plus pareil sans toi au village.\n$@c{serious}Je sais que c’est égoïste, mais j’ai besoin d’expier ça.\n@c{neutral_eclosed}Je crois que tout ça te dépasse.\n$@c{serious}Ne jamais perdre, c’est juste irréaliste.\nGrandir, c’est parfois aussi savoir perdre.\n$@c{neutral_eclosed}T’as un beau parcours, mais il y a encore tellement à venir et ça va pas s’arranger. @c{neutral}T’es prête pour ça ?\n$@c{serious_mopen_fists}Si tu l’es, alors prouve-le." }, "victory": { - "1": "@c{angry_mhalf}C’est lunaire… J’ai presque fait que m’entrainer…\nAlors pourquoi il y a encore un tel écart entre nous ?" + "1": "@c{angry_mhalf}C’est lunaire… J’ai presque fait que m’entrainer…\nAlors pourquoi il y a encore un tel écart entre nous ?" } }, "rival_3_female": { "encounter": { - "1": "@c{smile_wave}Ça fait une éternité ! Toujours debout hein ?\n@c{angry}Tu commences à me pousser à bout là. @c{smile_wave_wink}T’inquiètes j’déconne !\n$@c{smile_ehalf}Mais en vrai, ta maison te manque pas ? Ou… Moi ?\nJ… Je veux dire… Tu me manques vraiment beaucoup.\n$@c{smile_eclosed}Je te soutiendrai toujours dans tes ambitions, mais la vérité est que tu finiras par perdre un jour ou l’autre.\n$@c{smile}Quand ça arrivera, je serai là pour toi, comme toujours.\n@c{angry_mopen}Maintenant, montre-moi à quel point t’es devenu fort !" + "1": "@c{smile_wave}Ça fait une éternité ! Toujours debout hein ?\n@c{angry}Tu commences à me pousser à bout là. @c{smile_wave_wink}T’inquiètes j’déconne !\n$@c{smile_ehalf}Mais en vrai, ta maison te manque pas ? Ou… Moi ?\nJ… Je veux dire… Tu me manques vraiment beaucoup.\n$@c{smile_eclosed}Je te soutiendrai toujours dans tes ambitions, mais la vérité est que tu finiras par perdre un jour ou l’autre.\n$@c{smile}Quand ça arrivera, je serai là pour toi, comme toujours.\n@c{angry_mopen}Maintenant, montre-moi à quel point t’es devenu fort !" }, "victory": { - "1": "@c{shock}Après tout ça… Ça te suffit toujours pas… ?\nTu reviendras jamais à ce rythme…" + "1": "@c{shock}Après tout ça… Ça te suffit toujours pas… ?\nTu reviendras jamais à ce rythme…" }, "defeat": { "1": "T’as fait de ton mieux.\nAllez, rentrons à la maison." @@ -652,15 +652,15 @@ "1": "@c{neutral}Hé.\n$Je vais pas y aller par quatre chemins avec toi.\n@c{neutral_eclosed}Je suis là pour gagner. Simple, basique.\n$@c{serious_mhalf_fists}J’ai appris à maximiser tout mon potentiel en m’entrainant d’arrachepied.\n$@c{smile}C’est fou tout le temps que tu peux te dégager si tu dors pas en sacrifiant ta vie sociale.\n$@c{serious_mopen_fists}Plus rien n’a d’importance désormais, pas tant que j’aurai pas gagné.\n$@c{neutral_eclosed}J’ai atteint un stade où je ne peux plus perdre.\n@c{smile_eclosed}Je présume que ta philosophie était pas si fausse finalement.\n$@c{angry_mhalf}La défaite, c’est pour les faibles, et je ne suis plus un faible.\n$@c{serious_mopen_fists}Tiens-toi prête." }, "victory": { - "1": "@c{neutral}Que…@d{64} Qui es-tu ?" + "1": "@c{neutral}Que…@d{64} Qui es-tu ?" } }, "rival_4_female": { "encounter": { - "1": "@c{neutral}C’est moi ! Tu m’as pas encore oubliée… n’est-ce pas ?\n$@c{smile}Tu devrais être fier d’être arrivé aussi loin. GG !\nMais c’est certainement pas la fin de ton aventure.\n$@c{smile_eclosed}T’as éveillé en moi quelque chose que j’ignorais.\nTout mon temps passe dans l’entrainement.\n$@c{smile_ehalf}Je dors et je mange à peine, je m’entraine juste tous les jours, et deviens de plus en plus forte.\n$@c{neutral}En vrai, Je… J’ai de la peine à me reconnaitre.\n$Mais maintenant, je suis au top de mes capacités.\nJe doute que tu sois de nouveau capable de me battre.\n$Et tu sais quoi ? Tout ça, c’est de ta faute.\n@c{smile_ehalf}Et j’ignore si je dois te remercier ou te haïr.\n$@c{angry_mopen}Tiens-toi prêt." + "1": "@c{neutral}C’est moi ! Tu m’as pas encore oubliée… n’est-ce pas ?\n$@c{smile}Tu devrais être fier d’être arrivé aussi loin. GG !\nMais c’est certainement pas la fin de ton aventure.\n$@c{smile_eclosed}T’as éveillé en moi quelque chose que j’ignorais.\nTout mon temps passe dans l’entrainement.\n$@c{smile_ehalf}Je dors et je mange à peine, je m’entraine juste tous les jours, et deviens de plus en plus forte.\n$@c{neutral}En vrai, Je… J’ai de la peine à me reconnaitre.\n$Mais maintenant, je suis au top de mes capacités.\nJe doute que tu sois de nouveau capable de me battre.\n$Et tu sais quoi ? Tout ça, c’est de ta faute.\n@c{smile_ehalf}Et j’ignore si je dois te remercier ou te haïr.\n$@c{angry_mopen}Tiens-toi prêt." }, "victory": { - "1": "@c{neutral}Que…@d{64} Qui es-tu ?" + "1": "@c{neutral}Que…@d{64} Qui es-tu ?" }, "defeat": { "1": "$@c{smile}Tu devrais être fier d’être arrivé jusque là." @@ -687,7 +687,7 @@ }, "rival_6": { "encounter": { - "1": "@c{smile_eclosed}Nous y revoilà.\n$@c{neutral}J’ai eu du temps pour réfléchir à tout ça.\nIl y a une raison à pourquoi tout semble étrange.\n$@c{neutral_eclosed}Ton rêve, ma volonté de te battre…\nFont partie de quelque chose de plus grand.\n$@c{serious}C’est même pas à propos de moi, ni de toi… Mais du monde, @c{serious_mhalf_fists}et te repousser dans tes limites est ma mission.\n$@c{neutral_eclosed}J’ignore si je serai capable de l’accomplir, mais je ferai tout ce qui est en mon pouvoir.\n$@c{neutral}Cet endroit est terrifiant… Et pourtant il m’a l’air familier, comme si j’y avais déjà mis les pieds.\n$@c{serious_mhalf_fists}Tu ressens la même chose, pas vrai ?\n$@c{serious}… et c’est comme si quelque chose ici me parlait.\n$Comme si c’était tout ce que ce monde avait toujours connu.\n$Ces précieux moments ensemble semblent si proches ne sont rien de plus qu’un lointain souvenir.\n$@c{neutral_eclosed}D’ailleurs, qui peut dire aujourd’hui qu’ils ont pu être réels ?\n$@c{serious_mopen_fists}Il faut que tu persévères. Si tu t’arrêtes, ça n’aura jamais de fin et t’es la seule à en être capable.\n$@c{serious_smile_fists}Difficile de comprendre le sens de tout ça, je sais juste que c’est la réalité.\n$@c{serious_mopen_fists}Si tu ne parviens pas à me battre ici et maintenant, tu n’as aucune chance." + "1": "@c{smile_eclosed}Nous y revoilà.\n$@c{neutral}J’ai eu du temps pour réfléchir à tout ça.\nIl y a une raison à pourquoi tout semble étrange.\n$@c{neutral_eclosed}Ton rêve, ma volonté de te battre…\nFont partie de quelque chose de plus grand.\n$@c{serious}C’est même pas à propos de moi, ni de toi… Mais du monde, @c{serious_mhalf_fists}et te repousser dans tes limites est ma mission.\n$@c{neutral_eclosed}J’ignore si je serai capable de l’accomplir, mais je ferai tout ce qui est en mon pouvoir.\n$@c{neutral}Cet endroit est terrifiant… Et pourtant il m’a l’air familier, comme si j’y avais déjà mis les pieds.\n$@c{serious_mhalf_fists}Tu ressens la même chose, pas vrai ?\n$@c{serious}… et c’est comme si quelque chose ici me parlait.\n$Comme si c’était tout ce que ce monde avait toujours connu.\n$Ces précieux moments ensemble semblent si proches ne sont rien de plus qu’un lointain souvenir.\n$@c{neutral_eclosed}D’ailleurs, qui peut dire aujourd’hui qu’ils ont pu être réels ?\n$@c{serious_mopen_fists}Il faut que tu persévères. Si tu t’arrêtes, ça n’aura jamais de fin et t’es la seule à en être capable.\n$@c{serious_smile_fists}Difficile de comprendre le sens de tout ça, je sais juste que c’est la réalité.\n$@c{serious_mopen_fists}Si tu ne parviens pas à me battre ici et maintenant, tu n’as aucune chance." }, "victory": { "1": "@c{smile_eclosed}J’ai fait ce que j’avais à faire.\n$Promets-moi juste une chose.\n@c{smile}Après avoir réparé ce monde… Rentre à la maison." @@ -695,7 +695,7 @@ }, "rival_6_female": { "encounter": { - "1": "@c{smile_ehalf}C’est donc encore entre toi et moi.\n$@c{smile_eclosed}Tu sais, j’ai beau retouner ça dans tous les sens…\n$@c{smile_ehalf}Quelque chose peut expliquer tout ça, pourquoi tout semble si étrange…\n$@c{smile}T’as tes rêves, j’ai mes ambitions…\n$J’ai juste le sentiment qu’il y a un grand dessein derrière tout ça, derrière ce qu’on fait toi et moi.\n$@c{smile_eclosed}Je crois que mon but est de… repousser tes limites.\n$@c{smile_ehalf}Je suis pas certaine de bien être douée à cet exercice, mais je fais de mon mieux.\n$Cet endroit épouvantable cache quelque chose d’étrange… Tout semble si limpide…\n$Comme… si c’était tout ce que ce monde avait toujours connu.\n$@c{smile_eclosed}J’ai le sentiment que nos précieux moments ensemble sont devenus si flous.\n$@c{smile_ehalf}Ont-ils au moins été réels ? Tout semble si loin maintenant…\n$@c{angry_mopen}Il faut que tu persévères. Si tu t’arrêtes, ça n’aura jamais de fin et t’es le seul à en être capable.\n$@c{smile_ehalf}Je… j’ignore le sens de tout ça… Mais je sais que c’est la réalité.\n$@c{neutral}Si tu ne parviens pas à me battre ici et maintenant, tu n’as aucune chance." + "1": "@c{smile_ehalf}C’est donc encore entre toi et moi.\n$@c{smile_eclosed}Tu sais, j’ai beau retouner ça dans tous les sens…\n$@c{smile_ehalf}Quelque chose peut expliquer tout ça, pourquoi tout semble si étrange…\n$@c{smile}T’as tes rêves, j’ai mes ambitions…\n$J’ai juste le sentiment qu’il y a un grand dessein derrière tout ça, derrière ce qu’on fait toi et moi.\n$@c{smile_eclosed}Je crois que mon but est de… repousser tes limites.\n$@c{smile_ehalf}Je suis pas certaine de bien être douée à cet exercice, mais je fais de mon mieux.\n$Cet endroit épouvantable cache quelque chose d’étrange… Tout semble si limpide…\n$Comme… si c’était tout ce que ce monde avait toujours connu.\n$@c{smile_eclosed}J’ai le sentiment que nos précieux moments ensemble sont devenus si flous.\n$@c{smile_ehalf}Ont-ils au moins été réels ? Tout semble si loin maintenant…\n$@c{angry_mopen}Il faut que tu persévères. Si tu t’arrêtes, ça n’aura jamais de fin et t’es le seul à en être capable.\n$@c{smile_ehalf}Je… j’ignore le sens de tout ça… Mais je sais que c’est la réalité.\n$@c{neutral}Si tu ne parviens pas à me battre ici et maintenant, tu n’as aucune chance." }, "victory": { "1": "@c{smile_ehalf}Je… Je crois que j’ai rempli ma mission…\n$@c{smile_eclosed}Promets-moi… Après avoir réparé ce monde… Reviens à la maison sain et sauf.\n$@c{smile_ehalf}… Merci." diff --git a/src/locales/fr/egg.json b/src/locales/fr/egg.json index 64f22aa330d..cbc912e9d50 100644 --- a/src/locales/fr/egg.json +++ b/src/locales/fr/egg.json @@ -4,7 +4,7 @@ "ultraTier": "Épique", "masterTier": "Légendaire", "defaultTier": "Commun", - "hatchWavesMessageSoon": "Il fait du bruit. Il va éclore !", + "hatchWavesMessageSoon": "Il fait du bruit.\nIl va éclore !", "hatchWavesMessageClose": "Il bouge de temps en temps. Il devrait bientôt éclore.", "hatchWavesMessageNotClose": "Qu’est-ce qui va en sortir ? Ça va mettre du temps.", "hatchWavesMessageLongTime": "Cet Œuf va surement mettre du temps à éclore.", @@ -16,7 +16,7 @@ "tooManyEggs": "Vous avez trop d’Œufs !", "pull": "Tirage", "pulls": "Tirages", - "sameSpeciesEgg": "{{species}} sortira de cet Œuf !", + "sameSpeciesEgg": "Un {{species}} sortira de cet Œuf !", "hatchFromTheEgg": "{{pokemonName}} sort de l’Œuf !", "eggMoveUnlock": "Capacité Œuf débloquée :\n{{moveName}}", "rareEggMoveUnlock": "Capacité Œuf Rare débloquée :\n{{moveName}}", diff --git a/src/locales/fr/menu.json b/src/locales/fr/menu.json index 83626a1f33f..277b0f5fd04 100644 --- a/src/locales/fr/menu.json +++ b/src/locales/fr/menu.json @@ -6,7 +6,7 @@ "newGame": "Nouvelle partie", "settings": "Paramètres", "selectGameMode": "Sélectionnez un mode de jeu.", - "logInOrCreateAccount": "Connectez-vous ou créez un compte pour commencer. Aucun e-mail requis !", + "logInOrCreateAccount": "Connectez-vous ou créez un compte pour commencer.\nAucun e-mail requis !", "username": "Nom d’utilisateur", "password": "Mot de passe", "login": "Connexion", @@ -19,29 +19,29 @@ "invalidRegisterPassword": "Le mot de passe doit contenir 6 caractères ou plus", "usernameAlreadyUsed": "Le nom d’utilisateur est déjà utilisé", "accountNonExistent": "Le nom d’utilisateur n’existe pas", - "unmatchingPassword": "Le mot de passe n’est pas correct", + "unmatchingPassword": "Le mot de passe est incorrect", "passwordNotMatchingConfirmPassword": "Les mots de passe ne correspondent pas", "confirmPassword": "Confirmer le MDP", - "registrationAgeWarning": "Vous confirmez en vous inscrivant que vous avez 13 ans ou plus.", + "registrationAgeWarning": "En vous inscrivant, vous certifiez que vous avez 13 ans ou plus.", "backToLogin": "Retour", "failedToLoadSaveData": "Échec du chargement des données. Veuillez recharger\nla page. Si cela persiste, contactez l’administrateur.", "sessionSuccess": "Session chargée avec succès.", "failedToLoadSession": "Vos données de session n’ont pas pu être chargées.\nElles pourraient être corrompues.", - "boyOrGirl": "Es-tu un garçon ou une fille ?", + "boyOrGirl": "Es-tu un garçon ou une fille ?", "evolving": "Quoi ?\n{{pokemonName}} évolue !", - "stoppedEvolving": "Hein ?\n{{pokemonName}} n’évolue plus !", - "pauseEvolutionsQuestion": "Mettre en pause les évolutions pour {{pokemonName}} ?\nElles peuvent être réactivées depuis l’écran d’équipe.", - "evolutionsPaused": "Les évolutions ont été mises en pause pour {{pokemonName}}.", + "stoppedEvolving": "Hein ?\n{{pokemonName}} n’évolue plus !", + "pauseEvolutionsQuestion": "Interrompre les évolutions pour {{pokemonName}} ?\nElles peuvent être réactivées depuis l’écran d’équipe.", + "evolutionsPaused": "Les évolutions de {{pokemonName}}\nsont interrompues.", "evolutionDone": "Félicitations !\n{{pokemonName}} a évolué en {{evolvedPokemonName}} !", - "dailyRankings": "Classement du Jour", - "weeklyRankings": "Classement de la Semaine", - "noRankings": "Pas de Classement", + "dailyRankings": "Classement du jour", + "weeklyRankings": "Classement de la semaine", + "noRankings": "Pas de classement", "positionIcon": "#", "usernameScoreboard": "Utilisateur", "score": "Score", "wave": "Vague", "loading": "Chargement…", - "loadingAsset": "Chargement de la ressource : {{assetName}}", + "loadingAsset": "Chargement des ressources : {{assetName}}", "playersOnline": "Joueurs connectés", "yes": "Oui", "no": "Non", @@ -51,5 +51,7 @@ "renamePokemon": "Renommer le Pokémon", "rename": "Renommer", "nickname": "Surnom", - "errorServerDown": "Oupsi ! Un problème de connexion au serveur est survenu.\n\nVous pouvez garder cette fenêtre ouverte,\nle jeu se reconnectera automatiquement." + "errorServerDown": "Oupsi ! Un problème de connexion au serveur est survenu.\n\nVous pouvez garder cette fenêtre ouverte,\nle jeu se reconnectera automatiquement.", + "noSaves": "Vous n’avez aucune sauvegarde enregistrée !", + "tooManySaves": "Vous avez trop de sauvegardes enregistrées !" } diff --git a/src/locales/fr/modifier-type.json b/src/locales/fr/modifier-type.json index 509a8b11112..78be62cd88f 100644 --- a/src/locales/fr/modifier-type.json +++ b/src/locales/fr/modifier-type.json @@ -2,7 +2,7 @@ "ModifierType": { "AddPokeballModifierType": { "name": "{{pokeballName}} x{{modifierCount}}", - "description": "Recevez {{modifierCount}} {{pokeballName}}·s. (Inventaire : {{pokeballAmount}})\nTaux de capture : {{catchRate}}" + "description": "Recevez {{modifierCount}} {{pokeballName}}·s. (Inventaire : {{pokeballAmount}})\nTaux de capture : {{catchRate}}" }, "AddVoucherModifierType": { "name": "{{voucherTypeName}} x{{modifierCount}}", @@ -10,8 +10,8 @@ }, "PokemonHeldItemModifierType": { "extra": { - "inoperable": "{{pokemonName}} ne peut pas\nporter cet objet !", - "tooMany": "{{pokemonName}} porte trop\nd’exemplaires de cet objet !" + "inoperable": "{{pokemonName}} ne peut pas\nporter cet objet !", + "tooMany": "{{pokemonName}} porte trop\nd’exemplaires de cet objet !" } }, "PokemonHpRestoreModifierType": { @@ -47,10 +47,14 @@ "description": "Donne la nature {{natureName}} à un Pokémon et la débloque pour le starter lui étant lié." }, "DoubleBattleChanceBoosterModifierType": { - "description": "Double les chances de tomber sur un combat double pendant {{battleCount}} combats." + "description": "Quadruple les chances de tomber sur un combat double pendant {{battleCount}} combats." }, "TempStatStageBoosterModifierType": { - "description": "Augmente d’un cran {{stat}} pour toute l’équipe pendant 5 combats." + "description": "Augmente {{amount}} {{stat}} de toute l’équipe pendant 5 combats.", + "extra": { + "stage": "d’un cran", + "percentage": "de 30%" + } }, "AttackTypeBoosterModifierType": { "description": "Augmente de 20% la puissance des capacités de type {{moveType}} d’un Pokémon." @@ -85,7 +89,7 @@ "description": "Augmente de {{boostPercent}}% le gain de Points d’Exp du porteur." }, "PokemonFriendshipBoosterModifierType": { - "description": "Augmente le gain d’amitié de 50% par victoire." + "description": "Augmente le gain de bonheur de 50% par victoire." }, "PokemonMoveAccuracyBoosterModifierType": { "description": "Augmente de {{accuracyAmount}} la précision des capacités (maximum 100)." @@ -102,17 +106,17 @@ "description": "Apprend la capacité {{moveName}} à un Pokémon.\n(Maintenez C ou Maj pour plus d’infos)" }, "EvolutionItemModifierType": { - "description": "Permet à certains Pokémon d’évoluer." + "description": "Permet à certains Pokémon d’évoluer à son contact." }, "FormChangeItemModifierType": { - "description": "Permet à certains Pokémon de changer de forme." + "description": "Permet à certains Pokémon de changer de forme à son contact." }, "FusePokemonModifierType": { "description": "Fusionne deux Pokémon (transfère le talent, sépare les stats de base et les types, partage les capacités)." }, "TerastallizeModifierType": { "name": "Téra-Éclat {{teraType}}", - "description": "{{teraType}} Téracristallise son porteur pendant 10 combats." + "description": "Téracristallise son porteur en type {{teraType}} pendant 10 combats." }, "ContactHeldItemTransferChanceModifierType": { "description": "{{chancePercent}}% de chances de voler un objet de l’adversaire en l’attaquant." @@ -247,7 +251,7 @@ }, "SpeciesBoosterItem": { "LIGHT_BALL": { "name": "Balle Lumière", "description": "À faire tenir à Pikachu. Un orbe énigmatique qui double son Attaque et son Atq. Spé. ." }, - "THICK_CLUB": { "name": "Masse Os", "description": "À faire tenir à Osselait ou Ossatueur. Un os dur qui double leur Attaque." }, + "THICK_CLUB": { "name": "Masse Os", "description": "À faire tenir à Osselait ou à Ossatueur, formes d’Alola incluses. Un os dur qui double leur Attaque." }, "METAL_POWDER": { "name": "Poudre Métal", "description": "À faire tenir à Métamorph. Cette poudre étrange, très fine mais résistante, double sa Défense." }, "QUICK_POWDER": { "name": "Poudre Vite", "description": "À faire tenir à Métamorph. Cette poudre étrange, très fine mais résistante, double sa Vitesse." } }, diff --git a/src/locales/fr/modifier.json b/src/locales/fr/modifier.json index 0ec228a22c2..101b1d56164 100644 --- a/src/locales/fr/modifier.json +++ b/src/locales/fr/modifier.json @@ -3,7 +3,7 @@ "turnHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par les {{typeName}} !", "hitHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par le {{typeName}} !", "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} a repris connaissance\navec sa {{typeName}} et est prêt à se battre de nouveau !", - "resetNegativeStatStageApply": "Les stats baissées de {{pokemonNameWithAffix}}\nsont restaurées par l’{{typeName}} !", + "resetNegativeStatStageApply": "Les stats baissées de {{pokemonNameWithAffix}}\nsont restaurées par l’{{typeName}} !", "moneyInterestApply": "La {{typeName}} vous rapporte\n{{moneyAmount}} ₽ d’intérêts !", "turnHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est absorbé·e\npar le {{typeName}} de {{pokemonName}} !", "contactHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est volé·e\npar l’{{typeName}} de {{pokemonName}} !", diff --git a/src/locales/fr/move-trigger.json b/src/locales/fr/move-trigger.json index b9bc929c619..d9d800c52cc 100644 --- a/src/locales/fr/move-trigger.json +++ b/src/locales/fr/move-trigger.json @@ -3,10 +3,10 @@ "cutHpPowerUpMove": "{{pokemonName}} sacrifie des PV\net augmente la puissance ses capacités !", "absorbedElectricity": "{{pokemonName}} absorbe de l’électricité !", "switchedStatChanges": "{{pokemonName}} permute\nles changements de stats avec ceux de sa cible !", - "switchedTwoStatChanges": "{{pokemonName}} permute les changements de {{firstStat} et de {{secondStat}} avec ceux de sa cible !", - "switchedStat": "{{pokemonName}} et sa cible échangent leur {{stat}} !", - "sharedGuard": "{{pokemonName}} additionne sa garde à celle de sa cible et redistribue le tout équitablement !", - "sharedPower": "{{pokemonName}} additionne sa force à celle de sa cible et redistribue le tout équitablement !", + "switchedTwoStatChanges": "{{pokemonName}} permute les changements de {{firstStat} et de {{secondStat}} avec ceux de sa cible !", + "switchedStat": "{{pokemonName}} et sa cible échangent leur {{stat}} !", + "sharedGuard": "{{pokemonName}} additionne sa garde à celle de sa cible et redistribue le tout équitablement !", + "sharedPower": "{{pokemonName}} additionne sa force à celle de sa cible et redistribue le tout équitablement !", "goingAllOutForAttack": "{{pokemonName}} a pris\ncette capacité au sérieux !", "regainedHealth": "{{pokemonName}}\nrécupère des PV !", "keptGoingAndCrashed": "{{pokemonName}}\ns’écrase au sol !", @@ -22,7 +22,7 @@ "loweredItsHead": "{{pokemonName}}\nbaisse la tête !", "isGlowing": "{{pokemonName}} est entouré\nd’une lumière intense !", "bellChimed": "Un grelot sonne !", - "foresawAnAttack": "{{pokemonName}}\nprévoit une attaque !", + "foresawAnAttack": "{{pokemonName}}\nprévoit une attaque !", "isTighteningFocus": "{{pokemonName}} se concentre\nau maximum !", "hidUnderwater": "{{pokemonName}}\nse cache sous l’eau !", "soothingAromaWaftedThroughArea": "Une odeur apaisante flotte dans l’air !", @@ -34,7 +34,7 @@ "becameCloakedInFreezingAir": "{{pokemonName}} est entouré\nd’un air glacial !", "isChargingPower": "{{pokemonName}}\nconcentre son énergie !", "burnedItselfOut": "Le feu intérieur de {{pokemonName}}\ns’est entièrement consumé !", - "startedHeatingUpBeak": "{{pokemonName}}\nfait chauffer son bec !", + "startedHeatingUpBeak": "{{pokemonName}}\nfait chauffer son bec !", "setUpShellTrap": "{{pokemonName}} déclenche\nle Carapiège !", "isOverflowingWithSpacePower": "La puissance du cosmos afflue dans le corps\nde {{pokemonName}} !", "usedUpAllElectricity": "{{pokemonName}}a utilisé\ntoute son électricité !", @@ -66,5 +66,5 @@ "revivalBlessing": "{{pokemonName}} a repris connaissance\net est prêt à se battre de nouveau !", "swapArenaTags": "Les effets affectant chaque côté du terrain\nont été échangés par {{pokemonName}} !", "exposedMove": "{{targetPokemonName}} est identifié\npar {{pokemonName}} !", - "safeguard": "{{targetName}} est protégé\npar la capacité Rune Protect !" -} \ No newline at end of file + "safeguard": "{{targetName}} est protégé\npar la capacité Rune Protect !" +} diff --git a/src/locales/fr/pokemon-info-container.json b/src/locales/fr/pokemon-info-container.json index 46b5b80bab0..084310f7c94 100644 --- a/src/locales/fr/pokemon-info-container.json +++ b/src/locales/fr/pokemon-info-container.json @@ -1,7 +1,7 @@ { "moveset": "Capacités", - "gender": "Sexe :", - "ability": "Talent :", - "nature": "Nature :", + "gender": "Sexe :", + "ability": "Talent :", + "nature": "Nature :", "form": "Forme :" -} \ No newline at end of file +} diff --git a/src/locales/fr/pokemon-info.json b/src/locales/fr/pokemon-info.json index 1160ec95b75..a23b320ea3e 100644 --- a/src/locales/fr/pokemon-info.json +++ b/src/locales/fr/pokemon-info.json @@ -6,9 +6,9 @@ "ATKshortened": "Atq", "DEF": "Défense", "DEFshortened": "Déf", - "SPATK": "Atq. Spé.", + "SPATK": "Atq. Spé.", "SPATKshortened": "AtqSp", - "SPDEF": "Déf. Spé.", + "SPDEF": "Déf. Spé.", "SPDEFshortened": "DéfSp", "SPD": "Vitesse", "SPDshortened": "Vit", diff --git a/src/locales/fr/splash-messages.json b/src/locales/fr/splash-messages.json index 499a32d2cbd..9dd3e86fb32 100644 --- a/src/locales/fr/splash-messages.json +++ b/src/locales/fr/splash-messages.json @@ -1,36 +1,36 @@ { - "battlesWon": "combats gagnés !", - "joinTheDiscord": "Rejoins le Discord !", - "infiniteLevels": "Niveaux infinis !", - "everythingStacks": "Tout se cumule !", - "optionalSaveScumming": "Optional Save Scumming!", - "biomes": "35 biomes !", - "openSource": "Open Source !", - "playWithSpeed": "Joue en vitesse x5 !", - "liveBugTesting": "Tests de bugs en direct !", - "heavyInfluence": "Grosse influence de RoR2 !", - "pokemonRiskAndPokemonRain": "Pokémon Risk et Pokémon Rain !", - "nowWithMoreSalt": "Désormais avec 33% de sel en plus !", - "infiniteFusionAtHome": "Infinite Fusion, chez vous !", - "brokenEggMoves": "Des Capacités Œuf craquées !", - "magnificent": "Magnifique !", - "mubstitute": "Mubstitute !", - "thatsCrazy": "C’est une dinguerie !", - "oranceJuice": "Jus d’orange !", - "questionableBalancing": "Équilibrage douteux !", - "coolShaders": "Cool shaders !", - "aiFree": "Garanti sans IA !", - "suddenDifficultySpikes": "De soudains pics de difficultés !", - "basedOnAnUnfinishedFlashGame": "Basé sur un jeu Flash abandonné !", - "moreAddictiveThanIntended": "Plus addictif que prévu !", - "mostlyConsistentSeeds": "Des seeds à peu près stables !", - "achievementPointsDontDoAnything": "Les Points de Succès servent à rien !", - "youDoNotStartAtLevel": "Ne commence pas au Niveau 2000 !", - "dontTalkAboutTheManaphyEggIncident": "Ne parle pas de l’incident de l’Œuf de Manaphy !", - "alsoTryPokengine": "Essaye aussi Pokéngine !", + "battlesWon": "combats gagnés !", + "joinTheDiscord": "Rejoins le Discord !", + "infiniteLevels": "Niveaux infinis !", + "everythingStacks": "Tout se cumule !", + "optionalSaveScumming": "Optional Save Scumming !", + "biomes": "35 biomes !", + "openSource": "Open Source !", + "playWithSpeed": "Joue en vitesse x5 !", + "liveBugTesting": "Tests de bugs en direct !", + "heavyInfluence": "Grosse influence de RoR2 !", + "pokemonRiskAndPokemonRain": "Pokémon Risk et Pokémon Rain !", + "nowWithMoreSalt": "Désormais avec 33% de sel en plus !", + "infiniteFusionAtHome": "Infinite Fusion, chez vous !", + "brokenEggMoves": "Des Capacités Œuf craquées !", + "magnificent": "Magnifique !", + "mubstitute": "Mubstitute !", + "thatsCrazy": "C’est une dinguerie !", + "oranceJuice": "Jus d’orange !", + "questionableBalancing": "Équilibrage douteux !", + "coolShaders": "Cool shaders !", + "aiFree": "Garanti sans IA !", + "suddenDifficultySpikes": "De soudains pics de difficultés !", + "basedOnAnUnfinishedFlashGame": "Basé sur un jeu Flash abandonné !", + "moreAddictiveThanIntended": "Plus addictif que prévu !", + "mostlyConsistentSeeds": "Des seeds à peu près stables !", + "achievementPointsDontDoAnything": "Les Points de Succès servent à rien !", + "youDoNotStartAtLevel": "Ne commence pas au Niveau 2000 !", + "dontTalkAboutTheManaphyEggIncident": "Ne parle pas de l’incident de l’Œuf de Manaphy !", + "alsoTryPokengine": "Essaye aussi Pokéngine !", "alsoTryEmeraldRogue": "Essaye aussi Emerald Rogue!", - "alsoTryRadicalRed": "Essaye aussi Radical Red !", - "eeveeExpo": "Eevee Expo !", - "ynoproject": "YNOproject !", + "alsoTryRadicalRed": "Essaye aussi Radical Red !", + "eeveeExpo": "Eevee Expo !", + "ynoproject": "YNOproject !", "breedersInSpace": "Des Éleveurs dans l’espace !" -} \ No newline at end of file +} diff --git a/src/locales/fr/status-effect.json b/src/locales/fr/status-effect.json index 4a58f804906..bfb7121f522 100644 --- a/src/locales/fr/status-effect.json +++ b/src/locales/fr/status-effect.json @@ -33,7 +33,7 @@ "obtainSource": "{{pokemonNameWithAffix}} est paralysé\npar {{sourceText}} ! Il aura du mal à attaquer !", "activation": "{{pokemonNameWithAffix}} est paralysé !\nIl n’a pas pu attaquer !", "overlap": "{{pokemonNameWithAffix}} est\ndéjà paralysé.", - "heal": "{{pokemonNameWithAffix}} n’est\nplus paralysé !" + "heal": "{{pokemonNameWithAffix}} n’est\nplus paralysé !" }, "sleep": { "name": "Sommeil", @@ -62,4 +62,4 @@ "overlap": "{{pokemonNameWithAffix}} est\ndéjà brulé.", "heal": "{{pokemonNameWithAffix}} n’est\nplus brulé !" } -} \ No newline at end of file +} diff --git a/src/locales/fr/tutorial.json b/src/locales/fr/tutorial.json index 53ec05c7d81..f15a7c7c6d4 100644 --- a/src/locales/fr/tutorial.json +++ b/src/locales/fr/tutorial.json @@ -1,10 +1,10 @@ { - "intro": "Bienvenue dans PokéRogue, un fangame axé sur les combats Pokémon avec des éléments roguelite !\n$Ce jeu n’est pas monétisé et nous ne prétendons pas à la propriété de Pokémon, ni des éléments sous copyright\n$utilisés.\n$Ce jeu est toujours en développement, mais entièrement jouable.\n$Tout signalement de bugs passe par le serveur Discord.\n$Si le jeu est lent, vérifiez que l’Accélération Matérielle est activée dans les paramètres du navigateur.", - "accessMenu": "Accédez au menu avec M ou Échap lors de l’attente d’une\naction.\n$Il contient les paramètres et diverses fonctionnalités", - "menu": "Vous pouvez accéder aux paramètres depuis ce menu.\n$Vous pouvez entre autres y changer la vitesse du jeu ou le style de fenêtre.\n$Il y a également toute une variété d’autres fonctionnalités,\n$jetez-y un œil !", - "starterSelect": "Choisissez vos starters depuis cet écran avec Z ou Espace.\nIls formeront votre équipe de départ.\n$Chacun possède une valeur. Votre équipe peut avoir jusqu’à\n6 membres, tant que vous ne dépassez pas un cout de 10.\n$Vous pouvez aussi choisir le sexe, le talent et la forme en\nfonction des variants déjà capturés ou éclos.\n$Les IVs d’un starter sont les meilleurs de tous ceux de son\nespèce déjà obtenus. Essayez donc d’en obtenir plusieurs !", - "pokerus": "Chaque jour, 3 starters tirés aléatoirement ont un contour\n$violet. Si un starter que vous possédez l’a, essayez de\n$l’ajouter à votre équipe. Vérifiez bien son résumé !", - "statChange": "Les changements de stats restent à travers les combats tant que le Pokémon n’est pas rappelé.\n$Vos Pokémon sont rappelés avant un combat de Dresseur et avant d’entrer dans un nouveau biome.\n$Vous pouvez voir en combat les changements de stats d’un Pokémon en maintenant C ou Maj.\n$Vous pouvez également voir les capacités de l’adversaire en maintenant V.\n$Seules les capacités que le Pokémon a utilisées dans ce combat sont consultables.", - "selectItem": "Après chaque combat, vous avez le choix entre 3 objets\ntirés au sort. Vous ne pouvez en prendre qu’un.\n$Cela peut être des objets consommables, des objets à\nfaire tenir, ou des objets passifs aux effets permanents.\n$La plupart des effets des objets non-consommables se cumuleront de diverses manières.\n$Certains objets apparaitront s’ils peuvent être utilisés, comme les objets d’évolution.\n$Vous pouvez aussi transférer des objets tenus entre Pokémon en utilisant l’option de transfert.\n$L’option de transfert apparait en bas à droite dès que vous avez obtenu un objet à faire tenir.\n$Vous pouvez acheter des consommables avec de l’argent.\nPlus vous progressez, plus le choix sera varié.\n$Choisir un des objets gratuits déclenchera le prochain combat, donc faites bien tous vos achats avant.", - "eggGacha": "Depuis cet écran, vous pouvez échanger vos coupons\ncontre des Œufs de Pokémon.\n$Les Œufs éclosent après avoir remporté un certain nombre\nde combats. Les plus rares mettent plus de temps.\n$Les Pokémon éclos ne rejoindront pas votre équipe,\nmais seront ajoutés à vos starters.\n$Les Pokémon issus d’Œufs ont généralement de\nmeilleurs IVs que les Pokémon sauvages.\n$Certains Pokémon ne peuvent être obtenus\nque dans des Œufs.\n$Il y a 3 différentes machines à actionner avec différents\nbonus, prenez celle qui vous convient le mieux !" -} \ No newline at end of file + "intro": "Bienvenue dans PokéRogue, un fangame axé sur les combats Pokémon avec des éléments roguelite !\n$Ce jeu n’est pas monétisé et nous ne prétendons à la propriété d’aucun élément sous copyright utilisé.\n$Bien qu’en développement permanent, PokéRogue reste entièrement jouable.\n$Tout signalement de bugs et d’erreurs quelconques passe par le serveur Discord.\n$Si le jeu est lent, vérifiez que l’Accélération Matérielle est activée dans les paramètres du navigateur.", + "accessMenu": "Accédez au menu avec M ou Échap lors de l’attente d’une\naction.\n$Il contient les paramètres et diverses fonctionnalités.", + "menu": "Vous pouvez accéder aux paramètres depuis ce menu.\n$Vous pouvez entre autres y changer la vitesse du jeu ou le style de fenêtre…\n$Mais également des tonnes d’autres fonctionnalités, jetez-y un œil !", + "starterSelect": "Choisissez vos starters depuis cet écran avec Z ou Espace.\nIls formeront votre équipe de départ.\n$Chacun possède une valeur. Votre équipe peut avoir jusqu’à 6 membres, sans dépasser un cout de 10.\n$Vous pouvez aussi choisir le sexe, le talent et la forme en\nfonction des variants déjà capturés ou éclos.\n$Les IV d’un starter sont les meilleurs de tous ceux de son espèce déjà possédés. Obtenez-en plusieurs !", + "pokerus": "Chaque jour, 3 starters tirés aléatoirement ont un contour violet.\n$Si un starter que vous possédez l’a, essayez de l’ajouter à votre équipe. Vérifiez bien son résumé !", + "statChange": "Les changements de stats persistent à travers les combats tant que le Pokémon n’est pas rappelé.\n$Vos Pokémon sont rappelés avant un combat de Dresseur et avant d’entrer dans un nouveau biome.\n$Vous pouvez voir en combat les changements de stats d’un Pokémon en maintenant C ou Maj.\n$Vous pouvez également voir les capacités de l’adversaire en maintenant V.\n$Seules les capacités que le Pokémon a utilisées dans ce combat sont consultables.", + "selectItem": "Après chaque combat, vous avez le choix entre 3 objets\ntirés au sort. Vous ne pouvez en prendre qu’un.\n$Cela peut être des objets consommables, des objets à\nfaire tenir, ou des objets passifs aux effets permanents.\n$La plupart des effets des objets non-consommables se cumuleront de diverses manières.\n$Certains objets n’apparaitront que s’ils ont une utilité immédiate, comme les objets d’évolution.\n$Vous pouvez aussi transférer des objets tenus entre Pokémon en utilisant l’option de transfert.\n$L’option de transfert apparait en bas à droite dès qu’un Pokémon de l’équipe porte un objet.\n$Vous pouvez acheter des consommables avec de l’argent.\nPlus vous progressez, plus le choix sera large.\n$Choisir un des objets gratuits déclenchera le prochain combat, donc faites bien tous vos achats avant.", + "eggGacha": "Depuis cet écran, vous pouvez utiliser vos coupons\npour recevoir Œufs de Pokémon au hasard.\n$Les Œufs éclosent après avoir remporté un certain nombre de combats. Plus ils sont rares, plus ils mettent de temps.\n$Les Pokémon éclos ne rejoindront pas votre équipe, mais seront ajoutés à vos starters.\n$Les Pokémon issus d’Œufs ont généralement de meilleurs IV que les Pokémon sauvages.\n$Certains Pokémon ne peuvent être obtenus que dans des Œufs.\n$Il y a 3 différentes machines à actionner avec différents\nbonus, prenez celle qui vous convient le mieux !" +} diff --git a/src/locales/fr/voucher.json b/src/locales/fr/voucher.json index 5e26adfcc49..ef6126b4435 100644 --- a/src/locales/fr/voucher.json +++ b/src/locales/fr/voucher.json @@ -1,9 +1,9 @@ { "vouchers": "Coupons", - "eggVoucher": "Coupon Œuf", - "eggVoucherPlus": "Coupon Œuf +", - "eggVoucherPremium": "Coupon Œuf Premium", - "eggVoucherGold": "Coupon Œuf Or", + "eggVoucher": "Coupon Œuf", + "eggVoucherPlus": "Coupon Œuf +", + "eggVoucherPremium": "Coupon Œuf Premium", + "eggVoucherGold": "Coupon Œuf Or", "locked": "Verrouillé", "defeatTrainer": "Vaincre {{trainerName}}" -} \ No newline at end of file +} diff --git a/src/locales/fr/weather.json b/src/locales/fr/weather.json index 7cd8a83fd09..7afe538b064 100644 --- a/src/locales/fr/weather.json +++ b/src/locales/fr/weather.json @@ -1,32 +1,32 @@ { - "sunnyStartMessage": "Les rayons du soleil brillent !", - "sunnyLapseMessage": "Les rayons du soleil brillent fort !", - "sunnyClearMessage": "Les rayons du soleil s’affaiblissent !", - "rainStartMessage": "Il commence à pleuvoir !", - "rainLapseMessage": "La pluie continue de tomber !", - "rainClearMessage": "La pluie s’est arrêtée !", - "sandstormStartMessage": "Une tempête de sable se prépare !", - "sandstormLapseMessage": "La tempête de sable fait rage !", - "sandstormClearMessage": "La tempête de sable se calme !", - "sandstormDamageMessage": "La tempête de sable inflige des dégâts\nà {{pokemonNameWithAffix}} !", - "hailStartMessage": "Il commence à grêler !", - "hailLapseMessage": "La grêle continue de tomber !", - "hailClearMessage": "La grêle s’est arrêtée !", - "hailDamageMessage": "La grêle inflige des dégâts\nà {{pokemonNameWithAffix}} !", - "snowStartMessage": "Il commence à neiger !", - "snowLapseMessage": "Il y a une tempête de neige !", - "snowClearMessage": "La neige s’est arrêtée !", + "sunnyStartMessage": "Les rayons du soleil brillent !", + "sunnyLapseMessage": "Les rayons du soleil brillent fort !", + "sunnyClearMessage": "Les rayons du soleil s’affaiblissent !", + "rainStartMessage": "Il commence à pleuvoir !", + "rainLapseMessage": "La pluie continue de tomber !", + "rainClearMessage": "La pluie s’est arrêtée !", + "sandstormStartMessage": "Une tempête de sable se prépare !", + "sandstormLapseMessage": "La tempête de sable fait rage !", + "sandstormClearMessage": "La tempête de sable se calme !", + "sandstormDamageMessage": "La tempête de sable inflige des dégâts\nà {{pokemonNameWithAffix}} !", + "hailStartMessage": "Il commence à grêler !", + "hailLapseMessage": "La grêle continue de tomber !", + "hailClearMessage": "La grêle s’est arrêtée !", + "hailDamageMessage": "La grêle inflige des dégâts\nà {{pokemonNameWithAffix}} !", + "snowStartMessage": "Il commence à neiger !", + "snowLapseMessage": "Il y a une tempête de neige !", + "snowClearMessage": "La neige s’est arrêtée !", "fogStartMessage": "Le brouillard devient épais…", - "fogLapseMessage": "Le brouillard continue !", - "fogClearMessage": "Le brouillard s’est dissipé !", - "heavyRainStartMessage": "Une pluie battante s’abat soudainement !", + "fogLapseMessage": "Le brouillard continue !", + "fogClearMessage": "Le brouillard s’est dissipé !", + "heavyRainStartMessage": "Une pluie battante s’abat soudainement !", "heavyRainLapseMessage": "La pluie battante continue.", "heavyRainClearMessage": "La pluie battante s’est arrêtée…", - "harshSunStartMessage": "Les rayons du soleil s’intensifient !", - "harshSunLapseMessage": "Les rayons du soleil sont brulants !", - "harshSunClearMessage": "Les rayons du soleil s’affaiblissent !", - "strongWindsStartMessage": "Un vent mystérieux se lève !", - "strongWindsLapseMessage": "Le vent mystérieux souffle violemment !", - "strongWindsEffectMessage": "Le courant aérien mystérieux affaiblit l’attaque !", + "harshSunStartMessage": "Les rayons du soleil s’intensifient !", + "harshSunLapseMessage": "Les rayons du soleil sont brulants !", + "harshSunClearMessage": "Les rayons du soleil s’affaiblissent !", + "strongWindsStartMessage": "Un vent mystérieux se lève !", + "strongWindsLapseMessage": "Le vent mystérieux souffle violemment !", + "strongWindsEffectMessage": "Le courant aérien mystérieux affaiblit l’attaque !", "strongWindsClearMessage": "Le vent mystérieux s’est dissipé…" -} \ No newline at end of file +} diff --git a/src/locales/it/ability-trigger.json b/src/locales/it/ability-trigger.json index 7f55b289c0b..333cb5719d8 100644 --- a/src/locales/it/ability-trigger.json +++ b/src/locales/it/ability-trigger.json @@ -11,6 +11,7 @@ "blockItemTheft": "{{abilityName}} di {{pokemonNameWithAffix}}\nlo rende immune ai furti!", "typeImmunityHeal": "{{pokemonName}} recupera alcuni PS\ncon {{abilityName}}!", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}} evita il colpo\ncon {{abilityName}}!", + "fullHpResistType": "{{pokemonNameWithAffix}} fa risplendere la sua corazza\ne altera i rapporti tra i tipi!", "disguiseAvoidedDamage": "{{pokemonNameWithAffix}} è stato smascherato!", "moveImmunity": "Non ha effetto su {{pokemonNameWithAffix}}!", "reverseDrain": "{{pokemonNameWithAffix}} ha assorbito la melma!", @@ -51,6 +52,7 @@ "postSummonTeravolt": "{{pokemonNameWithAffix}} emana un’aura repulsiva!", "postSummonDarkAura": "L’abilità Auratetra di {{pokemonNameWithAffix}} è attiva.", "postSummonFairyAura": "L’abilità Aurafolletto di {{pokemonNameWithAffix}} è attiva.", + "postSummonAuraBreak": "{{pokemonNameWithAffix}} inverte gli effetti di tutte le aure!", "postSummonNeutralizingGas": "Il Gas Reagente di {{pokemonNameWithAffix}}\nsi diffonde tutt’intorno!", "postSummonAsOneGlastrier": "{{pokemonNameWithAffix}} ha due abilità!", "postSummonAsOneSpectrier": "{{pokemonNameWithAffix}} ha due abilità!", @@ -59,4 +61,4 @@ "postSummonTabletsOfRuin": "La/l'{{statName}} dei Pokémon intorno si indebolisce a causa\ndell'abilità Amuleto Nefasto di {{pokemonNameWithAffix}}!", "postSummonBeadsOfRuin": "La/l'{{statName}} dei Pokémon intorno si indebolisce a causa\ndell'abilità Monile Nefasto di {{pokemonNameWithAffix}}!", "preventBerryUse": "{{pokemonNameWithAffix}} non riesce a\nmangiare le bacche per l'agitazione!" -} \ No newline at end of file +} diff --git a/src/locales/it/battle.json b/src/locales/it/battle.json index f0339f761c7..9b187756025 100644 --- a/src/locales/it/battle.json +++ b/src/locales/it/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}} non è ancora implementata e non può essere selezionata.", "moveNoPP": "Non ci sono PP rimanenti\nper questa mossa!", "moveDisabled": "{{moveName}} è disabilitata!", + "disableInterruptedMove": "La mossa {{moveName}} di\n{{pokemonNameWithAffix}} è bloccata!", "noPokeballForce": "Una forza misteriosa\nimpedisce l'uso delle Poké Ball.", "noPokeballTrainer": "Non puoi catturare\nPokémon di altri allenatori!", "noPokeballMulti": "Puoi lanciare una Poké Ball\nsolo quando rimane un singolo Pokémon!", @@ -95,4 +96,4 @@ "congratulations": "Congratulazioni!", "beatModeFirstTime": "{{speciesName}} ha completato la modalità {{gameMode}} per la prima volta!\nHai ricevuto {{newModifier}}!", "ppReduced": "I PP della mossa {{moveName}} di\n{{targetName}} sono stati ridotti di {{reduction}}!" -} \ No newline at end of file +} diff --git a/src/locales/it/battler-tags.json b/src/locales/it/battler-tags.json index a0f852141f9..e8bda9cfd1e 100644 --- a/src/locales/it/battler-tags.json +++ b/src/locales/it/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "{{pokemonNameWithAffix}} viene colpito da {{moveName}}!", "cursedOnAdd": "{{pokemonNameWithAffix}} ha sacrificato metà dei suoi PS per\nlanciare una maledizione su {{pokemonName}}!", "cursedLapse": "{{pokemonNameWithAffix}} subisce la maledizione!", - "stockpilingOnAdd": "{{pokemonNameWithAffix}} ha usato Accumulo per la\n{{stockpiledCount}}ª volta!" -} \ No newline at end of file + "stockpilingOnAdd": "{{pokemonNameWithAffix}} ha usato Accumulo per la\n{{stockpiledCount}}ª volta!", + "disabledOnAdd": "La mossa {{moveName}} di\n{{pokemonNameWithAffix}} è stata bloccata!", + "disabledLapse": "La mossa {{moveName}} di\n{{pokemonNameWithAffix}} non è più bloccata!" +} diff --git a/src/locales/it/menu.json b/src/locales/it/menu.json index 2d37f9db912..5a40ae05087 100644 --- a/src/locales/it/menu.json +++ b/src/locales/it/menu.json @@ -51,5 +51,7 @@ "renamePokemon": "Rinomina un Pokémon", "rename": "Rinomina", "nickname": "Nickname", - "errorServerDown": "Poffarbacco! C'è stato un errore nella comunicazione col server.\n\nPuoi lasciare questa finestra aperta,\nil gioco si riconnetterà automaticamente." -} \ No newline at end of file + "errorServerDown": "Poffarbacco! C'è stato un errore nella comunicazione col server.\n\nPuoi lasciare questa finestra aperta,\nil gioco si riconnetterà automaticamente.", + "noSaves": "Non ci sono file di salvataggio registrati!", + "tooManySaves": "Ci sono troppi file di salvataggio registrati!" +} diff --git a/src/locales/it/modifier-type.json b/src/locales/it/modifier-type.json index 99c06bb2038..f06755bdfa0 100644 --- a/src/locales/it/modifier-type.json +++ b/src/locales/it/modifier-type.json @@ -47,10 +47,14 @@ "description": "Cambia la natura del Pokémon in {{natureName}} e sblocca la natura nel menu degli starter." }, "DoubleBattleChanceBoosterModifierType": { - "description": "Raddoppia la possibilità di imbattersi in doppie battaglie per {{battleCount}} battaglie." + "description": "Quadruplica la possibilità di imbattersi in doppie battaglie per {{battleCount}} battaglie." }, "TempStatStageBoosterModifierType": { - "description": "Aumenta la statistica {{stat}} di un livello\na tutti i Pokémon nel gruppo per 5 battaglie." + "description": "Aumenta la statistica {{stat}} di {{amount}}\na tutti i Pokémon nel gruppo per 5 battaglie", + "extra": { + "stage": "un livello", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "Aumenta la potenza delle mosse di tipo {{moveType}} del 20% per un Pokémon." diff --git a/src/locales/ja/ability-trigger.json b/src/locales/ja/ability-trigger.json index ec77d4d97d3..1b30e52c490 100644 --- a/src/locales/ja/ability-trigger.json +++ b/src/locales/ja/ability-trigger.json @@ -8,10 +8,11 @@ "trace": "{{pokemonName}}は 相手の {{targetName}}の\n{{abilityName}}を トレースした!", "windPowerCharged": "{{pokemonName}}は\n{{moveName}}を 受けて じゅうでんした!", "quickDraw": "{{pokemonName}}は クイックドロウで\n行動が はやくなった!", - "disguiseAvoidedDamage": "{{pokemonNameWithAffix}}'s disguise was busted!", + "disguiseAvoidedDamage": "{{pokemonNameWithAffix}}の\nばけのかわが はがれた!", "blockItemTheft": "{{pokemonNameWithAffix}}の {{abilityName}}で\n道具を うばわれない!", "typeImmunityHeal": "{{pokemonNameWithAffix}}は {{abilityName}}で\n体力を 回復した!", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}}は {{abilityName}}で\nダメージを 受けない。", + "fullHpResistType": "{{pokemonNameWithAffix}}は\n甲羅を かがやかせ タイプ相性を 歪める!", "moveImmunity": "{{pokemonNameWithAffix}}には\n効果が ないようだ…", "reverseDrain": "{{pokemonNameWithAffix}}は\nヘドロえきを 吸い取った!", "postDefendTypeChange": "{{pokemonNameWithAffix}}は {{abilityName}}で\n{{typeName}}タイプに なった!", @@ -51,6 +52,7 @@ "postSummonTeravolt": "{{pokemonNameWithAffix}}は\n弾(はじ)ける オーラを 放っている!", "postSummonDarkAura": "{{pokemonNameWithAffix}}は\nダークオーラを 放っている!", "postSummonFairyAura": "{{pokemonNameWithAffix}}は\nフェアリーオーラを 放っている!", + "postSummonAuraBreak": "{{pokemonNameWithAffix}}は\nすべての オーラを 制圧する!", "postSummonNeutralizingGas": "あたりに かがくへんかガスが 充満した!", "postSummonAsOneGlastrier": "{{pokemonNameWithAffix}}は\nふたつの 特性を あわせ持つ!", "postSummonAsOneSpectrier": "{{pokemonNameWithAffix}}は\nふたつの 特性を あわせ持つ!", diff --git a/src/locales/ja/battle.json b/src/locales/ja/battle.json index f3f1d134d16..636d17f23d6 100644 --- a/src/locales/ja/battle.json +++ b/src/locales/ja/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}}は まだ 実装されておらず 選択できません。", "moveNoPP": "しかし 技の\n残りポイントが なかった!", "moveDisabled": "かなしばりで\n{{moveName}}が 出せない!", + "disableInterruptedMove": "{{pokemonNameWithAffix}}は かなしばりで\n{{moveName}}が 出せない!", "noPokeballForce": "見えない 力の せいで\nボールが 投げられない!", "noPokeballTrainer": "人の ものを 取ったら 泥棒!", "noPokeballMulti": "相手の ポケモンが 一つしか\nいない 前に ボールが 使えない!", @@ -95,4 +96,4 @@ "congratulations": "おめでとうございます!!", "beatModeFirstTime": "初めて {{speciesName}}が {{gameMode}}モードを クリアした!\n{{newModifier}}を 手に入れた!", "ppReduced": "{{targetName}}の {{moveName}}を {{reduction}}削った!" -} \ No newline at end of file +} diff --git a/src/locales/ja/battler-tags.json b/src/locales/ja/battler-tags.json index 25412c971e9..2b6382a3a9f 100644 --- a/src/locales/ja/battler-tags.json +++ b/src/locales/ja/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "{{pokemonNameWithAffix}}は {{moveName}}の\n ダメージを 受けている", "cursedOnAdd": "{{pokemonNameWithAffix}}は 自分の 体力を 削って\n{{pokemonName}}に のろいを かけた!", "cursedLapse": "{{pokemonNameWithAffix}}は のろわれている!", - "stockpilingOnAdd": "{{pokemonNameWithAffix}}は {{stockpiledCount}}つ たくわえた!" + "stockpilingOnAdd": "{{pokemonNameWithAffix}}は {{stockpiledCount}}つ たくわえた!", + "disabledOnAdd": "{{pokemonNameWithAffix}}の\n{{moveName}}\nを 封じこめた!", + "disabledLapse": "{{pokemonNameWithAffix}}の\nかなしばりが 解けた!" } diff --git a/src/locales/ja/menu.json b/src/locales/ja/menu.json index 0e7701578bf..3630f7590ba 100644 --- a/src/locales/ja/menu.json +++ b/src/locales/ja/menu.json @@ -51,5 +51,7 @@ "renamePokemon": "ニックネームを変える", "rename": "変える", "nickname": "ニックネーム", - "errorServerDown": "おや!\nサーバーとの 接続中に 問題が 発生しました。\nゲームは 自動的に 再接続されます から\nウィンドウは 開いたままに しておいても よろしいです。" + "errorServerDown": "おや!\nサーバーとの 接続中に 問題が 発生しました。\nゲームは 自動的に 再接続されます から\nウィンドウは 開いたままに しておいても よろしいです。", + "noSaves": "何の セーブファイルも ありません!", + "tooManySaves": "セーブファイルが いっぱいです!" } diff --git a/src/locales/ja/modifier-type.json b/src/locales/ja/modifier-type.json index e249e3c430f..e78ffaf652e 100644 --- a/src/locales/ja/modifier-type.json +++ b/src/locales/ja/modifier-type.json @@ -47,10 +47,14 @@ "description": "ポケモンのせいかくを {{natureName}}にかえて スターターのせいかくをえいきゅうにかいじょする" }, "DoubleBattleChanceBoosterModifierType": { - "description": "バトル{{battleCount}}かいのあいだ ダブルバトルになるかくりつを2ばいにする" + "description": "バトル{{battleCount}}回の間  ダブルバトルになる  確率を 4倍に する" }, "TempStatStageBoosterModifierType": { - "description": "すべてのパーティメンバーの {{stat}}を5かいのバトルのあいだ 1だんかいあげる" + "description": "全員の 手持ちポケモンの {{stat}}を 最大5回の バトルの間に {{amount}}あげる.", + "extra": { + "stage": "1段階", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "ポケモンの {{moveType}}タイプのわざのいりょくを20パーセントあげる" diff --git a/src/locales/ko/ability-trigger.json b/src/locales/ko/ability-trigger.json index 5cf94e92235..b1f100c5c36 100644 --- a/src/locales/ko/ability-trigger.json +++ b/src/locales/ko/ability-trigger.json @@ -12,6 +12,7 @@ "blockItemTheft": "{{pokemonNameWithAffix}}의 {{abilityName}}에 의해\n도구를 빼앗기지 않는다!", "typeImmunityHeal": "{{pokemonNameWithAffix}}[[는]]\n{{abilityName}}[[로]] 체력이 회복되었다!", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}}[[는]] {{abilityName}} 때문에\n데미지를 입지 않는다!", + "fullHpResistType": "{{pokemonNameWithAffix}}[[는]] 등껍질을 빛나게 하여\n타입 상성을 왜곡시켰다!!", "moveImmunity": "{{pokemonNameWithAffix}}에게는\n효과가 없는 것 같다...", "reverseDrain": "{{pokemonNameWithAffix}}[[는]]\n해감액을 흡수했다!", "postDefendTypeChange": "{{pokemonNameWithAffix}}[[는]] {{abilityName}}[[로]] 인해\n{{typeName}}타입이 됐다!", @@ -51,6 +52,7 @@ "postSummonTeravolt": "{{pokemonNameWithAffix}}[[는]]\n세차게 튀는 오라를 발산하고 있다!", "postSummonDarkAura": "{{pokemonNameWithAffix}}[[는]]\n다크오라를 발산하고 있다!", "postSummonFairyAura": "{{pokemonNameWithAffix}}[[는]]\n페어리오라를 발산하고 있다!", + "postSummonAuraBreak": "{{pokemonNameWithAffix}}[[는]]\n모든 오라를 제압한다!", "postSummonNeutralizingGas": "주위가 화학변화가스로 가득 찼다!", "postSummonAsOneGlastrier": "{{pokemonNameWithAffix}}[[는]]\n두 가지 특성을 겸비한다!", "postSummonAsOneSpectrier": "{{pokemonNameWithAffix}}[[는]]\n두 가지 특성을 겸비한다!", @@ -59,4 +61,4 @@ "postSummonTabletsOfRuin": "{{pokemonNameWithAffix}}의 재앙의목간에 의해\n주위의 {{statName}}[[가]] 약해졌다!", "postSummonBeadsOfRuin": "{{pokemonNameWithAffix}}의 재앙의구슬에 의해\n주위의 {{statName}}[[가]] 약해졌다!", "preventBerryUse": "{{pokemonNameWithAffix}}[[는]] 긴장해서\n나무열매를 먹을 수 없게 되었다!" -} \ No newline at end of file +} diff --git a/src/locales/ko/battle.json b/src/locales/ko/battle.json index 001720e4e5c..fd715fd0e7e 100644 --- a/src/locales/ko/battle.json +++ b/src/locales/ko/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}}[[는]] 아직 구현되지 않아 사용할 수 없다…", "moveNoPP": "기술의 남은 포인트가 없다!", "moveDisabled": "{{moveName}}[[를]] 쓸 수 없다!", + "disableInterruptedMove": "{{pokemonNameWithAffix}}의 {{moveName}}[[는]]\n사용할 수 없다.", "noPokeballForce": "본 적 없는 힘이\n볼을 사용하지 못하게 한다.", "noPokeballTrainer": "다른 트레이너의 포켓몬은 잡을 수 없다!", "noPokeballMulti": "안돼! 2마리 있어서\n목표를 정할 수가 없어…!", @@ -95,4 +96,4 @@ "congratulations": "축하합니다!", "beatModeFirstTime": "{{speciesName}}[[가]] {{gameMode}} 모드를 처음으로 클리어했다!\n{{newModifier}}[[를]] 손에 넣었다!", "ppReduced": "{{targetName}}의\n{{moveName}}[[를]] {{reduction}} 깎았다!" -} \ No newline at end of file +} diff --git a/src/locales/ko/battler-tags.json b/src/locales/ko/battler-tags.json index 47ddb26c183..0993cafa04a 100644 --- a/src/locales/ko/battler-tags.json +++ b/src/locales/ko/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "{{pokemonNameWithAffix}}[[는]] 소금절이의\n데미지를 입고 있다.", "cursedOnAdd": "{{pokemonNameWithAffix}}[[는]] 자신의 체력을 깎아서\n{{pokemonName}}에게 저주를 걸었다!", "cursedLapse": "{{pokemonNameWithAffix}}[[는]]\n저주받고 있다!", - "stockpilingOnAdd": "{{pokemonNameWithAffix}}[[는]]\n{{stockpiledCount}}개 비축했다!" -} \ No newline at end of file + "stockpilingOnAdd": "{{pokemonNameWithAffix}}[[는]]\n{{stockpiledCount}}개 비축했다!", + "disabledOnAdd": "{{pokemonNameWithAffix}}의 {{moveName}}[[는]]\n사용할 수 없다!", + "disabledLapse": "{{pokemonNameWithAffix}}의 {{moveName}}[[는]]\n이제 사용할 수 있다." +} diff --git a/src/locales/ko/menu.json b/src/locales/ko/menu.json index 7976e0bedcf..a9db630f7a1 100644 --- a/src/locales/ko/menu.json +++ b/src/locales/ko/menu.json @@ -51,5 +51,7 @@ "renamePokemon": "포켓몬의 닉네임은?", "rename": "닉네임 바꾸기", "nickname": "닉네임", - "errorServerDown": "서버 연결 중 문제가 발생했습니다.\n\n이 창을 종료하지 않고 두면,\n게임은 자동으로 재접속됩니다." + "errorServerDown": "서버 연결 중 문제가 발생했습니다.\n\n이 창을 종료하지 않고 두면,\n게임은 자동으로 재접속됩니다.", + "noSaves": "기기에 세이브 파일이 없습니다!", + "tooManySaves": "기기에 세이브 파일이 너무 많습니다!" } diff --git a/src/locales/ko/modifier-type.json b/src/locales/ko/modifier-type.json index d94837bb0d2..e957fd0d58a 100644 --- a/src/locales/ko/modifier-type.json +++ b/src/locales/ko/modifier-type.json @@ -47,10 +47,14 @@ "description": "포켓몬의 성격을 {{natureName}}[[로]] 바꾸고 스타팅에도 등록한다." }, "DoubleBattleChanceBoosterModifierType": { - "description": "{{battleCount}}번의 배틀 동안 더블 배틀이 등장할 확률이 두 배가 된다." + "description": "{{battleCount}}번의 배틀 동안 더블 배틀이 등장할 확률이 4배가 된다." }, "TempStatStageBoosterModifierType": { - "description": "자신의 모든 포켓몬이 5번의 배틀 동안 {{stat}}[[가]] 한 단계 증가한다." + "description": "자신의 모든 포켓몬이 5번의 배틀 동안 {{stat}}[[가]] {{amount}}단계 증가한다.", + "extra": { + "stage": "1 스테이지", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "지니게 하면 {{moveType}}타입 기술의 위력이 20% 상승한다." diff --git a/src/locales/pt_BR/battle.json b/src/locales/pt_BR/battle.json index e34ce8efdca..2b20e0062ea 100644 --- a/src/locales/pt_BR/battle.json +++ b/src/locales/pt_BR/battle.json @@ -95,4 +95,4 @@ "unlockedSomething": "{{unlockedThing}}\nfoi desbloqueado.", "congratulations": "Parabéns!", "beatModeFirstTime": "{{speciesName}} venceu o Modo {{gameMode}} pela primeira vez!\nVocê recebeu {{newModifier}}!" -} \ No newline at end of file +} diff --git a/src/locales/pt_BR/battler-tags.json b/src/locales/pt_BR/battler-tags.json index 560da13cc6f..e0f6538404b 100644 --- a/src/locales/pt_BR/battler-tags.json +++ b/src/locales/pt_BR/battler-tags.json @@ -68,4 +68,4 @@ "cursedOnAdd": "{{pokemonNameWithAffix}} cortou seus PS pela metade e amaldiçoou {{pokemonName}}!", "cursedLapse": "{{pokemonNameWithAffix}} foi ferido pelo Curse!", "stockpilingOnAdd": "{{pokemonNameWithAffix}} estocou {{stockpiledCount}}!" -} \ No newline at end of file +} diff --git a/src/locales/pt_BR/modifier-type.json b/src/locales/pt_BR/modifier-type.json index 823d6b35e16..f20a4ef3d0f 100644 --- a/src/locales/pt_BR/modifier-type.json +++ b/src/locales/pt_BR/modifier-type.json @@ -47,10 +47,14 @@ "description": "Muda a natureza do Pokémon para {{natureName}} e a desbloqueia permanentemente." }, "DoubleBattleChanceBoosterModifierType": { - "description": "Dobra as chances de encontrar uma batalha em dupla por {{battleCount}} batalhas." + "description": "Quadruplica as chances de encontrar uma batalha em dupla por {{battleCount}} batalhas." }, "TempStatStageBoosterModifierType": { - "description": "Aumenta o atributo de {{stat}} para todos os membros da equipe por 5 batalhas." + "description": "Aumenta o atributo de {{stat}} para todos os membros da equipe em {{amount}} por 5 batalhas.", + "extra": { + "stage": "um nível", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "Aumenta o poder dos ataques do tipo {{moveType}} de um Pokémon em 20%." diff --git a/src/locales/zh_CN/ability-trigger.json b/src/locales/zh_CN/ability-trigger.json index f4289b598a0..0bb9c3a56ef 100644 --- a/src/locales/zh_CN/ability-trigger.json +++ b/src/locales/zh_CN/ability-trigger.json @@ -12,6 +12,7 @@ "blockItemTheft": "{{pokemonNameWithAffix}}的{{abilityName}}\n阻止了对方夺取道具!", "typeImmunityHeal": "{{pokemonNameWithAffix}}因{{abilityName}}\n回复了少许HP!", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}}因{{abilityName}}\n避免了伤害!", + "fullHpResistType": "{{pokemonNameWithAffix}}\n让甲壳发出光辉,使属性相克发生扭曲!", "moveImmunity": "对{{pokemonNameWithAffix}}没有效果!", "reverseDrain": "{{pokemonNameWithAffix}}\n吸到了污泥浆!", "postDefendTypeChange": "{{pokemonNameWithAffix}}因{{abilityName}}\n变成了{{typeName}}属性!", @@ -51,6 +52,7 @@ "postSummonTeravolt": "{{pokemonNameWithAffix}}\n正在释放溅射气场!", "postSummonDarkAura": "{{pokemonNameWithAffix}}\n正在释放暗黑气场!", "postSummonFairyAura": "{{pokemonNameWithAffix}}\n正在释放妖精气场!", + "postSummonAuraBreak": "{{pokemonNameWithAffix}}\n压制了所有气场!", "postSummonNeutralizingGas": "周围充满了\n{{pokemonNameWithAffix}}的化学变化气体!", "postSummonAsOneGlastrier": "{{pokemonNameWithAffix}}\n同时拥有了两种特性!", "postSummonAsOneSpectrier": "{{pokemonNameWithAffix}}\n同时拥有了两种特性!", @@ -59,4 +61,4 @@ "postSummonTabletsOfRuin": "{{pokemonNameWithAffix}}的灾祸之简\n令周围的宝可梦的{{statName}}减弱了!", "postSummonBeadsOfRuin": "{{pokemonNameWithAffix}}的灾祸之玉\n令周围的宝可梦的{{statName}}减弱了!", "preventBerryUse": "{{pokemonNameWithAffix}}因太紧张\n而无法食用树果!" -} \ No newline at end of file +} diff --git a/src/locales/zh_CN/battle.json b/src/locales/zh_CN/battle.json index 84f468a4a4b..4197786b7d8 100644 --- a/src/locales/zh_CN/battle.json +++ b/src/locales/zh_CN/battle.json @@ -44,6 +44,7 @@ "moveNotImplemented": "{{moveName}}尚未实装,无法选择。", "moveNoPP": "这个技能的PP用完了", "moveDisabled": "{{moveName}}被禁用!", + "disableInterruptedMove": "{{pokemonNameWithAffix}}的{{moveName}}\n被无效化了!", "noPokeballForce": "一股无形的力量阻止了你使用精灵球。", "noPokeballTrainer": "你不能捕捉其他训练家的宝可梦!", "noPokeballMulti": "只能在剩下一只宝可梦时才能扔出精灵球!", @@ -87,4 +88,4 @@ "unlockedSomething": "{{unlockedThing}}\n已解锁。", "congratulations": "恭喜!", "beatModeFirstTime": "{{speciesName}}首次击败了{{gameMode}}!\n你获得了{{newModifier}}!" -} \ No newline at end of file +} diff --git a/src/locales/zh_CN/battler-tags.json b/src/locales/zh_CN/battler-tags.json index 81838b5023a..792551d1ab1 100644 --- a/src/locales/zh_CN/battler-tags.json +++ b/src/locales/zh_CN/battler-tags.json @@ -67,5 +67,7 @@ "saltCuredLapse": "{{pokemonNameWithAffix}}\n受到了{{moveName}}的伤害!", "cursedOnAdd": "{{pokemonNameWithAffix}}削减了自己的体力,\n并诅咒了{{pokemonName}}!", "cursedLapse": "{{pokemonNameWithAffix}}\n正受到诅咒!", - "stockpilingOnAdd": "{{pokemonNameWithAffix}}蓄力了{{stockpiledCount}}次!" -} \ No newline at end of file + "stockpilingOnAdd": "{{pokemonNameWithAffix}}蓄力了{{stockpiledCount}}次!", + "disabledOnAdd": "封住了{{pokemonNameWithAffix}}的\n{{moveName}}!", + "disabledLapse": "{{pokemonNameWithAffix}}的\n定身法解除了!" +} diff --git a/src/locales/zh_CN/menu.json b/src/locales/zh_CN/menu.json index 59146d30ee9..8946b5b8df6 100644 --- a/src/locales/zh_CN/menu.json +++ b/src/locales/zh_CN/menu.json @@ -51,5 +51,7 @@ "renamePokemon": "给宝可梦起名", "rename": "起名", "nickname": "昵称", - "errorServerDown": "糟糕!访问服务器时发生了错误。\n\n你可以保持页面开启,\n游戏会自动重新连接。" -} \ No newline at end of file + "errorServerDown": "糟糕!访问服务器时发生了错误。\n\n你可以保持页面开启,\n游戏会自动重新连接。", + "noSaves": "你没有任何记录文件!", + "tooManySaves": "你的记录文件太多了!" +} diff --git a/src/locales/zh_CN/modifier-type.json b/src/locales/zh_CN/modifier-type.json index 5d6184640b1..26e4c2dc110 100644 --- a/src/locales/zh_CN/modifier-type.json +++ b/src/locales/zh_CN/modifier-type.json @@ -47,10 +47,14 @@ "description": "将一只宝可梦的性格改为{{natureName}}并为\n该宝可梦永久解锁该性格。" }, "DoubleBattleChanceBoosterModifierType": { - "description": "接下来的{{battleCount}}场战斗是双打的概率翻倍。" + "description": "遭遇双打概率提升四倍,持续{{battleCount}}场战斗。" }, "TempStatStageBoosterModifierType": { - "description": "为所有成员宝可梦提升一级{{stat}},持续5场战斗。" + "description": "提升全队的{{stat}}{{amount}}级,持续5场战斗。", + "extra": { + "stage": "1阶", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "一只宝可梦的{{moveType}}系招式威力提升20%。" diff --git a/src/locales/zh_TW/ability-trigger.json b/src/locales/zh_TW/ability-trigger.json index 3286d97b10c..f31fb12bc35 100644 --- a/src/locales/zh_TW/ability-trigger.json +++ b/src/locales/zh_TW/ability-trigger.json @@ -6,6 +6,8 @@ "trace": "{{pokemonName}} 複製了 {{targetName}} 的\n{{abilityName}}!", "windPowerCharged": "受 {{moveName}} 的影響, {{pokemonName}} 提升了能力!", "disguiseAvoidedDamage": "{{pokemonNameWithAffix}}的畫皮脫落了!", + "fullHpResistType": "{{pokemonNameWithAffix}}讓甲殼綻放光輝,扭曲了屬性相剋關係!", "weatherEffectDisappeared": "天氣的影響消失了!", + "postSummonAuraBreak": "{{pokemonNameWithAffix}}壓制了所有氣場!", "preventBerryUse": "{{pokemonNameWithAffix}}因太緊張\n而無法食用樹果!" -} \ No newline at end of file +} diff --git a/src/locales/zh_TW/battle.json b/src/locales/zh_TW/battle.json index 97b85a9cd5a..0d44688ff4a 100644 --- a/src/locales/zh_TW/battle.json +++ b/src/locales/zh_TW/battle.json @@ -40,6 +40,7 @@ "moveNotImplemented": "{{moveName}} 未實裝,無法選擇。", "moveNoPP": "這個技能的PP用完了", "moveDisabled": "{{moveName}} 被禁用!", + "disableInterruptedMove": "{{pokemonNameWithAffix}}的{{moveName}}\n被無效化了!", "noPokeballForce": "一股無形的力量阻止了你使用精靈球。", "noPokeballTrainer": "你不能捕捉其他訓練家的寶可夢!", "noPokeballMulti": "只能在剩下一隻寶可夢時才能扔出精靈球!", @@ -65,4 +66,4 @@ "regainHealth": "{{pokemonName}} 回復了體力!", "fainted": "{{pokemonNameWithAffix}} 倒下了!", "ppReduced": "降低了 {{targetName}} 的\n{{moveName}} 的PP{{reduction}}點!" -} \ No newline at end of file +} diff --git a/src/locales/zh_TW/battler-tags.json b/src/locales/zh_TW/battler-tags.json index 9a35bb0d03f..b5a2760f7ac 100644 --- a/src/locales/zh_TW/battler-tags.json +++ b/src/locales/zh_TW/battler-tags.json @@ -66,5 +66,7 @@ "saltCuredOnAdd": "{{pokemonNameWithAffix}} 陷入了鹽腌狀態!", "saltCuredLapse": "{{pokemonNameWithAffix}} 受到了{{moveName}}的傷害!", "cursedOnAdd": "{{pokemonNameWithAffix}}削減了自己的體力,並詛咒了{{pokemonName}}!", - "cursedLapse": "{{pokemonNameWithAffix}}正受到詛咒!" -} \ No newline at end of file + "cursedLapse": "{{pokemonNameWithAffix}}正受到詛咒!", + "disabledOnAdd": "封住了{{pokemonNameWithAffix}}的\n{moveName}}!", + "disabledLapse": "{{pokemonNameWithAffix}}的\n定身法解除了!" +} diff --git a/src/locales/zh_TW/menu.json b/src/locales/zh_TW/menu.json index 1ec0b7124d8..b56a39bbda2 100644 --- a/src/locales/zh_TW/menu.json +++ b/src/locales/zh_TW/menu.json @@ -40,5 +40,7 @@ "loading": "加載中…", "playersOnline": "在線玩家", "yes": "是", - "no": "否" -} \ No newline at end of file + "no": "否", + "noSaves": "你沒有任何記錄檔!", + "tooManySaves": "你的記錄檔太多了!" +} diff --git a/src/locales/zh_TW/modifier-type.json b/src/locales/zh_TW/modifier-type.json index 68881a206cb..ec066277cda 100644 --- a/src/locales/zh_TW/modifier-type.json +++ b/src/locales/zh_TW/modifier-type.json @@ -47,10 +47,14 @@ "description": "將一隻寶可夢的性格改爲{{natureName}}併爲該寶可\n夢永久解鎖該性格。" }, "DoubleBattleChanceBoosterModifierType": { - "description": "接下來的{{battleCount}}場戰鬥是雙打的概率翻倍。" + "description": "遭遇雙打機率提升四倍,持續{{battleCount}}場戰鬥。" }, "TempStatStageBoosterModifierType": { - "description": "爲所有成員寶可夢提升一級{{stat}},持續5場戰鬥。" + "description": "提升全隊的{{stat}}{{amount}}級,持續5場戰鬥。", + "extra": { + "stage": "1階", + "percentage": "30%" + } }, "AttackTypeBoosterModifierType": { "description": "一隻寶可夢的{{moveType}}系招式威力提升20%。" diff --git a/src/main.ts b/src/main.ts index 8a69d3f1b72..b5f813bdf2f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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"; diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 1281ac3512f..adcaf0d7833 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -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; diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index ec9fbbf7ca5..c3742c9ecbe 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -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; diff --git a/src/phases/add-enemy-buff-modifier-phase.ts b/src/phases/add-enemy-buff-modifier-phase.ts index a9936eb765d..451e6e2662c 100644 --- a/src/phases/add-enemy-buff-modifier-phase.ts +++ b/src/phases/add-enemy-buff-modifier-phase.ts @@ -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) { diff --git a/src/phases/attempt-capture-phase.ts b/src/phases/attempt-capture-phase.ts index 72995c0f006..cf9ce997bfd 100644 --- a/src/phases/attempt-capture-phase.ts +++ b/src/phases/attempt-capture-phase.ts @@ -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"; @@ -221,8 +221,8 @@ export class AttemptCapturePhase extends PokemonPhase { this.scene.clearEnemyHeldItemModifiers(); this.scene.field.remove(pokemon, true); }; - const addToParty = () => { - const newPokemon = pokemon.addToParty(this.pokeballType); + const addToParty = (slotIndex?: number) => { + const newPokemon = pokemon.addToParty(this.pokeballType, slotIndex); const modifiers = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier, false); if (this.scene.getParty().filter(p => p.isShiny()).length === 6) { this.scene.validateAchv(achvs.SHINY_PARTY); @@ -253,7 +253,7 @@ export class AttemptCapturePhase extends PokemonPhase { this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => { this.scene.ui.setMode(Mode.MESSAGE).then(() => { if (slotIndex < 6) { - addToParty(); + addToParty(slotIndex); } else { promptRelease(); } diff --git a/src/phases/attempt-run-phase.ts b/src/phases/attempt-run-phase.ts index 9cf86fed592..46d68f6005a 100644 --- a/src/phases/attempt-run-phase.ts +++ b/src/phases/attempt-run-phase.ts @@ -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); diff --git a/src/phases/battle-end-phase.ts b/src/phases/battle-end-phase.ts index 06315668a8b..f08e04b443a 100644 --- a/src/phases/battle-end-phase.ts +++ b/src/phases/battle-end-phase.ts @@ -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"; diff --git a/src/phases/battle-phase.ts b/src/phases/battle-phase.ts index 3e7e0e28596..b51e19bdf0e 100644 --- a/src/phases/battle-phase.ts +++ b/src/phases/battle-phase.ts @@ -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) { diff --git a/src/phases/berry-phase.ts b/src/phases/berry-phase.ts index 504fb6ec163..66ecaa6c7f8 100644 --- a/src/phases/berry-phase.ts +++ b/src/phases/berry-phase.ts @@ -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"; diff --git a/src/phases/check-switch-phase.ts b/src/phases/check-switch-phase.ts index cd8f2b00c46..a069ba224a2 100644 --- a/src/phases/check-switch-phase.ts +++ b/src/phases/check-switch-phase.ts @@ -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"; diff --git a/src/phases/common-anim-phase.ts b/src/phases/common-anim-phase.ts index ec680158498..142d72aefe7 100644 --- a/src/phases/common-anim-phase.ts +++ b/src/phases/common-anim-phase.ts @@ -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 { diff --git a/src/phases/damage-phase.ts b/src/phases/damage-phase.ts index 029c1e717f1..5add0345358 100644 --- a/src/phases/damage-phase.ts +++ b/src/phases/damage-phase.ts @@ -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 { diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 1a4e4fdf979..61613c9adc5 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -87,7 +87,11 @@ export class EncounterPhase extends BattlePhase { let totalBst = 0; - battle.enemyLevels?.forEach((level, e) => { + battle.enemyLevels?.every((level, e) => { + if (battle.battleType === BattleType.MYSTERY_ENCOUNTER) { + // Skip enemy loading for MEs, those are loaded elsewhere + return false; + } if (!this.loaded) { if (battle.battleType === BattleType.TRAINER) { battle.enemyParty[e] = battle.trainer?.genPartyMember(e)!; // TODO:: is the bang correct here? @@ -138,6 +142,7 @@ export class EncounterPhase extends BattlePhase { loadEnemyAssets.push(enemyPokemon.loadAssets()); console.log(getPokemonNameWithAffix(enemyPokemon), enemyPokemon.species.speciesId, enemyPokemon.stats); + return true; }); if (this.scene.getParty().filter(p => p.isShiny()).length === 6) { @@ -151,7 +156,12 @@ export class EncounterPhase extends BattlePhase { const newEncounter = this.scene.getMysteryEncounter(mysteryEncounter); battle.mysteryEncounter = newEncounter; } - loadEnemyAssets.push(battle.mysteryEncounter.introVisuals!.loadAssets().then(() => battle.mysteryEncounter!.introVisuals!.initSprite())); + if (battle.mysteryEncounter.introVisuals) { + loadEnemyAssets.push(battle.mysteryEncounter.introVisuals.loadAssets().then(() => battle.mysteryEncounter!.introVisuals!.initSprite())); + } + if (battle.mysteryEncounter.loadAssets.length > 0) { + loadEnemyAssets.push(...battle.mysteryEncounter.loadAssets); + } // Load Mystery Encounter Exclamation bubble and sfx loadEnemyAssets.push(new Promise(resolve => { this.scene.loadSe("GEN8- Exclaim", "battle_anims", "GEN8- Exclaim.wav"); @@ -176,7 +186,10 @@ export class EncounterPhase extends BattlePhase { } Promise.all(loadEnemyAssets).then(() => { - battle.enemyParty.forEach((enemyPokemon, e) => { + battle.enemyParty.every((enemyPokemon, e) => { + if (battle.battleType === BattleType.MYSTERY_ENCOUNTER) { + return false; + } if (e < (battle.double ? 2 : 1)) { if (battle.battleType === BattleType.WILD) { this.scene.field.add(enemyPokemon); @@ -189,16 +202,15 @@ export class EncounterPhase extends BattlePhase { } else if (battle.battleType === BattleType.TRAINER) { enemyPokemon.setVisible(false); this.scene.currentBattle.trainer?.tint(0, 0.5); - } else if (battle.battleType === BattleType.MYSTERY_ENCOUNTER) { - // TODO: this may not be necessary, but leaving as placeholder } if (battle.double) { enemyPokemon.setFieldPosition(e ? FieldPosition.RIGHT : FieldPosition.LEFT); } } + return true; }); - if (!this.loaded) { + if (!this.loaded && battle.battleType !== BattleType.MYSTERY_ENCOUNTER) { regenerateModifierPoolThresholds(this.scene.getEnemyField(), battle.battleType === BattleType.TRAINER ? ModifierPoolType.TRAINER : ModifierPoolType.WILD); this.scene.generateEnemyModifiers(); } diff --git a/src/phases/end-card-phase.ts b/src/phases/end-card-phase.ts index 0b70664b993..274a745017a 100644 --- a/src/phases/end-card-phase.ts +++ b/src/phases/end-card-phase.ts @@ -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 { diff --git a/src/phases/end-evolution-phase.ts b/src/phases/end-evolution-phase.ts index 2a6d492a425..8a6ce52553d 100644 --- a/src/phases/end-evolution-phase.ts +++ b/src/phases/end-evolution-phase.ts @@ -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 { diff --git a/src/phases/enemy-party-member-pokemon-phase.ts b/src/phases/enemy-party-member-pokemon-phase.ts index 10af0913f93..bb34f53b475 100644 --- a/src/phases/enemy-party-member-pokemon-phase.ts +++ b/src/phases/enemy-party-member-pokemon-phase.ts @@ -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 { diff --git a/src/phases/exp-phase.ts b/src/phases/exp-phase.ts index 9c2ba95d550..81982980d2a 100644 --- a/src/phases/exp-phase.ts +++ b/src/phases/exp-phase.ts @@ -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"; diff --git a/src/phases/field-phase.ts b/src/phases/field-phase.ts index b65e903a32b..46c3c4983b4 100644 --- a/src/phases/field-phase.ts +++ b/src/phases/field-phase.ts @@ -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; diff --git a/src/phases/game-over-modifier-reward-phase.ts b/src/phases/game-over-modifier-reward-phase.ts index c27659bf9d4..a698e62e2e1 100644 --- a/src/phases/game-over-modifier-reward-phase.ts +++ b/src/phases/game-over-modifier-reward-phase.ts @@ -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"; diff --git a/src/phases/game-over-phase.ts b/src/phases/game-over-phase.ts index b6f7cd579e9..2c8777ecfe1 100644 --- a/src/phases/game-over-phase.ts +++ b/src/phases/game-over-phase.ts @@ -239,7 +239,7 @@ export class GameOverPhase extends BattlePhase { timestamp: new Date().getTime(), challenges: this.scene.gameMode.challenges.map(c => new ChallengeData(c)), mysteryEncounter: this.scene.currentBattle.mysteryEncounter, - mysteryEncounterData: this.scene.mysteryEncounterData + mysteryEncounterSaveData: this.scene.mysteryEncounterSaveData } as SessionSaveData; } } diff --git a/src/phases/hide-party-exp-bar-phase.ts b/src/phases/hide-party-exp-bar-phase.ts index c2c9d96462e..303650ea1ad 100644 --- a/src/phases/hide-party-exp-bar-phase.ts +++ b/src/phases/hide-party-exp-bar-phase.ts @@ -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 { diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index 201019e8860..049fc6951b6 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -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"; diff --git a/src/phases/level-cap-phase.ts b/src/phases/level-cap-phase.ts index db59fbd6473..d1404e45010 100644 --- a/src/phases/level-cap-phase.ts +++ b/src/phases/level-cap-phase.ts @@ -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"; diff --git a/src/phases/level-up-phase.ts b/src/phases/level-up-phase.ts index a8a6b8f3d80..a99e038acba 100644 --- a/src/phases/level-up-phase.ts +++ b/src/phases/level-up-phase.ts @@ -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"; diff --git a/src/phases/login-phase.ts b/src/phases/login-phase.ts index b58cc9bca1f..89ced201e9e 100644 --- a/src/phases/login-phase.ts +++ b/src/phases/login-phase.ts @@ -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"; diff --git a/src/phases/message-phase.ts b/src/phases/message-phase.ts index 46e907ae2ba..2244980c899 100644 --- a/src/phases/message-phase.ts +++ b/src/phases/message-phase.ts @@ -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; diff --git a/src/phases/modifier-reward-phase.ts b/src/phases/modifier-reward-phase.ts index 4d083a367a6..20a8366d9c6 100644 --- a/src/phases/modifier-reward-phase.ts +++ b/src/phases/modifier-reward-phase.ts @@ -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"; diff --git a/src/phases/money-reward-phase.ts b/src/phases/money-reward-phase.ts index e0bff608972..2f0a4f7b990 100644 --- a/src/phases/money-reward-phase.ts +++ b/src/phases/money-reward-phase.ts @@ -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 { diff --git a/src/phases/move-anim-test-phase.ts b/src/phases/move-anim-test-phase.ts index 7fb3c1d61e7..2d3b54bfd9a 100644 --- a/src/phases/move-anim-test-phase.ts +++ b/src/phases/move-anim-test-phase.ts @@ -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 { diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index 3ef75c5e996..a99ff21fcd0 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -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 { diff --git a/src/phases/move-end-phase.ts b/src/phases/move-end-phase.ts index 4bce2185aea..e03f2ec14b0 100644 --- a/src/phases/move-end-phase.ts +++ b/src/phases/move-end-phase.ts @@ -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 { diff --git a/src/phases/move-header-phase.ts b/src/phases/move-header-phase.ts index 5166f287731..c307ff0be6e 100644 --- a/src/phases/move-header-phase.ts +++ b/src/phases/move-header-phase.ts @@ -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 { diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 0ccf19a462f..8209bdd44d1 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -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"; diff --git a/src/phases/mystery-encounter-phases.ts b/src/phases/mystery-encounter-phases.ts index e8a1079eb8d..ad3a5d150a8 100644 --- a/src/phases/mystery-encounter-phases.ts +++ b/src/phases/mystery-encounter-phases.ts @@ -24,7 +24,7 @@ import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; import { NewBattlePhase } from "#app/phases/new-battle-phase"; import { GameOverPhase } from "#app/phases/game-over-phase"; import { SwitchPhase } from "#app/phases/switch-phase"; -import { SeenEncounterData } from "#app/data/mystery-encounters/mystery-encounter-data"; +import { SeenEncounterData } from "#app/data/mystery-encounters/mystery-encounter-save-data"; /** * Will handle (in order): @@ -63,7 +63,7 @@ export class MysteryEncounterPhase extends Phase { if (!this.optionSelectSettings) { // Sets flag that ME was encountered, only if this is not a followup option select phase // Can be used in later MEs to check for requirements to spawn, run history, etc. - this.scene.mysteryEncounterData.encounteredEvents.push(new SeenEncounterData(encounter.encounterType, encounter.encounterTier, this.scene.currentBattle.waveIndex)); + this.scene.mysteryEncounterSaveData.encounteredEvents.push(new SeenEncounterData(encounter.encounterType, encounter.encounterTier, this.scene.currentBattle.waveIndex)); } // Initiates encounter dialogue window and option select @@ -74,6 +74,15 @@ export class MysteryEncounterPhase extends Phase { // Set option selected flag this.scene.currentBattle.mysteryEncounter!.selectedOption = option; + if (!this.optionSelectSettings) { + // Saves the selected option in the ME save data, only if this is not a followup option select phase + // Can be used for analytics purposes to track what options are popular on certain encounters + const encounterSaveData = this.scene.mysteryEncounterSaveData.encounteredEvents[this.scene.mysteryEncounterSaveData.encounteredEvents.length - 1]; + if (encounterSaveData.type === this.scene.currentBattle.mysteryEncounter?.encounterType) { + encounterSaveData.selectedOption = index; + } + } + if (!option.onOptionPhase) { return false; } diff --git a/src/phases/new-biome-encounter-phase.ts b/src/phases/new-biome-encounter-phase.ts index f2ead9bf58c..48d928402de 100644 --- a/src/phases/new-biome-encounter-phase.ts +++ b/src/phases/new-biome-encounter-phase.ts @@ -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 { diff --git a/src/phases/next-encounter-phase.ts b/src/phases/next-encounter-phase.ts index d1b4d2e93d1..7de2472dd35 100644 --- a/src/phases/next-encounter-phase.ts +++ b/src/phases/next-encounter-phase.ts @@ -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 { diff --git a/src/phases/obtain-status-effect-phase.ts b/src/phases/obtain-status-effect-phase.ts index ac6e66a2e9f..bb06fafb1c9 100644 --- a/src/phases/obtain-status-effect-phase.ts +++ b/src/phases/obtain-status-effect-phase.ts @@ -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"; diff --git a/src/phases/outdated-phase.ts b/src/phases/outdated-phase.ts index 72d1bb3671d..4baf16d2f56 100644 --- a/src/phases/outdated-phase.ts +++ b/src/phases/outdated-phase.ts @@ -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) { diff --git a/src/phases/party-exp-phase.ts b/src/phases/party-exp-phase.ts new file mode 100644 index 00000000000..9f7295ea825 --- /dev/null +++ b/src/phases/party-exp-phase.ts @@ -0,0 +1,24 @@ +import BattleScene from "#app/battle-scene.js"; +import { Phase } from "#app/phase"; + +export class PartyExpPhase extends Phase { + expValue: number; + useWaveIndexMultiplier?: boolean; + pokemonParticipantIds?: Set; + + constructor(scene: BattleScene, expValue: number, useWaveIndexMultiplier?: boolean, pokemonParticipantIds?: Set) { + super(scene); + + this.expValue = expValue; + this.useWaveIndexMultiplier = useWaveIndexMultiplier; + this.pokemonParticipantIds = pokemonParticipantIds; + } + + start() { + super.start(); + + this.scene.applyPartyExp(this.expValue, false, this.useWaveIndexMultiplier, this.pokemonParticipantIds); + + this.end(); + } +} diff --git a/src/phases/party-heal-phase.ts b/src/phases/party-heal-phase.ts index d9179826a19..e6ee11202df 100644 --- a/src/phases/party-heal-phase.ts +++ b/src/phases/party-heal-phase.ts @@ -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 { diff --git a/src/phases/party-member-pokemon-phase.ts b/src/phases/party-member-pokemon-phase.ts index 1f27826884e..2b6ca01261d 100644 --- a/src/phases/party-member-pokemon-phase.ts +++ b/src/phases/party-member-pokemon-phase.ts @@ -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 { diff --git a/src/phases/party-status-cure-phase.ts b/src/phases/party-status-cure-phase.ts index a11aa01b63a..e4903c7fc1f 100644 --- a/src/phases/party-status-cure-phase.ts +++ b/src/phases/party-status-cure-phase.ts @@ -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"; diff --git a/src/phases/player-party-member-pokemon-phase.ts b/src/phases/player-party-member-pokemon-phase.ts index 4b1600b33d2..87855b9334c 100644 --- a/src/phases/player-party-member-pokemon-phase.ts +++ b/src/phases/player-party-member-pokemon-phase.ts @@ -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 { diff --git a/src/phases/pokemon-heal-phase.ts b/src/phases/pokemon-heal-phase.ts index 6db8aeb4fca..49db2641e98 100644 --- a/src/phases/pokemon-heal-phase.ts +++ b/src/phases/pokemon-heal-phase.ts @@ -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 { diff --git a/src/phases/pokemon-phase.ts b/src/phases/pokemon-phase.ts index 871ee57d7a5..b980c1d1719 100644 --- a/src/phases/pokemon-phase.ts +++ b/src/phases/pokemon-phase.ts @@ -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 { diff --git a/src/phases/post-game-over-phase.ts b/src/phases/post-game-over-phase.ts index 02413b41a23..beeb30c7260 100644 --- a/src/phases/post-game-over-phase.ts +++ b/src/phases/post-game-over-phase.ts @@ -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"; diff --git a/src/phases/post-summon-phase.ts b/src/phases/post-summon-phase.ts index f1f620db05e..e7f6c6ea3db 100644 --- a/src/phases/post-summon-phase.ts +++ b/src/phases/post-summon-phase.ts @@ -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"; import { MysteryEncounterPostSummonTag } from "#app/data/battler-tags"; import { BattlerTagType } from "#enums/battler-tag-type"; diff --git a/src/phases/post-turn-status-effect-phase.ts b/src/phases/post-turn-status-effect-phase.ts index 47db32303a5..413f9eae65e 100644 --- a/src/phases/post-turn-status-effect-phase.ts +++ b/src/phases/post-turn-status-effect-phase.ts @@ -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 { diff --git a/src/phases/quiet-form-change-phase.ts b/src/phases/quiet-form-change-phase.ts index 3d30d36907e..6a1d31d137d 100644 --- a/src/phases/quiet-form-change-phase.ts +++ b/src/phases/quiet-form-change-phase.ts @@ -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"; diff --git a/src/phases/reload-session-phase.ts b/src/phases/reload-session-phase.ts index a61c52323bf..f8a38105869 100644 --- a/src/phases/reload-session-phase.ts +++ b/src/phases/reload-session-phase.ts @@ -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; diff --git a/src/phases/return-phase.ts b/src/phases/return-phase.ts index e1753670ad4..dfc458eb817 100644 --- a/src/phases/return-phase.ts +++ b/src/phases/return-phase.ts @@ -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 { diff --git a/src/phases/ribbon-modifier-reward-phase.ts b/src/phases/ribbon-modifier-reward-phase.ts index 4a80325b7e7..fabb3bfa1b1 100644 --- a/src/phases/ribbon-modifier-reward-phase.ts +++ b/src/phases/ribbon-modifier-reward-phase.ts @@ -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"; diff --git a/src/phases/scan-ivs-phase.ts b/src/phases/scan-ivs-phase.ts index f5e1a814612..ba27e4f1943 100644 --- a/src/phases/scan-ivs-phase.ts +++ b/src/phases/scan-ivs-phase.ts @@ -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"; diff --git a/src/phases/select-biome-phase.ts b/src/phases/select-biome-phase.ts index 68c2cd29f26..fe9b5b3996b 100644 --- a/src/phases/select-biome-phase.ts +++ b/src/phases/select-biome-phase.ts @@ -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"; diff --git a/src/phases/select-challenge-phase.ts b/src/phases/select-challenge-phase.ts index eaf830e0059..9450c60fec5 100644 --- a/src/phases/select-challenge-phase.ts +++ b/src/phases/select-challenge-phase.ts @@ -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) { diff --git a/src/phases/select-gender-phase.ts b/src/phases/select-gender-phase.ts index 3fc6916e233..7f2c965f1d1 100644 --- a/src/phases/select-gender-phase.ts +++ b/src/phases/select-gender-phase.ts @@ -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 { diff --git a/src/phases/select-modifier-phase.ts b/src/phases/select-modifier-phase.ts index ea722026cfb..8e34f6ce9bd 100644 --- a/src/phases/select-modifier-phase.ts +++ b/src/phases/select-modifier-phase.ts @@ -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"; import { CustomModifierSettings } from "#app/modifier/modifier-type"; diff --git a/src/phases/select-starter-phase.ts b/src/phases/select-starter-phase.ts index ad972a49225..cd3c112549c 100644 --- a/src/phases/select-starter-phase.ts +++ b/src/phases/select-starter-phase.ts @@ -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"; diff --git a/src/phases/select-target-phase.ts b/src/phases/select-target-phase.ts index fe72335e312..716d2737a6c 100644 --- a/src/phases/select-target-phase.ts +++ b/src/phases/select-target-phase.ts @@ -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"; diff --git a/src/phases/shiny-sparkle-phase.ts b/src/phases/shiny-sparkle-phase.ts index 4cd2b68f881..49c60a82dd5 100644 --- a/src/phases/shiny-sparkle-phase.ts +++ b/src/phases/shiny-sparkle-phase.ts @@ -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 { diff --git a/src/phases/show-ability-phase.ts b/src/phases/show-ability-phase.ts index ee0b98f7886..cf34e327b4f 100644 --- a/src/phases/show-ability-phase.ts +++ b/src/phases/show-ability-phase.ts @@ -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 { diff --git a/src/phases/show-party-exp-bar-phase.ts b/src/phases/show-party-exp-bar-phase.ts index 9920472e801..9e019b202a5 100644 --- a/src/phases/show-party-exp-bar-phase.ts +++ b/src/phases/show-party-exp-bar-phase.ts @@ -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"; diff --git a/src/phases/show-trainer-phase.ts b/src/phases/show-trainer-phase.ts index 8a869f582d8..26ccddd53fc 100644 --- a/src/phases/show-trainer-phase.ts +++ b/src/phases/show-trainer-phase.ts @@ -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 { diff --git a/src/phases/summon-missing-phase.ts b/src/phases/summon-missing-phase.ts index bb9607285ad..83ac8779dd8 100644 --- a/src/phases/summon-missing-phase.ts +++ b/src/phases/summon-missing-phase.ts @@ -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"; diff --git a/src/phases/summon-phase.ts b/src/phases/summon-phase.ts index 53f2ceb6ca3..3749add87aa 100644 --- a/src/phases/summon-phase.ts +++ b/src/phases/summon-phase.ts @@ -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"; diff --git a/src/phases/switch-biome-phase.ts b/src/phases/switch-biome-phase.ts index f20cd59b240..9cf5635a39f 100644 --- a/src/phases/switch-biome-phase.ts +++ b/src/phases/switch-biome-phase.ts @@ -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 { diff --git a/src/phases/switch-phase.ts b/src/phases/switch-phase.ts index 93b0943febf..b1a2e991ed8 100644 --- a/src/phases/switch-phase.ts +++ b/src/phases/switch-phase.ts @@ -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"; diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 8201f2879ed..2a5fd0cc3ac 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -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"; diff --git a/src/phases/test-message-phase.ts b/src/phases/test-message-phase.ts index 14fed24ef4b..464a5ed1f94 100644 --- a/src/phases/test-message-phase.ts +++ b/src/phases/test-message-phase.ts @@ -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 { diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 4c89b725c2d..52503501837 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -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"; diff --git a/src/phases/toggle-double-position-phase.ts b/src/phases/toggle-double-position-phase.ts index fe3d0482483..563af8575d7 100644 --- a/src/phases/toggle-double-position-phase.ts +++ b/src/phases/toggle-double-position-phase.ts @@ -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 { diff --git a/src/phases/trainer-message-test-phase.ts b/src/phases/trainer-message-test-phase.ts index 4ea451660c3..8075dd761e2 100644 --- a/src/phases/trainer-message-test-phase.ts +++ b/src/phases/trainer-message-test-phase.ts @@ -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"; diff --git a/src/phases/trainer-victory-phase.ts b/src/phases/trainer-victory-phase.ts index a38874c9acd..e925f0c47d4 100644 --- a/src/phases/trainer-victory-phase.ts +++ b/src/phases/trainer-victory-phase.ts @@ -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"; diff --git a/src/phases/turn-end-phase.ts b/src/phases/turn-end-phase.ts index c8bd3398bb5..724a5206d74 100644 --- a/src/phases/turn-end-phase.ts +++ b/src/phases/turn-end-phase.ts @@ -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"; diff --git a/src/phases/turn-init-phase.ts b/src/phases/turn-init-phase.ts index 23c7985ad2c..92547878f12 100644 --- a/src/phases/turn-init-phase.ts +++ b/src/phases/turn-init-phase.ts @@ -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"; diff --git a/src/phases/unavailable-phase.ts b/src/phases/unavailable-phase.ts index 4757af5e15d..59bfca7875e 100644 --- a/src/phases/unavailable-phase.ts +++ b/src/phases/unavailable-phase.ts @@ -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 { diff --git a/src/phases/unlock-phase.ts b/src/phases/unlock-phase.ts index 1662afaa758..65060309a6c 100644 --- a/src/phases/unlock-phase.ts +++ b/src/phases/unlock-phase.ts @@ -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 { diff --git a/src/phases/victory-phase.ts b/src/phases/victory-phase.ts index 4c0ce43eb76..c11dd80b3aa 100644 --- a/src/phases/victory-phase.ts +++ b/src/phases/victory-phase.ts @@ -1,28 +1,22 @@ -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 Overrides from "#app/overrides"; +import BattleScene from "#app/battle-scene"; +import { BattlerIndex, BattleType } from "#app/battle"; +import { modifierTypes } from "#app/modifier/modifier-type"; import { BattleEndPhase } from "./battle-end-phase"; import { NewBattlePhase } from "./new-battle-phase"; import { PokemonPhase } from "./pokemon-phase"; import { AddEnemyBuffModifierPhase } from "./add-enemy-buff-modifier-phase"; import { EggLapsePhase } from "./egg-lapse-phase"; -import { ExpPhase } from "./exp-phase"; import { GameOverPhase } from "./game-over-phase"; import { ModifierRewardPhase } from "./modifier-reward-phase"; import { SelectModifierPhase } from "./select-modifier-phase"; -import { ShowPartyExpBarPhase } from "./show-party-exp-bar-phase"; import { TrainerVictoryPhase } from "./trainer-victory-phase"; -import { PokemonIncrementingStatModifier } from "#app/modifier/modifier"; import { handleMysteryEncounterVictory } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; export class VictoryPhase extends PokemonPhase { /** If true, indicates that the phase is intended for EXP purposes only, and not to continue a battle to next phase */ isExpOnly: boolean; - constructor(scene: BattleScene, battlerIndex: BattlerIndex, isExpOnly: boolean = false) { + constructor(scene: BattleScene, battlerIndex: BattlerIndex | integer, isExpOnly: boolean = false) { super(scene, battlerIndex); this.isExpOnly = isExpOnly; @@ -33,94 +27,8 @@ export class VictoryPhase extends PokemonPhase { this.scene.gameData.gameStats.pokemonDefeated++; - const participantIds = this.scene.currentBattle.playerParticipantIds; - const party = this.scene.getParty(); - const expShareModifier = this.scene.findModifier(m => m instanceof ExpShareModifier) as ExpShareModifier; - const expBalanceModifier = this.scene.findModifier(m => m instanceof ExpBalanceModifier) as ExpBalanceModifier; - const multipleParticipantExpBonusModifier = this.scene.findModifier(m => m instanceof MultipleParticipantExpBonusModifier) as MultipleParticipantExpBonusModifier; - const nonFaintedPartyMembers = party.filter(p => p.hp); - const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < this.scene.getMaxExpLevel()); - const partyMemberExp: number[] = []; - - if (participantIds.size) { - let expValue = this.getPokemon().getExpValue(); - if (this.scene.currentBattle.battleType === BattleType.TRAINER) { - expValue = Math.floor(expValue * 1.5); - } else if (this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER && this.scene.currentBattle.mysteryEncounter) { - expValue = Math.floor(expValue * this.scene.currentBattle.mysteryEncounter.expMultiplier); - } - for (const partyMember of nonFaintedPartyMembers) { - const pId = partyMember.id; - const participated = participantIds.has(pId); - if (participated) { - partyMember.addFriendship(2); - const machoBraceModifier = partyMember.getHeldItems().find(m => m instanceof PokemonIncrementingStatModifier); - if (machoBraceModifier && machoBraceModifier.stackCount < machoBraceModifier.getMaxStackCount(this.scene)) { - machoBraceModifier.stackCount++; - this.scene.updateModifiers(true, true); - partyMember.updateInfo(); - } - } - if (!expPartyMembers.includes(partyMember)) { - continue; - } - if (!participated && !expShareModifier) { - partyMemberExp.push(0); - continue; - } - let expMultiplier = 0; - if (participated) { - expMultiplier += (1 / participantIds.size); - if (participantIds.size > 1 && multipleParticipantExpBonusModifier) { - expMultiplier += multipleParticipantExpBonusModifier.getStackCount() * 0.2; - } - } else if (expShareModifier) { - expMultiplier += (expShareModifier.getStackCount() * 0.2) / participantIds.size; - } - if (partyMember.pokerus) { - expMultiplier *= 1.5; - } - if (Overrides.XP_MULTIPLIER_OVERRIDE !== null) { - expMultiplier = Overrides.XP_MULTIPLIER_OVERRIDE; - } - const pokemonExp = new Utils.NumberHolder(expValue * expMultiplier); - this.scene.applyModifiers(PokemonExpBoosterModifier, true, partyMember, pokemonExp); - partyMemberExp.push(Math.floor(pokemonExp.value)); - } - - if (expBalanceModifier) { - let totalLevel = 0; - let totalExp = 0; - expPartyMembers.forEach((expPartyMember, epm) => { - totalExp += partyMemberExp[epm]; - totalLevel += expPartyMember.level; - }); - - const medianLevel = Math.floor(totalLevel / expPartyMembers.length); - - const recipientExpPartyMemberIndexes: number[] = []; - expPartyMembers.forEach((expPartyMember, epm) => { - if (expPartyMember.level <= medianLevel) { - recipientExpPartyMemberIndexes.push(epm); - } - }); - - const splitExp = Math.floor(totalExp / recipientExpPartyMemberIndexes.length); - - expPartyMembers.forEach((_partyMember, pm) => { - partyMemberExp[pm] = Phaser.Math.Linear(partyMemberExp[pm], recipientExpPartyMemberIndexes.indexOf(pm) > -1 ? splitExp : 0, 0.2 * expBalanceModifier.getStackCount()); - }); - } - - for (let pm = 0; pm < expPartyMembers.length; pm++) { - const exp = partyMemberExp[pm]; - - if (exp) { - const partyMemberIndex = party.indexOf(expPartyMembers[pm]); - this.scene.unshiftPhase(expPartyMembers[pm].isOnField() ? new ExpPhase(this.scene, partyMemberIndex, exp) : new ShowPartyExpBarPhase(this.scene, partyMemberIndex, exp)); - } - } - } + const expValue = this.getPokemon().getExpValue(); + this.scene.applyPartyExp(expValue, true); if (this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER) { handleMysteryEncounterVictory(this.scene, false, this.isExpOnly); diff --git a/src/phases/weather-effect-phase.ts b/src/phases/weather-effect-phase.ts index ccfc9abb64f..e85ef0326f6 100644 --- a/src/phases/weather-effect-phase.ts +++ b/src/phases/weather-effect-phase.ts @@ -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"; diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index bede8522627..9b3c6881e4e 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -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, diff --git a/src/system/arena-data.ts b/src/system/arena-data.ts index 886129edcf6..5b907805372 100644 --- a/src/system/arena-data.ts +++ b/src/system/arena-data.ts @@ -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; diff --git a/src/system/challenge-data.ts b/src/system/challenge-data.ts index 69df11dd395..394d63867be 100644 --- a/src/system/challenge-data.ts +++ b/src/system/challenge-data.ts @@ -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; diff --git a/src/system/egg-data.ts b/src/system/egg-data.ts index b4bd4368bd9..785ae364efe 100644 --- a/src/system/egg-data.ts +++ b/src/system/egg-data.ts @@ -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; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 8688fed7a6c..b21c8b0e2a3 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -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,25 +27,26 @@ 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 { MysteryEncounterData } from "../data/mystery-encounters/mystery-encounter-data"; +import { applySessionDataPatches, applySettingsDataPatches, applySystemDataPatches } from "./version-converter"; +import { MysteryEncounterSaveData } from "../data/mystery-encounters/mystery-encounter-save-data"; import MysteryEncounter from "../data/mystery-encounters/mystery-encounter"; export const defaultStarterSpecies: Species[] = [ @@ -95,7 +96,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; @@ -132,7 +133,7 @@ export interface SessionSaveData { timestamp: integer; challenges: ChallengeData[]; mysteryEncounter: MysteryEncounter; - mysteryEncounterData: MysteryEncounterData; + mysteryEncounterSaveData: MysteryEncounterSaveData; } interface Unlocks { @@ -460,17 +461,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; @@ -478,9 +476,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"]) { @@ -498,25 +494,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; } @@ -562,17 +553,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); @@ -751,6 +731,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)); @@ -861,13 +842,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]); @@ -978,7 +953,7 @@ export class GameData { timestamp: new Date().getTime(), challenges: scene.gameMode.challenges.map(c => new ChallengeData(c)), mysteryEncounter: scene.currentBattle.mysteryEncounter, - mysteryEncounterData: scene.mysteryEncounterData + mysteryEncounterSaveData: scene.mysteryEncounterSaveData } as SessionSaveData; } @@ -1069,7 +1044,7 @@ export class GameData { scene.score = sessionData.score; scene.updateScoreText(); - scene.mysteryEncounterData = sessionData?.mysteryEncounterData ? sessionData?.mysteryEncounterData : new MysteryEncounterData(null); + scene.mysteryEncounterSaveData = sessionData?.mysteryEncounterSaveData ?? new MysteryEncounterSaveData(null); scene.newArena(sessionData.arena.biome); @@ -1099,10 +1074,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); } @@ -1111,7 +1084,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); } @@ -1235,7 +1208,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]) { @@ -1267,7 +1240,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)); @@ -1294,12 +1267,16 @@ export class GameData { return new MysteryEncounter(v); } - if (k === "mysteryEncounterData") { - return new MysteryEncounterData(v); + if (k === "mysteryEncounterSaveData") { + return new MysteryEncounterSaveData(v); } return v; }) as SessionSaveData; + + applySessionDataPatches(sessionData); + + return sessionData; } saveAll(scene: BattleScene, skipVerification: boolean = false, sync: boolean = false, useCachedSession: boolean = false, useCachedSystem: boolean = false): Promise { @@ -1926,75 +1903,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); - } } diff --git a/src/system/modifier-data.ts b/src/system/modifier-data.ts index 0f3e28fe11c..1514f7e3fb3 100644 --- a/src/system/modifier-data.ts +++ b/src/system/modifier-data.ts @@ -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; diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 650b7d1950d..68b9b768be4 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -57,7 +57,7 @@ export default class PokemonData { public bossSegments?: integer; public summonData: PokemonSummonData; - public mysteryEncounterData: MysteryEncounterPokemonData; + public mysteryEncounterPokemonData: MysteryEncounterPokemonData; constructor(source: Pokemon | any, forHistory: boolean = false) { const sourcePokemon = source instanceof Pokemon ? source : null; @@ -103,7 +103,7 @@ export default class PokemonData { this.fusionLuck = source.fusionLuck !== undefined ? source.fusionLuck : (source.fusionShiny ? source.fusionVariant + 1 : 0); this.usedTMs = source.usedTMs ?? []; - this.mysteryEncounterData = source.mysteryEncounterData ?? new MysteryEncounterPokemonData(); + this.mysteryEncounterPokemonData = source.mysteryEncounterPokemonData ?? new MysteryEncounterPokemonData(); if (!forHistory) { this.boss = (source instanceof EnemyPokemon && !!source.bossSegments) || (!this.player && !!source.boss); diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 6b46b6fe96c..bc88c21e1e1 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -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 { diff --git a/src/system/version-converter.ts b/src/system/version-converter.ts new file mode 100644 index 00000000000..ed65fcd99b8 --- /dev/null +++ b/src/system/version-converter.ts @@ -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` + } +} diff --git a/src/system/voucher.ts b/src/system/voucher.ts index 2f94308d9c8..06edfe5c6a6 100644 --- a/src/system/voucher.ts +++ b/src/system/voucher.ts @@ -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, diff --git a/src/test/abilities/tera_shell.test.ts b/src/test/abilities/tera_shell.test.ts index f9cb2935619..6a6b7bb252b 100644 --- a/src/test/abilities/tera_shell.test.ts +++ b/src/test/abilities/tera_shell.test.ts @@ -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"; diff --git a/src/test/battle/damage_calculation.test.ts b/src/test/battle/damage_calculation.test.ts index 665000450be..9c7c9dc9d3e 100644 --- a/src/test/battle/damage_calculation.test.ts +++ b/src/test/battle/damage_calculation.test.ts @@ -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"; diff --git a/src/test/battle/inverse_battle.test.ts b/src/test/battle/inverse_battle.test.ts index be8b04155eb..2a561a09e5e 100644 --- a/src/test/battle/inverse_battle.test.ts +++ b/src/test/battle/inverse_battle.test.ts @@ -1,8 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import { allMoves } from "#app/data/move"; import { Type } from "#app/data/type"; -import { MoveEndPhase } from "#app/phases/move-end-phase"; -import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { Abilities } from "#enums/abilities"; import { ArenaTagType } from "#enums/arena-tag-type"; import { Challenges } from "#enums/challenges"; @@ -11,7 +8,8 @@ import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const TIMEOUT = 20 * 1000; @@ -39,43 +37,63 @@ describe("Inverse Battle", () => { .starterSpecies(Species.FEEBAS) .ability(Abilities.BALL_FETCH) .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH); + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY); }); - it("1. immune types are 2x effective - Thunderbolt against Ground Type", async () => { - game.override.enemySpecies(Species.SANDSHREW); + it("Immune types are 2x effective - Thunderbolt against Ground Type", async () => { + game.override + .moveset([Moves.THUNDERBOLT]) + .enemySpecies(Species.SANDSHREW); + await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.THUNDERBOLT])).toBe(2); + game.move.select(Moves.THUNDERBOLT); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); - it("2. 2x effective types are 0.5x effective - Thunderbolt against Flying Type", async () => { - game.override.enemySpecies(Species.PIDGEY); + it("2x effective types are 0.5x effective - Thunderbolt against Flying Type", async () => { + game.override + .moveset([Moves.THUNDERBOLT]) + .enemySpecies(Species.PIDGEY); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.THUNDERBOLT])).toBe(0.5); + game.move.select(Moves.THUNDERBOLT); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(0.5); }, TIMEOUT); - it("3. 0.5x effective types are 2x effective - Thunderbolt against Electric Type", async () => { - game.override.enemySpecies(Species.CHIKORITA); + it("0.5x effective types are 2x effective - Thunderbolt against Electric Type", async () => { + game.override + .moveset([Moves.THUNDERBOLT]) + .enemySpecies(Species.CHIKORITA); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.THUNDERBOLT])).toBe(2); + game.move.select(Moves.THUNDERBOLT); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); - it("4. Stealth Rock follows the inverse matchups - Stealth Rock against Charizard deals 1/32 of max HP", async () => { + it("Stealth Rock follows the inverse matchups - Stealth Rock against Charizard deals 1/32 of max HP", async () => { game.scene.arena.addTag(ArenaTagType.STEALTH_ROCK, 1, Moves.STEALTH_ROCK, 0); game.override .enemySpecies(Species.CHARIZARD) @@ -95,18 +113,24 @@ describe("Inverse Battle", () => { expect(currentHp).toBeGreaterThan(maxHp * 31 / 32 - 1); }, TIMEOUT); - it("5. Freeze Dry is 2x effective against Water Type like other Ice type Move - Freeze Dry against Squirtle", async () => { - game.override.enemySpecies(Species.SQUIRTLE); + it("Freeze Dry is 2x effective against Water Type like other Ice type Move - Freeze Dry against Squirtle", async () => { + game.override + .moveset([Moves.FREEZE_DRY]) + .enemySpecies(Species.SQUIRTLE); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.FREEZE_DRY])).toBe(2); + game.move.select(Moves.FREEZE_DRY); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); - it("6. Water Absorb should heal against water moves - Water Absorb against Water gun", async () => { + it("Water Absorb should heal against water moves - Water Absorb against Water gun", async () => { game.override .moveset([Moves.WATER_GUN]) .enemyAbility(Abilities.WATER_ABSORB); @@ -117,13 +141,12 @@ describe("Inverse Battle", () => { enemy.hp = enemy.getMaxHp() - 1; game.move.select(Moves.WATER_GUN); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); - - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); expect(enemy.hp).toBe(enemy.getMaxHp()); }, TIMEOUT); - it("7. Fire type does not get burned - Will-O-Wisp against Charmander", async () => { + it("Fire type does not get burned - Will-O-Wisp against Charmander", async () => { game.override .moveset([Moves.WILL_O_WISP]) .enemySpecies(Species.CHARMANDER); @@ -135,13 +158,12 @@ describe("Inverse Battle", () => { game.move.select(Moves.WILL_O_WISP); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.move.forceHit(); - - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); expect(enemy.status?.effect).not.toBe(StatusEffect.BURN); }, TIMEOUT); - it("8. Electric type does not get paralyzed - Nuzzle against Pikachu", async () => { + it("Electric type does not get paralyzed - Nuzzle against Pikachu", async () => { game.override .moveset([Moves.NUZZLE]) .enemySpecies(Species.PIKACHU) @@ -153,14 +175,30 @@ describe("Inverse Battle", () => { game.move.select(Moves.NUZZLE); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); - - await game.phaseInterceptor.to(MoveEndPhase); + await game.phaseInterceptor.to("MoveEndPhase"); expect(enemy.status?.effect).not.toBe(StatusEffect.PARALYSIS); }, TIMEOUT); + it("Ground type is not immune to Thunder Wave - Thunder Wave against Sandshrew", async () => { + game.override + .moveset([Moves.THUNDER_WAVE]) + .enemySpecies(Species.SANDSHREW); - it("10. Anticipation should trigger on 2x effective moves - Anticipation against Thunderbolt", async () => { + await game.challengeMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + + game.move.select(Moves.THUNDER_WAVE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.move.forceHit(); + await game.phaseInterceptor.to("MoveEndPhase"); + + expect(enemy.status?.effect).toBe(StatusEffect.PARALYSIS); + }, TIMEOUT); + + + it("Anticipation should trigger on 2x effective moves - Anticipation against Thunderbolt", async () => { game.override .moveset([Moves.THUNDERBOLT]) .enemySpecies(Species.SANDSHREW) @@ -171,7 +209,7 @@ describe("Inverse Battle", () => { expect(game.scene.getEnemyPokemon()?.summonData.abilitiesApplied[0]).toBe(Abilities.ANTICIPATION); }, TIMEOUT); - it("11. Conversion 2 should change the type to the resistive type - Conversion 2 against Dragonite", async () => { + it("Conversion 2 should change the type to the resistive type - Conversion 2 against Dragonite", async () => { game.override .moveset([Moves.CONVERSION_2]) .enemyMoveset([Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW]); @@ -183,21 +221,64 @@ describe("Inverse Battle", () => { game.move.select(Moves.CONVERSION_2); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); - await game.phaseInterceptor.to(TurnEndPhase); + await game.phaseInterceptor.to("TurnEndPhase"); expect(player.getTypes()[0]).toBe(Type.DRAGON); }, TIMEOUT); - it("12. Flying Press should be 0.25x effective against Grass + Dark Type - Flying Press against Meowscarada", async () => { + it("Flying Press should be 0.25x effective against Grass + Dark Type - Flying Press against Meowscarada", async () => { game.override .moveset([Moves.FLYING_PRESS]) .enemySpecies(Species.MEOWSCARADA); await game.challengeMode.startBattle(); - const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); - expect(enemy.getMoveEffectiveness(player, allMoves[Moves.FLYING_PRESS])).toBe(0.25); + game.move.select(Moves.FLYING_PRESS); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(0.25); + }, TIMEOUT); + + it("Scrappy ability has no effect - Tackle against Ghost Type still 2x effective with Scrappy", async () => { + game.override + .moveset([Moves.TACKLE]) + .ability(Abilities.SCRAPPY) + .enemySpecies(Species.GASTLY); + + await game.challengeMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TACKLE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); + }, TIMEOUT); + + it("FORESIGHT has no effect - Tackle against Ghost Type still 2x effective with Foresight", async () => { + game.override + .moveset([Moves.FORESIGHT, Moves.TACKLE]) + .enemySpecies(Species.GASTLY); + + await game.challengeMode.startBattle(); + + const enemy = game.scene.getEnemyPokemon()!; + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.FORESIGHT); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.phaseInterceptor.to("TurnEndPhase"); + + game.move.select(Moves.TACKLE); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + await game.phaseInterceptor.to("MoveEffectPhase"); + + expect(enemy.getMoveEffectiveness).toHaveLastReturnedWith(2); }, TIMEOUT); }); diff --git a/src/test/field/pokemon.test.ts b/src/test/field/pokemon.test.ts index d597cd5219c..f7c1cf8bc3d 100644 --- a/src/test/field/pokemon.test.ts +++ b/src/test/field/pokemon.test.ts @@ -1,6 +1,8 @@ import { Species } from "#app/enums/species"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import GameManager from "../utils/gameManager"; +import { PokeballType } from "#app/enums/pokeball"; +import BattleScene from "#app/battle-scene"; describe("Spec - Pokemon", () => { let phaserGame: Phaser.Game; @@ -28,4 +30,37 @@ describe("Spec - Pokemon", () => { expect(pkm.trySetStatus(undefined)).toBe(true); }); + + describe("Add To Party", () => { + let scene: BattleScene; + + beforeEach(async () => { + game.override.enemySpecies(Species.ZUBAT); + await game.classicMode.runToSummon([Species.ABRA, Species.ABRA, Species.ABRA, Species.ABRA, Species.ABRA]); // 5 Abra, only 1 slot left + scene = game.scene; + }); + + it("should append a new pokemon by default", async () => { + const zubat = scene.getEnemyPokemon()!; + zubat.addToParty(PokeballType.LUXURY_BALL); + + const party = scene.getParty(); + expect(party).toHaveLength(6); + party.forEach((pkm, index) =>{ + expect(pkm.species.speciesId).toBe(index === 5 ? Species.ZUBAT : Species.ABRA); + }); + }); + + it("should put a new pokemon into the passed slotIndex", async () => { + const slotIndex = 1; + const zubat = scene.getEnemyPokemon()!; + zubat.addToParty(PokeballType.LUXURY_BALL, slotIndex); + + const party = scene.getParty(); + expect(party).toHaveLength(6); + party.forEach((pkm, index) =>{ + expect(pkm.species.speciesId).toBe(index === slotIndex ? Species.ZUBAT : Species.ABRA); + }); + }); + }); }); diff --git a/src/test/moves/effectiveness.test.ts b/src/test/moves/effectiveness.test.ts index af44586b69d..d1903c79844 100644 --- a/src/test/moves/effectiveness.test.ts +++ b/src/test/moves/effectiveness.test.ts @@ -1,23 +1,32 @@ import { allMoves } from "#app/data/move"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import { TrainerSlot } from "#app/data/trainer-config"; +import { Type } from "#app/data/type"; import { Abilities } from "#app/enums/abilities"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import * as Messages from "#app/messages"; +import { TerastallizeModifier } from "#app/modifier/modifier"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; function testMoveEffectiveness(game: GameManager, move: Moves, targetSpecies: Species, - expected: number, targetAbility: Abilities = Abilities.BALL_FETCH): void { + expected: number, targetAbility: Abilities = Abilities.BALL_FETCH, teraType?: Type): void { // Suppress getPokemonNameWithAffix because it calls on a null battle spec vi.spyOn(Messages, "getPokemonNameWithAffix").mockReturnValue(""); game.override.enemyAbility(targetAbility); + + if (teraType !== undefined) { + game.override.enemyHeldItems([{ name:"TERA_SHARD", type: teraType }]); + } + const user = game.scene.addPlayerPokemon(getPokemonSpecies(Species.SNORLAX), 5); const target = game.scene.addEnemyPokemon(getPokemonSpecies(targetSpecies), 5, TrainerSlot.NONE); expect(target.getMoveEffectiveness(user, allMoves[move])).toBe(expected); + user.destroy(); + target.destroy(); } describe("Moves - Type Effectiveness", () => { @@ -29,6 +38,8 @@ describe("Moves - Type Effectiveness", () => { type: Phaser.HEADLESS, }); game = new GameManager(phaserGame); + TerastallizeModifier.prototype.apply = (args) => true; + game.override.ability(Abilities.BALL_FETCH); }); @@ -67,4 +78,30 @@ describe("Moves - Type Effectiveness", () => { it("Electric-type attacks are negated by Volt Absorb", () => testMoveEffectiveness(game, Moves.THUNDERBOLT, Species.GYARADOS, 0, Abilities.VOLT_ABSORB) ); + + it("Electric-type attacks are super-effective against Tera-Water Pokemon", + () => testMoveEffectiveness(game, Moves.THUNDERBOLT, Species.EXCADRILL, 2, Abilities.BALL_FETCH, Type.WATER) + ); + + it("Powder moves have no effect on Grass-type Pokemon", + () => testMoveEffectiveness(game, Moves.SLEEP_POWDER, Species.AMOONGUSS, 0) + ); + + it("Powder moves have no effect on Tera-Grass Pokemon", + () => testMoveEffectiveness(game, Moves.SLEEP_POWDER, Species.SNORLAX, 0, Abilities.BALL_FETCH, Type.GRASS) + ); + + it("Prankster-boosted status moves have no effect on Dark-type Pokemon", + () => { + game.override.ability(Abilities.PRANKSTER); + testMoveEffectiveness(game, Moves.BABY_DOLL_EYES, Species.MIGHTYENA, 0); + } + ); + + it("Prankster-boosted status moves have no effect on Tera-Dark Pokemon", + () => { + game.override.ability(Abilities.PRANKSTER); + testMoveEffectiveness(game, Moves.BABY_DOLL_EYES, Species.SNORLAX, 0, Abilities.BALL_FETCH, Type.DARK); + } + ); }); diff --git a/src/test/moves/gigaton_hammer.test.ts b/src/test/moves/gigaton_hammer.test.ts index 9379e9d98b2..0162375cdb2 100644 --- a/src/test/moves/gigaton_hammer.test.ts +++ b/src/test/moves/gigaton_hammer.test.ts @@ -1,4 +1,4 @@ -import { BattlerIndex } from "#app/battle.js"; +import { BattlerIndex } from "#app/battle"; import GameManager from "#app/test/utils/gameManager"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/lunar_blessing.test.ts b/src/test/moves/lunar_blessing.test.ts index 73647716f06..92428c39029 100644 --- a/src/test/moves/lunar_blessing.test.ts +++ b/src/test/moves/lunar_blessing.test.ts @@ -1,5 +1,5 @@ -import { StatusEffect } from "#app/enums/status-effect.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import { StatusEffect } from "#app/enums/status-effect"; +import { CommandPhase } from "#app/phases/command-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; diff --git a/src/test/moves/tar_shot.test.ts b/src/test/moves/tar_shot.test.ts new file mode 100644 index 00000000000..15667122a37 --- /dev/null +++ b/src/test/moves/tar_shot.test.ts @@ -0,0 +1,133 @@ +import { BattlerIndex } from "#app/battle"; +import { Type } from "#app/data/type"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; +import { Stat } from "#app/enums/stat"; +import { Abilities } from "#enums/abilities"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; + +describe("Moves - Tar Shot", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + const TIMEOUT = 20 * 1000; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + game.override + .battleType("single") + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(SPLASH_ONLY) + .enemySpecies(Species.TANGELA) + .enemyLevel(1000) + .moveset([Moves.TAR_SHOT, Moves.FIRE_PUNCH]) + .disableCrits(); + }); + + it("lowers the target's Speed stat by one stage and doubles the effectiveness of Fire-type moves used on the target", async () => { + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(4); + }, TIMEOUT); + + it("will not double the effectiveness of Fire-type moves used on a target that is already under the effect of Tar Shot (but may still lower its Speed)", async () => { + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-2); + + await game.toNextTurn(); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(4); + }, TIMEOUT); + + it("does not double the effectiveness of Fire-type moves against a Pokémon that is Terastallized", async () => { + game.override.enemyHeldItems([{ name: "TERA_SHARD", type: Type.GRASS }]).enemySpecies(Species.SPRIGATITO); + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(2); + }, TIMEOUT); + + it("doubles the effectiveness of Fire-type moves against a Pokémon that is already under the effects of Tar Shot before it Terastallized", async () => { + game.override.enemySpecies(Species.SPRIGATITO); + await game.classicMode.startBattle([Species.PIKACHU]); + + const enemy = game.scene.getEnemyPokemon()!; + + vi.spyOn(enemy, "getMoveEffectiveness"); + + game.move.select(Moves.TAR_SHOT); + + await game.phaseInterceptor.to("TurnEndPhase"); + expect(enemy.getStatStage(Stat.SPD)).toBe(-1); + + await game.toNextTurn(); + + game.override.enemyHeldItems([{ name: "TERA_SHARD", type: Type.GRASS }]); + + game.move.select(Moves.FIRE_PUNCH); + await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(enemy.getMoveEffectiveness).toHaveReturnedWith(4); + }, TIMEOUT); +}); diff --git a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts index 85b50f9758c..383e3bd3564 100644 --- a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts @@ -126,11 +126,11 @@ describe("Clowning Around - Mystery Encounter", () => { }); expect(config.pokemonConfigs?.[1]).toEqual({ species: getPokemonSpecies(Species.BLACEPHALON), - mysteryEncounterData: expect.anything(), + mysteryEncounterPokemonData: expect.anything(), isBoss: true, moveSet: [Moves.TRICK, Moves.HYPNOSIS, Moves.SHADOW_BALL, Moves.MIND_BLOWN] }); - expect(config.pokemonConfigs?.[1].mysteryEncounterData?.types.length).toBe(2); + expect(config.pokemonConfigs?.[1].mysteryEncounterPokemonData?.types.length).toBe(2); expect([ Abilities.STURDY, Abilities.PICKUP, @@ -147,8 +147,8 @@ describe("Clowning Around - Mystery Encounter", () => { Abilities.MAGICIAN, Abilities.SHEER_FORCE, Abilities.PRANKSTER - ]).toContain(config.pokemonConfigs?.[1].mysteryEncounterData?.ability); - expect(ClowningAroundEncounter.misc.ability).toBe(config.pokemonConfigs?.[1].mysteryEncounterData?.ability); + ]).toContain(config.pokemonConfigs?.[1].mysteryEncounterPokemonData?.ability); + expect(ClowningAroundEncounter.misc.ability).toBe(config.pokemonConfigs?.[1].mysteryEncounterPokemonData?.ability); await vi.waitFor(() => expect(moveInitSpy).toHaveBeenCalled()); await vi.waitFor(() => expect(moveLoadSpy).toHaveBeenCalled()); expect(onInitResult).toBe(true); @@ -227,7 +227,7 @@ describe("Clowning Around - Mystery Encounter", () => { await game.phaseInterceptor.to(NewBattlePhase, false); const leadPokemon = scene.getParty()[0]; - expect(leadPokemon.mysteryEncounterData?.ability).toBe(abilityToTrain); + expect(leadPokemon.mysteryEncounterPokemonData?.ability).toBe(abilityToTrain); }); }); @@ -348,9 +348,9 @@ describe("Clowning Around - Mystery Encounter", () => { scene.getParty()[2].moveset = []; await runMysteryEncounterToEnd(game, 3); - const leadTypesAfter = scene.getParty()[0].mysteryEncounterData?.types; - const secondaryTypesAfter = scene.getParty()[1].mysteryEncounterData?.types; - const thirdTypesAfter = scene.getParty()[2].mysteryEncounterData?.types; + const leadTypesAfter = scene.getParty()[0].mysteryEncounterPokemonData?.types; + const secondaryTypesAfter = scene.getParty()[1].mysteryEncounterPokemonData?.types; + const thirdTypesAfter = scene.getParty()[2].mysteryEncounterPokemonData?.types; expect(leadTypesAfter.length).toBe(2); expect(leadTypesAfter[0]).toBe(Type.WATER); diff --git a/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts b/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts new file mode 100644 index 00000000000..2f13105047d --- /dev/null +++ b/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts @@ -0,0 +1,234 @@ +import { Biome } from "#app/enums/biome"; +import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { Species } from "#app/enums/species"; +import GameManager from "#app/test/utils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils"; +import BattleScene from "#app/battle-scene"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import { FieldTripEncounter } from "#app/data/mystery-encounters/encounters/field-trip-encounter"; +import { Moves } from "#enums/moves"; +import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { Mode } from "#app/ui/ui"; +import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; + +const namespace = "mysteryEncounter:fieldTrip"; +const defaultParty = [Species.LAPRAS, Species.GENGAR, Species.ABRA]; +const defaultBiome = Biome.CAVE; +const defaultWave = 45; + +describe("Field Trip - Mystery Encounter", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + let scene: BattleScene; + + beforeAll(() => { + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS }); + }); + + beforeEach(async () => { + game = new GameManager(phaserGame); + scene = game.scene; + game.override.mysteryEncounterChance(100); + game.override.startingWave(defaultWave); + game.override.startingBiome(defaultBiome); + game.override.disableTrainerWaves(); + game.override.moveset([Moves.TACKLE, Moves.UPROAR, Moves.SWORDS_DANCE]); + + vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue( + new Map([ + [Biome.CAVE, [MysteryEncounterType.FIELD_TRIP]], + ]) + ); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + vi.clearAllMocks(); + vi.resetAllMocks(); + }); + + it("should have the correct properties", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + + expect(FieldTripEncounter.encounterType).toBe(MysteryEncounterType.FIELD_TRIP); + expect(FieldTripEncounter.encounterTier).toBe(MysteryEncounterTier.COMMON); + expect(FieldTripEncounter.dialogue).toBeDefined(); + expect(FieldTripEncounter.dialogue.intro).toStrictEqual([ + { + text: `${namespace}.intro` + }, + { + speaker: `${namespace}.speaker`, + text: `${namespace}.intro_dialogue` + } + ]); + expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}.title`); + expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.description).toBe(`${namespace}.description`); + expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.query).toBe(`${namespace}.query`); + expect(FieldTripEncounter.options.length).toBe(3); + }); + + it("should not run below wave 10", async () => { + game.override.startingWave(9); + + await game.runToMysteryEncounter(); + + expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FIELD_TRIP); + }); + + it("should not run above wave 179", async () => { + game.override.startingWave(181); + + await game.runToMysteryEncounter(); + + expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); + }); + + describe("Option 1 - Show off a physical move", () => { + it("should have the correct properties", () => { + const option = FieldTripEncounter.options[0]; + expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT); + expect(option.dialogue).toBeDefined(); + expect(option.dialogue).toStrictEqual({ + buttonLabel: `${namespace}.option.1.label`, + buttonTooltip: `${namespace}.option.1.tooltip`, + secondOptionPrompt: `${namespace}.second_option_prompt`, + }); + }); + + it("Should give no reward on incorrect option", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 1, { pokemonNo: 1, optionNo: 2 }); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + await game.phaseInterceptor.run(SelectModifierPhase); + + expect(scene.ui.getMode()).to.equal(Mode.MODIFIER_SELECT); + const modifierSelectHandler = scene.ui.handlers.find(h => h instanceof ModifierSelectUiHandler) as ModifierSelectUiHandler; + expect(modifierSelectHandler.options.length).toEqual(0); + }); + + it("Should give proper rewards on correct Physical move option", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 1, { pokemonNo: 1, optionNo: 1 }); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + await game.phaseInterceptor.run(SelectModifierPhase); + + expect(scene.ui.getMode()).to.equal(Mode.MODIFIER_SELECT); + const modifierSelectHandler = scene.ui.handlers.find(h => h instanceof ModifierSelectUiHandler) as ModifierSelectUiHandler; + expect(modifierSelectHandler.options.length).toEqual(4); + expect(modifierSelectHandler.options[0].modifierTypeOption.type.name).toBe("X Attack"); + expect(modifierSelectHandler.options[1].modifierTypeOption.type.name).toBe("X Defense"); + expect(modifierSelectHandler.options[2].modifierTypeOption.type.name).toBe("X Speed"); + expect(modifierSelectHandler.options[3].modifierTypeOption.type.name).toBe("Dire Hit"); + }); + + it("should leave encounter without battle", async () => { + const leaveEncounterWithoutBattleSpy = vi.spyOn(EncounterPhaseUtils, "leaveEncounterWithoutBattle"); + + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 1, { pokemonNo: 1, optionNo: 1 }); + + expect(leaveEncounterWithoutBattleSpy).toBeCalled(); + }); + }); + + describe("Option 2 - Give Food", () => { + it("should have the correct properties", () => { + const option = FieldTripEncounter.options[1]; + expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT); + expect(option.dialogue).toBeDefined(); + expect(option.dialogue).toStrictEqual({ + buttonLabel: `${namespace}.option.2.label`, + buttonTooltip: `${namespace}.option.2.tooltip`, + secondOptionPrompt: `${namespace}.second_option_prompt`, + }); + }); + + it("Should give no reward on incorrect option", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 1 }); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + await game.phaseInterceptor.run(SelectModifierPhase); + + expect(scene.ui.getMode()).to.equal(Mode.MODIFIER_SELECT); + const modifierSelectHandler = scene.ui.handlers.find(h => h instanceof ModifierSelectUiHandler) as ModifierSelectUiHandler; + expect(modifierSelectHandler.options.length).toEqual(0); + }); + + it("Should give proper rewards on correct Special move option", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 2 }); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + await game.phaseInterceptor.run(SelectModifierPhase); + + expect(scene.ui.getMode()).to.equal(Mode.MODIFIER_SELECT); + const modifierSelectHandler = scene.ui.handlers.find(h => h instanceof ModifierSelectUiHandler) as ModifierSelectUiHandler; + expect(modifierSelectHandler.options.length).toEqual(4); + expect(modifierSelectHandler.options[0].modifierTypeOption.type.name).toBe("X Sp. Atk"); + expect(modifierSelectHandler.options[1].modifierTypeOption.type.name).toBe("X Sp. Def"); + expect(modifierSelectHandler.options[2].modifierTypeOption.type.name).toBe("X Speed"); + expect(modifierSelectHandler.options[3].modifierTypeOption.type.name).toBe("Dire Hit"); + }); + + it("should leave encounter without battle", async () => { + const leaveEncounterWithoutBattleSpy = vi.spyOn(EncounterPhaseUtils, "leaveEncounterWithoutBattle"); + + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 2 }); + + expect(leaveEncounterWithoutBattleSpy).toBeCalled(); + }); + }); + + describe("Option 3 - Give Item", () => { + it("should have the correct properties", () => { + const option = FieldTripEncounter.options[2]; + expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT); + expect(option.dialogue).toBeDefined(); + expect(option.dialogue).toStrictEqual({ + buttonLabel: `${namespace}.option.3.label`, + buttonTooltip: `${namespace}.option.3.tooltip`, + secondOptionPrompt: `${namespace}.second_option_prompt`, + }); + }); + + it("Should give no reward on incorrect option", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 1 }); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + await game.phaseInterceptor.run(SelectModifierPhase); + + expect(scene.ui.getMode()).to.equal(Mode.MODIFIER_SELECT); + const modifierSelectHandler = scene.ui.handlers.find(h => h instanceof ModifierSelectUiHandler) as ModifierSelectUiHandler; + expect(modifierSelectHandler.options.length).toEqual(0); + }); + + it("Should give proper rewards on correct Special move option", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 3, { pokemonNo: 1, optionNo: 3 }); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + await game.phaseInterceptor.run(SelectModifierPhase); + + expect(scene.ui.getMode()).to.equal(Mode.MODIFIER_SELECT); + const modifierSelectHandler = scene.ui.handlers.find(h => h instanceof ModifierSelectUiHandler) as ModifierSelectUiHandler; + expect(modifierSelectHandler.options.length).toEqual(4); + expect(modifierSelectHandler.options[0].modifierTypeOption.type.name).toBe("X Accuracy"); + expect(modifierSelectHandler.options[1].modifierTypeOption.type.name).toBe("X Speed"); + expect(modifierSelectHandler.options[2].modifierTypeOption.type.name).toBe("5x Great Ball"); + expect(modifierSelectHandler.options[3].modifierTypeOption.type.name).toBe("IV Scanner"); + }); + + it("should leave encounter without battle", async () => { + const leaveEncounterWithoutBattleSpy = vi.spyOn(EncounterPhaseUtils, "leaveEncounterWithoutBattle"); + + await game.runToMysteryEncounter(MysteryEncounterType.FIELD_TRIP, defaultParty); + await runMysteryEncounterToEnd(game, 2, { pokemonNo: 1, optionNo: 3 }); + + expect(leaveEncounterWithoutBattleSpy).toBeCalled(); + }); + }); +}); diff --git a/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts b/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts index edaf80f86c7..cd3902fd6b1 100644 --- a/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts @@ -121,7 +121,7 @@ describe("The Strong Stuff - Mystery Encounter", () => { species: getPokemonSpecies(Species.SHUCKLE), isBoss: true, bossSegments: 5, - mysteryEncounterData: new MysteryEncounterPokemonData(1.25), + mysteryEncounterPokemonData: new MysteryEncounterPokemonData(1.25), nature: Nature.BOLD, moveSet: [Moves.INFESTATION, Moves.SALT_CURE, Moves.GASTRO_ACID, Moves.HEAL_ORDER], modifierConfigs: expect.any(Array), @@ -208,8 +208,9 @@ describe("The Strong Stuff - Mystery Encounter", () => { expect(enemyField[0].species.speciesId).toBe(Species.SHUCKLE); expect(enemyField[0].summonData.statStages).toEqual([0, 2, 0, 2, 0, 0, 0]); const shuckleItems = enemyField[0].getHeldItems(); - expect(shuckleItems.length).toBe(4); + expect(shuckleItems.length).toBe(5); expect(shuckleItems.find(m => m instanceof BerryModifier && m.berryType === BerryType.SITRUS)?.stackCount).toBe(1); + expect(shuckleItems.find(m => m instanceof BerryModifier && m.berryType === BerryType.ENIGMA)?.stackCount).toBe(1); expect(shuckleItems.find(m => m instanceof BerryModifier && m.berryType === BerryType.GANLON)?.stackCount).toBe(1); expect(shuckleItems.find(m => m instanceof BerryModifier && m.berryType === BerryType.APICOT)?.stackCount).toBe(1); expect(shuckleItems.find(m => m instanceof BerryModifier && m.berryType === BerryType.LUM)?.stackCount).toBe(2); diff --git a/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts b/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts index 635dac0eaee..ef014c6949b 100644 --- a/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts @@ -138,7 +138,7 @@ describe("Weird Dream - Mystery Encounter", () => { for (let i = 0; i < pokemonAfter.length; i++) { const newPokemon = pokemonAfter[i]; expect(newPokemon.getSpeciesForm().speciesId).not.toBe(pokemonPrior[i].getSpeciesForm().speciesId); - expect(newPokemon.mysteryEncounterData?.types.length).toBe(2); + expect(newPokemon.mysteryEncounterPokemonData?.types.length).toBe(2); } const plus90To110 = bstDiff.filter(bst => bst > 80); diff --git a/src/test/phases/mystery-encounter-phase.test.ts b/src/test/phases/mystery-encounter-phase.test.ts index 32a675b526a..0a99cd00db3 100644 --- a/src/test/phases/mystery-encounter-phase.test.ts +++ b/src/test/phases/mystery-encounter-phase.test.ts @@ -49,9 +49,9 @@ describe("Mystery Encounter Phases", () => { }); await game.phaseInterceptor.run(MysteryEncounterPhase); - expect(game.scene.mysteryEncounterData.encounteredEvents.length).toBeGreaterThan(0); - expect(game.scene.mysteryEncounterData.encounteredEvents[0].type).toEqual(MysteryEncounterType.MYSTERIOUS_CHALLENGERS); - expect(game.scene.mysteryEncounterData.encounteredEvents[0].tier).toEqual(MysteryEncounterTier.GREAT); + expect(game.scene.mysteryEncounterSaveData.encounteredEvents.length).toBeGreaterThan(0); + expect(game.scene.mysteryEncounterSaveData.encounteredEvents[0].type).toEqual(MysteryEncounterType.MYSTERIOUS_CHALLENGERS); + expect(game.scene.mysteryEncounterSaveData.encounteredEvents[0].tier).toEqual(MysteryEncounterTier.GREAT); expect(game.scene.ui.getMode()).toBe(Mode.MYSTERY_ENCOUNTER); }); diff --git a/src/test/utils/helpers/overridesHelper.ts b/src/test/utils/helpers/overridesHelper.ts index 9a8befaf62c..df9bf7b212a 100644 --- a/src/test/utils/helpers/overridesHelper.ts +++ b/src/test/utils/helpers/overridesHelper.ts @@ -1,12 +1,12 @@ -import { StatusEffect } from "#app/data/status-effect.js"; +import { StatusEffect } from "#app/data/status-effect"; import { Weather, WeatherType } from "#app/data/weather"; -import { Abilities } from "#app/enums/abilities.js"; +import { Abilities } from "#app/enums/abilities"; import { Biome } from "#app/enums/biome"; -import { Moves } from "#app/enums/moves.js"; -import { Species } from "#app/enums/species.js"; +import { Moves } from "#app/enums/moves"; +import { Species } from "#app/enums/species"; import * as GameMode from "#app/game-mode"; import { GameModes, getGameMode } from "#app/game-mode"; -import { ModifierOverride } from "#app/modifier/modifier-type.js"; +import { ModifierOverride } from "#app/modifier/modifier-type"; import Overrides from "#app/overrides"; import { MockInstance, vi } from "vitest"; import { GameManagerHelper } from "./gameManagerHelper"; diff --git a/src/test/utils/phaseInterceptor.ts b/src/test/utils/phaseInterceptor.ts index 1274a238fe3..eee872cb6da 100644 --- a/src/test/utils/phaseInterceptor.ts +++ b/src/test/utils/phaseInterceptor.ts @@ -51,6 +51,7 @@ import { } from "#app/phases/mystery-encounter-phases"; import { LearnMovePhase } from "#app/phases/learn-move-phase"; import { ModifierRewardPhase } from "#app/phases/modifier-reward-phase"; +import { PartyExpPhase } from "#app/phases/party-exp-phase"; export interface PromptHandler { phaseTarget?; @@ -125,7 +126,8 @@ export default class PhaseInterceptor { [MysteryEncounterRewardsPhase, this.startPhase], [PostMysteryEncounterPhase, this.startPhase], [LearnMovePhase, this.startPhase], - [ModifierRewardPhase, this.startPhase] + [ModifierRewardPhase, this.startPhase], + [PartyExpPhase, this.startPhase] ]; private endBySetMode = [ diff --git a/src/test/utils/testUtils.ts b/src/test/utils/testUtils.ts index 378c3d23fde..2265cf8d79c 100644 --- a/src/test/utils/testUtils.ts +++ b/src/test/utils/testUtils.ts @@ -1,4 +1,4 @@ -import { Moves } from "#app/enums/moves.js"; +import { Moves } from "#app/enums/moves"; import i18next, { type ParseKeys } from "i18next"; import { vi } from "vitest"; diff --git a/src/ui/ability-bar.ts b/src/ui/ability-bar.ts index b8259af9f3d..a924d545852 100644 --- a/src/ui/ability-bar.ts +++ b/src/ui/ability-bar.ts @@ -1,4 +1,4 @@ -import { getPokemonNameWithAffix } from "#app/messages.js"; +import { getPokemonNameWithAffix } from "#app/messages"; import BattleScene from "../battle-scene"; import Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; diff --git a/src/ui/admin-ui-handler.ts b/src/ui/admin-ui-handler.ts index 5c91a36ab64..c48138853fc 100644 --- a/src/ui/admin-ui-handler.ts +++ b/src/ui/admin-ui-handler.ts @@ -1,9 +1,9 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { ModalConfig } from "./modal-ui-handler"; import { Mode } from "./ui"; import * as Utils from "../utils"; import { FormModalUiHandler } from "./form-modal-ui-handler"; -import { Button } from "#app/enums/buttons.js"; +import { Button } from "#app/enums/buttons"; export default class AdminUiHandler extends FormModalUiHandler { diff --git a/src/ui/arena-flyout.ts b/src/ui/arena-flyout.ts index 882c15d3d8c..42a2396e665 100644 --- a/src/ui/arena-flyout.ts +++ b/src/ui/arena-flyout.ts @@ -1,10 +1,10 @@ import { addTextObject, TextStyle } from "./text"; -import BattleScene from "#app/battle-scene.js"; -import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag.js"; -import { WeatherType } from "#app/data/weather.js"; -import { TerrainType } from "#app/data/terrain.js"; +import BattleScene from "#app/battle-scene"; +import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; +import { WeatherType } from "#app/data/weather"; +import { TerrainType } from "#app/data/terrain"; import { addWindow, WindowVariant } from "./ui-theme"; -import { ArenaEvent, ArenaEventType, TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena.js"; +import { ArenaEvent, ArenaEventType, TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "#app/events/arena"; import { BattleSceneEventType, TurnEndEvent } from "../events/battle-scene"; import { ArenaTagType } from "#enums/arena-tag-type"; import TimeOfDayWidget from "./time-of-day-widget"; diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index 04691886d9c..332fe5f65b9 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -6,7 +6,7 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import { addWindow } from "./ui-theme"; import {Button} from "#enums/buttons"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import { CommandPhase } from "#app/phases/command-phase"; export default class BallUiHandler extends UiHandler { private pokeballSelectContainer: Phaser.GameObjects.Container; diff --git a/src/ui/battle-flyout.ts b/src/ui/battle-flyout.ts index 6204fa2f928..fe561b76c9f 100644 --- a/src/ui/battle-flyout.ts +++ b/src/ui/battle-flyout.ts @@ -1,13 +1,13 @@ import { default as Pokemon } from "../field/pokemon"; import { addTextObject, TextStyle } from "./text"; import * as Utils from "../utils"; -import BattleScene from "#app/battle-scene.js"; -import Move from "#app/data/move.js"; +import BattleScene from "#app/battle-scene"; +import Move from "#app/data/move"; import { BattleSceneEventType, BerryUsedEvent, MoveUsedEvent } from "../events/battle-scene"; import { BerryType } from "#enums/berry-type"; import { Moves } from "#enums/moves"; import { UiTheme } from "#enums/ui-theme"; -import { getPokemonNameWithAffix } from "#app/messages.js"; +import { getPokemonNameWithAffix } from "#app/messages"; /** Container for info about a {@linkcode Move} */ interface MoveInfo { diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index 27ff923e9a3..764e71a8c3f 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -5,8 +5,8 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import i18next from "i18next"; import {Button} from "#enums/buttons"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { CommandPhase } from "#app/phases/command-phase"; export enum Command { FIGHT = 0, diff --git a/src/ui/dropdown.ts b/src/ui/dropdown.ts index 08d55b03cdb..4e1235c211d 100644 --- a/src/ui/dropdown.ts +++ b/src/ui/dropdown.ts @@ -1,5 +1,5 @@ -import BattleScene from "#app/battle-scene.js"; -import { SceneBase } from "#app/scene-base.js"; +import BattleScene from "#app/battle-scene"; +import { SceneBase } from "#app/scene-base"; import { addTextObject, TextStyle } from "./text"; import { addWindow, WindowVariant } from "./ui-theme"; import i18next from "i18next"; diff --git a/src/ui/egg-counter-container.ts b/src/ui/egg-counter-container.ts index a688b8b7efc..21cebf5d97e 100644 --- a/src/ui/egg-counter-container.ts +++ b/src/ui/egg-counter-container.ts @@ -1,7 +1,7 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { addWindow } from "./ui-theme"; import { addTextObject, TextStyle } from "./text"; -import { EggCountChangedEvent, EggEventType } from "#app/events/egg.js"; +import { EggCountChangedEvent, EggEventType } from "#app/events/egg"; import EggHatchSceneHandler from "./egg-hatch-scene-handler"; /** diff --git a/src/ui/egg-hatch-scene-handler.ts b/src/ui/egg-hatch-scene-handler.ts index 733873b974e..7b01ef7a3a6 100644 --- a/src/ui/egg-hatch-scene-handler.ts +++ b/src/ui/egg-hatch-scene-handler.ts @@ -2,7 +2,7 @@ import BattleScene from "../battle-scene"; import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import {Button} from "#enums/buttons"; -import { EggHatchPhase } from "#app/phases/egg-hatch-phase.js"; +import { EggHatchPhase } from "#app/phases/egg-hatch-phase"; export default class EggHatchSceneHandler extends UiHandler { public eggHatchContainer: Phaser.GameObjects.Container; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 421a23592e0..d275ceb1271 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -5,11 +5,11 @@ import { Command } from "./command-ui-handler"; import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import * as Utils from "../utils"; -import { MoveCategory } from "#app/data/move.js"; +import { MoveCategory } from "#app/data/move"; import i18next from "i18next"; import {Button} from "#enums/buttons"; -import Pokemon, { PokemonMove } from "#app/field/pokemon.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; +import Pokemon, { PokemonMove } from "#app/field/pokemon"; +import { CommandPhase } from "#app/phases/command-phase"; import { BattleType } from "#app/battle"; export default class FightUiHandler extends UiHandler { diff --git a/src/ui/filter-bar.ts b/src/ui/filter-bar.ts index 31d7c562da2..aa0f575d398 100644 --- a/src/ui/filter-bar.ts +++ b/src/ui/filter-bar.ts @@ -1,4 +1,4 @@ -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { DropDown, DropDownType } from "./dropdown"; import { StarterContainer } from "./starter-container"; import { addTextObject, getTextColor, TextStyle } from "./text"; diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 58461c3447b..ab8b353d6c7 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -15,15 +15,15 @@ import { addWindow } from "./ui-theme"; import { SpeciesFormChangeItemTrigger, FormChangeItem } from "../data/pokemon-forms"; import { getVariantTint } from "#app/data/variant"; import {Button} from "#enums/buttons"; -import { applyChallenges, ChallengeType } from "#app/data/challenge.js"; +import { applyChallenges, ChallengeType } from "#app/data/challenge"; import MoveInfoOverlay from "./move-info-overlay"; import i18next from "i18next"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import { getPokemonNameWithAffix } from "#app/messages.js"; -import { CommandPhase } from "#app/phases/command-phase.js"; -import { SelectModifierPhase } from "#app/phases/select-modifier-phase.js"; +import { getPokemonNameWithAffix } from "#app/messages"; +import { CommandPhase } from "#app/phases/command-phase"; +import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; const defaultMessage = i18next.t("partyUiHandler:choosePokemon"); diff --git a/src/ui/rename-form-ui-handler.ts b/src/ui/rename-form-ui-handler.ts index 33885509344..078177cafb1 100644 --- a/src/ui/rename-form-ui-handler.ts +++ b/src/ui/rename-form-ui-handler.ts @@ -1,7 +1,7 @@ import { FormModalUiHandler } from "./form-modal-ui-handler"; import { ModalConfig } from "./modal-ui-handler"; import i18next from "i18next"; -import { PlayerPokemon } from "#app/field/pokemon.js"; +import { PlayerPokemon } from "#app/field/pokemon"; export default class RenameFormUiHandler extends FormModalUiHandler { getModalTitle(config?: ModalConfig): string { diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 7a183a11d29..d6bafb8599e 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -18,8 +18,7 @@ import { Type, getTypeRgb } from "../data/type"; import { TypeColor, TypeShadow } from "#app/enums/color"; import { getNatureStatMultiplier, getNatureName } from "../data/nature"; import { getVariantTint } from "#app/data/variant"; -import { PokemonHeldItemModifier, TerastallizeModifier } from "../modifier/modifier"; -import {modifierSortFunc} from "../modifier/modifier"; +import * as Modifier from "../modifier/modifier"; import { Species } from "#enums/species"; import { PlayerGender } from "#enums/player-gender"; @@ -68,7 +67,7 @@ export default class RunInfoUiHandler extends UiHandler { override async setup() { this.runContainer = this.scene.add.container(1, -(this.scene.game.canvas.height / 6) + 1); // The import of the modifiersModule is loaded here to sidestep async/await issues. - this.modifiersModule = await import("../modifier/modifier"); + this.modifiersModule = Modifier; this.runContainer.setVisible(false); } @@ -303,7 +302,7 @@ export default class RunInfoUiHandler extends UiHandler { const teraPokemon = {}; this.runInfo.enemyModifiers.forEach((m) => { const modifier = m.toModifier(this.scene, this.modifiersModule[m.className]); - if (modifier instanceof TerastallizeModifier) { + if (modifier instanceof Modifier.TerastallizeModifier) { const teraDetails = modifier?.getArgs(); const pkmnId = teraDetails[0]; teraPokemon[pkmnId] = teraDetails[1]; @@ -434,7 +433,7 @@ export default class RunInfoUiHandler extends UiHandler { modifierIconsContainer.setScale(0.45); for (const m of this.runInfo.modifiers) { const modifier = m.toModifier(this.scene, this.modifiersModule[m.className]); - if (modifier instanceof PokemonHeldItemModifier) { + if (modifier instanceof Modifier.PokemonHeldItemModifier) { continue; } const icon = modifier?.getIcon(this.scene, false); @@ -635,17 +634,17 @@ export default class RunInfoUiHandler extends UiHandler { // Endless/Endless Spliced have a different scale because Pokemon tend to accumulate more items in these runs. const heldItemsScale = (this.runInfo.gameMode === GameModes.SPLICED_ENDLESS || this.runInfo.gameMode === GameModes.ENDLESS) ? 0.25 : 0.5; const heldItemsContainer = this.scene.add.container(-82, 2); - const heldItemsList : PokemonHeldItemModifier[] = []; + const heldItemsList : Modifier.PokemonHeldItemModifier[] = []; if (this.runInfo.modifiers.length) { for (const m of this.runInfo.modifiers) { const modifier = m.toModifier(this.scene, this.modifiersModule[m.className]); - if (modifier instanceof PokemonHeldItemModifier && modifier.pokemonId === pokemon.id) { + if (modifier instanceof Modifier.PokemonHeldItemModifier && modifier.pokemonId === pokemon.id) { modifier.stackCount = m["stackCount"]; heldItemsList.push(modifier); } } if (heldItemsList.length > 0) { - (heldItemsList as PokemonHeldItemModifier[]).sort(modifierSortFunc); + (heldItemsList as Modifier.PokemonHeldItemModifier[]).sort(Modifier.modifierSortFunc); let row = 0; for (const [index, item] of heldItemsList.entries()) { if ( index > 36 ) { diff --git a/src/ui/save-slot-select-ui-handler.ts b/src/ui/save-slot-select-ui-handler.ts index e6ab0d3b3c3..89b20322a68 100644 --- a/src/ui/save-slot-select-ui-handler.ts +++ b/src/ui/save-slot-select-ui-handler.ts @@ -2,7 +2,7 @@ import i18next from "i18next"; import BattleScene from "../battle-scene"; import { Button } from "#enums/buttons"; import { GameMode } from "../game-mode"; -import { PokemonHeldItemModifier } from "../modifier/modifier"; +import * as Modifier from "../modifier/modifier"; import { SessionSaveData } from "../system/game-data"; import PokemonData from "../system/pokemon-data"; import * as Utils from "../utils"; @@ -306,14 +306,12 @@ class SessionSlot extends Phaser.GameObjects.Container { this.add(pokemonIconsContainer); - const modifiersModule = await import("../modifier/modifier"); - const modifierIconsContainer = this.scene.add.container(148, 30); modifierIconsContainer.setScale(0.5); let visibleModifierIndex = 0; for (const m of data.modifiers) { - const modifier = m.toModifier(this.scene, modifiersModule[m.className]); - if (modifier instanceof PokemonHeldItemModifier) { + const modifier = m.toModifier(this.scene, Modifier[m.className]); + if (modifier instanceof Modifier.PokemonHeldItemModifier) { continue; } const icon = modifier?.getIcon(this.scene, false); diff --git a/src/ui/settings/abstract-settings-ui-handler.ts b/src/ui/settings/abstract-settings-ui-handler.ts index f21f2ebcc9d..570377eab43 100644 --- a/src/ui/settings/abstract-settings-ui-handler.ts +++ b/src/ui/settings/abstract-settings-ui-handler.ts @@ -5,7 +5,7 @@ import { Mode } from "../ui"; import UiHandler from "../ui-handler"; import { addWindow } from "../ui-theme"; import {Button} from "#enums/buttons"; -import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler"; import NavigationMenu, {NavigationManager} from "#app/ui/settings/navigationMenu"; import { Setting, SettingKeys, SettingType } from "#app/system/settings/settings"; import i18next from "i18next"; diff --git a/src/ui/settings/move-touch-controls-handler.ts b/src/ui/settings/move-touch-controls-handler.ts index cf56bf47d3b..cff68fa523d 100644 --- a/src/ui/settings/move-touch-controls-handler.ts +++ b/src/ui/settings/move-touch-controls-handler.ts @@ -1,5 +1,5 @@ -import TouchControl from "#app/touch-controls.js"; -import UI from "#app/ui/ui.js"; +import TouchControl from "#app/touch-controls"; +import UI from "#app/ui/ui"; import { Scene } from "phaser"; export const TOUCH_CONTROL_POSITIONS_LANDSCAPE = "touchControlPositionsLandscape"; diff --git a/src/ui/settings/navigationMenu.ts b/src/ui/settings/navigationMenu.ts index 370b6f67c76..7d7761b7b69 100644 --- a/src/ui/settings/navigationMenu.ts +++ b/src/ui/settings/navigationMenu.ts @@ -1,6 +1,6 @@ import BattleScene from "#app/battle-scene"; import {Mode} from "#app/ui/ui"; -import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler"; import {addTextObject, setTextStyle, TextStyle} from "#app/ui/text"; import {addWindow} from "#app/ui/ui-theme"; import {Button} from "#enums/buttons"; diff --git a/src/ui/settings/settings-audio-ui-handler.ts b/src/ui/settings/settings-audio-ui-handler.ts index 4a895fc3170..86c6a9bce40 100644 --- a/src/ui/settings/settings-audio-ui-handler.ts +++ b/src/ui/settings/settings-audio-ui-handler.ts @@ -1,6 +1,6 @@ import BattleScene from "../../battle-scene"; import { Mode } from "../ui"; -"#app/inputs-controller.js"; +"#app/inputs-controller"; import AbstractSettingsUiHandler from "./abstract-settings-ui-handler"; import { SettingType } from "#app/system/settings/settings"; diff --git a/src/ui/settings/settings-display-ui-handler.ts b/src/ui/settings/settings-display-ui-handler.ts index 25dda6e9bfb..3d602c50a78 100644 --- a/src/ui/settings/settings-display-ui-handler.ts +++ b/src/ui/settings/settings-display-ui-handler.ts @@ -1,6 +1,6 @@ import BattleScene from "../../battle-scene"; import { Mode } from "../ui"; -"#app/inputs-controller.js"; +"#app/inputs-controller"; import AbstractSettingsUiHandler from "./abstract-settings-ui-handler"; import { SettingKeys, SettingType } from "#app/system/settings/settings"; diff --git a/src/ui/settings/settings-gamepad-ui-handler.ts b/src/ui/settings/settings-gamepad-ui-handler.ts index 902d7eff34e..63a9d2ab23b 100644 --- a/src/ui/settings/settings-gamepad-ui-handler.ts +++ b/src/ui/settings/settings-gamepad-ui-handler.ts @@ -12,7 +12,7 @@ import pad_xbox360 from "#app/configs/inputs/pad_xbox360"; import pad_dualshock from "#app/configs/inputs/pad_dualshock"; import pad_unlicensedSNES from "#app/configs/inputs/pad_unlicensedSNES"; import {InterfaceConfig} from "#app/inputs-controller"; -import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler"; import {Device} from "#enums/devices"; import {truncateString} from "#app/utils"; import i18next from "i18next"; diff --git a/src/ui/settings/settings-keyboard-ui-handler.ts b/src/ui/settings/settings-keyboard-ui-handler.ts index dc6de8c90dc..7e020034bc6 100644 --- a/src/ui/settings/settings-keyboard-ui-handler.ts +++ b/src/ui/settings/settings-keyboard-ui-handler.ts @@ -9,7 +9,7 @@ import { settingKeyboardOptions } from "#app/system/settings/settings-keyboard"; import {reverseValueToKeySetting, truncateString} from "#app/utils"; -import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler.js"; +import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler"; import {InterfaceConfig} from "#app/inputs-controller"; import {addTextObject, TextStyle} from "#app/ui/text"; import {deleteBind} from "#app/configs/inputs/configHandler"; diff --git a/src/ui/time-of-day-widget.ts b/src/ui/time-of-day-widget.ts index 5d2f184e679..ea80a6e524a 100644 --- a/src/ui/time-of-day-widget.ts +++ b/src/ui/time-of-day-widget.ts @@ -1,5 +1,5 @@ import * as Utils from "../utils"; -import BattleScene from "#app/battle-scene.js"; +import BattleScene from "#app/battle-scene"; import { BattleSceneEventType } from "../events/battle-scene"; import { EaseType } from "#enums/ease-type"; import { TimeOfDay } from "#enums/time-of-day"; diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index 3c25ed34d61..67a4f7260e6 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -5,7 +5,7 @@ import * as Utils from "../utils"; import { TextStyle, addTextObject, getTextStyleOptions } from "./text"; import { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages"; import i18next from "i18next"; -import { TimedEventDisplay } from "#app/timed-event-manager.js"; +import { TimedEventDisplay } from "#app/timed-event-manager"; export default class TitleUiHandler extends OptionSelectUiHandler { private titleContainer: Phaser.GameObjects.Container; diff --git a/src/utils.ts b/src/utils.ts index 3e64baa0fd9..21be4df65cf 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -613,3 +613,14 @@ export function toDmgValue(value: number, minValue: number = 1) { export function getLocalizedSpriteKey(baseKey: string) { return `${baseKey}${verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`; } + +/** + * Check if a number is **inclusive** between two numbers + * @param num the number to check + * @param min the minimum value (included) + * @param max the maximum value (included) + * @returns true if number is **inclusive** between min and max + */ +export function isBetween(num: number, min: number, max: number): boolean { + return num >= min && num <= max; +} diff --git a/vite.config.ts b/vite.config.ts index 8fa7d799f27..1fd85e2572f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,6 +10,7 @@ export const defaultConfig: UserConfig = { clearScreen: false, appType: "mpa", build: { + chunkSizeWarningLimit: 10000, minify: 'esbuild', sourcemap: false, rollupOptions: {