Move battlerTagLapseType to own file

This commit is contained in:
Sirz Benjie 2025-06-08 11:18:11 -05:00
parent f068f827a4
commit 085075597b
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
12 changed files with 28 additions and 23 deletions

View File

@ -11,7 +11,8 @@ import {
randSeedFloat,
} from "#app/utils/common";
import { getPokemonNameWithAffix } from "#app/messages";
import { BattlerTagLapseType, GroundedTag } from "#app/data/battler-tags";
import { GroundedTag } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import {
getNonVolatileStatusEffects,
getStatusEffectDescriptor,

View File

@ -42,19 +42,7 @@ import { EFFECTIVE_STATS, getStatKey, Stat, type BattleStat, type EffectiveStat
import { StatusEffect } from "#enums/status-effect";
import { WeatherType } from "#enums/weather-type";
import { isNullOrUndefined } from "#app/utils/common";
export enum BattlerTagLapseType {
FAINT,
MOVE,
PRE_MOVE,
AFTER_MOVE,
MOVE_EFFECT,
TURN_END,
HIT,
/** Tag lapses AFTER_HIT, applying its effects even if the user faints */
AFTER_HIT,
CUSTOM,
}
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
export class BattlerTag {
public tagType: BattlerTagType;

View File

@ -0,0 +1,13 @@
export enum BattlerTagLapseType {
FAINT,
MOVE,
PRE_MOVE,
AFTER_MOVE,
MOVE_EFFECT,
TURN_END,
HIT,
/** Tag lapses AFTER_HIT, applying its effects even if the user faints */
AFTER_HIT,
CUSTOM
}

View File

@ -116,7 +116,6 @@ import {
import { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "#app/data/balance/tms";
import {
BattlerTag,
BattlerTagLapseType,
EncoreTag,
GroundedTag,
HighestStatBoostTag,
@ -135,6 +134,7 @@ import {
loadBattlerTag,
type GrudgeTag,
} from "../data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { WeatherType } from "#enums/weather-type";
import { NoCritTag, WeakenMoveScreenTag } from "#app/data/arena-tag";
import { ArenaTagSide } from "#enums/arena-tag-side";

View File

@ -9,7 +9,7 @@ import {
PostKnockOutAbAttr,
PostVictoryAbAttr,
} from "#app/data/abilities/ability";
import { BattlerTagLapseType } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { battleSpecDialogue } from "#app/data/dialogue";
import { PostVictoryStatStageChangeAttr } from "#app/data/moves/move";
import { allMoves } from "#app/data/data-lists";

View File

@ -20,13 +20,13 @@ import { ConditionalProtectTag } from "#app/data/arena-tag";
import { ArenaTagSide } from "#enums/arena-tag-side";
import { MoveAnim } from "#app/data/battle-anims";
import {
BattlerTagLapseType,
DamageProtectedTag,
ProtectedTag,
SemiInvulnerableTag,
SubstituteTag,
TypeBoostTag,
} from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import type { MoveAttr } from "#app/data/moves/move";
import {
applyFilteredMoveAttrs,

View File

@ -1,5 +1,5 @@
import { globalScene } from "#app/global-scene";
import { BattlerTagLapseType } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { PokemonPhase } from "./pokemon-phase";
import type { BattlerIndex } from "#enums/battler-index";
import { applyPostSummonAbAttrs, PostSummonRemoveEffectAbAttr } from "#app/data/abilities/ability";

View File

@ -13,7 +13,8 @@ import {
} from "#app/data/abilities/ability";
import type { DelayedAttackTag } from "#app/data/arena-tag";
import { CommonAnim } from "#app/data/battle-anims";
import { BattlerTagLapseType, CenterOfAttentionTag } from "#app/data/battler-tags";
import { CenterOfAttentionTag } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import {
AddArenaTrapTagAttr,
applyMoveAttrs,

View File

@ -1,4 +1,4 @@
import { BattlerTagLapseType } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import type { OptionPhaseCallback } from "#app/data/mystery-encounters/mystery-encounter-option";
import type MysteryEncounterOption from "#app/data/mystery-encounters/mystery-encounter-option";
import { SeenEncounterData } from "#app/data/mystery-encounters/mystery-encounter-save-data";

View File

@ -1,5 +1,5 @@
import { applyPostTurnAbAttrs, PostTurnAbAttr } from "#app/data/abilities/ability";
import { BattlerTagLapseType } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { TerrainType } from "#app/data/terrain";
import { WeatherType } from "#app/enums/weather-type";
import { TurnEndEvent } from "#app/events/battle-scene";

View File

@ -1,6 +1,7 @@
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
import type Pokemon from "#app/field/pokemon";
import { BattlerTagLapseType, OctolockTag, TrappedTag } from "#app/data/battler-tags";
import { OctolockTag, TrappedTag } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
import { Stat } from "#enums/stat";
import GameManager from "#test/testUtils/gameManager";

View File

@ -3,7 +3,8 @@ import type { PokemonTurnData, TurnMove } from "#app/field/pokemon";
import type Pokemon from "#app/field/pokemon";
import { MoveResult } from "#enums/move-result";
import type BattleScene from "#app/battle-scene";
import { BattlerTagLapseType, BindTag, SubstituteTag } from "#app/data/battler-tags";
import { BindTag, SubstituteTag } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { MoveId } from "#enums/move-id";
import { PokemonAnimType } from "#app/enums/pokemon-anim-type";
import * as messages from "#app/messages";