mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-02 14:34:52 +01:00
Revert "[Refactor] Move many interfaces and enums to their own file" (#5661)
Revert "[Refactor] Move many interfaces and enums to their own file (#5646)" This reverts commit c82e01eed377cacc5d3ffd2ef9caa27270e8a2dc.
This commit is contained in:
parent
c82e01eed3
commit
b41eee3c7f
@ -1,10 +0,0 @@
|
|||||||
import type { HitResult } from "#enums/hit-result";
|
|
||||||
|
|
||||||
export type DamageResult =
|
|
||||||
| HitResult.EFFECTIVE
|
|
||||||
| HitResult.SUPER_EFFECTIVE
|
|
||||||
| HitResult.NOT_VERY_EFFECTIVE
|
|
||||||
| HitResult.ONE_HIT_KO
|
|
||||||
| HitResult.CONFUSION
|
|
||||||
| HitResult.INDIRECT_KO
|
|
||||||
| HitResult.INDIRECT;
|
|
@ -51,7 +51,7 @@ import { initGameSpeed } from "#app/system/game-speed";
|
|||||||
import { Arena, ArenaBase } from "#app/field/arena";
|
import { Arena, ArenaBase } from "#app/field/arena";
|
||||||
import { GameData } from "#app/system/game-data";
|
import { GameData } from "#app/system/game-data";
|
||||||
import { addTextObject, getTextColor, TextStyle } from "#app/ui/text";
|
import { addTextObject, getTextColor, TextStyle } from "#app/ui/text";
|
||||||
import { allMoves } from "./data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { MusicPreference } from "#app/system/settings/settings";
|
import { MusicPreference } from "#app/system/settings/settings";
|
||||||
import {
|
import {
|
||||||
getDefaultModifierTypeForTier,
|
getDefaultModifierTypeForTier,
|
||||||
|
@ -15,8 +15,7 @@ import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/mod
|
|||||||
import type { PokeballType } from "#enums/pokeball";
|
import type { PokeballType } from "#enums/pokeball";
|
||||||
import { trainerConfigs } from "#app/data/trainers/trainer-config";
|
import { trainerConfigs } from "#app/data/trainers/trainer-config";
|
||||||
import { SpeciesFormKey } from "#enums/species-form-key";
|
import { SpeciesFormKey } from "#enums/species-form-key";
|
||||||
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
|
import type { EnemyPokemon, PlayerPokemon, TurnMove } from "#app/field/pokemon";
|
||||||
import type { TurnMove } from "./interfaces/turn-move";
|
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||||
import { BattleSpec } from "#enums/battle-spec";
|
import { BattleSpec } from "#enums/battle-spec";
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import type { EnemyPokemon } from "../field/pokemon";
|
import type { EnemyPokemon, PokemonMove } from "../field/pokemon";
|
||||||
import type { PokemonMove } from "./moves/pokemon-move";
|
|
||||||
import type Pokemon from "../field/pokemon";
|
import type Pokemon from "../field/pokemon";
|
||||||
import { MoveResult, PlayerPokemon } from "../field/pokemon";
|
import { HitResult, MoveResult, PlayerPokemon } from "../field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { BooleanHolder, NumberHolder, toDmgValue, isNullOrUndefined, randSeedItem, randSeedInt, type Constructor } from "#app/utils";
|
import { BooleanHolder, NumberHolder, toDmgValue, isNullOrUndefined, randSeedItem, randSeedInt, type Constructor } from "#app/utils";
|
||||||
import { getPokemonNameWithAffix } from "../messages";
|
import { getPokemonNameWithAffix } from "../messages";
|
||||||
@ -12,8 +10,7 @@ import { BattlerTagLapseType, GroundedTag } from "./battler-tags";
|
|||||||
import { getNonVolatileStatusEffects, getStatusEffectDescriptor, getStatusEffectHealText } from "#app/data/status-effect";
|
import { getNonVolatileStatusEffects, getStatusEffectDescriptor, getStatusEffectHealText } from "#app/data/status-effect";
|
||||||
import { Gender } from "./gender";
|
import { Gender } from "./gender";
|
||||||
import type Move from "./moves/move";
|
import type Move from "./moves/move";
|
||||||
import { AttackMove, FlinchAttr, OneHitKOAttr, HitHealAttr, StatusMove, SelfStatusMove, VariablePowerAttr, applyMoveAttrs, VariableMoveTypeAttr, RandomMovesetMoveAttr, RandomMoveAttr, NaturePowerAttr, CopyMoveAttr, NeutralDamageAgainstFlyingTypeMultiplierAttr, FixedDamageAttr } from "./moves/move";
|
import { AttackMove, FlinchAttr, OneHitKOAttr, HitHealAttr, allMoves, StatusMove, SelfStatusMove, VariablePowerAttr, applyMoveAttrs, VariableMoveTypeAttr, RandomMovesetMoveAttr, RandomMoveAttr, NaturePowerAttr, CopyMoveAttr, NeutralDamageAgainstFlyingTypeMultiplierAttr, FixedDamageAttr } from "./moves/move";
|
||||||
import { allMoves } from "./moves/all-moves";
|
|
||||||
import { MoveFlags } from "#enums/MoveFlags";
|
import { MoveFlags } from "#enums/MoveFlags";
|
||||||
import { MoveTarget } from "#enums/MoveTarget";
|
import { MoveTarget } from "#enums/MoveTarget";
|
||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
|
@ -2,13 +2,12 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import type { Arena } from "#app/field/arena";
|
import type { Arena } from "#app/field/arena";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { BooleanHolder, NumberHolder, toDmgValue } from "#app/utils";
|
import { BooleanHolder, NumberHolder, toDmgValue } from "#app/utils";
|
||||||
import { allMoves } from "./moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { MoveTarget } from "#enums/MoveTarget";
|
import { MoveTarget } from "#enums/MoveTarget";
|
||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult, PokemonMove } from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "./moves/pokemon-move";
|
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
import type { BattlerIndex } from "#app/battle";
|
import type { BattlerIndex } from "#app/battle";
|
||||||
import {
|
import {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { getEnumKeys, getEnumValues } from "#app/utils";
|
import { getEnumKeys, getEnumValues } from "#app/utils";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
|
@ -14,10 +14,66 @@ import { DamageMoneyRewardModifier, ExtraModifierModifier, MoneyMultiplierModifi
|
|||||||
import { SpeciesFormKey } from "#enums/species-form-key";
|
import { SpeciesFormKey } from "#enums/species-form-key";
|
||||||
import { speciesStarterCosts } from "./starters";
|
import { speciesStarterCosts } from "./starters";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { SpeciesWildEvolutionDelay } from "#enums/species-wild-evolution-delay";
|
|
||||||
import { EvolutionItem } from "#enums/evolution-item";
|
|
||||||
|
|
||||||
|
|
||||||
|
export enum SpeciesWildEvolutionDelay {
|
||||||
|
NONE,
|
||||||
|
SHORT,
|
||||||
|
MEDIUM,
|
||||||
|
LONG,
|
||||||
|
VERY_LONG,
|
||||||
|
NEVER
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum EvolutionItem {
|
||||||
|
NONE,
|
||||||
|
|
||||||
|
LINKING_CORD,
|
||||||
|
SUN_STONE,
|
||||||
|
MOON_STONE,
|
||||||
|
LEAF_STONE,
|
||||||
|
FIRE_STONE,
|
||||||
|
WATER_STONE,
|
||||||
|
THUNDER_STONE,
|
||||||
|
ICE_STONE,
|
||||||
|
DUSK_STONE,
|
||||||
|
DAWN_STONE,
|
||||||
|
SHINY_STONE,
|
||||||
|
CRACKED_POT,
|
||||||
|
SWEET_APPLE,
|
||||||
|
TART_APPLE,
|
||||||
|
STRAWBERRY_SWEET,
|
||||||
|
UNREMARKABLE_TEACUP,
|
||||||
|
UPGRADE,
|
||||||
|
DUBIOUS_DISC,
|
||||||
|
DRAGON_SCALE,
|
||||||
|
PRISM_SCALE,
|
||||||
|
RAZOR_CLAW,
|
||||||
|
RAZOR_FANG,
|
||||||
|
REAPER_CLOTH,
|
||||||
|
ELECTIRIZER,
|
||||||
|
MAGMARIZER,
|
||||||
|
PROTECTOR,
|
||||||
|
SACHET,
|
||||||
|
WHIPPED_DREAM,
|
||||||
|
SYRUPY_APPLE,
|
||||||
|
CHIPPED_POT,
|
||||||
|
GALARICA_CUFF,
|
||||||
|
GALARICA_WREATH,
|
||||||
|
AUSPICIOUS_ARMOR,
|
||||||
|
MALICIOUS_ARMOR,
|
||||||
|
MASTERPIECE_TEACUP,
|
||||||
|
SUN_FLUTE,
|
||||||
|
MOON_FLUTE,
|
||||||
|
|
||||||
|
BLACK_AUGURITE = 51,
|
||||||
|
PEAT_BLOCK,
|
||||||
|
METAL_ALLOY,
|
||||||
|
SCROLL_OF_DARKNESS,
|
||||||
|
SCROLL_OF_WATERS,
|
||||||
|
LEADERS_CREST
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pokemon Evolution tuple type consisting of:
|
* Pokemon Evolution tuple type consisting of:
|
||||||
* @property 0 {@linkcode Species} The species of the Pokemon.
|
* @property 0 {@linkcode Species} The species of the Pokemon.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { AttackMove, BeakBlastHeaderAttr, DelayedAttackAttr, SelfStatusMove } from "./moves/move";
|
import { AttackMove, BeakBlastHeaderAttr, DelayedAttackAttr, SelfStatusMove, allMoves } from "./moves/move";
|
||||||
import { allMoves } from "./moves/all-moves";
|
|
||||||
import { MoveFlags } from "#enums/MoveFlags";
|
import { MoveFlags } from "#enums/MoveFlags";
|
||||||
import type Pokemon from "../field/pokemon";
|
import type Pokemon from "../field/pokemon";
|
||||||
import { type nil, getFrameMs, getEnumKeys, getEnumValues, animationFileName } from "../utils";
|
import { type nil, getFrameMs, getEnumKeys, getEnumValues, animationFileName } from "../utils";
|
||||||
|
@ -11,12 +11,12 @@ import {
|
|||||||
import { ChargeAnim, CommonAnim, CommonBattleAnim, MoveChargeAnim } from "#app/data/battle-anims";
|
import { ChargeAnim, CommonAnim, CommonBattleAnim, MoveChargeAnim } from "#app/data/battle-anims";
|
||||||
import type Move from "#app/data/moves/move";
|
import type Move from "#app/data/moves/move";
|
||||||
import {
|
import {
|
||||||
|
allMoves,
|
||||||
applyMoveAttrs,
|
applyMoveAttrs,
|
||||||
ConsecutiveUseDoublePowerAttr,
|
ConsecutiveUseDoublePowerAttr,
|
||||||
HealOnAllyAttr,
|
HealOnAllyAttr,
|
||||||
StatusCategoryOnAllyAttr,
|
StatusCategoryOnAllyAttr,
|
||||||
} from "#app/data/moves/move";
|
} from "#app/data/moves/move";
|
||||||
import { allMoves } from "./moves/all-moves";
|
|
||||||
import { MoveFlags } from "#enums/MoveFlags";
|
import { MoveFlags } from "#enums/MoveFlags";
|
||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
import { SpeciesFormChangeAbilityTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangeAbilityTrigger } from "#app/data/pokemon-forms";
|
||||||
@ -24,8 +24,7 @@ import { getStatusEffectHealText } from "#app/data/status-effect";
|
|||||||
import { TerrainType } from "#app/data/terrain";
|
import { TerrainType } from "#app/data/terrain";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { MoveResult } from "#app/field/pokemon";
|
import { HitResult, MoveResult } from "#app/field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import { CommonAnimPhase } from "#app/phases/common-anim-phase";
|
import { CommonAnimPhase } from "#app/phases/common-anim-phase";
|
||||||
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { getPokemonNameWithAffix } from "../messages";
|
import { getPokemonNameWithAffix } from "../messages";
|
||||||
import type Pokemon from "../field/pokemon";
|
import type Pokemon from "../field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult } from "../field/pokemon";
|
||||||
import { getStatusEffectHealText } from "./status-effect";
|
import { getStatusEffectHealText } from "./status-effect";
|
||||||
import { NumberHolder, toDmgValue, randSeedInt } from "#app/utils";
|
import { NumberHolder, toDmgValue, randSeedInt } from "#app/utils";
|
||||||
import {
|
import {
|
||||||
|
@ -6,7 +6,7 @@ import type PokemonSpecies from "#app/data/pokemon-species";
|
|||||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species";
|
import { getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species";
|
||||||
import { speciesStarterCosts } from "#app/data/balance/starters";
|
import { speciesStarterCosts } from "#app/data/balance/starters";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "./moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import type { FixedBattleConfig } from "#app/battle";
|
import type { FixedBattleConfig } from "#app/battle";
|
||||||
import { ClassicFixedBossWaves, BattleType, getRandomTrainerFunc } from "#app/battle";
|
import { ClassicFixedBossWaves, BattleType, getRandomTrainerFunc } from "#app/battle";
|
||||||
import Trainer, { TrainerVariant } from "#app/field/trainer";
|
import Trainer, { TrainerVariant } from "#app/field/trainer";
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
import type Move from "./move";
|
|
||||||
|
|
||||||
export const allMoves: Move[] = [];
|
|
@ -12,17 +12,16 @@ import {
|
|||||||
TypeBoostTag,
|
TypeBoostTag,
|
||||||
} from "../battler-tags";
|
} from "../battler-tags";
|
||||||
import { getPokemonNameWithAffix } from "../../messages";
|
import { getPokemonNameWithAffix } from "../../messages";
|
||||||
import type { AttackMoveResult } from "#app/interfaces/attack-move-result";
|
import type { AttackMoveResult, TurnMove } from "../../field/pokemon";
|
||||||
import type { TurnMove } from "#app/interfaces/turn-move";
|
|
||||||
import type Pokemon from "../../field/pokemon";
|
import type Pokemon from "../../field/pokemon";
|
||||||
import {
|
import {
|
||||||
EnemyPokemon,
|
EnemyPokemon,
|
||||||
|
FieldPosition,
|
||||||
|
HitResult,
|
||||||
MoveResult,
|
MoveResult,
|
||||||
PlayerPokemon,
|
PlayerPokemon,
|
||||||
|
PokemonMove,
|
||||||
} from "../../field/pokemon";
|
} from "../../field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
|
||||||
import { FieldPosition } from "#enums/field-position";
|
|
||||||
import { PokemonMove } from "./pokemon-move";
|
|
||||||
import {
|
import {
|
||||||
getNonVolatileStatusEffects,
|
getNonVolatileStatusEffects,
|
||||||
getStatusEffectHealText,
|
getStatusEffectHealText,
|
||||||
@ -122,7 +121,6 @@ import { MoveFlags } from "#enums/MoveFlags";
|
|||||||
import { MoveEffectTrigger } from "#enums/MoveEffectTrigger";
|
import { MoveEffectTrigger } from "#enums/MoveEffectTrigger";
|
||||||
import { MultiHitType } from "#enums/MultiHitType";
|
import { MultiHitType } from "#enums/MultiHitType";
|
||||||
import { invalidAssistMoves, invalidCopycatMoves, invalidMetronomeMoves, invalidMirrorMoveMoves, invalidSleepTalkMoves } from "./invalid-moves";
|
import { invalidAssistMoves, invalidCopycatMoves, invalidMetronomeMoves, invalidMirrorMoveMoves, invalidSleepTalkMoves } from "./invalid-moves";
|
||||||
import { allMoves } from "./all-moves";
|
|
||||||
|
|
||||||
type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean;
|
type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean;
|
||||||
type UserMoveConditionFunc = (user: Pokemon, move: Move) => boolean;
|
type UserMoveConditionFunc = (user: Pokemon, move: Move) => boolean;
|
||||||
@ -8259,7 +8257,11 @@ export function getMoveTargets(user: Pokemon, move: Moves, replaceTarget?: MoveT
|
|||||||
return { targets: set.filter(p => p?.isActive(true)).map(p => p.getBattlerIndex()).filter(t => t !== undefined), multiple };
|
return { targets: set.filter(p => p?.isActive(true)).map(p => p.getBattlerIndex()).filter(t => t !== undefined), multiple };
|
||||||
}
|
}
|
||||||
|
|
||||||
allMoves.push(new SelfStatusMove(Moves.NONE, PokemonType.NORMAL, MoveCategory.STATUS, -1, -1, 0, 1));
|
export const allMoves: Move[] = [
|
||||||
|
new SelfStatusMove(Moves.NONE, PokemonType.NORMAL, MoveCategory.STATUS, -1, -1, 0, 1),
|
||||||
|
];
|
||||||
|
|
||||||
|
export const selfStatLowerMoves: Moves[] = [];
|
||||||
|
|
||||||
export function initMoves() {
|
export function initMoves() {
|
||||||
allMoves.push(
|
allMoves.push(
|
||||||
@ -11248,4 +11250,9 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.MALIGNANT_CHAIN, PokemonType.POISON, MoveCategory.SPECIAL, 100, 100, 5, 50, 0, 9)
|
new AttackMove(Moves.MALIGNANT_CHAIN, PokemonType.POISON, MoveCategory.SPECIAL, 100, 100, 5, 50, 0, 9)
|
||||||
.attr(StatusEffectAttr, StatusEffect.TOXIC)
|
.attr(StatusEffectAttr, StatusEffect.TOXIC)
|
||||||
);
|
);
|
||||||
|
allMoves.map(m => {
|
||||||
|
if (m.getAttrs(StatStageChangeAttr).some(a => a.selfTarget && a.stages < 0)) {
|
||||||
|
selfStatLowerMoves.push(m.id);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,93 +0,0 @@
|
|||||||
import * as Utils from "#app/utils";
|
|
||||||
import { allMoves } from "./all-moves";
|
|
||||||
import type { Moves } from "#enums/moves";
|
|
||||||
import type Pokemon from "#app/field/pokemon";
|
|
||||||
import type Move from "./move";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrapper class for the {@linkcode Move} class for Pokemon to interact with.
|
|
||||||
* These are the moves assigned to a {@linkcode Pokemon} object.
|
|
||||||
* It links to {@linkcode Move} class via the move ID.
|
|
||||||
* Compared to {@linkcode Move}, this class also tracks if a move has received.
|
|
||||||
* PP Ups, amount of PP used, and things like that.
|
|
||||||
* @see {@linkcode isUsable} - checks if move is restricted, out of PP, or not implemented.
|
|
||||||
* @see {@linkcode getMove} - returns {@linkcode Move} object by looking it up via ID.
|
|
||||||
* @see {@linkcode usePp} - removes a point of PP from the move.
|
|
||||||
* @see {@linkcode getMovePp} - returns amount of PP a move currently has.
|
|
||||||
* @see {@linkcode getPpRatio} - returns the current PP amount / max PP amount.
|
|
||||||
* @see {@linkcode getName} - returns name of {@linkcode Move}.
|
|
||||||
**/
|
|
||||||
export class PokemonMove {
|
|
||||||
public moveId: Moves;
|
|
||||||
public ppUsed: number;
|
|
||||||
public ppUp: number;
|
|
||||||
public virtual: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If defined and nonzero, overrides the maximum PP of the move (e.g., due to move being copied by Transform).
|
|
||||||
* This also nullifies all effects of `ppUp`.
|
|
||||||
*/
|
|
||||||
public maxPpOverride?: number;
|
|
||||||
|
|
||||||
constructor(moveId: Moves, ppUsed = 0, ppUp = 0, virtual = false, maxPpOverride?: number) {
|
|
||||||
this.moveId = moveId;
|
|
||||||
this.ppUsed = ppUsed;
|
|
||||||
this.ppUp = ppUp;
|
|
||||||
this.virtual = virtual;
|
|
||||||
this.maxPpOverride = maxPpOverride;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the move can be selected or performed by a Pokemon, without consideration for the move's targets.
|
|
||||||
* The move is unusable if it is out of PP, restricted by an effect, or unimplemented.
|
|
||||||
*
|
|
||||||
* @param pokemon - {@linkcode Pokemon} that would be using this move
|
|
||||||
* @param ignorePp - If `true`, skips the PP check
|
|
||||||
* @param ignoreRestrictionTags - If `true`, skips the check for move restriction tags (see {@link MoveRestrictionBattlerTag})
|
|
||||||
* @returns `true` if the move can be selected and used by the Pokemon, otherwise `false`.
|
|
||||||
*/
|
|
||||||
isUsable(pokemon: Pokemon, ignorePp = false, ignoreRestrictionTags = false): boolean {
|
|
||||||
if (this.moveId && !ignoreRestrictionTags && pokemon.isMoveRestricted(this.moveId, pokemon)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.getMove().name.endsWith(" (N)")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ignorePp || this.ppUsed < this.getMovePp() || this.getMove().pp === -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
getMove(): Move {
|
|
||||||
return allMoves[this.moveId];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets {@link ppUsed} for this move and ensures the value does not exceed {@link getMovePp}
|
|
||||||
* @param {number} count Amount of PP to use
|
|
||||||
*/
|
|
||||||
usePp(count = 1) {
|
|
||||||
this.ppUsed = Math.min(this.ppUsed + count, this.getMovePp());
|
|
||||||
}
|
|
||||||
|
|
||||||
getMovePp(): number {
|
|
||||||
return this.maxPpOverride || this.getMove().pp + this.ppUp * Utils.toDmgValue(this.getMove().pp / 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
getPpRatio(): number {
|
|
||||||
return 1 - this.ppUsed / this.getMovePp();
|
|
||||||
}
|
|
||||||
|
|
||||||
getName(): string {
|
|
||||||
return this.getMove().name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies an existing move or creates a valid PokemonMove object from json representing one
|
|
||||||
* @param source - The data for the move to copy
|
|
||||||
* @return A valid pokemonmove object
|
|
||||||
*/
|
|
||||||
static loadMove(source: PokemonMove | any): PokemonMove {
|
|
||||||
return new PokemonMove(source.moveId, source.ppUsed, source.ppUp, source.virtual, source.maxPpOverride);
|
|
||||||
}
|
|
||||||
}
|
|
@ -7,8 +7,7 @@ import {
|
|||||||
transitionMysteryEncounterIntroVisuals,
|
transitionMysteryEncounterIntroVisuals,
|
||||||
} from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
} from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { EnemyPokemon } from "#app/field/pokemon";
|
import { EnemyPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import type { BerryModifierType, PokemonHeldItemModifierType } from "#app/modifier/modifier-type";
|
import type { BerryModifierType, PokemonHeldItemModifierType } from "#app/modifier/modifier-type";
|
||||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
|
@ -24,7 +24,7 @@ import { TrainerType } from "#enums/trainer-type";
|
|||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { getEncounterText, showEncounterDialogue } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
import { getEncounterText, showEncounterDialogue } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
||||||
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
@ -50,7 +50,7 @@ import {
|
|||||||
} from "#app/modifier/modifier";
|
} from "#app/modifier/modifier";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import MoveInfoOverlay from "#app/ui/move-info-overlay";
|
import MoveInfoOverlay from "#app/ui/move-info-overlay";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { ModifierTier } from "#app/modifier/modifier-tier";
|
import { ModifierTier } from "#app/modifier/modifier-tier";
|
||||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||||
import { getSpriteKeysFromSpecies } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils";
|
import { getSpriteKeysFromSpecies } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils";
|
||||||
|
@ -37,7 +37,7 @@ import { Mode } from "#app/ui/ui";
|
|||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import type { OptionSelectConfig } from "#app/ui/abstact-option-select-ui-handler";
|
import type { OptionSelectConfig } from "#app/ui/abstact-option-select-ui-handler";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { Ability } from "#app/data/ability";
|
import { Ability } from "#app/data/ability";
|
||||||
import { BerryModifier } from "#app/modifier/modifier";
|
import { BerryModifier } from "#app/modifier/modifier";
|
||||||
import { BerryType } from "#enums/berry-type";
|
import { BerryType } from "#enums/berry-type";
|
||||||
|
@ -23,8 +23,7 @@ import { getPokemonSpecies } from "#app/data/pokemon-species";
|
|||||||
import { TrainerSlot } from "#enums/trainer-slot";
|
import { TrainerSlot } from "#enums/trainer-slot";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { EnemyPokemon } from "#app/field/pokemon";
|
import { EnemyPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||||
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
import { LearnMovePhase } from "#app/phases/learn-move-phase";
|
||||||
|
@ -7,8 +7,7 @@ import {
|
|||||||
setEncounterExp,
|
setEncounterExp,
|
||||||
setEncounterRewards,
|
setEncounterRewards,
|
||||||
} from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
} from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||||
import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";
|
import type { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";
|
||||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
|
@ -26,7 +26,7 @@ import { Gender } from "#app/data/gender";
|
|||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { EncounterBattleAnim } from "#app/data/battle-anims";
|
import { EncounterBattleAnim } from "#app/data/battle-anims";
|
||||||
import { WeatherType } from "#enums/weather-type";
|
import { WeatherType } from "#enums/weather-type";
|
||||||
|
@ -13,7 +13,7 @@ import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/myst
|
|||||||
import { TrainerSlot } from "#enums/trainer-slot";
|
import { TrainerSlot } from "#enums/trainer-slot";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { FieldPosition } from "#enums/field-position";
|
import { FieldPosition } from "#app/field/pokemon";
|
||||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
||||||
import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements";
|
import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements";
|
||||||
import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
||||||
|
@ -26,8 +26,7 @@ import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode
|
|||||||
import { NumberHolder, isNullOrUndefined, randInt, randSeedInt, randSeedShuffle, randSeedItem } from "#app/utils";
|
import { NumberHolder, isNullOrUndefined, randInt, randSeedInt, randSeedShuffle, randSeedItem } from "#app/utils";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { EnemyPokemon } from "#app/field/pokemon";
|
import { EnemyPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import type { PokemonHeldItemModifier } from "#app/modifier/modifier";
|
import type { PokemonHeldItemModifier } from "#app/modifier/modifier";
|
||||||
import {
|
import {
|
||||||
HiddenAbilityRateBoosterModifier,
|
HiddenAbilityRateBoosterModifier,
|
||||||
|
@ -11,7 +11,7 @@ import { applyDamageToPokemon } from "#app/data/mystery-encounters/utils/encount
|
|||||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||||
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
||||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
|
|
||||||
const OPTION_1_REQUIRED_MOVE = Moves.SURF;
|
const OPTION_1_REQUIRED_MOVE = Moves.SURF;
|
||||||
const OPTION_2_REQUIRED_MOVE = Moves.FLY;
|
const OPTION_2_REQUIRED_MOVE = Moves.FLY;
|
||||||
|
@ -21,8 +21,7 @@ import {
|
|||||||
import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { AiType, PokemonMove } from "#app/field/pokemon";
|
||||||
import { AiType } from "#enums/ai-type";
|
|
||||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
||||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||||
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
||||||
|
@ -17,7 +17,7 @@ import { getPokemonSpecies } from "#app/data/pokemon-species";
|
|||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import { Nature } from "#enums/nature";
|
import { Nature } from "#enums/nature";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
||||||
import { modifyPlayerPokemonBST } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils";
|
import { modifyPlayerPokemonBST } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
|
@ -25,7 +25,7 @@ import { ModifierTier } from "#app/modifier/modifier-tier";
|
|||||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||||
import { randSeedInt } from "#app/utils";
|
import { randSeedInt } from "#app/utils";
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
import { CHARMING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups";
|
import { CHARMING_MOVES } from "#app/data/mystery-encounters/requirements/requirement-groups";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import type { EnemyPokemon } from "#app/field/pokemon";
|
import type { EnemyPokemon } from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter";
|
import type MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter";
|
||||||
|
@ -16,7 +16,7 @@ import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
|||||||
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { NumberHolder, isNullOrUndefined, randSeedInt, randSeedShuffle } from "#app/utils";
|
import { NumberHolder, isNullOrUndefined, randSeedInt, randSeedShuffle } from "#app/utils";
|
||||||
import type PokemonSpecies from "#app/data/pokemon-species";
|
import type PokemonSpecies from "#app/data/pokemon-species";
|
||||||
import { allSpecies, getPokemonSpecies } from "#app/data/pokemon-species";
|
import { allSpecies, getPokemonSpecies } from "#app/data/pokemon-species";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { allAbilities } from "#app/data/ability";
|
import { allAbilities } from "#app/data/ability";
|
||||||
import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
|
import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
|
||||||
import { EvolutionItem } from "#enums/evolution-item";
|
|
||||||
import { Nature } from "#enums/nature";
|
import { Nature } from "#enums/nature";
|
||||||
import { FormChangeItem, pokemonFormChanges, SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms";
|
import { FormChangeItem, pokemonFormChanges, SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
import type { EnemyPartyConfig } from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import type { PokemonMove } from "../moves/pokemon-move";
|
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { capitalizeFirstLetter, isNullOrUndefined } from "#app/utils";
|
import { capitalizeFirstLetter, isNullOrUndefined } from "#app/utils";
|
||||||
import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { Moves } from "#app/enums/moves";
|
import type { Moves } from "#app/enums/moves";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { isNullOrUndefined } from "#app/utils";
|
import { isNullOrUndefined } from "#app/utils";
|
||||||
import { EncounterPokemonRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements";
|
import { EncounterPokemonRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
@ -7,12 +7,9 @@ import {
|
|||||||
WEIGHT_INCREMENT_ON_SPAWN_MISS,
|
WEIGHT_INCREMENT_ON_SPAWN_MISS,
|
||||||
} from "#app/data/mystery-encounters/mystery-encounters";
|
} from "#app/data/mystery-encounters/mystery-encounters";
|
||||||
import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { AiType, PlayerPokemon } from "#app/field/pokemon";
|
||||||
import type { AiType } from "#enums/ai-type";
|
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { EnemyPokemon, PokemonSummonData } from "#app/field/pokemon";
|
import { EnemyPokemon, FieldPosition, PokemonMove, PokemonSummonData } from "#app/field/pokemon";
|
||||||
import { FieldPosition } from "#enums/field-position";
|
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import type { CustomModifierSettings, ModifierType } from "#app/modifier/modifier-type";
|
import type { CustomModifierSettings, ModifierType } from "#app/modifier/modifier-type";
|
||||||
import {
|
import {
|
||||||
getPartyLuckValue,
|
getPartyLuckValue,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { PokemonFormChangeItemModifier } from "../modifier/modifier";
|
import { PokemonFormChangeItemModifier } from "../modifier/modifier";
|
||||||
import type Pokemon from "../field/pokemon";
|
import type Pokemon from "../field/pokemon";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
import { allMoves } from "./moves/all-moves";
|
import { allMoves } from "./moves/move";
|
||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
import type { Constructor, nil } from "#app/utils";
|
import type { Constructor, nil } from "#app/utils";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
|
@ -13,8 +13,11 @@ import { uncatchableSpecies } from "#app/data/balance/biomes";
|
|||||||
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
||||||
import { GrowthRate } from "#app/data/exp";
|
import { GrowthRate } from "#app/data/exp";
|
||||||
import type { EvolutionLevel } from "#app/data/balance/pokemon-evolutions";
|
import type { EvolutionLevel } from "#app/data/balance/pokemon-evolutions";
|
||||||
import { pokemonEvolutions, pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions";
|
import {
|
||||||
import { SpeciesWildEvolutionDelay } from "#enums/species-wild-evolution-delay";
|
SpeciesWildEvolutionDelay,
|
||||||
|
pokemonEvolutions,
|
||||||
|
pokemonPrevolutions,
|
||||||
|
} from "#app/data/balance/pokemon-evolutions";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import type { LevelMoves } from "#app/data/balance/pokemon-level-moves";
|
import type { LevelMoves } from "#app/data/balance/pokemon-level-moves";
|
||||||
import {
|
import {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { toReadableString, isNullOrUndefined, randSeedItem, randSeedInt } from "#app/utils";
|
import { toReadableString, isNullOrUndefined, randSeedItem, randSeedInt } from "#app/utils";
|
||||||
import { pokemonEvolutions, pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions";
|
import { pokemonEvolutions, pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions";
|
||||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
export enum AiType {
|
|
||||||
RANDOM,
|
|
||||||
SMART_RANDOM,
|
|
||||||
SMART
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
export enum EvolutionItem {
|
|
||||||
NONE,
|
|
||||||
|
|
||||||
LINKING_CORD,
|
|
||||||
SUN_STONE,
|
|
||||||
MOON_STONE,
|
|
||||||
LEAF_STONE,
|
|
||||||
FIRE_STONE,
|
|
||||||
WATER_STONE,
|
|
||||||
THUNDER_STONE,
|
|
||||||
ICE_STONE,
|
|
||||||
DUSK_STONE,
|
|
||||||
DAWN_STONE,
|
|
||||||
SHINY_STONE,
|
|
||||||
CRACKED_POT,
|
|
||||||
SWEET_APPLE,
|
|
||||||
TART_APPLE,
|
|
||||||
STRAWBERRY_SWEET,
|
|
||||||
UNREMARKABLE_TEACUP,
|
|
||||||
UPGRADE,
|
|
||||||
DUBIOUS_DISC,
|
|
||||||
DRAGON_SCALE,
|
|
||||||
PRISM_SCALE,
|
|
||||||
RAZOR_CLAW,
|
|
||||||
RAZOR_FANG,
|
|
||||||
REAPER_CLOTH,
|
|
||||||
ELECTIRIZER,
|
|
||||||
MAGMARIZER,
|
|
||||||
PROTECTOR,
|
|
||||||
SACHET,
|
|
||||||
WHIPPED_DREAM,
|
|
||||||
SYRUPY_APPLE,
|
|
||||||
CHIPPED_POT,
|
|
||||||
GALARICA_CUFF,
|
|
||||||
GALARICA_WREATH,
|
|
||||||
AUSPICIOUS_ARMOR,
|
|
||||||
MALICIOUS_ARMOR,
|
|
||||||
MASTERPIECE_TEACUP,
|
|
||||||
SUN_FLUTE,
|
|
||||||
MOON_FLUTE,
|
|
||||||
|
|
||||||
BLACK_AUGURITE = 51,
|
|
||||||
PEAT_BLOCK,
|
|
||||||
METAL_ALLOY,
|
|
||||||
SCROLL_OF_DARKNESS,
|
|
||||||
SCROLL_OF_WATERS,
|
|
||||||
LEADERS_CREST
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
export enum FieldPosition {
|
|
||||||
CENTER,
|
|
||||||
LEFT,
|
|
||||||
RIGHT
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
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,8 +0,0 @@
|
|||||||
export enum LearnMoveContext {
|
|
||||||
MISC,
|
|
||||||
LEVEL_UP,
|
|
||||||
RELEARN,
|
|
||||||
EVOLUTION,
|
|
||||||
EVOLUTION_FUSED, // If fusionSpecies has Evolved
|
|
||||||
EVOLUTION_FUSED_BASE, // If fusion's base species has Evolved
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
export enum SpeciesWildEvolutionDelay {
|
|
||||||
NONE,
|
|
||||||
SHORT,
|
|
||||||
MEDIUM,
|
|
||||||
LONG,
|
|
||||||
VERY_LONG,
|
|
||||||
NEVER
|
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
import { TextStyle, addTextObject } from "../ui/text";
|
import { TextStyle, addTextObject } from "../ui/text";
|
||||||
import type { DamageResult } from "#app/@types/damage-result";
|
import type { DamageResult } from "./pokemon";
|
||||||
import type Pokemon from "./pokemon";
|
import type Pokemon from "./pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult } from "./pokemon";
|
||||||
import { formatStat, fixedInt } from "#app/utils";
|
import { formatStat, fixedInt } from "#app/utils";
|
||||||
import type { BattlerIndex } from "../battle";
|
import type { BattlerIndex } from "../battle";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
@ -17,6 +17,7 @@ import {
|
|||||||
applyMoveAttrs,
|
applyMoveAttrs,
|
||||||
FixedDamageAttr,
|
FixedDamageAttr,
|
||||||
VariableAtkAttr,
|
VariableAtkAttr,
|
||||||
|
allMoves,
|
||||||
TypelessAttr,
|
TypelessAttr,
|
||||||
CritOnlyAttr,
|
CritOnlyAttr,
|
||||||
getMoveTargets,
|
getMoveTargets,
|
||||||
@ -41,7 +42,6 @@ import {
|
|||||||
VariableMoveTypeChartAttr,
|
VariableMoveTypeChartAttr,
|
||||||
HpSplitAttr,
|
HpSplitAttr,
|
||||||
} from "#app/data/moves/move";
|
} from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { MoveTarget } from "#enums/MoveTarget";
|
import { MoveTarget } from "#enums/MoveTarget";
|
||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
import type { PokemonSpeciesForm } from "#app/data/pokemon-species";
|
import type { PokemonSpeciesForm } from "#app/data/pokemon-species";
|
||||||
@ -214,7 +214,7 @@ import {
|
|||||||
SpeciesFormChangeActiveTrigger,
|
SpeciesFormChangeActiveTrigger,
|
||||||
SpeciesFormChangeLapseTeraTrigger,
|
SpeciesFormChangeLapseTeraTrigger,
|
||||||
SpeciesFormChangeMoveLearnedTrigger,
|
SpeciesFormChangeMoveLearnedTrigger,
|
||||||
SpeciesFormChangePostMoveTrigger,
|
SpeciesFormChangePostMoveTrigger
|
||||||
} from "#app/data/pokemon-forms";
|
} from "#app/data/pokemon-forms";
|
||||||
import { TerrainType } from "#app/data/terrain";
|
import { TerrainType } from "#app/data/terrain";
|
||||||
import type { TrainerSlot } from "#enums/trainer-slot";
|
import type { TrainerSlot } from "#enums/trainer-slot";
|
||||||
@ -259,15 +259,21 @@ import { MoveFlags } from "#enums/MoveFlags";
|
|||||||
import { timedEventManager } from "#app/global-event-manager";
|
import { timedEventManager } from "#app/global-event-manager";
|
||||||
import { loadMoveAnimations } from "#app/sprites/pokemon-asset-loader";
|
import { loadMoveAnimations } from "#app/sprites/pokemon-asset-loader";
|
||||||
import { ResetStatusPhase } from "#app/phases/reset-status-phase";
|
import { ResetStatusPhase } from "#app/phases/reset-status-phase";
|
||||||
import { LearnMoveContext } from "#enums/learn-move-context";
|
|
||||||
import { TurnMove } from "#app/interfaces/turn-move";
|
export enum LearnMoveSituation {
|
||||||
import { AiType } from "#enums/ai-type";
|
MISC,
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
LEVEL_UP,
|
||||||
import { DamageCalculationResult } from "#app/interfaces/damage-calculation-result";
|
RELEARN,
|
||||||
import { FieldPosition } from "#enums/field-position";
|
EVOLUTION,
|
||||||
import { AttackMoveResult } from "#app/interfaces/attack-move-result";
|
EVOLUTION_FUSED, // If fusionSpecies has Evolved
|
||||||
import { HitResult } from "#enums/hit-result";
|
EVOLUTION_FUSED_BASE, // If fusion's base species has Evolved
|
||||||
import { DamageResult } from "#app/@types/damage-result";
|
}
|
||||||
|
|
||||||
|
export enum FieldPosition {
|
||||||
|
CENTER,
|
||||||
|
LEFT,
|
||||||
|
RIGHT,
|
||||||
|
}
|
||||||
|
|
||||||
export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
public id: number;
|
public id: number;
|
||||||
@ -2919,7 +2925,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
includeEvolutionMoves = false,
|
includeEvolutionMoves = false,
|
||||||
simulateEvolutionChain = false,
|
simulateEvolutionChain = false,
|
||||||
includeRelearnerMoves = false,
|
includeRelearnerMoves = false,
|
||||||
learnSituation: LearnMoveContext = LearnMoveContext.MISC,
|
learnSituation: LearnMoveSituation = LearnMoveSituation.MISC,
|
||||||
): LevelMoves {
|
): LevelMoves {
|
||||||
const ret: LevelMoves = [];
|
const ret: LevelMoves = [];
|
||||||
let levelMoves: LevelMoves = [];
|
let levelMoves: LevelMoves = [];
|
||||||
@ -2927,7 +2933,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
startingLevel = this.level;
|
startingLevel = this.level;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
learnSituation === LearnMoveContext.EVOLUTION_FUSED &&
|
learnSituation === LearnMoveSituation.EVOLUTION_FUSED &&
|
||||||
this.fusionSpecies
|
this.fusionSpecies
|
||||||
) {
|
) {
|
||||||
// For fusion evolutions, get ONLY the moves of the component mon that evolved
|
// For fusion evolutions, get ONLY the moves of the component mon that evolved
|
||||||
@ -2979,7 +2985,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.fusionSpecies &&
|
this.fusionSpecies &&
|
||||||
learnSituation !== LearnMoveContext.EVOLUTION_FUSED_BASE
|
learnSituation !== LearnMoveSituation.EVOLUTION_FUSED_BASE
|
||||||
) {
|
) {
|
||||||
// For fusion evolutions, get ONLY the moves of the component mon that evolved
|
// For fusion evolutions, get ONLY the moves of the component mon that evolved
|
||||||
if (simulateEvolutionChain) {
|
if (simulateEvolutionChain) {
|
||||||
@ -7773,6 +7779,24 @@ interface IllusionData {
|
|||||||
level?: number
|
level?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TurnMove {
|
||||||
|
move: Moves;
|
||||||
|
targets: BattlerIndex[];
|
||||||
|
result?: MoveResult;
|
||||||
|
virtual?: boolean;
|
||||||
|
turn?: number;
|
||||||
|
ignorePP?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AttackMoveResult {
|
||||||
|
move: Moves;
|
||||||
|
result: DamageResult;
|
||||||
|
damage: number;
|
||||||
|
critical: boolean;
|
||||||
|
sourceId: number;
|
||||||
|
sourceBattlerIndex: BattlerIndex;
|
||||||
|
}
|
||||||
|
|
||||||
export class PokemonSummonData {
|
export class PokemonSummonData {
|
||||||
/** [Atk, Def, SpAtk, SpDef, Spd, Acc, Eva] */
|
/** [Atk, Def, SpAtk, SpDef, Spd, Acc, Eva] */
|
||||||
public statStages: number[] = [0, 0, 0, 0, 0, 0, 0];
|
public statStages: number[] = [0, 0, 0, 0, 0, 0, 0];
|
||||||
@ -7845,6 +7869,12 @@ export class PokemonTurnData {
|
|||||||
public extraTurns = 0;
|
public extraTurns = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum AiType {
|
||||||
|
RANDOM,
|
||||||
|
SMART_RANDOM,
|
||||||
|
SMART,
|
||||||
|
}
|
||||||
|
|
||||||
export enum MoveResult {
|
export enum MoveResult {
|
||||||
PENDING,
|
PENDING,
|
||||||
SUCCESS,
|
SUCCESS,
|
||||||
@ -7852,3 +7882,151 @@ export enum MoveResult {
|
|||||||
MISS,
|
MISS,
|
||||||
OTHER,
|
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
|
||||||
|
| HitResult.NOT_VERY_EFFECTIVE
|
||||||
|
| HitResult.ONE_HIT_KO
|
||||||
|
| HitResult.CONFUSION
|
||||||
|
| 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper class for the {@linkcode Move} class for Pokemon to interact with.
|
||||||
|
* These are the moves assigned to a {@linkcode Pokemon} object.
|
||||||
|
* It links to {@linkcode Move} class via the move ID.
|
||||||
|
* Compared to {@linkcode Move}, this class also tracks if a move has received.
|
||||||
|
* PP Ups, amount of PP used, and things like that.
|
||||||
|
* @see {@linkcode isUsable} - checks if move is restricted, out of PP, or not implemented.
|
||||||
|
* @see {@linkcode getMove} - returns {@linkcode Move} object by looking it up via ID.
|
||||||
|
* @see {@linkcode usePp} - removes a point of PP from the move.
|
||||||
|
* @see {@linkcode getMovePp} - returns amount of PP a move currently has.
|
||||||
|
* @see {@linkcode getPpRatio} - returns the current PP amount / max PP amount.
|
||||||
|
* @see {@linkcode getName} - returns name of {@linkcode Move}.
|
||||||
|
**/
|
||||||
|
export class PokemonMove {
|
||||||
|
public moveId: Moves;
|
||||||
|
public ppUsed: number;
|
||||||
|
public ppUp: number;
|
||||||
|
public virtual: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If defined and nonzero, overrides the maximum PP of the move (e.g., due to move being copied by Transform).
|
||||||
|
* This also nullifies all effects of `ppUp`.
|
||||||
|
*/
|
||||||
|
public maxPpOverride?: number;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
moveId: Moves,
|
||||||
|
ppUsed = 0,
|
||||||
|
ppUp = 0,
|
||||||
|
virtual = false,
|
||||||
|
maxPpOverride?: number,
|
||||||
|
) {
|
||||||
|
this.moveId = moveId;
|
||||||
|
this.ppUsed = ppUsed;
|
||||||
|
this.ppUp = ppUp;
|
||||||
|
this.virtual = virtual;
|
||||||
|
this.maxPpOverride = maxPpOverride;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the move can be selected or performed by a Pokemon, without consideration for the move's targets.
|
||||||
|
* The move is unusable if it is out of PP, restricted by an effect, or unimplemented.
|
||||||
|
*
|
||||||
|
* @param {Pokemon} pokemon {@linkcode Pokemon} that would be using this move
|
||||||
|
* @param {boolean} ignorePp If `true`, skips the PP check
|
||||||
|
* @param {boolean} ignoreRestrictionTags If `true`, skips the check for move restriction tags (see {@link MoveRestrictionBattlerTag})
|
||||||
|
* @returns `true` if the move can be selected and used by the Pokemon, otherwise `false`.
|
||||||
|
*/
|
||||||
|
isUsable(
|
||||||
|
pokemon: Pokemon,
|
||||||
|
ignorePp = false,
|
||||||
|
ignoreRestrictionTags = false,
|
||||||
|
): boolean {
|
||||||
|
if (
|
||||||
|
this.moveId &&
|
||||||
|
!ignoreRestrictionTags &&
|
||||||
|
pokemon.isMoveRestricted(this.moveId, pokemon)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.getMove().name.endsWith(" (N)")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
ignorePp || this.ppUsed < this.getMovePp() || this.getMove().pp === -1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getMove(): Move {
|
||||||
|
return allMoves[this.moveId];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets {@link ppUsed} for this move and ensures the value does not exceed {@link getMovePp}
|
||||||
|
* @param {number} count Amount of PP to use
|
||||||
|
*/
|
||||||
|
usePp(count = 1) {
|
||||||
|
this.ppUsed = Math.min(this.ppUsed + count, this.getMovePp());
|
||||||
|
}
|
||||||
|
|
||||||
|
getMovePp(): number {
|
||||||
|
return (
|
||||||
|
this.maxPpOverride ||
|
||||||
|
this.getMove().pp + this.ppUp * toDmgValue(this.getMove().pp / 5)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getPpRatio(): number {
|
||||||
|
return 1 - this.ppUsed / this.getMovePp();
|
||||||
|
}
|
||||||
|
|
||||||
|
getName(): string {
|
||||||
|
return this.getMove().name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies an existing move or creates a valid PokemonMove object from json representing one
|
||||||
|
* @param {PokemonMove | any} source The data for the move to copy
|
||||||
|
* @return {PokemonMove} A valid pokemonmove object
|
||||||
|
*/
|
||||||
|
static loadMove(source: PokemonMove | any): PokemonMove {
|
||||||
|
return new PokemonMove(
|
||||||
|
source.moveId,
|
||||||
|
source.ppUsed,
|
||||||
|
source.ppUp,
|
||||||
|
source.virtual,
|
||||||
|
source.maxPpOverride,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
import type { BattlerIndex } from "#app/battle";
|
|
||||||
import type { DamageResult } from "#app/@types/damage-result";
|
|
||||||
import type { Moves } from "#enums/moves";
|
|
||||||
|
|
||||||
export interface AttackMoveResult {
|
|
||||||
move: Moves;
|
|
||||||
result: DamageResult;
|
|
||||||
damage: number;
|
|
||||||
critical: boolean;
|
|
||||||
sourceId: number;
|
|
||||||
sourceBattlerIndex: BattlerIndex;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
import type { HitResult } from "#enums/hit-result";
|
|
||||||
|
|
||||||
/** 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;
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
import type { BattlerIndex } from "#app/battle";
|
|
||||||
import type { MoveResult } from "#app/field/pokemon";
|
|
||||||
import type { Moves } from "#enums/moves";
|
|
||||||
|
|
||||||
export interface TurnMove {
|
|
||||||
move: Moves;
|
|
||||||
targets: BattlerIndex[];
|
|
||||||
result?: MoveResult;
|
|
||||||
virtual?: boolean;
|
|
||||||
turn?: number;
|
|
||||||
ignorePP?: boolean;
|
|
||||||
}
|
|
@ -1,10 +1,8 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
|
import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
|
||||||
import { EvolutionItem } from "#enums/evolution-item";
|
|
||||||
import { tmPoolTiers, tmSpecies } from "#app/data/balance/tms";
|
import { tmPoolTiers, tmSpecies } from "#app/data/balance/tms";
|
||||||
import { getBerryEffectDescription, getBerryName } from "#app/data/berry";
|
import { getBerryEffectDescription, getBerryName } from "#app/data/berry";
|
||||||
import { AttackMove } from "#app/data/moves/move";
|
import { allMoves, AttackMove } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { getNatureName, getNatureStatMultiplier } from "#app/data/nature";
|
import { getNatureName, getNatureStatMultiplier } from "#app/data/nature";
|
||||||
import { getPokeballCatchMultiplier, getPokeballName, MAX_PER_TYPE_POKEBALLS } from "#app/data/pokeball";
|
import { getPokeballCatchMultiplier, getPokeballName, MAX_PER_TYPE_POKEBALLS } from "#app/data/pokeball";
|
||||||
import {
|
import {
|
||||||
@ -15,8 +13,7 @@ import {
|
|||||||
} from "#app/data/pokemon-forms";
|
} from "#app/data/pokemon-forms";
|
||||||
import { getStatusEffectDescriptor } from "#app/data/status-effect";
|
import { getStatusEffectDescriptor } from "#app/data/status-effect";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
|
import type { EnemyPokemon, PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import {
|
import {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { FusionSpeciesFormEvolution, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
|
import { FusionSpeciesFormEvolution, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
|
||||||
import { getBerryEffectFunc, getBerryPredicate } from "#app/data/berry";
|
import { getBerryEffectFunc, getBerryPredicate } from "#app/data/berry";
|
||||||
import { getLevelTotalExp } from "#app/data/exp";
|
import { getLevelTotalExp } from "#app/data/exp";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { MAX_PER_TYPE_POKEBALLS } from "#app/data/pokeball";
|
import { MAX_PER_TYPE_POKEBALLS } from "#app/data/pokeball";
|
||||||
import { type FormChangeItem, SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms";
|
import { type FormChangeItem, SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms";
|
||||||
import { getStatusEffectHealText } from "#app/data/status-effect";
|
import { getStatusEffectHealText } from "#app/data/status-effect";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { type PokeballCounts } from "#app/battle-scene";
|
import { type PokeballCounts } from "#app/battle-scene";
|
||||||
import { EvolutionItem } from "#enums/evolution-item";
|
import { EvolutionItem } from "#app/data/balance/pokemon-evolutions";
|
||||||
import { Gender } from "#app/data/gender";
|
import { Gender } from "#app/data/gender";
|
||||||
import { FormChangeItem } from "#app/data/pokemon-forms";
|
import { FormChangeItem } from "#app/data/pokemon-forms";
|
||||||
import { Variant } from "#app/sprites/variant";
|
import { Variant } from "#app/sprites/variant";
|
||||||
|
@ -11,9 +11,8 @@ import { BattlerTagType } from "#app/enums/battler-tag-type";
|
|||||||
import { Biome } from "#app/enums/biome";
|
import { Biome } from "#app/enums/biome";
|
||||||
import { Moves } from "#app/enums/moves";
|
import { Moves } from "#app/enums/moves";
|
||||||
import { PokeballType } from "#enums/pokeball";
|
import { PokeballType } from "#enums/pokeball";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon, TurnMove } from "#app/field/pokemon";
|
||||||
import type { TurnMove } from "#app/interfaces/turn-move";
|
import { FieldPosition } from "#app/field/pokemon";
|
||||||
import { FieldPosition } from "#enums/field-position";
|
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import { Command } from "#app/ui/command-ui-handler";
|
import { Command } from "#app/ui/command-ui-handler";
|
||||||
import { Mode } from "#app/ui/ui";
|
import { Mode } from "#app/ui/ui";
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { BattlerIndex } from "#app/battle";
|
import type { BattlerIndex } from "#app/battle";
|
||||||
import { BattleSpec } from "#enums/battle-spec";
|
import { BattleSpec } from "#enums/battle-spec";
|
||||||
import type { DamageResult } from "#app/@types/damage-result";
|
import { type DamageResult, HitResult } from "#app/field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
|
||||||
import { fixedInt } from "#app/utils";
|
import { fixedInt } from "#app/utils";
|
||||||
import { PokemonPhase } from "#app/phases/pokemon-phase";
|
import { PokemonPhase } from "#app/phases/pokemon-phase";
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import { TrainerSlot } from "#enums/trainer-slot";
|
|||||||
import { getRandomWeatherType } from "#app/data/weather";
|
import { getRandomWeatherType } from "#app/data/weather";
|
||||||
import { EncounterPhaseEvent } from "#app/events/battle-scene";
|
import { EncounterPhaseEvent } from "#app/events/battle-scene";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { FieldPosition } from "#enums/field-position";
|
import { FieldPosition } from "#app/field/pokemon";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import { BoostBugSpawnModifier, IvScannerModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier";
|
import { BoostBugSpawnModifier, IvScannerModifier, TurnHeldItemTransferModifier } from "#app/modifier/modifier";
|
||||||
import { ModifierPoolType, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type";
|
import { ModifierPoolType, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type";
|
||||||
|
@ -10,7 +10,7 @@ import { Mode } from "#app/ui/ui";
|
|||||||
import { cos, sin } from "#app/field/anims";
|
import { cos, sin } from "#app/field/anims";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { LearnMoveContext } from "#enums/learn-move-context";
|
import { LearnMoveSituation } from "#app/field/pokemon";
|
||||||
import { getTypeRgb } from "#app/data/type";
|
import { getTypeRgb } from "#app/data/type";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
@ -343,11 +343,11 @@ export class EvolutionPhase extends Phase {
|
|||||||
this.evolutionHandler.canCancel = false;
|
this.evolutionHandler.canCancel = false;
|
||||||
|
|
||||||
this.pokemon.evolve(this.evolution, this.pokemon.species).then(() => {
|
this.pokemon.evolve(this.evolution, this.pokemon.species).then(() => {
|
||||||
const learnSituation: LearnMoveContext = this.fusionSpeciesEvolved
|
const learnSituation: LearnMoveSituation = this.fusionSpeciesEvolved
|
||||||
? LearnMoveContext.EVOLUTION_FUSED
|
? LearnMoveSituation.EVOLUTION_FUSED
|
||||||
: this.pokemon.fusionSpecies
|
: this.pokemon.fusionSpecies
|
||||||
? LearnMoveContext.EVOLUTION_FUSED_BASE
|
? LearnMoveSituation.EVOLUTION_FUSED_BASE
|
||||||
: LearnMoveContext.EVOLUTION;
|
: LearnMoveSituation.EVOLUTION;
|
||||||
const levelMoves = this.pokemon
|
const levelMoves = this.pokemon
|
||||||
.getLevelMoves(this.lastLevel + 1, true, false, false, learnSituation)
|
.getLevelMoves(this.lastLevel + 1, true, false, false, learnSituation)
|
||||||
.filter(lm => lm[0] === EVOLVE_MOVE);
|
.filter(lm => lm[0] === EVOLVE_MOVE);
|
||||||
|
@ -12,16 +12,13 @@ import {
|
|||||||
import type { DestinyBondTag, GrudgeTag } from "#app/data/battler-tags";
|
import type { DestinyBondTag, GrudgeTag } from "#app/data/battler-tags";
|
||||||
import { BattlerTagLapseType } from "#app/data/battler-tags";
|
import { BattlerTagLapseType } from "#app/data/battler-tags";
|
||||||
import { battleSpecDialogue } from "#app/data/dialogue";
|
import { battleSpecDialogue } from "#app/data/dialogue";
|
||||||
import { PostVictoryStatStageChangeAttr } from "#app/data/moves/move";
|
import { allMoves, PostVictoryStatStageChangeAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
||||||
import { BattleSpec } from "#app/enums/battle-spec";
|
import { BattleSpec } from "#app/enums/battle-spec";
|
||||||
import { StatusEffect } from "#app/enums/status-effect";
|
import { StatusEffect } from "#app/enums/status-effect";
|
||||||
import type { EnemyPokemon } from "#app/field/pokemon";
|
import type { EnemyPokemon } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PlayerPokemon } from "#app/field/pokemon";
|
import { HitResult, PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import { PokemonInstantReviveModifier } from "#app/modifier/modifier";
|
import { PokemonInstantReviveModifier } from "#app/modifier/modifier";
|
||||||
import { SwitchType } from "#enums/switch-type";
|
import { SwitchType } from "#enums/switch-type";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims";
|
import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims";
|
||||||
import type Move from "#app/data/moves/move";
|
import type Move from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
|
@ -2,7 +2,7 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import type { BattlerIndex } from "#app/battle";
|
import type { BattlerIndex } from "#app/battle";
|
||||||
import { MoveChargeAnim } from "#app/data/battle-anims";
|
import { MoveChargeAnim } from "#app/data/battle-anims";
|
||||||
import { applyMoveChargeAttrs, MoveEffectAttr, InstantChargeAttr } from "#app/data/moves/move";
|
import { applyMoveChargeAttrs, MoveEffectAttr, InstantChargeAttr } from "#app/data/moves/move";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
import type { PokemonMove } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { MoveResult } from "#app/field/pokemon";
|
import { MoveResult } from "#app/field/pokemon";
|
||||||
import { BooleanHolder } from "#app/utils";
|
import { BooleanHolder } from "#app/utils";
|
||||||
|
@ -49,10 +49,9 @@ import { MoveTarget } from "#enums/MoveTarget";
|
|||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { MoveResult } from "#app/field/pokemon";
|
import { HitResult, MoveResult } from "#app/field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import {
|
import {
|
||||||
ContactHeldItemTransferChanceModifier,
|
ContactHeldItemTransferChanceModifier,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/moves/move";
|
import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/moves/move";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
import type { PokemonMove } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { BattlePhase } from "./battle-phase";
|
import { BattlePhase } from "./battle-phase";
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import { CommonAnim } from "#app/data/battle-anims";
|
|||||||
import { BattlerTagLapseType, CenterOfAttentionTag } from "#app/data/battler-tags";
|
import { BattlerTagLapseType, CenterOfAttentionTag } from "#app/data/battler-tags";
|
||||||
import {
|
import {
|
||||||
AddArenaTrapTagAttr,
|
AddArenaTrapTagAttr,
|
||||||
|
allMoves,
|
||||||
applyMoveAttrs,
|
applyMoveAttrs,
|
||||||
BypassRedirectAttr,
|
BypassRedirectAttr,
|
||||||
BypassSleepAttr,
|
BypassSleepAttr,
|
||||||
@ -26,14 +27,13 @@ import {
|
|||||||
PreMoveMessageAttr,
|
PreMoveMessageAttr,
|
||||||
PreUseInterruptAttr,
|
PreUseInterruptAttr,
|
||||||
} from "#app/data/moves/move";
|
} from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { MoveFlags } from "#enums/MoveFlags";
|
import { MoveFlags } from "#enums/MoveFlags";
|
||||||
import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangePreMoveTrigger } from "#app/data/pokemon-forms";
|
||||||
import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect";
|
import { getStatusEffectActivationText, getStatusEffectHealText } from "#app/data/status-effect";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { getTerrainBlockMessage, getWeatherBlockMessage } from "#app/data/weather";
|
import { getTerrainBlockMessage, getWeatherBlockMessage } from "#app/data/weather";
|
||||||
import { MoveUsedEvent } from "#app/events/battle-scene";
|
import { MoveUsedEvent } from "#app/events/battle-scene";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
import type { PokemonMove } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { MoveResult } from "#app/field/pokemon";
|
import { MoveResult } from "#app/field/pokemon";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
|
@ -3,7 +3,7 @@ import type { BattlerIndex } from "#app/battle";
|
|||||||
import { CommonAnim } from "#app/data/battle-anims";
|
import { CommonAnim } from "#app/data/battle-anims";
|
||||||
import { getStatusEffectHealText } from "#app/data/status-effect";
|
import { getStatusEffectHealText } from "#app/data/status-effect";
|
||||||
import { StatusEffect } from "#app/enums/status-effect";
|
import { StatusEffect } from "#app/enums/status-effect";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult } from "#app/field/pokemon";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import { HealingBoosterModifier } from "#app/modifier/modifier";
|
import { HealingBoosterModifier } from "#app/modifier/modifier";
|
||||||
import { HealAchv } from "#app/system/achv";
|
import { HealAchv } from "#app/system/achv";
|
||||||
|
@ -2,7 +2,7 @@ import type { BattlerIndex } from "#app/battle";
|
|||||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { EFFECTIVE_STATS, BATTLE_STATS } from "#enums/stat";
|
import { EFFECTIVE_STATS, BATTLE_STATS } from "#enums/stat";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { PokemonPhase } from "./pokemon-phase";
|
import { PokemonPhase } from "./pokemon-phase";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
|
@ -5,7 +5,7 @@ import { Mode } from "#app/ui/ui";
|
|||||||
import { CommandPhase } from "./command-phase";
|
import { CommandPhase } from "./command-phase";
|
||||||
import { PokemonPhase } from "./pokemon-phase";
|
import { PokemonPhase } from "./pokemon-phase";
|
||||||
import i18next from "#app/plugins/i18n";
|
import i18next from "#app/plugins/i18n";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
|
|
||||||
export class SelectTargetPhase extends PokemonPhase {
|
export class SelectTargetPhase extends PokemonPhase {
|
||||||
// biome-ignore lint/complexity/noUselessConstructor: This makes `fieldIndex` required
|
// biome-ignore lint/complexity/noUselessConstructor: This makes `fieldIndex` required
|
||||||
|
@ -5,7 +5,7 @@ import { TrainerSlot } from "#enums/trainer-slot";
|
|||||||
import { PlayerGender } from "#app/enums/player-gender";
|
import { PlayerGender } from "#app/enums/player-gender";
|
||||||
import { addPokeballOpenParticles } from "#app/field/anims";
|
import { addPokeballOpenParticles } from "#app/field/anims";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { FieldPosition } from "#enums/field-position";
|
import { FieldPosition } from "#app/field/pokemon";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase";
|
import { PartyMemberPokemonPhase } from "./party-member-pokemon-phase";
|
||||||
|
@ -6,8 +6,7 @@ import {
|
|||||||
PreSummonAbAttr,
|
PreSummonAbAttr,
|
||||||
PreSwitchOutAbAttr,
|
PreSwitchOutAbAttr,
|
||||||
} from "#app/data/ability";
|
} from "#app/data/ability";
|
||||||
import { ForceSwitchOutAttr } from "#app/data/moves/move";
|
import { allMoves, ForceSwitchOutAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { getPokeballTintColor } from "#app/data/pokeball";
|
import { getPokeballTintColor } from "#app/data/pokeball";
|
||||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
||||||
import { TrainerSlot } from "#enums/trainer-slot";
|
import { TrainerSlot } from "#enums/trainer-slot";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { FieldPosition } from "#enums/field-position";
|
import { FieldPosition } from "#app/field/pokemon";
|
||||||
import { BattlePhase } from "./battle-phase";
|
import { BattlePhase } from "./battle-phase";
|
||||||
|
|
||||||
export class ToggleDoublePositionPhase extends BattlePhase {
|
export class ToggleDoublePositionPhase extends BattlePhase {
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { applyAbAttrs, BypassSpeedChanceAbAttr, PreventBypassSpeedChanceAbAttr } from "#app/data/ability";
|
import { applyAbAttrs, BypassSpeedChanceAbAttr, PreventBypassSpeedChanceAbAttr } from "#app/data/ability";
|
||||||
import { MoveHeaderAttr } from "#app/data/moves/move";
|
import { allMoves, MoveHeaderAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { Abilities } from "#app/enums/abilities";
|
import { Abilities } from "#app/enums/abilities";
|
||||||
import { Stat } from "#app/enums/stat";
|
import { Stat } from "#app/enums/stat";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
import { PokemonMove } from "#app/field/pokemon";
|
||||||
import { BypassSpeedChanceModifier } from "#app/modifier/modifier";
|
import { BypassSpeedChanceModifier } from "#app/modifier/modifier";
|
||||||
import { Command } from "#app/ui/command-ui-handler";
|
import { Command } from "#app/ui/command-ui-handler";
|
||||||
import { randSeedShuffle, BooleanHolder } from "#app/utils";
|
import { randSeedShuffle, BooleanHolder } from "#app/utils";
|
||||||
|
@ -14,7 +14,7 @@ import { getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weath
|
|||||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||||
import { WeatherType } from "#app/enums/weather-type";
|
import { WeatherType } from "#app/enums/weather-type";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult } from "#app/field/pokemon";
|
||||||
import { BooleanHolder, toDmgValue } from "#app/utils";
|
import { BooleanHolder, toDmgValue } from "#app/utils";
|
||||||
import { CommonAnimPhase } from "./common-anim-phase";
|
import { CommonAnimPhase } from "./common-anim-phase";
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import { Nature } from "#enums/nature";
|
|||||||
import { GameStats } from "#app/system/game-stats";
|
import { GameStats } from "#app/system/game-stats";
|
||||||
import { Tutorial } from "#app/tutorial";
|
import { Tutorial } from "#app/tutorial";
|
||||||
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { TrainerVariant } from "#app/field/trainer";
|
import { TrainerVariant } from "#app/field/trainer";
|
||||||
import type { Variant } from "#app/sprites/variant";
|
import type { Variant } from "#app/sprites/variant";
|
||||||
import { setSettingGamepad, SettingGamepad, settingGamepadDefaults } from "#app/system/settings/settings-gamepad";
|
import { setSettingGamepad, SettingGamepad, settingGamepadDefaults } from "#app/system/settings/settings-gamepad";
|
||||||
|
@ -5,8 +5,7 @@ import type { Nature } from "#enums/nature";
|
|||||||
import type { PokeballType } from "#enums/pokeball";
|
import type { PokeballType } from "#enums/pokeball";
|
||||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "../data/pokemon-species";
|
import { getPokemonSpecies, getPokemonSpeciesForm } from "../data/pokemon-species";
|
||||||
import { Status } from "../data/status-effect";
|
import { Status } from "../data/status-effect";
|
||||||
import Pokemon, { EnemyPokemon, PokemonSummonData } from "../field/pokemon";
|
import Pokemon, { EnemyPokemon, PokemonMove, PokemonSummonData } from "../field/pokemon";
|
||||||
import { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import { TrainerSlot } from "#enums/trainer-slot";
|
import { TrainerSlot } from "#enums/trainer-slot";
|
||||||
import type { Variant } from "#app/sprites/variant";
|
import type { Variant } from "#app/sprites/variant";
|
||||||
import { loadBattlerTag } from "../data/battler-tags";
|
import { loadBattlerTag } from "../data/battler-tags";
|
||||||
|
@ -10,7 +10,7 @@ import { getLocalizedSpriteKey, fixedInt, padInt } from "#app/utils";
|
|||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
import type { PokemonMove } from "#app/field/pokemon";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import type { CommandPhase } from "#app/phases/command-phase";
|
import type { CommandPhase } from "#app/phases/command-phase";
|
||||||
import MoveInfoOverlay from "./move-info-overlay";
|
import MoveInfoOverlay from "./move-info-overlay";
|
||||||
|
@ -9,7 +9,7 @@ import { LockModifierTiersModifier, PokemonHeldItemModifier, HealShopCostModifie
|
|||||||
import { handleTutorial, Tutorial } from "../tutorial";
|
import { handleTutorial, Tutorial } from "../tutorial";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import MoveInfoOverlay from "./move-info-overlay";
|
import MoveInfoOverlay from "./move-info-overlay";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "../data/moves/move";
|
||||||
import { formatMoney, NumberHolder } from "#app/utils";
|
import { formatMoney, NumberHolder } from "#app/utils";
|
||||||
import Overrides from "#app/overrides";
|
import Overrides from "#app/overrides";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { MoveResult } from "#app/field/pokemon";
|
import { MoveResult } from "#app/field/pokemon";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#app/ui/text";
|
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#app/ui/text";
|
||||||
@ -12,8 +11,7 @@ import {
|
|||||||
PokemonHeldItemModifier,
|
PokemonHeldItemModifier,
|
||||||
SwitchEffectTransferModifier,
|
SwitchEffectTransferModifier,
|
||||||
} from "#app/modifier/modifier";
|
} from "#app/modifier/modifier";
|
||||||
import { ForceSwitchOutAttr } from "#app/data/moves/move";
|
import { allMoves, ForceSwitchOutAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender";
|
import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "#app/ui/pokemon-icon-anim-handler";
|
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "#app/ui/pokemon-icon-anim-handler";
|
||||||
|
@ -9,7 +9,7 @@ import { allAbilities } from "#app/data/ability";
|
|||||||
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
||||||
import { GrowthRate, getGrowthRateColor } from "#app/data/exp";
|
import { GrowthRate, getGrowthRateColor } from "#app/data/exp";
|
||||||
import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender";
|
import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { getNatureName } from "#app/data/nature";
|
import { getNatureName } from "#app/data/nature";
|
||||||
import type { SpeciesFormChange } from "#app/data/pokemon-forms";
|
import type { SpeciesFormChange } from "#app/data/pokemon-forms";
|
||||||
import { pokemonFormChanges } from "#app/data/pokemon-forms";
|
import { pokemonFormChanges } from "#app/data/pokemon-forms";
|
||||||
|
@ -7,7 +7,7 @@ import { isNullOrUndefined } from "#app/utils";
|
|||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
import { FilterTextRow } from "./filter-text";
|
import { FilterTextRow } from "./filter-text";
|
||||||
import { allAbilities } from "#app/data/ability";
|
import { allAbilities } from "#app/data/ability";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { allSpecies } from "#app/data/pokemon-species";
|
import { allSpecies } from "#app/data/pokemon-species";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ import type { OptionSelectConfig } from "./abstact-option-select-ui-handler";
|
|||||||
import { FilterText, FilterTextRow } from "./filter-text";
|
import { FilterText, FilterTextRow } from "./filter-text";
|
||||||
import { allAbilities } from "#app/data/ability";
|
import { allAbilities } from "#app/data/ability";
|
||||||
import { starterPassiveAbilities } from "#app/data/balance/passives";
|
import { starterPassiveAbilities } from "#app/data/balance/passives";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { speciesTmMoves } from "#app/data/balance/tms";
|
import { speciesTmMoves } from "#app/data/balance/tms";
|
||||||
import { pokemonPrevolutions, pokemonStarters } from "#app/data/balance/pokemon-evolutions";
|
import { pokemonPrevolutions, pokemonStarters } from "#app/data/balance/pokemon-evolutions";
|
||||||
import { Biome } from "#enums/biome";
|
import { Biome } from "#enums/biome";
|
||||||
|
@ -4,7 +4,7 @@ import { PokemonType } from "#enums/pokemon-type";
|
|||||||
import { rgbHexToRgba, padInt } from "#app/utils";
|
import { rgbHexToRgba, padInt } from "#app/utils";
|
||||||
import { TextStyle, addTextObject } from "#app/ui/text";
|
import { TextStyle, addTextObject } from "#app/ui/text";
|
||||||
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import { getEggTierForSpecies } from "#app/data/egg";
|
import { getEggTierForSpecies } from "#app/data/egg";
|
||||||
import { starterColors } from "#app/battle-scene";
|
import { starterColors } from "#app/battle-scene";
|
||||||
|
@ -13,7 +13,7 @@ import { allAbilities } from "#app/data/ability";
|
|||||||
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
||||||
import { GrowthRate, getGrowthRateColor } from "#app/data/exp";
|
import { GrowthRate, getGrowthRateColor } from "#app/data/exp";
|
||||||
import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender";
|
import { Gender, getGenderColor, getGenderSymbol } from "#app/data/gender";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { getNatureName } from "#app/data/nature";
|
import { getNatureName } from "#app/data/nature";
|
||||||
import { pokemonFormChanges } from "#app/data/pokemon-forms";
|
import { pokemonFormChanges } from "#app/data/pokemon-forms";
|
||||||
import type { LevelMoves } from "#app/data/balance/pokemon-level-moves";
|
import type { LevelMoves } from "#app/data/balance/pokemon-level-moves";
|
||||||
|
@ -12,8 +12,7 @@ import {
|
|||||||
toReadableString,
|
toReadableString,
|
||||||
formatStat,
|
formatStat,
|
||||||
} from "#app/utils";
|
} from "#app/utils";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
|
||||||
import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters";
|
import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters";
|
||||||
import { argbFromRgba } from "@material/material-color-utilities";
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
import { getTypeRgb } from "#app/data/type";
|
import { getTypeRgb } from "#app/data/type";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { Abilities } from "#app/enums/abilities";
|
import { Abilities } from "#app/enums/abilities";
|
||||||
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
||||||
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { MultiHitAttr } from "#app/data/moves/move";
|
import { allMoves, MultiHitAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import { MultiHitType } from "#enums/MultiHitType";
|
import { MultiHitType } from "#enums/MultiHitType";
|
||||||
import { Status } from "#app/data/status-effect";
|
import { Status } from "#app/data/status-effect";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
|
@ -7,7 +7,7 @@ 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 { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||||
import { allAbilities } from "#app/data/ability";
|
import { allAbilities } from "#app/data/ability";
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ 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 { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { allAbilities } from "#app/data/ability";
|
import { allAbilities } from "#app/data/ability";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { MoveCategory } from "#enums/MoveCategory";
|
import { MoveCategory } from "#enums/MoveCategory";
|
||||||
|
|
||||||
describe("Moves - Friend Guard", () => {
|
describe("Moves - Friend Guard", () => {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { Abilities } from "#app/enums/abilities";
|
import { Abilities } from "#app/enums/abilities";
|
||||||
import { Moves } from "#app/enums/moves";
|
import { Moves } from "#app/enums/moves";
|
||||||
import { Species } from "#app/enums/species";
|
import { Species } from "#app/enums/species";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult } from "#app/field/pokemon";
|
||||||
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";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { Abilities } from "#app/enums/abilities";
|
import { Abilities } from "#app/enums/abilities";
|
||||||
import { Stat } from "#app/enums/stat";
|
import { Stat } from "#app/enums/stat";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ArenaTagSide } from "#app/data/arena-tag";
|
import { ArenaTagSide } from "#app/data/arena-tag";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||||
import { Stat } from "#enums/stat";
|
import { Stat } from "#enums/stat";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { Weather } from "#app/data/weather";
|
import { Weather } from "#app/data/weather";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { allAbilities } from "#app/data/ability";
|
import { allAbilities } from "#app/data/ability";
|
||||||
import { ArenaTagSide } from "#app/data/arena-tag";
|
import { ArenaTagSide } from "#app/data/arena-tag";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { ArenaTagType } from "#app/enums/arena-tag-type";
|
import { ArenaTagType } from "#app/enums/arena-tag-type";
|
||||||
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
import { BattlerTagType } from "#app/enums/battler-tag-type";
|
||||||
import { Stat } from "#app/enums/stat";
|
import { Stat } from "#app/enums/stat";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { Abilities } from "#app/enums/abilities";
|
import { Abilities } from "#app/enums/abilities";
|
||||||
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
||||||
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { Weather } from "#app/data/weather";
|
import { Weather } from "#app/data/weather";
|
||||||
import type { PlayerPokemon } from "#app/field/pokemon";
|
import type { PlayerPokemon } from "#app/field/pokemon";
|
||||||
|
@ -9,8 +9,7 @@ import { Species } from "#enums/species";
|
|||||||
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 { RandomMoveAttr } from "#app/data/moves/move";
|
import { allMoves, RandomMoveAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
|
|
||||||
// See also: TypeImmunityAbAttr
|
// See also: TypeImmunityAbAttr
|
||||||
describe("Abilities - Sap Sipper", () => {
|
describe("Abilities - Sap Sipper", () => {
|
||||||
|
@ -4,7 +4,7 @@ import { Moves } from "#enums/moves";
|
|||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import GameManager from "#test/testUtils/gameManager";
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { FlinchAttr } from "#app/data/moves/move";
|
import { FlinchAttr } from "#app/data/moves/move";
|
||||||
|
|
||||||
|
@ -7,8 +7,7 @@ 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 { FlinchAttr } from "#app/data/moves/move";
|
import { allMoves, FlinchAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
|
|
||||||
describe("Abilities - Sheer Force", () => {
|
describe("Abilities - Sheer Force", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { allAbilities } from "#app/data/ability";
|
import { allAbilities } from "#app/data/ability";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { Abilities } from "#app/enums/abilities";
|
import { Abilities } from "#app/enums/abilities";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
|
@ -7,7 +7,7 @@ import { MoveEffectPhase } from "#app/phases/move-effect-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, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
|
|
||||||
describe("Abilities - Supreme Overlord", () => {
|
describe("Abilities - Supreme Overlord", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
|
@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle";
|
|||||||
import { Abilities } from "#app/enums/abilities";
|
import { Abilities } from "#app/enums/abilities";
|
||||||
import { Moves } from "#app/enums/moves";
|
import { Moves } from "#app/enums/moves";
|
||||||
import { Species } from "#app/enums/species";
|
import { Species } from "#app/enums/species";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult } from "#app/field/pokemon";
|
||||||
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";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { PostItemLostAbAttr } from "#app/data/ability";
|
import { PostItemLostAbAttr } from "#app/data/ability";
|
||||||
import { StealHeldItemChanceAttr } from "#app/data/moves/move";
|
import { allMoves, StealHeldItemChanceAttr } from "#app/data/moves/move";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import type { ContactHeldItemTransferChanceModifier } from "#app/modifier/modifier";
|
import type { ContactHeldItemTransferChanceModifier } from "#app/modifier/modifier";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { ArenaTagSide } from "#app/data/arena-tag";
|
import { ArenaTagSide } from "#app/data/arena-tag";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import GameManager from "#test/testUtils/gameManager";
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
import { toDmgValue } from "#app/utils";
|
import { toDmgValue } from "#app/utils";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
@ -534,12 +534,12 @@ describe("Abilities - Wimp Out", () => {
|
|||||||
.enemyAbility(Abilities.WIMP_OUT)
|
.enemyAbility(Abilities.WIMP_OUT)
|
||||||
.startingLevel(50)
|
.startingLevel(50)
|
||||||
.enemyLevel(1)
|
.enemyLevel(1)
|
||||||
.enemyMoveset([Moves.SPLASH, Moves.ENDURE])
|
.enemyMoveset([ Moves.SPLASH, Moves.ENDURE ])
|
||||||
.battleType("double")
|
.battleType("double")
|
||||||
.moveset([Moves.DRAGON_ENERGY, Moves.SPLASH])
|
.moveset([ Moves.DRAGON_ENERGY, Moves.SPLASH ])
|
||||||
.startingWave(wave);
|
.startingWave(wave);
|
||||||
|
|
||||||
await game.classicMode.startBattle([Species.REGIDRAGO, Species.MAGIKARP]);
|
await game.classicMode.startBattle([ Species.REGIDRAGO, Species.MAGIKARP ]);
|
||||||
|
|
||||||
// turn 1
|
// turn 1
|
||||||
game.move.select(Moves.DRAGON_ENERGY, 0);
|
game.move.select(Moves.DRAGON_ENERGY, 0);
|
||||||
@ -549,5 +549,6 @@ describe("Abilities - Wimp Out", () => {
|
|||||||
|
|
||||||
await game.phaseInterceptor.to("SelectModifierPhase");
|
await game.phaseInterceptor.to("SelectModifierPhase");
|
||||||
expect(game.scene.currentBattle.waveIndex).toBe(wave + 1);
|
expect(game.scene.currentBattle.waveIndex).toBe(wave + 1);
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { allMoves } from "#app/data/moves/all-moves";
|
import { allMoves } from "#app/data/moves/move";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user