Apply Biome

This commit is contained in:
NightKev 2025-07-13 02:34:03 -07:00
parent cd2f0b8a6e
commit c697a47f5b
43 changed files with 105 additions and 101 deletions

View File

@ -1,4 +1,5 @@
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants";
import { allTrainerItems } from "#app/data/data-lists";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { speciesStarterCosts } from "#balance/starters"; import { speciesStarterCosts } from "#balance/starters";
import { modifierTypes } from "#data/data-lists"; import { modifierTypes } from "#data/data-lists";
@ -6,6 +7,7 @@ import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { TrainerItemId } from "#enums/trainer-item-id";
import { import {
leaveEncounterWithoutBattle, leaveEncounterWithoutBattle,
setEncounterExp, setEncounterExp,
@ -23,8 +25,6 @@ import {
import { EXTORTION_ABILITIES, EXTORTION_MOVES } from "#mystery-encounters/requirement-groups"; import { EXTORTION_ABILITIES, EXTORTION_MOVES } from "#mystery-encounters/requirement-groups";
import { getPokemonSpecies } from "#utils/pokemon-utils"; import { getPokemonSpecies } from "#utils/pokemon-utils";
import i18next from "i18next"; import i18next from "i18next";
import { allTrainerItems } from "#app/data/data-lists";
import { TrainerItemId } from "#enums/trainer-item-id";
/** the i18n namespace for this encounter */ /** the i18n namespace for this encounter */
const namespace = "mysteryEncounters/anOfferYouCantRefuse"; const namespace = "mysteryEncounters/anOfferYouCantRefuse";

View File

@ -18,7 +18,11 @@ import {
import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter"; import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter";
import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter"; import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter";
import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option"; import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option";
import { CombinationPokemonRequirement, HoldingItemRequirement, MoneyRequirement } from "#mystery-encounters/mystery-encounter-requirements"; import {
CombinationPokemonRequirement,
HoldingItemRequirement,
MoneyRequirement,
} from "#mystery-encounters/mystery-encounter-requirements";
import i18next from "#plugins/i18n"; import i18next from "#plugins/i18n";
import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler"; import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler";
import { randSeedItem } from "#utils/common"; import { randSeedItem } from "#utils/common";

View File

@ -1,22 +1,22 @@
import { allHeldItems } from "#app/data/data-lists"; import { allHeldItems } from "#app/data/data-lists";
import { import {
type HeldItemCategoryId, type HeldItemCategoryId,
type HeldItemId,
isCategoryId, isCategoryId,
isItemInCategory, isItemInCategory,
isItemInRequested, isItemInRequested,
type HeldItemId,
} from "#app/enums/held-item-id"; } from "#app/enums/held-item-id";
import type { FormChangeItem } from "#enums/form-change-item";
import { import {
type HeldItemConfiguration,
isHeldItemSpecs,
type HeldItemDataMap,
type HeldItemSpecs,
type FormChangeItemPropertyMap, type FormChangeItemPropertyMap,
type FormChangeItemSpecs, type FormChangeItemSpecs,
type HeldItemConfiguration,
type HeldItemDataMap,
type HeldItemSaveData, type HeldItemSaveData,
type HeldItemSpecs,
isHeldItemSpecs,
} from "#app/items/held-item-data-types"; } from "#app/items/held-item-data-types";
import { getTypedEntries, getTypedKeys } from "#app/utils/common"; import { getTypedEntries, getTypedKeys } from "#app/utils/common";
import type { FormChangeItem } from "#enums/form-change-item";
export class PokemonItemManager { export class PokemonItemManager {
public heldItems: HeldItemDataMap; public heldItems: HeldItemDataMap;

View File

@ -4,50 +4,50 @@ import { BerryType } from "#enums/berry-type";
import { HeldItemId } from "#enums/held-item-id"; import { HeldItemId } from "#enums/held-item-id";
import type { PokemonType } from "#enums/pokemon-type"; import type { PokemonType } from "#enums/pokemon-type";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { Stat, type PermanentStat } from "#enums/stat"; import { type PermanentStat, Stat } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import { HeldItemEffect } from "./held-item"; import { HeldItemEffect } from "./held-item";
import { type AccuracyBoostParams, AccuracyBoosterHeldItem } from "./held-items/accuracy-booster"; import { AccuracyBoosterHeldItem, type AccuracyBoostParams } from "./held-items/accuracy-booster";
import { import {
type AttackTypeBoostParams,
AttackTypeBoosterHeldItem, AttackTypeBoosterHeldItem,
type AttackTypeBoostParams,
attackTypeToHeldItem, attackTypeToHeldItem,
} from "./held-items/attack-type-booster"; } from "./held-items/attack-type-booster";
import { import {
type BaseStatBoosterParams,
BaseStatBoosterHeldItem, BaseStatBoosterHeldItem,
type BaseStatBoosterParams,
permanentStatToHeldItem, permanentStatToHeldItem,
} from "./held-items/base-stat-booster"; } from "./held-items/base-stat-booster";
import { type BaseStatFlatParams, BaseStatFlatHeldItem } from "./held-items/base-stat-flat"; import { BaseStatFlatHeldItem, type BaseStatFlatParams } from "./held-items/base-stat-flat";
import { type BaseStatTotalParams, BaseStatTotalHeldItem } from "./held-items/base-stat-total"; import { BaseStatTotalHeldItem, type BaseStatTotalParams } from "./held-items/base-stat-total";
import { type BatonParams, BatonHeldItem } from "./held-items/baton"; import { BatonHeldItem, type BatonParams } from "./held-items/baton";
import { type BerryParams, BerryHeldItem, berryTypeToHeldItem } from "./held-items/berry"; import { BerryHeldItem, type BerryParams, berryTypeToHeldItem } from "./held-items/berry";
import { type BypassSpeedChanceParams, BypassSpeedChanceHeldItem } from "./held-items/bypass-speed-chance"; import { BypassSpeedChanceHeldItem, type BypassSpeedChanceParams } from "./held-items/bypass-speed-chance";
import { type CritBoostParams, CritBoostHeldItem, SpeciesCritBoostHeldItem } from "./held-items/crit-booster"; import { CritBoostHeldItem, type CritBoostParams, SpeciesCritBoostHeldItem } from "./held-items/crit-booster";
import { type DamageMoneyRewardParams, DamageMoneyRewardHeldItem } from "./held-items/damage-money-reward"; import { DamageMoneyRewardHeldItem, type DamageMoneyRewardParams } from "./held-items/damage-money-reward";
import { type EvoTrackerParams, GimmighoulEvoTrackerHeldItem } from "./held-items/evo-tracker"; import { type EvoTrackerParams, GimmighoulEvoTrackerHeldItem } from "./held-items/evo-tracker";
import { type ExpBoostParams, ExpBoosterHeldItem } from "./held-items/exp-booster"; import { ExpBoosterHeldItem, type ExpBoostParams } from "./held-items/exp-booster";
import { type FieldEffectParams, FieldEffectHeldItem } from "./held-items/field-effect"; import { FieldEffectHeldItem, type FieldEffectParams } from "./held-items/field-effect";
import { type FlinchChanceParams, FlinchChanceHeldItem } from "./held-items/flinch-chance"; import { FlinchChanceHeldItem, type FlinchChanceParams } from "./held-items/flinch-chance";
import { type FriendshipBoostParams, FriendshipBoosterHeldItem } from "./held-items/friendship-booster"; import { FriendshipBoosterHeldItem, type FriendshipBoostParams } from "./held-items/friendship-booster";
import { type HitHealParams, HitHealHeldItem } from "./held-items/hit-heal"; import { HitHealHeldItem, type HitHealParams } from "./held-items/hit-heal";
import { type IncrementingStatParams, IncrementingStatHeldItem } from "./held-items/incrementing-stat"; import { IncrementingStatHeldItem, type IncrementingStatParams } from "./held-items/incrementing-stat";
import { InstantReviveHeldItem, type InstantReviveParams } from "./held-items/instant-revive"; import { InstantReviveHeldItem, type InstantReviveParams } from "./held-items/instant-revive";
import { import {
ContactItemStealChanceHeldItem, ContactItemStealChanceHeldItem,
type ItemStealParams, type ItemStealParams,
TurnEndItemStealHeldItem, TurnEndItemStealHeldItem,
} from "./held-items/item-steal"; } from "./held-items/item-steal";
import { type MultiHitParams, MultiHitHeldItem } from "./held-items/multi-hit"; import { MultiHitHeldItem, type MultiHitParams } from "./held-items/multi-hit";
import { type NatureWeightBoostParams, NatureWeightBoosterHeldItem } from "./held-items/nature-weight-booster"; import { NatureWeightBoosterHeldItem, type NatureWeightBoostParams } from "./held-items/nature-weight-booster";
import { import {
ResetNegativeStatStageHeldItem, ResetNegativeStatStageHeldItem,
type ResetNegativeStatStageParams, type ResetNegativeStatStageParams,
} from "./held-items/reset-negative-stat-stage"; } from "./held-items/reset-negative-stat-stage";
import { EvolutionStatBoostHeldItem, SpeciesStatBoostHeldItem, type StatBoostParams } from "./held-items/stat-booster"; import { EvolutionStatBoostHeldItem, SpeciesStatBoostHeldItem, type StatBoostParams } from "./held-items/stat-booster";
import { type SurviveChanceParams, SurviveChanceHeldItem } from "./held-items/survive-chance"; import { SurviveChanceHeldItem, type SurviveChanceParams } from "./held-items/survive-chance";
import { type TurnEndHealParams, TurnEndHealHeldItem } from "./held-items/turn-end-heal"; import { TurnEndHealHeldItem, type TurnEndHealParams } from "./held-items/turn-end-heal";
import { type TurnEndStatusParams, TurnEndStatusHeldItem } from "./held-items/turn-end-status"; import { TurnEndStatusHeldItem, type TurnEndStatusParams } from "./held-items/turn-end-status";
export function initHeldItems() { export function initHeldItems() {
for (const berry of getEnumValues(BerryType)) { for (const berry of getEnumValues(BerryType)) {

View File

@ -24,8 +24,8 @@ import {
TempAccuracyBoosterTrainerItem, TempAccuracyBoosterTrainerItem,
TempCritBoosterTrainerItem, TempCritBoosterTrainerItem,
TempStatStageBoosterTrainerItem, TempStatStageBoosterTrainerItem,
tempStatToTrainerItem,
TrainerItem, TrainerItem,
tempStatToTrainerItem,
} from "./trainer-item"; } from "./trainer-item";
export function initTrainerItems() { export function initTrainerItems() {

View File

@ -1,5 +1,6 @@
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { allHeldItems } from "#app/data/data-lists";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { coerceArray, getEnumValues, isNullOrUndefined, pickWeightedIndex, randSeedInt } from "#app/utils/common"; import { coerceArray, getEnumValues, isNullOrUndefined, pickWeightedIndex, randSeedInt } from "#app/utils/common";
import { BerryType } from "#enums/berry-type"; import { BerryType } from "#enums/berry-type";
import { HeldItemCategoryId, HeldItemId, HeldItemNames, isCategoryId } from "#enums/held-item-id"; import { HeldItemCategoryId, HeldItemId, HeldItemNames, isCategoryId } from "#enums/held-item-id";
@ -7,7 +8,6 @@ import { HeldItemPoolType } from "#enums/modifier-pool-type";
import type { PokemonType } from "#enums/pokemon-type"; import type { PokemonType } from "#enums/pokemon-type";
import { RewardTier } from "#enums/reward-tier"; import { RewardTier } from "#enums/reward-tier";
import { PERMANENT_STATS } from "#enums/stat"; import { PERMANENT_STATS } from "#enums/stat";
import { allHeldItems } from "#app/data/data-lists";
import { import {
type HeldItemConfiguration, type HeldItemConfiguration,
type HeldItemPool, type HeldItemPool,

View File

@ -1,7 +1,7 @@
import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { HeldItemNames, type HeldItemId } from "#enums/held-item-id"; import { type HeldItemId, HeldItemNames } from "#enums/held-item-id";
import i18next from "i18next"; import i18next from "i18next";
// TODO: this should be moved to its own file // TODO: this should be moved to its own file

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id"; import type { HeldItemId } from "#enums/held-item-id";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface AccuracyBoostParams { export interface AccuracyBoostParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,9 +1,9 @@
import { HeldItemNames, HeldItemId } from "#enums/held-item-id"; import type Pokemon from "#app/field/pokemon";
import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import type { NumberHolder } from "#app/utils/common";
import { HeldItemId, HeldItemNames } from "#enums/held-item-id";
import { PokemonType } from "#enums/pokemon-type"; import { PokemonType } from "#enums/pokemon-type";
import i18next from "i18next"; import i18next from "i18next";
import type { NumberHolder } from "#app/utils/common";
import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "#app/items/held-item";
export interface AttackTypeBoostParams { export interface AttackTypeBoostParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -2,7 +2,7 @@ import type Pokemon from "#app/field/pokemon";
import { HeldItemId } from "#enums/held-item-id"; import { HeldItemId } from "#enums/held-item-id";
import { getStatKey, type PermanentStat, Stat } from "#enums/stat"; import { getStatKey, type PermanentStat, Stat } from "#enums/stat";
import i18next from "i18next"; import i18next from "i18next";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface BaseStatBoosterParams { export interface BaseStatBoosterParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "../held-item";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import i18next from "i18next"; import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface BaseStatFlatParams { export interface BaseStatFlatParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import i18next from "i18next";
import { HeldItemEffect, HeldItem } from "../held-item";
import type { HeldItemId } from "#enums/held-item-id"; import type { HeldItemId } from "#enums/held-item-id";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface BaseStatTotalParams { export interface BaseStatTotalParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface BatonParams { export interface BatonParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,10 +1,10 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "#app/items/held-item";
import type { BooleanHolder } from "#app/utils/common";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import i18next from "i18next"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import { getPokemonNameWithAffix } from "#app/messages"; import { getPokemonNameWithAffix } from "#app/messages";
import type { BooleanHolder } from "#app/utils/common";
import { Command } from "#enums/command"; import { Command } from "#enums/command";
import i18next from "i18next";
export interface BypassSpeedChanceParams { export interface BypassSpeedChanceParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -2,7 +2,7 @@ import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id"; import type { HeldItemId } from "#enums/held-item-id";
import type { SpeciesId } from "#enums/species-id"; import type { SpeciesId } from "#enums/species-id";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface CritBoostParams { export interface CritBoostParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { NumberHolder } from "#app/utils/common"; import { NumberHolder } from "#app/utils/common";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
import { TrainerItemEffect } from "../trainer-item"; import { TrainerItemEffect } from "../trainer-item";
export interface DamageMoneyRewardParams { export interface DamageMoneyRewardParams {

View File

@ -2,9 +2,9 @@ import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { HeldItemId } from "#enums/held-item-id"; import { HeldItemId } from "#enums/held-item-id";
import type { SpeciesId } from "#enums/species-id"; import type { SpeciesId } from "#enums/species-id";
import i18next from "i18next";
import { HeldItemEffect, HeldItem } from "../held-item";
import { TrainerItemId } from "#enums/trainer-item-id"; import { TrainerItemId } from "#enums/trainer-item-id";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface EvoTrackerParams { export interface EvoTrackerParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -2,7 +2,7 @@ import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id"; import type { HeldItemId } from "#enums/held-item-id";
import i18next from "i18next"; import i18next from "i18next";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface ExpBoostParams { export interface ExpBoostParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,5 +1,5 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "#app/items/held-item"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
export interface FieldEffectParams { export interface FieldEffectParams {

View File

@ -1,5 +1,5 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "#app/items/held-item"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import type { BooleanHolder } from "#app/utils/common"; import type { BooleanHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id"; import type { HeldItemId } from "#enums/held-item-id";

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
import i18next from "i18next"; import i18next from "i18next";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface FriendshipBoostParams { export interface FriendshipBoostParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,10 +1,10 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import i18next from "i18next"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import { HeldItemEffect, HeldItem } from "#app/items/held-item"; import { getPokemonNameWithAffix } from "#app/messages";
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
import { toDmgValue } from "#app/utils/common"; import { toDmgValue } from "#app/utils/common";
import { getPokemonNameWithAffix } from "#app/messages"; import i18next from "i18next";
export interface HitHealParams { export interface HitHealParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,8 +1,8 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "../held-item";
import { Stat } from "#enums/stat";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
import { Stat } from "#enums/stat";
import i18next from "i18next"; import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface IncrementingStatParams { export interface IncrementingStatParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,11 +1,11 @@
import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import i18next from "i18next";
import { ConsumableHeldItem, HeldItemEffect } from "../held-item";
import { getPokemonNameWithAffix } from "#app/messages"; import { getPokemonNameWithAffix } from "#app/messages";
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
import { toDmgValue } from "#app/utils/common"; import { toDmgValue } from "#app/utils/common";
import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs"; import i18next from "i18next";
import { ConsumableHeldItem, HeldItemEffect } from "../held-item";
export interface InstantReviveParams { export interface InstantReviveParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,11 +1,11 @@
import { allHeldItems } from "#app/data/data-lists";
import Pokemon from "#app/field/pokemon"; import Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { randSeedFloat } from "#app/utils/common"; import { randSeedFloat } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id"; import type { HeldItemId } from "#enums/held-item-id";
import i18next from "i18next"; import i18next from "i18next";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
import { getPokemonNameWithAffix } from "#app/messages";
import { allHeldItems } from "#app/data/data-lists";
import { globalScene } from "#app/global-scene";
export interface ItemStealParams { export interface ItemStealParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,8 +1,8 @@
import { allMoves } from "#app/data/data-lists";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "#app/items/held-item"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import { isNullOrUndefined, type NumberHolder } from "#app/utils/common"; import { isNullOrUndefined, type NumberHolder } from "#app/utils/common";
import type { MoveId } from "#enums/move-id"; import type { MoveId } from "#enums/move-id";
import { allMoves } from "#app/data/data-lists";
import i18next from "i18next"; import i18next from "i18next";
export interface MultiHitParams { export interface MultiHitParams {

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common"; import type { NumberHolder } from "#app/utils/common";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface NatureWeightBoostParams { export interface NatureWeightBoostParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,9 +1,9 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { BATTLE_STATS } from "#enums/stat"; import { BATTLE_STATS } from "#enums/stat";
import i18next from "i18next"; import i18next from "i18next";
import { ConsumableHeldItem, HeldItemEffect } from "../held-item"; import { ConsumableHeldItem, HeldItemEffect } from "../held-item";
import { getPokemonNameWithAffix } from "#app/messages";
export interface ResetNegativeStatStageParams { export interface ResetNegativeStatStageParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -4,7 +4,7 @@ import type { NumberHolder } from "#app/utils/common";
import { HeldItemId } from "#enums/held-item-id"; import { HeldItemId } from "#enums/held-item-id";
import type { SpeciesId } from "#enums/species-id"; import type { SpeciesId } from "#enums/species-id";
import type { Stat } from "#enums/stat"; import type { Stat } from "#enums/stat";
import { HeldItemEffect, HeldItem } from "../held-item"; import { HeldItem, HeldItemEffect } from "../held-item";
export interface StatBoostParams { export interface StatBoostParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,9 +1,9 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "#app/items/held-item";
import type { BooleanHolder } from "#app/utils/common";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import i18next from "i18next"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import { getPokemonNameWithAffix } from "#app/messages"; import { getPokemonNameWithAffix } from "#app/messages";
import type { BooleanHolder } from "#app/utils/common";
import i18next from "i18next";
export interface SurviveChanceParams { export interface SurviveChanceParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,10 +1,10 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import i18next from "i18next"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import { HeldItemEffect, HeldItem } from "#app/items/held-item"; import { getPokemonNameWithAffix } from "#app/messages";
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
import { toDmgValue } from "#app/utils/common"; import { toDmgValue } from "#app/utils/common";
import { getPokemonNameWithAffix } from "#app/messages"; import i18next from "i18next";
export interface TurnEndHealParams { export interface TurnEndHealParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HeldItemEffect, HeldItem } from "#app/items/held-item"; import { HeldItem, HeldItemEffect } from "#app/items/held-item";
import type { StatusEffect } from "#enums/status-effect";
import type { HeldItemId } from "#enums/held-item-id"; import type { HeldItemId } from "#enums/held-item-id";
import type { StatusEffect } from "#enums/status-effect";
export interface TurnEndStatusParams { export interface TurnEndStatusParams {
/** The pokemon with the item */ /** The pokemon with the item */

View File

@ -2,12 +2,12 @@ import type ModifierData from "#app/system/modifier-data";
import type { BerryType } from "#enums/berry-type"; import type { BerryType } from "#enums/berry-type";
import { HeldItemId } from "#enums/held-item-id"; import { HeldItemId } from "#enums/held-item-id";
import type { PokemonType } from "#enums/pokemon-type"; import type { PokemonType } from "#enums/pokemon-type";
import { Stat, type PermanentStat } from "#enums/stat"; import { SpeciesId } from "#enums/species-id";
import { type PermanentStat, Stat } from "#enums/stat";
import type { PokemonItemMap } from "./held-item-data-types"; import type { PokemonItemMap } from "./held-item-data-types";
import { attackTypeToHeldItem } from "./held-items/attack-type-booster"; import { attackTypeToHeldItem } from "./held-items/attack-type-booster";
import { permanentStatToHeldItem } from "./held-items/base-stat-booster"; import { permanentStatToHeldItem } from "./held-items/base-stat-booster";
import { berryTypeToHeldItem } from "./held-items/berry"; import { berryTypeToHeldItem } from "./held-items/berry";
import { SpeciesId } from "#enums/species-id";
const uniqueModifierToItem = { const uniqueModifierToItem = {
EvoTrackerModifier: HeldItemId.GIMMIGHOUL_EVO_TRACKER, EvoTrackerModifier: HeldItemId.GIMMIGHOUL_EVO_TRACKER,

View File

@ -2,9 +2,9 @@ import { allTrainerItems } from "#app/data/data-lists";
import type { TrainerItemId } from "#app/enums/trainer-item-id"; import type { TrainerItemId } from "#app/enums/trainer-item-id";
import { import {
isTrainerItemSpecs, isTrainerItemSpecs,
type TrainerItemSaveData,
type TrainerItemConfiguration, type TrainerItemConfiguration,
type TrainerItemDataMap, type TrainerItemDataMap,
type TrainerItemSaveData,
type TrainerItemSpecs, type TrainerItemSpecs,
} from "#app/items/trainer-item-data-types"; } from "#app/items/trainer-item-data-types";
import { getTypedEntries, getTypedKeys } from "#app/utils/common"; import { getTypedEntries, getTypedKeys } from "#app/utils/common";

View File

@ -1,8 +1,8 @@
import { allTrainerItems } from "#app/data/data-lists";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { isNullOrUndefined, pickWeightedIndex } from "#app/utils/common"; import { isNullOrUndefined, pickWeightedIndex } from "#app/utils/common";
import { RewardTier } from "#enums/reward-tier"; import { RewardTier } from "#enums/reward-tier";
import type { TrainerItemId } from "#enums/trainer-item-id"; import type { TrainerItemId } from "#enums/trainer-item-id";
import { allTrainerItems } from "#app/data/data-lists";
import type { TrainerItemPool, TrainerItemTieredPool } from "./trainer-item-data-types"; import type { TrainerItemPool, TrainerItemTieredPool } from "./trainer-item-data-types";
import type { TrainerItemManager } from "./trainer-item-manager"; import type { TrainerItemManager } from "./trainer-item-manager";

View File

@ -1,15 +1,15 @@
import { getStatusEffectDescriptor, getStatusEffectHealText } from "#app/data/status-effect";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { hslToHex, randSeedFloat, toDmgValue, type BooleanHolder, type NumberHolder } from "#app/utils/common"; import { getPokemonNameWithAffix } from "#app/messages";
import { addTextObject, TextStyle } from "#app/ui/text";
import { type BooleanHolder, hslToHex, type NumberHolder, randSeedFloat, toDmgValue } from "#app/utils/common";
import { BattlerTagType } from "#enums/battler-tag-type";
import { getStatKey, Stat, type TempBattleStat } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect";
import { TrainerItemId, TrainerItemNames } from "#enums/trainer-item-id"; import { TrainerItemId, TrainerItemNames } from "#enums/trainer-item-id";
import i18next from "i18next"; import i18next from "i18next";
import type { TrainerItemManager } from "./trainer-item-manager"; import type { TrainerItemManager } from "./trainer-item-manager";
import { addTextObject, TextStyle } from "#app/ui/text";
import { getStatKey, Stat, type TempBattleStat } from "#enums/stat";
import { BattlerTagType } from "#enums/battler-tag-type";
import { getStatusEffectDescriptor, getStatusEffectHealText } from "#app/data/status-effect";
import { getPokemonNameWithAffix } from "#app/messages";
import { StatusEffect } from "#enums/status-effect";
export const TrainerItemEffect = { export const TrainerItemEffect = {
LEVEL_INCREMENT_BOOSTER: 1, LEVEL_INCREMENT_BOOSTER: 1,

View File

@ -1,6 +1,6 @@
import { globalScene } from "#app/global-scene";
import { TrainerItemReward, type ModifierType } from "#app/modifier/modifier-type";
import type { ModifierTypeFunc } from "#app/@types/modifier-types"; import type { ModifierTypeFunc } from "#app/@types/modifier-types";
import { globalScene } from "#app/global-scene";
import { type ModifierType, TrainerItemReward } from "#app/modifier/modifier-type";
import { getModifierType } from "#app/utils/modifier-utils"; import { getModifierType } from "#app/utils/modifier-utils";
import i18next from "i18next"; import i18next from "i18next";
import { BattlePhase } from "./battle-phase"; import { BattlePhase } from "./battle-phase";

View File

@ -1,12 +1,12 @@
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { BattlerIndex } from "#enums/battler-index"; import { BattlerIndex } from "#enums/battler-index";
import { HeldItemId } from "#enums/held-item-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import { GameManager } from "#test/testUtils/gameManager"; import { GameManager } from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { HeldItemId } from "#enums/held-item-id";
describe("Items - Multi Lens", () => { describe("Items - Multi Lens", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,11 +1,11 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { HeldItemId } from "#enums/held-item-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { GameManager } from "#test/testUtils/gameManager"; import { GameManager } from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { HeldItemId } from "#enums/held-item-id";
describe("Items - Mystical Rock", () => { describe("Items - Mystical Rock", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -3,6 +3,7 @@ import { allMoves } from "#data/data-lists";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagSide } from "#enums/arena-tag-side";
import { ArenaTagType } from "#enums/arena-tag-type"; import { ArenaTagType } from "#enums/arena-tag-type";
import { HeldItemId } from "#enums/held-item-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { MoveEffectPhase } from "#phases/move-effect-phase"; import { MoveEffectPhase } from "#phases/move-effect-phase";
@ -10,7 +11,6 @@ import { TurnEndPhase } from "#phases/turn-end-phase";
import { GameManager } from "#test/testUtils/gameManager"; import { GameManager } from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import { HeldItemId } from "#enums/held-item-id";
describe("Moves - Ceaseless Edge", () => { describe("Moves - Ceaseless Edge", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -3,6 +3,7 @@ import { Status } from "#data/status-effect";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { BattlerIndex } from "#enums/battler-index"; import { BattlerIndex } from "#enums/battler-index";
import { Challenges } from "#enums/challenges"; import { Challenges } from "#enums/challenges";
import { HeldItemId } from "#enums/held-item-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { PokemonType } from "#enums/pokemon-type"; import { PokemonType } from "#enums/pokemon-type";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
@ -10,7 +11,6 @@ import { StatusEffect } from "#enums/status-effect";
import { GameManager } from "#test/testUtils/gameManager"; import { GameManager } from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { HeldItemId } from "#enums/held-item-id";
describe("Moves - Dragon Tail", () => { describe("Moves - Dragon Tail", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -3,13 +3,13 @@ import { ArenaTagSide } from "#enums/arena-tag-side";
import { ArenaTagType } from "#enums/arena-tag-type"; import { ArenaTagType } from "#enums/arena-tag-type";
import { BattlerIndex } from "#enums/battler-index"; import { BattlerIndex } from "#enums/battler-index";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { HeldItemId } from "#enums/held-item-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
import { GameManager } from "#test/testUtils/gameManager"; import { GameManager } from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { HeldItemId } from "#enums/held-item-id";
// Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Heal_Block_(move) // Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Heal_Block_(move)
describe("Moves - Heal Block", () => { describe("Moves - Heal Block", () => {

View File

@ -2,6 +2,8 @@
import type { NewArenaEvent } from "#events/battle-scene"; import type { NewArenaEvent } from "#events/battle-scene";
/** biome-ignore-end lint/correctness/noUnusedImports: tsdoc imports */ /** biome-ignore-end lint/correctness/noUnusedImports: tsdoc imports */
import type { HeldItemConfiguration } from "#app/items/held-item-data-types";
import type { TrainerItemConfiguration } from "#app/items/trainer-item-data-types";
import type { BattleStyle, RandomTrainerOverride } from "#app/overrides"; import type { BattleStyle, RandomTrainerOverride } from "#app/overrides";
import Overrides, { defaultOverrides } from "#app/overrides"; import Overrides, { defaultOverrides } from "#app/overrides";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
@ -20,8 +22,6 @@ import type { Variant } from "#sprites/variant";
import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper";
import { coerceArray, shiftCharCodes } from "#utils/common"; import { coerceArray, shiftCharCodes } from "#utils/common";
import { expect, vi } from "vitest"; import { expect, vi } from "vitest";
import type { HeldItemConfiguration } from "#app/items/held-item-data-types";
import type { TrainerItemConfiguration } from "#app/items/trainer-item-data-types";
/** /**
* Helper to handle overrides in tests * Helper to handle overrides in tests