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, randSeedFloat,
} from "#app/utils/common"; } from "#app/utils/common";
import { getPokemonNameWithAffix } from "#app/messages"; 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 { import {
getNonVolatileStatusEffects, getNonVolatileStatusEffects,
getStatusEffectDescriptor, getStatusEffectDescriptor,

View File

@ -42,19 +42,7 @@ import { EFFECTIVE_STATS, getStatKey, Stat, type BattleStat, type EffectiveStat
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
import { isNullOrUndefined } from "#app/utils/common"; import { isNullOrUndefined } from "#app/utils/common";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
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,
}
export class BattlerTag { export class BattlerTag {
public tagType: BattlerTagType; 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 { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "#app/data/balance/tms";
import { import {
BattlerTag, BattlerTag,
BattlerTagLapseType,
EncoreTag, EncoreTag,
GroundedTag, GroundedTag,
HighestStatBoostTag, HighestStatBoostTag,
@ -135,6 +134,7 @@ import {
loadBattlerTag, loadBattlerTag,
type GrudgeTag, type GrudgeTag,
} from "../data/battler-tags"; } from "../data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
import { NoCritTag, WeakenMoveScreenTag } from "#app/data/arena-tag"; import { NoCritTag, WeakenMoveScreenTag } from "#app/data/arena-tag";
import { ArenaTagSide } from "#enums/arena-tag-side"; import { ArenaTagSide } from "#enums/arena-tag-side";

View File

@ -9,7 +9,7 @@ import {
PostKnockOutAbAttr, PostKnockOutAbAttr,
PostVictoryAbAttr, PostVictoryAbAttr,
} from "#app/data/abilities/ability"; } 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 { battleSpecDialogue } from "#app/data/dialogue";
import { PostVictoryStatStageChangeAttr } from "#app/data/moves/move"; import { PostVictoryStatStageChangeAttr } from "#app/data/moves/move";
import { allMoves } from "#app/data/data-lists"; 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 { ArenaTagSide } from "#enums/arena-tag-side";
import { MoveAnim } from "#app/data/battle-anims"; import { MoveAnim } from "#app/data/battle-anims";
import { import {
BattlerTagLapseType,
DamageProtectedTag, DamageProtectedTag,
ProtectedTag, ProtectedTag,
SemiInvulnerableTag, SemiInvulnerableTag,
SubstituteTag, SubstituteTag,
TypeBoostTag, TypeBoostTag,
} from "#app/data/battler-tags"; } from "#app/data/battler-tags";
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
import type { MoveAttr } from "#app/data/moves/move"; import type { MoveAttr } from "#app/data/moves/move";
import { import {
applyFilteredMoveAttrs, applyFilteredMoveAttrs,

View File

@ -1,5 +1,5 @@
import { globalScene } from "#app/global-scene"; 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 { PokemonPhase } from "./pokemon-phase";
import type { BattlerIndex } from "#enums/battler-index"; import type { BattlerIndex } from "#enums/battler-index";
import { applyPostSummonAbAttrs, PostSummonRemoveEffectAbAttr } from "#app/data/abilities/ability"; import { applyPostSummonAbAttrs, PostSummonRemoveEffectAbAttr } from "#app/data/abilities/ability";

View File

@ -13,7 +13,8 @@ import {
} from "#app/data/abilities/ability"; } from "#app/data/abilities/ability";
import type { DelayedAttackTag } from "#app/data/arena-tag"; import type { DelayedAttackTag } from "#app/data/arena-tag";
import { CommonAnim } from "#app/data/battle-anims"; 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 { import {
AddArenaTrapTagAttr, AddArenaTrapTagAttr,
applyMoveAttrs, 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 { OptionPhaseCallback } from "#app/data/mystery-encounters/mystery-encounter-option";
import type MysteryEncounterOption 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"; 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 { 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 { TerrainType } from "#app/data/terrain";
import { WeatherType } from "#app/enums/weather-type"; import { WeatherType } from "#app/enums/weather-type";
import { TurnEndEvent } from "#app/events/battle-scene"; import { TurnEndEvent } from "#app/events/battle-scene";

View File

@ -1,6 +1,7 @@
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
import type Pokemon from "#app/field/pokemon"; 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 { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import GameManager from "#test/testUtils/gameManager"; 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 type Pokemon from "#app/field/pokemon";
import { MoveResult } from "#enums/move-result"; import { MoveResult } from "#enums/move-result";
import type BattleScene from "#app/battle-scene"; 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 { MoveId } from "#enums/move-id";
import { PokemonAnimType } from "#app/enums/pokemon-anim-type"; import { PokemonAnimType } from "#app/enums/pokemon-anim-type";
import * as messages from "#app/messages"; import * as messages from "#app/messages";