Move DamageCalculationResult interface to its own file

This commit is contained in:
Sirz Benjie 2025-04-10 21:42:01 -05:00
parent 3458af2047
commit 6a26c5b4fa
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
3 changed files with 13 additions and 11 deletions

View File

@ -263,6 +263,7 @@ import { LearnMoveSituation } from "#enums/learn-move-situation";
import { TurnMove } from "#app/interfaces/turn-move";
import { AiType } from "#enums/ai-type";
import { PokemonMove } from "#app/data/moves/pokemon-move";
import { DamageCalculationResult } from "#app/interfaces/damage-calculation-result";
export enum FieldPosition {
CENTER,
@ -7888,14 +7889,4 @@ export type DamageResult =
| HitResult.INDIRECT_KO
| HitResult.INDIRECT;
/** Interface containing the results of a damage calculation for a given move */
export interface DamageCalculationResult {
/** `true` if the move was cancelled (thus suppressing "No Effect" messages) */
cancelled: boolean;
/** The effectiveness of the move */
result: HitResult;
/** The damage dealt by the move */
damage: number;
}

View File

@ -0,0 +1,11 @@
import type { HitResult } from "#app/field/pokemon";
/** Interface containing the results of a damage calculation for a given move */
export interface DamageCalculationResult {
/** `true` if the move was cancelled (thus suppressing "No Effect" messages) */
cancelled: boolean;
/** The effectiveness of the move */
result: HitResult;
/** The damage dealt by the move */
damage: number;
}

View File

@ -1,7 +1,7 @@
import { BattlerIndex } from "#app/battle";
import { allMoves } from "#app/data/moves/all-moves";
import { BattlerTagType } from "#app/enums/battler-tag-type";
import type { DamageCalculationResult } from "#app/field/pokemon";
import type { DamageCalculationResult } from "#app/interfaces/damage-calculation-result";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";