Move hit-result to its own file
This commit is contained in:
parent
c595f41ca3
commit
f7f87ba083
|
@ -1,7 +1,8 @@
|
|||
import type { EnemyPokemon } from "../field/pokemon";
|
||||
import type { PokemonMove } from "./moves/pokemon-move";
|
||||
import type Pokemon from "../field/pokemon";
|
||||
import { HitResult, MoveResult, PlayerPokemon } from "../field/pokemon";
|
||||
import { MoveResult, PlayerPokemon } from "../field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { PokemonType } from "#enums/pokemon-type";
|
||||
import type { Constructor } from "#app/utils";
|
||||
import * as Utils from "../utils";
|
||||
|
|
|
@ -7,7 +7,7 @@ import { MoveTarget } from "#enums/MoveTarget";
|
|||
import { MoveCategory } from "#enums/MoveCategory";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import type Pokemon from "#app/field/pokemon";
|
||||
import { HitResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { PokemonMove } from "./moves/pokemon-move";
|
||||
import { StatusEffect } from "#enums/status-effect";
|
||||
import type { BattlerIndex } from "#app/battle";
|
||||
|
|
|
@ -24,7 +24,8 @@ import { getStatusEffectHealText } from "#app/data/status-effect";
|
|||
import { TerrainType } from "#app/data/terrain";
|
||||
import { PokemonType } from "#enums/pokemon-type";
|
||||
import type Pokemon from "#app/field/pokemon";
|
||||
import { HitResult, MoveResult } from "#app/field/pokemon";
|
||||
import { MoveResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { CommonAnimPhase } from "#app/phases/common-anim-phase";
|
||||
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getPokemonNameWithAffix } from "../messages";
|
||||
import type Pokemon from "../field/pokemon";
|
||||
import { HitResult } from "../field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { getStatusEffectHealText } from "./status-effect";
|
||||
import * as Utils from "../utils";
|
||||
import {
|
||||
|
|
|
@ -17,10 +17,10 @@ import type { TurnMove } from "#app/interfaces/turn-move";
|
|||
import type Pokemon from "../../field/pokemon";
|
||||
import {
|
||||
EnemyPokemon,
|
||||
HitResult,
|
||||
MoveResult,
|
||||
PlayerPokemon,
|
||||
} from "../../field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { FieldPosition } from "#enums/field-position";
|
||||
import { PokemonMove } from "./pokemon-move";
|
||||
import {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
export enum AiType {
|
||||
RANDOM,
|
||||
SMART_RANDOM,
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
export enum HitResult {
|
||||
EFFECTIVE = 1,
|
||||
SUPER_EFFECTIVE,
|
||||
NOT_VERY_EFFECTIVE,
|
||||
ONE_HIT_KO,
|
||||
NO_EFFECT,
|
||||
STATUS,
|
||||
HEAL,
|
||||
FAIL,
|
||||
MISS,
|
||||
INDIRECT,
|
||||
IMMUNE,
|
||||
CONFUSION,
|
||||
INDIRECT_KO
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import { TextStyle, addTextObject } from "../ui/text";
|
||||
import type { DamageResult } from "./pokemon";
|
||||
import type Pokemon from "./pokemon";
|
||||
import { HitResult } from "./pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import * as Utils from "../utils";
|
||||
import type { BattlerIndex } from "../battle";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
|
|
|
@ -271,6 +271,7 @@ import { PokemonMove } from "#app/data/moves/pokemon-move";
|
|||
import { DamageCalculationResult } from "#app/interfaces/damage-calculation-result";
|
||||
import { FieldPosition } from "#enums/field-position";
|
||||
import { AttackMoveResult } from "#app/interfaces/attack-move-result";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
|
||||
export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
public id: number;
|
||||
|
@ -7617,22 +7618,6 @@ export enum MoveResult {
|
|||
OTHER,
|
||||
}
|
||||
|
||||
export enum HitResult {
|
||||
EFFECTIVE = 1,
|
||||
SUPER_EFFECTIVE,
|
||||
NOT_VERY_EFFECTIVE,
|
||||
ONE_HIT_KO,
|
||||
NO_EFFECT,
|
||||
STATUS,
|
||||
HEAL,
|
||||
FAIL,
|
||||
MISS,
|
||||
INDIRECT,
|
||||
IMMUNE,
|
||||
CONFUSION,
|
||||
INDIRECT_KO,
|
||||
}
|
||||
|
||||
export type DamageResult =
|
||||
| HitResult.EFFECTIVE
|
||||
| HitResult.SUPER_EFFECTIVE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { HitResult } from "#app/field/pokemon";
|
||||
import type { HitResult } from "#enums/hit-result";
|
||||
|
||||
/** Interface containing the results of a damage calculation for a given move */
|
||||
export interface DamageCalculationResult {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { globalScene } from "#app/global-scene";
|
||||
import type { BattlerIndex } from "#app/battle";
|
||||
import { BattleSpec } from "#enums/battle-spec";
|
||||
import { type DamageResult, HitResult } from "#app/field/pokemon";
|
||||
import type { DamageResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { fixedInt } from "#app/utils";
|
||||
import { PokemonPhase } from "#app/phases/pokemon-phase";
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ import { BattleSpec } from "#app/enums/battle-spec";
|
|||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import type { EnemyPokemon } from "#app/field/pokemon";
|
||||
import type Pokemon from "#app/field/pokemon";
|
||||
import { HitResult, PlayerPokemon } from "#app/field/pokemon";
|
||||
import { PlayerPokemon } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { PokemonInstantReviveModifier } from "#app/modifier/modifier";
|
||||
|
|
|
@ -51,7 +51,8 @@ import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms";
|
|||
import { PokemonType } from "#enums/pokemon-type";
|
||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
||||
import type Pokemon from "#app/field/pokemon";
|
||||
import { HitResult, MoveResult } from "#app/field/pokemon";
|
||||
import { MoveResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import {
|
||||
ContactHeldItemTransferChanceModifier,
|
||||
|
|
|
@ -3,7 +3,7 @@ import type { 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 } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import { HealingBoosterModifier } from "#app/modifier/modifier";
|
||||
import { HealAchv } from "#app/system/achv";
|
||||
|
|
|
@ -14,7 +14,7 @@ import { getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weath
|
|||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||
import { WeatherType } from "#app/enums/weather-type";
|
||||
import type Pokemon from "#app/field/pokemon";
|
||||
import { HitResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { BooleanHolder, toDmgValue } from "#app/utils";
|
||||
import { CommonAnimPhase } from "./common-anim-phase";
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { PokemonType } from "#enums/pokemon-type";
|
|||
import { Abilities } from "#app/enums/abilities";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import { Species } from "#app/enums/species";
|
||||
import { HitResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import GameManager from "#test/testUtils/gameManager";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle";
|
|||
import { Abilities } from "#app/enums/abilities";
|
||||
import { Moves } from "#app/enums/moves";
|
||||
import { Species } from "#app/enums/species";
|
||||
import { HitResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import GameManager from "#test/testUtils/gameManager";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
|
|
@ -5,7 +5,7 @@ import { allMoves } from "#app/data/moves/all-moves";
|
|||
import type Move from "#app/data/moves/move";
|
||||
import { PokemonType } from "#enums/pokemon-type";
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
import { HitResult } from "#app/field/pokemon";
|
||||
import { HitResult } from "#enums/hit-result";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import GameManager from "#test/testUtils/gameManager";
|
||||
|
|
Loading…
Reference in New Issue