Merge conflicts

This commit is contained in:
Christopher Schmidt 2025-03-08 08:29:14 -05:00
commit 03d12ca2bd
173 changed files with 5412 additions and 5351 deletions

View File

@ -44,7 +44,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 "#app/data/move"; 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,
@ -105,7 +105,7 @@ import {
} from "#app/data/pokemon-forms"; } from "#app/data/pokemon-forms";
import { FormChangePhase } from "#app/phases/form-change-phase"; import { FormChangePhase } from "#app/phases/form-change-phase";
import { getTypeRgb } from "#app/data/type"; import { getTypeRgb } from "#app/data/type";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import PokemonSpriteSparkleHandler from "#app/field/pokemon-sprite-sparkle-handler"; import PokemonSpriteSparkleHandler from "#app/field/pokemon-sprite-sparkle-handler";
import CharSprite from "#app/ui/char-sprite"; import CharSprite from "#app/ui/char-sprite";
import DamageNumberHandler from "#app/field/damage-number-handler"; import DamageNumberHandler from "#app/field/damage-number-handler";
@ -1872,44 +1872,44 @@ export default class BattleScene extends SceneBase {
) { ) {
if (species.speciesId === Species.WORMADAM) { if (species.speciesId === Species.WORMADAM) {
switch (this.currentBattle.trainer.config.specialtyType) { switch (this.currentBattle.trainer.config.specialtyType) {
case Type.GROUND: case PokemonType.GROUND:
return 1; // Sandy Cloak return 1; // Sandy Cloak
case Type.STEEL: case PokemonType.STEEL:
return 2; // Trash Cloak return 2; // Trash Cloak
case Type.GRASS: case PokemonType.GRASS:
return 0; // Plant Cloak return 0; // Plant Cloak
} }
} else if (species.speciesId === Species.ROTOM) { } else if (species.speciesId === Species.ROTOM) {
switch (this.currentBattle.trainer.config.specialtyType) { switch (this.currentBattle.trainer.config.specialtyType) {
case Type.FLYING: case PokemonType.FLYING:
return 4; // Fan Rotom return 4; // Fan Rotom
case Type.GHOST: case PokemonType.GHOST:
return 0; // Lightbulb Rotom return 0; // Lightbulb Rotom
case Type.FIRE: case PokemonType.FIRE:
return 1; // Heat Rotom return 1; // Heat Rotom
case Type.GRASS: case PokemonType.GRASS:
return 5; // Mow Rotom return 5; // Mow Rotom
case Type.WATER: case PokemonType.WATER:
return 2; // Wash Rotom return 2; // Wash Rotom
case Type.ICE: case PokemonType.ICE:
return 3; // Frost Rotom return 3; // Frost Rotom
} }
} else if (species.speciesId === Species.ORICORIO) { } else if (species.speciesId === Species.ORICORIO) {
switch (this.currentBattle.trainer.config.specialtyType) { switch (this.currentBattle.trainer.config.specialtyType) {
case Type.GHOST: case PokemonType.GHOST:
return 3; // Sensu Style return 3; // Sensu Style
case Type.FIRE: case PokemonType.FIRE:
return 0; // Baile Style return 0; // Baile Style
case Type.ELECTRIC: case PokemonType.ELECTRIC:
return 1; // Pom-Pom Style return 1; // Pom-Pom Style
case Type.PSYCHIC: case PokemonType.PSYCHIC:
return 2; // Pa'u Style return 2; // Pa'u Style
} }
} else if (species.speciesId === Species.PALDEA_TAUROS) { } else if (species.speciesId === Species.PALDEA_TAUROS) {
switch (this.currentBattle.trainer.config.specialtyType) { switch (this.currentBattle.trainer.config.specialtyType) {
case Type.FIRE: case PokemonType.FIRE:
return 1; // Blaze Breed return 1; // Blaze Breed
case Type.WATER: case PokemonType.WATER:
return 2; // Aqua Breed return 2; // Aqua Breed
} }
} else if (species.speciesId === Species.SILVALLY || species.speciesId === Species.ARCEUS) { // Would probably never happen, but might as well } else if (species.speciesId === Species.SILVALLY || species.speciesId === Species.ARCEUS) { // Would probably never happen, but might as well
@ -3948,8 +3948,8 @@ export default class BattleScene extends SceneBase {
return { return {
name: p.name, name: p.name,
form: p.getFormKey(), form: p.getFormKey(),
types: p.getTypes().map((type) => Type[type]), types: p.getTypes().map((type) => PokemonType[type]),
teraType: Type[p.getTeraType()], teraType: PokemonType[p.getTeraType()],
isTerastallized: p.isTerastallized, isTerastallized: p.isTerastallized,
level: p.level, level: p.level,
currentHP: p.hp, currentHP: p.hp,

View File

@ -1,7 +1,7 @@
import type { EnemyPokemon, PokemonMove } from "../field/pokemon"; import type { EnemyPokemon, PokemonMove } from "../field/pokemon";
import type Pokemon from "../field/pokemon"; import type Pokemon from "../field/pokemon";
import { HitResult, MoveResult, PlayerPokemon } from "../field/pokemon"; import { HitResult, MoveResult, PlayerPokemon } from "../field/pokemon";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import type { Constructor } from "#app/utils"; import type { Constructor } from "#app/utils";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { getPokemonNameWithAffix } from "../messages"; import { getPokemonNameWithAffix } from "../messages";
@ -10,8 +10,11 @@ import type { BattlerTag } from "./battler-tags";
import { BattlerTagLapseType, GroundedTag } from "./battler-tags"; 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 "./move"; import type Move from "./moves/move";
import { AttackMove, MoveCategory, MoveFlags, MoveTarget, FlinchAttr, OneHitKOAttr, HitHealAttr, allMoves, StatusMove, SelfStatusMove, VariablePowerAttr, applyMoveAttrs, VariableMoveTypeAttr, RandomMovesetMoveAttr, RandomMoveAttr, NaturePowerAttr, CopyMoveAttr, NeutralDamageAgainstFlyingTypeMultiplierAttr, FixedDamageAttr } from "./move"; import { AttackMove, FlinchAttr, OneHitKOAttr, HitHealAttr, allMoves, StatusMove, SelfStatusMove, VariablePowerAttr, applyMoveAttrs, VariableMoveTypeAttr, RandomMovesetMoveAttr, RandomMoveAttr, NaturePowerAttr, CopyMoveAttr, NeutralDamageAgainstFlyingTypeMultiplierAttr, FixedDamageAttr } from "./moves/move";
import { MoveFlags } from "#enums/MoveFlags";
import { MoveTarget } from "#enums/MoveTarget";
import { MoveCategory } from "#enums/MoveCategory";
import type { ArenaTrapTag, SuppressAbilitiesTag } from "./arena-tag"; import type { ArenaTrapTag, SuppressAbilitiesTag } from "./arena-tag";
import { ArenaTagSide } from "./arena-tag"; import { ArenaTagSide } from "./arena-tag";
import { BerryModifier, HitHealModifier, PokemonHeldItemModifier } from "../modifier/modifier"; import { BerryModifier, HitHealModifier, PokemonHeldItemModifier } from "../modifier/modifier";
@ -413,7 +416,7 @@ export class AlliedFieldDamageReductionAbAttr extends PreDefendAbAttr {
} }
export class ReceivedTypeDamageMultiplierAbAttr extends ReceivedMoveDamageMultiplierAbAttr { export class ReceivedTypeDamageMultiplierAbAttr extends ReceivedMoveDamageMultiplierAbAttr {
constructor(moveType: Type, damageMultiplier: number) { constructor(moveType: PokemonType, damageMultiplier: number) {
super((target, user, move) => user.getMoveType(move) === moveType, damageMultiplier); super((target, user, move) => user.getMoveType(move) === moveType, damageMultiplier);
} }
} }
@ -425,10 +428,10 @@ export class ReceivedTypeDamageMultiplierAbAttr extends ReceivedMoveDamageMultip
* @see {@linkcode getCondition} * @see {@linkcode getCondition}
*/ */
export class TypeImmunityAbAttr extends PreDefendAbAttr { export class TypeImmunityAbAttr extends PreDefendAbAttr {
private immuneType: Type | null; private immuneType: PokemonType | null;
private condition: AbAttrCondition | null; private condition: AbAttrCondition | null;
constructor(immuneType: Type | null, condition?: AbAttrCondition) { constructor(immuneType: PokemonType | null, condition?: AbAttrCondition) {
super(); super();
this.immuneType = immuneType; this.immuneType = immuneType;
@ -457,7 +460,7 @@ export class TypeImmunityAbAttr extends PreDefendAbAttr {
return false; return false;
} }
getImmuneType(): Type | null { getImmuneType(): PokemonType | null {
return this.immuneType; return this.immuneType;
} }
@ -467,7 +470,7 @@ export class TypeImmunityAbAttr extends PreDefendAbAttr {
} }
export class AttackTypeImmunityAbAttr extends TypeImmunityAbAttr { export class AttackTypeImmunityAbAttr extends TypeImmunityAbAttr {
constructor(immuneType: Type, condition?: AbAttrCondition) { constructor(immuneType: PokemonType, condition?: AbAttrCondition) {
super(immuneType, condition); super(immuneType, condition);
} }
@ -486,7 +489,7 @@ export class AttackTypeImmunityAbAttr extends TypeImmunityAbAttr {
} }
export class TypeImmunityHealAbAttr extends TypeImmunityAbAttr { export class TypeImmunityHealAbAttr extends TypeImmunityAbAttr {
constructor(immuneType: Type) { constructor(immuneType: PokemonType) {
super(immuneType); super(immuneType);
} }
@ -511,7 +514,7 @@ class TypeImmunityStatStageChangeAbAttr extends TypeImmunityAbAttr {
private stat: BattleStat; private stat: BattleStat;
private stages: number; private stages: number;
constructor(immuneType: Type, stat: BattleStat, stages: number, condition?: AbAttrCondition) { constructor(immuneType: PokemonType, stat: BattleStat, stages: number, condition?: AbAttrCondition) {
super(immuneType, condition); super(immuneType, condition);
this.stat = stat; this.stat = stat;
@ -536,7 +539,7 @@ class TypeImmunityAddBattlerTagAbAttr extends TypeImmunityAbAttr {
private tagType: BattlerTagType; private tagType: BattlerTagType;
private turnCount: number; private turnCount: number;
constructor(immuneType: Type, tagType: BattlerTagType, turnCount: number, condition?: AbAttrCondition) { constructor(immuneType: PokemonType, tagType: BattlerTagType, turnCount: number, condition?: AbAttrCondition) {
super(immuneType, condition); super(immuneType, condition);
this.tagType = tagType; this.tagType = tagType;
@ -904,7 +907,7 @@ export class PostDefendTypeChangeAbAttr extends PostDefendAbAttr {
return i18next.t("abilityTriggers:postDefendTypeChange", { return i18next.t("abilityTriggers:postDefendTypeChange", {
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
abilityName, abilityName,
typeName: i18next.t(`pokemonInfo:Type.${Type[pokemon.getTypes(true)[0]]}`) typeName: i18next.t(`pokemonInfo:Type.${PokemonType[pokemon.getTypes(true)[0]]}`)
}); });
} }
} }
@ -963,7 +966,7 @@ export class EffectSporeAbAttr extends PostDefendContactApplyStatusEffectAbAttr
} }
applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean {
if (attacker.hasAbility(Abilities.OVERCOAT) || attacker.isOfType(Type.GRASS)) { if (attacker.hasAbility(Abilities.OVERCOAT) || attacker.isOfType(PokemonType.GRASS)) {
return false; return false;
} }
return super.applyPostDefend(pokemon, passive, simulated, attacker, move, hitResult, args); return super.applyPostDefend(pokemon, passive, simulated, attacker, move, hitResult, args);
@ -1353,7 +1356,7 @@ export class FieldMultiplyStatAbAttr extends AbAttr {
export class MoveTypeChangeAbAttr extends PreAttackAbAttr { export class MoveTypeChangeAbAttr extends PreAttackAbAttr {
constructor( constructor(
private newType: Type, private newType: PokemonType,
private powerMultiplier: number, private powerMultiplier: number,
private condition?: PokemonAttackCondition private condition?: PokemonAttackCondition
) { ) {
@ -1378,7 +1381,7 @@ export class MoveTypeChangeAbAttr extends PreAttackAbAttr {
/** Ability attribute for changing a pokemon's type before using a move */ /** Ability attribute for changing a pokemon's type before using a move */
export class PokemonTypeChangeAbAttr extends PreAttackAbAttr { export class PokemonTypeChangeAbAttr extends PreAttackAbAttr {
private moveType: Type; private moveType: PokemonType;
constructor() { constructor() {
super(true); super(true);
@ -1418,7 +1421,7 @@ export class PokemonTypeChangeAbAttr extends PreAttackAbAttr {
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string { getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string {
return i18next.t("abilityTriggers:pokemonTypeChange", { return i18next.t("abilityTriggers:pokemonTypeChange", {
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
moveType: i18next.t(`pokemonInfo:Type.${Type[this.moveType]}`), moveType: i18next.t(`pokemonInfo:Type.${PokemonType[this.moveType]}`),
}); });
} }
} }
@ -1525,13 +1528,13 @@ export class MovePowerBoostAbAttr extends VariableMovePowerAbAttr {
} }
export class MoveTypePowerBoostAbAttr extends MovePowerBoostAbAttr { export class MoveTypePowerBoostAbAttr extends MovePowerBoostAbAttr {
constructor(boostedType: Type, powerMultiplier?: number) { constructor(boostedType: PokemonType, powerMultiplier?: number) {
super((pokemon, defender, move) => pokemon?.getMoveType(move) === boostedType, powerMultiplier || 1.5); super((pokemon, defender, move) => pokemon?.getMoveType(move) === boostedType, powerMultiplier || 1.5);
} }
} }
export class LowHpMoveTypePowerBoostAbAttr extends MoveTypePowerBoostAbAttr { export class LowHpMoveTypePowerBoostAbAttr extends MoveTypePowerBoostAbAttr {
constructor(boostedType: Type) { constructor(boostedType: PokemonType) {
super(boostedType); super(boostedType);
} }
@ -1609,7 +1612,7 @@ export class PreAttackFieldMoveTypePowerBoostAbAttr extends FieldMovePowerBoostA
* @param boostedType - The type of move that will receive the power boost. * @param boostedType - The type of move that will receive the power boost.
* @param powerMultiplier - The multiplier to apply to the move's power, defaults to 1.5 if not provided. * @param powerMultiplier - The multiplier to apply to the move's power, defaults to 1.5 if not provided.
*/ */
constructor(boostedType: Type, powerMultiplier?: number) { constructor(boostedType: PokemonType, powerMultiplier?: number) {
super((pokemon, defender, move) => pokemon?.getMoveType(move) === boostedType, powerMultiplier || 1.5); super((pokemon, defender, move) => pokemon?.getMoveType(move) === boostedType, powerMultiplier || 1.5);
} }
} }
@ -3514,10 +3517,10 @@ function getAnticipationCondition(): AbAttrCondition {
+ (opponent.ivs[Stat.SPDEF] & 1) * 32) * 15 / 63); + (opponent.ivs[Stat.SPDEF] & 1) * 32) * 15 / 63);
const type = [ const type = [
Type.FIGHTING, Type.FLYING, Type.POISON, Type.GROUND, PokemonType.FIGHTING, PokemonType.FLYING, PokemonType.POISON, PokemonType.GROUND,
Type.ROCK, Type.BUG, Type.GHOST, Type.STEEL, PokemonType.ROCK, PokemonType.BUG, PokemonType.GHOST, PokemonType.STEEL,
Type.FIRE, Type.WATER, Type.GRASS, Type.ELECTRIC, PokemonType.FIRE, PokemonType.WATER, PokemonType.GRASS, PokemonType.ELECTRIC,
Type.PSYCHIC, Type.ICE, Type.DRAGON, Type.DARK ][iv_val]; PokemonType.PSYCHIC, PokemonType.ICE, PokemonType.DRAGON, PokemonType.DARK ][iv_val];
if (pokemon.getAttackTypeEffectiveness(type, opponent) >= 2) { if (pokemon.getAttackTypeEffectiveness(type, opponent) >= 2) {
return true; return true;
@ -4419,7 +4422,7 @@ export class ArenaTrapAbAttr extends CheckTrappedAbAttr {
*/ */
applyCheckTrapped(pokemon: Pokemon, passive: boolean, simulated: boolean, trapped: Utils.BooleanHolder, otherPokemon: Pokemon, args: any[]): boolean { applyCheckTrapped(pokemon: Pokemon, passive: boolean, simulated: boolean, trapped: Utils.BooleanHolder, otherPokemon: Pokemon, args: any[]): boolean {
if (this.arenaTrapCondition(pokemon, otherPokemon)) { if (this.arenaTrapCondition(pokemon, otherPokemon)) {
if (otherPokemon.getTypes(true).includes(Type.GHOST) || (otherPokemon.getTypes(true).includes(Type.STELLAR) && otherPokemon.getTypes().includes(Type.GHOST))) { if (otherPokemon.getTypes(true).includes(PokemonType.GHOST) || (otherPokemon.getTypes(true).includes(PokemonType.STELLAR) && otherPokemon.getTypes().includes(PokemonType.GHOST))) {
trapped.value = false; trapped.value = false;
return false; return false;
} else if (otherPokemon.hasAbility(Abilities.RUN_AWAY)) { } else if (otherPokemon.hasAbility(Abilities.RUN_AWAY)) {
@ -4589,9 +4592,9 @@ export class RedirectMoveAbAttr extends AbAttr {
} }
export class RedirectTypeMoveAbAttr extends RedirectMoveAbAttr { export class RedirectTypeMoveAbAttr extends RedirectMoveAbAttr {
public type: Type; public type: PokemonType;
constructor(type: Type) { constructor(type: PokemonType) {
super(); super();
this.type = type; this.type = type;
} }
@ -4807,17 +4810,17 @@ export class NoFusionAbilityAbAttr extends AbAttr {
} }
export class IgnoreTypeImmunityAbAttr extends AbAttr { export class IgnoreTypeImmunityAbAttr extends AbAttr {
private defenderType: Type; private defenderType: PokemonType;
private allowedMoveTypes: Type[]; private allowedMoveTypes: PokemonType[];
constructor(defenderType: Type, allowedMoveTypes: Type[]) { constructor(defenderType: PokemonType, allowedMoveTypes: PokemonType[]) {
super(true); super(true);
this.defenderType = defenderType; this.defenderType = defenderType;
this.allowedMoveTypes = allowedMoveTypes; this.allowedMoveTypes = allowedMoveTypes;
} }
apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
if (this.defenderType === (args[1] as Type) && this.allowedMoveTypes.includes(args[0] as Type)) { if (this.defenderType === (args[1] as PokemonType) && this.allowedMoveTypes.includes(args[0] as PokemonType)) {
cancelled.value = true; cancelled.value = true;
return true; return true;
} }
@ -4830,9 +4833,9 @@ export class IgnoreTypeImmunityAbAttr extends AbAttr {
*/ */
export class IgnoreTypeStatusEffectImmunityAbAttr extends AbAttr { export class IgnoreTypeStatusEffectImmunityAbAttr extends AbAttr {
private statusEffect: StatusEffect[]; private statusEffect: StatusEffect[];
private defenderType: Type[]; private defenderType: PokemonType[];
constructor(statusEffect: StatusEffect[], defenderType: Type[]) { constructor(statusEffect: StatusEffect[], defenderType: PokemonType[]) {
super(true); super(true);
this.statusEffect = statusEffect; this.statusEffect = statusEffect;
@ -4840,7 +4843,7 @@ export class IgnoreTypeStatusEffectImmunityAbAttr extends AbAttr {
} }
apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
if (this.statusEffect.includes(args[0] as StatusEffect) && this.defenderType.includes(args[1] as Type)) { if (this.statusEffect.includes(args[0] as StatusEffect) && this.defenderType.includes(args[1] as PokemonType)) {
cancelled.value = true; cancelled.value = true;
return true; return true;
} }
@ -5077,7 +5080,7 @@ export class TerrainEventTypeChangeAbAttr extends PostSummonAbAttr {
return false; return false;
} }
const currentTerrain = globalScene.arena.getTerrainType(); const currentTerrain = globalScene.arena.getTerrainType();
const typeChange: Type[] = this.determineTypeChange(pokemon, currentTerrain); const typeChange: PokemonType[] = this.determineTypeChange(pokemon, currentTerrain);
if (typeChange.length !== 0) { if (typeChange.length !== 0) {
if (pokemon.summonData.addedType && typeChange.includes(pokemon.summonData.addedType)) { if (pokemon.summonData.addedType && typeChange.includes(pokemon.summonData.addedType)) {
pokemon.summonData.addedType = null; pokemon.summonData.addedType = null;
@ -5094,20 +5097,20 @@ export class TerrainEventTypeChangeAbAttr extends PostSummonAbAttr {
* @param currentTerrain {@linkcode TerrainType} * @param currentTerrain {@linkcode TerrainType}
* @returns a list of type(s) * @returns a list of type(s)
*/ */
private determineTypeChange(pokemon: Pokemon, currentTerrain: TerrainType): Type[] { private determineTypeChange(pokemon: Pokemon, currentTerrain: TerrainType): PokemonType[] {
const typeChange: Type[] = []; const typeChange: PokemonType[] = [];
switch (currentTerrain) { switch (currentTerrain) {
case TerrainType.ELECTRIC: case TerrainType.ELECTRIC:
typeChange.push(Type.ELECTRIC); typeChange.push(PokemonType.ELECTRIC);
break; break;
case TerrainType.MISTY: case TerrainType.MISTY:
typeChange.push(Type.FAIRY); typeChange.push(PokemonType.FAIRY);
break; break;
case TerrainType.GRASSY: case TerrainType.GRASSY:
typeChange.push(Type.GRASS); typeChange.push(PokemonType.GRASS);
break; break;
case TerrainType.PSYCHIC: case TerrainType.PSYCHIC:
typeChange.push(Type.PSYCHIC); typeChange.push(PokemonType.PSYCHIC);
break; break;
default: default:
pokemon.getTypes(false, false, true).forEach(t => { pokemon.getTypes(false, false, true).forEach(t => {
@ -5135,7 +5138,7 @@ export class TerrainEventTypeChangeAbAttr extends PostSummonAbAttr {
if (currentTerrain === TerrainType.NONE) { if (currentTerrain === TerrainType.NONE) {
return i18next.t("abilityTriggers:pokemonTypeChangeRevert", { pokemonNameWithAffix }); return i18next.t("abilityTriggers:pokemonTypeChangeRevert", { pokemonNameWithAffix });
} else { } else {
const moveType = i18next.t(`pokemonInfo:Type.${Type[this.determineTypeChange(pokemon, currentTerrain)[0]]}`); const moveType = i18next.t(`pokemonInfo:Type.${PokemonType[this.determineTypeChange(pokemon, currentTerrain)[0]]}`);
return i18next.t("abilityTriggers:pokemonTypeChange", { pokemonNameWithAffix, moveType }); return i18next.t("abilityTriggers:pokemonTypeChange", { pokemonNameWithAffix, moveType });
} }
} }
@ -6045,10 +6048,10 @@ export function initAbilities() {
.attr(PostDefendContactApplyStatusEffectAbAttr, 30, StatusEffect.PARALYSIS) .attr(PostDefendContactApplyStatusEffectAbAttr, 30, StatusEffect.PARALYSIS)
.bypassFaint(), .bypassFaint(),
new Ability(Abilities.VOLT_ABSORB, 3) new Ability(Abilities.VOLT_ABSORB, 3)
.attr(TypeImmunityHealAbAttr, Type.ELECTRIC) .attr(TypeImmunityHealAbAttr, PokemonType.ELECTRIC)
.ignorable(), .ignorable(),
new Ability(Abilities.WATER_ABSORB, 3) new Ability(Abilities.WATER_ABSORB, 3)
.attr(TypeImmunityHealAbAttr, Type.WATER) .attr(TypeImmunityHealAbAttr, PokemonType.WATER)
.ignorable(), .ignorable(),
new Ability(Abilities.OBLIVIOUS, 3) new Ability(Abilities.OBLIVIOUS, 3)
.attr(BattlerTagImmunityAbAttr, [ BattlerTagType.INFATUATED, BattlerTagType.TAUNT ]) .attr(BattlerTagImmunityAbAttr, [ BattlerTagType.INFATUATED, BattlerTagType.TAUNT ])
@ -6073,7 +6076,7 @@ export function initAbilities() {
.attr(StatusEffectImmunityAbAttr, StatusEffect.POISON, StatusEffect.TOXIC) .attr(StatusEffectImmunityAbAttr, StatusEffect.POISON, StatusEffect.TOXIC)
.ignorable(), .ignorable(),
new Ability(Abilities.FLASH_FIRE, 3) new Ability(Abilities.FLASH_FIRE, 3)
.attr(TypeImmunityAddBattlerTagAbAttr, Type.FIRE, BattlerTagType.FIRE_BOOST, 1) .attr(TypeImmunityAddBattlerTagAbAttr, PokemonType.FIRE, BattlerTagType.FIRE_BOOST, 1)
.ignorable(), .ignorable(),
new Ability(Abilities.SHIELD_DUST, 3) new Ability(Abilities.SHIELD_DUST, 3)
.attr(IgnoreMoveEffectsAbAttr) .attr(IgnoreMoveEffectsAbAttr)
@ -6103,7 +6106,7 @@ export function initAbilities() {
.attr(UnswappableAbilityAbAttr) .attr(UnswappableAbilityAbAttr)
.ignorable(), .ignorable(),
new Ability(Abilities.LEVITATE, 3) new Ability(Abilities.LEVITATE, 3)
.attr(AttackTypeImmunityAbAttr, Type.GROUND, (pokemon: Pokemon) => !pokemon.getTag(GroundedTag) && !globalScene.arena.getTag(ArenaTagType.GRAVITY)) .attr(AttackTypeImmunityAbAttr, PokemonType.GROUND, (pokemon: Pokemon) => !pokemon.getTag(GroundedTag) && !globalScene.arena.getTag(ArenaTagType.GRAVITY))
.ignorable(), .ignorable(),
new Ability(Abilities.EFFECT_SPORE, 3) new Ability(Abilities.EFFECT_SPORE, 3)
.attr(EffectSporeAbAttr), .attr(EffectSporeAbAttr),
@ -6116,8 +6119,8 @@ export function initAbilities() {
new Ability(Abilities.NATURAL_CURE, 3) new Ability(Abilities.NATURAL_CURE, 3)
.attr(PreSwitchOutResetStatusAbAttr), .attr(PreSwitchOutResetStatusAbAttr),
new Ability(Abilities.LIGHTNING_ROD, 3) new Ability(Abilities.LIGHTNING_ROD, 3)
.attr(RedirectTypeMoveAbAttr, Type.ELECTRIC) .attr(RedirectTypeMoveAbAttr, PokemonType.ELECTRIC)
.attr(TypeImmunityStatStageChangeAbAttr, Type.ELECTRIC, Stat.SPATK, 1) .attr(TypeImmunityStatStageChangeAbAttr, PokemonType.ELECTRIC, Stat.SPATK, 1)
.ignorable(), .ignorable(),
new Ability(Abilities.SERENE_GRACE, 3) new Ability(Abilities.SERENE_GRACE, 3)
.attr(MoveEffectChanceMultiplierAbAttr, 2), .attr(MoveEffectChanceMultiplierAbAttr, 2),
@ -6152,7 +6155,7 @@ export function initAbilities() {
.ignorable(), .ignorable(),
new Ability(Abilities.MAGNET_PULL, 3) new Ability(Abilities.MAGNET_PULL, 3)
.attr(ArenaTrapAbAttr, (user, target) => { .attr(ArenaTrapAbAttr, (user, target) => {
if (target.getTypes(true).includes(Type.STEEL) || (target.getTypes(true).includes(Type.STELLAR) && target.getTypes().includes(Type.STEEL))) { if (target.getTypes(true).includes(PokemonType.STEEL) || (target.getTypes(true).includes(PokemonType.STELLAR) && target.getTypes().includes(PokemonType.STEEL))) {
return true; return true;
} }
return false; return false;
@ -6169,8 +6172,8 @@ export function initAbilities() {
.attr(IncreasePpAbAttr) .attr(IncreasePpAbAttr)
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonPressure", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })), .attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonPressure", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })),
new Ability(Abilities.THICK_FAT, 3) new Ability(Abilities.THICK_FAT, 3)
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.FIRE, 0.5) .attr(ReceivedTypeDamageMultiplierAbAttr, PokemonType.FIRE, 0.5)
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.ICE, 0.5) .attr(ReceivedTypeDamageMultiplierAbAttr, PokemonType.ICE, 0.5)
.ignorable(), .ignorable(),
new Ability(Abilities.EARLY_BIRD, 3) new Ability(Abilities.EARLY_BIRD, 3)
.attr(ReduceStatusEffectDurationAbAttr, StatusEffect.SLEEP), .attr(ReduceStatusEffectDurationAbAttr, StatusEffect.SLEEP),
@ -6219,13 +6222,13 @@ export function initAbilities() {
new Ability(Abilities.LIQUID_OOZE, 3) new Ability(Abilities.LIQUID_OOZE, 3)
.attr(ReverseDrainAbAttr), .attr(ReverseDrainAbAttr),
new Ability(Abilities.OVERGROW, 3) new Ability(Abilities.OVERGROW, 3)
.attr(LowHpMoveTypePowerBoostAbAttr, Type.GRASS), .attr(LowHpMoveTypePowerBoostAbAttr, PokemonType.GRASS),
new Ability(Abilities.BLAZE, 3) new Ability(Abilities.BLAZE, 3)
.attr(LowHpMoveTypePowerBoostAbAttr, Type.FIRE), .attr(LowHpMoveTypePowerBoostAbAttr, PokemonType.FIRE),
new Ability(Abilities.TORRENT, 3) new Ability(Abilities.TORRENT, 3)
.attr(LowHpMoveTypePowerBoostAbAttr, Type.WATER), .attr(LowHpMoveTypePowerBoostAbAttr, PokemonType.WATER),
new Ability(Abilities.SWARM, 3) new Ability(Abilities.SWARM, 3)
.attr(LowHpMoveTypePowerBoostAbAttr, Type.BUG), .attr(LowHpMoveTypePowerBoostAbAttr, PokemonType.BUG),
new Ability(Abilities.ROCK_HEAD, 3) new Ability(Abilities.ROCK_HEAD, 3)
.attr(BlockRecoilDamageAttr), .attr(BlockRecoilDamageAttr),
new Ability(Abilities.DROUGHT, 3) new Ability(Abilities.DROUGHT, 3)
@ -6261,7 +6264,7 @@ export function initAbilities() {
.conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), StatMultiplierAbAttr, Stat.EVA, 2) .conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), StatMultiplierAbAttr, Stat.EVA, 2)
.ignorable(), .ignorable(),
new Ability(Abilities.MOTOR_DRIVE, 4) new Ability(Abilities.MOTOR_DRIVE, 4)
.attr(TypeImmunityStatStageChangeAbAttr, Type.ELECTRIC, Stat.SPD, 1) .attr(TypeImmunityStatStageChangeAbAttr, PokemonType.ELECTRIC, Stat.SPD, 1)
.ignorable(), .ignorable(),
new Ability(Abilities.RIVALRY, 4) new Ability(Abilities.RIVALRY, 4)
.attr(MovePowerBoostAbAttr, (user, target, move) => user?.gender !== Gender.GENDERLESS && target?.gender !== Gender.GENDERLESS && user?.gender === target?.gender, 1.25, true) .attr(MovePowerBoostAbAttr, (user, target, move) => user?.gender !== Gender.GENDERLESS && target?.gender !== Gender.GENDERLESS && user?.gender === target?.gender, 1.25, true)
@ -6282,7 +6285,7 @@ export function initAbilities() {
.bypassFaint() // Allows reviver seed to activate Unburden .bypassFaint() // Allows reviver seed to activate Unburden
.edgeCase(), // Should not restore Unburden boost if Pokemon loses then regains Unburden ability .edgeCase(), // Should not restore Unburden boost if Pokemon loses then regains Unburden ability
new Ability(Abilities.HEATPROOF, 4) new Ability(Abilities.HEATPROOF, 4)
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.FIRE, 0.5) .attr(ReceivedTypeDamageMultiplierAbAttr, PokemonType.FIRE, 0.5)
.attr(ReduceBurnDamageAbAttr, 0.5) .attr(ReduceBurnDamageAbAttr, 0.5)
.ignorable(), .ignorable(),
new Ability(Abilities.SIMPLE, 4) new Ability(Abilities.SIMPLE, 4)
@ -6291,8 +6294,8 @@ export function initAbilities() {
new Ability(Abilities.DRY_SKIN, 4) new Ability(Abilities.DRY_SKIN, 4)
.attr(PostWeatherLapseDamageAbAttr, 2, WeatherType.SUNNY, WeatherType.HARSH_SUN) .attr(PostWeatherLapseDamageAbAttr, 2, WeatherType.SUNNY, WeatherType.HARSH_SUN)
.attr(PostWeatherLapseHealAbAttr, 2, WeatherType.RAIN, WeatherType.HEAVY_RAIN) .attr(PostWeatherLapseHealAbAttr, 2, WeatherType.RAIN, WeatherType.HEAVY_RAIN)
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.FIRE, 1.25) .attr(ReceivedTypeDamageMultiplierAbAttr, PokemonType.FIRE, 1.25)
.attr(TypeImmunityHealAbAttr, Type.WATER) .attr(TypeImmunityHealAbAttr, PokemonType.WATER)
.ignorable(), .ignorable(),
new Ability(Abilities.DOWNLOAD, 4) new Ability(Abilities.DOWNLOAD, 4)
.attr(DownloadAbAttr), .attr(DownloadAbAttr),
@ -6316,7 +6319,7 @@ export function initAbilities() {
.conditionalAttr(pokemon => pokemon.status ? pokemon.status.effect === StatusEffect.PARALYSIS : false, StatMultiplierAbAttr, Stat.SPD, 2) .conditionalAttr(pokemon => pokemon.status ? pokemon.status.effect === StatusEffect.PARALYSIS : false, StatMultiplierAbAttr, Stat.SPD, 2)
.conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), StatMultiplierAbAttr, Stat.SPD, 1.5), .conditionalAttr(pokemon => !!pokemon.status || pokemon.hasAbility(Abilities.COMATOSE), StatMultiplierAbAttr, Stat.SPD, 1.5),
new Ability(Abilities.NORMALIZE, 4) new Ability(Abilities.NORMALIZE, 4)
.attr(MoveTypeChangeAbAttr, Type.NORMAL, 1.2, (user, target, move) => { .attr(MoveTypeChangeAbAttr, PokemonType.NORMAL, 1.2, (user, target, move) => {
return ![ Moves.HIDDEN_POWER, Moves.WEATHER_BALL, Moves.NATURAL_GIFT, Moves.JUDGMENT, Moves.TECHNO_BLAST ].includes(move.id); return ![ Moves.HIDDEN_POWER, Moves.WEATHER_BALL, Moves.NATURAL_GIFT, Moves.JUDGMENT, Moves.TECHNO_BLAST ].includes(move.id);
}), }),
new Ability(Abilities.SNIPER, 4) new Ability(Abilities.SNIPER, 4)
@ -6363,11 +6366,11 @@ export function initAbilities() {
new Ability(Abilities.SLOW_START, 4) new Ability(Abilities.SLOW_START, 4)
.attr(PostSummonAddBattlerTagAbAttr, BattlerTagType.SLOW_START, 5), .attr(PostSummonAddBattlerTagAbAttr, BattlerTagType.SLOW_START, 5),
new Ability(Abilities.SCRAPPY, 4) new Ability(Abilities.SCRAPPY, 4)
.attr(IgnoreTypeImmunityAbAttr, Type.GHOST, [ Type.NORMAL, Type.FIGHTING ]) .attr(IgnoreTypeImmunityAbAttr, PokemonType.GHOST, [ PokemonType.NORMAL, PokemonType.FIGHTING ])
.attr(IntimidateImmunityAbAttr), .attr(IntimidateImmunityAbAttr),
new Ability(Abilities.STORM_DRAIN, 4) new Ability(Abilities.STORM_DRAIN, 4)
.attr(RedirectTypeMoveAbAttr, Type.WATER) .attr(RedirectTypeMoveAbAttr, PokemonType.WATER)
.attr(TypeImmunityStatStageChangeAbAttr, Type.WATER, Stat.SPATK, 1) .attr(TypeImmunityStatStageChangeAbAttr, PokemonType.WATER, Stat.SPATK, 1)
.ignorable(), .ignorable(),
new Ability(Abilities.ICE_BODY, 4) new Ability(Abilities.ICE_BODY, 4)
.attr(BlockWeatherDamageAttr, WeatherType.HAIL) .attr(BlockWeatherDamageAttr, WeatherType.HAIL)
@ -6494,12 +6497,12 @@ export function initAbilities() {
new Ability(Abilities.MOXIE, 5) new Ability(Abilities.MOXIE, 5)
.attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1), .attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1),
new Ability(Abilities.JUSTIFIED, 5) new Ability(Abilities.JUSTIFIED, 5)
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === Type.DARK && move.category !== MoveCategory.STATUS, Stat.ATK, 1), .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === PokemonType.DARK && move.category !== MoveCategory.STATUS, Stat.ATK, 1),
new Ability(Abilities.RATTLED, 5) new Ability(Abilities.RATTLED, 5)
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => { .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => {
const moveType = user.getMoveType(move); const moveType = user.getMoveType(move);
return move.category !== MoveCategory.STATUS return move.category !== MoveCategory.STATUS
&& (moveType === Type.DARK || moveType === Type.BUG || moveType === Type.GHOST); && (moveType === PokemonType.DARK || moveType === PokemonType.BUG || moveType === PokemonType.GHOST);
}, Stat.SPD, 1) }, Stat.SPD, 1)
.attr(PostIntimidateStatStageChangeAbAttr, [ Stat.SPD ], 1), .attr(PostIntimidateStatStageChangeAbAttr, [ Stat.SPD ], 1),
new Ability(Abilities.MAGIC_BOUNCE, 5) new Ability(Abilities.MAGIC_BOUNCE, 5)
@ -6509,14 +6512,14 @@ export function initAbilities() {
// rely on move history // rely on move history
.edgeCase(), .edgeCase(),
new Ability(Abilities.SAP_SIPPER, 5) new Ability(Abilities.SAP_SIPPER, 5)
.attr(TypeImmunityStatStageChangeAbAttr, Type.GRASS, Stat.ATK, 1) .attr(TypeImmunityStatStageChangeAbAttr, PokemonType.GRASS, Stat.ATK, 1)
.ignorable(), .ignorable(),
new Ability(Abilities.PRANKSTER, 5) new Ability(Abilities.PRANKSTER, 5)
.attr(ChangeMovePriorityAbAttr, (pokemon, move: Move) => move.category === MoveCategory.STATUS, 1), .attr(ChangeMovePriorityAbAttr, (pokemon, move: Move) => move.category === MoveCategory.STATUS, 1),
new Ability(Abilities.SAND_FORCE, 5) new Ability(Abilities.SAND_FORCE, 5)
.attr(MoveTypePowerBoostAbAttr, Type.ROCK, 1.3) .attr(MoveTypePowerBoostAbAttr, PokemonType.ROCK, 1.3)
.attr(MoveTypePowerBoostAbAttr, Type.GROUND, 1.3) .attr(MoveTypePowerBoostAbAttr, PokemonType.GROUND, 1.3)
.attr(MoveTypePowerBoostAbAttr, Type.STEEL, 1.3) .attr(MoveTypePowerBoostAbAttr, PokemonType.STEEL, 1.3)
.attr(BlockWeatherDamageAttr, WeatherType.SANDSTORM) .attr(BlockWeatherDamageAttr, WeatherType.SANDSTORM)
.condition(getWeatherCondition(WeatherType.SANDSTORM)), .condition(getWeatherCondition(WeatherType.SANDSTORM)),
new Ability(Abilities.IRON_BARBS, 5) new Ability(Abilities.IRON_BARBS, 5)
@ -6564,7 +6567,7 @@ export function initAbilities() {
new Ability(Abilities.STRONG_JAW, 6) new Ability(Abilities.STRONG_JAW, 6)
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.BITING_MOVE), 1.5), .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.BITING_MOVE), 1.5),
new Ability(Abilities.REFRIGERATE, 6) new Ability(Abilities.REFRIGERATE, 6)
.attr(MoveTypeChangeAbAttr, Type.ICE, 1.2, (user, target, move) => move.type === Type.NORMAL && !move.hasAttr(VariableMoveTypeAttr)), .attr(MoveTypeChangeAbAttr, PokemonType.ICE, 1.2, (user, target, move) => move.type === PokemonType.NORMAL && !move.hasAttr(VariableMoveTypeAttr)),
new Ability(Abilities.SWEET_VEIL, 6) new Ability(Abilities.SWEET_VEIL, 6)
.attr(UserFieldStatusEffectImmunityAbAttr, StatusEffect.SLEEP) .attr(UserFieldStatusEffectImmunityAbAttr, StatusEffect.SLEEP)
.attr(UserFieldBattlerTagImmunityAbAttr, BattlerTagType.DROWSY) .attr(UserFieldBattlerTagImmunityAbAttr, BattlerTagType.DROWSY)
@ -6576,7 +6579,7 @@ export function initAbilities() {
.attr(UnsuppressableAbilityAbAttr) .attr(UnsuppressableAbilityAbAttr)
.attr(NoFusionAbilityAbAttr), .attr(NoFusionAbilityAbAttr),
new Ability(Abilities.GALE_WINGS, 6) new Ability(Abilities.GALE_WINGS, 6)
.attr(ChangeMovePriorityAbAttr, (pokemon, move) => pokemon.isFullHp() && pokemon.getMoveType(move) === Type.FLYING, 1), .attr(ChangeMovePriorityAbAttr, (pokemon, move) => pokemon.isFullHp() && pokemon.getMoveType(move) === PokemonType.FLYING, 1),
new Ability(Abilities.MEGA_LAUNCHER, 6) new Ability(Abilities.MEGA_LAUNCHER, 6)
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.PULSE_MOVE), 1.5), .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.PULSE_MOVE), 1.5),
new Ability(Abilities.GRASS_PELT, 6) new Ability(Abilities.GRASS_PELT, 6)
@ -6587,23 +6590,23 @@ export function initAbilities() {
new Ability(Abilities.TOUGH_CLAWS, 6) new Ability(Abilities.TOUGH_CLAWS, 6)
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), 1.3), .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), 1.3),
new Ability(Abilities.PIXILATE, 6) new Ability(Abilities.PIXILATE, 6)
.attr(MoveTypeChangeAbAttr, Type.FAIRY, 1.2, (user, target, move) => move.type === Type.NORMAL && !move.hasAttr(VariableMoveTypeAttr)), .attr(MoveTypeChangeAbAttr, PokemonType.FAIRY, 1.2, (user, target, move) => move.type === PokemonType.NORMAL && !move.hasAttr(VariableMoveTypeAttr)),
new Ability(Abilities.GOOEY, 6) new Ability(Abilities.GOOEY, 6)
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), Stat.SPD, -1, false), .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), Stat.SPD, -1, false),
new Ability(Abilities.AERILATE, 6) new Ability(Abilities.AERILATE, 6)
.attr(MoveTypeChangeAbAttr, Type.FLYING, 1.2, (user, target, move) => move.type === Type.NORMAL && !move.hasAttr(VariableMoveTypeAttr)), .attr(MoveTypeChangeAbAttr, PokemonType.FLYING, 1.2, (user, target, move) => move.type === PokemonType.NORMAL && !move.hasAttr(VariableMoveTypeAttr)),
new Ability(Abilities.PARENTAL_BOND, 6) new Ability(Abilities.PARENTAL_BOND, 6)
.attr(AddSecondStrikeAbAttr, 0.25), .attr(AddSecondStrikeAbAttr, 0.25),
new Ability(Abilities.DARK_AURA, 6) new Ability(Abilities.DARK_AURA, 6)
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonDarkAura", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })) .attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonDarkAura", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
.attr(FieldMoveTypePowerBoostAbAttr, Type.DARK, 4 / 3), .attr(FieldMoveTypePowerBoostAbAttr, PokemonType.DARK, 4 / 3),
new Ability(Abilities.FAIRY_AURA, 6) new Ability(Abilities.FAIRY_AURA, 6)
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonFairyAura", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })) .attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonFairyAura", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
.attr(FieldMoveTypePowerBoostAbAttr, Type.FAIRY, 4 / 3), .attr(FieldMoveTypePowerBoostAbAttr, PokemonType.FAIRY, 4 / 3),
new Ability(Abilities.AURA_BREAK, 6) new Ability(Abilities.AURA_BREAK, 6)
.ignorable() .ignorable()
.conditionalAttr(pokemon => globalScene.getField(true).some(p => p.hasAbility(Abilities.DARK_AURA)), FieldMoveTypePowerBoostAbAttr, Type.DARK, 9 / 16) .conditionalAttr(pokemon => globalScene.getField(true).some(p => p.hasAbility(Abilities.DARK_AURA)), FieldMoveTypePowerBoostAbAttr, PokemonType.DARK, 9 / 16)
.conditionalAttr(pokemon => globalScene.getField(true).some(p => p.hasAbility(Abilities.FAIRY_AURA)), FieldMoveTypePowerBoostAbAttr, Type.FAIRY, 9 / 16) .conditionalAttr(pokemon => globalScene.getField(true).some(p => p.hasAbility(Abilities.FAIRY_AURA)), FieldMoveTypePowerBoostAbAttr, PokemonType.FAIRY, 9 / 16)
.conditionalAttr(pokemon => globalScene.getField(true).some(p => p.hasAbility(Abilities.DARK_AURA) || p.hasAbility(Abilities.FAIRY_AURA)), .conditionalAttr(pokemon => globalScene.getField(true).some(p => p.hasAbility(Abilities.DARK_AURA) || p.hasAbility(Abilities.FAIRY_AURA)),
PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAuraBreak", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })), PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonAuraBreak", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })),
new Ability(Abilities.PRIMORDIAL_SEA, 6) new Ability(Abilities.PRIMORDIAL_SEA, 6)
@ -6630,7 +6633,7 @@ export function initAbilities() {
.attr(PostDamageForceSwitchAbAttr) .attr(PostDamageForceSwitchAbAttr)
.edgeCase(), // Should not trigger when hurting itself in confusion, causes Fake Out to fail turn 1 and succeed turn 2 if pokemon is switched out before battle start via playing in Switch Mode .edgeCase(), // Should not trigger when hurting itself in confusion, causes Fake Out to fail turn 1 and succeed turn 2 if pokemon is switched out before battle start via playing in Switch Mode
new Ability(Abilities.WATER_COMPACTION, 7) new Ability(Abilities.WATER_COMPACTION, 7)
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === Type.WATER && move.category !== MoveCategory.STATUS, Stat.DEF, 2), .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === PokemonType.WATER && move.category !== MoveCategory.STATUS, Stat.DEF, 2),
new Ability(Abilities.MERCILESS, 7) new Ability(Abilities.MERCILESS, 7)
.attr(ConditionalCritAbAttr, (user, target, move) => target?.status?.effect === StatusEffect.TOXIC || target?.status?.effect === StatusEffect.POISON), .attr(ConditionalCritAbAttr, (user, target, move) => target?.status?.effect === StatusEffect.TOXIC || target?.status?.effect === StatusEffect.POISON),
new Ability(Abilities.SHIELDS_DOWN, 7) new Ability(Abilities.SHIELDS_DOWN, 7)
@ -6648,12 +6651,12 @@ export function initAbilities() {
new Ability(Abilities.STAKEOUT, 7) new Ability(Abilities.STAKEOUT, 7)
.attr(MovePowerBoostAbAttr, (user, target, move) => !!target?.turnData.switchedInThisTurn, 2), .attr(MovePowerBoostAbAttr, (user, target, move) => !!target?.turnData.switchedInThisTurn, 2),
new Ability(Abilities.WATER_BUBBLE, 7) new Ability(Abilities.WATER_BUBBLE, 7)
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.FIRE, 0.5) .attr(ReceivedTypeDamageMultiplierAbAttr, PokemonType.FIRE, 0.5)
.attr(MoveTypePowerBoostAbAttr, Type.WATER, 2) .attr(MoveTypePowerBoostAbAttr, PokemonType.WATER, 2)
.attr(StatusEffectImmunityAbAttr, StatusEffect.BURN) .attr(StatusEffectImmunityAbAttr, StatusEffect.BURN)
.ignorable(), .ignorable(),
new Ability(Abilities.STEELWORKER, 7) new Ability(Abilities.STEELWORKER, 7)
.attr(MoveTypePowerBoostAbAttr, Type.STEEL), .attr(MoveTypePowerBoostAbAttr, PokemonType.STEEL),
new Ability(Abilities.BERSERK, 7) new Ability(Abilities.BERSERK, 7)
.attr(PostDefendHpGatedStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [ Stat.SPATK ], 1) .attr(PostDefendHpGatedStatStageChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, 0.5, [ Stat.SPATK ], 1)
.condition(getSheerForceHitDisableAbCondition()), .condition(getSheerForceHitDisableAbCondition()),
@ -6663,11 +6666,11 @@ export function initAbilities() {
new Ability(Abilities.LONG_REACH, 7) new Ability(Abilities.LONG_REACH, 7)
.attr(IgnoreContactAbAttr), .attr(IgnoreContactAbAttr),
new Ability(Abilities.LIQUID_VOICE, 7) new Ability(Abilities.LIQUID_VOICE, 7)
.attr(MoveTypeChangeAbAttr, Type.WATER, 1, (user, target, move) => move.hasFlag(MoveFlags.SOUND_BASED)), .attr(MoveTypeChangeAbAttr, PokemonType.WATER, 1, (user, target, move) => move.hasFlag(MoveFlags.SOUND_BASED)),
new Ability(Abilities.TRIAGE, 7) new Ability(Abilities.TRIAGE, 7)
.attr(ChangeMovePriorityAbAttr, (pokemon, move) => move.hasFlag(MoveFlags.TRIAGE_MOVE), 3), .attr(ChangeMovePriorityAbAttr, (pokemon, move) => move.hasFlag(MoveFlags.TRIAGE_MOVE), 3),
new Ability(Abilities.GALVANIZE, 7) new Ability(Abilities.GALVANIZE, 7)
.attr(MoveTypeChangeAbAttr, Type.ELECTRIC, 1.2, (user, target, move) => move.type === Type.NORMAL && !move.hasAttr(VariableMoveTypeAttr)), .attr(MoveTypeChangeAbAttr, PokemonType.ELECTRIC, 1.2, (user, target, move) => move.type === PokemonType.NORMAL && !move.hasAttr(VariableMoveTypeAttr)),
new Ability(Abilities.SURGE_SURFER, 7) new Ability(Abilities.SURGE_SURFER, 7)
.conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), StatMultiplierAbAttr, Stat.SPD, 2), .conditionalAttr(getTerrainCondition(TerrainType.ELECTRIC), StatMultiplierAbAttr, Stat.SPD, 2),
new Ability(Abilities.SCHOOLING, 7) new Ability(Abilities.SCHOOLING, 7)
@ -6715,7 +6718,7 @@ export function initAbilities() {
.attr(NoFusionAbilityAbAttr) .attr(NoFusionAbilityAbAttr)
.bypassFaint(), .bypassFaint(),
new Ability(Abilities.CORROSION, 7) new Ability(Abilities.CORROSION, 7)
.attr(IgnoreTypeStatusEffectImmunityAbAttr, [ StatusEffect.POISON, StatusEffect.TOXIC ], [ Type.STEEL, Type.POISON ]) .attr(IgnoreTypeStatusEffectImmunityAbAttr, [ StatusEffect.POISON, StatusEffect.TOXIC ], [ PokemonType.STEEL, PokemonType.POISON ])
.edgeCase(), // Should poison itself with toxic orb. .edgeCase(), // Should poison itself with toxic orb.
new Ability(Abilities.COMATOSE, 7) new Ability(Abilities.COMATOSE, 7)
.attr(UncopiableAbilityAbAttr) .attr(UncopiableAbilityAbAttr)
@ -6735,7 +6738,7 @@ export function initAbilities() {
.attr(AllyMoveCategoryPowerBoostAbAttr, [ MoveCategory.SPECIAL ], 1.3), .attr(AllyMoveCategoryPowerBoostAbAttr, [ MoveCategory.SPECIAL ], 1.3),
new Ability(Abilities.FLUFFY, 7) new Ability(Abilities.FLUFFY, 7)
.attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), 0.5) .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT), 0.5)
.attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => user.getMoveType(move) === Type.FIRE, 2) .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => user.getMoveType(move) === PokemonType.FIRE, 2)
.ignorable(), .ignorable(),
new Ability(Abilities.DAZZLING, 7) new Ability(Abilities.DAZZLING, 7)
.attr(FieldPriorityMoveImmunityAbAttr) .attr(FieldPriorityMoveImmunityAbAttr)
@ -6825,7 +6828,7 @@ export function initAbilities() {
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => { .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => {
const moveType = user.getMoveType(move); const moveType = user.getMoveType(move);
return move.category !== MoveCategory.STATUS return move.category !== MoveCategory.STATUS
&& (moveType === Type.FIRE || moveType === Type.WATER); && (moveType === PokemonType.FIRE || moveType === PokemonType.WATER);
}, Stat.SPD, 6), }, Stat.SPD, 6),
new Ability(Abilities.PUNK_ROCK, 8) new Ability(Abilities.PUNK_ROCK, 8)
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.SOUND_BASED), 1.3) .attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.SOUND_BASED), 1.3)
@ -6864,7 +6867,7 @@ export function initAbilities() {
new Ability(Abilities.SCREEN_CLEANER, 8) new Ability(Abilities.SCREEN_CLEANER, 8)
.attr(PostSummonRemoveArenaTagAbAttr, [ ArenaTagType.AURORA_VEIL, ArenaTagType.LIGHT_SCREEN, ArenaTagType.REFLECT ]), .attr(PostSummonRemoveArenaTagAbAttr, [ ArenaTagType.AURORA_VEIL, ArenaTagType.LIGHT_SCREEN, ArenaTagType.REFLECT ]),
new Ability(Abilities.STEELY_SPIRIT, 8) new Ability(Abilities.STEELY_SPIRIT, 8)
.attr(UserFieldMoveTypePowerBoostAbAttr, Type.STEEL), .attr(UserFieldMoveTypePowerBoostAbAttr, PokemonType.STEEL),
new Ability(Abilities.PERISH_BODY, 8) new Ability(Abilities.PERISH_BODY, 8)
.attr(PostDefendPerishSongAbAttr, 4) .attr(PostDefendPerishSongAbAttr, 4)
.bypassFaint(), .bypassFaint(),
@ -6900,9 +6903,9 @@ export function initAbilities() {
new Ability(Abilities.CURIOUS_MEDICINE, 8) new Ability(Abilities.CURIOUS_MEDICINE, 8)
.attr(PostSummonClearAllyStatStagesAbAttr), .attr(PostSummonClearAllyStatStagesAbAttr),
new Ability(Abilities.TRANSISTOR, 8) new Ability(Abilities.TRANSISTOR, 8)
.attr(MoveTypePowerBoostAbAttr, Type.ELECTRIC), .attr(MoveTypePowerBoostAbAttr, PokemonType.ELECTRIC),
new Ability(Abilities.DRAGONS_MAW, 8) new Ability(Abilities.DRAGONS_MAW, 8)
.attr(MoveTypePowerBoostAbAttr, Type.DRAGON), .attr(MoveTypePowerBoostAbAttr, PokemonType.DRAGON),
new Ability(Abilities.CHILLING_NEIGH, 8) new Ability(Abilities.CHILLING_NEIGH, 8)
.attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1), .attr(PostVictoryStatStageChangeAbAttr, Stat.ATK, 1),
new Ability(Abilities.GRIM_NEIGH, 8) new Ability(Abilities.GRIM_NEIGH, 8)
@ -6928,7 +6931,7 @@ export function initAbilities() {
.attr(PostDefendTerrainChangeAbAttr, TerrainType.GRASSY) .attr(PostDefendTerrainChangeAbAttr, TerrainType.GRASSY)
.bypassFaint(), .bypassFaint(),
new Ability(Abilities.THERMAL_EXCHANGE, 9) new Ability(Abilities.THERMAL_EXCHANGE, 9)
.attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === Type.FIRE && move.category !== MoveCategory.STATUS, Stat.ATK, 1) .attr(PostDefendStatStageChangeAbAttr, (target, user, move) => user.getMoveType(move) === PokemonType.FIRE && move.category !== MoveCategory.STATUS, Stat.ATK, 1)
.attr(StatusEffectImmunityAbAttr, StatusEffect.BURN) .attr(StatusEffectImmunityAbAttr, StatusEffect.BURN)
.ignorable(), .ignorable(),
new Ability(Abilities.ANGER_SHELL, 9) new Ability(Abilities.ANGER_SHELL, 9)
@ -6937,10 +6940,10 @@ export function initAbilities() {
.condition(getSheerForceHitDisableAbCondition()), .condition(getSheerForceHitDisableAbCondition()),
new Ability(Abilities.PURIFYING_SALT, 9) new Ability(Abilities.PURIFYING_SALT, 9)
.attr(StatusEffectImmunityAbAttr) .attr(StatusEffectImmunityAbAttr)
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.GHOST, 0.5) .attr(ReceivedTypeDamageMultiplierAbAttr, PokemonType.GHOST, 0.5)
.ignorable(), .ignorable(),
new Ability(Abilities.WELL_BAKED_BODY, 9) new Ability(Abilities.WELL_BAKED_BODY, 9)
.attr(TypeImmunityStatStageChangeAbAttr, Type.FIRE, Stat.DEF, 2) .attr(TypeImmunityStatStageChangeAbAttr, PokemonType.FIRE, Stat.DEF, 2)
.ignorable(), .ignorable(),
new Ability(Abilities.WIND_RIDER, 9) new Ability(Abilities.WIND_RIDER, 9)
.attr(MoveImmunityStatStageChangeAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.hasFlag(MoveFlags.WIND_MOVE) && move.category !== MoveCategory.STATUS, Stat.ATK, 1) .attr(MoveImmunityStatStageChangeAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.hasFlag(MoveFlags.WIND_MOVE) && move.category !== MoveCategory.STATUS, Stat.ATK, 1)
@ -6951,7 +6954,7 @@ export function initAbilities() {
.attr(ForceSwitchOutImmunityAbAttr) .attr(ForceSwitchOutImmunityAbAttr)
.ignorable(), .ignorable(),
new Ability(Abilities.ROCKY_PAYLOAD, 9) new Ability(Abilities.ROCKY_PAYLOAD, 9)
.attr(MoveTypePowerBoostAbAttr, Type.ROCK), .attr(MoveTypePowerBoostAbAttr, PokemonType.ROCK),
new Ability(Abilities.WIND_POWER, 9) new Ability(Abilities.WIND_POWER, 9)
.attr(PostDefendApplyBattlerTagAbAttr, (target, user, move) => move.hasFlag(MoveFlags.WIND_MOVE), BattlerTagType.CHARGED), .attr(PostDefendApplyBattlerTagAbAttr, (target, user, move) => move.hasFlag(MoveFlags.WIND_MOVE), BattlerTagType.CHARGED),
new Ability(Abilities.ZERO_TO_HERO, 9) new Ability(Abilities.ZERO_TO_HERO, 9)
@ -7026,14 +7029,14 @@ export function initAbilities() {
.attr(FieldPriorityMoveImmunityAbAttr) .attr(FieldPriorityMoveImmunityAbAttr)
.ignorable(), .ignorable(),
new Ability(Abilities.EARTH_EATER, 9) new Ability(Abilities.EARTH_EATER, 9)
.attr(TypeImmunityHealAbAttr, Type.GROUND) .attr(TypeImmunityHealAbAttr, PokemonType.GROUND)
.ignorable(), .ignorable(),
new Ability(Abilities.MYCELIUM_MIGHT, 9) new Ability(Abilities.MYCELIUM_MIGHT, 9)
.attr(ChangeMovePriorityAbAttr, (pokemon, move) => move.category === MoveCategory.STATUS, -0.2) .attr(ChangeMovePriorityAbAttr, (pokemon, move) => move.category === MoveCategory.STATUS, -0.2)
.attr(PreventBypassSpeedChanceAbAttr, (pokemon, move) => move.category === MoveCategory.STATUS) .attr(PreventBypassSpeedChanceAbAttr, (pokemon, move) => move.category === MoveCategory.STATUS)
.attr(MoveAbilityBypassAbAttr, (pokemon, move: Move) => move.category === MoveCategory.STATUS), .attr(MoveAbilityBypassAbAttr, (pokemon, move: Move) => move.category === MoveCategory.STATUS),
new Ability(Abilities.MINDS_EYE, 9) new Ability(Abilities.MINDS_EYE, 9)
.attr(IgnoreTypeImmunityAbAttr, Type.GHOST, [ Type.NORMAL, Type.FIGHTING ]) .attr(IgnoreTypeImmunityAbAttr, PokemonType.GHOST, [ PokemonType.NORMAL, PokemonType.FIGHTING ])
.attr(ProtectStatAbAttr, Stat.ACC) .attr(ProtectStatAbAttr, Stat.ACC)
.attr(IgnoreOpponentStatStagesAbAttr, [ Stat.EVA ]) .attr(IgnoreOpponentStatStagesAbAttr, [ Stat.EVA ])
.ignorable(), .ignorable(),

View File

@ -1,8 +1,10 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import type { Arena } from "#app/field/arena"; import type { Arena } from "#app/field/arena";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { BooleanHolder, NumberHolder, toDmgValue } from "#app/utils"; import { BooleanHolder, NumberHolder, toDmgValue } from "#app/utils";
import { MoveCategory, allMoves, MoveTarget } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import { MoveTarget } from "#enums/MoveTarget";
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, PokemonMove } from "#app/field/pokemon"; import { HitResult, PokemonMove } from "#app/field/pokemon";
@ -501,7 +503,7 @@ class WishTag extends ArenaTag {
* Abstract class to implement weakened moves of a specific type. * Abstract class to implement weakened moves of a specific type.
*/ */
export class WeakenMoveTypeTag extends ArenaTag { export class WeakenMoveTypeTag extends ArenaTag {
private weakenedType: Type; private weakenedType: PokemonType;
/** /**
* Creates a new instance of the WeakenMoveTypeTag class. * Creates a new instance of the WeakenMoveTypeTag class.
@ -512,7 +514,7 @@ export class WeakenMoveTypeTag extends ArenaTag {
* @param sourceMove - The move that created the tag. * @param sourceMove - The move that created the tag.
* @param sourceId - The ID of the source of the tag. * @param sourceId - The ID of the source of the tag.
*/ */
constructor(tagType: ArenaTagType, turnCount: number, type: Type, sourceMove: Moves, sourceId: number) { constructor(tagType: ArenaTagType, turnCount: number, type: PokemonType, sourceMove: Moves, sourceId: number) {
super(tagType, turnCount, sourceMove, sourceId); super(tagType, turnCount, sourceMove, sourceId);
this.weakenedType = type; this.weakenedType = type;
@ -522,11 +524,11 @@ export class WeakenMoveTypeTag extends ArenaTag {
* Reduces an attack's power by 0.33x if it matches this tag's weakened type. * Reduces an attack's power by 0.33x if it matches this tag's weakened type.
* @param arena n/a * @param arena n/a
* @param simulated n/a * @param simulated n/a
* @param type the attack's {@linkcode Type} * @param type the attack's {@linkcode PokemonType}
* @param power a {@linkcode NumberHolder} containing the attack's power * @param power a {@linkcode NumberHolder} containing the attack's power
* @returns `true` if the attack's power was reduced; `false` otherwise. * @returns `true` if the attack's power was reduced; `false` otherwise.
*/ */
override apply(arena: Arena, simulated: boolean, type: Type, power: NumberHolder): boolean { override apply(arena: Arena, simulated: boolean, type: PokemonType, power: NumberHolder): boolean {
if (type === this.weakenedType) { if (type === this.weakenedType) {
power.value *= 0.33; power.value *= 0.33;
return true; return true;
@ -541,7 +543,7 @@ export class WeakenMoveTypeTag extends ArenaTag {
*/ */
class MudSportTag extends WeakenMoveTypeTag { class MudSportTag extends WeakenMoveTypeTag {
constructor(turnCount: number, sourceId: number) { constructor(turnCount: number, sourceId: number) {
super(ArenaTagType.MUD_SPORT, turnCount, Type.ELECTRIC, Moves.MUD_SPORT, sourceId); super(ArenaTagType.MUD_SPORT, turnCount, PokemonType.ELECTRIC, Moves.MUD_SPORT, sourceId);
} }
onAdd(arena: Arena): void { onAdd(arena: Arena): void {
@ -559,7 +561,7 @@ class MudSportTag extends WeakenMoveTypeTag {
*/ */
class WaterSportTag extends WeakenMoveTypeTag { class WaterSportTag extends WeakenMoveTypeTag {
constructor(turnCount: number, sourceId: number) { constructor(turnCount: number, sourceId: number) {
super(ArenaTagType.WATER_SPORT, turnCount, Type.FIRE, Moves.WATER_SPORT, sourceId); super(ArenaTagType.WATER_SPORT, turnCount, PokemonType.FIRE, Moves.WATER_SPORT, sourceId);
} }
onAdd(arena: Arena): void { onAdd(arena: Arena): void {
@ -592,12 +594,12 @@ export class IonDelugeTag extends ArenaTag {
* Converts Normal-type moves to Electric type * Converts Normal-type moves to Electric type
* @param arena n/a * @param arena n/a
* @param simulated n/a * @param simulated n/a
* @param moveType a {@linkcode NumberHolder} containing a move's {@linkcode Type} * @param moveType a {@linkcode NumberHolder} containing a move's {@linkcode PokemonType}
* @returns `true` if the given move type changed; `false` otherwise. * @returns `true` if the given move type changed; `false` otherwise.
*/ */
override apply(arena: Arena, simulated: boolean, moveType: NumberHolder): boolean { override apply(arena: Arena, simulated: boolean, moveType: NumberHolder): boolean {
if (moveType.value === Type.NORMAL) { if (moveType.value === PokemonType.NORMAL) {
moveType.value = Type.ELECTRIC; moveType.value = PokemonType.ELECTRIC;
return true; return true;
} }
return false; return false;
@ -744,7 +746,7 @@ class ToxicSpikesTag extends ArenaTrapTag {
if (simulated) { if (simulated) {
return true; return true;
} }
if (pokemon.isOfType(Type.POISON)) { if (pokemon.isOfType(PokemonType.POISON)) {
this.neutralized = true; this.neutralized = true;
if (globalScene.arena.removeTag(this.tagType)) { if (globalScene.arena.removeTag(this.tagType)) {
globalScene.queueMessage(i18next.t("arenaTag:toxicSpikesActivateTrapPoison", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: this.getMoveName() })); globalScene.queueMessage(i18next.t("arenaTag:toxicSpikesActivateTrapPoison", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: this.getMoveName() }));
@ -765,7 +767,7 @@ class ToxicSpikesTag extends ArenaTrapTag {
if (pokemon.isGrounded() || !pokemon.canSetStatus(StatusEffect.POISON, true)) { if (pokemon.isGrounded() || !pokemon.canSetStatus(StatusEffect.POISON, true)) {
return 1; return 1;
} }
if (pokemon.isOfType(Type.POISON)) { if (pokemon.isOfType(PokemonType.POISON)) {
return 1.25; return 1.25;
} }
return super.getMatchupScoreMultiplier(pokemon); return super.getMatchupScoreMultiplier(pokemon);
@ -820,7 +822,7 @@ class StealthRockTag extends ArenaTrapTag {
} }
getDamageHpRatio(pokemon: Pokemon): number { getDamageHpRatio(pokemon: Pokemon): number {
const effectiveness = pokemon.getAttackTypeEffectiveness(Type.ROCK, undefined, true); const effectiveness = pokemon.getAttackTypeEffectiveness(PokemonType.ROCK, undefined, true);
let damageHpRatio: number = 0; let damageHpRatio: number = 0;
@ -1143,7 +1145,7 @@ class FireGrassPledgeTag extends ArenaTag {
? globalScene.getPlayerField() ? globalScene.getPlayerField()
: globalScene.getEnemyField(); : globalScene.getEnemyField();
field.filter(pokemon => !pokemon.isOfType(Type.FIRE) && !pokemon.switchOutStatus).forEach(pokemon => { field.filter(pokemon => !pokemon.isOfType(PokemonType.FIRE) && !pokemon.switchOutStatus).forEach(pokemon => {
// "{pokemonNameWithAffix} was hurt by the sea of fire!" // "{pokemonNameWithAffix} was hurt by the sea of fire!"
globalScene.queueMessage(i18next.t("arenaTag:fireGrassPledgeLapse", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) })); globalScene.queueMessage(i18next.t("arenaTag:fireGrassPledgeLapse", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
// TODO: Replace this with a proper animation // TODO: Replace this with a proper animation

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";

View File

@ -2,7 +2,7 @@ import { globalScene } from "#app/global-scene";
import { Gender } from "#app/data/gender"; import { Gender } from "#app/data/gender";
import { PokeballType } from "#enums/pokeball"; import { PokeballType } from "#enums/pokeball";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
import { Nature } from "#enums/nature"; import { Nature } from "#enums/nature";
@ -216,12 +216,12 @@ class FriendshipTimeOfDayEvolutionCondition extends SpeciesEvolutionCondition {
class FriendshipMoveTypeEvolutionCondition extends SpeciesEvolutionCondition { class FriendshipMoveTypeEvolutionCondition extends SpeciesEvolutionCondition {
public amount: number; public amount: number;
public type: Type; public type: PokemonType;
constructor(amount: number, type: Type) { constructor(amount: number, type: PokemonType) {
super(p => p.friendship >= amount && !!p.getMoveset().find(m => m?.getMove().type === type)); super(p => p.friendship >= amount && !!p.getMoveset().find(m => m?.getMove().type === type));
this.amount = amount; this.amount = amount;
this.type = type; this.type = type;
this.description = i18next.t("pokemonEvolutions:friendshipMoveType", { type: i18next.t(`pokemonInfo:Type.${Type[this.type]}`) }); this.description = i18next.t("pokemonEvolutions:friendshipMoveType", { type: i18next.t(`pokemonInfo:Type.${PokemonType[this.type]}`) });
} }
} }
@ -233,11 +233,11 @@ class ShedinjaEvolutionCondition extends SpeciesEvolutionCondition {
} }
class PartyTypeEvolutionCondition extends SpeciesEvolutionCondition { class PartyTypeEvolutionCondition extends SpeciesEvolutionCondition {
public type: Type; public type: PokemonType;
constructor(type: Type) { constructor(type: PokemonType) {
super(() => !!globalScene.getPlayerParty().find(p => p.getTypes(false, false, true).indexOf(type) > -1)); super(() => !!globalScene.getPlayerParty().find(p => p.getTypes(false, false, true).indexOf(type) > -1));
this.type = type; this.type = type;
this.description = i18next.t("pokemonEvolutions:partyType", { type: i18next.t(`pokemonInfo:Type.${Type[this.type]}`) }); this.description = i18next.t("pokemonEvolutions:partyType", { type: i18next.t(`pokemonInfo:Type.${PokemonType[this.type]}`) });
} }
} }
@ -260,11 +260,11 @@ class WeatherEvolutionCondition extends SpeciesEvolutionCondition {
} }
class MoveTypeEvolutionCondition extends SpeciesEvolutionCondition { class MoveTypeEvolutionCondition extends SpeciesEvolutionCondition {
public type: Type; public type: PokemonType;
constructor(type: Type) { constructor(type: PokemonType) {
super(p => p.moveset.filter(m => m?.getMove().type === type).length > 0); super(p => p.moveset.filter(m => m?.getMove().type === type).length > 0);
this.type = type; this.type = type;
this.description = i18next.t("pokemonEvolutions:moveType", { type: i18next.t(`pokemonInfo:Type.${Type[this.type]}`) }); this.description = i18next.t("pokemonEvolutions:moveType", { type: i18next.t(`pokemonInfo:Type.${PokemonType[this.type]}`) });
} }
} }
@ -1103,7 +1103,7 @@ export const pokemonEvolutions: PokemonEvolutions = {
new SpeciesEvolution(Species.GOGOAT, 32, null, null) new SpeciesEvolution(Species.GOGOAT, 32, null, null)
], ],
[Species.PANCHAM]: [ [Species.PANCHAM]: [
new SpeciesEvolution(Species.PANGORO, 32, null, new PartyTypeEvolutionCondition(Type.DARK), SpeciesWildEvolutionDelay.MEDIUM) new SpeciesEvolution(Species.PANGORO, 32, null, new PartyTypeEvolutionCondition(PokemonType.DARK), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.ESPURR]: [ [Species.ESPURR]: [
new SpeciesFormEvolution(Species.MEOWSTIC, "", "female", 25, null, new GenderEvolutionCondition(Gender.FEMALE)), new SpeciesFormEvolution(Species.MEOWSTIC, "", "female", 25, null, new GenderEvolutionCondition(Gender.FEMALE)),
@ -1519,8 +1519,8 @@ export const pokemonEvolutions: PokemonEvolutions = {
new SpeciesEvolution(Species.STARMIE, 1, EvolutionItem.WATER_STONE, null, SpeciesWildEvolutionDelay.LONG) new SpeciesEvolution(Species.STARMIE, 1, EvolutionItem.WATER_STONE, null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.EEVEE]: [ [Species.EEVEE]: [
new SpeciesFormEvolution(Species.SYLVEON, "", "", 1, null, new FriendshipMoveTypeEvolutionCondition(120, Type.FAIRY), SpeciesWildEvolutionDelay.LONG), new SpeciesFormEvolution(Species.SYLVEON, "", "", 1, null, new FriendshipMoveTypeEvolutionCondition(120, PokemonType.FAIRY), SpeciesWildEvolutionDelay.LONG),
new SpeciesFormEvolution(Species.SYLVEON, "partner", "", 1, null, new FriendshipMoveTypeEvolutionCondition(120, Type.FAIRY), SpeciesWildEvolutionDelay.LONG), new SpeciesFormEvolution(Species.SYLVEON, "partner", "", 1, null, new FriendshipMoveTypeEvolutionCondition(120, PokemonType.FAIRY), SpeciesWildEvolutionDelay.LONG),
new SpeciesFormEvolution(Species.ESPEON, "", "", 1, null, new FriendshipTimeOfDayEvolutionCondition(120, "day"), SpeciesWildEvolutionDelay.LONG), new SpeciesFormEvolution(Species.ESPEON, "", "", 1, null, new FriendshipTimeOfDayEvolutionCondition(120, "day"), SpeciesWildEvolutionDelay.LONG),
new SpeciesFormEvolution(Species.ESPEON, "partner", "", 1, null, new FriendshipTimeOfDayEvolutionCondition(120, "day"), SpeciesWildEvolutionDelay.LONG), new SpeciesFormEvolution(Species.ESPEON, "partner", "", 1, null, new FriendshipTimeOfDayEvolutionCondition(120, "day"), SpeciesWildEvolutionDelay.LONG),
new SpeciesFormEvolution(Species.UMBREON, "", "", 1, null, new FriendshipTimeOfDayEvolutionCondition(120, "night"), SpeciesWildEvolutionDelay.LONG), new SpeciesFormEvolution(Species.UMBREON, "", "", 1, null, new FriendshipTimeOfDayEvolutionCondition(120, "night"), SpeciesWildEvolutionDelay.LONG),
@ -1758,7 +1758,7 @@ export const pokemonEvolutions: PokemonEvolutions = {
new SpeciesEvolution(Species.GENGAR, 1, EvolutionItem.LINKING_CORD, null, SpeciesWildEvolutionDelay.VERY_LONG) new SpeciesEvolution(Species.GENGAR, 1, EvolutionItem.LINKING_CORD, null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.ONIX]: [ [Species.ONIX]: [
new SpeciesEvolution(Species.STEELIX, 1, EvolutionItem.LINKING_CORD, new MoveTypeEvolutionCondition(Type.STEEL), SpeciesWildEvolutionDelay.VERY_LONG) new SpeciesEvolution(Species.STEELIX, 1, EvolutionItem.LINKING_CORD, new MoveTypeEvolutionCondition(PokemonType.STEEL), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.RHYDON]: [ [Species.RHYDON]: [
new SpeciesEvolution(Species.RHYPERIOR, 1, EvolutionItem.PROTECTOR, null, SpeciesWildEvolutionDelay.VERY_LONG) new SpeciesEvolution(Species.RHYPERIOR, 1, EvolutionItem.PROTECTOR, null, SpeciesWildEvolutionDelay.VERY_LONG)
@ -1767,7 +1767,7 @@ export const pokemonEvolutions: PokemonEvolutions = {
new SpeciesEvolution(Species.KINGDRA, 1, EvolutionItem.DRAGON_SCALE, null, SpeciesWildEvolutionDelay.VERY_LONG) new SpeciesEvolution(Species.KINGDRA, 1, EvolutionItem.DRAGON_SCALE, null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.SCYTHER]: [ [Species.SCYTHER]: [
new SpeciesEvolution(Species.SCIZOR, 1, EvolutionItem.LINKING_CORD, new MoveTypeEvolutionCondition(Type.STEEL), SpeciesWildEvolutionDelay.VERY_LONG), new SpeciesEvolution(Species.SCIZOR, 1, EvolutionItem.LINKING_CORD, new MoveTypeEvolutionCondition(PokemonType.STEEL), SpeciesWildEvolutionDelay.VERY_LONG),
new SpeciesEvolution(Species.KLEAVOR, 1, EvolutionItem.BLACK_AUGURITE, null, SpeciesWildEvolutionDelay.VERY_LONG) new SpeciesEvolution(Species.KLEAVOR, 1, EvolutionItem.BLACK_AUGURITE, null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.ELECTABUZZ]: [ [Species.ELECTABUZZ]: [

View File

@ -3,10 +3,10 @@ import {
AttackMove, AttackMove,
BeakBlastHeaderAttr, BeakBlastHeaderAttr,
DelayedAttackAttr, DelayedAttackAttr,
MoveFlags,
SelfStatusMove, SelfStatusMove,
allMoves, allMoves,
} from "./move"; } from "./moves/move";
import { MoveFlags } from "#enums/MoveFlags";
import type Pokemon from "../field/pokemon"; import type Pokemon from "../field/pokemon";
import { import {
type nil, type nil,

View File

@ -8,20 +8,20 @@ import {
ReverseDrainAbAttr ReverseDrainAbAttr
} from "#app/data/ability"; } from "#app/data/ability";
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/move"; import type Move from "#app/data/moves/move";
import { import {
allMoves, allMoves,
applyMoveAttrs, applyMoveAttrs,
ConsecutiveUseDoublePowerAttr, ConsecutiveUseDoublePowerAttr,
HealOnAllyAttr, HealOnAllyAttr,
MoveCategory,
MoveFlags,
StatusCategoryOnAllyAttr StatusCategoryOnAllyAttr
} from "#app/data/move"; } from "#app/data/moves/move";
import { MoveFlags } from "#enums/MoveFlags";
import { MoveCategory } from "#enums/MoveCategory";
import { SpeciesFormChangeAbilityTrigger } from "#app/data/pokemon-forms"; import { SpeciesFormChangeAbilityTrigger } from "#app/data/pokemon-forms";
import { getStatusEffectHealText } from "#app/data/status-effect"; import { getStatusEffectHealText } from "#app/data/status-effect";
import { TerrainType } from "#app/data/terrain"; import { TerrainType } from "#app/data/terrain";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HitResult, MoveResult } from "#app/field/pokemon"; import { HitResult, MoveResult } from "#app/field/pokemon";
import { getPokemonNameWithAffix } from "#app/messages"; import { getPokemonNameWithAffix } from "#app/messages";
@ -514,7 +514,7 @@ export class TrappedTag extends BattlerTag {
const source = globalScene.getPokemonById(this.sourceId!)!; const source = globalScene.getPokemonById(this.sourceId!)!;
const move = allMoves[this.sourceMove]; const move = allMoves[this.sourceMove];
const isGhost = pokemon.isOfType(Type.GHOST); const isGhost = pokemon.isOfType(PokemonType.GHOST);
const isTrapped = pokemon.getTag(TrappedTag); const isTrapped = pokemon.getTag(TrappedTag);
const hasSubstitute = move.hitsSubstitute(source, pokemon); const hasSubstitute = move.hitsSubstitute(source, pokemon);
@ -819,7 +819,7 @@ export class SeedTag extends BattlerTag {
} }
canAdd(pokemon: Pokemon): boolean { canAdd(pokemon: Pokemon): boolean {
return !pokemon.isOfType(Type.GRASS); return !pokemon.isOfType(PokemonType.GRASS);
} }
onAdd(pokemon: Pokemon): void { onAdd(pokemon: Pokemon): void {
@ -889,7 +889,7 @@ export class PowderTag extends BattlerTag {
if (movePhase instanceof MovePhase) { if (movePhase instanceof MovePhase) {
const move = movePhase.move.getMove(); const move = movePhase.move.getMove();
const weather = globalScene.arena.weather; const weather = globalScene.arena.weather;
if (pokemon.getMoveType(move) === Type.FIRE && !(weather && weather.weatherType === WeatherType.HEAVY_RAIN && !weather.isEffectSuppressed())) { if (pokemon.getMoveType(move) === PokemonType.FIRE && !(weather && weather.weatherType === WeatherType.HEAVY_RAIN && !weather.isEffectSuppressed())) {
movePhase.fail(); movePhase.fail();
movePhase.showMoveText(); movePhase.showMoveText();
@ -1832,9 +1832,9 @@ export class SemiInvulnerableTag extends BattlerTag {
} }
export class TypeImmuneTag extends BattlerTag { export class TypeImmuneTag extends BattlerTag {
public immuneType: Type; public immuneType: PokemonType;
constructor(tagType: BattlerTagType, sourceMove: Moves, immuneType: Type, length: number = 1) { constructor(tagType: BattlerTagType, sourceMove: Moves, immuneType: PokemonType, length: number = 1) {
super(tagType, BattlerTagLapseType.TURN_END, length, sourceMove, undefined, true); super(tagType, BattlerTagLapseType.TURN_END, length, sourceMove, undefined, true);
this.immuneType = immuneType; this.immuneType = immuneType;
@ -1846,7 +1846,7 @@ export class TypeImmuneTag extends BattlerTag {
*/ */
loadTag(source: BattlerTag | any): void { loadTag(source: BattlerTag | any): void {
super.loadTag(source); super.loadTag(source);
this.immuneType = source.immuneType as Type; this.immuneType = source.immuneType as PokemonType;
} }
} }
@ -1857,7 +1857,7 @@ export class TypeImmuneTag extends BattlerTag {
*/ */
export class FloatingTag extends TypeImmuneTag { export class FloatingTag extends TypeImmuneTag {
constructor(tagType: BattlerTagType, sourceMove: Moves, turnCount: number) { constructor(tagType: BattlerTagType, sourceMove: Moves, turnCount: number) {
super(tagType, sourceMove, Type.GROUND, turnCount); super(tagType, sourceMove, PokemonType.GROUND, turnCount);
} }
onAdd(pokemon: Pokemon): void { onAdd(pokemon: Pokemon): void {
@ -1878,11 +1878,11 @@ export class FloatingTag extends TypeImmuneTag {
} }
export class TypeBoostTag extends BattlerTag { export class TypeBoostTag extends BattlerTag {
public boostedType: Type; public boostedType: PokemonType;
public boostValue: number; public boostValue: number;
public oneUse: boolean; public oneUse: boolean;
constructor(tagType: BattlerTagType, sourceMove: Moves, boostedType: Type, boostValue: number, oneUse: boolean) { constructor(tagType: BattlerTagType, sourceMove: Moves, boostedType: PokemonType, boostValue: number, oneUse: boolean) {
super(tagType, BattlerTagLapseType.TURN_END, 1, sourceMove); super(tagType, BattlerTagLapseType.TURN_END, 1, sourceMove);
this.boostedType = boostedType; this.boostedType = boostedType;
@ -1896,7 +1896,7 @@ export class TypeBoostTag extends BattlerTag {
*/ */
loadTag(source: BattlerTag | any): void { loadTag(source: BattlerTag | any): void {
super.loadTag(source); super.loadTag(source);
this.boostedType = source.boostedType as Type; this.boostedType = source.boostedType as PokemonType;
this.boostValue = source.boostValue; this.boostValue = source.boostValue;
this.oneUse = source.oneUse; this.oneUse = source.oneUse;
} }
@ -1934,7 +1934,7 @@ export class CritBoostTag extends BattlerTag {
*/ */
export class DragonCheerTag extends CritBoostTag { export class DragonCheerTag extends CritBoostTag {
/** The types of the user's ally when the tag is added */ /** The types of the user's ally when the tag is added */
public typesOnAdd: Type[]; public typesOnAdd: PokemonType[];
constructor() { constructor() {
super(BattlerTagType.CRIT_BOOST, Moves.DRAGON_CHEER); super(BattlerTagType.CRIT_BOOST, Moves.DRAGON_CHEER);
@ -1980,7 +1980,7 @@ export class SaltCuredTag extends BattlerTag {
applyAbAttrs(BlockNonDirectDamageAbAttr, pokemon, cancelled); applyAbAttrs(BlockNonDirectDamageAbAttr, pokemon, cancelled);
if (!cancelled.value) { if (!cancelled.value) {
const pokemonSteelOrWater = pokemon.isOfType(Type.STEEL) || pokemon.isOfType(Type.WATER); const pokemonSteelOrWater = pokemon.isOfType(PokemonType.STEEL) || pokemon.isOfType(PokemonType.WATER);
pokemon.damageAndUpdate(toDmgValue(pokemonSteelOrWater ? pokemon.getMaxHp() / 4 : pokemon.getMaxHp() / 8), { result: HitResult.INDIRECT }); pokemon.damageAndUpdate(toDmgValue(pokemonSteelOrWater ? pokemon.getMaxHp() / 4 : pokemon.getMaxHp() / 8), { result: HitResult.INDIRECT });
globalScene.queueMessage( globalScene.queueMessage(
@ -2071,21 +2071,21 @@ export class RoostedTag extends BattlerTag {
const currentTypes = pokemon.getTypes(); const currentTypes = pokemon.getTypes();
const baseTypes = pokemon.getTypes(false, false, true); const baseTypes = pokemon.getTypes(false, false, true);
const forestsCurseApplied: boolean = currentTypes.includes(Type.GRASS) && !baseTypes.includes(Type.GRASS); const forestsCurseApplied: boolean = currentTypes.includes(PokemonType.GRASS) && !baseTypes.includes(PokemonType.GRASS);
const trickOrTreatApplied: boolean = currentTypes.includes(Type.GHOST) && !baseTypes.includes(Type.GHOST); const trickOrTreatApplied: boolean = currentTypes.includes(PokemonType.GHOST) && !baseTypes.includes(PokemonType.GHOST);
if (this.isBaseFlying) { if (this.isBaseFlying) {
let modifiedTypes: Type[] = []; let modifiedTypes: PokemonType[] = [];
if (this.isBasePureFlying) { if (this.isBasePureFlying) {
if (forestsCurseApplied || trickOrTreatApplied) { if (forestsCurseApplied || trickOrTreatApplied) {
modifiedTypes = currentTypes.filter(type => type !== Type.NORMAL); modifiedTypes = currentTypes.filter(type => type !== PokemonType.NORMAL);
modifiedTypes.push(Type.FLYING); modifiedTypes.push(PokemonType.FLYING);
} else { } else {
modifiedTypes = [ Type.FLYING ]; modifiedTypes = [ PokemonType.FLYING ];
} }
} else { } else {
modifiedTypes = [ ...currentTypes ]; modifiedTypes = [ ...currentTypes ];
modifiedTypes.push(Type.FLYING); modifiedTypes.push(PokemonType.FLYING);
} }
pokemon.summonData.types = modifiedTypes; pokemon.summonData.types = modifiedTypes;
pokemon.updateInfo(); pokemon.updateInfo();
@ -2098,18 +2098,18 @@ export class RoostedTag extends BattlerTag {
const isOriginallyDualType = baseTypes.length === 2; const isOriginallyDualType = baseTypes.length === 2;
const isCurrentlyDualType = currentTypes.length === 2; const isCurrentlyDualType = currentTypes.length === 2;
this.isBaseFlying = baseTypes.includes(Type.FLYING); this.isBaseFlying = baseTypes.includes(PokemonType.FLYING);
this.isBasePureFlying = baseTypes[0] === Type.FLYING && baseTypes.length === 1; this.isBasePureFlying = baseTypes[0] === PokemonType.FLYING && baseTypes.length === 1;
if (this.isBaseFlying) { if (this.isBaseFlying) {
let modifiedTypes: Type[]; let modifiedTypes: PokemonType[];
if (this.isBasePureFlying && !isCurrentlyDualType) { if (this.isBasePureFlying && !isCurrentlyDualType) {
modifiedTypes = [ Type.NORMAL ]; modifiedTypes = [ PokemonType.NORMAL ];
} else { } else {
if (!!pokemon.getTag(RemovedTypeTag) && isOriginallyDualType && !isCurrentlyDualType) { if (!!pokemon.getTag(RemovedTypeTag) && isOriginallyDualType && !isCurrentlyDualType) {
modifiedTypes = [ Type.UNKNOWN ]; modifiedTypes = [ PokemonType.UNKNOWN ];
} else { } else {
modifiedTypes = currentTypes.filter(type => type !== Type.FLYING); modifiedTypes = currentTypes.filter(type => type !== PokemonType.FLYING);
} }
} }
pokemon.summonData.types = modifiedTypes; pokemon.summonData.types = modifiedTypes;
@ -2374,10 +2374,10 @@ export class GulpMissileTag extends BattlerTag {
* @see {@linkcode ignoreImmunity} * @see {@linkcode ignoreImmunity}
*/ */
export class ExposedTag extends BattlerTag { export class ExposedTag extends BattlerTag {
private defenderType: Type; private defenderType: PokemonType;
private allowedTypes: Type[]; private allowedTypes: PokemonType[];
constructor(tagType: BattlerTagType, sourceMove: Moves, defenderType: Type, allowedTypes: Type[]) { constructor(tagType: BattlerTagType, sourceMove: Moves, defenderType: PokemonType, allowedTypes: PokemonType[]) {
super(tagType, BattlerTagLapseType.CUSTOM, 1, sourceMove); super(tagType, BattlerTagLapseType.CUSTOM, 1, sourceMove);
this.defenderType = defenderType; this.defenderType = defenderType;
this.allowedTypes = allowedTypes; this.allowedTypes = allowedTypes;
@ -2389,16 +2389,16 @@ export class ExposedTag extends BattlerTag {
*/ */
loadTag(source: BattlerTag | any): void { loadTag(source: BattlerTag | any): void {
super.loadTag(source); super.loadTag(source);
this.defenderType = source.defenderType as Type; this.defenderType = source.defenderType as PokemonType;
this.allowedTypes = source.allowedTypes as Type[]; this.allowedTypes = source.allowedTypes as PokemonType[];
} }
/** /**
* @param types {@linkcode Type} of the defending Pokemon * @param types {@linkcode PokemonType} of the defending Pokemon
* @param moveType {@linkcode Type} of the move targetting it * @param moveType {@linkcode PokemonType} of the move targetting it
* @returns `true` if the move should be allowed to target the defender. * @returns `true` if the move should be allowed to target the defender.
*/ */
ignoreImmunity(type: Type, moveType: Type): boolean { ignoreImmunity(type: PokemonType, moveType: PokemonType): boolean {
return type === this.defenderType && this.allowedTypes.includes(moveType); return type === this.defenderType && this.allowedTypes.includes(moveType);
} }
} }
@ -3103,7 +3103,7 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
case BattlerTagType.HIDDEN: case BattlerTagType.HIDDEN:
return new SemiInvulnerableTag(tagType, turnCount, sourceMove); return new SemiInvulnerableTag(tagType, turnCount, sourceMove);
case BattlerTagType.FIRE_BOOST: case BattlerTagType.FIRE_BOOST:
return new TypeBoostTag(tagType, sourceMove, Type.FIRE, 1.5, false); return new TypeBoostTag(tagType, sourceMove, PokemonType.FIRE, 1.5, false);
case BattlerTagType.CRIT_BOOST: case BattlerTagType.CRIT_BOOST:
return new CritBoostTag(tagType, sourceMove); return new CritBoostTag(tagType, sourceMove);
case BattlerTagType.DRAGON_CHEER: case BattlerTagType.DRAGON_CHEER:
@ -3129,7 +3129,7 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
case BattlerTagType.CURSED: case BattlerTagType.CURSED:
return new CursedTag(sourceId); return new CursedTag(sourceId);
case BattlerTagType.CHARGED: case BattlerTagType.CHARGED:
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true); return new TypeBoostTag(tagType, sourceMove, PokemonType.ELECTRIC, 2, true);
case BattlerTagType.FLOATING: case BattlerTagType.FLOATING:
return new FloatingTag(tagType, sourceMove, turnCount); return new FloatingTag(tagType, sourceMove, turnCount);
case BattlerTagType.MINIMIZED: case BattlerTagType.MINIMIZED:
@ -3149,9 +3149,9 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
case BattlerTagType.DISABLED: case BattlerTagType.DISABLED:
return new DisabledTag(sourceId); return new DisabledTag(sourceId);
case BattlerTagType.IGNORE_GHOST: case BattlerTagType.IGNORE_GHOST:
return new ExposedTag(tagType, sourceMove, Type.GHOST, [ Type.NORMAL, Type.FIGHTING ]); return new ExposedTag(tagType, sourceMove, PokemonType.GHOST, [ PokemonType.NORMAL, PokemonType.FIGHTING ]);
case BattlerTagType.IGNORE_DARK: case BattlerTagType.IGNORE_DARK:
return new ExposedTag(tagType, sourceMove, Type.DARK, [ Type.PSYCHIC ]); return new ExposedTag(tagType, sourceMove, PokemonType.DARK, [ PokemonType.PSYCHIC ]);
case BattlerTagType.GULP_MISSILE_ARROKUDA: case BattlerTagType.GULP_MISSILE_ARROKUDA:
case BattlerTagType.GULP_MISSILE_PIKACHU: case BattlerTagType.GULP_MISSILE_PIKACHU:
return new GulpMissileTag(tagType, sourceMove); return new GulpMissileTag(tagType, sourceMove);

View File

@ -11,7 +11,7 @@ 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";
import type { GameMode } from "#app/game-mode"; import type { GameMode } from "#app/game-mode";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { Challenges } from "#enums/challenges"; import { Challenges } from "#enums/challenges";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type"; import { TrainerType } from "#enums/trainer-type";
@ -572,7 +572,7 @@ interface monotypeOverride {
/** The species to override */ /** The species to override */
species: Species; species: Species;
/** The type to count as */ /** The type to count as */
type: Type; type: PokemonType;
/** If part of a fusion, should we check the fused species instead of the base species? */ /** If part of a fusion, should we check the fused species instead of the base species? */
fusion: boolean; fusion: boolean;
} }
@ -582,7 +582,7 @@ interface monotypeOverride {
*/ */
export class SingleTypeChallenge extends Challenge { export class SingleTypeChallenge extends Challenge {
private static TYPE_OVERRIDES: monotypeOverride[] = [ private static TYPE_OVERRIDES: monotypeOverride[] = [
{ species: Species.CASTFORM, type: Type.NORMAL, fusion: false }, { species: Species.CASTFORM, type: PokemonType.NORMAL, fusion: false },
]; ];
// TODO: Find a solution for all Pokemon with this ssui issue, including Basculin and Burmy // TODO: Find a solution for all Pokemon with this ssui issue, including Basculin and Burmy
private static SPECIES_OVERRIDES: Species[] = [ Species.MELOETTA ]; private static SPECIES_OVERRIDES: Species[] = [ Species.MELOETTA ];
@ -647,7 +647,7 @@ export class SingleTypeChallenge extends Challenge {
if (overrideValue === undefined) { if (overrideValue === undefined) {
overrideValue = this.value; overrideValue = this.value;
} }
return Type[this.value - 1].toLowerCase(); return PokemonType[this.value - 1].toLowerCase();
} }
/** /**
@ -659,8 +659,8 @@ export class SingleTypeChallenge extends Challenge {
if (overrideValue === undefined) { if (overrideValue === undefined) {
overrideValue = this.value; overrideValue = this.value;
} }
const type = i18next.t(`pokemonInfo:Type.${Type[this.value - 1]}`); const type = i18next.t(`pokemonInfo:Type.${PokemonType[this.value - 1]}`);
const typeColor = `[color=${TypeColor[Type[this.value - 1]]}][shadow=${TypeShadow[Type[this.value - 1]]}]${type}[/shadow][/color]`; const typeColor = `[color=${TypeColor[PokemonType[this.value - 1]]}][shadow=${TypeShadow[PokemonType[this.value - 1]]}]${type}[/shadow][/color]`;
const defaultDesc = i18next.t("challenges:singleType.desc_default"); const defaultDesc = i18next.t("challenges:singleType.desc_default");
const typeDesc = i18next.t("challenges:singleType.desc", { type: typeColor }); const typeDesc = i18next.t("challenges:singleType.desc", { type: typeColor });
return this.value === 0 ? defaultDesc : typeDesc; return this.value === 0 ? defaultDesc : typeDesc;

View File

@ -1,5 +1,5 @@
import type { Abilities } from "#enums/abilities"; import type { Abilities } from "#enums/abilities";
import type { Type } from "#enums/type"; import type { PokemonType } from "#enums/pokemon-type";
import { isNullOrUndefined } from "#app/utils"; import { isNullOrUndefined } from "#app/utils";
import type { Nature } from "#enums/nature"; import type { Nature } from "#enums/nature";
@ -13,7 +13,7 @@ export class CustomPokemonData {
public ability: Abilities | -1; public ability: Abilities | -1;
public passive: Abilities | -1; public passive: Abilities | -1;
public nature: Nature | -1; public nature: Nature | -1;
public types: Type[]; public types: PokemonType[];
/** `hitsReceivedCount` aka `hitsRecCount` saves how often the pokemon got hit until a new arena encounter (used for Rage Fist) */ /** `hitsReceivedCount` aka `hitsRecCount` saves how often the pokemon got hit until a new arena encounter (used for Rage Fist) */
public hitsRecCount: number; public hitsRecCount: number;

View File

@ -0,0 +1,281 @@
import { Moves } from "#enums/moves";
/** Set of moves that cannot be called by {@linkcode Moves.METRONOME Metronome} */
export const invalidMetronomeMoves: ReadonlySet<Moves> = new Set([
Moves.AFTER_YOU,
Moves.APPLE_ACID,
Moves.ARMOR_CANNON,
Moves.ASSIST,
Moves.ASTRAL_BARRAGE,
Moves.AURA_WHEEL,
Moves.BANEFUL_BUNKER,
Moves.BEAK_BLAST,
Moves.BEHEMOTH_BASH,
Moves.BEHEMOTH_BLADE,
Moves.BELCH,
Moves.BESTOW,
Moves.BLAZING_TORQUE,
Moves.BODY_PRESS,
Moves.BRANCH_POKE,
Moves.BREAKING_SWIPE,
Moves.CELEBRATE,
Moves.CHATTER,
Moves.CHILLING_WATER,
Moves.CHILLY_RECEPTION,
Moves.CLANGOROUS_SOUL,
Moves.COLLISION_COURSE,
Moves.COMBAT_TORQUE,
Moves.COMEUPPANCE,
Moves.COPYCAT,
Moves.COUNTER,
Moves.COVET,
Moves.CRAFTY_SHIELD,
Moves.DECORATE,
Moves.DESTINY_BOND,
Moves.DETECT,
Moves.DIAMOND_STORM,
Moves.DOODLE,
Moves.DOUBLE_IRON_BASH,
Moves.DOUBLE_SHOCK,
Moves.DRAGON_ASCENT,
Moves.DRAGON_ENERGY,
Moves.DRUM_BEATING,
Moves.DYNAMAX_CANNON,
Moves.ELECTRO_DRIFT,
Moves.ENDURE,
Moves.ETERNABEAM,
Moves.FALSE_SURRENDER,
Moves.FEINT,
Moves.FIERY_WRATH,
Moves.FILLET_AWAY,
Moves.FLEUR_CANNON,
Moves.FOCUS_PUNCH,
Moves.FOLLOW_ME,
Moves.FREEZE_SHOCK,
Moves.FREEZING_GLARE,
Moves.GLACIAL_LANCE,
Moves.GRAV_APPLE,
Moves.HELPING_HAND,
Moves.HOLD_HANDS,
Moves.HYPER_DRILL,
Moves.HYPERSPACE_FURY,
Moves.HYPERSPACE_HOLE,
Moves.ICE_BURN,
Moves.INSTRUCT,
Moves.JET_PUNCH,
Moves.JUNGLE_HEALING,
Moves.KINGS_SHIELD,
Moves.LIFE_DEW,
Moves.LIGHT_OF_RUIN,
Moves.MAKE_IT_RAIN,
Moves.MAGICAL_TORQUE,
Moves.MAT_BLOCK,
Moves.ME_FIRST,
Moves.METEOR_ASSAULT,
Moves.METRONOME,
Moves.MIMIC,
Moves.MIND_BLOWN,
Moves.MIRROR_COAT,
Moves.MIRROR_MOVE,
Moves.MOONGEIST_BEAM,
Moves.NATURE_POWER,
Moves.NATURES_MADNESS,
Moves.NOXIOUS_TORQUE,
Moves.OBSTRUCT,
Moves.ORDER_UP,
Moves.ORIGIN_PULSE,
Moves.OVERDRIVE,
Moves.PHOTON_GEYSER,
Moves.PLASMA_FISTS,
Moves.POPULATION_BOMB,
Moves.POUNCE,
Moves.POWER_SHIFT,
Moves.PRECIPICE_BLADES,
Moves.PROTECT,
Moves.PYRO_BALL,
Moves.QUASH,
Moves.QUICK_GUARD,
Moves.RAGE_FIST,
Moves.RAGE_POWDER,
Moves.RAGING_BULL,
Moves.RAGING_FURY,
Moves.RELIC_SONG,
Moves.REVIVAL_BLESSING,
Moves.RUINATION,
Moves.SALT_CURE,
Moves.SECRET_SWORD,
Moves.SHED_TAIL,
Moves.SHELL_TRAP,
Moves.SILK_TRAP,
Moves.SKETCH,
Moves.SLEEP_TALK,
Moves.SNAP_TRAP,
Moves.SNARL,
Moves.SNATCH,
Moves.SNORE,
Moves.SNOWSCAPE,
Moves.SPECTRAL_THIEF,
Moves.SPICY_EXTRACT,
Moves.SPIKY_SHIELD,
Moves.SPIRIT_BREAK,
Moves.SPOTLIGHT,
Moves.STEAM_ERUPTION,
Moves.STEEL_BEAM,
Moves.STRANGE_STEAM,
Moves.STRUGGLE,
Moves.SUNSTEEL_STRIKE,
Moves.SURGING_STRIKES,
Moves.SWITCHEROO,
Moves.TECHNO_BLAST,
Moves.TERA_STARSTORM,
Moves.THIEF,
Moves.THOUSAND_ARROWS,
Moves.THOUSAND_WAVES,
Moves.THUNDER_CAGE,
Moves.THUNDEROUS_KICK,
Moves.TIDY_UP,
Moves.TRAILBLAZE,
Moves.TRANSFORM,
Moves.TRICK,
Moves.TWIN_BEAM,
Moves.V_CREATE,
Moves.WICKED_BLOW,
Moves.WICKED_TORQUE,
Moves.WIDE_GUARD,
]);
/** Set of moves that cannot be called by {@linkcode Moves.ASSIST Assist} */
export const invalidAssistMoves: ReadonlySet<Moves> = new Set([
Moves.ASSIST,
Moves.BANEFUL_BUNKER,
Moves.BEAK_BLAST,
Moves.BELCH,
Moves.BESTOW,
Moves.BOUNCE,
Moves.CELEBRATE,
Moves.CHATTER,
Moves.CIRCLE_THROW,
Moves.COPYCAT,
Moves.COUNTER,
Moves.COVET,
Moves.DESTINY_BOND,
Moves.DETECT,
Moves.DIG,
Moves.DIVE,
Moves.DRAGON_TAIL,
Moves.ENDURE,
Moves.FEINT,
Moves.FLY,
Moves.FOCUS_PUNCH,
Moves.FOLLOW_ME,
Moves.HELPING_HAND,
Moves.HOLD_HANDS,
Moves.KINGS_SHIELD,
Moves.MAT_BLOCK,
Moves.ME_FIRST,
Moves.METRONOME,
Moves.MIMIC,
Moves.MIRROR_COAT,
Moves.MIRROR_MOVE,
Moves.NATURE_POWER,
Moves.PHANTOM_FORCE,
Moves.PROTECT,
Moves.RAGE_POWDER,
Moves.ROAR,
Moves.SHADOW_FORCE,
Moves.SHELL_TRAP,
Moves.SKETCH,
Moves.SKY_DROP,
Moves.SLEEP_TALK,
Moves.SNATCH,
Moves.SPIKY_SHIELD,
Moves.SPOTLIGHT,
Moves.STRUGGLE,
Moves.SWITCHEROO,
Moves.THIEF,
Moves.TRANSFORM,
Moves.TRICK,
Moves.WHIRLWIND,
]);
/** Set of moves that cannot be called by {@linkcode Moves.SLEEP_TALK Sleep Talk} */
export const invalidSleepTalkMoves: ReadonlySet<Moves> = new Set([
Moves.ASSIST,
Moves.BELCH,
Moves.BEAK_BLAST,
Moves.BIDE,
Moves.BOUNCE,
Moves.COPYCAT,
Moves.DIG,
Moves.DIVE,
Moves.DYNAMAX_CANNON,
Moves.FREEZE_SHOCK,
Moves.FLY,
Moves.FOCUS_PUNCH,
Moves.GEOMANCY,
Moves.ICE_BURN,
Moves.ME_FIRST,
Moves.METRONOME,
Moves.MIRROR_MOVE,
Moves.MIMIC,
Moves.PHANTOM_FORCE,
Moves.RAZOR_WIND,
Moves.SHADOW_FORCE,
Moves.SHELL_TRAP,
Moves.SKETCH,
Moves.SKULL_BASH,
Moves.SKY_ATTACK,
Moves.SKY_DROP,
Moves.SLEEP_TALK,
Moves.SOLAR_BLADE,
Moves.SOLAR_BEAM,
Moves.STRUGGLE,
Moves.UPROAR,
]);
/** Set of moves that cannot be copied by {@linkcode Moves.COPYCAT Copycat} */
export const invalidCopycatMoves: ReadonlySet<Moves> = new Set([
Moves.ASSIST,
Moves.BANEFUL_BUNKER,
Moves.BEAK_BLAST,
Moves.BEHEMOTH_BASH,
Moves.BEHEMOTH_BLADE,
Moves.BESTOW,
Moves.CELEBRATE,
Moves.CHATTER,
Moves.CIRCLE_THROW,
Moves.COPYCAT,
Moves.COUNTER,
Moves.COVET,
Moves.DESTINY_BOND,
Moves.DETECT,
Moves.DRAGON_TAIL,
Moves.ENDURE,
Moves.FEINT,
Moves.FOCUS_PUNCH,
Moves.FOLLOW_ME,
Moves.HELPING_HAND,
Moves.HOLD_HANDS,
Moves.KINGS_SHIELD,
Moves.MAT_BLOCK,
Moves.ME_FIRST,
Moves.METRONOME,
Moves.MIMIC,
Moves.MIRROR_COAT,
Moves.MIRROR_MOVE,
Moves.PROTECT,
Moves.RAGE_POWDER,
Moves.ROAR,
Moves.SHELL_TRAP,
Moves.SKETCH,
Moves.SLEEP_TALK,
Moves.SNATCH,
Moves.SPIKY_SHIELD,
Moves.SPOTLIGHT,
Moves.STRUGGLE,
Moves.SWITCHEROO,
Moves.THIEF,
Moves.TRANSFORM,
Moves.TRICK,
Moves.WHIRLWIND,
]);

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ import {
HeldItemRequirement, HeldItemRequirement,
TypeRequirement TypeRequirement
} from "#app/data/mystery-encounters/mystery-encounter-requirements"; } from "#app/data/mystery-encounters/mystery-encounter-requirements";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import type { AttackTypeBoosterModifierType, ModifierTypeOption } from "#app/modifier/modifier-type"; import type { AttackTypeBoosterModifierType, ModifierTypeOption } from "#app/modifier/modifier-type";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import type { import type {
@ -56,7 +56,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/move"; 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";
@ -205,8 +205,8 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
CombinationPokemonRequirement.Some( CombinationPokemonRequirement.Some(
// Must have at least 1 Bug type on team, OR have a bug item somewhere on the team // Must have at least 1 Bug type on team, OR have a bug item somewhere on the team
new HeldItemRequirement([ "BypassSpeedChanceModifier", "ContactHeldItemTransferChanceModifier" ], 1), new HeldItemRequirement([ "BypassSpeedChanceModifier", "ContactHeldItemTransferChanceModifier" ], 1),
new AttackTypeBoosterHeldItemTypeRequirement(Type.BUG, 1), new AttackTypeBoosterHeldItemTypeRequirement(PokemonType.BUG, 1),
new TypeRequirement(Type.BUG, false, 1) new TypeRequirement(PokemonType.BUG, false, 1)
) )
) )
.withMaxAllowedEncounters(1) .withMaxAllowedEncounters(1)
@ -280,7 +280,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
const requiredItems = [ const requiredItems = [
generateModifierType(modifierTypes.QUICK_CLAW), generateModifierType(modifierTypes.QUICK_CLAW),
generateModifierType(modifierTypes.GRIP_CLAW), generateModifierType(modifierTypes.GRIP_CLAW),
generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.BUG ]), generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ PokemonType.BUG ]),
]; ];
const requiredItemString = requiredItems.map(m => m?.name ?? "unknown").join("/"); const requiredItemString = requiredItems.map(m => m?.name ?? "unknown").join("/");
@ -328,7 +328,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
) )
.withOption(MysteryEncounterOptionBuilder .withOption(MysteryEncounterOptionBuilder
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_DEFAULT) .newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_DEFAULT)
.withPrimaryPokemonRequirement(new TypeRequirement(Type.BUG, false, 1)) // Must have 1 Bug type on team .withPrimaryPokemonRequirement(new TypeRequirement(PokemonType.BUG, false, 1)) // Must have 1 Bug type on team
.withDialogue({ .withDialogue({
buttonLabel: `${namespace}:option.2.label`, buttonLabel: `${namespace}:option.2.label`,
buttonTooltip: `${namespace}:option.2.tooltip`, buttonTooltip: `${namespace}:option.2.tooltip`,
@ -339,7 +339,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
const encounter = globalScene.currentBattle.mysteryEncounter!; const encounter = globalScene.currentBattle.mysteryEncounter!;
// Player gets different rewards depending on the number of bug types they have // Player gets different rewards depending on the number of bug types they have
const numBugTypes = globalScene.getPlayerParty().filter(p => p.isOfType(Type.BUG, true)).length; const numBugTypes = globalScene.getPlayerParty().filter(p => p.isOfType(PokemonType.BUG, true)).length;
const numBugTypesText = i18next.t(`${namespace}:numBugTypes`, { count: numBugTypes }); const numBugTypesText = i18next.t(`${namespace}:numBugTypes`, { count: numBugTypes });
encounter.setDialogueToken("numBugTypes", numBugTypesText); encounter.setDialogueToken("numBugTypes", numBugTypesText);
@ -419,7 +419,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
CombinationPokemonRequirement.Some( CombinationPokemonRequirement.Some(
// Meets one or both of the below reqs // Meets one or both of the below reqs
new HeldItemRequirement([ "BypassSpeedChanceModifier", "ContactHeldItemTransferChanceModifier" ], 1), new HeldItemRequirement([ "BypassSpeedChanceModifier", "ContactHeldItemTransferChanceModifier" ], 1),
new AttackTypeBoosterHeldItemTypeRequirement(Type.BUG, 1) new AttackTypeBoosterHeldItemTypeRequirement(PokemonType.BUG, 1)
) )
) )
.withDialogue({ .withDialogue({
@ -445,7 +445,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
const validItems = pokemon.getHeldItems().filter(item => { const validItems = pokemon.getHeldItems().filter(item => {
return (item instanceof BypassSpeedChanceModifier || return (item instanceof BypassSpeedChanceModifier ||
item instanceof ContactHeldItemTransferChanceModifier || item instanceof ContactHeldItemTransferChanceModifier ||
(item instanceof AttackTypeBoosterModifier && (item.type as AttackTypeBoosterModifierType).moveType === Type.BUG)) && (item instanceof AttackTypeBoosterModifier && (item.type as AttackTypeBoosterModifierType).moveType === PokemonType.BUG)) &&
item.isTransferable; item.isTransferable;
}); });
@ -471,7 +471,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
const hasValidItem = pokemon.getHeldItems().some(item => { const hasValidItem = pokemon.getHeldItems().some(item => {
return item instanceof BypassSpeedChanceModifier || return item instanceof BypassSpeedChanceModifier ||
item instanceof ContactHeldItemTransferChanceModifier || item instanceof ContactHeldItemTransferChanceModifier ||
(item instanceof AttackTypeBoosterModifier && (item.type as AttackTypeBoosterModifierType).moveType === Type.BUG); (item instanceof AttackTypeBoosterModifier && (item.type as AttackTypeBoosterModifierType).moveType === PokemonType.BUG);
}); });
if (!hasValidItem) { if (!hasValidItem) {
return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null; return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null;

View File

@ -15,7 +15,7 @@ import { TrainerType } from "#enums/trainer-type";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { applyAbilityOverrideToPokemon, applyModifierTypeToPlayerPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; import { applyAbilityOverrideToPokemon, applyModifierTypeToPlayerPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option";
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
import { randSeedInt, randSeedShuffle } from "#app/utils"; import { randSeedInt, randSeedShuffle } from "#app/utils";
@ -31,7 +31,7 @@ import { BerryType } from "#enums/berry-type";
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
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 { MoveCategory } from "#app/data/move"; import { MoveCategory } from "#enums/MoveCategory";
import { CustomPokemonData } from "#app/data/custom-pokemon-data"; import { CustomPokemonData } from "#app/data/custom-pokemon-data";
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
import { EncounterAnim } from "#enums/encounter-anims"; import { EncounterAnim } from "#enums/encounter-anims";
@ -354,13 +354,13 @@ export const ClowningAroundEncounter: MysteryEncounter =
priorityTypes = randSeedShuffle(priorityTypes); priorityTypes = randSeedShuffle(priorityTypes);
} }
const newTypes = [ Type.UNKNOWN ]; const newTypes = [ PokemonType.UNKNOWN ];
let secondType: Type | null = null; let secondType: PokemonType | null = null;
while (secondType === null || secondType === newTypes[0] || originalTypes.includes(secondType)) { while (secondType === null || secondType === newTypes[0] || originalTypes.includes(secondType)) {
if (priorityTypes.length > 0) { if (priorityTypes.length > 0) {
secondType = priorityTypes.pop() ?? null; secondType = priorityTypes.pop() ?? null;
} else { } else {
secondType = randSeedInt(18) as Type; secondType = randSeedInt(18) as PokemonType;
} }
} }
newTypes.push(secondType); newTypes.push(secondType);

View File

@ -1,4 +1,4 @@
import type { Type } from "#enums/type"; import type { PokemonType } from "#enums/pokemon-type";
import { isNullOrUndefined, randSeedInt } from "#app/utils"; import { isNullOrUndefined, randSeedInt } from "#app/utils";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
@ -166,10 +166,10 @@ export const DarkDealEncounter: MysteryEncounter =
// Start encounter with random legendary (7-10 starter strength) that has level additive // Start encounter with random legendary (7-10 starter strength) that has level additive
// If this is a mono-type challenge, always ensure the required type is filtered for // If this is a mono-type challenge, always ensure the required type is filtered for
let bossTypes: Type[] = encounter.misc.removedTypes; let bossTypes: PokemonType[] = encounter.misc.removedTypes;
const singleTypeChallenges = globalScene.gameMode.challenges.filter(c => c.value && c.id === Challenges.SINGLE_TYPE); const singleTypeChallenges = globalScene.gameMode.challenges.filter(c => c.value && c.id === Challenges.SINGLE_TYPE);
if (globalScene.gameMode.isChallenge && singleTypeChallenges.length > 0) { if (globalScene.gameMode.isChallenge && singleTypeChallenges.length > 0) {
bossTypes = singleTypeChallenges.map(c => (c.value - 1) as Type); bossTypes = singleTypeChallenges.map(c => (c.value - 1) as PokemonType);
} }
const bossModifiers: PokemonHeldItemModifier[] = encounter.misc.modifiers; const bossModifiers: PokemonHeldItemModifier[] = encounter.misc.modifiers;

View File

@ -1,4 +1,4 @@
import { MoveCategory } from "#app/data/move"; import { MoveCategory } from "#enums/MoveCategory";
import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option";
import { generateModifierTypeOption, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterExp, setEncounterRewards } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { generateModifierTypeOption, leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterExp, setEncounterRewards } from "#app/data/mystery-encounters/utils/encounter-phase-utils";
import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon"; import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";

View File

@ -11,7 +11,7 @@ import { AbilityRequirement, CombinationPokemonRequirement, TypeRequirement } fr
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { Gender } from "#app/data/gender"; import { Gender } from "#app/data/gender";
import { Type } from "#enums/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/field/pokemon"; import { PokemonMove } from "#app/field/pokemon";
@ -188,7 +188,7 @@ export const FieryFalloutEncounter: MysteryEncounter =
async () => { async () => {
// Damage non-fire types and burn 1 random non-fire type member + give it Heatproof // Damage non-fire types and burn 1 random non-fire type member + give it Heatproof
const encounter = globalScene.currentBattle.mysteryEncounter!; const encounter = globalScene.currentBattle.mysteryEncounter!;
const nonFireTypes = globalScene.getPlayerParty().filter((p) => p.isAllowedInBattle() && !p.getTypes().includes(Type.FIRE)); const nonFireTypes = globalScene.getPlayerParty().filter((p) => p.isAllowedInBattle() && !p.getTypes().includes(PokemonType.FIRE));
for (const pkm of nonFireTypes) { for (const pkm of nonFireTypes) {
const percentage = DAMAGE_PERCENTAGE / 100; const percentage = DAMAGE_PERCENTAGE / 100;
@ -221,7 +221,7 @@ export const FieryFalloutEncounter: MysteryEncounter =
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL) .newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL)
.withPrimaryPokemonRequirement( .withPrimaryPokemonRequirement(
CombinationPokemonRequirement.Some( CombinationPokemonRequirement.Some(
new TypeRequirement(Type.FIRE, true, 1), new TypeRequirement(PokemonType.FIRE, true, 1),
new AbilityRequirement(FIRE_RESISTANT_ABILITIES, true) new AbilityRequirement(FIRE_RESISTANT_ABILITIES, true)
) )
) // Will set option3PrimaryName dialogue token automatically ) // Will set option3PrimaryName dialogue token automatically
@ -266,7 +266,7 @@ function giveLeadPokemonAttackTypeBoostItem() {
// Generate type booster held item, default to Charcoal if item fails to generate // Generate type booster held item, default to Charcoal if item fails to generate
let boosterModifierType = generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER) as AttackTypeBoosterModifierType; let boosterModifierType = generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER) as AttackTypeBoosterModifierType;
if (!boosterModifierType) { if (!boosterModifierType) {
boosterModifierType = generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.FIRE ]) as AttackTypeBoosterModifierType; boosterModifierType = generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ PokemonType.FIRE ]) as AttackTypeBoosterModifierType;
} }
applyModifierTypeToPlayerPokemon(leadPokemon, boosterModifierType); applyModifierTypeToPlayerPokemon(leadPokemon, boosterModifierType);

View File

@ -15,7 +15,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 { Biome } from "#enums/biome"; import { Biome } from "#enums/biome";
import { getBiomeKey } from "#app/field/arena"; import { getBiomeKey } from "#app/field/arena";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { getPartyLuckValue, modifierTypes } from "#app/modifier/modifier-type"; import { getPartyLuckValue, modifierTypes } from "#app/modifier/modifier-type";
import { TrainerSlot } from "#app/data/trainer-config"; import { TrainerSlot } from "#app/data/trainer-config";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
@ -30,7 +30,7 @@ const namespace = "mysteryEncounters/teleportingHijinks";
const MONEY_COST_MULTIPLIER = 1.75; const MONEY_COST_MULTIPLIER = 1.75;
const BIOME_CANDIDATES = [ Biome.SPACE, Biome.FAIRY_CAVE, Biome.LABORATORY, Biome.ISLAND, Biome.WASTELAND, Biome.DOJO ]; const BIOME_CANDIDATES = [ Biome.SPACE, Biome.FAIRY_CAVE, Biome.LABORATORY, Biome.ISLAND, Biome.WASTELAND, Biome.DOJO ];
const MACHINE_INTERFACING_TYPES = [ Type.ELECTRIC, Type.STEEL ]; const MACHINE_INTERFACING_TYPES = [ PokemonType.ELECTRIC, PokemonType.STEEL ];
/** /**
* Teleporting Hijinks encounter. * Teleporting Hijinks encounter.
@ -149,8 +149,8 @@ export const TeleportingHijinksEncounter: MysteryEncounter =
}], }],
}; };
const magnet = generateModifierTypeOption(modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.STEEL ])!; const magnet = generateModifierTypeOption(modifierTypes.ATTACK_TYPE_BOOSTER, [ PokemonType.STEEL ])!;
const metalCoat = generateModifierTypeOption(modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.ELECTRIC ])!; const metalCoat = generateModifierTypeOption(modifierTypes.ATTACK_TYPE_BOOSTER, [ PokemonType.ELECTRIC ])!;
setEncounterRewards({ guaranteedModifierTypeOptions: [ magnet, metalCoat ], fillRemaining: true }); setEncounterRewards({ guaranteedModifierTypeOptions: [ magnet, metalCoat ], fillRemaining: true });
await transitionMysteryEncounterIntroVisuals(true, true); await transitionMysteryEncounterIntroVisuals(true, true);
await initBattleWithEnemyConfig(config); await initBattleWithEnemyConfig(config);

View File

@ -24,7 +24,7 @@ import { EggTier } from "#enums/egg-type";
import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option";
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { getPokeballTintColor } from "#app/data/pokeball"; import { getPokeballTintColor } from "#app/data/pokeball";
import type { PokemonHeldItemModifier } from "#app/modifier/modifier"; import type { PokemonHeldItemModifier } from "#app/modifier/modifier";
@ -386,7 +386,7 @@ function getPartyConfig(): EnemyPartyConfig {
nature: Nature.ADAMANT, nature: Nature.ADAMANT,
moveSet: [ Moves.METEOR_MASH, Moves.FIRE_PUNCH, Moves.ICE_PUNCH, Moves.THUNDER_PUNCH ], moveSet: [ Moves.METEOR_MASH, Moves.FIRE_PUNCH, Moves.ICE_PUNCH, Moves.THUNDER_PUNCH ],
ivs: [ 31, 31, 31, 31, 31, 31 ], ivs: [ 31, 31, 31, 31, 31, 31 ],
tera: Type.STEEL, tera: PokemonType.STEEL,
} }
] ]
}; };

View File

@ -13,7 +13,7 @@ import { Abilities } from "#enums/abilities";
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 { Nature } from "#enums/nature"; import { Nature } from "#enums/nature";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { BerryType } from "#enums/berry-type"; import { BerryType } from "#enums/berry-type";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import { SpeciesFormChangeAbilityTrigger } from "#app/data/pokemon-forms"; import { SpeciesFormChangeAbilityTrigger } from "#app/data/pokemon-forms";
@ -303,12 +303,12 @@ function getVictoriaTrainerConfig(): EnemyPartyConfig {
moveSet: [ Moves.PSYSHOCK, Moves.MOONBLAST, Moves.SHADOW_BALL, Moves.WILL_O_WISP ], moveSet: [ Moves.PSYSHOCK, Moves.MOONBLAST, Moves.SHADOW_BALL, Moves.WILL_O_WISP ],
modifierConfigs: [ modifierConfigs: [
{ {
modifier: generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.PSYCHIC ]) as PokemonHeldItemModifierType, modifier: generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ PokemonType.PSYCHIC ]) as PokemonHeldItemModifierType,
stackCount: 1, stackCount: 1,
isTransferable: false isTransferable: false
}, },
{ {
modifier: generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.FAIRY ]) as PokemonHeldItemModifierType, modifier: generateModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, [ PokemonType.FAIRY ]) as PokemonHeldItemModifierType,
stackCount: 1, stackCount: 1,
isTransferable: false isTransferable: false
} }

View File

@ -17,7 +17,7 @@ import PokemonData from "#app/system/pokemon-data";
import { isNullOrUndefined, randSeedInt } from "#app/utils"; import { isNullOrUndefined, randSeedInt } from "#app/utils";
import type { Moves } from "#enums/moves"; import type { Moves } from "#enums/moves";
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { SelfStatusMove } from "#app/data/move"; import { SelfStatusMove } from "#app/data/moves/move";
import { PokeballType } from "#enums/pokeball"; import { PokeballType } from "#enums/pokeball";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";

View File

@ -1,4 +1,4 @@
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
@ -528,10 +528,10 @@ async function postProcessTransformedPokemon(previousPokemon: PlayerPokemon, new
// Randomize the second type of the pokemon // Randomize the second type of the pokemon
// If the pokemon does not normally have a second type, it will gain 1 // If the pokemon does not normally have a second type, it will gain 1
const newTypes = [ Type.UNKNOWN ]; const newTypes = [ PokemonType.UNKNOWN ];
let newType = randSeedInt(18) as Type; let newType = randSeedInt(18) as PokemonType;
while (newType === newTypes[0]) { while (newType === newTypes[0]) {
newType = randSeedInt(18) as Type; newType = randSeedInt(18) as PokemonType;
} }
newTypes.push(newType); newTypes.push(newType);
if (!newPokemon.customPokemonData) { if (!newPokemon.customPokemonData) {

View File

@ -3,7 +3,7 @@ import type { Moves } from "#app/enums/moves";
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 { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import type { Type } from "#enums/type"; import type { PokemonType } from "#enums/pokemon-type";
import { EncounterPokemonRequirement, EncounterSceneRequirement, MoneyRequirement, TypeRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { EncounterPokemonRequirement, EncounterSceneRequirement, MoneyRequirement, TypeRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements";
import type { CanLearnMoveRequirementOptions } from "./requirements/can-learn-move-requirement"; import type { CanLearnMoveRequirementOptions } from "./requirements/can-learn-move-requirement";
import { CanLearnMoveRequirement } from "./requirements/can-learn-move-requirement"; import { CanLearnMoveRequirement } from "./requirements/can-learn-move-requirement";
@ -254,7 +254,7 @@ export class MysteryEncounterOptionBuilder implements Partial<IMysteryEncounterO
* @param invertQuery * @param invertQuery
* @returns * @returns
*/ */
withPokemonTypeRequirement(type: Type | Type[], excludeFainted?: boolean, minNumberOfPokemon?: number, invertQuery?: boolean) { withPokemonTypeRequirement(type: PokemonType | PokemonType[], excludeFainted?: boolean, minNumberOfPokemon?: number, invertQuery?: boolean) {
return this.withPrimaryPokemonRequirement(new TypeRequirement(type, excludeFainted, minNumberOfPokemon, invertQuery)); return this.withPrimaryPokemonRequirement(new TypeRequirement(type, excludeFainted, minNumberOfPokemon, invertQuery));
} }

View File

@ -4,7 +4,7 @@ import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evol
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";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
import type { PlayerPokemon } from "#app/field/pokemon"; import type { PlayerPokemon } from "#app/field/pokemon";
import { AttackTypeBoosterModifier } from "#app/modifier/modifier"; import { AttackTypeBoosterModifier } from "#app/modifier/modifier";
@ -476,12 +476,12 @@ export class NatureRequirement extends EncounterPokemonRequirement {
} }
export class TypeRequirement extends EncounterPokemonRequirement { export class TypeRequirement extends EncounterPokemonRequirement {
requiredType: Type[]; requiredType: PokemonType[];
excludeFainted: boolean; excludeFainted: boolean;
minNumberOfPokemon: number; minNumberOfPokemon: number;
invertQuery: boolean; invertQuery: boolean;
constructor(type: Type | Type[], excludeFainted: boolean = true, minNumberOfPokemon: number = 1, invertQuery: boolean = false) { constructor(type: PokemonType | PokemonType[], excludeFainted: boolean = true, minNumberOfPokemon: number = 1, invertQuery: boolean = false) {
super(); super();
this.excludeFainted = excludeFainted; this.excludeFainted = excludeFainted;
this.minNumberOfPokemon = minNumberOfPokemon; this.minNumberOfPokemon = minNumberOfPokemon;
@ -515,7 +515,7 @@ export class TypeRequirement extends EncounterPokemonRequirement {
override getDialogueToken(pokemon?: PlayerPokemon): [string, string] { override getDialogueToken(pokemon?: PlayerPokemon): [string, string] {
const includedTypes = this.requiredType.filter((ty) => pokemon?.getTypes().includes(ty)); const includedTypes = this.requiredType.filter((ty) => pokemon?.getTypes().includes(ty));
if (includedTypes.length > 0) { if (includedTypes.length > 0) {
return [ "type", Type[includedTypes[0]] ]; return [ "type", PokemonType[includedTypes[0]] ];
} }
return [ "type", "" ]; return [ "type", "" ];
} }
@ -878,12 +878,12 @@ export class HeldItemRequirement extends EncounterPokemonRequirement {
} }
export class AttackTypeBoosterHeldItemTypeRequirement extends EncounterPokemonRequirement { export class AttackTypeBoosterHeldItemTypeRequirement extends EncounterPokemonRequirement {
requiredHeldItemTypes: Type[]; requiredHeldItemTypes: PokemonType[];
minNumberOfPokemon: number; minNumberOfPokemon: number;
invertQuery: boolean; invertQuery: boolean;
requireTransferable: boolean; requireTransferable: boolean;
constructor(heldItemTypes: Type | Type[], minNumberOfPokemon: number = 1, invertQuery: boolean = false, requireTransferable: boolean = true) { constructor(heldItemTypes: PokemonType | PokemonType[], minNumberOfPokemon: number = 1, invertQuery: boolean = false, requireTransferable: boolean = true) {
super(); super();
this.minNumberOfPokemon = minNumberOfPokemon; this.minNumberOfPokemon = minNumberOfPokemon;
this.invertQuery = invertQuery; this.invertQuery = invertQuery;

View File

@ -46,7 +46,7 @@ import type { Variant } from "#app/data/variant";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { Type } from "#app/enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { getNatureName } from "#app/data/nature"; import { getNatureName } from "#app/data/nature";
import { getPokemonNameWithAffix } from "#app/messages"; import { getPokemonNameWithAffix } from "#app/messages";
@ -101,7 +101,7 @@ export interface EnemyPokemonConfig {
modifierConfigs?: HeldModifierConfig[]; modifierConfigs?: HeldModifierConfig[];
tags?: BattlerTagType[]; tags?: BattlerTagType[];
dataSource?: PokemonData; dataSource?: PokemonData;
tera?: Type; tera?: PokemonType;
aiType?: AiType; aiType?: AiType;
} }
@ -334,7 +334,7 @@ export async function initBattleWithEnemyConfig(partyConfig: EnemyPartyConfig):
} }
// Set tera // Set tera
if (config.tera && config.tera !== Type.UNKNOWN) { if (config.tera && config.tera !== PokemonType.UNKNOWN) {
enemyPokemon.teraType = config.tera; enemyPokemon.teraType = config.tera;
if (battle.trainer) { if (battle.trainer) {
battle.trainer.config.setInstantTera(e); battle.trainer.config.setInstantTera(e);

View File

@ -13,7 +13,7 @@ import { Mode } from "#app/ui/ui";
import type { PartyOption } from "#app/ui/party-ui-handler"; import type { PartyOption } from "#app/ui/party-ui-handler";
import { PartyUiMode } from "#app/ui/party-ui-handler"; import { PartyUiMode } from "#app/ui/party-ui-handler";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import type { Type } from "#enums/type"; import type { PokemonType } from "#enums/pokemon-type";
import type PokemonSpecies from "#app/data/pokemon-species"; import type PokemonSpecies from "#app/data/pokemon-species";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { speciesStarterCosts } from "#app/data/balance/starters"; import { speciesStarterCosts } from "#app/data/balance/starters";
@ -209,7 +209,7 @@ export function getHighestStatTotalPlayerPokemon(isAllowed: boolean = false, isF
* @param allowMythical * @param allowMythical
* @returns * @returns
*/ */
export function getRandomSpeciesByStarterCost(starterTiers: number | [number, number], excludedSpecies?: Species[], types?: Type[], allowSubLegendary: boolean = true, allowLegendary: boolean = true, allowMythical: boolean = true): Species { export function getRandomSpeciesByStarterCost(starterTiers: number | [number, number], excludedSpecies?: Species[], types?: PokemonType[], allowSubLegendary: boolean = true, allowLegendary: boolean = true, allowMythical: boolean = true): Species {
let min = Array.isArray(starterTiers) ? starterTiers[0] : starterTiers; let min = Array.isArray(starterTiers) ? starterTiers[0] : starterTiers;
let max = Array.isArray(starterTiers) ? starterTiers[1] : starterTiers; let max = Array.isArray(starterTiers) ? starterTiers[1] : starterTiers;

View File

@ -1,7 +1,8 @@
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 { MoveCategory, allMoves } from "./move"; import { allMoves } from "./moves/move";
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";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
import type Pokemon from "../field/pokemon"; import type Pokemon from "../field/pokemon";
import type Move from "./move"; import type Move from "./moves/move";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { ProtectAttr } from "./move"; import { ProtectAttr } from "./moves/move";
import type { BattlerIndex } from "#app/battle"; import type { BattlerIndex } from "#app/battle";
import i18next from "i18next"; import i18next from "i18next";
@ -30,20 +30,20 @@ export class Terrain {
return true; return true;
} }
getAttackTypeMultiplier(attackType: Type): number { getAttackTypeMultiplier(attackType: PokemonType): number {
switch (this.terrainType) { switch (this.terrainType) {
case TerrainType.ELECTRIC: case TerrainType.ELECTRIC:
if (attackType === Type.ELECTRIC) { if (attackType === PokemonType.ELECTRIC) {
return 1.3; return 1.3;
} }
break; break;
case TerrainType.GRASSY: case TerrainType.GRASSY:
if (attackType === Type.GRASS) { if (attackType === PokemonType.GRASS) {
return 1.3; return 1.3;
} }
break; break;
case TerrainType.PSYCHIC: case TerrainType.PSYCHIC:
if (attackType === Type.PSYCHIC) { if (attackType === PokemonType.PSYCHIC) {
return 1.3; return 1.3;
} }
break; break;

View File

@ -11,7 +11,7 @@ import type { PokemonSpeciesFilter } from "#app/data/pokemon-species";
import type PokemonSpecies from "#app/data/pokemon-species"; import type PokemonSpecies from "#app/data/pokemon-species";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { tmSpecies } from "#app/data/balance/tms"; import { tmSpecies } from "#app/data/balance/tms";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { doubleBattleDialogue } from "#app/data/dialogue"; import { doubleBattleDialogue } from "#app/data/dialogue";
import type { PersistentModifier } from "#app/modifier/modifier"; import type { PersistentModifier } from "#app/modifier/modifier";
import { TrainerVariant } from "#app/field/trainer"; import { TrainerVariant } from "#app/field/trainer";
@ -254,7 +254,7 @@ export class TrainerConfig {
public partyMemberFuncs: PartyMemberFuncs = {}; public partyMemberFuncs: PartyMemberFuncs = {};
public speciesPools: TrainerTierPools; public speciesPools: TrainerTierPools;
public speciesFilter: PokemonSpeciesFilter; public speciesFilter: PokemonSpeciesFilter;
public specialtyType: Type; public specialtyType: PokemonType;
public hasVoucher: boolean = false; public hasVoucher: boolean = false;
public trainerAI: TrainerAI; public trainerAI: TrainerAI;
@ -586,7 +586,7 @@ export class TrainerConfig {
return this; return this;
} }
setSpecialtyType(specialtyType: Type): TrainerConfig { setSpecialtyType(specialtyType: PokemonType): TrainerConfig {
this.specialtyType = specialtyType; this.specialtyType = specialtyType;
return this; return this;
} }
@ -604,7 +604,7 @@ export class TrainerConfig {
*/ */
setRandomTeraModifiers(count: () => number, slot?: number): TrainerConfig { setRandomTeraModifiers(count: () => number, slot?: number): TrainerConfig {
this.genAIFuncs.push((party: EnemyPokemon[]) => { this.genAIFuncs.push((party: EnemyPokemon[]) => {
const shedinjaCanTera = !this.hasSpecialtyType() || this.specialtyType === Type.BUG; // Better to check one time than 6 const shedinjaCanTera = !this.hasSpecialtyType() || this.specialtyType === PokemonType.BUG; // Better to check one time than 6
const partyMemberIndexes = new Array(party.length).fill(null).map((_, i) => i) const partyMemberIndexes = new Array(party.length).fill(null).map((_, i) => i)
.filter(i => shedinjaCanTera || party[i].species.speciesId !== Species.SHEDINJA); // Shedinja can only Tera on Bug specialty type (or no specialty type) .filter(i => shedinjaCanTera || party[i].species.speciesId !== Species.SHEDINJA); // Shedinja can only Tera on Bug specialty type (or no specialty type)
const setPartySlot = !Utils.isNullOrUndefined(slot) ? Phaser.Math.Wrap(slot, 0, party.length) : -1; // If we have a tera slot defined, wrap it to party size. const setPartySlot = !Utils.isNullOrUndefined(slot) ? Phaser.Math.Wrap(slot, 0, party.length) : -1; // If we have a tera slot defined, wrap it to party size.
@ -789,7 +789,7 @@ export class TrainerConfig {
* @param specialtyType The specialty Type of the admin, if they have one * @param specialtyType The specialty Type of the admin, if they have one
* @returns {TrainerConfig} The updated TrainerConfig instance. * @returns {TrainerConfig} The updated TrainerConfig instance.
* **/ * **/
initForEvilTeamAdmin(title: string, poolName: string, signatureSpecies: (Species | Species[])[], specialtyType?: Type): TrainerConfig { initForEvilTeamAdmin(title: string, poolName: string, signatureSpecies: (Species | Species[])[], specialtyType?: PokemonType): TrainerConfig {
if (!getIsInitialized()) { if (!getIsInitialized()) {
initI18n(); initI18n();
} }
@ -851,11 +851,11 @@ export class TrainerConfig {
/** /**
* Initializes the trainer configuration for an evil team leader. Temporarily hardcoding evil leader teams though. * Initializes the trainer configuration for an evil team leader. Temporarily hardcoding evil leader teams though.
* @param {Species | Species[]} signatureSpecies The signature species for the evil team leader. * @param {Species | Species[]} signatureSpecies The signature species for the evil team leader.
* @param {Type} specialtyType The specialty type for the evil team Leader. * @param {PokemonType} specialtyType The specialty type for the evil team Leader.
* @param boolean Whether or not this is the rematch fight * @param boolean Whether or not this is the rematch fight
* @returns {TrainerConfig} The updated TrainerConfig instance. * @returns {TrainerConfig} The updated TrainerConfig instance.
* **/ * **/
initForEvilTeamLeader(title: string, signatureSpecies: (Species | Species[])[], rematch: boolean = false, specialtyType?: Type): TrainerConfig { initForEvilTeamLeader(title: string, signatureSpecies: (Species | Species[])[], rematch: boolean = false, specialtyType?: PokemonType): TrainerConfig {
if (!getIsInitialized()) { if (!getIsInitialized()) {
initI18n(); initI18n();
} }
@ -891,12 +891,12 @@ export class TrainerConfig {
* Initializes the trainer configuration for a Gym Leader. * Initializes the trainer configuration for a Gym Leader.
* @param {Species | Species[]} signatureSpecies The signature species for the Gym Leader. Added to party in reverse order. * @param {Species | Species[]} signatureSpecies The signature species for the Gym Leader. Added to party in reverse order.
* @param isMale Whether the Gym Leader is Male or Not (for localization of the title). * @param isMale Whether the Gym Leader is Male or Not (for localization of the title).
* @param {Type} specialtyType The specialty type for the Gym Leader. * @param {PokemonType} specialtyType The specialty type for the Gym Leader.
* @param ignoreMinTeraWave Whether the Gym Leader always uses Tera (true), or only Teras after {@linkcode GYM_LEADER_TERA_WAVE} (false). Defaults to false. * @param ignoreMinTeraWave Whether the Gym Leader always uses Tera (true), or only Teras after {@linkcode GYM_LEADER_TERA_WAVE} (false). Defaults to false.
* @param teraSlot Optional, sets the party member in this slot to Terastallize. Wraps based on party size. * @param teraSlot Optional, sets the party member in this slot to Terastallize. Wraps based on party size.
* @returns {TrainerConfig} The updated TrainerConfig instance. * @returns {TrainerConfig} The updated TrainerConfig instance.
* **/ * **/
initForGymLeader(signatureSpecies: (Species | Species[])[], isMale: boolean, specialtyType: Type, ignoreMinTeraWave: boolean = false, teraSlot?: number): TrainerConfig { initForGymLeader(signatureSpecies: (Species | Species[])[], isMale: boolean, specialtyType: PokemonType, ignoreMinTeraWave: boolean = false, teraSlot?: number): TrainerConfig {
// Check if the internationalization (i18n) system is initialized. // Check if the internationalization (i18n) system is initialized.
if (!getIsInitialized()) { if (!getIsInitialized()) {
initI18n(); initI18n();
@ -945,11 +945,11 @@ export class TrainerConfig {
* Initializes the trainer configuration for an Elite Four member. * Initializes the trainer configuration for an Elite Four member.
* @param {Species | Species[]} signatureSpecies The signature species for the Elite Four member. * @param {Species | Species[]} signatureSpecies The signature species for the Elite Four member.
* @param isMale Whether the Elite Four Member is Male or Female (for localization of the title). * @param isMale Whether the Elite Four Member is Male or Female (for localization of the title).
* @param specialtyType {Type} The specialty type for the Elite Four member. * @param specialtyType {PokemonType} The specialty type for the Elite Four member.
* @param teraSlot Optional, sets the party member in this slot to Terastallize. * @param teraSlot Optional, sets the party member in this slot to Terastallize.
* @returns {TrainerConfig} The updated TrainerConfig instance. * @returns {TrainerConfig} The updated TrainerConfig instance.
**/ **/
initForEliteFour(signatureSpecies: (Species | Species[])[], isMale: boolean, specialtyType?: Type, teraSlot?: number): TrainerConfig { initForEliteFour(signatureSpecies: (Species | Species[])[], isMale: boolean, specialtyType?: PokemonType, teraSlot?: number): TrainerConfig {
// Check if the internationalization (i18n) system is initialized. // Check if the internationalization (i18n) system is initialized.
if (!getIsInitialized()) { if (!getIsInitialized()) {
initI18n(); initI18n();
@ -1149,7 +1149,7 @@ export class TrainerConfig {
* @returns true if specialtyType is defined and not Type.UNKNOWN * @returns true if specialtyType is defined and not Type.UNKNOWN
*/ */
hasSpecialtyType(): boolean { hasSpecialtyType(): boolean {
return !Utils.isNullOrUndefined(this.specialtyType) && this.specialtyType !== Type.UNKNOWN; return !Utils.isNullOrUndefined(this.specialtyType) && this.specialtyType !== PokemonType.UNKNOWN;
} }
/** /**
@ -1418,7 +1418,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerType.ARTIST]: new TrainerConfig(++t).setEncounterBgm(TrainerType.RICH).setPartyTemplates(trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.THREE_AVG) [TrainerType.ARTIST]: new TrainerConfig(++t).setEncounterBgm(TrainerType.RICH).setPartyTemplates(trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.THREE_AVG)
.setSpeciesPools([ Species.SMEARGLE ]), .setSpeciesPools([ Species.SMEARGLE ]),
[TrainerType.BACKERS]: new TrainerConfig(++t).setHasGenders("Backers").setDoubleOnly().setEncounterBgm(TrainerType.CYCLIST), [TrainerType.BACKERS]: new TrainerConfig(++t).setHasGenders("Backers").setDoubleOnly().setEncounterBgm(TrainerType.CYCLIST),
[TrainerType.BACKPACKER]: new TrainerConfig(++t).setHasGenders("Backpacker Female").setHasDouble("Backpackers").setSpeciesFilter(s => s.isOfType(Type.FLYING) || s.isOfType(Type.ROCK)).setEncounterBgm(TrainerType.BACKPACKER) [TrainerType.BACKPACKER]: new TrainerConfig(++t).setHasGenders("Backpacker Female").setHasDouble("Backpackers").setSpeciesFilter(s => s.isOfType(PokemonType.FLYING) || s.isOfType(PokemonType.ROCK)).setEncounterBgm(TrainerType.BACKPACKER)
.setPartyTemplates(trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.ONE_WEAK_ONE_STRONG, trainerPartyTemplates.ONE_AVG_ONE_STRONG) .setPartyTemplates(trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.ONE_WEAK_ONE_STRONG, trainerPartyTemplates.ONE_AVG_ONE_STRONG)
.setSpeciesPools({ .setSpeciesPools({
[TrainerPoolTier.COMMON]: [ Species.RHYHORN, Species.AIPOM, Species.MAKUHITA, Species.MAWILE, Species.NUMEL, Species.LILLIPUP, Species.SANDILE, Species.WOOLOO ], [TrainerPoolTier.COMMON]: [ Species.RHYHORN, Species.AIPOM, Species.MAKUHITA, Species.MAWILE, Species.NUMEL, Species.LILLIPUP, Species.SANDILE, Species.WOOLOO ],
@ -1426,10 +1426,10 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.RARE]: [ Species.TAUROS, Species.STANTLER, Species.DARUMAKA, Species.BOUFFALANT, Species.DEERLING, Species.IMPIDIMP ], [TrainerPoolTier.RARE]: [ Species.TAUROS, Species.STANTLER, Species.DARUMAKA, Species.BOUFFALANT, Species.DEERLING, Species.IMPIDIMP ],
[TrainerPoolTier.SUPER_RARE]: [ Species.GALAR_DARUMAKA, Species.TEDDIURSA ] [TrainerPoolTier.SUPER_RARE]: [ Species.GALAR_DARUMAKA, Species.TEDDIURSA ]
}), }),
[TrainerType.BAKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setMoneyMultiplier(1.35).setSpeciesFilter(s => s.isOfType(Type.GRASS) || s.isOfType(Type.FIRE)), [TrainerType.BAKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setMoneyMultiplier(1.35).setSpeciesFilter(s => s.isOfType(PokemonType.GRASS) || s.isOfType(PokemonType.FIRE)),
[TrainerType.BEAUTY]: new TrainerConfig(++t).setMoneyMultiplier(1.55).setEncounterBgm(TrainerType.PARASOL_LADY), [TrainerType.BEAUTY]: new TrainerConfig(++t).setMoneyMultiplier(1.55).setEncounterBgm(TrainerType.PARASOL_LADY),
[TrainerType.BIKER]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(Type.POISON)), [TrainerType.BIKER]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(PokemonType.POISON)),
[TrainerType.BLACK_BELT]: new TrainerConfig(++t).setHasGenders("Battle Girl", TrainerType.PSYCHIC).setHasDouble("Crush Kin").setEncounterBgm(TrainerType.ROUGHNECK).setSpecialtyType(Type.FIGHTING) [TrainerType.BLACK_BELT]: new TrainerConfig(++t).setHasGenders("Battle Girl", TrainerType.PSYCHIC).setHasDouble("Crush Kin").setEncounterBgm(TrainerType.ROUGHNECK).setSpecialtyType(PokemonType.FIGHTING)
.setPartyTemplates(trainerPartyTemplates.TWO_WEAK_ONE_AVG, trainerPartyTemplates.TWO_WEAK_ONE_AVG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_WEAK_ONE_STRONG, trainerPartyTemplates.THREE_AVG, trainerPartyTemplates.TWO_AVG_ONE_STRONG) .setPartyTemplates(trainerPartyTemplates.TWO_WEAK_ONE_AVG, trainerPartyTemplates.TWO_WEAK_ONE_AVG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_WEAK_ONE_STRONG, trainerPartyTemplates.THREE_AVG, trainerPartyTemplates.TWO_AVG_ONE_STRONG)
.setSpeciesPools({ .setSpeciesPools({
[TrainerPoolTier.COMMON]: [ Species.NIDORAN_F, Species.NIDORAN_M, Species.MACHOP, Species.MAKUHITA, Species.MEDITITE, Species.CROAGUNK, Species.TIMBURR ], [TrainerPoolTier.COMMON]: [ Species.NIDORAN_F, Species.NIDORAN_M, Species.MACHOP, Species.MAKUHITA, Species.MEDITITE, Species.CROAGUNK, Species.TIMBURR ],
@ -1468,8 +1468,8 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerType.DOCTOR]: new TrainerConfig(++t).setHasGenders("Nurse", "lass").setHasDouble("Medical Team").setMoneyMultiplier(3).setEncounterBgm(TrainerType.CLERK) [TrainerType.DOCTOR]: new TrainerConfig(++t).setHasGenders("Nurse", "lass").setHasDouble("Medical Team").setMoneyMultiplier(3).setEncounterBgm(TrainerType.CLERK)
.setSpeciesFilter(s => !!s.getLevelMoves().find(plm => plm[1] === Moves.HEAL_PULSE)), .setSpeciesFilter(s => !!s.getLevelMoves().find(plm => plm[1] === Moves.HEAL_PULSE)),
[TrainerType.FIREBREATHER]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.ROUGHNECK) [TrainerType.FIREBREATHER]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.ROUGHNECK)
.setSpeciesFilter(s => !!s.getLevelMoves().find(plm => plm[1] === Moves.SMOG) || s.isOfType(Type.FIRE)), .setSpeciesFilter(s => !!s.getLevelMoves().find(plm => plm[1] === Moves.SMOG) || s.isOfType(PokemonType.FIRE)),
[TrainerType.FISHERMAN]: new TrainerConfig(++t).setMoneyMultiplier(1.25).setEncounterBgm(TrainerType.BACKPACKER).setSpecialtyType(Type.WATER) [TrainerType.FISHERMAN]: new TrainerConfig(++t).setMoneyMultiplier(1.25).setEncounterBgm(TrainerType.BACKPACKER).setSpecialtyType(PokemonType.WATER)
.setPartyTemplates(trainerPartyTemplates.TWO_WEAK_SAME_ONE_AVG, trainerPartyTemplates.ONE_AVG, trainerPartyTemplates.THREE_WEAK_SAME, trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.SIX_WEAKER) .setPartyTemplates(trainerPartyTemplates.TWO_WEAK_SAME_ONE_AVG, trainerPartyTemplates.ONE_AVG, trainerPartyTemplates.THREE_WEAK_SAME, trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.SIX_WEAKER)
.setSpeciesPools({ .setSpeciesPools({
[TrainerPoolTier.COMMON]: [ Species.TENTACOOL, Species.MAGIKARP, Species.GOLDEEN, Species.STARYU, Species.REMORAID, Species.SKRELP, Species.CLAUNCHER, Species.ARROKUDA ], [TrainerPoolTier.COMMON]: [ Species.TENTACOOL, Species.MAGIKARP, Species.GOLDEEN, Species.STARYU, Species.REMORAID, Species.SKRELP, Species.CLAUNCHER, Species.ARROKUDA ],
@ -1477,7 +1477,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.RARE]: [ Species.CHINCHOU, Species.CORSOLA, Species.WAILMER, Species.BARBOACH, Species.CLAMPERL, Species.LUVDISC, Species.MANTYKE, Species.ALOMOMOLA, Species.TATSUGIRI, Species.VELUZA ], [TrainerPoolTier.RARE]: [ Species.CHINCHOU, Species.CORSOLA, Species.WAILMER, Species.BARBOACH, Species.CLAMPERL, Species.LUVDISC, Species.MANTYKE, Species.ALOMOMOLA, Species.TATSUGIRI, Species.VELUZA ],
[TrainerPoolTier.SUPER_RARE]: [ Species.LAPRAS, Species.FEEBAS, Species.RELICANTH, Species.DONDOZO ] [TrainerPoolTier.SUPER_RARE]: [ Species.LAPRAS, Species.FEEBAS, Species.RELICANTH, Species.DONDOZO ]
}), }),
[TrainerType.GUITARIST]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.ROUGHNECK).setSpecialtyType(Type.ELECTRIC).setSpeciesFilter(s => s.isOfType(Type.ELECTRIC)), [TrainerType.GUITARIST]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.ROUGHNECK).setSpecialtyType(PokemonType.ELECTRIC).setSpeciesFilter(s => s.isOfType(PokemonType.ELECTRIC)),
[TrainerType.HARLEQUIN]: new TrainerConfig(++t).setEncounterBgm(TrainerType.PSYCHIC).setSpeciesFilter(s => tmSpecies[Moves.TRICK_ROOM].indexOf(s.speciesId) > -1), [TrainerType.HARLEQUIN]: new TrainerConfig(++t).setEncounterBgm(TrainerType.PSYCHIC).setSpeciesFilter(s => tmSpecies[Moves.TRICK_ROOM].indexOf(s.speciesId) > -1),
[TrainerType.HIKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.BACKPACKER) [TrainerType.HIKER]: new TrainerConfig(++t).setEncounterBgm(TrainerType.BACKPACKER)
.setPartyTemplates(trainerPartyTemplates.TWO_AVG_SAME_ONE_AVG, trainerPartyTemplates.TWO_AVG_SAME_ONE_STRONG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.FOUR_WEAK, trainerPartyTemplates.ONE_STRONG) .setPartyTemplates(trainerPartyTemplates.TWO_AVG_SAME_ONE_AVG, trainerPartyTemplates.TWO_AVG_SAME_ONE_STRONG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.FOUR_WEAK, trainerPartyTemplates.ONE_STRONG)
@ -1487,7 +1487,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.RARE]: [ Species.TORKOAL, Species.TRAPINCH, Species.BARBOACH, Species.GOLETT, Species.ALOLA_DIGLETT, Species.ALOLA_GEODUDE, Species.GALAR_STUNFISK, Species.PALDEA_WOOPER ], [TrainerPoolTier.RARE]: [ Species.TORKOAL, Species.TRAPINCH, Species.BARBOACH, Species.GOLETT, Species.ALOLA_DIGLETT, Species.ALOLA_GEODUDE, Species.GALAR_STUNFISK, Species.PALDEA_WOOPER ],
[TrainerPoolTier.SUPER_RARE]: [ Species.MAGBY, Species.LARVITAR ] [TrainerPoolTier.SUPER_RARE]: [ Species.MAGBY, Species.LARVITAR ]
}), }),
[TrainerType.HOOLIGANS]: new TrainerConfig(++t).setDoubleOnly().setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(Type.POISON) || s.isOfType(Type.DARK)), [TrainerType.HOOLIGANS]: new TrainerConfig(++t).setDoubleOnly().setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(PokemonType.POISON) || s.isOfType(PokemonType.DARK)),
[TrainerType.HOOPSTER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST), [TrainerType.HOOPSTER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST),
[TrainerType.INFIELDER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST), [TrainerType.INFIELDER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST),
[TrainerType.JANITOR]: new TrainerConfig(++t).setMoneyMultiplier(1.1).setEncounterBgm(TrainerType.CLERK), [TrainerType.JANITOR]: new TrainerConfig(++t).setMoneyMultiplier(1.1).setEncounterBgm(TrainerType.CLERK),
@ -1496,7 +1496,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerType.MUSICIAN]: new TrainerConfig(++t).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => !!s.getLevelMoves().find(plm => plm[1] === Moves.SING)), [TrainerType.MUSICIAN]: new TrainerConfig(++t).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => !!s.getLevelMoves().find(plm => plm[1] === Moves.SING)),
[TrainerType.HEX_MANIAC]: new TrainerConfig(++t).setMoneyMultiplier(1.5).setEncounterBgm(TrainerType.PSYCHIC) [TrainerType.HEX_MANIAC]: new TrainerConfig(++t).setMoneyMultiplier(1.5).setEncounterBgm(TrainerType.PSYCHIC)
.setPartyTemplates(trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.ONE_AVG_ONE_STRONG, trainerPartyTemplates.TWO_AVG_SAME_ONE_AVG, trainerPartyTemplates.THREE_AVG, trainerPartyTemplates.TWO_STRONG) .setPartyTemplates(trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.ONE_AVG_ONE_STRONG, trainerPartyTemplates.TWO_AVG_SAME_ONE_AVG, trainerPartyTemplates.THREE_AVG, trainerPartyTemplates.TWO_STRONG)
.setSpeciesFilter(s => s.isOfType(Type.GHOST)), .setSpeciesFilter(s => s.isOfType(PokemonType.GHOST)),
[TrainerType.NURSERY_AIDE]: new TrainerConfig(++t).setMoneyMultiplier(1.3).setEncounterBgm("lass"), [TrainerType.NURSERY_AIDE]: new TrainerConfig(++t).setMoneyMultiplier(1.3).setEncounterBgm("lass"),
[TrainerType.OFFICER]: new TrainerConfig(++t).setMoneyMultiplier(1.55).setEncounterBgm(TrainerType.CLERK) [TrainerType.OFFICER]: new TrainerConfig(++t).setMoneyMultiplier(1.55).setEncounterBgm(TrainerType.CLERK)
.setPartyTemplates(trainerPartyTemplates.ONE_AVG, trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_WEAK_SAME_ONE_AVG) .setPartyTemplates(trainerPartyTemplates.ONE_AVG, trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_WEAK_SAME_ONE_AVG)
@ -1507,7 +1507,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.SUPER_RARE]: [], [TrainerPoolTier.SUPER_RARE]: [],
[TrainerPoolTier.ULTRA_RARE]: [ Species.ENTEI, Species.SUICUNE, Species.RAIKOU ] [TrainerPoolTier.ULTRA_RARE]: [ Species.ENTEI, Species.SUICUNE, Species.RAIKOU ]
}), }),
[TrainerType.PARASOL_LADY]: new TrainerConfig(++t).setMoneyMultiplier(1.55).setEncounterBgm(TrainerType.PARASOL_LADY).setSpeciesFilter(s => s.isOfType(Type.WATER)), [TrainerType.PARASOL_LADY]: new TrainerConfig(++t).setMoneyMultiplier(1.55).setEncounterBgm(TrainerType.PARASOL_LADY).setSpeciesFilter(s => s.isOfType(PokemonType.WATER)),
[TrainerType.PILOT]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => tmSpecies[Moves.FLY].indexOf(s.speciesId) > -1), [TrainerType.PILOT]: new TrainerConfig(++t).setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => tmSpecies[Moves.FLY].indexOf(s.speciesId) > -1),
[TrainerType.POKEFAN]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setName("PokéFan").setHasGenders("PokéFan Female").setHasDouble("PokéFan Family").setEncounterBgm(TrainerType.POKEFAN) [TrainerType.POKEFAN]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setName("PokéFan").setHasGenders("PokéFan Female").setHasDouble("PokéFan Family").setEncounterBgm(TrainerType.POKEFAN)
.setPartyTemplates(trainerPartyTemplates.SIX_WEAKER, trainerPartyTemplates.FOUR_WEAK, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.FOUR_WEAK_SAME, trainerPartyTemplates.FIVE_WEAK, trainerPartyTemplates.SIX_WEAKER_SAME), .setPartyTemplates(trainerPartyTemplates.SIX_WEAKER, trainerPartyTemplates.FOUR_WEAK, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.ONE_STRONG, trainerPartyTemplates.FOUR_WEAK_SAME, trainerPartyTemplates.FIVE_WEAK, trainerPartyTemplates.SIX_WEAKER_SAME),
@ -1536,8 +1536,8 @@ export const trainerConfigs: TrainerConfigs = {
}), }),
[TrainerType.RICH]: new TrainerConfig(++t).setMoneyMultiplier(5).setName("Gentleman").setHasGenders("Madame").setHasDouble("Rich Couple"), [TrainerType.RICH]: new TrainerConfig(++t).setMoneyMultiplier(5).setName("Gentleman").setHasGenders("Madame").setHasDouble("Rich Couple"),
[TrainerType.RICH_KID]: new TrainerConfig(++t).setMoneyMultiplier(3.75).setName("Rich Boy").setHasGenders("Lady").setHasDouble("Rich Kids").setEncounterBgm(TrainerType.RICH), [TrainerType.RICH_KID]: new TrainerConfig(++t).setMoneyMultiplier(3.75).setName("Rich Boy").setHasGenders("Lady").setHasDouble("Rich Kids").setEncounterBgm(TrainerType.RICH),
[TrainerType.ROUGHNECK]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(Type.DARK)), [TrainerType.ROUGHNECK]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.ROUGHNECK).setSpeciesFilter(s => s.isOfType(PokemonType.DARK)),
[TrainerType.SAILOR]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.BACKPACKER).setSpeciesFilter(s => s.isOfType(Type.WATER) || s.isOfType(Type.FIGHTING)), [TrainerType.SAILOR]: new TrainerConfig(++t).setMoneyMultiplier(1.4).setEncounterBgm(TrainerType.BACKPACKER).setSpeciesFilter(s => s.isOfType(PokemonType.WATER) || s.isOfType(PokemonType.FIGHTING)),
[TrainerType.SCIENTIST]: new TrainerConfig(++t).setHasGenders("Scientist Female").setHasDouble("Scientists").setMoneyMultiplier(1.7).setEncounterBgm(TrainerType.SCIENTIST) [TrainerType.SCIENTIST]: new TrainerConfig(++t).setHasGenders("Scientist Female").setHasDouble("Scientists").setMoneyMultiplier(1.7).setEncounterBgm(TrainerType.SCIENTIST)
.setSpeciesPools({ .setSpeciesPools({
[TrainerPoolTier.COMMON]: [ Species.MAGNEMITE, Species.GRIMER, Species.DROWZEE, Species.VOLTORB, Species.KOFFING ], [TrainerPoolTier.COMMON]: [ Species.MAGNEMITE, Species.GRIMER, Species.DROWZEE, Species.VOLTORB, Species.KOFFING ],
@ -1547,7 +1547,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.ULTRA_RARE]: [ Species.ROTOM, Species.MELTAN ] [TrainerPoolTier.ULTRA_RARE]: [ Species.ROTOM, Species.MELTAN ]
}), }),
[TrainerType.SMASHER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST), [TrainerType.SMASHER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST),
[TrainerType.SNOW_WORKER]: new TrainerConfig(++t).setName("Worker").setHasDouble("Workers").setMoneyMultiplier(1.7).setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => s.isOfType(Type.ICE) || s.isOfType(Type.STEEL)), [TrainerType.SNOW_WORKER]: new TrainerConfig(++t).setName("Worker").setHasDouble("Workers").setMoneyMultiplier(1.7).setEncounterBgm(TrainerType.CLERK).setSpeciesFilter(s => s.isOfType(PokemonType.ICE) || s.isOfType(PokemonType.STEEL)),
[TrainerType.STRIKER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST), [TrainerType.STRIKER]: new TrainerConfig(++t).setMoneyMultiplier(1.2).setEncounterBgm(TrainerType.CYCLIST),
[TrainerType.SCHOOL_KID]: new TrainerConfig(++t).setMoneyMultiplier(0.75).setEncounterBgm(TrainerType.YOUNGSTER).setHasGenders("School Kid Female", "lass").setHasDouble("School Kids") [TrainerType.SCHOOL_KID]: new TrainerConfig(++t).setMoneyMultiplier(0.75).setEncounterBgm(TrainerType.YOUNGSTER).setHasGenders("School Kid Female", "lass").setHasDouble("School Kids")
.setSpeciesPools({ .setSpeciesPools({
@ -1556,20 +1556,20 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.RARE]: [ Species.TANGELA, Species.EEVEE, Species.YANMA ], [TrainerPoolTier.RARE]: [ Species.TANGELA, Species.EEVEE, Species.YANMA ],
[TrainerPoolTier.SUPER_RARE]: [ Species.TADBULB ] [TrainerPoolTier.SUPER_RARE]: [ Species.TADBULB ]
}), }),
[TrainerType.SWIMMER]: new TrainerConfig(++t).setMoneyMultiplier(1.3).setEncounterBgm(TrainerType.PARASOL_LADY).setHasGenders("Swimmer Female").setHasDouble("Swimmers").setSpecialtyType(Type.WATER).setSpeciesFilter(s => s.isOfType(Type.WATER)), [TrainerType.SWIMMER]: new TrainerConfig(++t).setMoneyMultiplier(1.3).setEncounterBgm(TrainerType.PARASOL_LADY).setHasGenders("Swimmer Female").setHasDouble("Swimmers").setSpecialtyType(PokemonType.WATER).setSpeciesFilter(s => s.isOfType(PokemonType.WATER)),
[TrainerType.TWINS]: new TrainerConfig(++t).setDoubleOnly().setMoneyMultiplier(0.65).setUseSameSeedForAllMembers() [TrainerType.TWINS]: new TrainerConfig(++t).setDoubleOnly().setMoneyMultiplier(0.65).setUseSameSeedForAllMembers()
.setPartyTemplateFunc(() => getWavePartyTemplate(trainerPartyTemplates.TWO_WEAK, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_STRONG)) .setPartyTemplateFunc(() => getWavePartyTemplate(trainerPartyTemplates.TWO_WEAK, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_STRONG))
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.PLUSLE, Species.VOLBEAT, Species.PACHIRISU, Species.SILCOON, Species.METAPOD, Species.IGGLYBUFF, Species.PETILIL, Species.EEVEE ])) .setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.PLUSLE, Species.VOLBEAT, Species.PACHIRISU, Species.SILCOON, Species.METAPOD, Species.IGGLYBUFF, Species.PETILIL, Species.EEVEE ]))
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.MINUN, Species.ILLUMISE, Species.EMOLGA, Species.CASCOON, Species.KAKUNA, Species.CLEFFA, Species.COTTONEE, Species.EEVEE ], TrainerSlot.TRAINER_PARTNER)) .setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.MINUN, Species.ILLUMISE, Species.EMOLGA, Species.CASCOON, Species.KAKUNA, Species.CLEFFA, Species.COTTONEE, Species.EEVEE ], TrainerSlot.TRAINER_PARTNER))
.setEncounterBgm(TrainerType.TWINS), .setEncounterBgm(TrainerType.TWINS),
[TrainerType.VETERAN]: new TrainerConfig(++t).setHasGenders("Veteran Female").setHasDouble("Veteran Duo").setMoneyMultiplier(2.5).setEncounterBgm(TrainerType.ACE_TRAINER).setSpeciesFilter(s => s.isOfType(Type.DRAGON)), [TrainerType.VETERAN]: new TrainerConfig(++t).setHasGenders("Veteran Female").setHasDouble("Veteran Duo").setMoneyMultiplier(2.5).setEncounterBgm(TrainerType.ACE_TRAINER).setSpeciesFilter(s => s.isOfType(PokemonType.DRAGON)),
[TrainerType.WAITER]: new TrainerConfig(++t).setHasGenders("Waitress").setHasDouble("Restaurant Staff").setMoneyMultiplier(1.5).setEncounterBgm(TrainerType.CLERK) [TrainerType.WAITER]: new TrainerConfig(++t).setHasGenders("Waitress").setHasDouble("Restaurant Staff").setMoneyMultiplier(1.5).setEncounterBgm(TrainerType.CLERK)
.setSpeciesPools({ .setSpeciesPools({
[TrainerPoolTier.COMMON]: [ Species.CLEFFA, Species.CHATOT, Species.PANSAGE, Species.PANSEAR, Species.PANPOUR, Species.MINCCINO ], [TrainerPoolTier.COMMON]: [ Species.CLEFFA, Species.CHATOT, Species.PANSAGE, Species.PANSEAR, Species.PANPOUR, Species.MINCCINO ],
[TrainerPoolTier.UNCOMMON]: [ Species.TROPIUS, Species.PETILIL, Species.BOUNSWEET, Species.INDEEDEE ], [TrainerPoolTier.UNCOMMON]: [ Species.TROPIUS, Species.PETILIL, Species.BOUNSWEET, Species.INDEEDEE ],
[TrainerPoolTier.RARE]: [ Species.APPLIN, Species.SINISTEA, Species.POLTCHAGEIST ] [TrainerPoolTier.RARE]: [ Species.APPLIN, Species.SINISTEA, Species.POLTCHAGEIST ]
}), }),
[TrainerType.WORKER]: new TrainerConfig(++t).setHasGenders("Worker Female").setHasDouble("Workers").setEncounterBgm(TrainerType.CLERK).setMoneyMultiplier(1.7).setSpeciesFilter(s => s.isOfType(Type.ROCK) || s.isOfType(Type.STEEL)), [TrainerType.WORKER]: new TrainerConfig(++t).setHasGenders("Worker Female").setHasDouble("Workers").setEncounterBgm(TrainerType.CLERK).setMoneyMultiplier(1.7).setSpeciesFilter(s => s.isOfType(PokemonType.ROCK) || s.isOfType(PokemonType.STEEL)),
[TrainerType.YOUNGSTER]: new TrainerConfig(++t).setMoneyMultiplier(0.5).setEncounterBgm(TrainerType.YOUNGSTER).setHasGenders("Lass", "lass").setHasDouble("Beginners").setPartyTemplates(trainerPartyTemplates.TWO_WEAKER) [TrainerType.YOUNGSTER]: new TrainerConfig(++t).setMoneyMultiplier(0.5).setEncounterBgm(TrainerType.YOUNGSTER).setHasGenders("Lass", "lass").setHasDouble("Beginners").setPartyTemplates(trainerPartyTemplates.TWO_WEAKER)
.setSpeciesPools( .setSpeciesPools(
[ Species.CATERPIE, Species.WEEDLE, Species.RATTATA, Species.SENTRET, Species.POOCHYENA, Species.ZIGZAGOON, Species.WURMPLE, Species.BIDOOF, Species.PATRAT, Species.LILLIPUP ] [ Species.CATERPIE, Species.WEEDLE, Species.RATTATA, Species.SENTRET, Species.POOCHYENA, Species.ZIGZAGOON, Species.WURMPLE, Species.BIDOOF, Species.PATRAT, Species.LILLIPUP ]
@ -1662,148 +1662,148 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.RARE]: [ Species.MANKEY, Species.PAWNIARD, Species.CHARCADET, Species.FLITTLE, Species.VAROOM, Species.ORTHWORM ], [TrainerPoolTier.RARE]: [ Species.MANKEY, Species.PAWNIARD, Species.CHARCADET, Species.FLITTLE, Species.VAROOM, Species.ORTHWORM ],
[TrainerPoolTier.SUPER_RARE]: [ Species.DONDOZO, Species.GIMMIGHOUL ] [TrainerPoolTier.SUPER_RARE]: [ Species.DONDOZO, Species.GIMMIGHOUL ]
}), }),
[TrainerType.GIACOMO]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_1", [ Species.KINGAMBIT ], Type.DARK).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()) [TrainerType.GIACOMO]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_1", [ Species.KINGAMBIT ], PokemonType.DARK).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate())
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => {
p.formIndex = 1; // Segin Starmobile p.formIndex = 1; // Segin Starmobile
p.moveset = [ new PokemonMove(Moves.WICKED_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ]; p.moveset = [ new PokemonMove(Moves.WICKED_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ];
})), })),
[TrainerType.MELA]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_2", [ Species.ARMAROUGE ], Type.FIRE).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()) [TrainerType.MELA]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_2", [ Species.ARMAROUGE ], PokemonType.FIRE).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate())
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => {
p.formIndex = 2; // Schedar Starmobile p.formIndex = 2; // Schedar Starmobile
p.moveset = [ new PokemonMove(Moves.BLAZING_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ]; p.moveset = [ new PokemonMove(Moves.BLAZING_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ];
})), })),
[TrainerType.ATTICUS]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_3", [ Species.REVAVROOM ], Type.POISON).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()) [TrainerType.ATTICUS]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_3", [ Species.REVAVROOM ], PokemonType.POISON).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate())
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => {
p.formIndex = 3; // Navi Starmobile p.formIndex = 3; // Navi Starmobile
p.moveset = [ new PokemonMove(Moves.NOXIOUS_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ]; p.moveset = [ new PokemonMove(Moves.NOXIOUS_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ];
})), })),
[TrainerType.ORTEGA]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_4", [ Species.DACHSBUN ], Type.FAIRY).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()) [TrainerType.ORTEGA]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_4", [ Species.DACHSBUN ], PokemonType.FAIRY).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate())
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => {
p.formIndex = 4; // Ruchbah Starmobile p.formIndex = 4; // Ruchbah Starmobile
p.moveset = [ new PokemonMove(Moves.MAGICAL_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ]; p.moveset = [ new PokemonMove(Moves.MAGICAL_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ];
})), })),
[TrainerType.ERI]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_5", [ Species.ANNIHILAPE ], Type.FIGHTING).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate()) [TrainerType.ERI]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("star_admin", "star_5", [ Species.ANNIHILAPE ], PokemonType.FIGHTING).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_star_admin").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(() => getEvilGruntPartyTemplate())
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => {
p.formIndex = 5; // Caph Starmobile p.formIndex = 5; // Caph Starmobile
p.moveset = [ new PokemonMove(Moves.COMBAT_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ]; p.moveset = [ new PokemonMove(Moves.COMBAT_TORQUE), new PokemonMove(Moves.SPIN_OUT), new PokemonMove(Moves.SHIFT_GEAR), new PokemonMove(Moves.HIGH_HORSEPOWER) ];
})), })),
[TrainerType.BROCK]: new TrainerConfig((t = TrainerType.BROCK)).initForGymLeader(signatureSpecies["BROCK"], true, Type.ROCK).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.BROCK]: new TrainerConfig((t = TrainerType.BROCK)).initForGymLeader(signatureSpecies["BROCK"], true, PokemonType.ROCK).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.MISTY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MISTY"], false, Type.WATER).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.MISTY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MISTY"], false, PokemonType.WATER).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.LT_SURGE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["LT_SURGE"], true, Type.ELECTRIC).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.LT_SURGE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["LT_SURGE"], true, PokemonType.ELECTRIC).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.ERIKA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ERIKA"], false, Type.GRASS).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.ERIKA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ERIKA"], false, PokemonType.GRASS).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.JANINE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["JANINE"], false, Type.POISON).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.JANINE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["JANINE"], false, PokemonType.POISON).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.SABRINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["SABRINA"], false, Type.PSYCHIC).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.SABRINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["SABRINA"], false, PokemonType.PSYCHIC).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.BLAINE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BLAINE"], true, Type.FIRE).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.BLAINE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BLAINE"], true, PokemonType.FIRE).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.GIOVANNI]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GIOVANNI"], true, Type.DARK).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.GIOVANNI]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GIOVANNI"], true, PokemonType.DARK).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.FALKNER]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["FALKNER"], true, Type.FLYING).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.FALKNER]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["FALKNER"], true, PokemonType.FLYING).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.BUGSY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BUGSY"], true, Type.BUG).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.BUGSY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BUGSY"], true, PokemonType.BUG).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.WHITNEY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WHITNEY"], false, Type.NORMAL).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.WHITNEY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WHITNEY"], false, PokemonType.NORMAL).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.MORTY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MORTY"], true, Type.GHOST).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.MORTY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MORTY"], true, PokemonType.GHOST).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.CHUCK]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CHUCK"], true, Type.FIGHTING).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.CHUCK]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CHUCK"], true, PokemonType.FIGHTING).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.JASMINE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["JASMINE"], false, Type.STEEL).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.JASMINE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["JASMINE"], false, PokemonType.STEEL).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.PRYCE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["PRYCE"], true, Type.ICE).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.PRYCE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["PRYCE"], true, PokemonType.ICE).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.CLAIR]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLAIR"], false, Type.DRAGON).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.CLAIR]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLAIR"], false, PokemonType.DRAGON).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.ROXANNE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ROXANNE"], false, Type.ROCK).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"), [TrainerType.ROXANNE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ROXANNE"], false, PokemonType.ROCK).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"),
[TrainerType.BRAWLY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRAWLY"], true, Type.FIGHTING).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"), [TrainerType.BRAWLY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRAWLY"], true, PokemonType.FIGHTING).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"),
[TrainerType.WATTSON]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WATTSON"], true, Type.ELECTRIC).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"), [TrainerType.WATTSON]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WATTSON"], true, PokemonType.ELECTRIC).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"),
[TrainerType.FLANNERY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["FLANNERY"], false, Type.FIRE).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"), [TrainerType.FLANNERY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["FLANNERY"], false, PokemonType.FIRE).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"),
[TrainerType.NORMAN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["NORMAN"], true, Type.NORMAL).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"), [TrainerType.NORMAN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["NORMAN"], true, PokemonType.NORMAL).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"),
[TrainerType.WINONA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WINONA"], false, Type.FLYING).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"), [TrainerType.WINONA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WINONA"], false, PokemonType.FLYING).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"),
[TrainerType.TATE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["TATE"], true, Type.PSYCHIC).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym").setHasDouble("tate_liza_double").setDoubleTrainerType(TrainerType.LIZA).setDoubleTitle("gym_leader_double"), [TrainerType.TATE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["TATE"], true, PokemonType.PSYCHIC).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym").setHasDouble("tate_liza_double").setDoubleTrainerType(TrainerType.LIZA).setDoubleTitle("gym_leader_double"),
[TrainerType.LIZA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["LIZA"], false, Type.PSYCHIC).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym").setHasDouble("liza_tate_double").setDoubleTrainerType(TrainerType.TATE).setDoubleTitle("gym_leader_double"), [TrainerType.LIZA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["LIZA"], false, PokemonType.PSYCHIC).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym").setHasDouble("liza_tate_double").setDoubleTrainerType(TrainerType.TATE).setDoubleTitle("gym_leader_double"),
[TrainerType.JUAN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["JUAN"], true, Type.WATER).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"), [TrainerType.JUAN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["JUAN"], true, PokemonType.WATER).setBattleBgm("battle_hoenn_gym").setMixedBattleBgm("battle_hoenn_gym"),
[TrainerType.ROARK]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ROARK"], true, Type.ROCK).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.ROARK]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ROARK"], true, PokemonType.ROCK).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.GARDENIA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GARDENIA"], false, Type.GRASS).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.GARDENIA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GARDENIA"], false, PokemonType.GRASS).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.MAYLENE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MAYLENE"], false, Type.FIGHTING).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.MAYLENE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MAYLENE"], false, PokemonType.FIGHTING).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.CRASHER_WAKE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CRASHER_WAKE"], true, Type.WATER).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.CRASHER_WAKE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CRASHER_WAKE"], true, PokemonType.WATER).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.FANTINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["FANTINA"], false, Type.GHOST).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.FANTINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["FANTINA"], false, PokemonType.GHOST).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.BYRON]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BYRON"], true, Type.STEEL).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.BYRON]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BYRON"], true, PokemonType.STEEL).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.CANDICE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CANDICE"], false, Type.ICE).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.CANDICE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CANDICE"], false, PokemonType.ICE).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.VOLKNER]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VOLKNER"], true, Type.ELECTRIC).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.VOLKNER]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VOLKNER"], true, PokemonType.ELECTRIC).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.CILAN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CILAN"], true, Type.GRASS).setMixedBattleBgm("battle_unova_gym"), [TrainerType.CILAN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CILAN"], true, PokemonType.GRASS).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.CHILI]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CHILI"], true, Type.FIRE).setMixedBattleBgm("battle_unova_gym"), [TrainerType.CHILI]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CHILI"], true, PokemonType.FIRE).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.CRESS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CRESS"], true, Type.WATER).setMixedBattleBgm("battle_unova_gym"), [TrainerType.CRESS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CRESS"], true, PokemonType.WATER).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.CHEREN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CHEREN"], true, Type.NORMAL).setMixedBattleBgm("battle_unova_gym"), [TrainerType.CHEREN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CHEREN"], true, PokemonType.NORMAL).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.LENORA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["LENORA"], false, Type.NORMAL).setMixedBattleBgm("battle_unova_gym"), [TrainerType.LENORA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["LENORA"], false, PokemonType.NORMAL).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.ROXIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ROXIE"], false, Type.POISON).setMixedBattleBgm("battle_unova_gym"), [TrainerType.ROXIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ROXIE"], false, PokemonType.POISON).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.BURGH]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BURGH"], true, Type.BUG).setMixedBattleBgm("battle_unova_gym"), [TrainerType.BURGH]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BURGH"], true, PokemonType.BUG).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.ELESA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ELESA"], false, Type.ELECTRIC).setMixedBattleBgm("battle_unova_gym"), [TrainerType.ELESA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["ELESA"], false, PokemonType.ELECTRIC).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.CLAY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLAY"], true, Type.GROUND).setMixedBattleBgm("battle_unova_gym"), [TrainerType.CLAY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLAY"], true, PokemonType.GROUND).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.SKYLA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["SKYLA"], false, Type.FLYING).setMixedBattleBgm("battle_unova_gym"), [TrainerType.SKYLA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["SKYLA"], false, PokemonType.FLYING).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.BRYCEN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRYCEN"], true, Type.ICE).setMixedBattleBgm("battle_unova_gym"), [TrainerType.BRYCEN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRYCEN"], true, PokemonType.ICE).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.DRAYDEN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["DRAYDEN"], true, Type.DRAGON).setMixedBattleBgm("battle_unova_gym"), [TrainerType.DRAYDEN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["DRAYDEN"], true, PokemonType.DRAGON).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.MARLON]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MARLON"], true, Type.WATER).setMixedBattleBgm("battle_unova_gym"), [TrainerType.MARLON]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MARLON"], true, PokemonType.WATER).setMixedBattleBgm("battle_unova_gym"),
[TrainerType.VIOLA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VIOLA"], false, Type.BUG).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.VIOLA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VIOLA"], false, PokemonType.BUG).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.GRANT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRANT"], true, Type.ROCK).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.GRANT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRANT"], true, PokemonType.ROCK).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.KORRINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KORRINA"], false, Type.FIGHTING).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.KORRINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KORRINA"], false, PokemonType.FIGHTING).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.RAMOS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RAMOS"], true, Type.GRASS).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.RAMOS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RAMOS"], true, PokemonType.GRASS).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.CLEMONT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLEMONT"], true, Type.ELECTRIC).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.CLEMONT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLEMONT"], true, PokemonType.ELECTRIC).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.VALERIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VALERIE"], false, Type.FAIRY).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.VALERIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VALERIE"], false, PokemonType.FAIRY).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.OLYMPIA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OLYMPIA"], false, Type.PSYCHIC).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.OLYMPIA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OLYMPIA"], false, PokemonType.PSYCHIC).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.WULFRIC]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WULFRIC"], true, Type.ICE).setMixedBattleBgm("battle_kalos_gym"), [TrainerType.WULFRIC]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WULFRIC"], true, PokemonType.ICE).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.MILO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MILO"], true, Type.GRASS).setMixedBattleBgm("battle_galar_gym"), [TrainerType.MILO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MILO"], true, PokemonType.GRASS).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.NESSA]: new TrainerConfig(++t).setName("Nessa").initForGymLeader(signatureSpecies["NESSA"], false, Type.WATER).setMixedBattleBgm("battle_galar_gym"), [TrainerType.NESSA]: new TrainerConfig(++t).setName("Nessa").initForGymLeader(signatureSpecies["NESSA"], false, PokemonType.WATER).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.KABU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KABU"], true, Type.FIRE).setMixedBattleBgm("battle_galar_gym"), [TrainerType.KABU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KABU"], true, PokemonType.FIRE).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.BEA]: new TrainerConfig(++t).setName("Bea").initForGymLeader(signatureSpecies["BEA"], false, Type.FIGHTING).setMixedBattleBgm("battle_galar_gym"), [TrainerType.BEA]: new TrainerConfig(++t).setName("Bea").initForGymLeader(signatureSpecies["BEA"], false, PokemonType.FIGHTING).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.ALLISTER]: new TrainerConfig(++t).setName("Allister").initForGymLeader(signatureSpecies["ALLISTER"], true, Type.GHOST).setMixedBattleBgm("battle_galar_gym"), [TrainerType.ALLISTER]: new TrainerConfig(++t).setName("Allister").initForGymLeader(signatureSpecies["ALLISTER"], true, PokemonType.GHOST).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.OPAL]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OPAL"], false, Type.FAIRY).setMixedBattleBgm("battle_galar_gym"), [TrainerType.OPAL]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OPAL"], false, PokemonType.FAIRY).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.BEDE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BEDE"], true, Type.FAIRY).setMixedBattleBgm("battle_galar_gym"), [TrainerType.BEDE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BEDE"], true, PokemonType.FAIRY).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.GORDIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GORDIE"], true, Type.ROCK).setMixedBattleBgm("battle_galar_gym"), [TrainerType.GORDIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GORDIE"], true, PokemonType.ROCK).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.MELONY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MELONY"], false, Type.ICE).setMixedBattleBgm("battle_galar_gym"), [TrainerType.MELONY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MELONY"], false, PokemonType.ICE).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.PIERS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["PIERS"], true, Type.DARK).setHasDouble("piers_marnie_double").setDoubleTrainerType(TrainerType.MARNIE).setDoubleTitle("gym_leader_double").setMixedBattleBgm("battle_galar_gym"), [TrainerType.PIERS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["PIERS"], true, PokemonType.DARK).setHasDouble("piers_marnie_double").setDoubleTrainerType(TrainerType.MARNIE).setDoubleTitle("gym_leader_double").setMixedBattleBgm("battle_galar_gym"),
[TrainerType.MARNIE]: new TrainerConfig(++t).setName("Marnie").initForGymLeader(signatureSpecies["MARNIE"], false, Type.DARK).setHasDouble("marnie_piers_double").setDoubleTrainerType(TrainerType.PIERS).setDoubleTitle("gym_leader_double").setMixedBattleBgm("battle_galar_gym"), [TrainerType.MARNIE]: new TrainerConfig(++t).setName("Marnie").initForGymLeader(signatureSpecies["MARNIE"], false, PokemonType.DARK).setHasDouble("marnie_piers_double").setDoubleTrainerType(TrainerType.PIERS).setDoubleTitle("gym_leader_double").setMixedBattleBgm("battle_galar_gym"),
[TrainerType.RAIHAN]: new TrainerConfig(++t).setName("Raihan").initForGymLeader(signatureSpecies["RAIHAN"], true, Type.DRAGON).setMixedBattleBgm("battle_galar_gym"), [TrainerType.RAIHAN]: new TrainerConfig(++t).setName("Raihan").initForGymLeader(signatureSpecies["RAIHAN"], true, PokemonType.DRAGON).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.KATY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KATY"], false, Type.BUG, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.KATY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KATY"], false, PokemonType.BUG, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.BRASSIUS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRASSIUS"], true, Type.GRASS, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.BRASSIUS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRASSIUS"], true, PokemonType.GRASS, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.IONO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["IONO"], false, Type.ELECTRIC, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.IONO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["IONO"], false, PokemonType.ELECTRIC, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.KOFU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KOFU"], true, Type.WATER, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.KOFU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KOFU"], true, PokemonType.WATER, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.LARRY]: new TrainerConfig(++t).setName("Larry").initForGymLeader(signatureSpecies["LARRY"], true, Type.NORMAL, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.LARRY]: new TrainerConfig(++t).setName("Larry").initForGymLeader(signatureSpecies["LARRY"], true, PokemonType.NORMAL, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.RYME]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RYME"], false, Type.GHOST, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.RYME]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RYME"], false, PokemonType.GHOST, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.TULIP]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["TULIP"], false, Type.PSYCHIC, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.TULIP]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["TULIP"], false, PokemonType.PSYCHIC, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.GRUSHA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRUSHA"], true, Type.ICE, true, -1).setMixedBattleBgm("battle_paldea_gym"), [TrainerType.GRUSHA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRUSHA"], true, PokemonType.ICE, true, -1).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.LORELEI]: new TrainerConfig((t = TrainerType.LORELEI)).initForEliteFour(signatureSpecies["LORELEI"], false, Type.ICE).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.LORELEI]: new TrainerConfig((t = TrainerType.LORELEI)).initForEliteFour(signatureSpecies["LORELEI"], false, PokemonType.ICE).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.BRUNO]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BRUNO"], true, Type.FIGHTING).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.BRUNO]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BRUNO"], true, PokemonType.FIGHTING).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.AGATHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AGATHA"], false, Type.GHOST).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.AGATHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AGATHA"], false, PokemonType.GHOST).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.LANCE]: new TrainerConfig(++t).setName("Lance").initForEliteFour(signatureSpecies["LANCE"], true, Type.DRAGON).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"), [TrainerType.LANCE]: new TrainerConfig(++t).setName("Lance").initForEliteFour(signatureSpecies["LANCE"], true, PokemonType.DRAGON).setBattleBgm("battle_kanto_gym").setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.WILL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WILL"], true, Type.PSYCHIC).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.WILL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WILL"], true, PokemonType.PSYCHIC).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.KOGA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KOGA"], true, Type.POISON).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.KOGA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KOGA"], true, PokemonType.POISON).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.KAREN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAREN"], false, Type.DARK).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"), [TrainerType.KAREN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAREN"], false, PokemonType.DARK).setBattleBgm("battle_johto_gym").setMixedBattleBgm("battle_johto_gym"),
[TrainerType.SIDNEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIDNEY"], true, Type.DARK).setMixedBattleBgm("battle_hoenn_elite"), [TrainerType.SIDNEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIDNEY"], true, PokemonType.DARK).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.PHOEBE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["PHOEBE"], false, Type.GHOST).setMixedBattleBgm("battle_hoenn_elite"), [TrainerType.PHOEBE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["PHOEBE"], false, PokemonType.GHOST).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.GLACIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["GLACIA"], false, Type.ICE).setMixedBattleBgm("battle_hoenn_elite"), [TrainerType.GLACIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["GLACIA"], false, PokemonType.ICE).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.DRAKE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAKE"], true, Type.DRAGON).setMixedBattleBgm("battle_hoenn_elite"), [TrainerType.DRAKE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAKE"], true, PokemonType.DRAGON).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.AARON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AARON"], true, Type.BUG).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.AARON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AARON"], true, PokemonType.BUG).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.BERTHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BERTHA"], false, Type.GROUND).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.BERTHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BERTHA"], false, PokemonType.GROUND).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.FLINT]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["FLINT"], true, Type.FIRE, 3).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.FLINT]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["FLINT"], true, PokemonType.FIRE, 3).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.LUCIAN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LUCIAN"], true, Type.PSYCHIC).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"), [TrainerType.LUCIAN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LUCIAN"], true, PokemonType.PSYCHIC).setBattleBgm("battle_sinnoh_gym").setMixedBattleBgm("battle_sinnoh_gym"),
[TrainerType.SHAUNTAL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SHAUNTAL"], false, Type.GHOST).setMixedBattleBgm("battle_unova_elite"), [TrainerType.SHAUNTAL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SHAUNTAL"], false, PokemonType.GHOST).setMixedBattleBgm("battle_unova_elite"),
[TrainerType.MARSHAL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MARSHAL"], true, Type.FIGHTING).setMixedBattleBgm("battle_unova_elite"), [TrainerType.MARSHAL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MARSHAL"], true, PokemonType.FIGHTING).setMixedBattleBgm("battle_unova_elite"),
[TrainerType.GRIMSLEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["GRIMSLEY"], true, Type.DARK).setMixedBattleBgm("battle_unova_elite"), [TrainerType.GRIMSLEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["GRIMSLEY"], true, PokemonType.DARK).setMixedBattleBgm("battle_unova_elite"),
[TrainerType.CAITLIN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["CAITLIN"], false, Type.PSYCHIC).setMixedBattleBgm("battle_unova_elite"), [TrainerType.CAITLIN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["CAITLIN"], false, PokemonType.PSYCHIC).setMixedBattleBgm("battle_unova_elite"),
[TrainerType.MALVA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MALVA"], false, Type.FIRE).setMixedBattleBgm("battle_kalos_elite"), [TrainerType.MALVA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MALVA"], false, PokemonType.FIRE).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.SIEBOLD]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIEBOLD"], true, Type.WATER).setMixedBattleBgm("battle_kalos_elite"), [TrainerType.SIEBOLD]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIEBOLD"], true, PokemonType.WATER).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.WIKSTROM]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WIKSTROM"], true, Type.STEEL).setMixedBattleBgm("battle_kalos_elite"), [TrainerType.WIKSTROM]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WIKSTROM"], true, PokemonType.STEEL).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.DRASNA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRASNA"], false, Type.DRAGON).setMixedBattleBgm("battle_kalos_elite"), [TrainerType.DRASNA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRASNA"], false, PokemonType.DRAGON).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.HALA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HALA"], true, Type.FIGHTING).setMixedBattleBgm("battle_alola_elite"), [TrainerType.HALA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HALA"], true, PokemonType.FIGHTING).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.MOLAYNE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MOLAYNE"], true, Type.STEEL).setMixedBattleBgm("battle_alola_elite"), [TrainerType.MOLAYNE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MOLAYNE"], true, PokemonType.STEEL).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.OLIVIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["OLIVIA"], false, Type.ROCK).setMixedBattleBgm("battle_alola_elite"), [TrainerType.OLIVIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["OLIVIA"], false, PokemonType.ROCK).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.ACEROLA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["ACEROLA"], false, Type.GHOST).setMixedBattleBgm("battle_alola_elite"), [TrainerType.ACEROLA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["ACEROLA"], false, PokemonType.GHOST).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.KAHILI]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAHILI"], false, Type.FLYING).setMixedBattleBgm("battle_alola_elite"), [TrainerType.KAHILI]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAHILI"], false, PokemonType.FLYING).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.MARNIE_ELITE]: new TrainerConfig(++t).setName("Marnie").initForEliteFour(signatureSpecies["MARNIE_ELITE"], false, Type.DARK).setMixedBattleBgm("battle_galar_elite"), [TrainerType.MARNIE_ELITE]: new TrainerConfig(++t).setName("Marnie").initForEliteFour(signatureSpecies["MARNIE_ELITE"], false, PokemonType.DARK).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.NESSA_ELITE]: new TrainerConfig(++t).setName("Nessa").initForEliteFour(signatureSpecies["NESSA_ELITE"], false, Type.WATER).setMixedBattleBgm("battle_galar_elite"), [TrainerType.NESSA_ELITE]: new TrainerConfig(++t).setName("Nessa").initForEliteFour(signatureSpecies["NESSA_ELITE"], false, PokemonType.WATER).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.BEA_ELITE]: new TrainerConfig(++t).setName("Bea").initForEliteFour(signatureSpecies["BEA_ELITE"], false, Type.FIGHTING).setMixedBattleBgm("battle_galar_elite"), [TrainerType.BEA_ELITE]: new TrainerConfig(++t).setName("Bea").initForEliteFour(signatureSpecies["BEA_ELITE"], false, PokemonType.FIGHTING).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.ALLISTER_ELITE]: new TrainerConfig(++t).setName("Allister").initForEliteFour(signatureSpecies["ALLISTER_ELITE"], true, Type.GHOST).setMixedBattleBgm("battle_galar_elite"), [TrainerType.ALLISTER_ELITE]: new TrainerConfig(++t).setName("Allister").initForEliteFour(signatureSpecies["ALLISTER_ELITE"], true, PokemonType.GHOST).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.RAIHAN_ELITE]: new TrainerConfig(++t).setName("Raihan").initForEliteFour(signatureSpecies["RAIHAN_ELITE"], true, Type.DRAGON).setMixedBattleBgm("battle_galar_elite"), [TrainerType.RAIHAN_ELITE]: new TrainerConfig(++t).setName("Raihan").initForEliteFour(signatureSpecies["RAIHAN_ELITE"], true, PokemonType.DRAGON).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.RIKA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["RIKA"], false, Type.GROUND, 5).setMixedBattleBgm("battle_paldea_elite"), [TrainerType.RIKA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["RIKA"], false, PokemonType.GROUND, 5).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.POPPY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["POPPY"], false, Type.STEEL, 5).setMixedBattleBgm("battle_paldea_elite"), [TrainerType.POPPY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["POPPY"], false, PokemonType.STEEL, 5).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.LARRY_ELITE]: new TrainerConfig(++t).setName("Larry").initForEliteFour(signatureSpecies["LARRY_ELITE"], true, Type.FLYING, 5).setMixedBattleBgm("battle_paldea_elite"), [TrainerType.LARRY_ELITE]: new TrainerConfig(++t).setName("Larry").initForEliteFour(signatureSpecies["LARRY_ELITE"], true, PokemonType.FLYING, 5).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.HASSEL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HASSEL"], true, Type.DRAGON, 5).setMixedBattleBgm("battle_paldea_elite"), [TrainerType.HASSEL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HASSEL"], true, PokemonType.DRAGON, 5).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.CRISPIN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["CRISPIN"], true, Type.FIRE, 5).setMixedBattleBgm("battle_bb_elite"), [TrainerType.CRISPIN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["CRISPIN"], true, PokemonType.FIRE, 5).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.AMARYS]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AMARYS"], false, Type.STEEL, 5).setMixedBattleBgm("battle_bb_elite"), [TrainerType.AMARYS]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AMARYS"], false, PokemonType.STEEL, 5).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.LACEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LACEY"], false, Type.FAIRY, 5).setMixedBattleBgm("battle_bb_elite"), [TrainerType.LACEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LACEY"], false, PokemonType.FAIRY, 5).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.DRAYTON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAYTON"], true, Type.DRAGON, 5).setMixedBattleBgm("battle_bb_elite"), [TrainerType.DRAYTON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAYTON"], true, PokemonType.DRAGON, 5).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.BLUE]: new TrainerConfig((t = TrainerType.BLUE)).initForChampion(true).setBattleBgm("battle_kanto_champion").setMixedBattleBgm("battle_kanto_champion").setHasDouble("blue_red_double").setDoubleTrainerType(TrainerType.RED).setDoubleTitle("champion_double") [TrainerType.BLUE]: new TrainerConfig((t = TrainerType.BLUE)).initForChampion(true).setBattleBgm("battle_kanto_champion").setMixedBattleBgm("battle_kanto_champion").setHasDouble("blue_red_double").setDoubleTrainerType(TrainerType.RED).setDoubleTitle("champion_double")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.ALAKAZAM ])) .setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.ALAKAZAM ]))
@ -1858,7 +1858,7 @@ export const trainerConfigs: TrainerConfigs = {
})) }))
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.CHARIZARD ])) .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.CHARIZARD ]))
.setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.TYRANITAR, Species.GARCHOMP, Species.KOMMO_O ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.TYRANITAR, Species.GARCHOMP, Species.KOMMO_O ], TrainerSlot.TRAINER, true, p => {
p.teraType = Type.DRAGON; p.teraType = PokemonType.DRAGON;
p.abilityIndex = p.species.speciesId === Species.KOMMO_O ? 1 : 2; // Soundproof Kommo-o, Unnerve Tyranitar, Rough Skin Garchomp p.abilityIndex = p.species.speciesId === Species.KOMMO_O ? 1 : 2; // Soundproof Kommo-o, Unnerve Tyranitar, Rough Skin Garchomp
})) }))
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.DRAGONITE ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.DRAGONITE ], TrainerSlot.TRAINER, true, p => {
@ -1946,7 +1946,7 @@ export const trainerConfigs: TrainerConfigs = {
p.pokeball = PokeballType.ULTRA_BALL; p.pokeball = PokeballType.ULTRA_BALL;
})) }))
.setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.CHANDELURE, Species.KROOKODILE, Species.REUNICLUS, Species.CONKELDURR ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.CHANDELURE, Species.KROOKODILE, Species.REUNICLUS, Species.CONKELDURR ], TrainerSlot.TRAINER, true, p => {
p.teraType = p.species.speciesId === Species.KROOKODILE ? Type.DARK : p.species.type1; p.teraType = p.species.speciesId === Species.KROOKODILE ? PokemonType.DARK : p.species.type1;
})) }))
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.VOLCARONA ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.VOLCARONA ], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset(); p.generateAndPopulateMoveset();
@ -1962,7 +1962,7 @@ export const trainerConfigs: TrainerConfigs = {
p.pokeball = PokeballType.MASTER_BALL; p.pokeball = PokeballType.MASTER_BALL;
})) }))
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.SALAMENCE, Species.HYDREIGON, Species.ARCHALUDON ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.SALAMENCE, Species.HYDREIGON, Species.ARCHALUDON ], TrainerSlot.TRAINER, true, p => {
p.teraType = Type.DRAGON; p.teraType = PokemonType.DRAGON;
})) }))
.setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.LAPRAS ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.LAPRAS ], TrainerSlot.TRAINER, true, p => {
p.formIndex = 1; // G-Max Lapras p.formIndex = 1; // G-Max Lapras
@ -2085,7 +2085,7 @@ export const trainerConfigs: TrainerConfigs = {
.setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.GALAR_SLOWBRO, Species.GALAR_SLOWKING ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.GALAR_SLOWBRO, Species.GALAR_SLOWKING ], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset(); p.generateAndPopulateMoveset();
p.pokeball = PokeballType.ULTRA_BALL; p.pokeball = PokeballType.ULTRA_BALL;
p.teraType = Type.PSYCHIC; p.teraType = PokemonType.PSYCHIC;
})) }))
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.GALAR_DARMANITAN ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.GALAR_DARMANITAN ], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset(); p.generateAndPopulateMoveset();
@ -2120,7 +2120,7 @@ export const trainerConfigs: TrainerConfigs = {
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.KINGAMBIT ], TrainerSlot.TRAINER, true, p => { .setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.KINGAMBIT ], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset(); p.generateAndPopulateMoveset();
p.abilityIndex = 1; // Supreme Overlord p.abilityIndex = 1; // Supreme Overlord
p.teraType = Type.FLYING; p.teraType = PokemonType.FLYING;
})) }))
.setInstantTera(5), // Tera Flying Kingambit .setInstantTera(5), // Tera Flying Kingambit
[TrainerType.NEMONA]: new TrainerConfig(++t).initForChampion(false).setMixedBattleBgm("battle_champion_nemona") [TrainerType.NEMONA]: new TrainerConfig(++t).initForChampion(false).setMixedBattleBgm("battle_champion_nemona")

View File

@ -1,266 +1,266 @@
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
export type TypeDamageMultiplier = 0 | 0.125 | 0.25 | 0.5 | 1 | 2 | 4 | 8; export type TypeDamageMultiplier = 0 | 0.125 | 0.25 | 0.5 | 1 | 2 | 4 | 8;
export function getTypeDamageMultiplier(attackType: Type, defType: Type): TypeDamageMultiplier { export function getTypeDamageMultiplier(attackType: PokemonType, defType: PokemonType): TypeDamageMultiplier {
if (attackType === Type.UNKNOWN || defType === Type.UNKNOWN) { if (attackType === PokemonType.UNKNOWN || defType === PokemonType.UNKNOWN) {
return 1; return 1;
} }
switch (defType) { switch (defType) {
case Type.NORMAL: case PokemonType.NORMAL:
switch (attackType) { switch (attackType) {
case Type.FIGHTING: case PokemonType.FIGHTING:
return 2; return 2;
case Type.GHOST: case PokemonType.GHOST:
return 0; return 0;
default: default:
return 1; return 1;
} }
case Type.FIGHTING: case PokemonType.FIGHTING:
switch (attackType) { switch (attackType) {
case Type.FLYING: case PokemonType.FLYING:
case Type.PSYCHIC: case PokemonType.PSYCHIC:
case Type.FAIRY: case PokemonType.FAIRY:
return 2; return 2;
case Type.ROCK: case PokemonType.ROCK:
case Type.BUG: case PokemonType.BUG:
case Type.DARK: case PokemonType.DARK:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.FLYING: case PokemonType.FLYING:
switch (attackType) { switch (attackType) {
case Type.ROCK: case PokemonType.ROCK:
case Type.ELECTRIC: case PokemonType.ELECTRIC:
case Type.ICE: case PokemonType.ICE:
return 2; return 2;
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.BUG: case PokemonType.BUG:
case Type.GRASS: case PokemonType.GRASS:
return 0.5; return 0.5;
case Type.GROUND: case PokemonType.GROUND:
return 0; return 0;
default: default:
return 1; return 1;
} }
case Type.POISON: case PokemonType.POISON:
switch (attackType) { switch (attackType) {
case Type.GROUND: case PokemonType.GROUND:
case Type.PSYCHIC: case PokemonType.PSYCHIC:
return 2; return 2;
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.POISON: case PokemonType.POISON:
case Type.BUG: case PokemonType.BUG:
case Type.GRASS: case PokemonType.GRASS:
case Type.FAIRY: case PokemonType.FAIRY:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.GROUND: case PokemonType.GROUND:
switch (attackType) { switch (attackType) {
case Type.WATER: case PokemonType.WATER:
case Type.GRASS: case PokemonType.GRASS:
case Type.ICE: case PokemonType.ICE:
return 2; return 2;
case Type.POISON: case PokemonType.POISON:
case Type.ROCK: case PokemonType.ROCK:
return 0.5; return 0.5;
case Type.ELECTRIC: case PokemonType.ELECTRIC:
return 0; return 0;
default: default:
return 1; return 1;
} }
case Type.ROCK: case PokemonType.ROCK:
switch (attackType) { switch (attackType) {
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.GROUND: case PokemonType.GROUND:
case Type.STEEL: case PokemonType.STEEL:
case Type.WATER: case PokemonType.WATER:
case Type.GRASS: case PokemonType.GRASS:
return 2; return 2;
case Type.NORMAL: case PokemonType.NORMAL:
case Type.FLYING: case PokemonType.FLYING:
case Type.POISON: case PokemonType.POISON:
case Type.FIRE: case PokemonType.FIRE:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.BUG: case PokemonType.BUG:
switch (attackType) { switch (attackType) {
case Type.FLYING: case PokemonType.FLYING:
case Type.ROCK: case PokemonType.ROCK:
case Type.FIRE: case PokemonType.FIRE:
return 2; return 2;
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.GROUND: case PokemonType.GROUND:
case Type.GRASS: case PokemonType.GRASS:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.GHOST: case PokemonType.GHOST:
switch (attackType) { switch (attackType) {
case Type.GHOST: case PokemonType.GHOST:
case Type.DARK: case PokemonType.DARK:
return 2; return 2;
case Type.POISON: case PokemonType.POISON:
case Type.BUG: case PokemonType.BUG:
return 0.5; return 0.5;
case Type.NORMAL: case PokemonType.NORMAL:
case Type.FIGHTING: case PokemonType.FIGHTING:
return 0; return 0;
default: default:
return 1; return 1;
} }
case Type.STEEL: case PokemonType.STEEL:
switch (attackType) { switch (attackType) {
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.GROUND: case PokemonType.GROUND:
case Type.FIRE: case PokemonType.FIRE:
return 2; return 2;
case Type.NORMAL: case PokemonType.NORMAL:
case Type.FLYING: case PokemonType.FLYING:
case Type.ROCK: case PokemonType.ROCK:
case Type.BUG: case PokemonType.BUG:
case Type.STEEL: case PokemonType.STEEL:
case Type.GRASS: case PokemonType.GRASS:
case Type.PSYCHIC: case PokemonType.PSYCHIC:
case Type.ICE: case PokemonType.ICE:
case Type.DRAGON: case PokemonType.DRAGON:
case Type.FAIRY: case PokemonType.FAIRY:
return 0.5; return 0.5;
case Type.POISON: case PokemonType.POISON:
return 0; return 0;
default: default:
return 1; return 1;
} }
case Type.FIRE: case PokemonType.FIRE:
switch (attackType) { switch (attackType) {
case Type.GROUND: case PokemonType.GROUND:
case Type.ROCK: case PokemonType.ROCK:
case Type.WATER: case PokemonType.WATER:
return 2; return 2;
case Type.BUG: case PokemonType.BUG:
case Type.STEEL: case PokemonType.STEEL:
case Type.FIRE: case PokemonType.FIRE:
case Type.GRASS: case PokemonType.GRASS:
case Type.ICE: case PokemonType.ICE:
case Type.FAIRY: case PokemonType.FAIRY:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.WATER: case PokemonType.WATER:
switch (attackType) { switch (attackType) {
case Type.GRASS: case PokemonType.GRASS:
case Type.ELECTRIC: case PokemonType.ELECTRIC:
return 2; return 2;
case Type.STEEL: case PokemonType.STEEL:
case Type.FIRE: case PokemonType.FIRE:
case Type.WATER: case PokemonType.WATER:
case Type.ICE: case PokemonType.ICE:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.GRASS: case PokemonType.GRASS:
switch (attackType) { switch (attackType) {
case Type.FLYING: case PokemonType.FLYING:
case Type.POISON: case PokemonType.POISON:
case Type.BUG: case PokemonType.BUG:
case Type.FIRE: case PokemonType.FIRE:
case Type.ICE: case PokemonType.ICE:
return 2; return 2;
case Type.GROUND: case PokemonType.GROUND:
case Type.WATER: case PokemonType.WATER:
case Type.GRASS: case PokemonType.GRASS:
case Type.ELECTRIC: case PokemonType.ELECTRIC:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.ELECTRIC: case PokemonType.ELECTRIC:
switch (attackType) { switch (attackType) {
case Type.GROUND: case PokemonType.GROUND:
return 2; return 2;
case Type.FLYING: case PokemonType.FLYING:
case Type.STEEL: case PokemonType.STEEL:
case Type.ELECTRIC: case PokemonType.ELECTRIC:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.PSYCHIC: case PokemonType.PSYCHIC:
switch (attackType) { switch (attackType) {
case Type.BUG: case PokemonType.BUG:
case Type.GHOST: case PokemonType.GHOST:
case Type.DARK: case PokemonType.DARK:
return 2; return 2;
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.PSYCHIC: case PokemonType.PSYCHIC:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.ICE: case PokemonType.ICE:
switch (attackType) { switch (attackType) {
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.ROCK: case PokemonType.ROCK:
case Type.STEEL: case PokemonType.STEEL:
case Type.FIRE: case PokemonType.FIRE:
return 2; return 2;
case Type.ICE: case PokemonType.ICE:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.DRAGON: case PokemonType.DRAGON:
switch (attackType) { switch (attackType) {
case Type.ICE: case PokemonType.ICE:
case Type.DRAGON: case PokemonType.DRAGON:
case Type.FAIRY: case PokemonType.FAIRY:
return 2; return 2;
case Type.FIRE: case PokemonType.FIRE:
case Type.WATER: case PokemonType.WATER:
case Type.GRASS: case PokemonType.GRASS:
case Type.ELECTRIC: case PokemonType.ELECTRIC:
return 0.5; return 0.5;
default: default:
return 1; return 1;
} }
case Type.DARK: case PokemonType.DARK:
switch (attackType) { switch (attackType) {
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.BUG: case PokemonType.BUG:
case Type.FAIRY: case PokemonType.FAIRY:
return 2; return 2;
case Type.GHOST: case PokemonType.GHOST:
case Type.DARK: case PokemonType.DARK:
return 0.5; return 0.5;
case Type.PSYCHIC: case PokemonType.PSYCHIC:
return 0; return 0;
default: default:
return 1; return 1;
} }
case Type.FAIRY: case PokemonType.FAIRY:
switch (attackType) { switch (attackType) {
case Type.POISON: case PokemonType.POISON:
case Type.STEEL: case PokemonType.STEEL:
return 2; return 2;
case Type.FIGHTING: case PokemonType.FIGHTING:
case Type.BUG: case PokemonType.BUG:
case Type.DARK: case PokemonType.DARK:
return 0.5; return 0.5;
case Type.DRAGON: case PokemonType.DRAGON:
return 0; return 0;
default: default:
return 1; return 1;
} }
case Type.STELLAR: case PokemonType.STELLAR:
return 1; return 1;
} }
@ -313,45 +313,45 @@ export function getTypeDamageMultiplierColor(multiplier: TypeDamageMultiplier, s
} }
} }
export function getTypeRgb(type: Type): [ number, number, number ] { export function getTypeRgb(type: PokemonType): [ number, number, number ] {
switch (type) { switch (type) {
case Type.NORMAL: case PokemonType.NORMAL:
return [ 168, 168, 120 ]; return [ 168, 168, 120 ];
case Type.FIGHTING: case PokemonType.FIGHTING:
return [ 192, 48, 40 ]; return [ 192, 48, 40 ];
case Type.FLYING: case PokemonType.FLYING:
return [ 168, 144, 240 ]; return [ 168, 144, 240 ];
case Type.POISON: case PokemonType.POISON:
return [ 160, 64, 160 ]; return [ 160, 64, 160 ];
case Type.GROUND: case PokemonType.GROUND:
return [ 224, 192, 104 ]; return [ 224, 192, 104 ];
case Type.ROCK: case PokemonType.ROCK:
return [ 184, 160, 56 ]; return [ 184, 160, 56 ];
case Type.BUG: case PokemonType.BUG:
return [ 168, 184, 32 ]; return [ 168, 184, 32 ];
case Type.GHOST: case PokemonType.GHOST:
return [ 112, 88, 152 ]; return [ 112, 88, 152 ];
case Type.STEEL: case PokemonType.STEEL:
return [ 184, 184, 208 ]; return [ 184, 184, 208 ];
case Type.FIRE: case PokemonType.FIRE:
return [ 240, 128, 48 ]; return [ 240, 128, 48 ];
case Type.WATER: case PokemonType.WATER:
return [ 104, 144, 240 ]; return [ 104, 144, 240 ];
case Type.GRASS: case PokemonType.GRASS:
return [ 120, 200, 80 ]; return [ 120, 200, 80 ];
case Type.ELECTRIC: case PokemonType.ELECTRIC:
return [ 248, 208, 48 ]; return [ 248, 208, 48 ];
case Type.PSYCHIC: case PokemonType.PSYCHIC:
return [ 248, 88, 136 ]; return [ 248, 88, 136 ];
case Type.ICE: case PokemonType.ICE:
return [ 152, 216, 216 ]; return [ 152, 216, 216 ];
case Type.DRAGON: case PokemonType.DRAGON:
return [ 112, 56, 248 ]; return [ 112, 56, 248 ];
case Type.DARK: case PokemonType.DARK:
return [ 112, 88, 72 ]; return [ 112, 88, 72 ];
case Type.FAIRY: case PokemonType.FAIRY:
return [ 232, 136, 200 ]; return [ 232, 136, 200 ];
case Type.STELLAR: case PokemonType.STELLAR:
return [ 255, 255, 255 ]; return [ 255, 255, 255 ];
default: default:
return [ 0, 0, 0 ]; return [ 0, 0, 0 ];

View File

@ -2,9 +2,9 @@ import { Biome } from "#enums/biome";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
import { getPokemonNameWithAffix } from "../messages"; import { getPokemonNameWithAffix } from "../messages";
import type Pokemon from "../field/pokemon"; import type Pokemon from "../field/pokemon";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import type Move from "./move"; import type Move from "./moves/move";
import { AttackMove } from "./move"; import { AttackMove } from "./moves/move";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { SuppressWeatherEffectAbAttr } from "./ability"; import { SuppressWeatherEffectAbAttr } from "./ability";
import { TerrainType, getTerrainName } from "./terrain"; import { TerrainType, getTerrainName } from "./terrain";
@ -53,34 +53,34 @@ export class Weather {
return false; return false;
} }
isTypeDamageImmune(type: Type): boolean { isTypeDamageImmune(type: PokemonType): boolean {
switch (this.weatherType) { switch (this.weatherType) {
case WeatherType.SANDSTORM: case WeatherType.SANDSTORM:
return type === Type.GROUND || type === Type.ROCK || type === Type.STEEL; return type === PokemonType.GROUND || type === PokemonType.ROCK || type === PokemonType.STEEL;
case WeatherType.HAIL: case WeatherType.HAIL:
return type === Type.ICE; return type === PokemonType.ICE;
} }
return false; return false;
} }
getAttackTypeMultiplier(attackType: Type): number { getAttackTypeMultiplier(attackType: PokemonType): number {
switch (this.weatherType) { switch (this.weatherType) {
case WeatherType.SUNNY: case WeatherType.SUNNY:
case WeatherType.HARSH_SUN: case WeatherType.HARSH_SUN:
if (attackType === Type.FIRE) { if (attackType === PokemonType.FIRE) {
return 1.5; return 1.5;
} }
if (attackType === Type.WATER) { if (attackType === PokemonType.WATER) {
return 0.5; return 0.5;
} }
break; break;
case WeatherType.RAIN: case WeatherType.RAIN:
case WeatherType.HEAVY_RAIN: case WeatherType.HEAVY_RAIN:
if (attackType === Type.FIRE) { if (attackType === PokemonType.FIRE) {
return 0.5; return 0.5;
} }
if (attackType === Type.WATER) { if (attackType === PokemonType.WATER) {
return 1.5; return 1.5;
} }
break; break;
@ -94,9 +94,9 @@ export class Weather {
switch (this.weatherType) { switch (this.weatherType) {
case WeatherType.HARSH_SUN: case WeatherType.HARSH_SUN:
return move instanceof AttackMove && moveType === Type.WATER; return move instanceof AttackMove && moveType === PokemonType.WATER;
case WeatherType.HEAVY_RAIN: case WeatherType.HEAVY_RAIN:
return move instanceof AttackMove && moveType === Type.FIRE; return move instanceof AttackMove && moveType === PokemonType.FIRE;
} }
return false; return false;
@ -205,6 +205,28 @@ export function getWeatherClearMessage(weatherType: WeatherType): string | null
return null; return null;
} }
export function getLegendaryWeatherContinuesMessage(weatherType: WeatherType): string | null {
switch (weatherType) {
case WeatherType.HARSH_SUN:
return i18next.t("weather:harshSunContinueMessage");
case WeatherType.HEAVY_RAIN:
return i18next.t("weather:heavyRainContinueMessage");
case WeatherType.STRONG_WINDS:
return i18next.t("weather:strongWindsContinueMessage");
}
return null;
}
export function getWeatherBlockMessage(weatherType: WeatherType): string {
switch (weatherType) {
case WeatherType.HARSH_SUN:
return i18next.t("weather:harshSunEffectMessage");
case WeatherType.HEAVY_RAIN:
return i18next.t("weather:heavyRainEffectMessage");
}
return i18next.t("weather:defaultEffectMessage");
}
export function getTerrainStartMessage(terrainType: TerrainType): string | null { export function getTerrainStartMessage(terrainType: TerrainType): string | null {
switch (terrainType) { switch (terrainType) {
case TerrainType.MISTY: case TerrainType.MISTY:

View File

@ -0,0 +1,5 @@
export enum MoveCategory {
PHYSICAL,
SPECIAL,
STATUS
}

View File

@ -0,0 +1,7 @@
export enum MoveEffectTrigger {
PRE_APPLY,
POST_APPLY,
HIT,
/** Triggers one time after all target effects have applied */
POST_TARGET
}

46
src/enums/MoveFlags.ts Normal file
View File

@ -0,0 +1,46 @@
export enum MoveFlags {
NONE = 0,
MAKES_CONTACT = 1 << 0,
IGNORE_PROTECT = 1 << 1,
/**
* Sound-based moves have the following effects:
* - Pokemon with the {@linkcode Abilities.SOUNDPROOF Soundproof Ability} are unaffected by other Pokemon's sound-based moves.
* - Pokemon affected by {@linkcode Moves.THROAT_CHOP Throat Chop} cannot use sound-based moves for two turns.
* - Sound-based moves used by a Pokemon with {@linkcode Abilities.LIQUID_VOICE Liquid Voice} become Water-type moves.
* - Sound-based moves used by a Pokemon with {@linkcode Abilities.PUNK_ROCK Punk Rock} are boosted by 30%. Pokemon with Punk Rock also take half damage from sound-based moves.
* - All sound-based moves (except Howl) can hit Pokemon behind an active {@linkcode Moves.SUBSTITUTE Substitute}.
*
* cf https://bulbapedia.bulbagarden.net/wiki/Sound-based_move
*/
SOUND_BASED = 1 << 2,
HIDE_USER = 1 << 3,
HIDE_TARGET = 1 << 4,
BITING_MOVE = 1 << 5,
PULSE_MOVE = 1 << 6,
PUNCHING_MOVE = 1 << 7,
SLICING_MOVE = 1 << 8,
/**
* Indicates a move should be affected by {@linkcode Abilities.RECKLESS}
* @see {@linkcode Move.recklessMove()}
*/
RECKLESS_MOVE = 1 << 9,
/** Indicates a move should be affected by {@linkcode Abilities.BULLETPROOF} */
BALLBOMB_MOVE = 1 << 10,
/** Grass types and pokemon with {@linkcode Abilities.OVERCOAT} are immune to powder moves */
POWDER_MOVE = 1 << 11,
/** Indicates a move should trigger {@linkcode Abilities.DANCER} */
DANCE_MOVE = 1 << 12,
/** Indicates a move should trigger {@linkcode Abilities.WIND_RIDER} */
WIND_MOVE = 1 << 13,
/** Indicates a move should trigger {@linkcode Abilities.TRIAGE} */
TRIAGE_MOVE = 1 << 14,
IGNORE_ABILITIES = 1 << 15,
/** Enables all hits of a multi-hit move to be accuracy checked individually */
CHECK_ALL_HITS = 1 << 16,
/** Indicates a move is able to bypass its target's Substitute (if the target has one) */
IGNORE_SUBSTITUTE = 1 << 17,
/** Indicates a move is able to be redirected to allies in a double battle if the attacker faints */
REDIRECT_COUNTER = 1 << 18,
/** Indicates a move is able to be reflected by {@linkcode Abilities.MAGIC_BOUNCE} and {@linkcode Moves.MAGIC_COAT} */
REFLECTABLE = 1 << 19
}

29
src/enums/MoveTarget.ts Normal file
View File

@ -0,0 +1,29 @@
export enum MoveTarget {
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_target_the_user Moves that target the User} */
USER,
OTHER,
ALL_OTHERS,
NEAR_OTHER,
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_target_all_adjacent_Pok%C3%A9mon Moves that target all adjacent Pokemon} */
ALL_NEAR_OTHERS,
NEAR_ENEMY,
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_target_all_adjacent_foes Moves that target all adjacent foes} */
ALL_NEAR_ENEMIES,
RANDOM_NEAR_ENEMY,
ALL_ENEMIES,
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Counterattacks Counterattacks} */
ATTACKER,
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_target_one_adjacent_ally Moves that target one adjacent ally} */
NEAR_ALLY,
ALLY,
USER_OR_NEAR_ALLY,
USER_AND_ALLIES,
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_target_all_Pok%C3%A9mon Moves that target all Pokemon} */
ALL,
USER_SIDE,
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Entry_hazard-creating_moves Entry hazard-creating moves} */
ENEMY_SIDE,
BOTH_SIDES,
PARTY,
CURSE
}

View File

@ -0,0 +1,7 @@
export enum MultiHitType {
_2,
_2_TO_5,
_3,
_10,
BEAT_UP
}

View File

@ -1,4 +1,4 @@
export enum Type { export enum PokemonType {
UNKNOWN = -1, UNKNOWN = -1,
NORMAL = 0, NORMAL = 0,
FIGHTING, FIGHTING,

View File

@ -1,4 +1,4 @@
import type Move from "../data/move"; import type Move from "../data/moves/move";
import type { BerryModifier } from "../modifier/modifier"; import type { BerryModifier } from "../modifier/modifier";
/** Alias for all {@linkcode BattleScene} events */ /** Alias for all {@linkcode BattleScene} events */

View File

@ -5,10 +5,10 @@ import type { Constructor } from "#app/utils";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import type PokemonSpecies from "#app/data/pokemon-species"; import type PokemonSpecies from "#app/data/pokemon-species";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { getTerrainClearMessage, getTerrainStartMessage, getWeatherClearMessage, getWeatherStartMessage, Weather } from "#app/data/weather"; import { getTerrainClearMessage, getTerrainStartMessage, getWeatherClearMessage, getWeatherStartMessage, getLegendaryWeatherContinuesMessage, Weather } from "#app/data/weather";
import { CommonAnim } from "#app/data/battle-anims"; import { CommonAnim } from "#app/data/battle-anims";
import type { Type } from "#enums/type"; import type { PokemonType } from "#enums/pokemon-type";
import type Move from "#app/data/move"; import type Move from "#app/data/moves/move";
import type { ArenaTag } from "#app/data/arena-tag"; import type { ArenaTag } from "#app/data/arena-tag";
import { ArenaTagSide, ArenaTrapTag, getArenaTag } from "#app/data/arena-tag"; import { ArenaTagSide, ArenaTrapTag, getArenaTag } from "#app/data/arena-tag";
import type { BattlerIndex } from "#app/battle"; import type { BattlerIndex } from "#app/battle";
@ -274,6 +274,12 @@ export class Arena {
const oldWeatherType = this.weather?.weatherType || WeatherType.NONE; const oldWeatherType = this.weather?.weatherType || WeatherType.NONE;
if (this.weather?.isImmutable() && ![ WeatherType.HARSH_SUN, WeatherType.HEAVY_RAIN, WeatherType.STRONG_WINDS, WeatherType.NONE ].includes(weather)) {
globalScene.unshiftPhase(new CommonAnimPhase(undefined, undefined, CommonAnim.SUNNY + (oldWeatherType - 1), true));
globalScene.queueMessage(getLegendaryWeatherContinuesMessage(oldWeatherType)!);
return false;
}
this.weather = weather ? new Weather(weather, hasPokemonSource ? 5 : 0) : null; this.weather = weather ? new Weather(weather, hasPokemonSource ? 5 : 0) : null;
this.eventTarget.dispatchEvent(new WeatherChangedEvent(oldWeatherType, this.weather?.weatherType!, this.weather?.turnsLeft!)); // TODO: is this bang correct? this.eventTarget.dispatchEvent(new WeatherChangedEvent(oldWeatherType, this.weather?.weatherType!, this.weather?.turnsLeft!)); // TODO: is this bang correct?
@ -358,11 +364,15 @@ export class Arena {
return !!this.terrain && this.terrain.isMoveTerrainCancelled(user, targets, move); return !!this.terrain && this.terrain.isMoveTerrainCancelled(user, targets, move);
} }
public getWeatherType(): WeatherType {
return this.weather?.weatherType ?? WeatherType.NONE;
}
public getTerrainType(): TerrainType { public getTerrainType(): TerrainType {
return this.terrain?.terrainType ?? TerrainType.NONE; return this.terrain?.terrainType ?? TerrainType.NONE;
} }
getAttackTypeMultiplier(attackType: Type, grounded: boolean): number { getAttackTypeMultiplier(attackType: PokemonType, grounded: boolean): number {
let weatherMultiplier = 1; let weatherMultiplier = 1;
if (this.weather && !this.weather.isEffectSuppressed()) { if (this.weather && !this.weather.isEffectSuppressed()) {
weatherMultiplier = this.weather.getAttackTypeMultiplier(attackType); weatherMultiplier = this.weather.getAttackTypeMultiplier(attackType);

View File

@ -6,7 +6,7 @@ import type { Variant, VariantSet } from "#app/data/variant";
import { variantColorCache } from "#app/data/variant"; import { variantColorCache } from "#app/data/variant";
import { variantData } from "#app/data/variant"; import { variantData } from "#app/data/variant";
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from "#app/ui/battle-info"; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from "#app/ui/battle-info";
import type Move from "#app/data/move"; import type Move from "#app/data/moves/move";
import { import {
HighCritAttr, HighCritAttr,
StatChangeBeforeDmgCalcAttr, StatChangeBeforeDmgCalcAttr,
@ -15,7 +15,6 @@ import {
FixedDamageAttr, FixedDamageAttr,
VariableAtkAttr, VariableAtkAttr,
allMoves, allMoves,
MoveCategory,
TypelessAttr, TypelessAttr,
CritOnlyAttr, CritOnlyAttr,
getMoveTargets, getMoveTargets,
@ -36,11 +35,12 @@ import {
SacrificialAttrOnHit, SacrificialAttrOnHit,
OneHitKOAccuracyAttr, OneHitKOAccuracyAttr,
RespectAttackTypeImmunityAttr, RespectAttackTypeImmunityAttr,
MoveTarget,
CombinedPledgeStabBoostAttr, CombinedPledgeStabBoostAttr,
VariableMoveTypeChartAttr, VariableMoveTypeChartAttr,
HpSplitAttr HpSplitAttr
} from "#app/data/move"; } from "#app/data/moves/move";
import { MoveTarget } from "#enums/MoveTarget";
import { MoveCategory } from "#enums/MoveCategory";
import type { PokemonSpeciesForm } from "#app/data/pokemon-species"; import type { PokemonSpeciesForm } from "#app/data/pokemon-species";
import { default as PokemonSpecies, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species"; import { default as PokemonSpecies, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species";
import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters";
@ -49,7 +49,7 @@ import { isNullOrUndefined, randSeedInt, type nil } from "#app/utils";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import type { TypeDamageMultiplier } from "#app/data/type"; import type { TypeDamageMultiplier } from "#app/data/type";
import { getTypeDamageMultiplier, getTypeRgb } from "#app/data/type"; import { getTypeDamageMultiplier, getTypeRgb } from "#app/data/type";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { getLevelTotalExp } from "#app/data/exp"; import { getLevelTotalExp } from "#app/data/exp";
import { Stat, type PermanentStat, type BattleStat, type EffectiveStat, PERMANENT_STATS, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { Stat, type PermanentStat, type BattleStat, type EffectiveStat, PERMANENT_STATS, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat";
import { DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, EnemyEndureChanceModifier, EnemyFusionChanceModifier, HiddenAbilityRateBoosterModifier, BaseStatModifier, PokemonFriendshipBoosterModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempStatStageBoosterModifier, TempCritBoosterModifier, StatBoosterModifier, CritBoosterModifier, PokemonBaseStatFlatModifier, PokemonBaseStatTotalModifier, PokemonIncrementingStatModifier, EvoTrackerModifier, PokemonMultiHitModifier } from "#app/modifier/modifier"; import { DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, EnemyEndureChanceModifier, EnemyFusionChanceModifier, HiddenAbilityRateBoosterModifier, BaseStatModifier, PokemonFriendshipBoosterModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempStatStageBoosterModifier, TempCritBoosterModifier, StatBoosterModifier, CritBoosterModifier, PokemonBaseStatFlatModifier, PokemonBaseStatTotalModifier, PokemonIncrementingStatModifier, EvoTrackerModifier, PokemonMultiHitModifier } from "#app/modifier/modifier";
@ -163,9 +163,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
public pokerus: boolean; public pokerus: boolean;
public switchOutStatus: boolean; public switchOutStatus: boolean;
public evoCounter: number; public evoCounter: number;
public teraType: Type; public teraType: PokemonType;
public isTerastallized: boolean; public isTerastallized: boolean;
public stellarTypesBoosted: Type[]; public stellarTypesBoosted: PokemonType[];
public fusionSpecies: PokemonSpecies | null; public fusionSpecies: PokemonSpecies | null;
public fusionFormIndex: number; public fusionFormIndex: number;
@ -175,7 +175,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
public fusionGender: Gender; public fusionGender: Gender;
public fusionLuck: number; public fusionLuck: number;
public fusionCustomPokemonData: CustomPokemonData | null; public fusionCustomPokemonData: CustomPokemonData | null;
public fusionTeraType: Type; public fusionTeraType: PokemonType;
private summonDataPrimer: PokemonSummonData | null; private summonDataPrimer: PokemonSummonData | null;
@ -974,7 +974,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const critBoostTag = source.getTag(CritBoostTag); const critBoostTag = source.getTag(CritBoostTag);
if (critBoostTag) { if (critBoostTag) {
if (critBoostTag instanceof DragonCheerTag) { if (critBoostTag instanceof DragonCheerTag) {
critStage.value += critBoostTag.typesOnAdd.includes(Type.DRAGON) ? 2 : 1; critStage.value += critBoostTag.typesOnAdd.includes(PokemonType.DRAGON) ? 2 : 1;
} else { } else {
critStage.value += 2; critStage.value += 2;
} }
@ -1025,14 +1025,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
break; break;
case Stat.DEF: case Stat.DEF:
if (this.isOfType(Type.ICE) && globalScene.arena.weather?.weatherType === WeatherType.SNOW) { if (this.isOfType(PokemonType.ICE) && globalScene.arena.weather?.weatherType === WeatherType.SNOW) {
ret *= 1.5; ret *= 1.5;
} }
break; break;
case Stat.SPATK: case Stat.SPATK:
break; break;
case Stat.SPDEF: case Stat.SPDEF:
if (this.isOfType(Type.ROCK) && globalScene.arena.weather?.weatherType === WeatherType.SANDSTORM) { if (this.isOfType(PokemonType.ROCK) && globalScene.arena.weather?.weatherType === WeatherType.SANDSTORM) {
ret *= 1.5; ret *= 1.5;
} }
break; break;
@ -1308,14 +1308,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
* @param includeTeraType - `true` to include tera-formed type; Default: `false` * @param includeTeraType - `true` to include tera-formed type; Default: `false`
* @param forDefend - `true` if the pokemon is defending from an attack; Default: `false` * @param forDefend - `true` if the pokemon is defending from an attack; Default: `false`
* @param ignoreOverride - If `true`, ignore ability changing effects; Default: `false` * @param ignoreOverride - If `true`, ignore ability changing effects; Default: `false`
* @returns array of {@linkcode Type} * @returns array of {@linkcode PokemonType}
*/ */
public getTypes(includeTeraType = false, forDefend: boolean = false, ignoreOverride: boolean = false): Type[] { public getTypes(includeTeraType = false, forDefend: boolean = false, ignoreOverride: boolean = false): PokemonType[] {
const types: Type[] = []; const types: PokemonType[] = [];
if (includeTeraType && this.isTerastallized) { if (includeTeraType && this.isTerastallized) {
const teraType = this.getTeraType(); const teraType = this.getTeraType();
if (this.isTerastallized && !(forDefend && teraType === Type.STELLAR)) { // Stellar tera uses its original types defensively if (this.isTerastallized && !(forDefend && teraType === PokemonType.STELLAR)) { // Stellar tera uses its original types defensively
types.push(teraType); types.push(teraType);
if (forDefend) { if (forDefend) {
return types; return types;
@ -1332,17 +1332,17 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const customTypes = this.customPokemonData.types?.length > 0; const customTypes = this.customPokemonData.types?.length > 0;
// First type, checking for "permanently changed" types from ME // First type, checking for "permanently changed" types from ME
const firstType = (customTypes && this.customPokemonData.types[0] !== Type.UNKNOWN) ? this.customPokemonData.types[0] : speciesForm.type1; const firstType = (customTypes && this.customPokemonData.types[0] !== PokemonType.UNKNOWN) ? this.customPokemonData.types[0] : speciesForm.type1;
types.push(firstType); types.push(firstType);
// Second type // Second type
let secondType: Type = Type.UNKNOWN; let secondType: PokemonType = PokemonType.UNKNOWN;
if (fusionSpeciesForm) { if (fusionSpeciesForm) {
// Check if the fusion Pokemon also has permanent changes from ME when determining the fusion types // Check if the fusion Pokemon also has permanent changes from ME when determining the fusion types
const fusionType1 = (this.fusionCustomPokemonData?.types && this.fusionCustomPokemonData.types.length > 0 && this.fusionCustomPokemonData.types[0] !== Type.UNKNOWN) const fusionType1 = (this.fusionCustomPokemonData?.types && this.fusionCustomPokemonData.types.length > 0 && this.fusionCustomPokemonData.types[0] !== PokemonType.UNKNOWN)
? this.fusionCustomPokemonData.types[0] : fusionSpeciesForm.type1; ? this.fusionCustomPokemonData.types[0] : fusionSpeciesForm.type1;
const fusionType2 = (this.fusionCustomPokemonData?.types && this.fusionCustomPokemonData.types.length > 1 && this.fusionCustomPokemonData.types[1] !== Type.UNKNOWN) const fusionType2 = (this.fusionCustomPokemonData?.types && this.fusionCustomPokemonData.types.length > 1 && this.fusionCustomPokemonData.types[1] !== PokemonType.UNKNOWN)
? this.fusionCustomPokemonData.types[1] : fusionSpeciesForm.type2; ? this.fusionCustomPokemonData.types[1] : fusionSpeciesForm.type2;
// Assign second type if the fusion can provide one // Assign second type if the fusion can provide one
@ -1353,17 +1353,17 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
if (secondType === Type.UNKNOWN && Utils.isNullOrUndefined(fusionType2)) { // If second pokemon was monotype and shared its primary type if (secondType === PokemonType.UNKNOWN && Utils.isNullOrUndefined(fusionType2)) { // If second pokemon was monotype and shared its primary type
secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== Type.UNKNOWN) secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== PokemonType.UNKNOWN)
? this.customPokemonData.types[1] : (speciesForm.type2 ?? Type.UNKNOWN); ? this.customPokemonData.types[1] : (speciesForm.type2 ?? PokemonType.UNKNOWN);
} }
} else { } else {
// If not a fusion, just get the second type from the species, checking for permanent changes from ME // If not a fusion, just get the second type from the species, checking for permanent changes from ME
secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== Type.UNKNOWN) secondType = (customTypes && this.customPokemonData.types.length > 1 && this.customPokemonData.types[1] !== PokemonType.UNKNOWN)
? this.customPokemonData.types[1] : (speciesForm.type2 ?? Type.UNKNOWN); ? this.customPokemonData.types[1] : (speciesForm.type2 ?? PokemonType.UNKNOWN);
} }
if (secondType !== Type.UNKNOWN) { if (secondType !== PokemonType.UNKNOWN) {
types.push(secondType); types.push(secondType);
} }
} }
@ -1371,12 +1371,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
// become UNKNOWN if no types are present // become UNKNOWN if no types are present
if (!types.length) { if (!types.length) {
types.push(Type.UNKNOWN); types.push(PokemonType.UNKNOWN);
} }
// remove UNKNOWN if other types are present // remove UNKNOWN if other types are present
if (types.length > 1 && types.includes(Type.UNKNOWN)) { if (types.length > 1 && types.includes(PokemonType.UNKNOWN)) {
const index = types.indexOf(Type.UNKNOWN); const index = types.indexOf(PokemonType.UNKNOWN);
if (index !== -1) { if (index !== -1) {
types.splice(index, 1); types.splice(index, 1);
} }
@ -1397,13 +1397,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
/** /**
* Checks if the pokemon's typing includes the specified type * Checks if the pokemon's typing includes the specified type
* @param type - {@linkcode Type} to check * @param type - {@linkcode PokemonType} to check
* @param includeTeraType - `true` to include tera-formed type; Default: `true` * @param includeTeraType - `true` to include tera-formed type; Default: `true`
* @param forDefend - `true` if the pokemon is defending from an attack; Default: `false` * @param forDefend - `true` if the pokemon is defending from an attack; Default: `false`
* @param ignoreOverride - If `true`, ignore ability changing effects; Default: `false` * @param ignoreOverride - If `true`, ignore ability changing effects; Default: `false`
* @returns `true` if the Pokemon's type matches * @returns `true` if the Pokemon's type matches
*/ */
public isOfType(type: Type, includeTeraType: boolean = true, forDefend: boolean = false, ignoreOverride: boolean = false): boolean { public isOfType(type: PokemonType, includeTeraType: boolean = true, forDefend: boolean = false, ignoreOverride: boolean = false): boolean {
return this.getTypes(includeTeraType, forDefend, ignoreOverride).some((t) => t === type); return this.getTypes(includeTeraType, forDefend, ignoreOverride).some((t) => t === type);
} }
@ -1641,35 +1641,35 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
/** /**
* @returns the pokemon's current tera {@linkcode Type} * @returns the pokemon's current tera {@linkcode PokemonType}
*/ */
getTeraType(): Type { getTeraType(): PokemonType {
if (this.hasSpecies(Species.TERAPAGOS)) { if (this.hasSpecies(Species.TERAPAGOS)) {
return Type.STELLAR; return PokemonType.STELLAR;
} else if (this.hasSpecies(Species.OGERPON)) { } else if (this.hasSpecies(Species.OGERPON)) {
const ogerponForm = this.species.speciesId === Species.OGERPON ? this.formIndex : this.fusionFormIndex; const ogerponForm = this.species.speciesId === Species.OGERPON ? this.formIndex : this.fusionFormIndex;
switch (ogerponForm) { switch (ogerponForm) {
case 0: case 0:
case 4: case 4:
return Type.GRASS; return PokemonType.GRASS;
case 1: case 1:
case 5: case 5:
return Type.WATER; return PokemonType.WATER;
case 2: case 2:
case 6: case 6:
return Type.FIRE; return PokemonType.FIRE;
case 3: case 3:
case 7: case 7:
return Type.ROCK; return PokemonType.ROCK;
} }
} else if (this.hasSpecies(Species.SHEDINJA)) { } else if (this.hasSpecies(Species.SHEDINJA)) {
return Type.BUG; return PokemonType.BUG;
} }
return this.teraType; return this.teraType;
} }
public isGrounded(): boolean { public isGrounded(): boolean {
return !!this.getTag(GroundedTag) || (!this.isOfType(Type.FLYING, true, true) && !this.hasAbility(Abilities.LEVITATE) && !this.getTag(BattlerTagType.FLOATING) && !this.getTag(SemiInvulnerableTag)); return !!this.getTag(GroundedTag) || (!this.isOfType(PokemonType.FLYING, true, true) && !this.hasAbility(Abilities.LEVITATE) && !this.getTag(BattlerTagType.FLOATING) && !this.getTag(SemiInvulnerableTag));
} }
/** /**
@ -1686,7 +1686,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return true; return true;
} }
if (this.isOfType(Type.GHOST)) { if (this.isOfType(PokemonType.GHOST)) {
return false; return false;
} }
@ -1711,9 +1711,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
* type-changing move and ability attributes have applied. * type-changing move and ability attributes have applied.
* @param move - {@linkcode Move} The move being used. * @param move - {@linkcode Move} The move being used.
* @param simulated - If `true`, prevents showing abilities applied in this calculation. * @param simulated - If `true`, prevents showing abilities applied in this calculation.
* @returns The {@linkcode Type} of the move after attributes are applied * @returns The {@linkcode PokemonType} of the move after attributes are applied
*/ */
public getMoveType(move: Move, simulated: boolean = true): Type { public getMoveType(move: Move, simulated: boolean = true): PokemonType {
const moveTypeHolder = new Utils.NumberHolder(move.type); const moveTypeHolder = new Utils.NumberHolder(move.type);
applyMoveAttrs(VariableMoveTypeAttr, this, null, move, moveTypeHolder); applyMoveAttrs(VariableMoveTypeAttr, this, null, move, moveTypeHolder);
@ -1721,10 +1721,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
globalScene.arena.applyTags(ArenaTagType.ION_DELUGE, simulated, moveTypeHolder); globalScene.arena.applyTags(ArenaTagType.ION_DELUGE, simulated, moveTypeHolder);
if (this.getTag(BattlerTagType.ELECTRIFIED)) { if (this.getTag(BattlerTagType.ELECTRIFIED)) {
moveTypeHolder.value = Type.ELECTRIC; moveTypeHolder.value = PokemonType.ELECTRIC;
} }
return moveTypeHolder.value as Type; return moveTypeHolder.value as PokemonType;
} }
@ -1758,7 +1758,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
typeMultiplier.value = 0; typeMultiplier.value = 0;
} }
if (this.getTag(TarShotTag) && (this.getMoveType(move) === Type.FIRE)) { if (this.getTag(TarShotTag) && (this.getMoveType(move) === PokemonType.FIRE)) {
typeMultiplier.value *= 2; typeMultiplier.value *= 2;
} }
@ -1798,15 +1798,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
/** /**
* Calculates the move's type effectiveness multiplier based on the target's type/s. * Calculates the move's type effectiveness multiplier based on the target's type/s.
* @param moveType {@linkcode Type} the type of the move being used * @param moveType {@linkcode PokemonType} the type of the move being used
* @param source {@linkcode Pokemon} the Pokemon using the move * @param source {@linkcode Pokemon} the Pokemon using the move
* @param ignoreStrongWinds whether or not this ignores strong winds (anticipation, forewarn, stealth rocks) * @param ignoreStrongWinds whether or not this ignores strong winds (anticipation, forewarn, stealth rocks)
* @param simulated tag to only apply the strong winds effect message when the move is used * @param simulated tag to only apply the strong winds effect message when the move is used
* @param move (optional) the move whose type effectiveness is to be checked. Used for applying {@linkcode VariableMoveTypeChartAttr} * @param move (optional) the move whose type effectiveness is to be checked. Used for applying {@linkcode VariableMoveTypeChartAttr}
* @returns a multiplier for the type effectiveness * @returns a multiplier for the type effectiveness
*/ */
getAttackTypeEffectiveness(moveType: Type, source?: Pokemon, ignoreStrongWinds: boolean = false, simulated: boolean = true, move?: Move): TypeDamageMultiplier { getAttackTypeEffectiveness(moveType: PokemonType, source?: Pokemon, ignoreStrongWinds: boolean = false, simulated: boolean = true, move?: Move): TypeDamageMultiplier {
if (moveType === Type.STELLAR) { if (moveType === PokemonType.STELLAR) {
return this.isTerastallized ? 2 : 1; return this.isTerastallized ? 2 : 1;
} }
const types = this.getTypes(true, true); const types = this.getTypes(true, true);
@ -1814,8 +1814,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
// Handle flying v ground type immunity without removing flying type so effective types are still effective // Handle flying v ground type immunity without removing flying type so effective types are still effective
// Related to https://github.com/pagefaultgames/pokerogue/issues/524 // Related to https://github.com/pagefaultgames/pokerogue/issues/524
if (moveType === Type.GROUND && (this.isGrounded() || arena.hasTag(ArenaTagType.GRAVITY))) { if (moveType === PokemonType.GROUND && (this.isGrounded() || arena.hasTag(ArenaTagType.GRAVITY))) {
const flyingIndex = types.indexOf(Type.FLYING); const flyingIndex = types.indexOf(PokemonType.FLYING);
if (flyingIndex > -1) { if (flyingIndex > -1) {
types.splice(flyingIndex, 1); types.splice(flyingIndex, 1);
} }
@ -1848,10 +1848,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return multiplier.value; return multiplier.value;
}).reduce((acc, cur) => acc * cur, 1) as TypeDamageMultiplier; }).reduce((acc, cur) => acc * cur, 1) as TypeDamageMultiplier;
const typeMultiplierAgainstFlying = new Utils.NumberHolder(getTypeDamageMultiplier(moveType, Type.FLYING)); const typeMultiplierAgainstFlying = new Utils.NumberHolder(getTypeDamageMultiplier(moveType, PokemonType.FLYING));
applyChallenges(globalScene.gameMode, ChallengeType.TYPE_EFFECTIVENESS, typeMultiplierAgainstFlying); applyChallenges(globalScene.gameMode, ChallengeType.TYPE_EFFECTIVENESS, typeMultiplierAgainstFlying);
// Handle strong winds lowering effectiveness of types super effective against pure flying // Handle strong winds lowering effectiveness of types super effective against pure flying
if (!ignoreStrongWinds && arena.weather?.weatherType === WeatherType.STRONG_WINDS && !arena.weather.isEffectSuppressed() && this.isOfType(Type.FLYING) && typeMultiplierAgainstFlying.value === 2) { if (!ignoreStrongWinds && arena.weather?.weatherType === WeatherType.STRONG_WINDS && !arena.weather.isEffectSuppressed() && this.isOfType(PokemonType.FLYING) && typeMultiplierAgainstFlying.value === 2) {
multiplier /= 2; multiplier /= 2;
if (!simulated) { if (!simulated) {
globalScene.queueMessage(i18next.t("weather:strongWindsEffectMessage")); globalScene.queueMessage(i18next.t("weather:strongWindsEffectMessage"));
@ -2846,7 +2846,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const matchesSourceType = sourceTypes.includes(moveType); const matchesSourceType = sourceTypes.includes(moveType);
/** A damage multiplier for when the attack is of the attacker's type and/or Tera type. */ /** A damage multiplier for when the attack is of the attacker's type and/or Tera type. */
const stabMultiplier = new Utils.NumberHolder(1); const stabMultiplier = new Utils.NumberHolder(1);
if (matchesSourceType && moveType !== Type.STELLAR) { if (matchesSourceType && moveType !== PokemonType.STELLAR) {
stabMultiplier.value += 0.5; stabMultiplier.value += 0.5;
} }
@ -2856,11 +2856,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
applyMoveAttrs(CombinedPledgeStabBoostAttr, source, this, move, stabMultiplier); applyMoveAttrs(CombinedPledgeStabBoostAttr, source, this, move, stabMultiplier);
if (source.isTerastallized && sourceTeraType === moveType && moveType !== Type.STELLAR) { if (source.isTerastallized && sourceTeraType === moveType && moveType !== PokemonType.STELLAR) {
stabMultiplier.value += 0.5; stabMultiplier.value += 0.5;
} }
if (source.isTerastallized && source.getTeraType() === Type.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) { if (source.isTerastallized && source.getTeraType() === PokemonType.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) {
if (matchesSourceType) { if (matchesSourceType) {
stabMultiplier.value += 0.5; stabMultiplier.value += 0.5;
} else { } else {
@ -2906,7 +2906,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
}); });
/** Halves damage if this Pokemon is grounded in Misty Terrain against a Dragon-type attack */ /** Halves damage if this Pokemon is grounded in Misty Terrain against a Dragon-type attack */
const mistyTerrainMultiplier = (globalScene.arena.terrain?.terrainType === TerrainType.MISTY && this.isGrounded() && moveType === Type.DRAGON) const mistyTerrainMultiplier = (globalScene.arena.terrain?.terrainType === TerrainType.MISTY && this.isGrounded() && moveType === PokemonType.DRAGON)
? 0.5 ? 0.5
: 1; : 1;
@ -3714,7 +3714,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
// Check if the Pokemon is immune to Poison/Toxic or if the source pokemon is canceling the immunity // Check if the Pokemon is immune to Poison/Toxic or if the source pokemon is canceling the immunity
const poisonImmunity = types.map(defType => { const poisonImmunity = types.map(defType => {
// Check if the Pokemon is not immune to Poison/Toxic // Check if the Pokemon is not immune to Poison/Toxic
if (defType !== Type.POISON && defType !== Type.STEEL) { if (defType !== PokemonType.POISON && defType !== PokemonType.STEEL) {
return false; return false;
} }
@ -3730,14 +3730,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return true; return true;
}); });
if (this.isOfType(Type.POISON) || this.isOfType(Type.STEEL)) { if (this.isOfType(PokemonType.POISON) || this.isOfType(PokemonType.STEEL)) {
if (poisonImmunity.includes(true)) { if (poisonImmunity.includes(true)) {
return false; return false;
} }
} }
break; break;
case StatusEffect.PARALYSIS: case StatusEffect.PARALYSIS:
if (this.isOfType(Type.ELECTRIC)) { if (this.isOfType(PokemonType.ELECTRIC)) {
return false; return false;
} }
break; break;
@ -3747,12 +3747,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
break; break;
case StatusEffect.FREEZE: case StatusEffect.FREEZE:
if (this.isOfType(Type.ICE) || (!ignoreField && (globalScene?.arena?.weather?.weatherType && [ WeatherType.SUNNY, WeatherType.HARSH_SUN ].includes(globalScene.arena.weather.weatherType)))) { if (this.isOfType(PokemonType.ICE) || (!ignoreField && (globalScene?.arena?.weather?.weatherType && [ WeatherType.SUNNY, WeatherType.HARSH_SUN ].includes(globalScene.arena.weather.weatherType)))) {
return false; return false;
} }
break; break;
case StatusEffect.BURN: case StatusEffect.BURN:
if (this.isOfType(Type.FIRE)) { if (this.isOfType(PokemonType.FIRE)) {
return false; return false;
} }
break; break;
@ -5409,8 +5409,8 @@ export class PokemonSummonData {
public stats: number[] = [ 0, 0, 0, 0, 0, 0 ]; public stats: number[] = [ 0, 0, 0, 0, 0, 0 ];
public moveset: (PokemonMove | null)[]; public moveset: (PokemonMove | null)[];
// If not initialized this value will not be populated from save data. // If not initialized this value will not be populated from save data.
public types: Type[] = []; public types: PokemonType[] = [];
public addedType: Type | null = null; public addedType: PokemonType | null = null;
} }
export class PokemonBattleData { export class PokemonBattleData {

View File

@ -10,7 +10,7 @@ import { initBiomes } from "#app/data/balance/biomes";
import { initEggMoves } from "#app/data/balance/egg-moves"; import { initEggMoves } from "#app/data/balance/egg-moves";
import { initPokemonForms } from "#app/data/pokemon-forms"; import { initPokemonForms } from "#app/data/pokemon-forms";
import { initSpecies } from "#app/data/pokemon-species"; import { initSpecies } from "#app/data/pokemon-species";
import { initMoves } from "#app/data/move"; import { initMoves } from "#app/data/moves/move";
import { initAbilities } from "#app/data/ability"; import { initAbilities } from "#app/data/ability";
import { initAchievements } from "#app/system/achv"; import { initAchievements } from "#app/system/achv";
import { initTrainerTypeDialogue } from "#app/data/dialogue"; import { initTrainerTypeDialogue } from "#app/data/dialogue";

View File

@ -2,12 +2,12 @@ import { globalScene } from "#app/global-scene";
import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
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 { allMoves, AttackMove } from "#app/data/move"; import { allMoves, AttackMove } from "#app/data/moves/move";
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 { FormChangeItem, pokemonFormChanges, SpeciesFormChangeCondition, SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms"; import { FormChangeItem, pokemonFormChanges, SpeciesFormChangeCondition, SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms";
import { getStatusEffectDescriptor } from "#app/data/status-effect"; import { getStatusEffectDescriptor } from "#app/data/status-effect";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import type { EnemyPokemon, PlayerPokemon, PokemonMove } from "#app/field/pokemon"; import type { EnemyPokemon, PlayerPokemon, PokemonMove } from "#app/field/pokemon";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { getPokemonNameWithAffix } from "#app/messages"; import { getPokemonNameWithAffix } from "#app/messages";
@ -277,10 +277,10 @@ export class PokemonHeldItemModifierType extends PokemonModifierType {
export class TerastallizeModifierType extends PokemonModifierType { export class TerastallizeModifierType extends PokemonModifierType {
private teraType: Type; private teraType: PokemonType;
constructor(teraType: Type) { constructor(teraType: PokemonType) {
super("", `${Type[teraType].toLowerCase()}_tera_shard`, (type, args) => new TerrastalizeModifier(type as TerastallizeModifierType, (args[0] as Pokemon).id, teraType), super("", `${PokemonType[teraType].toLowerCase()}_tera_shard`, (type, args) => new TerrastalizeModifier(type as TerastallizeModifierType, (args[0] as Pokemon).id, teraType),
(pokemon: PlayerPokemon) => { (pokemon: PlayerPokemon) => {
if ([ pokemon.species.speciesId, pokemon.fusionSpecies?.speciesId ].filter(s => s === Species.TERAPAGOS || s === Species.OGERPON || s === Species.SHEDINJA).length > 0) { if ([ pokemon.species.speciesId, pokemon.fusionSpecies?.speciesId ].filter(s => s === Species.TERAPAGOS || s === Species.OGERPON || s === Species.SHEDINJA).length > 0) {
return PartyUiHandler.NoEffectMessage; return PartyUiHandler.NoEffectMessage;
@ -293,11 +293,11 @@ export class TerastallizeModifierType extends PokemonModifierType {
} }
get name(): string { get name(): string {
return i18next.t("modifierType:ModifierType.TerastallizeModifierType.name", { teraType: i18next.t(`pokemonInfo:Type.${Type[this.teraType]}`) }); return i18next.t("modifierType:ModifierType.TerastallizeModifierType.name", { teraType: i18next.t(`pokemonInfo:Type.${PokemonType[this.teraType]}`) });
} }
getDescription(): string { getDescription(): string {
return i18next.t("modifierType:ModifierType.TerastallizeModifierType.description", { teraType: i18next.t(`pokemonInfo:Type.${Type[this.teraType]}`) }); return i18next.t("modifierType:ModifierType.TerastallizeModifierType.description", { teraType: i18next.t(`pokemonInfo:Type.${PokemonType[this.teraType]}`) });
} }
getPregenArgs(): any[] { getPregenArgs(): any[] {
@ -581,10 +581,10 @@ enum AttackTypeBoosterItem {
} }
export class AttackTypeBoosterModifierType extends PokemonHeldItemModifierType implements GeneratedPersistentModifierType { export class AttackTypeBoosterModifierType extends PokemonHeldItemModifierType implements GeneratedPersistentModifierType {
public moveType: Type; public moveType: PokemonType;
public boostPercent: number; public boostPercent: number;
constructor(moveType: Type, boostPercent: number) { constructor(moveType: PokemonType, boostPercent: number) {
super("", `${AttackTypeBoosterItem[moveType]?.toLowerCase()}`, super("", `${AttackTypeBoosterItem[moveType]?.toLowerCase()}`,
(_type, args) => new AttackTypeBoosterModifier(this, (args[0] as Pokemon).id, moveType, boostPercent)); (_type, args) => new AttackTypeBoosterModifier(this, (args[0] as Pokemon).id, moveType, boostPercent));
@ -598,7 +598,7 @@ export class AttackTypeBoosterModifierType extends PokemonHeldItemModifierType i
getDescription(): string { getDescription(): string {
// TODO: Need getTypeName? // TODO: Need getTypeName?
return i18next.t("modifierType:ModifierType.AttackTypeBoosterModifierType.description", { moveType: i18next.t(`pokemonInfo:Type.${Type[this.moveType]}`) }); return i18next.t("modifierType:ModifierType.AttackTypeBoosterModifierType.description", { moveType: i18next.t(`pokemonInfo:Type.${PokemonType[this.moveType]}`) });
} }
getPregenArgs(): any[] { getPregenArgs(): any[] {
@ -841,7 +841,7 @@ export class TmModifierType extends PokemonModifierType {
public moveId: Moves; public moveId: Moves;
constructor(moveId: Moves) { constructor(moveId: Moves) {
super("", `tm_${Type[allMoves[moveId].type].toLowerCase()}`, (_type, args) => new TmModifier(this, (args[0] as PlayerPokemon).id), super("", `tm_${PokemonType[allMoves[moveId].type].toLowerCase()}`, (_type, args) => new TmModifier(this, (args[0] as PlayerPokemon).id),
(pokemon: PlayerPokemon) => { (pokemon: PlayerPokemon) => {
if (pokemon.compatibleTms.indexOf(moveId) === -1 || pokemon.getMoveset().filter(m => m?.moveId === moveId).length) { if (pokemon.compatibleTms.indexOf(moveId) === -1 || pokemon.getMoveset().filter(m => m?.moveId === moveId).length) {
return PartyUiHandler.NoEffectMessage; return PartyUiHandler.NoEffectMessage;
@ -955,8 +955,8 @@ export class FusePokemonModifierType extends PokemonModifierType {
class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator { class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator {
constructor() { constructor() {
super((party: Pokemon[], pregenArgs?: any[]) => { super((party: Pokemon[], pregenArgs?: any[]) => {
if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in Type)) { if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in PokemonType)) {
return new AttackTypeBoosterModifierType(pregenArgs[0] as Type, 20); return new AttackTypeBoosterModifierType(pregenArgs[0] as PokemonType, 20);
} }
const attackMoveTypes = party.map(p => p.getMoveset().map(m => m?.getMove()).filter(m => m instanceof AttackMove).map(m => m.type)).flat(); const attackMoveTypes = party.map(p => p.getMoveset().map(m => m?.getMove()).filter(m => m instanceof AttackMove).map(m => m.type)).flat();
@ -964,7 +964,7 @@ class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator {
return null; return null;
} }
const attackMoveTypeWeights = new Map<Type, number>(); const attackMoveTypeWeights = new Map<PokemonType, number>();
let totalWeight = 0; let totalWeight = 0;
for (const t of attackMoveTypes) { for (const t of attackMoveTypes) {
if (attackMoveTypeWeights.has(t)) { if (attackMoveTypeWeights.has(t)) {
@ -983,7 +983,7 @@ class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator {
return null; return null;
} }
let type: Type; let type: PokemonType;
const randInt = randSeedInt(totalWeight); const randInt = randSeedInt(totalWeight);
let weight = 0; let weight = 0;
@ -1366,7 +1366,7 @@ export type GeneratorModifierOverride = {
} }
| { | {
name: keyof Pick<typeof modifierTypes, "ATTACK_TYPE_BOOSTER" | "TERA_SHARD">; name: keyof Pick<typeof modifierTypes, "ATTACK_TYPE_BOOSTER" | "TERA_SHARD">;
type?: Type; type?: PokemonType;
} }
| { | {
name: keyof Pick<typeof modifierTypes, "BERRY">; name: keyof Pick<typeof modifierTypes, "BERRY">;
@ -1473,25 +1473,25 @@ export const modifierTypes = {
}), }),
TERA_SHARD: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => { TERA_SHARD: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => {
if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in Type)) { if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in PokemonType)) {
return new TerastallizeModifierType(pregenArgs[0] as Type); return new TerastallizeModifierType(pregenArgs[0] as PokemonType);
} }
if (!globalScene.getModifiers(TerastallizeAccessModifier).length) { if (!globalScene.getModifiers(TerastallizeAccessModifier).length) {
return null; return null;
} }
const teraTypes: Type[] = []; const teraTypes: PokemonType[] = [];
party.forEach(p => { party.forEach(p => {
if (!(p.hasSpecies(Species.TERAPAGOS) || p.hasSpecies(Species.OGERPON) || p.hasSpecies(Species.SHEDINJA))) { if (!(p.hasSpecies(Species.TERAPAGOS) || p.hasSpecies(Species.OGERPON) || p.hasSpecies(Species.SHEDINJA))) {
teraTypes.push(p.teraType); teraTypes.push(p.teraType);
} }
}); });
let excludedType = Type.UNKNOWN; let excludedType = PokemonType.UNKNOWN;
if (teraTypes.length > 0 && teraTypes.filter(t => t === teraTypes[0]).length === teraTypes.length) { if (teraTypes.length > 0 && teraTypes.filter(t => t === teraTypes[0]).length === teraTypes.length) {
excludedType = teraTypes[0]; excludedType = teraTypes[0];
} }
let shardType = randSeedInt(64) ? randSeedInt(18) as Type : Type.STELLAR; let shardType = randSeedInt(64) ? randSeedInt(18) as PokemonType : PokemonType.STELLAR;
while (shardType === excludedType) { while (shardType === excludedType) {
shardType = randSeedInt(64) ? randSeedInt(18) as Type : Type.STELLAR; shardType = randSeedInt(64) ? randSeedInt(18) as PokemonType : PokemonType.STELLAR;
} }
return new TerastallizeModifierType(shardType); return new TerastallizeModifierType(shardType);
}), }),

View File

@ -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/move"; 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";
@ -24,7 +24,7 @@ import type { PokeballType } from "#enums/pokeball";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { type PermanentStat, type TempBattleStat, BATTLE_STATS, Stat, TEMP_BATTLE_STATS } from "#enums/stat"; import { type PermanentStat, type TempBattleStat, BATTLE_STATS, Stat, TEMP_BATTLE_STATS } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import type { Type } from "#enums/type"; import type { PokemonType } from "#enums/pokemon-type";
import i18next from "i18next"; import i18next from "i18next";
import { type DoubleBattleChanceBoosterModifierType, type EvolutionItemModifierType, type FormChangeItemModifierType, type ModifierOverride, type ModifierType, type PokemonBaseStatTotalModifierType, type PokemonExpBoosterModifierType, type PokemonFriendshipBoosterModifierType, type PokemonMoveAccuracyBoosterModifierType, type PokemonMultiHitModifierType, type TerastallizeModifierType, type TmModifierType, getModifierType, ModifierPoolType, ModifierTypeGenerator, modifierTypes, PokemonHeldItemModifierType } from "./modifier-type"; import { type DoubleBattleChanceBoosterModifierType, type EvolutionItemModifierType, type FormChangeItemModifierType, type ModifierOverride, type ModifierType, type PokemonBaseStatTotalModifierType, type PokemonExpBoosterModifierType, type PokemonFriendshipBoosterModifierType, type PokemonMoveAccuracyBoosterModifierType, type PokemonMultiHitModifierType, type TerastallizeModifierType, type TmModifierType, getModifierType, ModifierPoolType, ModifierTypeGenerator, modifierTypes, PokemonHeldItemModifierType } from "./modifier-type";
import { Color, ShadowColor } from "#enums/color"; import { Color, ShadowColor } from "#enums/color";
@ -1372,10 +1372,10 @@ export class SpeciesCritBoosterModifier extends CritBoosterModifier {
* Applies Specific Type item boosts (e.g., Magnet) * Applies Specific Type item boosts (e.g., Magnet)
*/ */
export class AttackTypeBoosterModifier extends PokemonHeldItemModifier { export class AttackTypeBoosterModifier extends PokemonHeldItemModifier {
public moveType: Type; public moveType: PokemonType;
private boostMultiplier: number; private boostMultiplier: number;
constructor(type: ModifierType, pokemonId: number, moveType: Type, boostPercent: number, stackCount?: number) { constructor(type: ModifierType, pokemonId: number, moveType: PokemonType, boostPercent: number, stackCount?: number) {
super(type, pokemonId, stackCount); super(type, pokemonId, stackCount);
this.moveType = moveType; this.moveType = moveType;
@ -1402,22 +1402,22 @@ export class AttackTypeBoosterModifier extends PokemonHeldItemModifier {
/** /**
* Checks if {@linkcode AttackTypeBoosterModifier} should be applied * Checks if {@linkcode AttackTypeBoosterModifier} should be applied
* @param pokemon the {@linkcode Pokemon} that holds the held item * @param pokemon the {@linkcode Pokemon} that holds the held item
* @param moveType the {@linkcode Type} of the move being used * @param moveType the {@linkcode PokemonType} of the move being used
* @param movePower the {@linkcode NumberHolder} that holds the power of the move * @param movePower the {@linkcode NumberHolder} that holds the power of the move
* @returns `true` if boosts should be applied to the move. * @returns `true` if boosts should be applied to the move.
*/ */
override shouldApply(pokemon?: Pokemon, moveType?: Type, movePower?: NumberHolder): boolean { override shouldApply(pokemon?: Pokemon, moveType?: PokemonType, movePower?: NumberHolder): boolean {
return super.shouldApply(pokemon, moveType, movePower) && typeof moveType === "number" && movePower instanceof NumberHolder; return super.shouldApply(pokemon, moveType, movePower) && typeof moveType === "number" && movePower instanceof NumberHolder;
} }
/** /**
* Applies {@linkcode AttackTypeBoosterModifier} * Applies {@linkcode AttackTypeBoosterModifier}
* @param pokemon {@linkcode Pokemon} that holds the held item * @param pokemon {@linkcode Pokemon} that holds the held item
* @param moveType {@linkcode Type} of the move being used * @param moveType {@linkcode PokemonType} of the move being used
* @param movePower {@linkcode NumberHolder} that holds the power of the move * @param movePower {@linkcode NumberHolder} that holds the power of the move
* @returns `true` if boosts have been applied to the move. * @returns `true` if boosts have been applied to the move.
*/ */
override apply(_pokemon: Pokemon, moveType: Type, movePower: NumberHolder): boolean { override apply(_pokemon: Pokemon, moveType: PokemonType, movePower: NumberHolder): boolean {
if (moveType === this.moveType && movePower.value >= 1) { if (moveType === this.moveType && movePower.value >= 1) {
(movePower as NumberHolder).value = Math.floor((movePower as NumberHolder).value * (1 + (this.getStackCount() * this.boostMultiplier))); (movePower as NumberHolder).value = Math.floor((movePower as NumberHolder).value * (1 + (this.getStackCount() * this.boostMultiplier)));
return true; return true;
@ -1957,9 +1957,9 @@ export abstract class ConsumablePokemonModifier extends ConsumableModifier {
export class TerrastalizeModifier extends ConsumablePokemonModifier { export class TerrastalizeModifier extends ConsumablePokemonModifier {
public override type: TerastallizeModifierType; public override type: TerastallizeModifierType;
public teraType: Type; public teraType: PokemonType;
constructor(type: TerastallizeModifierType, pokemonId: number, teraType: Type) { constructor(type: TerastallizeModifierType, pokemonId: number, teraType: PokemonType) {
super(type, pokemonId); super(type, pokemonId);
this.teraType = teraType; this.teraType = teraType;

View File

@ -1,22 +1,33 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/consistent-type-imports */ /* eslint-disable @typescript-eslint/consistent-type-imports */
import { type PokeballCounts } from "#app/battle-scene"; import { type PokeballCounts } from "#app/battle-scene";
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 { Variant } from "#app/data/variant"; import { Variant } from "#app/data/variant";
import { type ModifierOverride } from "#app/modifier/modifier-type"; import { type ModifierOverride } from "#app/modifier/modifier-type";
import { Unlockables } from "#app/system/unlockables"; import { Unlockables } from "#app/system/unlockables";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { BerryType } from "#enums/berry-type";
import { Biome } from "#enums/biome"; import { Biome } from "#enums/biome";
import { EggTier } from "#enums/egg-type"; import { EggTier } from "#enums/egg-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { PokeballType } from "#enums/pokeball"; import { PokeballType } from "#enums/pokeball";
import { PokemonType } from "#enums/pokemon-type";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import { TimeOfDay } from "#enums/time-of-day"; import { TimeOfDay } from "#enums/time-of-day";
import { VariantTier } from "#enums/variant-tier"; import { VariantTier } from "#enums/variant-tier";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
/**
* This comment block exists to prevent IDEs from automatically removing unused imports
* {@linkcode BerryType}, {@linkcode EvolutionItem}, {@linkcode FormChangeItem}
* {@linkcode Stat}, {@linkcode PokemonType}
*/
/** /**
* Overrides that are using when testing different in game situations * Overrides that are using when testing different in game situations
* *

View File

@ -3,8 +3,8 @@ import type { TurnCommand } from "#app/battle";
import { BattleType } from "#app/battle"; import { BattleType } from "#app/battle";
import type { EncoreTag } from "#app/data/battler-tags"; import type { EncoreTag } from "#app/data/battler-tags";
import { TrappedTag } from "#app/data/battler-tags"; import { TrappedTag } from "#app/data/battler-tags";
import type { MoveTargetSet } from "#app/data/move"; import type { MoveTargetSet } from "#app/data/moves/move";
import { getMoveTargets } from "#app/data/move"; import { getMoveTargets } from "#app/data/moves/move";
import { speciesStarterCosts } from "#app/data/balance/starters"; import { speciesStarterCosts } from "#app/data/balance/starters";
import { Abilities } from "#app/enums/abilities"; import { Abilities } from "#app/enums/abilities";
import { BattlerTagType } from "#app/enums/battler-tag-type"; import { BattlerTagType } from "#app/enums/battler-tag-type";

View File

@ -5,7 +5,7 @@ import { applyPostFaintAbAttrs, applyPostKnockOutAbAttrs, applyPostVictoryAbAttr
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 { allMoves, PostVictoryStatStageChangeAttr } from "#app/data/move"; import { allMoves, PostVictoryStatStageChangeAttr } from "#app/data/moves/move";
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";

View File

@ -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/move"; import type Move from "#app/data/moves/move";
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,6 +1,6 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { initMoveAnim, loadMoveAnimAssets, MoveAnim } from "#app/data/battle-anims"; import { initMoveAnim, loadMoveAnimAssets, MoveAnim } from "#app/data/battle-anims";
import { allMoves, SelfStatusMove } from "#app/data/move"; import { allMoves, SelfStatusMove } from "#app/data/moves/move";
import { Moves } from "#app/enums/moves"; import { Moves } from "#app/enums/moves";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { BattlePhase } from "./battle-phase"; import { BattlePhase } from "./battle-phase";

View File

@ -1,7 +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 { MoveChargeAnim } from "#app/data/battle-anims"; import { MoveChargeAnim } from "#app/data/battle-anims";
import { applyMoveChargeAttrs, MoveEffectAttr, InstantChargeAttr } from "#app/data/move"; import { applyMoveChargeAttrs, MoveEffectAttr, InstantChargeAttr } from "#app/data/moves/move";
import type { PokemonMove } from "#app/field/pokemon"; 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";

View File

@ -25,7 +25,7 @@ import {
SubstituteTag, SubstituteTag,
} from "#app/data/battler-tags"; } from "#app/data/battler-tags";
import type { import type {
MoveAttr } from "#app/data/move"; MoveAttr } from "#app/data/moves/move";
import { import {
applyFilteredMoveAttrs, applyFilteredMoveAttrs,
applyMoveAttrs, applyMoveAttrs,
@ -35,20 +35,20 @@ import {
getMoveTargets, getMoveTargets,
HitsTagAttr, HitsTagAttr,
MissEffectAttr, MissEffectAttr,
MoveCategory,
MoveEffectAttr, MoveEffectAttr,
MoveEffectTrigger,
MoveFlags,
MoveTarget,
MultiHitAttr, MultiHitAttr,
NoEffectAttr, NoEffectAttr,
OneHitKOAttr, OneHitKOAttr,
OverrideMoveEffectAttr, OverrideMoveEffectAttr,
ToxicAccuracyAttr, ToxicAccuracyAttr,
VariableTargetAttr, VariableTargetAttr,
} from "#app/data/move"; } from "#app/data/moves/move";
import { MoveEffectTrigger } from "#enums/MoveEffectTrigger";
import { MoveFlags } from "#enums/MoveFlags";
import { MoveTarget } from "#enums/MoveTarget";
import { MoveCategory } from "#enums/MoveCategory";
import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms"; import { SpeciesFormChangePostMoveTrigger } from "#app/data/pokemon-forms";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { PokemonMove } from "#app/field/pokemon"; import { PokemonMove } from "#app/field/pokemon";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
import { HitResult, MoveResult } from "#app/field/pokemon"; import { HitResult, MoveResult } from "#app/field/pokemon";
@ -671,7 +671,7 @@ export class MoveEffectPhase extends PokemonPhase {
if (user.hasAbilityWithAttr(AlwaysHitAbAttr) || target.hasAbilityWithAttr(AlwaysHitAbAttr)) { if (user.hasAbilityWithAttr(AlwaysHitAbAttr) || target.hasAbilityWithAttr(AlwaysHitAbAttr)) {
return true; return true;
} }
if ((this.move.getMove().hasAttr(ToxicAccuracyAttr) && user.isOfType(Type.POISON))) { if ((this.move.getMove().hasAttr(ToxicAccuracyAttr) && user.isOfType(PokemonType.POISON))) {
return true; return true;
} }
// TODO: Fix lock on / mind reader check. // TODO: Fix lock on / mind reader check.

View File

@ -1,4 +1,4 @@
import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/move"; import { applyMoveAttrs, MoveHeaderAttr } from "#app/data/moves/move";
import type { PokemonMove } from "#app/field/pokemon"; 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";

View File

@ -23,14 +23,14 @@ import {
DelayedAttackAttr, DelayedAttackAttr,
frenzyMissFunc, frenzyMissFunc,
HealStatusEffectAttr, HealStatusEffectAttr,
MoveFlags,
PreMoveMessageAttr, PreMoveMessageAttr,
PreUseInterruptAttr, PreUseInterruptAttr,
} from "#app/data/move"; } from "#app/data/moves/move";
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 { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { getTerrainBlockMessage } 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/field/pokemon"; import type { PokemonMove } from "#app/field/pokemon";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";
@ -342,9 +342,10 @@ export class MovePhase extends BattlePhase {
* TODO: is this sustainable? * TODO: is this sustainable?
*/ */
let failedDueToTerrain: boolean = false; let failedDueToTerrain: boolean = false;
let failedDueToWeather: boolean = false;
if (success) { if (success) {
const passesConditions = move.applyConditions(this.pokemon, targets[0], move); const passesConditions = move.applyConditions(this.pokemon, targets[0], move);
const failedDueToWeather: boolean = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move); failedDueToWeather = globalScene.arena.isMoveWeatherCancelled(this.pokemon, move);
failedDueToTerrain = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move); failedDueToTerrain = globalScene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, move);
success = passesConditions && !failedDueToWeather && !failedDueToTerrain; success = passesConditions && !failedDueToWeather && !failedDueToTerrain;
} }
@ -381,6 +382,8 @@ export class MovePhase extends BattlePhase {
failedText = failureMessage; failedText = failureMessage;
} else if (failedDueToTerrain) { } else if (failedDueToTerrain) {
failedText = getTerrainBlockMessage(targets[0], globalScene.arena.getTerrainType()); failedText = getTerrainBlockMessage(targets[0], globalScene.arena.getTerrainType());
} else if (failedDueToWeather) {
failedText = getWeatherBlockMessage(globalScene.arena.getWeatherType());
} }
this.showFailedText(failedText); this.showFailedText(failedText);
@ -466,7 +469,7 @@ export class MovePhase extends BattlePhase {
// TODO: don't hardcode this interaction. // TODO: don't hardcode this interaction.
// Handle interaction between the rage powder center-of-attention tag and moves used by grass types/overcoat-havers (which are immune to RP's redirect) // Handle interaction between the rage powder center-of-attention tag and moves used by grass types/overcoat-havers (which are immune to RP's redirect)
if (redirectTag && (!redirectTag.powder || (!this.pokemon.isOfType(Type.GRASS) && !this.pokemon.hasAbility(Abilities.OVERCOAT)))) { if (redirectTag && (!redirectTag.powder || (!this.pokemon.isOfType(PokemonType.GRASS) && !this.pokemon.hasAbility(Abilities.OVERCOAT)))) {
redirectTarget.value = p.getBattlerIndex(); redirectTarget.value = p.getBattlerIndex();
redirectedByAbility = false; redirectedByAbility = false;
} }

View File

@ -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/move"; import { allMoves } from "#app/data/moves/move";
export class SelectTargetPhase extends PokemonPhase { export class SelectTargetPhase extends PokemonPhase {
constructor(fieldIndex: number) { constructor(fieldIndex: number) {

View File

@ -1,6 +1,6 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { applyPreSwitchOutAbAttrs, PostDamageForceSwitchAbAttr, PreSwitchOutAbAttr } from "#app/data/ability"; import { applyPreSwitchOutAbAttrs, PostDamageForceSwitchAbAttr, PreSwitchOutAbAttr } from "#app/data/ability";
import { allMoves, ForceSwitchOutAttr } from "#app/data/move"; import { allMoves, ForceSwitchOutAttr } from "#app/data/moves/move";
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 "#app/data/trainer-config"; import { TrainerSlot } from "#app/data/trainer-config";

View File

@ -3,7 +3,7 @@ import { getPokemonNameWithAffix } from "#app/messages";
import { BattlePhase } from "./battle-phase"; import { BattlePhase } from "./battle-phase";
import i18next from "i18next"; import i18next from "i18next";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { Type } from "#app/enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { achvs } from "#app/system/achv"; import { achvs } from "#app/system/achv";
import { SpeciesFormChangeTeraTrigger } from "#app/data/pokemon-forms"; import { SpeciesFormChangeTeraTrigger } from "#app/data/pokemon-forms";
import { CommonAnim, CommonBattleAnim } from "#app/data/battle-anims"; import { CommonAnim, CommonBattleAnim } from "#app/data/battle-anims";
@ -20,7 +20,7 @@ export class TeraPhase extends BattlePhase {
start() { start() {
super.start(); super.start();
globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.getTeraType()]}`) })); globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${PokemonType[this.pokemon.getTeraType()]}`) }));
new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => { new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => {
this.end(); this.end();
}); });
@ -39,7 +39,7 @@ export class TeraPhase extends BattlePhase {
if (this.pokemon.isPlayer()) { if (this.pokemon.isPlayer()) {
globalScene.validateAchv(achvs.TERASTALLIZE); globalScene.validateAchv(achvs.TERASTALLIZE);
if (this.pokemon.getTeraType() === Type.STELLAR) { if (this.pokemon.getTeraType() === PokemonType.STELLAR) {
globalScene.validateAchv(achvs.STELLAR_TERASTALLIZE); globalScene.validateAchv(achvs.STELLAR_TERASTALLIZE);
} }
} }

View File

@ -1,5 +1,5 @@
import { applyAbAttrs, BypassSpeedChanceAbAttr, PreventBypassSpeedChanceAbAttr } from "#app/data/ability"; import { applyAbAttrs, BypassSpeedChanceAbAttr, PreventBypassSpeedChanceAbAttr } from "#app/data/ability";
import { allMoves, MoveHeaderAttr } from "#app/data/move"; import { allMoves, MoveHeaderAttr } 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 type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";

View File

@ -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/move"; import { allMoves } from "#app/data/moves/move";
import { TrainerVariant } from "#app/field/trainer"; import { TrainerVariant } from "#app/field/trainer";
import type { Variant } from "#app/data/variant"; import type { Variant } from "#app/data/variant";
import { setSettingGamepad, SettingGamepad, settingGamepadDefaults } from "#app/system/settings/settings-gamepad"; import { setSettingGamepad, SettingGamepad, settingGamepadDefaults } from "#app/system/settings/settings-gamepad";
@ -56,7 +56,7 @@ import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
import { ArenaTrapTag } from "#app/data/arena-tag"; import { ArenaTrapTag } from "#app/data/arena-tag";
import { pokemonFormChanges } from "#app/data/pokemon-forms"; import { pokemonFormChanges } from "#app/data/pokemon-forms";
import type { Type } from "#enums/type"; import type { PokemonType } from "#enums/pokemon-type";
export const defaultStarterSpecies: Species[] = [ export const defaultStarterSpecies: Species[] = [
Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE,
@ -231,7 +231,7 @@ export interface StarterAttributes {
shiny?: boolean; shiny?: boolean;
favorite?: boolean; favorite?: boolean;
nickname?: string; nickname?: string;
tera?: Type; tera?: PokemonType;
} }
export interface StarterPreferences { export interface StarterPreferences {

View File

@ -13,7 +13,7 @@ import type { Biome } from "#enums/biome";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import type { Species } from "#enums/species"; import type { Species } from "#enums/species";
import { CustomPokemonData } from "#app/data/custom-pokemon-data"; import { CustomPokemonData } from "#app/data/custom-pokemon-data";
import type { Type } from "#app/enums/type"; import type { PokemonType } from "#enums/pokemon-type";
export default class PokemonData { export default class PokemonData {
public id: number; public id: number;
@ -46,9 +46,9 @@ export default class PokemonData {
public pokerus: boolean; public pokerus: boolean;
public usedTMs: Moves[]; public usedTMs: Moves[];
public evoCounter: number; public evoCounter: number;
public teraType: Type; public teraType: PokemonType;
public isTerastallized: boolean; public isTerastallized: boolean;
public stellarTypesBoosted: Type[]; public stellarTypesBoosted: PokemonType[];
public fusionSpecies: Species; public fusionSpecies: Species;
public fusionFormIndex: number; public fusionFormIndex: number;
@ -57,7 +57,7 @@ export default class PokemonData {
public fusionVariant: Variant; public fusionVariant: Variant;
public fusionGender: Gender; public fusionGender: Gender;
public fusionLuck: number; public fusionLuck: number;
public fusionTeraType: Type; public fusionTeraType: PokemonType;
public boss: boolean; public boss: boolean;
public bossSegments?: number; public bossSegments?: number;
@ -108,7 +108,7 @@ export default class PokemonData {
this.evoCounter = source.evoCounter ?? 0; this.evoCounter = source.evoCounter ?? 0;
} }
this.pokerus = !!source.pokerus; this.pokerus = !!source.pokerus;
this.teraType = source.teraType as Type; this.teraType = source.teraType as PokemonType;
this.isTerastallized = source.isTerastallized || false; this.isTerastallized = source.isTerastallized || false;
this.stellarTypesBoosted = source.stellarTypesBoosted || []; this.stellarTypesBoosted = source.stellarTypesBoosted || [];
@ -120,7 +120,7 @@ export default class PokemonData {
this.fusionGender = source.fusionGender; this.fusionGender = source.fusionGender;
this.fusionLuck = source.fusionLuck !== undefined ? source.fusionLuck : (source.fusionShiny ? source.fusionVariant + 1 : 0); this.fusionLuck = source.fusionLuck !== undefined ? source.fusionLuck : (source.fusionShiny ? source.fusionVariant + 1 : 0);
this.fusionCustomPokemonData = new CustomPokemonData(source.fusionCustomPokemonData); this.fusionCustomPokemonData = new CustomPokemonData(source.fusionCustomPokemonData);
this.fusionTeraType = (source.fusionTeraType ?? 0) as Type; this.fusionTeraType = (source.fusionTeraType ?? 0) as PokemonType;
this.usedTMs = source.usedTMs ?? []; this.usedTMs = source.usedTMs ?? [];
this.customPokemonData = new CustomPokemonData(source.customPokemonData); this.customPokemonData = new CustomPokemonData(source.customPokemonData);

View File

@ -2,7 +2,7 @@ import type { default as Pokemon } from "../field/pokemon";
import { addTextObject, TextStyle } from "./text"; import { addTextObject, TextStyle } from "./text";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import type Move from "#app/data/move"; import type Move from "#app/data/moves/move";
import type { BerryUsedEvent, MoveUsedEvent } from "../events/battle-scene"; import type { BerryUsedEvent, MoveUsedEvent } from "../events/battle-scene";
import { BattleSceneEventType } from "../events/battle-scene"; import { BattleSceneEventType } from "../events/battle-scene";
import { BerryType } from "#enums/berry-type"; import { BerryType } from "#enums/berry-type";

View File

@ -6,7 +6,7 @@ import { getGenderSymbol, getGenderColor, Gender } from "../data/gender";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { getTypeRgb } from "#app/data/type"; import { getTypeRgb } from "#app/data/type";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { getVariantTint } from "#app/data/variant"; import { getVariantTint } from "#app/data/variant";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import BattleFlyout from "./battle-flyout"; import BattleFlyout from "./battle-flyout";
@ -25,7 +25,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
private bossSegments: number; private bossSegments: number;
private offset: boolean; private offset: boolean;
private lastName: string | null; private lastName: string | null;
private lastTeraType: Type; private lastTeraType: PokemonType;
private lastStatus: StatusEffect; private lastStatus: StatusEffect;
private lastHp: number; private lastHp: number;
private lastMaxHp: number; private lastMaxHp: number;
@ -84,7 +84,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
this.boss = false; this.boss = false;
this.offset = false; this.offset = false;
this.lastName = null; this.lastName = null;
this.lastTeraType = Type.UNKNOWN; this.lastTeraType = PokemonType.UNKNOWN;
this.lastStatus = StatusEffect.NONE; this.lastStatus = StatusEffect.NONE;
this.lastHp = -1; this.lastHp = -1;
this.lastMaxHp = -1; this.lastMaxHp = -1;
@ -327,7 +327,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
this.teraIcon.setVisible(pokemon.isTerastallized); this.teraIcon.setVisible(pokemon.isTerastallized);
this.teraIcon.on("pointerover", () => { this.teraIcon.on("pointerover", () => {
if (pokemon.isTerastallized) { if (pokemon.isTerastallized) {
globalScene.ui.showTooltip("", i18next.t("fightUiHandler:teraHover", { type: i18next.t(`pokemonInfo:Type.${Type[this.lastTeraType]}`) })); globalScene.ui.showTooltip("", i18next.t("fightUiHandler:teraHover", { type: i18next.t(`pokemonInfo:Type.${PokemonType[this.lastTeraType]}`) }));
} }
}); });
this.teraIcon.on("pointerout", () => globalScene.ui.hideTooltip()); this.teraIcon.on("pointerout", () => globalScene.ui.hideTooltip());
@ -410,14 +410,14 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
const types = pokemon.getTypes(true); const types = pokemon.getTypes(true);
this.type1Icon.setTexture(`pbinfo_${this.player ? "player" : "enemy"}_type${types.length > 1 ? "1" : ""}`); this.type1Icon.setTexture(`pbinfo_${this.player ? "player" : "enemy"}_type${types.length > 1 ? "1" : ""}`);
this.type1Icon.setFrame(Type[types[0]].toLowerCase()); this.type1Icon.setFrame(PokemonType[types[0]].toLowerCase());
this.type2Icon.setVisible(types.length > 1); this.type2Icon.setVisible(types.length > 1);
this.type3Icon.setVisible(types.length > 2); this.type3Icon.setVisible(types.length > 2);
if (types.length > 1) { if (types.length > 1) {
this.type2Icon.setFrame(Type[types[1]].toLowerCase()); this.type2Icon.setFrame(PokemonType[types[1]].toLowerCase());
} }
if (types.length > 2) { if (types.length > 2) {
this.type3Icon.setFrame(Type[types[2]].toLowerCase()); this.type3Icon.setFrame(PokemonType[types[2]].toLowerCase());
} }
if (this.player) { if (this.player) {
@ -542,11 +542,11 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
this.genderText.setPositionRelative(this.nameText, this.nameText.displayWidth, 0); this.genderText.setPositionRelative(this.nameText, this.nameText.displayWidth, 0);
} }
const teraType = pokemon.isTerastallized ? pokemon.getTeraType() : Type.UNKNOWN; const teraType = pokemon.isTerastallized ? pokemon.getTeraType() : PokemonType.UNKNOWN;
const teraTypeUpdated = this.lastTeraType !== teraType; const teraTypeUpdated = this.lastTeraType !== teraType;
if (teraTypeUpdated) { if (teraTypeUpdated) {
this.teraIcon.setVisible(teraType !== Type.UNKNOWN); this.teraIcon.setVisible(teraType !== PokemonType.UNKNOWN);
this.teraIcon.setPositionRelative(this.nameText, this.nameText.displayWidth + this.genderText.displayWidth + 1, 2); this.teraIcon.setPositionRelative(this.nameText, this.nameText.displayWidth + this.genderText.displayWidth + 1, 2);
this.teraIcon.setTintFill(Phaser.Display.Color.GetColor(...getTypeRgb(teraType))); this.teraIcon.setTintFill(Phaser.Display.Color.GetColor(...getTypeRgb(teraType)));
this.lastTeraType = teraType; this.lastTeraType = teraType;
@ -575,14 +575,14 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
const types = pokemon.getTypes(true); const types = pokemon.getTypes(true);
this.type1Icon.setTexture(`pbinfo_${this.player ? "player" : "enemy"}_type${types.length > 1 ? "1" : ""}`); this.type1Icon.setTexture(`pbinfo_${this.player ? "player" : "enemy"}_type${types.length > 1 ? "1" : ""}`);
this.type1Icon.setFrame(Type[types[0]].toLowerCase()); this.type1Icon.setFrame(PokemonType[types[0]].toLowerCase());
this.type2Icon.setVisible(types.length > 1); this.type2Icon.setVisible(types.length > 1);
this.type3Icon.setVisible(types.length > 2); this.type3Icon.setVisible(types.length > 2);
if (types.length > 1) { if (types.length > 1) {
this.type2Icon.setFrame(Type[types[1]].toLowerCase()); this.type2Icon.setFrame(PokemonType[types[1]].toLowerCase());
} }
if (types.length > 2) { if (types.length > 2) {
this.type3Icon.setFrame(Type[types[2]].toLowerCase()); this.type3Icon.setFrame(PokemonType[types[2]].toLowerCase());
} }
const updateHpFrame = () => { const updateHpFrame = () => {

View File

@ -8,7 +8,7 @@ import { getPokemonNameWithAffix } from "#app/messages";
import { CommandPhase } from "#app/phases/command-phase"; import { CommandPhase } from "#app/phases/command-phase";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { TerastallizeAccessModifier } from "#app/modifier/modifier"; import { TerastallizeAccessModifier } from "#app/modifier/modifier";
import { Type } from "#app/enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { getTypeRgb } from "#app/data/type"; import { getTypeRgb } from "#app/data/type";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
@ -51,7 +51,7 @@ export default class CommandUiHandler extends UiHandler {
this.teraButton.setName("terrastallize-button"); this.teraButton.setName("terrastallize-button");
this.teraButton.setScale(1.3); this.teraButton.setScale(1.3);
this.teraButton.setFrame("fire"); this.teraButton.setFrame("fire");
this.teraButton.setPipeline(globalScene.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], ignoreTimeTint: true, teraColor: getTypeRgb(Type.FIRE), isTerastallized: false }); this.teraButton.setPipeline(globalScene.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], ignoreTimeTint: true, teraColor: getTypeRgb(PokemonType.FIRE), isTerastallized: false });
this.commandsContainer.add(this.teraButton); this.commandsContainer.add(this.teraButton);
for (let c = 0; c < commands.length; c++) { for (let c = 0; c < commands.length; c++) {
@ -78,7 +78,7 @@ export default class CommandUiHandler extends UiHandler {
if (this.canTera()) { if (this.canTera()) {
this.teraButton.setVisible(true); this.teraButton.setVisible(true);
this.teraButton.setFrame(Type[globalScene.getField()[this.fieldIndex].getTeraType()].toLowerCase()); this.teraButton.setFrame(PokemonType[globalScene.getField()[this.fieldIndex].getTeraType()].toLowerCase());
} else { } else {
this.teraButton.setVisible(false); this.teraButton.setVisible(false);
if (this.cursor === Command.TERA) { if (this.cursor === Command.TERA) {

View File

@ -2,12 +2,12 @@ import type { InfoToggle } from "#app/battle-scene";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { addTextObject, TextStyle } from "./text"; import { addTextObject, TextStyle } from "./text";
import { getTypeDamageMultiplierColor } from "#app/data/type"; import { getTypeDamageMultiplierColor } from "#app/data/type";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { Command } from "./command-ui-handler"; import { Command } from "./command-ui-handler";
import { Mode } from "./ui"; import { Mode } from "./ui";
import UiHandler from "./ui-handler"; import UiHandler from "./ui-handler";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { MoveCategory } from "#app/data/move"; 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/field/pokemon"; import type { PokemonMove } from "#app/field/pokemon";
@ -241,7 +241,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle {
const pokemonMove = moveset[cursor]!; // TODO: is the bang correct? const pokemonMove = moveset[cursor]!; // TODO: is the bang correct?
const moveType = pokemon.getMoveType(pokemonMove.getMove()); const moveType = pokemon.getMoveType(pokemonMove.getMove());
const textureKey = Utils.getLocalizedSpriteKey("types"); const textureKey = Utils.getLocalizedSpriteKey("types");
this.typeIcon.setTexture(textureKey, Type[moveType].toLowerCase()).setScale(0.8); this.typeIcon.setTexture(textureKey, PokemonType[moveType].toLowerCase()).setScale(0.8);
const moveCategory = pokemonMove.getMove().category; const moveCategory = pokemonMove.getMove().category;
this.moveCategoryIcon.setTexture("categories", MoveCategory[moveCategory].toLowerCase()).setScale(1.0); this.moveCategoryIcon.setTexture("categories", MoveCategory[moveCategory].toLowerCase()).setScale(1.0);

View File

@ -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 "../data/move"; import { allMoves } from "../data/moves/move";
import * as Utils from "./../utils"; import * as Utils from "./../utils";
import Overrides from "#app/overrides"; import Overrides from "#app/overrides";
import i18next from "i18next"; import i18next from "i18next";

View File

@ -3,9 +3,9 @@ import { globalScene } from "#app/global-scene";
import { TextStyle, addTextObject } from "./text"; import { TextStyle, addTextObject } from "./text";
import { addWindow } from "./ui-theme"; import { addWindow } from "./ui-theme";
import * as Utils from "../utils"; import * as Utils from "../utils";
import type Move from "../data/move"; import type Move from "../data/moves/move";
import { MoveCategory } from "../data/move"; import { MoveCategory } from "#enums/MoveCategory";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import i18next from "i18next"; import i18next from "i18next";
export interface MoveInfoOverlaySettings { export interface MoveInfoOverlaySettings {
@ -153,7 +153,7 @@ export default class MoveInfoOverlay extends Phaser.GameObjects.Container implem
this.pow.setText(move.power >= 0 ? move.power.toString() : "---"); this.pow.setText(move.power >= 0 ? move.power.toString() : "---");
this.acc.setText(move.accuracy >= 0 ? move.accuracy.toString() : "---"); this.acc.setText(move.accuracy >= 0 ? move.accuracy.toString() : "---");
this.pp.setText(move.pp >= 0 ? move.pp.toString() : "---"); this.pp.setText(move.pp >= 0 ? move.pp.toString() : "---");
this.typ.setTexture(Utils.getLocalizedSpriteKey("types"), Type[move.type].toLowerCase()); this.typ.setTexture(Utils.getLocalizedSpriteKey("types"), PokemonType[move.type].toLowerCase());
this.cat.setFrame(MoveCategory[move.category].toLowerCase()); this.cat.setFrame(MoveCategory[move.category].toLowerCase());
this.desc.setText(move?.effect || ""); this.desc.setText(move?.effect || "");

View File

@ -7,7 +7,7 @@ import MessageUiHandler from "#app/ui/message-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { PokemonFormChangeItemModifier, PokemonHeldItemModifier, SwitchEffectTransferModifier } from "#app/modifier/modifier"; import { PokemonFormChangeItemModifier, PokemonHeldItemModifier, SwitchEffectTransferModifier } from "#app/modifier/modifier";
import { allMoves, ForceSwitchOutAttr } from "#app/data/move"; import { allMoves, ForceSwitchOutAttr } from "#app/data/moves/move";
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";

View File

@ -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/move"; 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";
@ -19,7 +19,7 @@ import type PokemonSpecies from "#app/data/pokemon-species";
import { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, normalForm } from "#app/data/pokemon-species"; import { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, normalForm } from "#app/data/pokemon-species";
import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters"; import { getStarterValueFriendshipCap, speciesStarterCosts } from "#app/data/balance/starters";
import { starterPassiveAbilities } from "#app/data/balance/passives"; import { starterPassiveAbilities } from "#app/data/balance/passives";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { GameModes } from "#app/game-mode"; import { GameModes } from "#app/game-mode";
import type { DexEntry, StarterAttributes } from "#app/system/game-data"; import type { DexEntry, StarterAttributes } from "#app/system/game-data";
import { AbilityAttr, DexAttr } from "#app/system/game-data"; import { AbilityAttr, DexAttr } from "#app/system/game-data";
@ -2376,16 +2376,16 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
this.updateInstructions(); this.updateInstructions();
} }
setTypeIcons(type1: Type | null, type2: Type | null): void { setTypeIcons(type1: PokemonType | null, type2: PokemonType | null): void {
if (type1 !== null) { if (type1 !== null) {
this.type1Icon.setVisible(true); this.type1Icon.setVisible(true);
this.type1Icon.setFrame(Type[type1].toLowerCase()); this.type1Icon.setFrame(PokemonType[type1].toLowerCase());
} else { } else {
this.type1Icon.setVisible(false); this.type1Icon.setVisible(false);
} }
if (type2 !== null) { if (type2 !== null) {
this.type2Icon.setVisible(true); this.type2Icon.setVisible(true);
this.type2Icon.setFrame(Type[type2].toLowerCase()); this.type2Icon.setFrame(PokemonType[type2].toLowerCase());
} else { } else {
this.type2Icon.setVisible(false); this.type2Icon.setVisible(false);
} }

View File

@ -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/move"; 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";

View File

@ -10,7 +10,7 @@ import type PokemonSpecies from "#app/data/pokemon-species";
import { allSpecies, getPokemonSpeciesForm, getPokerusStarters, normalForm } from "#app/data/pokemon-species"; import { allSpecies, getPokemonSpeciesForm, getPokerusStarters, normalForm } from "#app/data/pokemon-species";
import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters"; import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters";
import { catchableSpecies } from "#app/data/balance/biomes"; import { catchableSpecies } from "#app/data/balance/biomes";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import type { DexAttrProps, DexEntry, StarterAttributes, StarterPreferences } from "#app/system/game-data"; import type { DexAttrProps, DexEntry, StarterAttributes, StarterPreferences } from "#app/system/game-data";
import { AbilityAttr, DexAttr, StarterPrefs } from "#app/system/game-data"; import { AbilityAttr, DexAttr, StarterPrefs } from "#app/system/game-data";
import MessageUiHandler from "#app/ui/message-ui-handler"; import MessageUiHandler from "#app/ui/message-ui-handler";
@ -35,7 +35,7 @@ import { FilterText, FilterTextRow } from "./filter-text";
import { allAbilities } from "#app/data/ability"; import { allAbilities } from "#app/data/ability";
import type { PassiveAbilities } from "#app/data/balance/passives"; import type { PassiveAbilities } from "#app/data/balance/passives";
import { starterPassiveAbilities } from "#app/data/balance/passives"; import { starterPassiveAbilities } from "#app/data/balance/passives";
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import { speciesTmMoves } from "#app/data/balance/tms"; import { speciesTmMoves } from "#app/data/balance/tms";
import { pokemonStarters } from "#app/data/balance/pokemon-evolutions"; import { pokemonStarters } from "#app/data/balance/pokemon-evolutions";
import { Biome } from "#enums/biome"; import { Biome } from "#enums/biome";
@ -287,7 +287,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
this.filterBar.addFilter(DropDownColumn.GEN, i18next.t("filterBar:genFilter"), genDropDown); this.filterBar.addFilter(DropDownColumn.GEN, i18next.t("filterBar:genFilter"), genDropDown);
// type filter // type filter
const typeKeys = Object.keys(Type).filter(v => isNaN(Number(v))); const typeKeys = Object.keys(PokemonType).filter(v => isNaN(Number(v)));
const typeOptions: DropDownOption[] = []; const typeOptions: DropDownOption[] = [];
typeKeys.forEach((type, index) => { typeKeys.forEach((type, index) => {
if (index === 0 || index === 19) { if (index === 0 || index === 19) {
@ -2032,16 +2032,16 @@ export default class PokedexUiHandler extends MessageUiHandler {
} }
setTypeIcons(type1: Type | null, type2: Type | null): void { setTypeIcons(type1: PokemonType | null, type2: PokemonType | null): void {
if (type1 !== null) { if (type1 !== null) {
this.type1Icon.setVisible(true); this.type1Icon.setVisible(true);
this.type1Icon.setFrame(Type[type1].toLowerCase()); this.type1Icon.setFrame(PokemonType[type1].toLowerCase());
} else { } else {
this.type1Icon.setVisible(false); this.type1Icon.setVisible(false);
} }
if (type2 !== null) { if (type2 !== null) {
this.type2Icon.setVisible(true); this.type2Icon.setVisible(true);
this.type2Icon.setFrame(Type[type2].toLowerCase()); this.type2Icon.setFrame(PokemonType[type2].toLowerCase());
} else { } else {
this.type2Icon.setVisible(false); this.type2Icon.setVisible(false);
} }

View File

@ -1,10 +1,10 @@
import PokemonInfoContainer from "#app/ui/pokemon-info-container"; import PokemonInfoContainer from "#app/ui/pokemon-info-container";
import { Gender } from "#app/data/gender"; import { Gender } from "#app/data/gender";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import * as Utils from "#app/utils"; import * as Utils 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/move"; 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";
@ -167,7 +167,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer {
for (let em = 0; em < 4; em++) { for (let em = 0; em < 4; em++) {
const eggMove = hasEggMoves ? allMoves[speciesEggMoves[species.speciesId][em]] : null; const eggMove = hasEggMoves ? allMoves[speciesEggMoves[species.speciesId][em]] : null;
const eggMoveUnlocked = eggMove && globalScene.gameData.starterData[species.speciesId].eggMoves & Math.pow(2, em); const eggMoveUnlocked = eggMove && globalScene.gameData.starterData[species.speciesId].eggMoves & Math.pow(2, em);
this.pokemonEggMoveBgs[em].setFrame(Type[eggMove ? eggMove.type : Type.UNKNOWN].toString().toLowerCase()); this.pokemonEggMoveBgs[em].setFrame(PokemonType[eggMove ? eggMove.type : PokemonType.UNKNOWN].toString().toLowerCase());
this.pokemonEggMoveLabels[em].setText(eggMove && eggMoveUnlocked ? eggMove.name : "???"); this.pokemonEggMoveLabels[em].setText(eggMove && eggMoveUnlocked ? eggMove.name : "???");
if (!(eggMove && hatchInfo.starterDataEntryBeforeUpdate.eggMoves & Math.pow(2, em)) && eggMoveUnlocked) { if (!(eggMove && hatchInfo.starterDataEntryBeforeUpdate.eggMoves & Math.pow(2, em)) && eggMoveUnlocked) {

View File

@ -3,7 +3,7 @@ import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; import { Gender, getGenderColor, getGenderSymbol } from "../data/gender";
import { getNatureName } from "../data/nature"; import { getNatureName } from "../data/nature";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import type Pokemon from "../field/pokemon"; import type Pokemon from "../field/pokemon";
import i18next from "i18next"; import i18next from "i18next";
import type { DexEntry, StarterDataEntry } from "../system/game-data"; import type { DexEntry, StarterDataEntry } from "../system/game-data";
@ -342,7 +342,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
for (let m = 0; m < 4; m++) { for (let m = 0; m < 4; m++) {
const move = m < pokemon.moveset.length && pokemon.moveset[m] ? pokemon.moveset[m]!.getMove() : null; const move = m < pokemon.moveset.length && pokemon.moveset[m] ? pokemon.moveset[m]!.getMove() : null;
this.pokemonMoveBgs[m].setFrame(Type[move ? move.type : Type.UNKNOWN].toString().toLowerCase()); this.pokemonMoveBgs[m].setFrame(PokemonType[move ? move.type : PokemonType.UNKNOWN].toString().toLowerCase());
this.pokemonMoveLabels[m].setText(move ? move.name : "-"); this.pokemonMoveLabels[m].setText(move ? move.name : "-");
this.pokemonMovesContainers[m].setVisible(!!move); this.pokemonMovesContainers[m].setVisible(!!move);
} }

View File

@ -15,7 +15,7 @@ import { Challenges } from "#enums/challenges";
import { getLuckString, getLuckTextTint } from "../modifier/modifier-type"; import { getLuckString, getLuckTextTint } from "../modifier/modifier-type";
import RoundRectangle from "phaser3-rex-plugins/plugins/roundrectangle"; import RoundRectangle from "phaser3-rex-plugins/plugins/roundrectangle";
import { getTypeRgb } from "#app/data/type"; import { getTypeRgb } from "#app/data/type";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { TypeColor, TypeShadow } from "#app/enums/color"; import { TypeColor, TypeShadow } from "#app/enums/color";
import { getNatureStatMultiplier, getNatureName } from "../data/nature"; import { getNatureStatMultiplier, getNatureName } from "../data/nature";
import { getVariantTint } from "#app/data/variant"; import { getVariantTint } from "#app/data/variant";
@ -569,7 +569,7 @@ export default class RunInfoUiHandler extends UiHandler {
rules.push(i18next.t(`runHistory:challengeMonoGen${this.runInfo.challenges[i].value}`)); rules.push(i18next.t(`runHistory:challengeMonoGen${this.runInfo.challenges[i].value}`));
break; break;
case Challenges.SINGLE_TYPE: case Challenges.SINGLE_TYPE:
const typeRule = Type[this.runInfo.challenges[i].value - 1]; const typeRule = PokemonType[this.runInfo.challenges[i].value - 1];
const typeTextColor = `[color=${TypeColor[typeRule]}]`; const typeTextColor = `[color=${TypeColor[typeRule]}]`;
const typeShadowColor = `[shadow=${TypeShadow[typeRule]}]`; const typeShadowColor = `[shadow=${TypeShadow[typeRule]}]`;
const typeText = typeTextColor + typeShadowColor + i18next.t(`pokemonInfo:Type.${typeRule}`)! + "[/color]" + "[/shadow]"; const typeText = typeTextColor + typeShadowColor + i18next.t(`pokemonInfo:Type.${typeRule}`)! + "[/color]" + "[/shadow]";
@ -726,7 +726,7 @@ export default class RunInfoUiHandler extends UiHandler {
moveContainer.add(moveLabel); moveContainer.add(moveLabel);
movesetContainer.add(moveContainer); movesetContainer.add(moveContainer);
const move = pokemonMoveset[m]?.getMove(); const move = pokemonMoveset[m]?.getMove();
pokemonMoveBgs[m].setFrame(Type[move ? move.type : Type.UNKNOWN].toString().toLowerCase()); pokemonMoveBgs[m].setFrame(PokemonType[move ? move.type : PokemonType.UNKNOWN].toString().toLowerCase());
pokemonMoveLabels[m].setText(move ? move.name : "-"); pokemonMoveLabels[m].setText(move ? move.name : "-");
} }

View File

@ -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/move"; 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";
@ -21,7 +21,7 @@ import { pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "#app/data/balan
import type PokemonSpecies from "#app/data/pokemon-species"; import type PokemonSpecies from "#app/data/pokemon-species";
import { allSpecies, getPokemonSpeciesForm, getPokerusStarters } from "#app/data/pokemon-species"; import { allSpecies, getPokemonSpeciesForm, getPokerusStarters } from "#app/data/pokemon-species";
import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters"; import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { GameModes } from "#app/game-mode"; import { GameModes } from "#app/game-mode";
import type { DexAttrProps, DexEntry, StarterMoveset, StarterAttributes, StarterPreferences } from "#app/system/game-data"; import type { DexAttrProps, DexEntry, StarterMoveset, StarterAttributes, StarterPreferences } from "#app/system/game-data";
import { AbilityAttr, DexAttr, StarterPrefs } from "#app/system/game-data"; import { AbilityAttr, DexAttr, StarterPrefs } from "#app/system/game-data";
@ -71,7 +71,7 @@ export interface Starter {
moveset?: StarterMoveset; moveset?: StarterMoveset;
pokerus: boolean; pokerus: boolean;
nickname?: string; nickname?: string;
teraType?: Type; teraType?: PokemonType;
} }
interface LanguageSetting { interface LanguageSetting {
@ -216,7 +216,7 @@ interface SpeciesDetails {
abilityIndex?: number, abilityIndex?: number,
natureIndex?: number, natureIndex?: number,
forSeen?: boolean, // default = false forSeen?: boolean, // default = false
teraType?: Type, teraType?: PokemonType,
} }
export default class StarterSelectUiHandler extends MessageUiHandler { export default class StarterSelectUiHandler extends MessageUiHandler {
@ -300,7 +300,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
private dexAttrCursor: bigint = 0n; private dexAttrCursor: bigint = 0n;
private abilityCursor: number = -1; private abilityCursor: number = -1;
private natureCursor: number = -1; private natureCursor: number = -1;
private teraCursor: Type = Type.UNKNOWN; private teraCursor: PokemonType = PokemonType.UNKNOWN;
private filterBarCursor: number = 0; private filterBarCursor: number = 0;
private starterMoveset: StarterMoveset | null; private starterMoveset: StarterMoveset | null;
private scrollCursor: number; private scrollCursor: number;
@ -313,7 +313,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
private starterAttr: bigint[] = []; private starterAttr: bigint[] = [];
private starterAbilityIndexes: number[] = []; private starterAbilityIndexes: number[] = [];
private starterNatures: Nature[] = []; private starterNatures: Nature[] = [];
private starterTeras: Type[] = []; private starterTeras: PokemonType[] = [];
private starterMovesets: StarterMoveset[] = []; private starterMovesets: StarterMoveset[] = [];
private speciesStarterDexEntry: DexEntry | null; private speciesStarterDexEntry: DexEntry | null;
private speciesStarterMoves: Moves[]; private speciesStarterMoves: Moves[];
@ -406,7 +406,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.filterBar.addFilter(DropDownColumn.GEN, i18next.t("filterBar:genFilter"), genDropDown); this.filterBar.addFilter(DropDownColumn.GEN, i18next.t("filterBar:genFilter"), genDropDown);
// type filter // type filter
const typeKeys = Object.keys(Type).filter(v => isNaN(Number(v))); const typeKeys = Object.keys(PokemonType).filter(v => isNaN(Number(v)));
const typeOptions: DropDownOption[] = []; const typeOptions: DropDownOption[] = [];
typeKeys.forEach((type, index) => { typeKeys.forEach((type, index) => {
if (index === 0 || index === 19) { if (index === 0 || index === 19) {
@ -2334,7 +2334,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
return [ isDupe, removeIndex ]; return [ isDupe, removeIndex ];
} }
addToParty(species: PokemonSpecies, dexAttr: bigint, abilityIndex: number, nature: Nature, moveset: StarterMoveset, teraType: Type, randomSelection: boolean = false) { addToParty(species: PokemonSpecies, dexAttr: bigint, abilityIndex: number, nature: Nature, moveset: StarterMoveset, teraType: PokemonType, randomSelection: boolean = false) {
const props = globalScene.gameData.getSpeciesDexAttrProps(species, dexAttr); const props = globalScene.gameData.getSpeciesDexAttrProps(species, dexAttr);
this.starterIcons[this.starterSpecies.length].setTexture(species.getIconAtlasKey(props.formIndex, props.shiny, props.variant)); this.starterIcons[this.starterSpecies.length].setTexture(species.getIconAtlasKey(props.formIndex, props.shiny, props.variant));
this.starterIcons[this.starterSpecies.length].setFrame(species.getIconId(props.female, props.formIndex, props.shiny, props.variant)); this.starterIcons[this.starterSpecies.length].setFrame(species.getIconId(props.female, props.formIndex, props.shiny, props.variant));
@ -2928,7 +2928,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.dexAttrCursor = species ? this.getCurrentDexProps(species.speciesId) : 0n; this.dexAttrCursor = species ? this.getCurrentDexProps(species.speciesId) : 0n;
this.abilityCursor = species ? globalScene.gameData.getStarterSpeciesDefaultAbilityIndex(species) : 0; this.abilityCursor = species ? globalScene.gameData.getStarterSpeciesDefaultAbilityIndex(species) : 0;
this.natureCursor = species ? globalScene.gameData.getSpeciesDefaultNature(species) : 0; this.natureCursor = species ? globalScene.gameData.getSpeciesDefaultNature(species) : 0;
this.teraCursor = species ? species.type1 : Type.UNKNOWN; this.teraCursor = species ? species.type1 : PokemonType.UNKNOWN;
if (!species && globalScene.ui.getTooltip().visible) { if (!species && globalScene.ui.getTooltip().visible) {
globalScene.ui.hideTooltip(); globalScene.ui.hideTooltip();
@ -3199,7 +3199,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.dexAttrCursor = 0n; this.dexAttrCursor = 0n;
this.abilityCursor = -1; this.abilityCursor = -1;
this.natureCursor = -1; this.natureCursor = -1;
this.teraCursor = Type.UNKNOWN; this.teraCursor = PokemonType.UNKNOWN;
// We will only update the sprite if there is a change to form, shiny/variant // We will only update the sprite if there is a change to form, shiny/variant
// or gender for species with gender sprite differences // or gender for species with gender sprite differences
const shouldUpdateSprite = (species?.genderDiffs && !isNullOrUndefined(female)) const shouldUpdateSprite = (species?.genderDiffs && !isNullOrUndefined(female))
@ -3483,7 +3483,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.setTypeIcons(speciesForm.type1, speciesForm.type2); this.setTypeIcons(speciesForm.type1, speciesForm.type2);
this.teraIcon.setFrame(Type[this.teraCursor].toLowerCase()); this.teraIcon.setFrame(PokemonType[this.teraCursor].toLowerCase());
this.teraIcon.setVisible(!this.statsMode && globalScene.gameData.achvUnlocks.hasOwnProperty(achvs.TERASTALLIZE.id)); this.teraIcon.setVisible(!this.statsMode && globalScene.gameData.achvUnlocks.hasOwnProperty(achvs.TERASTALLIZE.id));
} else { } else {
this.pokemonAbilityText.setText(""); this.pokemonAbilityText.setText("");
@ -3510,7 +3510,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
for (let m = 0; m < 4; m++) { for (let m = 0; m < 4; m++) {
const move = m < this.starterMoveset.length ? allMoves[this.starterMoveset[m]] : null; const move = m < this.starterMoveset.length ? allMoves[this.starterMoveset[m]] : null;
this.pokemonMoveBgs[m].setFrame(Type[move ? move.type : Type.UNKNOWN].toString().toLowerCase()); this.pokemonMoveBgs[m].setFrame(PokemonType[move ? move.type : PokemonType.UNKNOWN].toString().toLowerCase());
this.pokemonMoveLabels[m].setText(move ? move.name : "-"); this.pokemonMoveLabels[m].setText(move ? move.name : "-");
this.pokemonMoveContainers[m].setVisible(!!move); this.pokemonMoveContainers[m].setVisible(!!move);
} }
@ -3520,7 +3520,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
for (let em = 0; em < 4; em++) { for (let em = 0; em < 4; em++) {
const eggMove = hasEggMoves ? allMoves[speciesEggMoves[species.speciesId][em]] : null; const eggMove = hasEggMoves ? allMoves[speciesEggMoves[species.speciesId][em]] : null;
const eggMoveUnlocked = eggMove && globalScene.gameData.starterData[species.speciesId].eggMoves & (1 << em); const eggMoveUnlocked = eggMove && globalScene.gameData.starterData[species.speciesId].eggMoves & (1 << em);
this.pokemonEggMoveBgs[em].setFrame(Type[eggMove ? eggMove.type : Type.UNKNOWN].toString().toLowerCase()); this.pokemonEggMoveBgs[em].setFrame(PokemonType[eggMove ? eggMove.type : PokemonType.UNKNOWN].toString().toLowerCase());
this.pokemonEggMoveLabels[em].setText(eggMove && eggMoveUnlocked ? eggMove.name : "???"); this.pokemonEggMoveLabels[em].setText(eggMove && eggMoveUnlocked ? eggMove.name : "???");
} }
@ -3534,16 +3534,16 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.updateInstructions(); this.updateInstructions();
} }
setTypeIcons(type1: Type | null, type2: Type | null): void { setTypeIcons(type1: PokemonType | null, type2: PokemonType | null): void {
if (type1 !== null) { if (type1 !== null) {
this.type1Icon.setVisible(true); this.type1Icon.setVisible(true);
this.type1Icon.setFrame(Type[type1].toLowerCase()); this.type1Icon.setFrame(PokemonType[type1].toLowerCase());
} else { } else {
this.type1Icon.setVisible(false); this.type1Icon.setVisible(false);
} }
if (type2 !== null) { if (type2 !== null) {
this.type2Icon.setVisible(true); this.type2Icon.setVisible(true);
this.type2Icon.setFrame(Type[type2].toLowerCase()); this.type2Icon.setFrame(PokemonType[type2].toLowerCase());
} else { } else {
this.type2Icon.setVisible(false); this.type2Icon.setVisible(false);
} }
@ -3766,7 +3766,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
abilityIndex: thisObj.starterAbilityIndexes[i], abilityIndex: thisObj.starterAbilityIndexes[i],
passive: !(globalScene.gameData.starterData[starterSpecies.speciesId].passiveAttr ^ (PassiveAttr.ENABLED | PassiveAttr.UNLOCKED)), passive: !(globalScene.gameData.starterData[starterSpecies.speciesId].passiveAttr ^ (PassiveAttr.ENABLED | PassiveAttr.UNLOCKED)),
nature: thisObj.starterNatures[i] as Nature, nature: thisObj.starterNatures[i] as Nature,
teraType: thisObj.starterTeras[i] as Type, teraType: thisObj.starterTeras[i] as PokemonType,
moveset: thisObj.starterMovesets[i], moveset: thisObj.starterMovesets[i],
pokerus: thisObj.pokerusSpecies.includes(starterSpecies), pokerus: thisObj.pokerusSpecies.includes(starterSpecies),
nickname: thisObj.starterPreferences[starterSpecies.speciesId]?.nickname, nickname: thisObj.starterPreferences[starterSpecies.speciesId]?.nickname,

View File

@ -7,10 +7,10 @@ import type { PlayerPokemon, PokemonMove } from "#app/field/pokemon";
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";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag } from "#app/ui/text"; import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag } from "#app/ui/text";
import type Move from "#app/data/move"; import type Move from "#app/data/moves/move";
import { MoveCategory } from "#app/data/move"; import { MoveCategory } from "#enums/MoveCategory";
import { getPokeballAtlasKey } from "#app/data/pokeball"; import { getPokeballAtlasKey } from "#app/data/pokeball";
import { getGenderColor, getGenderSymbol } from "#app/data/gender"; import { getGenderColor, getGenderSymbol } from "#app/data/gender";
import { getLevelRelExp, getLevelTotalExp } from "#app/data/exp"; import { getLevelRelExp, getLevelTotalExp } from "#app/data/exp";
@ -765,10 +765,10 @@ export default class SummaryUiHandler extends UiHandler {
typeLabel.setOrigin(0, 0); typeLabel.setOrigin(0, 0);
profileContainer.add(typeLabel); profileContainer.add(typeLabel);
const getTypeIcon = (index: number, type: Type, tera: boolean = false) => { const getTypeIcon = (index: number, type: PokemonType, tera: boolean = false) => {
const xCoord = typeLabel.width * typeLabel.scale + 9 + 34 * index; const xCoord = typeLabel.width * typeLabel.scale + 9 + 34 * index;
const typeIcon = !tera const typeIcon = !tera
? globalScene.add.sprite(xCoord, 42, Utils.getLocalizedSpriteKey("types"), Type[type].toLowerCase()) ? globalScene.add.sprite(xCoord, 42, Utils.getLocalizedSpriteKey("types"), PokemonType[type].toLowerCase())
: globalScene.add.sprite(xCoord, 42, "type_tera"); : globalScene.add.sprite(xCoord, 42, "type_tera");
if (tera) { if (tera) {
typeIcon.setScale(0.5); typeIcon.setScale(0.5);
@ -799,7 +799,7 @@ export default class SummaryUiHandler extends UiHandler {
if (globalScene.gameData.achvUnlocks.hasOwnProperty(achvs.TERASTALLIZE.id) && !Utils.isNullOrUndefined(this.pokemon)) { if (globalScene.gameData.achvUnlocks.hasOwnProperty(achvs.TERASTALLIZE.id) && !Utils.isNullOrUndefined(this.pokemon)) {
const teraIcon = globalScene.add.sprite(123, 26, "button_tera"); const teraIcon = globalScene.add.sprite(123, 26, "button_tera");
teraIcon.setName("terrastallize-icon"); teraIcon.setName("terrastallize-icon");
teraIcon.setFrame(Type[this.pokemon.getTeraType()].toLowerCase()); teraIcon.setFrame(PokemonType[this.pokemon.getTeraType()].toLowerCase());
profileContainer.add(teraIcon); profileContainer.add(teraIcon);
} }
@ -1010,7 +1010,7 @@ export default class SummaryUiHandler extends UiHandler {
if (this.newMove && this.pokemon) { if (this.newMove && this.pokemon) {
const spriteKey = Utils.getLocalizedSpriteKey("types"); const spriteKey = Utils.getLocalizedSpriteKey("types");
const moveType = this.pokemon.getMoveType(this.newMove); const moveType = this.pokemon.getMoveType(this.newMove);
const newMoveTypeIcon = globalScene.add.sprite(0, 0, spriteKey, Type[moveType].toLowerCase()); const newMoveTypeIcon = globalScene.add.sprite(0, 0, spriteKey, PokemonType[moveType].toLowerCase());
newMoveTypeIcon.setOrigin(0, 1); newMoveTypeIcon.setOrigin(0, 1);
this.extraMoveRowContainer.add(newMoveTypeIcon); this.extraMoveRowContainer.add(newMoveTypeIcon);
} }
@ -1035,7 +1035,7 @@ export default class SummaryUiHandler extends UiHandler {
if (move && this.pokemon) { if (move && this.pokemon) {
const spriteKey = Utils.getLocalizedSpriteKey("types"); const spriteKey = Utils.getLocalizedSpriteKey("types");
const moveType = this.pokemon.getMoveType(move.getMove()); const moveType = this.pokemon.getMoveType(move.getMove());
const typeIcon = globalScene.add.sprite(0, 0, spriteKey, Type[moveType].toLowerCase()); const typeIcon = globalScene.add.sprite(0, 0, spriteKey, PokemonType[moveType].toLowerCase());
typeIcon.setOrigin(0, 1); typeIcon.setOrigin(0, 1);
moveRowContainer.add(typeIcon); moveRowContainer.add(typeIcon);
} }

View File

@ -2,7 +2,7 @@ import { BattlerIndex } from "../battle";
import { Mode } from "./ui"; import { Mode } from "./ui";
import UiHandler from "./ui-handler"; import UiHandler from "./ui-handler";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { getMoveTargets } from "../data/move"; import { getMoveTargets } from "../data/moves/move";
import { Button } from "#enums/buttons"; import { Button } from "#enums/buttons";
import type { Moves } from "#enums/moves"; import type { Moves } from "#enums/moves";
import type Pokemon from "#app/field/pokemon"; import type Pokemon from "#app/field/pokemon";

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,4 +1,5 @@
import { allMoves, MultiHitAttr, MultiHitType } from "#app/data/move"; import { allMoves, MultiHitAttr } from "#app/data/moves/move";
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";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";

View File

@ -6,7 +6,8 @@ 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, MoveCategory } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import { MoveCategory } from "#enums/MoveCategory";
describe("Moves - Friend Guard", () => { describe("Moves - Friend Guard", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,6 +1,6 @@
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import { Type } from "#enums/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";
@ -54,7 +54,7 @@ describe("Abilities - Galvanize", () => {
await game.phaseInterceptor.to("BerryPhase", false); await game.phaseInterceptor.to("BerryPhase", false);
expect(playerPokemon.getMoveType).toHaveLastReturnedWith(Type.ELECTRIC); expect(playerPokemon.getMoveType).toHaveLastReturnedWith(PokemonType.ELECTRIC);
expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.EFFECTIVE); expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.EFFECTIVE);
expect(move.calculateBattlePower).toHaveReturnedWith(48); expect(move.calculateBattlePower).toHaveReturnedWith(48);
expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp());
@ -77,7 +77,7 @@ describe("Abilities - Galvanize", () => {
await game.phaseInterceptor.to("BerryPhase", false); await game.phaseInterceptor.to("BerryPhase", false);
expect(playerPokemon.getMoveType).toHaveLastReturnedWith(Type.ELECTRIC); expect(playerPokemon.getMoveType).toHaveLastReturnedWith(PokemonType.ELECTRIC);
expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.NO_EFFECT); expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.NO_EFFECT);
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
}); });
@ -96,7 +96,7 @@ describe("Abilities - Galvanize", () => {
game.move.select(Moves.REVELATION_DANCE); game.move.select(Moves.REVELATION_DANCE);
await game.phaseInterceptor.to("BerryPhase", false); await game.phaseInterceptor.to("BerryPhase", false);
expect(playerPokemon.getMoveType).not.toHaveLastReturnedWith(Type.ELECTRIC); expect(playerPokemon.getMoveType).not.toHaveLastReturnedWith(PokemonType.ELECTRIC);
expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.NO_EFFECT); expect(enemyPokemon.apply).toHaveReturnedWith(HitResult.NO_EFFECT);
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
}); });
@ -122,7 +122,7 @@ describe("Abilities - Galvanize", () => {
const enemyStartingHp = enemyPokemon.hp; const enemyStartingHp = enemyPokemon.hp;
await game.phaseInterceptor.to("MoveEffectPhase"); await game.phaseInterceptor.to("MoveEffectPhase");
expect(playerPokemon.getMoveType).toHaveLastReturnedWith(Type.ELECTRIC); expect(playerPokemon.getMoveType).toHaveLastReturnedWith(PokemonType.ELECTRIC);
expect(enemyPokemon.hp).toBeLessThan(enemyStartingHp); expect(enemyPokemon.hp).toBeLessThan(enemyStartingHp);
} }

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,5 +1,5 @@
import { ArenaTagSide } from "#app/data/arena-tag"; import { ArenaTagSide } from "#app/data/arena-tag";
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,5 +1,5 @@
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import { Type } from "#enums/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";
import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase";
@ -74,8 +74,8 @@ describe("Abilities - Libero", () => {
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
expect(leadPokemon.summonData.abilitiesApplied.filter((a) => a === Abilities.LIBERO)).toHaveLength(1); expect(leadPokemon.summonData.abilitiesApplied.filter((a) => a === Abilities.LIBERO)).toHaveLength(1);
const leadPokemonType = Type[leadPokemon.getTypes()[0]]; const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]];
const moveType = Type[allMoves[Moves.AGILITY].type]; const moveType = PokemonType[allMoves[Moves.AGILITY].type];
expect(leadPokemonType).not.toBe(moveType); expect(leadPokemonType).not.toBe(moveType);
await game.toNextTurn(); await game.toNextTurn();
@ -110,8 +110,8 @@ describe("Abilities - Libero", () => {
expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.LIBERO); expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.LIBERO);
expect(leadPokemon.getTypes()).toHaveLength(1); expect(leadPokemon.getTypes()).toHaveLength(1);
const leadPokemonType = Type[leadPokemon.getTypes()[0]], const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]],
moveType = Type[Type.FIRE]; moveType = PokemonType[PokemonType.FIRE];
expect(leadPokemonType).toBe(moveType); expect(leadPokemonType).toBe(moveType);
}, },
); );
@ -132,8 +132,8 @@ describe("Abilities - Libero", () => {
expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.LIBERO); expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.LIBERO);
expect(leadPokemon.getTypes()).toHaveLength(1); expect(leadPokemon.getTypes()).toHaveLength(1);
const leadPokemonType = Type[leadPokemon.getTypes()[0]], const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]],
moveType = Type[Type.ICE]; moveType = PokemonType[PokemonType.ICE];
expect(leadPokemonType).toBe(moveType); expect(leadPokemonType).toBe(moveType);
}, },
); );
@ -341,7 +341,7 @@ describe("Abilities - Libero", () => {
function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: Moves) { function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: Moves) {
expect(pokemon.summonData.abilitiesApplied).toContain(Abilities.LIBERO); expect(pokemon.summonData.abilitiesApplied).toContain(Abilities.LIBERO);
expect(pokemon.getTypes()).toHaveLength(1); expect(pokemon.getTypes()).toHaveLength(1);
const pokemonType = Type[pokemon.getTypes()[0]], const pokemonType = PokemonType[pokemon.getTypes()[0]],
moveType = Type[allMoves[move].type]; moveType = PokemonType[allMoves[move].type];
expect(pokemonType).toBe(moveType); expect(pokemonType).toBe(moveType);
} }

View File

@ -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/move"; 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";

View File

@ -1,7 +1,7 @@
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";
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
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 } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -38,12 +38,12 @@ describe("Abilities - Mimicry", () => {
const [ playerPokemon1, playerPokemon2 ] = game.scene.getPlayerParty(); const [ playerPokemon1, playerPokemon2 ] = game.scene.getPlayerParty();
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.toNextTurn(); await game.toNextTurn();
expect(playerPokemon1.getTypes().includes(Type.FAIRY)).toBe(true); expect(playerPokemon1.getTypes().includes(PokemonType.FAIRY)).toBe(true);
game.doSwitchPokemon(1); game.doSwitchPokemon(1);
await game.toNextTurn(); await game.toNextTurn();
expect(playerPokemon2.getTypes().includes(Type.FAIRY)).toBe(true); expect(playerPokemon2.getTypes().includes(PokemonType.FAIRY)).toBe(true);
}); });
it("Pokemon should revert back to its original, root type once terrain ends", async () => { it("Pokemon should revert back to its original, root type once terrain ends", async () => {
@ -57,7 +57,7 @@ describe("Abilities - Mimicry", () => {
game.move.select(Moves.TRANSFORM); game.move.select(Moves.TRANSFORM);
await game.forceEnemyMove(Moves.PSYCHIC_TERRAIN); await game.forceEnemyMove(Moves.PSYCHIC_TERRAIN);
await game.toNextTurn(); await game.toNextTurn();
expect(playerPokemon?.getTypes().includes(Type.PSYCHIC)).toBe(true); expect(playerPokemon?.getTypes().includes(PokemonType.PSYCHIC)).toBe(true);
if (game.scene.arena.terrain) { if (game.scene.arena.terrain) {
game.scene.arena.terrain.turnsLeft = 1; game.scene.arena.terrain.turnsLeft = 1;
@ -66,7 +66,7 @@ describe("Abilities - Mimicry", () => {
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH); await game.forceEnemyMove(Moves.SPLASH);
await game.toNextTurn(); await game.toNextTurn();
expect(playerPokemon?.getTypes().includes(Type.ELECTRIC)).toBe(true); expect(playerPokemon?.getTypes().includes(PokemonType.ELECTRIC)).toBe(true);
}); });
it("If the Pokemon is under the effect of a type-adding move and an equivalent terrain activates, the move's effect disappears", async () => { it("If the Pokemon is under the effect of a type-adding move and an equivalent terrain activates, the move's effect disappears", async () => {
@ -79,13 +79,13 @@ describe("Abilities - Mimicry", () => {
await game.forceEnemyMove(Moves.FORESTS_CURSE); await game.forceEnemyMove(Moves.FORESTS_CURSE);
await game.toNextTurn(); await game.toNextTurn();
expect(playerPokemon?.summonData.addedType).toBe(Type.GRASS); expect(playerPokemon?.summonData.addedType).toBe(PokemonType.GRASS);
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.GRASSY_TERRAIN); await game.forceEnemyMove(Moves.GRASSY_TERRAIN);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to("TurnEndPhase");
expect(playerPokemon?.summonData.addedType).toBeNull(); expect(playerPokemon?.summonData.addedType).toBeNull();
expect(playerPokemon?.getTypes().includes(Type.GRASS)).toBe(true); expect(playerPokemon?.getTypes().includes(PokemonType.GRASS)).toBe(true);
}); });
}); });

View File

@ -1,4 +1,4 @@
import { Type } from "#enums/type"; import { PokemonType } from "#enums/pokemon-type";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { toDmgValue } from "#app/utils"; import { toDmgValue } from "#app/utils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
@ -265,11 +265,11 @@ describe("Abilities - Parental Bond", () => {
expect(leadPokemon.turnData.hitCount).toBe(2); expect(leadPokemon.turnData.hitCount).toBe(2);
expect(enemyPokemon.hp).toBeGreaterThan(0); expect(enemyPokemon.hp).toBeGreaterThan(0);
expect(leadPokemon.isOfType(Type.FIRE)).toBe(true); expect(leadPokemon.isOfType(PokemonType.FIRE)).toBe(true);
await game.phaseInterceptor.to("BerryPhase", false); await game.phaseInterceptor.to("BerryPhase", false);
expect(leadPokemon.isOfType(Type.FIRE)).toBe(false); expect(leadPokemon.isOfType(PokemonType.FIRE)).toBe(false);
} }
); );

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,5 +1,5 @@
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import { Type } from "#enums/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";
import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase";
@ -74,8 +74,8 @@ describe("Abilities - Protean", () => {
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
expect(leadPokemon.summonData.abilitiesApplied.filter((a) => a === Abilities.PROTEAN)).toHaveLength(1); expect(leadPokemon.summonData.abilitiesApplied.filter((a) => a === Abilities.PROTEAN)).toHaveLength(1);
const leadPokemonType = Type[leadPokemon.getTypes()[0]]; const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]];
const moveType = Type[allMoves[Moves.AGILITY].type]; const moveType = PokemonType[allMoves[Moves.AGILITY].type];
expect(leadPokemonType).not.toBe(moveType); expect(leadPokemonType).not.toBe(moveType);
await game.toNextTurn(); await game.toNextTurn();
@ -110,8 +110,8 @@ describe("Abilities - Protean", () => {
expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.PROTEAN); expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.PROTEAN);
expect(leadPokemon.getTypes()).toHaveLength(1); expect(leadPokemon.getTypes()).toHaveLength(1);
const leadPokemonType = Type[leadPokemon.getTypes()[0]], const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]],
moveType = Type[Type.FIRE]; moveType = PokemonType[PokemonType.FIRE];
expect(leadPokemonType).toBe(moveType); expect(leadPokemonType).toBe(moveType);
}, },
); );
@ -132,8 +132,8 @@ describe("Abilities - Protean", () => {
expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.PROTEAN); expect(leadPokemon.summonData.abilitiesApplied).toContain(Abilities.PROTEAN);
expect(leadPokemon.getTypes()).toHaveLength(1); expect(leadPokemon.getTypes()).toHaveLength(1);
const leadPokemonType = Type[leadPokemon.getTypes()[0]], const leadPokemonType = PokemonType[leadPokemon.getTypes()[0]],
moveType = Type[Type.ICE]; moveType = PokemonType[PokemonType.ICE];
expect(leadPokemonType).toBe(moveType); expect(leadPokemonType).toBe(moveType);
}, },
); );
@ -341,7 +341,7 @@ describe("Abilities - Protean", () => {
function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: Moves) { function testPokemonTypeMatchesDefaultMoveType(pokemon: PlayerPokemon, move: Moves) {
expect(pokemon.summonData.abilitiesApplied).toContain(Abilities.PROTEAN); expect(pokemon.summonData.abilitiesApplied).toContain(Abilities.PROTEAN);
expect(pokemon.getTypes()).toHaveLength(1); expect(pokemon.getTypes()).toHaveLength(1);
const pokemonType = Type[pokemon.getTypes()[0]], const pokemonType = PokemonType[pokemon.getTypes()[0]],
moveType = Type[allMoves[move].type]; moveType = PokemonType[allMoves[move].type];
expect(pokemonType).toBe(moveType); expect(pokemonType).toBe(moveType);
} }

View File

@ -9,7 +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 { allMoves, RandomMoveAttr } from "#app/data/move"; import { allMoves, RandomMoveAttr } from "#app/data/moves/move";
// See also: TypeImmunityAbAttr // See also: TypeImmunityAbAttr
describe("Abilities - Sap Sipper", () => { describe("Abilities - Sap Sipper", () => {

View File

@ -4,9 +4,9 @@ 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/move"; 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/move"; import { FlinchAttr } from "#app/data/moves/move";
describe("Abilities - Serene Grace", () => { describe("Abilities - Serene Grace", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,5 +1,5 @@
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { Type } from "#app/enums/type"; import { PokemonType } from "#enums/pokemon-type";
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";
@ -7,7 +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 { allMoves, FlinchAttr } from "#app/data/move"; import { allMoves, FlinchAttr } from "#app/data/moves/move";
describe("Abilities - Sheer Force", () => { describe("Abilities - Sheer Force", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -106,7 +106,7 @@ describe("Abilities - Sheer Force", () => {
await game.move.forceHit(); await game.move.forceHit();
await game.phaseInterceptor.to("BerryPhase", false); await game.phaseInterceptor.to("BerryPhase", false);
expect(enemyPokemon?.getTypes()[0]).toBe(Type.WATER); expect(enemyPokemon?.getTypes()[0]).toBe(PokemonType.WATER);
expect(headbuttMove.calculateBattlePower).toHaveLastReturnedWith(headbuttMove.power * SHEER_FORCE_MULT); expect(headbuttMove.calculateBattlePower).toHaveLastReturnedWith(headbuttMove.power * SHEER_FORCE_MULT);
expect(headbuttFlinchAttr.getMoveChance).toHaveLastReturnedWith(0); expect(headbuttFlinchAttr.getMoveChance).toHaveLastReturnedWith(0);
}); });

View File

@ -1,5 +1,5 @@
import { allAbilities } from "#app/data/ability"; import { allAbilities } from "#app/data/ability";
import { allMoves } from "#app/data/move"; 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";

View File

@ -6,7 +6,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/move"; import { allMoves } from "#app/data/moves/move";
describe("Abilities - Supreme Overlord", () => { describe("Abilities - Supreme Overlord", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,6 +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 { allMoves, StealHeldItemChanceAttr } from "#app/data/move"; import { allMoves, StealHeldItemChanceAttr } from "#app/data/moves/move";
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";

View File

@ -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/move"; 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";

View File

@ -1,5 +1,5 @@
import { allAbilities } from "#app/data/ability"; import { allAbilities } from "#app/data/ability";
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,5 +1,5 @@
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; 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";

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; 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 { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";

View File

@ -1,4 +1,4 @@
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/moves/move";
import { StatusEffect } from "#app/enums/status-effect"; import { StatusEffect } from "#app/enums/status-effect";
import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { TurnStartPhase } from "#app/phases/turn-start-phase";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";

Some files were not shown because too many files have changed in this diff Show More