Merge branch 'beta' into substitute

This commit is contained in:
innerthunder 2024-08-06 11:30:07 -07:00
commit 1af937a845
145 changed files with 635 additions and 2369 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -205,7 +205,11 @@ export class Egg {
this._species = this.rollSpecies(scene); this._species = this.rollSpecies(scene);
} }
const pokemonSpecies = getPokemonSpecies(this._species); let pokemonSpecies = getPokemonSpecies(this._species);
// Special condition to have Phione eggs also have a chance of generating Manaphy
if (this._species === Species.PHIONE) {
pokemonSpecies = getPokemonSpecies(Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) ? Species.PHIONE : Species.MANAPHY);
}
// Sets the hidden ability if a hidden ability exists and the override is set // Sets the hidden ability if a hidden ability exists and the override is set
// or if the same species egg hits the chance // or if the same species egg hits the chance

View File

@ -3653,6 +3653,9 @@ export class VariableAccuracyAttr extends MoveAttr {
} }
} }
/**
* Attribute used for Thunder and Hurricane that sets accuracy to 50 in sun and never miss in rain
*/
export class ThunderAccuracyAttr extends VariableAccuracyAttr { export class ThunderAccuracyAttr extends VariableAccuracyAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!user.scene.arena.weather?.isEffectSuppressed(user.scene)) { if (!user.scene.arena.weather?.isEffectSuppressed(user.scene)) {
@ -3660,7 +3663,6 @@ export class ThunderAccuracyAttr extends VariableAccuracyAttr {
const weatherType = user.scene.arena.weather?.weatherType || WeatherType.NONE; const weatherType = user.scene.arena.weather?.weatherType || WeatherType.NONE;
switch (weatherType) { switch (weatherType) {
case WeatherType.SUNNY: case WeatherType.SUNNY:
case WeatherType.SANDSTORM:
case WeatherType.HARSH_SUN: case WeatherType.HARSH_SUN:
accuracy.value = 50; accuracy.value = 50;
return true; return true;
@ -3675,6 +3677,28 @@ export class ThunderAccuracyAttr extends VariableAccuracyAttr {
} }
} }
/**
* Attribute used for Bleakwind Storm, Wildbolt Storm, and Sandsear Storm that sets accuracy to never
* miss in rain
* Springtide Storm does NOT have this property
*/
export class StormAccuracyAttr extends VariableAccuracyAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!user.scene.arena.weather?.isEffectSuppressed(user.scene)) {
const accuracy = args[0] as Utils.NumberHolder;
const weatherType = user.scene.arena.weather?.weatherType || WeatherType.NONE;
switch (weatherType) {
case WeatherType.RAIN:
case WeatherType.HEAVY_RAIN:
accuracy.value = -1;
return true;
}
}
return false;
}
}
/** /**
* Attribute used for moves which never miss * Attribute used for moves which never miss
* against Pokemon with the {@linkcode BattlerTagType.MINIMIZED} * against Pokemon with the {@linkcode BattlerTagType.MINIMIZED}
@ -8572,17 +8596,17 @@ export function initMoves() {
.attr(AddArenaTrapTagHitAttr, ArenaTagType.SPIKES) .attr(AddArenaTrapTagHitAttr, ArenaTagType.SPIKES)
.slicingMove(), .slicingMove(),
new AttackMove(Moves.BLEAKWIND_STORM, Type.FLYING, MoveCategory.SPECIAL, 100, 80, 10, 30, 0, 8) new AttackMove(Moves.BLEAKWIND_STORM, Type.FLYING, MoveCategory.SPECIAL, 100, 80, 10, 30, 0, 8)
.attr(ThunderAccuracyAttr) .attr(StormAccuracyAttr)
.attr(StatChangeAttr, BattleStat.SPD, -1) .attr(StatChangeAttr, BattleStat.SPD, -1)
.windMove() .windMove()
.target(MoveTarget.ALL_NEAR_ENEMIES), .target(MoveTarget.ALL_NEAR_ENEMIES),
new AttackMove(Moves.WILDBOLT_STORM, Type.ELECTRIC, MoveCategory.SPECIAL, 100, 80, 10, 20, 0, 8) new AttackMove(Moves.WILDBOLT_STORM, Type.ELECTRIC, MoveCategory.SPECIAL, 100, 80, 10, 20, 0, 8)
.attr(ThunderAccuracyAttr) .attr(StormAccuracyAttr)
.attr(StatusEffectAttr, StatusEffect.PARALYSIS) .attr(StatusEffectAttr, StatusEffect.PARALYSIS)
.windMove() .windMove()
.target(MoveTarget.ALL_NEAR_ENEMIES), .target(MoveTarget.ALL_NEAR_ENEMIES),
new AttackMove(Moves.SANDSEAR_STORM, Type.GROUND, MoveCategory.SPECIAL, 100, 80, 10, 20, 0, 8) new AttackMove(Moves.SANDSEAR_STORM, Type.GROUND, MoveCategory.SPECIAL, 100, 80, 10, 20, 0, 8)
.attr(ThunderAccuracyAttr) .attr(StormAccuracyAttr)
.attr(StatusEffectAttr, StatusEffect.BURN) .attr(StatusEffectAttr, StatusEffect.BURN)
.windMove() .windMove()
.target(MoveTarget.ALL_NEAR_ENEMIES), .target(MoveTarget.ALL_NEAR_ENEMIES),

View File

@ -3319,14 +3319,14 @@ export const starterPassiveAbilities = {
[Species.SQUIRTLE]: Abilities.STURDY, [Species.SQUIRTLE]: Abilities.STURDY,
[Species.CATERPIE]: Abilities.MAGICIAN, [Species.CATERPIE]: Abilities.MAGICIAN,
[Species.WEEDLE]: Abilities.TINTED_LENS, [Species.WEEDLE]: Abilities.TINTED_LENS,
[Species.PIDGEY]: Abilities.GALE_WINGS, [Species.PIDGEY]: Abilities.FLARE_BOOST,
[Species.RATTATA]: Abilities.STRONG_JAW, [Species.RATTATA]: Abilities.STRONG_JAW,
[Species.SPEAROW]: Abilities.MOXIE, [Species.SPEAROW]: Abilities.MOXIE,
[Species.EKANS]: Abilities.REGENERATOR, [Species.EKANS]: Abilities.REGENERATOR,
[Species.SANDSHREW]: Abilities.TOUGH_CLAWS, [Species.SANDSHREW]: Abilities.TOUGH_CLAWS,
[Species.NIDORAN_F]: Abilities.FLARE_BOOST, [Species.NIDORAN_F]: Abilities.FLARE_BOOST,
[Species.NIDORAN_M]: Abilities.GUTS, [Species.NIDORAN_M]: Abilities.GUTS,
[Species.VULPIX]: Abilities.SOLAR_POWER, [Species.VULPIX]: Abilities.FUR_COAT,
[Species.ZUBAT]: Abilities.INTIMIDATE, [Species.ZUBAT]: Abilities.INTIMIDATE,
[Species.ODDISH]: Abilities.TRIAGE, [Species.ODDISH]: Abilities.TRIAGE,
[Species.PARAS]: Abilities.TRIAGE, [Species.PARAS]: Abilities.TRIAGE,
@ -3345,16 +3345,16 @@ export const starterPassiveAbilities = {
[Species.PONYTA]: Abilities.MAGIC_GUARD, [Species.PONYTA]: Abilities.MAGIC_GUARD,
[Species.SLOWPOKE]: Abilities.UNAWARE, [Species.SLOWPOKE]: Abilities.UNAWARE,
[Species.MAGNEMITE]: Abilities.LEVITATE, [Species.MAGNEMITE]: Abilities.LEVITATE,
[Species.FARFETCHD]: Abilities.HUGE_POWER, [Species.FARFETCHD]: Abilities.SNIPER,
[Species.DODUO]: Abilities.PARENTAL_BOND, [Species.DODUO]: Abilities.PARENTAL_BOND,
[Species.SEEL]: Abilities.WATER_BUBBLE, [Species.SEEL]: Abilities.WATER_BUBBLE,
[Species.GRIMER]: Abilities.WATER_ABSORB, [Species.GRIMER]: Abilities.WATER_ABSORB,
[Species.SHELLDER]: Abilities.ICE_SCALES, [Species.SHELLDER]: Abilities.ICE_SCALES,
[Species.GASTLY]: Abilities.SHADOW_SHIELD, [Species.GASTLY]: Abilities.SHADOW_SHIELD,
[Species.ONIX]: Abilities.ROCKY_PAYLOAD, [Species.ONIX]: Abilities.ROCKY_PAYLOAD,
[Species.DROWZEE]: Abilities.BAD_DREAMS, [Species.DROWZEE]: Abilities.MAGICIAN,
[Species.KRABBY]: Abilities.UNBURDEN, [Species.KRABBY]: Abilities.UNBURDEN,
[Species.VOLTORB]: Abilities.ELECTRIC_SURGE, [Species.VOLTORB]: Abilities.TRANSISTOR,
[Species.EXEGGCUTE]: Abilities.RIPEN, [Species.EXEGGCUTE]: Abilities.RIPEN,
[Species.CUBONE]: Abilities.PARENTAL_BOND, [Species.CUBONE]: Abilities.PARENTAL_BOND,
[Species.LICKITUNG]: Abilities.THICK_FAT, [Species.LICKITUNG]: Abilities.THICK_FAT,
@ -3374,7 +3374,7 @@ export const starterPassiveAbilities = {
[Species.EEVEE]: Abilities.SIMPLE, [Species.EEVEE]: Abilities.SIMPLE,
[Species.PORYGON]: Abilities.PROTEAN, [Species.PORYGON]: Abilities.PROTEAN,
[Species.OMANYTE]: Abilities.STURDY, [Species.OMANYTE]: Abilities.STURDY,
[Species.KABUTO]: Abilities.SHARPNESS, [Species.KABUTO]: Abilities.TOUGH_CLAWS,
[Species.AERODACTYL]: Abilities.ORICHALCUM_PULSE, [Species.AERODACTYL]: Abilities.ORICHALCUM_PULSE,
[Species.ARTICUNO]: Abilities.SNOW_WARNING, [Species.ARTICUNO]: Abilities.SNOW_WARNING,
[Species.ZAPDOS]: Abilities.DRIZZLE, [Species.ZAPDOS]: Abilities.DRIZZLE,
@ -3476,7 +3476,7 @@ export const starterPassiveAbilities = {
[Species.CACNEA]: Abilities.SAND_RUSH, [Species.CACNEA]: Abilities.SAND_RUSH,
[Species.SWABLU]: Abilities.ADAPTABILITY, [Species.SWABLU]: Abilities.ADAPTABILITY,
[Species.ZANGOOSE]: Abilities.POISON_HEAL, [Species.ZANGOOSE]: Abilities.POISON_HEAL,
[Species.SEVIPER]: Abilities.INTIMIDATE, [Species.SEVIPER]: Abilities.MULTISCALE,
[Species.LUNATONE]: Abilities.SHADOW_SHIELD, [Species.LUNATONE]: Abilities.SHADOW_SHIELD,
[Species.SOLROCK]: Abilities.DROUGHT, [Species.SOLROCK]: Abilities.DROUGHT,
[Species.BARBOACH]: Abilities.SIMPLE, [Species.BARBOACH]: Abilities.SIMPLE,
@ -3495,16 +3495,16 @@ export const starterPassiveAbilities = {
[Species.SNORUNT]: Abilities.SNOW_WARNING, [Species.SNORUNT]: Abilities.SNOW_WARNING,
[Species.SPHEAL]: Abilities.UNAWARE, [Species.SPHEAL]: Abilities.UNAWARE,
[Species.CLAMPERL]: Abilities.DRIZZLE, [Species.CLAMPERL]: Abilities.DRIZZLE,
[Species.RELICANTH]: Abilities.SOLID_ROCK, [Species.RELICANTH]: Abilities.PRIMORDIAL_SEA,
[Species.LUVDISC]: Abilities.MULTISCALE, [Species.LUVDISC]: Abilities.MULTISCALE,
[Species.BAGON]: Abilities.ADAPTABILITY, [Species.BAGON]: Abilities.DRAGONS_MAW,
[Species.BELDUM]: Abilities.LEVITATE, [Species.BELDUM]: Abilities.LEVITATE,
[Species.REGIROCK]: Abilities.SAND_STREAM, [Species.REGIROCK]: Abilities.SAND_STREAM,
[Species.REGICE]: Abilities.SNOW_WARNING, [Species.REGICE]: Abilities.SNOW_WARNING,
[Species.REGISTEEL]: Abilities.FILTER, [Species.REGISTEEL]: Abilities.FILTER,
[Species.LATIAS]: Abilities.SOUL_HEART, [Species.LATIAS]: Abilities.PRISM_ARMOR,
[Species.LATIOS]: Abilities.TINTED_LENS, [Species.LATIOS]: Abilities.TINTED_LENS,
[Species.KYOGRE]: Abilities.RAIN_DISH, [Species.KYOGRE]: Abilities.MOLD_BREAKER,
[Species.GROUDON]: Abilities.TURBOBLAZE, [Species.GROUDON]: Abilities.TURBOBLAZE,
[Species.RAYQUAZA]: Abilities.UNNERVE, [Species.RAYQUAZA]: Abilities.UNNERVE,
[Species.JIRACHI]: Abilities.COMATOSE, [Species.JIRACHI]: Abilities.COMATOSE,
@ -3523,7 +3523,7 @@ export const starterPassiveAbilities = {
[Species.COMBEE]: Abilities.INTIMIDATE, [Species.COMBEE]: Abilities.INTIMIDATE,
[Species.PACHIRISU]: Abilities.HONEY_GATHER, [Species.PACHIRISU]: Abilities.HONEY_GATHER,
[Species.BUIZEL]: Abilities.MOXIE, [Species.BUIZEL]: Abilities.MOXIE,
[Species.CHERUBI]: Abilities.DROUGHT, [Species.CHERUBI]: Abilities.ORICHALCUM_PULSE,
[Species.SHELLOS]: Abilities.REGENERATOR, [Species.SHELLOS]: Abilities.REGENERATOR,
[Species.DRIFLOON]: Abilities.MAGIC_GUARD, [Species.DRIFLOON]: Abilities.MAGIC_GUARD,
[Species.BUNEARY]: Abilities.ADAPTABILITY, [Species.BUNEARY]: Abilities.ADAPTABILITY,
@ -3537,13 +3537,13 @@ export const starterPassiveAbilities = {
[Species.CHATOT]: Abilities.PUNK_ROCK, [Species.CHATOT]: Abilities.PUNK_ROCK,
[Species.SPIRITOMB]: Abilities.VESSEL_OF_RUIN, [Species.SPIRITOMB]: Abilities.VESSEL_OF_RUIN,
[Species.GIBLE]: Abilities.SAND_STREAM, [Species.GIBLE]: Abilities.SAND_STREAM,
[Species.MUNCHLAX]: Abilities.RIPEN, [Species.MUNCHLAX]: Abilities.HARVEST,
[Species.RIOLU]: Abilities.MINDS_EYE, [Species.RIOLU]: Abilities.MINDS_EYE,
[Species.HIPPOPOTAS]: Abilities.UNAWARE, [Species.HIPPOPOTAS]: Abilities.UNAWARE,
[Species.SKORUPI]: Abilities.SUPER_LUCK, [Species.SKORUPI]: Abilities.SUPER_LUCK,
[Species.CROAGUNK]: Abilities.MOXIE, [Species.CROAGUNK]: Abilities.MOXIE,
[Species.CARNIVINE]: Abilities.ARENA_TRAP, [Species.CARNIVINE]: Abilities.ARENA_TRAP,
[Species.FINNEON]: Abilities.DRIZZLE, [Species.FINNEON]: Abilities.WATER_BUBBLE,
[Species.MANTYKE]: Abilities.UNAWARE, [Species.MANTYKE]: Abilities.UNAWARE,
[Species.SNOVER]: Abilities.THICK_FAT, [Species.SNOVER]: Abilities.THICK_FAT,
[Species.ROTOM]: Abilities.HADRON_ENGINE, [Species.ROTOM]: Abilities.HADRON_ENGINE,
@ -3557,7 +3557,7 @@ export const starterPassiveAbilities = {
[Species.GIRATINA]: Abilities.SHADOW_SHIELD, [Species.GIRATINA]: Abilities.SHADOW_SHIELD,
[Species.CRESSELIA]: Abilities.MAGIC_BOUNCE, [Species.CRESSELIA]: Abilities.MAGIC_BOUNCE,
[Species.PHIONE]: Abilities.SIMPLE, [Species.PHIONE]: Abilities.SIMPLE,
[Species.MANAPHY]: Abilities.SIMPLE, [Species.MANAPHY]: Abilities.PRIMORDIAL_SEA,
[Species.DARKRAI]: Abilities.UNNERVE, [Species.DARKRAI]: Abilities.UNNERVE,
[Species.SHAYMIN]: Abilities.WIND_RIDER, [Species.SHAYMIN]: Abilities.WIND_RIDER,
[Species.ARCEUS]: Abilities.ADAPTABILITY, [Species.ARCEUS]: Abilities.ADAPTABILITY,
@ -3590,13 +3590,13 @@ export const starterPassiveAbilities = {
[Species.SANDILE]: Abilities.TOUGH_CLAWS, [Species.SANDILE]: Abilities.TOUGH_CLAWS,
[Species.DARUMAKA]: Abilities.GORILLA_TACTICS, [Species.DARUMAKA]: Abilities.GORILLA_TACTICS,
[Species.MARACTUS]: Abilities.WELL_BAKED_BODY, [Species.MARACTUS]: Abilities.WELL_BAKED_BODY,
[Species.DWEBBLE]: Abilities.ANGER_SHELL, [Species.DWEBBLE]: Abilities.ROCKY_PAYLOAD,
[Species.SCRAGGY]: Abilities.PROTEAN, [Species.SCRAGGY]: Abilities.PROTEAN,
[Species.SIGILYPH]: Abilities.MAGICIAN, [Species.SIGILYPH]: Abilities.FLARE_BOOST,
[Species.YAMASK]: Abilities.PURIFYING_SALT, [Species.YAMASK]: Abilities.PURIFYING_SALT,
[Species.TIRTOUGA]: Abilities.ANGER_SHELL, [Species.TIRTOUGA]: Abilities.WATER_ABSORB,
[Species.ARCHEN]: Abilities.MULTISCALE, [Species.ARCHEN]: Abilities.MULTISCALE,
[Species.TRUBBISH]: Abilities.TOXIC_DEBRIS, [Species.TRUBBISH]: Abilities.NEUTRALIZING_GAS,
[Species.ZORUA]: Abilities.DARK_AURA, [Species.ZORUA]: Abilities.DARK_AURA,
[Species.MINCCINO]: Abilities.FUR_COAT, [Species.MINCCINO]: Abilities.FUR_COAT,
[Species.GOTHITA]: Abilities.UNNERVE, [Species.GOTHITA]: Abilities.UNNERVE,
@ -3611,7 +3611,7 @@ export const starterPassiveAbilities = {
[Species.ALOMOMOLA]: Abilities.MULTISCALE, [Species.ALOMOMOLA]: Abilities.MULTISCALE,
[Species.JOLTIK]: Abilities.TRANSISTOR, [Species.JOLTIK]: Abilities.TRANSISTOR,
[Species.FERROSEED]: Abilities.ROUGH_SKIN, [Species.FERROSEED]: Abilities.ROUGH_SKIN,
[Species.KLINK]: Abilities.STEELWORKER, [Species.KLINK]: Abilities.STEELY_SPIRIT,
[Species.TYNAMO]: Abilities.POISON_HEAL, [Species.TYNAMO]: Abilities.POISON_HEAL,
[Species.ELGYEM]: Abilities.PRISM_ARMOR, [Species.ELGYEM]: Abilities.PRISM_ARMOR,
[Species.LITWICK]: Abilities.SOUL_HEART, [Species.LITWICK]: Abilities.SOUL_HEART,
@ -3625,7 +3625,7 @@ export const starterPassiveAbilities = {
[Species.GOLETT]: Abilities.SHADOW_SHIELD, [Species.GOLETT]: Abilities.SHADOW_SHIELD,
[Species.PAWNIARD]: Abilities.SWORD_OF_RUIN, [Species.PAWNIARD]: Abilities.SWORD_OF_RUIN,
[Species.BOUFFALANT]: Abilities.ROCK_HEAD, [Species.BOUFFALANT]: Abilities.ROCK_HEAD,
[Species.RUFFLET]: Abilities.GALE_WINGS, [Species.RUFFLET]: Abilities.SPEED_BOOST,
[Species.VULLABY]: Abilities.THICK_FAT, [Species.VULLABY]: Abilities.THICK_FAT,
[Species.HEATMOR]: Abilities.CONTRARY, [Species.HEATMOR]: Abilities.CONTRARY,
[Species.DURANT]: Abilities.COMPOUND_EYES, [Species.DURANT]: Abilities.COMPOUND_EYES,
@ -3651,12 +3651,12 @@ export const starterPassiveAbilities = {
[Species.SCATTERBUG]: Abilities.PRANKSTER, [Species.SCATTERBUG]: Abilities.PRANKSTER,
[Species.LITLEO]: Abilities.BEAST_BOOST, [Species.LITLEO]: Abilities.BEAST_BOOST,
[Species.FLABEBE]: Abilities.GRASSY_SURGE, [Species.FLABEBE]: Abilities.GRASSY_SURGE,
[Species.SKIDDO]: Abilities.GRASSY_SURGE, [Species.SKIDDO]: Abilities.SEED_SOWER,
[Species.PANCHAM]: Abilities.FUR_COAT, [Species.PANCHAM]: Abilities.FUR_COAT,
[Species.FURFROU]: Abilities.FLUFFY, [Species.FURFROU]: Abilities.FLUFFY,
[Species.ESPURR]: Abilities.FUR_COAT, [Species.ESPURR]: Abilities.FUR_COAT,
[Species.HONEDGE]: Abilities.SHARPNESS, [Species.HONEDGE]: Abilities.SHARPNESS,
[Species.SPRITZEE]: Abilities.MISTY_SURGE, [Species.SPRITZEE]: Abilities.FUR_COAT,
[Species.SWIRLIX]: Abilities.WELL_BAKED_BODY, [Species.SWIRLIX]: Abilities.WELL_BAKED_BODY,
[Species.INKAY]: Abilities.UNNERVE, [Species.INKAY]: Abilities.UNNERVE,
[Species.BINACLE]: Abilities.SAP_SIPPER, [Species.BINACLE]: Abilities.SAP_SIPPER,
@ -3670,17 +3670,17 @@ export const starterPassiveAbilities = {
[Species.CARBINK]: Abilities.SOLID_ROCK, [Species.CARBINK]: Abilities.SOLID_ROCK,
[Species.GOOMY]: Abilities.REGENERATOR, [Species.GOOMY]: Abilities.REGENERATOR,
[Species.KLEFKI]: Abilities.LEVITATE, [Species.KLEFKI]: Abilities.LEVITATE,
[Species.PHANTUMP]: Abilities.RIPEN, [Species.PHANTUMP]: Abilities.SHADOW_TAG,
[Species.PUMPKABOO]: Abilities.WELL_BAKED_BODY, [Species.PUMPKABOO]: Abilities.WELL_BAKED_BODY,
[Species.BERGMITE]: Abilities.ICE_SCALES, [Species.BERGMITE]: Abilities.ICE_SCALES,
[Species.NOIBAT]: Abilities.PUNK_ROCK, [Species.NOIBAT]: Abilities.PUNK_ROCK,
[Species.XERNEAS]: Abilities.MISTY_SURGE, [Species.XERNEAS]: Abilities.HARVEST,
[Species.YVELTAL]: Abilities.SOUL_HEART, [Species.YVELTAL]: Abilities.SOUL_HEART,
[Species.ZYGARDE]: Abilities.HUGE_POWER, [Species.ZYGARDE]: Abilities.HUGE_POWER,
[Species.DIANCIE]: Abilities.LEVITATE, [Species.DIANCIE]: Abilities.LEVITATE,
[Species.HOOPA]: Abilities.OPPORTUNIST, [Species.HOOPA]: Abilities.OPPORTUNIST,
[Species.VOLCANION]: Abilities.FILTER, [Species.VOLCANION]: Abilities.FILTER,
[Species.ROWLET]: Abilities.UNBURDEN, [Species.ROWLET]: Abilities.SNIPER,
[Species.LITTEN]: Abilities.FUR_COAT, [Species.LITTEN]: Abilities.FUR_COAT,
[Species.POPPLIO]: Abilities.PUNK_ROCK, [Species.POPPLIO]: Abilities.PUNK_ROCK,
[Species.PIKIPEK]: Abilities.TECHNICIAN, [Species.PIKIPEK]: Abilities.TECHNICIAN,
@ -3714,7 +3714,7 @@ export const starterPassiveAbilities = {
[Species.BRUXISH]: Abilities.MULTISCALE, [Species.BRUXISH]: Abilities.MULTISCALE,
[Species.DRAMPA]: Abilities.THICK_FAT, [Species.DRAMPA]: Abilities.THICK_FAT,
[Species.DHELMISE]: Abilities.WATER_BUBBLE, [Species.DHELMISE]: Abilities.WATER_BUBBLE,
[Species.JANGMO_O]: Abilities.PUNK_ROCK, [Species.JANGMO_O]: Abilities.DAUNTLESS_SHIELD,
[Species.TAPU_KOKO]: Abilities.TRANSISTOR, [Species.TAPU_KOKO]: Abilities.TRANSISTOR,
[Species.TAPU_LELE]: Abilities.SHEER_FORCE, [Species.TAPU_LELE]: Abilities.SHEER_FORCE,
[Species.TAPU_BULU]: Abilities.TRIAGE, [Species.TAPU_BULU]: Abilities.TRIAGE,
@ -3726,7 +3726,7 @@ export const starterPassiveAbilities = {
[Species.XURKITREE]: Abilities.TRANSISTOR, [Species.XURKITREE]: Abilities.TRANSISTOR,
[Species.CELESTEELA]: Abilities.HEATPROOF, [Species.CELESTEELA]: Abilities.HEATPROOF,
[Species.KARTANA]: Abilities.SHARPNESS, [Species.KARTANA]: Abilities.SHARPNESS,
[Species.GUZZLORD]: Abilities.INNARDS_OUT, [Species.GUZZLORD]: Abilities.POISON_HEAL,
[Species.NECROZMA]: Abilities.BEAST_BOOST, [Species.NECROZMA]: Abilities.BEAST_BOOST,
[Species.MAGEARNA]: Abilities.STEELY_SPIRIT, [Species.MAGEARNA]: Abilities.STEELY_SPIRIT,
[Species.MARSHADOW]: Abilities.IRON_FIST, [Species.MARSHADOW]: Abilities.IRON_FIST,
@ -3738,13 +3738,13 @@ export const starterPassiveAbilities = {
[Species.GROOKEY]: Abilities.GRASS_PELT, [Species.GROOKEY]: Abilities.GRASS_PELT,
[Species.SCORBUNNY]: Abilities.NO_GUARD, [Species.SCORBUNNY]: Abilities.NO_GUARD,
[Species.SOBBLE]: Abilities.SUPER_LUCK, [Species.SOBBLE]: Abilities.SUPER_LUCK,
[Species.SKWOVET]: Abilities.RIPEN, [Species.SKWOVET]: Abilities.HARVEST,
[Species.ROOKIDEE]: Abilities.IRON_BARBS, [Species.ROOKIDEE]: Abilities.IRON_BARBS,
[Species.BLIPBUG]: Abilities.PSYCHIC_SURGE, [Species.BLIPBUG]: Abilities.PSYCHIC_SURGE,
[Species.NICKIT]: Abilities.MAGICIAN, [Species.NICKIT]: Abilities.MAGICIAN,
[Species.GOSSIFLEUR]: Abilities.GRASSY_SURGE, [Species.GOSSIFLEUR]: Abilities.GRASSY_SURGE,
[Species.WOOLOO]: Abilities.SIMPLE, [Species.WOOLOO]: Abilities.SIMPLE,
[Species.CHEWTLE]: Abilities.ROCK_HEAD, [Species.CHEWTLE]: Abilities.ROCKY_PAYLOAD,
[Species.YAMPER]: Abilities.SHEER_FORCE, [Species.YAMPER]: Abilities.SHEER_FORCE,
[Species.ROLYCOLY]: Abilities.SOLID_ROCK, [Species.ROLYCOLY]: Abilities.SOLID_ROCK,
[Species.APPLIN]: Abilities.DRAGONS_MAW, [Species.APPLIN]: Abilities.DRAGONS_MAW,
@ -3757,7 +3757,7 @@ export const starterPassiveAbilities = {
[Species.SINISTEA]: Abilities.SHADOW_SHIELD, [Species.SINISTEA]: Abilities.SHADOW_SHIELD,
[Species.HATENNA]: Abilities.FAIRY_AURA, [Species.HATENNA]: Abilities.FAIRY_AURA,
[Species.IMPIDIMP]: Abilities.FUR_COAT, [Species.IMPIDIMP]: Abilities.FUR_COAT,
[Species.MILCERY]: Abilities.MISTY_SURGE, [Species.MILCERY]: Abilities.REGENERATOR,
[Species.FALINKS]: Abilities.PARENTAL_BOND, [Species.FALINKS]: Abilities.PARENTAL_BOND,
[Species.PINCURCHIN]: Abilities.ELECTROMORPHOSIS, [Species.PINCURCHIN]: Abilities.ELECTROMORPHOSIS,
[Species.SNOM]: Abilities.SNOW_WARNING, [Species.SNOM]: Abilities.SNOW_WARNING,
@ -3776,7 +3776,7 @@ export const starterPassiveAbilities = {
[Species.ZAMAZENTA]: Abilities.STAMINA, [Species.ZAMAZENTA]: Abilities.STAMINA,
[Species.ETERNATUS]: Abilities.SUPREME_OVERLORD, [Species.ETERNATUS]: Abilities.SUPREME_OVERLORD,
[Species.KUBFU]: Abilities.IRON_FIST, [Species.KUBFU]: Abilities.IRON_FIST,
[Species.ZARUDE]: Abilities.GRASSY_SURGE, [Species.ZARUDE]: Abilities.TOUGH_CLAWS,
[Species.REGIELEKI]: Abilities.ELECTRIC_SURGE, [Species.REGIELEKI]: Abilities.ELECTRIC_SURGE,
[Species.REGIDRAGO]: Abilities.MULTISCALE, [Species.REGIDRAGO]: Abilities.MULTISCALE,
[Species.GLASTRIER]: Abilities.FILTER, [Species.GLASTRIER]: Abilities.FILTER,
@ -3785,7 +3785,7 @@ export const starterPassiveAbilities = {
[Species.ENAMORUS]: Abilities.FAIRY_AURA, [Species.ENAMORUS]: Abilities.FAIRY_AURA,
[Species.SPRIGATITO]: Abilities.MAGICIAN, [Species.SPRIGATITO]: Abilities.MAGICIAN,
[Species.FUECOCO]: Abilities.PUNK_ROCK, [Species.FUECOCO]: Abilities.PUNK_ROCK,
[Species.QUAXLY]: Abilities.DEFIANT, [Species.QUAXLY]: Abilities.OPPORTUNIST,
[Species.LECHONK]: Abilities.SIMPLE, [Species.LECHONK]: Abilities.SIMPLE,
[Species.TAROUNTULA]: Abilities.HONEY_GATHER, [Species.TAROUNTULA]: Abilities.HONEY_GATHER,
[Species.NYMBLE]: Abilities.GUTS, [Species.NYMBLE]: Abilities.GUTS,
@ -3833,7 +3833,7 @@ export const starterPassiveAbilities = {
[Species.IRON_MOTH]: Abilities.LEVITATE, [Species.IRON_MOTH]: Abilities.LEVITATE,
[Species.IRON_THORNS]: Abilities.SAND_STREAM, [Species.IRON_THORNS]: Abilities.SAND_STREAM,
[Species.FRIGIBAX]: Abilities.SNOW_WARNING, [Species.FRIGIBAX]: Abilities.SNOW_WARNING,
[Species.GIMMIGHOUL]: Abilities.CONTRARY, [Species.GIMMIGHOUL]: Abilities.HONEY_GATHER,
[Species.WO_CHIEN]: Abilities.VESSEL_OF_RUIN, [Species.WO_CHIEN]: Abilities.VESSEL_OF_RUIN,
[Species.CHIEN_PAO]: Abilities.INTREPID_SWORD, [Species.CHIEN_PAO]: Abilities.INTREPID_SWORD,
[Species.TING_LU]: Abilities.STAMINA, [Species.TING_LU]: Abilities.STAMINA,
@ -3864,7 +3864,7 @@ export const starterPassiveAbilities = {
[Species.ALOLA_GRIMER]: Abilities.TOXIC_DEBRIS, [Species.ALOLA_GRIMER]: Abilities.TOXIC_DEBRIS,
[Species.ETERNAL_FLOETTE]: Abilities.MAGIC_GUARD, [Species.ETERNAL_FLOETTE]: Abilities.MAGIC_GUARD,
[Species.GALAR_MEOWTH]: Abilities.STEELWORKER, [Species.GALAR_MEOWTH]: Abilities.STEELWORKER,
[Species.GALAR_PONYTA]: Abilities.PIXILATE, [Species.GALAR_PONYTA]: Abilities.MOXIE,
[Species.GALAR_SLOWPOKE]: Abilities.UNAWARE, [Species.GALAR_SLOWPOKE]: Abilities.UNAWARE,
[Species.GALAR_FARFETCHD]: Abilities.INTREPID_SWORD, [Species.GALAR_FARFETCHD]: Abilities.INTREPID_SWORD,
[Species.GALAR_ARTICUNO]: Abilities.SERENE_GRACE, [Species.GALAR_ARTICUNO]: Abilities.SERENE_GRACE,
@ -3876,7 +3876,7 @@ export const starterPassiveAbilities = {
[Species.GALAR_YAMASK]: Abilities.TABLETS_OF_RUIN, [Species.GALAR_YAMASK]: Abilities.TABLETS_OF_RUIN,
[Species.GALAR_STUNFISK]: Abilities.ARENA_TRAP, [Species.GALAR_STUNFISK]: Abilities.ARENA_TRAP,
[Species.HISUI_GROWLITHE]: Abilities.RECKLESS, [Species.HISUI_GROWLITHE]: Abilities.RECKLESS,
[Species.HISUI_VOLTORB]: Abilities.ELECTRIC_SURGE, [Species.HISUI_VOLTORB]: Abilities.TRANSISTOR,
[Species.HISUI_QWILFISH]: Abilities.MERCILESS, [Species.HISUI_QWILFISH]: Abilities.MERCILESS,
[Species.HISUI_SNEASEL]: Abilities.SCRAPPY, [Species.HISUI_SNEASEL]: Abilities.SCRAPPY,
[Species.HISUI_ZORUA]: Abilities.ADAPTABILITY, [Species.HISUI_ZORUA]: Abilities.ADAPTABILITY,

View File

@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
"MONO_FAIRY": { "MONO_FAIRY": {
name: "Ein ewiges Abenteuer!", name: "Ein ewiges Abenteuer!",
}, },
"FRESH_START": {
name: "Hussa, noch einmal von vorn!",
description: "Schließe die 'Neuanfang' Herausforderung ab"
}
} as const; } as const;
// Achievement translations for the when the player character is female // Achievement translations for the when the player character is female
@ -373,5 +377,6 @@ export const PGFachv: AchievementTranslationEntries = {
"MONO_DRAGON": PGMachv.MONO_DRAGON, "MONO_DRAGON": PGMachv.MONO_DRAGON,
"MONO_DARK": PGMachv.MONO_DARK, "MONO_DARK": PGMachv.MONO_DARK,
"MONO_FAIRY": PGMachv.MONO_FAIRY, "MONO_FAIRY": PGMachv.MONO_FAIRY,
"FRESH_START": PGMachv.FRESH_START
} as const; } as const;

View File

@ -266,7 +266,7 @@ export const PGMachv: AchievementTranslationEntries = {
}, },
"FRESH_START": { "FRESH_START": {
name: "First Try!", name: "First Try!",
description: "Complete the fresh start challenge." description: "Complete the Fresh Start challenge."
} }
} as const; } as const;

View File

@ -25,7 +25,7 @@ export const challenges: TranslationEntries = {
}, },
"freshStart": { "freshStart": {
"name": "Fresh Start", "name": "Fresh Start",
"desc": "You can only use the original starters, and only as if you had just started pokerogue.", "desc": "You can only use the original starters, and only as if you had just started PokéRogue.",
"value.0": "Off", "value.0": "Off",
"value.1": "On", "value.1": "On",
} }

View File

@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
"MONO_FAIRY": { "MONO_FAIRY": {
name: "Mono FAIRY", name: "Mono FAIRY",
}, },
"FRESH_START": {
name: "First Try!",
description: "Complete the Fresh Start challenge."
}
} as const; } as const;
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version) // Achievement translations for the when the player character is female (it for now uses the same translations as the male version)

View File

@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
"desc": "Solo puedes usar Pokémon with the {{type}} type.", "desc": "Solo puedes usar Pokémon with the {{type}} type.",
"desc_default": "Solo puedes usar Pokémon del tipo elegido.", "desc_default": "Solo puedes usar Pokémon del tipo elegido.",
}, },
"freshStart": {
"name": "Fresh Start",
"desc": "You can only use the original starters, and only as if you had just started PokéRogue.",
"value.0": "Off",
"value.1": "On",
}
} as const; } as const;

View File

@ -61,7 +61,7 @@ export const battle: SimpleTranslationEntries = {
"hpIsFull": "Les PV de {{pokemonName}}\nsont au maximum !", "hpIsFull": "Les PV de {{pokemonName}}\nsont au maximum !",
"skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre dobjet ?", "skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre dobjet ?",
"eggHatching": "Hein ?", "eggHatching": "Hein ?",
"ivScannerUseQuestion": "Utiliser le Scanner dIV sur {{pokemonName}} ?", "ivScannerUseQuestion": "Utiliser le Scanner dIV\nsur {{pokemonName}} ?",
"wildPokemonWithAffix": "{{pokemonName}} sauvage", "wildPokemonWithAffix": "{{pokemonName}} sauvage",
"foePokemonWithAffix": "{{pokemonName}} ennemi", "foePokemonWithAffix": "{{pokemonName}} ennemi",
"useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !", "useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !",
@ -74,21 +74,21 @@ export const battle: SimpleTranslationEntries = {
"statsAnd": "et", "statsAnd": "et",
"stats": "Les stats", "stats": "Les stats",
"statRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente !", "statRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente !",
"statRose_other": "{{stats}} de {{pokemonNameWithAffix}}\naugmentent !", "statRose_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent !",
"statSharplyRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente beaucoup !", "statSharplyRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente beaucoup !",
"statSharplyRose_other": "{{stats}} de {{pokemonNameWithAffix}}\naugmentent beaucoup !", "statSharplyRose_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent beaucoup !",
"statRoseDrastically_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente énormément !", "statRoseDrastically_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente énormément !",
"statRoseDrastically_other": "{{stats}} de {{pokemonNameWithAffix}}\naugmentent énormément !", "statRoseDrastically_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent énormément !",
"statWontGoAnyHigher_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus augmenter !", "statWontGoAnyHigher_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus augmenter !",
"statWontGoAnyHigher_other": "{{stats}} de {{pokemonNameWithAffix}}\nne peuvent plus augmenter !", "statWontGoAnyHigher_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus augmenter !",
"statFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse !", "statFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse !",
"statFell_other": "{{stats}} de {{pokemonNameWithAffix}}\nbaissent !", "statFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent !",
"statHarshlyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse beaucoup !", "statHarshlyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse beaucoup !",
"statHarshlyFell_other": "{{stats}} de {{pokemonNameWithAffix}}\nbaissent beaucoup !", "statHarshlyFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent beaucoup !",
"statSeverelyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse énormément !", "statSeverelyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse énormément !",
"statSeverelyFell_other": "{{stats}} de {{pokemonNameWithAffix}}\nbaissent énormément !", "statSeverelyFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent énormément !",
"statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus baisser !", "statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus baisser !",
"statWontGoAnyLower_other": "{{stats}} de {{pokemonNameWithAffix}}\nne peuvent plus baisser !", "statWontGoAnyLower_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus baisser !",
"transformedIntoType": "{{pokemonName}} transformed\ninto the {{type}} type!", "transformedIntoType": "{{pokemonName}} transformed\ninto the {{type}} type!",
"ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !", "ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !",
"retryBattle": "Voulez-vous réessayer depuis le début du combat ?", "retryBattle": "Voulez-vous réessayer depuis le début du combat ?",

View File

@ -7,7 +7,7 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
*/ */
export const starterSelectUiHandler: SimpleTranslationEntries = { export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam": "Commencer avec ces Pokémon ?", "confirmStartTeam": "Commencer avec ces Pokémon ?",
"confirmExit": "Do you want to exit?", "confirmExit": "Êtes-vous sûr·e de vouloir quitter ?",
"invalidParty": "Cette équipe de départ est invalide !", "invalidParty": "Cette équipe de départ est invalide !",
"gen1": "1G", "gen1": "1G",
"gen2": "2G", "gen2": "2G",

View File

@ -99,7 +99,7 @@ export const PGMachv: AchievementTranslationEntries = {
}, },
"MEGA_EVOLVE": { "MEGA_EVOLVE": {
name: "Megamorfosi", name: "Megamorfosi",
description: "Megaevolvi un pokémon", description: "Megaevolvi un Pokémon",
}, },
"GIGANTAMAX": { "GIGANTAMAX": {
name: "Grosso e Cattivo", name: "Grosso e Cattivo",
@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
"MONO_FAIRY": { "MONO_FAIRY": {
name: "Follettini e follettine", name: "Follettini e follettine",
}, },
"FRESH_START": {
name: "First Try!",
description: "Complete the Fresh Start challenge."
}
} as const; } as const;
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version) // Achievement translations for the when the player character is female (it for now uses the same translations as the male version)

View File

@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
"desc": "Puoi usare solo Pokémon di tipo {{type}}.", "desc": "Puoi usare solo Pokémon di tipo {{type}}.",
"desc_default": "Puoi usare solo Pokémon del tipo selezionato." "desc_default": "Puoi usare solo Pokémon del tipo selezionato."
}, },
"freshStart": {
"name": "Fresh Start",
"desc": "You can only use the original starters, and only as if you had just started PokéRogue.",
"value.0": "Off",
"value.1": "On",
}
} as const; } as const;

View File

@ -13,18 +13,18 @@ export const filterBar: SimpleTranslationEntries = {
"passive": "패시브", "passive": "패시브",
"passiveUnlocked": "패시브 해금", "passiveUnlocked": "패시브 해금",
"passiveLocked": "패시브 잠김", "passiveLocked": "패시브 잠김",
"costReduction": "Cost Reduction", "costReduction": "코스트 줄이기",
"costReductionUnlocked": "Cost Reduction Unlocked", "costReductionUnlocked": "코스트 절감됨",
"costReductionLocked": "Cost Reduction Locked", "costReductionLocked": "코스트 절감 없음",
"ribbon": "클리어 여부", "ribbon": "클리어 여부",
"hasWon": "클리어 ", "hasWon": "클리어 완료",
"hasNotwon": "클리어 안함", "hasNotWon": "클리어 안함",
"hiddenAbility": "Hidden Ability", "hiddenAbility": "숨겨진 특성",
"hasHiddenAbility": "Hidden Ability - Yes", "hasHiddenAbility": "숨겨진 특성 보유",
"noHiddenAbility": "Hidden Ability - No", "noHiddenAbility": "숨겨진 특성 없음",
"pokerus": "Pokerus", "pokerus": "포켓러스",
"hasPokerus": "Pokerus - Yes", "hasPokerus": "포켓러스 감염",
"noPokerus": "Pokerus - No", "noPokerus": "포켓러스 없음",
"sortByNumber": "도감번호", "sortByNumber": "도감번호",
"sortByCost": "코스트", "sortByCost": "코스트",
"sortByCandies": "사탕 수", "sortByCandies": "사탕 수",

View File

@ -7,7 +7,7 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
*/ */
export const starterSelectUiHandler: SimpleTranslationEntries = { export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam": "이 포켓몬들로 시작하시겠습니까?", "confirmStartTeam": "이 포켓몬들로 시작하시겠습니까?",
"confirmExit": "Do you want to exit?", "confirmExit": "나가시겠습니까?",
"invalidParty": "스타팅 포켓몬 파티에 적합하지 않습니다!", "invalidParty": "스타팅 포켓몬 파티에 적합하지 않습니다!",
"gen1": "1세대", "gen1": "1세대",
"gen2": "2세대", "gen2": "2세대",

View File

@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
"desc": "Você só pode user Pokémon do tipo {{type}}.", "desc": "Você só pode user Pokémon do tipo {{type}}.",
"desc_default": "Você só pode user Pokémon de um único tipo." "desc_default": "Você só pode user Pokémon de um único tipo."
}, },
"freshStart": {
"name": "Novo Começo",
"desc": "Você só pode usar os iniciais originais, como se tivesse acabado de começar o PokéRogue.",
"value.0": "Desligado",
"value.1": "Ligado",
}
} as const; } as const;

View File

@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
"MONO_FAIRY": { "MONO_FAIRY": {
name: "林克,醒醒!", name: "林克,醒醒!",
}, },
"FRESH_START": {
name: "First Try!",
description: "Complete the Fresh Start challenge."
}
} as const; } as const;
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version) // Achievement translations for the when the player character is female (it for now uses the same translations as the male version)

View File

@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
"desc": "你只能使用{{type}}\n屬性的寶可夢", "desc": "你只能使用{{type}}\n屬性的寶可夢",
"desc_default": "你只能使用所選\n屬性的寶可夢" "desc_default": "你只能使用所選\n屬性的寶可夢"
}, },
"freshStart": {
"name": "Fresh Start",
"desc": "You can only use the original starters, and only as if you had just started PokéRogue.",
"value.0": "Off",
"value.1": "On",
}
} as const; } as const;

View File

@ -1,13 +1,13 @@
import { CommandPhase, MessagePhase, TurnInitPhase } from "#app/phases"; import { CommandPhase, MessagePhase, TurnInitPhase } from "#app/phases";
import i18next, { initI18n } from "#app/plugins/i18n"; import i18next, { initI18n } from "#app/plugins/i18n";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
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 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";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Ability Timing", () => { describe("Ability Timing", () => {

View File

@ -1,13 +1,13 @@
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { MoveEffectPhase } from "#app/phases"; import { MoveEffectPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
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 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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Aura Break", () => { describe("Abilities - Aura Break", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,13 +1,13 @@
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js"; import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Battery", () => { describe("Abilities - Battery", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -5,9 +5,9 @@ import { Species } from "#app/enums/species.js";
import { CommandPhase, MessagePhase } from "#app/phases.js"; import { CommandPhase, MessagePhase } from "#app/phases.js";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -42,8 +42,6 @@ describe("Abilities - COSTAR", () => {
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]); await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
let [leftPokemon, rightPokemon] = game.scene.getPlayerField(); let [leftPokemon, rightPokemon] = game.scene.getPlayerField();
expect(leftPokemon).toBeDefined();
expect(rightPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.NASTY_PLOT)); game.doAttack(getMovePosition(game.scene, 0, Moves.NASTY_PLOT));
await game.phaseInterceptor.to(CommandPhase); await game.phaseInterceptor.to(CommandPhase);
@ -73,8 +71,6 @@ describe("Abilities - COSTAR", () => {
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]); await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
let [leftPokemon, rightPokemon] = game.scene.getPlayerField(); let [leftPokemon, rightPokemon] = game.scene.getPlayerField();
expect(leftPokemon).toBeDefined();
expect(rightPokemon).toBeDefined();
expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2); expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2);
expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2); expect(leftPokemon.summonData.battleStats[BattleStat.ATK]).toBe(-2);

View File

@ -1,12 +1,12 @@
import { Species } from "#app/enums/species.js"; import { Species } from "#app/enums/species.js";
import { TurnEndPhase } from "#app/phases"; import { TurnEndPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
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";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Dry Skin", () => { describe("Abilities - Dry Skin", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -83,7 +83,6 @@ describe("Abilities - Dry Skin", () => {
await game.startBattle(); await game.startBattle();
const enemy = game.scene.getEnemyPokemon(); const enemy = game.scene.getEnemyPokemon();
expect(enemy).toBeDefined();
const initialHP = 1000; const initialHP = 1000;
enemy.hp = initialHP; enemy.hp = initialHP;

View File

@ -2,13 +2,13 @@ import { allMoves } from "#app/data/move.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { Stat } from "#app/enums/stat.js"; import { Stat } from "#app/enums/stat.js";
import { DamagePhase, MoveEffectPhase } from "#app/phases.js"; import { DamagePhase, MoveEffectPhase } from "#app/phases.js";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Hustle", () => { describe("Abilities - Hustle", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,12 +1,7 @@
import { QuietFormChangePhase } from "#app/form-change-phase"; import { QuietFormChangePhase } from "#app/form-change-phase";
import { import { MoveEffectPhase, MoveEndPhase, TurnEndPhase, TurnInitPhase } from "#app/phases";
MoveEffectPhase, import GameManager from "#test/utils/gameManager";
MoveEndPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
TurnEndPhase,
TurnInitPhase,
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";

View File

@ -1,10 +1,9 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Overrides from "#app/overrides";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import { BattleStat } from "#app/data/battle-stat"; import { BattleStat } from "#app/data/battle-stat";
import { generateStarter, getMovePosition } from "#app/test/utils/gameManagerUtils"; import { generateStarter, getMovePosition } from "#test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Status, StatusEffect } from "#app/data/status-effect"; import { Status, StatusEffect } from "#app/data/status-effect";
import { GameModes, getGameMode } from "#app/game-mode"; import { GameModes, getGameMode } from "#app/game-mode";
@ -12,6 +11,7 @@ import { CommandPhase, DamagePhase, EncounterPhase, EnemyCommandPhase, SelectSta
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 { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Intimidate", () => { describe("Abilities - Intimidate", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -35,7 +35,7 @@ describe("Abilities - Intimidate", () => {
game.override.enemyPassiveAbility(Abilities.HYDRATION); game.override.enemyPassiveAbility(Abilities.HYDRATION);
game.override.ability(Abilities.INTIMIDATE); game.override.ability(Abilities.INTIMIDATE);
game.override.startingWave(3); game.override.startingWave(3);
game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); game.override.enemyMoveset(SPLASH_ONLY);
}); });
it("single - wild with switch", async () => { it("single - wild with switch", async () => {
@ -294,7 +294,7 @@ describe("Abilities - Intimidate", () => {
it("single - trainer should only trigger once whatever turn we are", async () => { it("single - trainer should only trigger once whatever turn we are", async () => {
game.override.moveset([Moves.SPLASH]); game.override.moveset([Moves.SPLASH]);
game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); game.override.enemyMoveset(SPLASH_ONLY);
game.override.startingWave(5); game.override.startingWave(5);
await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]);
let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
@ -334,7 +334,6 @@ describe("Abilities - Intimidate", () => {
it("double - wild vs only 1 on player side", async () => { it("double - wild vs only 1 on player side", async () => {
game.override.battleType("double"); game.override.battleType("double");
game.override.startingWave(3); game.override.startingWave(3);
vi.spyOn(Overrides, "OPP_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{ name: "COIN_CASE" }]);
await game.runToSummon([Species.MIGHTYENA]); await game.runToSummon([Species.MIGHTYENA]);
await game.phaseInterceptor.to(CommandPhase, false); await game.phaseInterceptor.to(CommandPhase, false);
const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats; const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;

View File

@ -1,8 +1,6 @@
import { BattleStat } from "#app/data/battle-stat"; import { BattleStat } from "#app/data/battle-stat";
import { import { CommandPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";

View File

@ -10,9 +10,9 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;

View File

@ -1,17 +1,17 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TurnEndPhase, MoveEffectPhase } from "#app/phases"; import { TurnEndPhase, MoveEffectPhase } from "#app/phases";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { ArenaTagType } from "#enums/arena-tag-type"; import { ArenaTagType } from "#enums/arena-tag-type";
import { ArenaTagSide, getArenaTag } from "#app/data/arena-tag"; import { ArenaTagSide, getArenaTag } from "#app/data/arena-tag";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { WeatherType } from "#app/data/weather.js"; import { WeatherType } from "#app/data/weather.js";
import { StatusEffect, getStatusEffectCatchRateMultiplier } from "#app/data/status-effect"; import { StatusEffect, getStatusEffectCatchRateMultiplier } from "#app/data/status-effect";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; // 20 sec timeout const TIMEOUT = 20 * 1000; // 20 sec timeout
@ -33,16 +33,15 @@ describe("Abilities - Magic Guard", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
/** Player Pokemon overrides */ /** Player Pokemon overrides */
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD); game.override.ability(Abilities.MAGIC_GUARD);
vi.spyOn(overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE); game.override.moveset([Moves.SPLASH]);
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]); game.override.startingLevel(100);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
/** Enemy Pokemon overrides */ /** Enemy Pokemon overrides */
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.enemyLevel(100);
}); });
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Magic_Guard_(Ability) //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Magic_Guard_(Ability)
@ -50,15 +49,13 @@ describe("Abilities - Magic Guard", () => {
it( it(
"ability should prevent damage caused by weather", "ability should prevent damage caused by weather",
async () => { async () => {
vi.spyOn(overrides, "WEATHER_OVERRIDE", "get").mockReturnValue(WeatherType.SANDSTORM); game.override.weather(WeatherType.SANDSTORM);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
@ -78,15 +75,11 @@ describe("Abilities - Magic Guard", () => {
"ability should prevent damage caused by status effects but other non-damage effects still apply", "ability should prevent damage caused by status effects but other non-damage effects still apply",
async () => { async () => {
//Toxic keeps track of the turn counters -> important that Magic Guard keeps track of post-Toxic turns //Toxic keeps track of the turn counters -> important that Magic Guard keeps track of post-Toxic turns
vi.spyOn(overrides, "STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.POISON); game.override.statusEffect(StatusEffect.POISON);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
@ -105,16 +98,12 @@ describe("Abilities - Magic Guard", () => {
it( it(
"ability effect should not persist when the ability is replaced", "ability effect should not persist when the ability is replaced",
async () => { async () => {
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED]); game.override.enemyMoveset([Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED]);
vi.spyOn(overrides, "STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.POISON); game.override.statusEffect(StatusEffect.POISON);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
@ -131,18 +120,14 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage caused by burn but other non-damaging effects are still applied", it("Magic Guard prevents damage caused by burn but other non-damaging effects are still applied",
async () => { async () => {
vi.spyOn(overrides, "OPP_STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.BURN); game.override.enemyStatusEffect(StatusEffect.BURN);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD); game.override.enemyAbility(Abilities.MAGIC_GUARD);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon();
expect (leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
@ -159,18 +144,14 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage caused by toxic but other non-damaging effects are still applied", it("Magic Guard prevents damage caused by toxic but other non-damaging effects are still applied",
async () => { async () => {
vi.spyOn(overrides, "OPP_STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.TOXIC); game.override.enemyStatusEffect(StatusEffect.TOXIC);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD); game.override.enemyAbility(Abilities.MAGIC_GUARD);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon();
expect (leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
const toxicStartCounter = enemyPokemon.status.turnCount; const toxicStartCounter = enemyPokemon.status.turnCount;
//should be 0 //should be 0
@ -197,12 +178,10 @@ describe("Abilities - Magic Guard", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
@ -225,12 +204,10 @@ describe("Abilities - Magic Guard", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
@ -250,16 +227,14 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents against damage from volatile status effects", it("Magic Guard prevents against damage from volatile status effects",
async () => { async () => {
await game.startBattle([Species.DUSKULL]); await game.startBattle([Species.DUSKULL]);
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.CURSE]); game.override.moveset([Moves.CURSE]);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD); game.override.enemyAbility(Abilities.MAGIC_GUARD);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect (leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.CURSE)); game.doAttack(getMovePosition(game.scene, 0, Moves.CURSE));
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
@ -276,11 +251,10 @@ describe("Abilities - Magic Guard", () => {
); );
it("Magic Guard prevents crash damage", async () => { it("Magic Guard prevents crash damage", async () => {
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.HIGH_JUMP_KICK]); game.override.moveset([Moves.HIGH_JUMP_KICK]);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.HIGH_JUMP_KICK)); game.doAttack(getMovePosition(game.scene, 0, Moves.HIGH_JUMP_KICK));
await game.phaseInterceptor.to(MoveEffectPhase, false); await game.phaseInterceptor.to(MoveEffectPhase, false);
@ -297,11 +271,10 @@ describe("Abilities - Magic Guard", () => {
); );
it("Magic Guard prevents damage from recoil", async () => { it("Magic Guard prevents damage from recoil", async () => {
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TAKE_DOWN]); game.override.moveset([Moves.TAKE_DOWN]);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.TAKE_DOWN)); game.doAttack(getMovePosition(game.scene, 0, Moves.TAKE_DOWN));
@ -316,11 +289,10 @@ describe("Abilities - Magic Guard", () => {
); );
it("Magic Guard does not prevent damage from Struggle's recoil", async () => { it("Magic Guard does not prevent damage from Struggle's recoil", async () => {
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.STRUGGLE]); game.override.moveset([Moves.STRUGGLE]);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.STRUGGLE)); game.doAttack(getMovePosition(game.scene, 0, Moves.STRUGGLE));
@ -336,11 +308,10 @@ describe("Abilities - Magic Guard", () => {
//This tests different move attributes than the recoil tests above //This tests different move attributes than the recoil tests above
it("Magic Guard prevents self-damage from attacking moves", async () => { it("Magic Guard prevents self-damage from attacking moves", async () => {
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.STEEL_BEAM]); game.override.moveset([Moves.STEEL_BEAM]);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.STEEL_BEAM)); game.doAttack(getMovePosition(game.scene, 0, Moves.STEEL_BEAM));
@ -365,11 +336,10 @@ describe("Abilities - Magic Guard", () => {
*/ */
it("Magic Guard does not prevent self-damage from non-attacking moves", async () => { it("Magic Guard does not prevent self-damage from non-attacking moves", async () => {
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.BELLY_DRUM]); game.override.moveset([Moves.BELLY_DRUM]);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.BELLY_DRUM)); game.doAttack(getMovePosition(game.scene, 0, Moves.BELLY_DRUM));
@ -385,15 +355,14 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from abilities with PostTurnHurtIfSleepingAbAttr", async() => { it("Magic Guard prevents damage from abilities with PostTurnHurtIfSleepingAbAttr", async() => {
//Tests the ability Bad Dreams //Tests the ability Bad Dreams
vi.spyOn(overrides, "STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.SLEEP); game.override.statusEffect(StatusEffect.SLEEP);
//enemy pokemon is given Spore just in case player pokemon somehow awakens during test //enemy pokemon is given Spore just in case player pokemon somehow awakens during test
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]); game.override.enemyMoveset([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BAD_DREAMS); game.override.enemyAbility(Abilities.BAD_DREAMS);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
@ -411,16 +380,14 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from abilities with PostFaintContactDamageAbAttr", async() => { it("Magic Guard prevents damage from abilities with PostFaintContactDamageAbAttr", async() => {
//Tests the abilities Innards Out/Aftermath //Tests the abilities Innards Out/Aftermath
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]); game.override.moveset([Moves.TACKLE]);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.AFTERMATH); game.override.enemyAbility(Abilities.AFTERMATH);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
enemyPokemon.hp = 1; enemyPokemon.hp = 1;
game.doAttack(getMovePosition(game.scene, 0, Moves.TACKLE)); game.doAttack(getMovePosition(game.scene, 0, Moves.TACKLE));
@ -438,16 +405,14 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from abilities with PostDefendContactDamageAbAttr", async() => { it("Magic Guard prevents damage from abilities with PostDefendContactDamageAbAttr", async() => {
//Tests the abilities Iron Barbs/Rough Skin //Tests the abilities Iron Barbs/Rough Skin
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]); game.override.moveset([Moves.TACKLE]);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.IRON_BARBS); game.override.enemyAbility(Abilities.IRON_BARBS);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.TACKLE)); game.doAttack(getMovePosition(game.scene, 0, Moves.TACKLE));
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
@ -464,16 +429,14 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from abilities with ReverseDrainAbAttr", async() => { it("Magic Guard prevents damage from abilities with ReverseDrainAbAttr", async() => {
//Tests the ability Liquid Ooze //Tests the ability Liquid Ooze
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB]); game.override.moveset([Moves.ABSORB]);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.LIQUID_OOZE); game.override.enemyAbility(Abilities.LIQUID_OOZE);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.ABSORB)); game.doAttack(getMovePosition(game.scene, 0, Moves.ABSORB));
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);
@ -490,12 +453,11 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents HP loss from abilities with PostWeatherLapseDamageAbAttr", async() => { it("Magic Guard prevents HP loss from abilities with PostWeatherLapseDamageAbAttr", async() => {
//Tests the abilities Solar Power/Dry Skin //Tests the abilities Solar Power/Dry Skin
vi.spyOn(overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SOLAR_POWER); game.override.passiveAbility(Abilities.SOLAR_POWER);
vi.spyOn(overrides, "WEATHER_OVERRIDE", "get").mockReturnValue(WeatherType.SUNNY); game.override.weather(WeatherType.SUNNY);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to(TurnEndPhase);

View File

@ -1,12 +1,8 @@
import { BattleStat } from "#app/data/battle-stat"; import { BattleStat } from "#app/data/battle-stat";
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { import { CommandPhase, EnemyCommandPhase, VictoryPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
EnemyCommandPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
VictoryPhase
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";

View File

@ -8,9 +8,9 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;

View File

@ -1,14 +1,10 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { import { CommandPhase, TurnEndPhase } from "#app/phases";
CommandPhase,
TurnEndPhase,
} from "#app/phases";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { StatusEffect } from "#app/data/status-effect.js"; import { StatusEffect } from "#app/data/status-effect.js";
import { allAbilities } from "#app/data/ability.js"; import { allAbilities } from "#app/data/ability.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
@ -30,11 +26,11 @@ describe("Abilities - Pastel Veil", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double"); game.override.battleType("double");
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]); game.override.moveset([Moves.SPLASH]);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TOXIC_THREAD, Moves.TOXIC_THREAD, Moves.TOXIC_THREAD, Moves.TOXIC_THREAD]); game.override.enemyMoveset([Moves.TOXIC_THREAD, Moves.TOXIC_THREAD, Moves.TOXIC_THREAD, Moves.TOXIC_THREAD]);
}); });
it("prevents the user and its allies from being afflicted by poison", async () => { it("prevents the user and its allies from being afflicted by poison", async () => {

View File

@ -1,13 +1,13 @@
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js"; import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Power Spot", () => { describe("Abilities - Power Spot", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -10,9 +10,9 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;

View File

@ -1,7 +1,7 @@
import { allAbilities, BypassSpeedChanceAbAttr } from "#app/data/ability"; import { allAbilities, BypassSpeedChanceAbAttr } from "#app/data/ability";
import { FaintPhase } from "#app/phases"; import { FaintPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
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,10 +1,10 @@
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
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 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";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { WeatherType } from "#app/enums/weather-type.js"; import { WeatherType } from "#app/enums/weather-type.js";

View File

@ -7,8 +7,8 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -45,10 +45,6 @@ describe("Abilities - Sand Veil", () => {
await game.startBattle([Species.SNORLAX, Species.BLISSEY]); await game.startBattle([Species.SNORLAX, Species.BLISSEY]);
const leadPokemon = game.scene.getPlayerField(); const leadPokemon = game.scene.getPlayerField();
leadPokemon.forEach(p => expect(p).toBeDefined());
const enemyPokemon = game.scene.getEnemyField();
enemyPokemon.forEach(p => expect(p).toBeDefined());
vi.spyOn(leadPokemon[0], "getAbility").mockReturnValue(allAbilities[Abilities.SAND_VEIL]); vi.spyOn(leadPokemon[0], "getAbility").mockReturnValue(allAbilities[Abilities.SAND_VEIL]);

View File

@ -1,10 +1,8 @@
import { BattleStat } from "#app/data/battle-stat.js"; import { BattleStat } from "#app/data/battle-stat.js";
import { TerrainType } from "#app/data/terrain.js"; import { TerrainType } from "#app/data/terrain.js";
import { import { MoveEndPhase, TurnEndPhase } from "#app/phases";
MoveEndPhase, TurnEndPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";

View File

@ -1,7 +1,7 @@
import { ArenaTagType } from "#app/enums/arena-tag-type.js"; import { ArenaTagType } from "#app/enums/arena-tag-type.js";
import { PostSummonPhase, TurnEndPhase, } from "#app/phases"; import { PostSummonPhase, TurnEndPhase, } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
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,11 +1,8 @@
import { applyAbAttrs, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability"; import { applyAbAttrs, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability";
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { import { CommandPhase, MoveEffectPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
MoveEffectPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";

View File

@ -1,11 +1,8 @@
import { applyAbAttrs, applyPostDefendAbAttrs, applyPreAttackAbAttrs, MoveEffectChanceMultiplierAbAttr, MovePowerBoostAbAttr, PostDefendTypeChangeAbAttr } from "#app/data/ability"; import { applyAbAttrs, applyPostDefendAbAttrs, applyPreAttackAbAttrs, MoveEffectChanceMultiplierAbAttr, MovePowerBoostAbAttr, PostDefendTypeChangeAbAttr } from "#app/data/ability";
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { import { CommandPhase, MoveEffectPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
MoveEffectPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";

View File

@ -1,11 +1,8 @@
import { applyAbAttrs, applyPreDefendAbAttrs, IgnoreMoveEffectsAbAttr, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability"; import { applyAbAttrs, applyPreDefendAbAttrs, IgnoreMoveEffectsAbAttr, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability";
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { import { CommandPhase, MoveEffectPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
MoveEffectPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";

View File

@ -2,13 +2,13 @@ import { allAbilities } from "#app/data/ability.js";
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { MoveEffectPhase, SelectTargetPhase } from "#app/phases.js"; import { MoveEffectPhase, SelectTargetPhase } from "#app/phases.js";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Steely Spirit", () => { describe("Abilities - Steely Spirit", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,10 +1,7 @@
import { EnemyPokemon } from "#app/field/pokemon.js"; import { EnemyPokemon } from "#app/field/pokemon.js";
import { import { DamagePhase, MoveEndPhase } from "#app/phases";
DamagePhase, import GameManager from "#test/utils/gameManager";
MoveEndPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
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,19 +1,14 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { import { CommandPhase, MoveEffectPhase, MovePhase, TurnEndPhase } from "#app/phases";
CommandPhase,
MoveEffectPhase,
MovePhase,
TurnEndPhase,
} from "#app/phases";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { BattlerTagType } from "#app/enums/battler-tag-type.js"; import { BattlerTagType } from "#app/enums/battler-tag-type.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { BattlerIndex } from "#app/battle.js"; import { BattlerIndex } from "#app/battle.js";
import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Sweet Veil", () => { describe("Abilities - Sweet Veil", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -31,11 +26,11 @@ describe("Abilities - Sweet Veil", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double"); game.override.battleType("double");
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.REST]); game.override.moveset([Moves.SPLASH, Moves.REST]);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.POWDER, Moves.POWDER, Moves.POWDER, Moves.POWDER]); game.override.enemyMoveset([Moves.POWDER, Moves.POWDER, Moves.POWDER, Moves.POWDER]);
}); });
it("prevents the user and its allies from falling asleep", async () => { it("prevents the user and its allies from falling asleep", async () => {
@ -50,7 +45,7 @@ describe("Abilities - Sweet Veil", () => {
}); });
it("causes Rest to fail when used by the user or its allies", async () => { it("causes Rest to fail when used by the user or its allies", async () => {
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); game.override.enemyMoveset(SPLASH_ONLY);
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
@ -62,7 +57,7 @@ describe("Abilities - Sweet Veil", () => {
}); });
it("causes Yawn to fail if used on the user or its allies", async () => { it("causes Yawn to fail if used on the user or its allies", async () => {
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]); game.override.enemyMoveset([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]);
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
@ -74,10 +69,10 @@ describe("Abilities - Sweet Veil", () => {
}); });
it("prevents the user and its allies already drowsy due to Yawn from falling asleep.", async () => { it("prevents the user and its allies already drowsy due to Yawn from falling asleep.", async () => {
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.PIKACHU); game.override.enemySpecies(Species.PIKACHU);
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(5); game.override.enemyLevel(5);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5); game.override.startingLevel(5);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]); game.override.enemyMoveset([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]);
await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]); await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]);

View File

@ -4,8 +4,8 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;

View File

@ -1,9 +1,7 @@
import { BattleStat } from "#app/data/battle-stat.js"; import { BattleStat } from "#app/data/battle-stat.js";
import { import { TurnEndPhase } from "#app/phases";
TurnEndPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";

View File

@ -1,15 +1,13 @@
import { BattlerTagType } from "#app/enums/battler-tag-type.js"; import { BattlerTagType } from "#app/enums/battler-tag-type.js";
import { import { TurnEndPhase } from "#app/phases";
TurnEndPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
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 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";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Wind Power", () => { describe("Abilities - Wind Power", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,15 +1,13 @@
import { BattleStat } from "#app/data/battle-stat.js"; import { BattleStat } from "#app/data/battle-stat.js";
import { import { TurnEndPhase } from "#app/phases";
TurnEndPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
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 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";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Wind Rider", () => { describe("Abilities - Wind Rider", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,14 +1,14 @@
import { allAbilities } from "#app/data/ability.js"; import { allAbilities } from "#app/data/ability.js";
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { MoveEffectPhase } from "#app/phases"; import { MoveEffectPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
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 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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Wonder Skin", () => { describe("Abilities - Wonder Skin", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,20 +1,9 @@
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { Status, StatusEffect } from "#app/data/status-effect.js"; import { Status, StatusEffect } from "#app/data/status-effect.js";
import { QuietFormChangePhase } from "#app/form-change-phase"; import { QuietFormChangePhase } from "#app/form-change-phase";
import { import { CommandPhase, DamagePhase, EnemyCommandPhase, MessagePhase, PostSummonPhase, SwitchPhase, SwitchSummonPhase, TurnEndPhase, TurnInitPhase, TurnStartPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
DamagePhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
EnemyCommandPhase,
MessagePhase,
PostSummonPhase,
SwitchPhase,
SwitchSummonPhase,
TurnEndPhase,
TurnInitPhase,
TurnStartPhase,
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";

View File

@ -1,6 +1,6 @@
import { TurnHeldItemTransferModifier } from "#app/modifier/modifier.js"; import { TurnHeldItemTransferModifier } from "#app/modifier/modifier.js";
import { Achv, AchvTier, DamageAchv, HealAchv, LevelAchv, ModifierAchv, MoneyAchv, RibbonAchv, achvs } from "#app/system/achv"; import { Achv, AchvTier, DamageAchv, HealAchv, LevelAchv, ModifierAchv, MoneyAchv, RibbonAchv, achvs } from "#app/system/achv";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { IntegerHolder, NumberHolder } from "#app/utils.js"; import { IntegerHolder, NumberHolder } from "#app/utils.js";
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";

View File

@ -1,12 +1,9 @@
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { ArenaTagType } from "#app/enums/arena-tag-type.js"; import { ArenaTagType } from "#app/enums/arena-tag-type.js";
import { import { MoveEffectPhase, TurnEndPhase } from "#app/phases";
MoveEffectPhase, import GameManager from "#test/utils/gameManager";
TurnEndPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";

View File

@ -1,11 +1,9 @@
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { WeatherType } from "#app/data/weather.js"; import { WeatherType } from "#app/data/weather.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { import { MoveEffectPhase } from "#app/phases";
MoveEffectPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";

View File

@ -1,9 +1,7 @@
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { import { TurnStartPhase } from "#app/phases";
TurnStartPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
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,8 +1,4 @@
import { import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "#app/data/battle-stat.js";
BattleStat,
getBattleStatLevelChangeDescription,
getBattleStatName,
} from "#app/data/battle-stat.js";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { arrayOfRange, mockI18next } from "./utils/testUtils"; import { arrayOfRange, mockI18next } from "./utils/testUtils";

View File

@ -1,10 +1,7 @@
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { import { CommandPhase, EnemyCommandPhase, SelectTargetPhase, TurnStartPhase } from "#app/phases";
CommandPhase, EnemyCommandPhase, SelectTargetPhase, import GameManager from "#test/utils/gameManager";
TurnStartPhase import { getMovePosition } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import TargetSelectUiHandler from "#app/ui/target-select-ui-handler"; import TargetSelectUiHandler from "#app/ui/target-select-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";

View File

@ -1,20 +1,9 @@
import { allSpecies } from "#app/data/pokemon-species"; import { allSpecies } from "#app/data/pokemon-species";
import { GameModes } from "#app/game-mode"; import { GameModes } from "#app/game-mode";
import { getGameMode } from "#app/game-mode.js"; import { getGameMode } from "#app/game-mode.js";
import { import { CommandPhase, DamagePhase, EncounterPhase, EnemyCommandPhase, LoginPhase, SelectGenderPhase, SelectModifierPhase, SelectStarterPhase, SummonPhase, TitlePhase, TurnInitPhase, VictoryPhase } from "#app/phases";
CommandPhase, DamagePhase, import GameManager from "#test/utils/gameManager";
EncounterPhase, import { generateStarter, getMovePosition, } from "#test/utils/gameManagerUtils";
EnemyCommandPhase,
LoginPhase,
SelectGenderPhase,
SelectModifierPhase,
SelectStarterPhase,
SummonPhase,
TitlePhase,
TurnInitPhase, VictoryPhase,
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { generateStarter, getMovePosition, } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";

View File

@ -1,14 +1,11 @@
import { import { BattleEndPhase, TurnInitPhase } from "#app/phases";
BattleEndPhase, import GameManager from "#test/utils/gameManager";
TurnInitPhase, import { getMovePosition, } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition, } from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
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";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
import { Status, StatusEffect } from "#app/data/status-effect.js"; import { Status, StatusEffect } from "#app/data/status-effect.js";
describe("Test Battle Phase", () => { describe("Test Battle Phase", () => {
@ -43,8 +40,6 @@ describe("Test Battle Phase", () => {
game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH)); game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH));
for (const pokemon of game.scene.getPlayerField()) { for (const pokemon of game.scene.getPlayerField()) {
expect(pokemon).toBeDefined();
pokemon.hp = 0; pokemon.hp = 0;
pokemon.status = new Status(StatusEffect.FAINT); pokemon.status = new Status(StatusEffect.FAINT);
expect(pokemon.isFainted()).toBe(true); expect(pokemon.isFainted()).toBe(true);

View File

@ -1,4 +1,4 @@
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
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,7 +1,5 @@
import { import { CommandPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
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,7 @@ import Phaser from "phaser";
import { EggSourceType } from "#app/enums/egg-source-types.js"; import { EggSourceType } from "#app/enums/egg-source-types.js";
import { EggTier } from "#app/enums/egg-type.js"; import { EggTier } from "#app/enums/egg-type.js";
import { VariantTier } from "#app/enums/variant-tiers.js"; import { VariantTier } from "#app/enums/variant-tiers.js";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import EggData from "#app/system/egg-data.js"; import EggData from "#app/system/egg-data.js";
import * as Utils from "#app/utils.js"; import * as Utils from "#app/utils.js";

View File

@ -1,7 +1,7 @@
import { pokemonEvolutions } from "#app/data/pokemon-evolutions.js"; import { pokemonEvolutions } from "#app/data/pokemon-evolutions.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { Species } from "#app/enums/species.js"; import { Species } from "#app/enums/species.js";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/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";

View File

@ -1,6 +1,6 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";

View File

@ -1,13 +1,5 @@
import { GameMode, GameModes, getGameMode } from "#app/game-mode.js"; import { GameMode, GameModes, getGameMode } from "#app/game-mode.js";
import { import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
afterEach,
beforeAll,
beforeEach,
describe,
expect,
it,
vi,
} from "vitest";
import GameManager from "./utils/gameManager"; import GameManager from "./utils/gameManager";
import * as Utils from "../utils"; import * as Utils from "../utils";
describe("game-mode", () => { describe("game-mode", () => {

View File

@ -1,9 +1,9 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import pad_xbox360 from "#app/configs/inputs/pad_xbox360"; import pad_xbox360 from "#app/configs/inputs/pad_xbox360";
import cfg_keyboard_qwerty from "#app/configs/inputs/cfg_keyboard_qwerty"; import cfg_keyboard_qwerty from "#app/configs/inputs/cfg_keyboard_qwerty";
import InputsHandler from "#app/test/utils/inputsHandler"; import InputsHandler from "#test/utils/inputsHandler";
describe("Inputs", () => { describe("Inputs", () => {

View File

@ -1,6 +1,6 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { Species } from "#app/enums/species.js"; import { Species } from "#app/enums/species.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";

View File

@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
import { EvolutionStatBoosterModifier } from "#app/modifier/modifier"; import { EvolutionStatBoosterModifier } from "#app/modifier/modifier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import i18next from "#app/plugins/i18n"; import i18next from "#app/plugins/i18n";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phase from "phaser"; import Phase from "phaser";

View File

@ -1,6 +1,6 @@
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { PokemonExpBoosterModifier } from "#app/modifier/modifier.js"; import { PokemonExpBoosterModifier } from "#app/modifier/modifier.js";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import Phase from "phaser"; import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";

View File

@ -5,10 +5,10 @@ import { BerryType } from "#app/enums/berry-type.js";
import { Moves } from "#app/enums/moves.js"; import { Moves } from "#app/enums/moves.js";
import { Species } from "#app/enums/species.js"; import { Species } from "#app/enums/species.js";
import { CommandPhase, MoveEndPhase, SelectTargetPhase } from "#app/phases.js"; import { CommandPhase, MoveEndPhase, SelectTargetPhase } from "#app/phases.js";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phase from "phaser"; import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
const TIMEOUT = 20 * 1000; // 20 seconds const TIMEOUT = 20 * 1000; // 20 seconds
@ -54,11 +54,7 @@ describe("Items - Grip Claw", () => {
async () => { async () => {
await game.startBattle([Species.PANSEAR, Species.ROWLET, Species.PANPOUR, Species.PANSAGE, Species.CHARMANDER, Species.SQUIRTLE]); await game.startBattle([Species.PANSEAR, Species.ROWLET, Species.PANPOUR, Species.PANSAGE, Species.CHARMANDER, Species.SQUIRTLE]);
const playerPokemon = game.scene.getPlayerField();
playerPokemon.forEach(p => expect(p).toBeDefined());
const enemyPokemon = game.scene.getEnemyField(); const enemyPokemon = game.scene.getEnemyField();
enemyPokemon.forEach(p => expect(p).toBeDefined());
const enemyHeldItemCt = enemyPokemon.map(p => p.getHeldItems.length); const enemyHeldItemCt = enemyPokemon.map(p => p.getHeldItems.length);

View File

@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle";
import { CritBoosterModifier } from "#app/modifier/modifier"; import { CritBoosterModifier } from "#app/modifier/modifier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import { MoveEffectPhase, TurnStartPhase } from "#app/phases"; import { MoveEffectPhase, TurnStartPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
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

@ -1,6 +1,6 @@
import { DamagePhase, TurnEndPhase } from "#app/phases"; import { DamagePhase, TurnEndPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
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";
@ -41,10 +41,6 @@ describe("Items - Leftovers", () => {
expect(game.scene.modifiers[0].type.id).toBe("LEFTOVERS"); expect(game.scene.modifiers[0].type.id).toBe("LEFTOVERS");
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
// We should have full hp // We should have full hp
expect(leadPokemon.isFullHp()).toBe(true); expect(leadPokemon.isFullHp()).toBe(true);

View File

@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import i18next from "#app/plugins/i18n"; import i18next from "#app/plugins/i18n";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phase from "phaser"; import Phase from "phaser";

View File

@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import i18next from "#app/plugins/i18n"; import i18next from "#app/plugins/i18n";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phase from "phaser"; import Phase from "phaser";

View File

@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import i18next from "#app/plugins/i18n"; import i18next from "#app/plugins/i18n";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phase from "phaser"; import Phase from "phaser";

View File

@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle";
import { CritBoosterModifier } from "#app/modifier/modifier"; import { CritBoosterModifier } from "#app/modifier/modifier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import { MoveEffectPhase, TurnStartPhase } from "#app/phases"; import { MoveEffectPhase, TurnStartPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
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 { Stat } from "#app/data/pokemon-stat";
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier"; import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import i18next from "#app/plugins/i18n"; import i18next from "#app/plugins/i18n";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import * as Utils from "#app/utils"; import * as Utils from "#app/utils";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phase from "phaser"; import Phase from "phaser";

View File

@ -1,13 +1,8 @@
import { StatusEffect } from "#app/data/status-effect"; import { StatusEffect } from "#app/data/status-effect";
import { import { CommandPhase, EnemyCommandPhase, MessagePhase, TurnEndPhase } from "#app/phases";
CommandPhase,
EnemyCommandPhase,
MessagePhase,
TurnEndPhase,
} from "#app/phases";
import i18next, { initI18n } from "#app/plugins/i18n"; import i18next, { initI18n } from "#app/plugins/i18n";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler"; import { Command } from "#app/ui/command-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";

View File

@ -19,7 +19,6 @@ import {pokemonInfo as zhCnPokemonInfo} from "#app/locales/zh_CN/pokemon-info.js
import { battle as zhCnBattleStat } from "#app/locales/zh_CN/battle.js"; import { battle as zhCnBattleStat } from "#app/locales/zh_CN/battle.js";
import { pokemonInfo as zhTwPokemonInfo } from "#app/locales/zh_TW/pokemon-info.js"; import { pokemonInfo as zhTwPokemonInfo } from "#app/locales/zh_TW/pokemon-info.js";
import { battle as zhTwBattleStat } from "#app/locales/zh_TW/battle.js"; import { battle as zhTwBattleStat } from "#app/locales/zh_TW/battle.js";
import i18next, { initI18n } from "#app/plugins/i18n"; import i18next, { initI18n } from "#app/plugins/i18n";
import { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor"; import { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor";

View File

@ -1,6 +1,6 @@
import { afterEach, beforeAll, describe, expect, it } from "vitest"; import { afterEach, beforeAll, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import i18next from "i18next"; import i18next from "i18next";
import { initI18n } from "#app/plugins/i18n"; import { initI18n } from "#app/plugins/i18n";

View File

@ -1,14 +1,7 @@
import { beforeAll, describe, afterEach, expect, it, vi } from "vitest"; import { beforeAll, describe, afterEach, expect, it, vi } from "vitest";
import { import { StatusEffect, getStatusEffectActivationText, getStatusEffectDescriptor, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect";
StatusEffect,
getStatusEffectActivationText,
getStatusEffectDescriptor,
getStatusEffectHealText,
getStatusEffectObtainText,
getStatusEffectOverlapText,
} from "#app/data/status-effect";
import i18next from "i18next"; import i18next from "i18next";
import { mockI18next } from "../utils/testUtils"; import { mockI18next } from "#test/utils/testUtils";
const pokemonName = "PKM"; const pokemonName = "PKM";
const sourceText = "SOURCE"; const sourceText = "SOURCE";

View File

@ -1,11 +1,11 @@
import { TerrainType, getTerrainName } from "#app/data/terrain"; import { TerrainType, getTerrainName } from "#app/data/terrain";
import { getTerrainBlockMessage, getTerrainClearMessage, getTerrainStartMessage } from "#app/data/weather"; import { getTerrainBlockMessage, getTerrainClearMessage, getTerrainStartMessage } from "#app/data/weather";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import i18next from "i18next"; import i18next from "i18next";
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 { mockI18next } from "../utils/testUtils"; import { mockI18next } from "#test/utils/testUtils";
describe("terrain", () => { describe("terrain", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -6,8 +6,8 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -44,10 +44,8 @@ describe("Moves - Astonish", () => {
await game.startBattle([Species.MEOWSCARADA]); await game.startBattle([Species.MEOWSCARADA]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.ASTONISH)); game.doAttack(getMovePosition(game.scene, 0, Moves.ASTONISH));

View File

@ -4,11 +4,9 @@ import { WeatherType } from "#app/data/weather.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { ArenaTagType } from "#app/enums/arena-tag-type.js"; import { ArenaTagType } from "#app/enums/arena-tag-type.js";
import Pokemon from "#app/field/pokemon.js"; import Pokemon from "#app/field/pokemon.js";
import { import { TurnEndPhase } from "#app/phases";
TurnEndPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { NumberHolder } from "#app/utils.js"; import { NumberHolder } from "#app/utils.js";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";

View File

@ -1,11 +1,10 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Overrides from "#app/overrides";
import { Species } from "#app/enums/species.js"; import { Species } from "#app/enums/species.js";
import { Moves } from "#app/enums/moves.js"; import { Moves } from "#app/enums/moves.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { getMovePosition } from "../utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { MoveEffectPhase } from "#app/phases.js"; import { MoveEffectPhase } from "#app/phases.js";
import { StatusEffect } from "#app/enums/status-effect.js"; import { StatusEffect } from "#app/enums/status-effect.js";
@ -27,15 +26,15 @@ describe("Moves - Beat Up", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single"); game.override.battleType("single");
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.enemyLevel(100);
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(Array(4).fill(Moves.SPLASH)); game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.startingLevel(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.BEAT_UP]); game.override.moveset([Moves.BEAT_UP]);
}); });
it( it(
@ -82,7 +81,7 @@ describe("Moves - Beat Up", () => {
it( it(
"should hit twice for each player Pokemon if the user has Multi-Lens", "should hit twice for each player Pokemon if the user has Multi-Lens",
async () => { async () => {
vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "MULTI_LENS", count: 1}]); game.override.startingHeldItems([{name: "MULTI_LENS", count: 1}]);
await game.startBattle([Species.MAGIKARP, Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.PIKACHU, Species.EEVEE]); await game.startBattle([Species.MAGIKARP, Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.PIKACHU, Species.EEVEE]);
const playerPokemon = game.scene.getPlayerPokemon(); const playerPokemon = game.scene.getPlayerPokemon();

View File

@ -1,11 +1,8 @@
import {afterEach, beforeAll, beforeEach, describe, expect, test, vi} from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides"; import { TurnEndPhase } from "#app/phases";
import { import { getMovePosition } from "#test/utils/gameManagerUtils";
TurnEndPhase,
} from "#app/phases";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { BattleStat } from "#app/data/battle-stat"; import { BattleStat } from "#app/data/battle-stat";
@ -32,10 +29,10 @@ describe("Moves - BELLY DRUM", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP); game.override.starterSpecies(Species.MAGIKARP);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.startingLevel(100);
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.enemyLevel(100);
game.override.moveset([Moves.BELLY_DRUM]); game.override.moveset([Moves.BELLY_DRUM]);
game.override.enemyMoveset([Moves.SPLASH]); game.override.enemyMoveset([Moves.SPLASH]);
}); });
@ -47,7 +44,6 @@ describe("Moves - BELLY DRUM", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
game.doAttack(getMovePosition(game.scene, 0, Moves.BELLY_DRUM)); game.doAttack(getMovePosition(game.scene, 0, Moves.BELLY_DRUM));
@ -63,7 +59,6 @@ describe("Moves - BELLY DRUM", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
// Here - BattleStat.ATK -> -3 and BattleStat.SPATK -> 6 // Here - BattleStat.ATK -> -3 and BattleStat.SPATK -> 6
@ -84,7 +79,6 @@ describe("Moves - BELLY DRUM", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; leadPokemon.summonData.battleStats[BattleStat.ATK] = 6;
@ -101,7 +95,6 @@ describe("Moves - BELLY DRUM", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
leadPokemon.hp = hpLost - PREDAMAGE; leadPokemon.hp = hpLost - PREDAMAGE;

View File

@ -2,12 +2,9 @@ import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag";
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/move";
import { Abilities } from "#app/enums/abilities"; import { Abilities } from "#app/enums/abilities";
import { ArenaTagType } from "#app/enums/arena-tag-type"; import { ArenaTagType } from "#app/enums/arena-tag-type";
import { import { MoveEffectPhase, TurnEndPhase } from "#app/phases";
MoveEffectPhase, import GameManager from "#test/utils/gameManager";
TurnEndPhase import { getMovePosition } from "#test/utils/gameManagerUtils";
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
@ -48,11 +45,7 @@ describe("Moves - Ceaseless Edge", () => {
async () => { async () => {
await game.startBattle([ Species.ILLUMISE ]); await game.startBattle([ Species.ILLUMISE ]);
const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
const enemyStartingHp = enemyPokemon.hp; const enemyStartingHp = enemyPokemon.hp;
@ -77,11 +70,7 @@ describe("Moves - Ceaseless Edge", () => {
game.override.startingHeldItems([{name: "MULTI_LENS"}]); game.override.startingHeldItems([{name: "MULTI_LENS"}]);
await game.startBattle([ Species.ILLUMISE ]); await game.startBattle([ Species.ILLUMISE ]);
const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon(); const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
const enemyStartingHp = enemyPokemon.hp; const enemyStartingHp = enemyPokemon.hp;
@ -108,12 +97,6 @@ describe("Moves - Ceaseless Edge", () => {
await game.startBattle([ Species.ILLUMISE ]); await game.startBattle([ Species.ILLUMISE ]);
const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const enemyPokemon = game.scene.getEnemyPokemon();
expect(enemyPokemon).toBeDefined();
game.doAttack(getMovePosition(game.scene, 0, Moves.CEASELESS_EDGE)); game.doAttack(getMovePosition(game.scene, 0, Moves.CEASELESS_EDGE));
await game.phaseInterceptor.to(MoveEffectPhase, false); await game.phaseInterceptor.to(MoveEffectPhase, false);
// Spikes should not have any layers before move effect is applied // Spikes should not have any layers before move effect is applied

View File

@ -1,19 +1,17 @@
import {afterEach, beforeAll, beforeEach, describe, expect, test, vi} from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides"; import { TurnEndPhase } from "#app/phases";
import { import { getMovePosition } from "#test/utils/gameManagerUtils";
TurnEndPhase,
} from "#app/phases";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { BattleStat } from "#app/data/battle-stat"; import { BattleStat } from "#app/data/battle-stat";
import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
// RATIO : HP Cost of Move /** HP Cost of Move */
const RATIO = 3; const RATIO = 3;
// PREDAMAGE : Amount of extra HP lost /** Amount of extra HP lost */
const PREDAMAGE = 15; const PREDAMAGE = 15;
describe("Moves - CLANGOROUS_SOUL", () => { describe("Moves - CLANGOROUS_SOUL", () => {
@ -32,12 +30,12 @@ describe("Moves - CLANGOROUS_SOUL", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP); game.override.starterSpecies(Species.MAGIKARP);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.startingLevel(100);
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.enemyLevel(100);
game.override.moveset([Moves.CLANGOROUS_SOUL]); game.override.moveset([Moves.CLANGOROUS_SOUL]);
game.override.enemyMoveset([Moves.SPLASH]); game.override.enemyMoveset(SPLASH_ONLY);
}); });
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move) //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move)
@ -47,7 +45,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
game.doAttack(getMovePosition(game.scene, 0, Moves.CLANGOROUS_SOUL)); game.doAttack(getMovePosition(game.scene, 0, Moves.CLANGOROUS_SOUL));
@ -67,7 +64,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
//Here - BattleStat.SPD -> 0 and BattleStat.SPDEF -> 4 //Here - BattleStat.SPD -> 0 and BattleStat.SPDEF -> 4
@ -93,7 +89,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; leadPokemon.summonData.battleStats[BattleStat.ATK] = 6;
leadPokemon.summonData.battleStats[BattleStat.DEF] = 6; leadPokemon.summonData.battleStats[BattleStat.DEF] = 6;
@ -118,7 +113,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
leadPokemon.hp = hpLost - PREDAMAGE; leadPokemon.hp = hpLost - PREDAMAGE;

View File

@ -1,10 +1,8 @@
import { BattleStat } from "#app/data/battle-stat.js"; import { BattleStat } from "#app/data/battle-stat.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { import { TurnEndPhase } from "#app/phases";
TurnEndPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";

View File

@ -4,14 +4,14 @@ import { Species } from "#app/enums/species.js";
import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { modifierTypes } from "#app/modifier/modifier-type"; import { modifierTypes } from "#app/modifier/modifier-type";
import { TurnEndPhase } from "#app/phases"; import { TurnEndPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import 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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Moves - Dragon Rage", () => { describe("Moves - Dragon Rage", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,8 +1,8 @@
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/move";
import { DamagePhase, MoveEffectPhase, TurnStartPhase } from "#app/phases"; import { DamagePhase, MoveEffectPhase, TurnStartPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";

View File

@ -1,19 +1,17 @@
import {afterEach, beforeAll, beforeEach, describe, expect, test, vi} from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides"; import { TurnEndPhase } from "#app/phases";
import { import { getMovePosition } from "#test/utils/gameManagerUtils";
TurnEndPhase,
} from "#app/phases";
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { BattleStat } from "#app/data/battle-stat"; import { BattleStat } from "#app/data/battle-stat";
import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
// RATIO : HP Cost of Move /** HP Cost of Move */
const RATIO = 2; const RATIO = 2;
// PREDAMAGE : Amount of extra HP lost /** Amount of extra HP lost */
const PREDAMAGE = 15; const PREDAMAGE = 15;
describe("Moves - FILLET AWAY", () => { describe("Moves - FILLET AWAY", () => {
@ -32,12 +30,12 @@ describe("Moves - FILLET AWAY", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP); game.override.starterSpecies(Species.MAGIKARP);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.startingLevel(100);
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); game.override.enemyLevel(100);
game.override.moveset([Moves.FILLET_AWAY]); game.override.moveset([Moves.FILLET_AWAY]);
game.override.enemyMoveset([Moves.SPLASH]); game.override.enemyMoveset(SPLASH_ONLY);
}); });
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move) //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move)
@ -47,7 +45,6 @@ describe("Moves - FILLET AWAY", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
game.doAttack(getMovePosition(game.scene, 0, Moves.FILLET_AWAY)); game.doAttack(getMovePosition(game.scene, 0, Moves.FILLET_AWAY));
@ -65,7 +62,6 @@ describe("Moves - FILLET AWAY", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
//Here - BattleStat.SPD -> 0 and BattleStat.SPATK -> 3 //Here - BattleStat.SPD -> 0 and BattleStat.SPATK -> 3
@ -87,7 +83,6 @@ describe("Moves - FILLET AWAY", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
leadPokemon.summonData.battleStats[BattleStat.ATK] = 6; leadPokemon.summonData.battleStats[BattleStat.ATK] = 6;
leadPokemon.summonData.battleStats[BattleStat.SPATK] = 6; leadPokemon.summonData.battleStats[BattleStat.SPATK] = 6;
@ -108,7 +103,6 @@ describe("Moves - FILLET AWAY", () => {
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon(); const leadPokemon = game.scene.getPlayerPokemon();
expect(leadPokemon).toBeDefined();
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
leadPokemon.hp = hpLost - PREDAMAGE; leadPokemon.hp = hpLost - PREDAMAGE;

View File

@ -2,13 +2,13 @@ import { BattleStat } from "#app/data/battle-stat";
import { Species } from "#app/enums/species.js"; import { Species } from "#app/enums/species.js";
import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { DamagePhase, TurnEndPhase } from "#app/phases"; import { DamagePhase, TurnEndPhase } from "#app/phases";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
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 { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Moves - Fissure", () => { describe("Moves - Fissure", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,14 +1,10 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Overrides from "#app/overrides";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { import { SelectTargetPhase, TurnEndPhase } from "#app/phases";
SelectTargetPhase,
TurnEndPhase,
} from "#app/phases";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { allAbilities } from "#app/data/ability.js"; import { allAbilities } from "#app/data/ability.js";
import Pokemon from "#app/field/pokemon.js"; import Pokemon from "#app/field/pokemon.js";
@ -40,14 +36,14 @@ describe("Moves - Flame Burst", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double"); game.override.battleType("double");
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.FLAME_BURST, Moves.SPLASH]); game.override.moveset([Moves.FLAME_BURST, Moves.SPLASH]);
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); game.override.disableCrits();
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE); game.override.ability(Abilities.UNNERVE);
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4); game.override.startingWave(4);
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(new Array(4).fill(Moves.SPLASH)); game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));
}); });
it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => { it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => {
@ -65,7 +61,7 @@ describe("Moves - Flame Burst", () => {
}); });
it("does not inflict damage to the target's ally if the target was not affected by Flame Burst", async () => { it("does not inflict damage to the target's ally if the target was not affected by Flame Burst", async () => {
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.FLASH_FIRE); game.override.enemyAbility(Abilities.FLASH_FIRE);
await game.startBattle([Species.PIKACHU, Species.PIKACHU]); await game.startBattle([Species.PIKACHU, Species.PIKACHU]);
const [ leftEnemy, rightEnemy ] = game.scene.getEnemyField(); const [ leftEnemy, rightEnemy ] = game.scene.getEnemyField();

View File

@ -2,17 +2,15 @@ import { BattleStat } from "#app/data/battle-stat.js";
import { SemiInvulnerableTag } from "#app/data/battler-tags.js"; import { SemiInvulnerableTag } from "#app/data/battler-tags.js";
import { Type } from "#app/data/type.js"; import { Type } from "#app/data/type.js";
import { Biome } from "#app/enums/biome.js"; import { Biome } from "#app/enums/biome.js";
import { import { TurnEndPhase } from "#app/phases";
TurnEndPhase, import GameManager from "#test/utils/gameManager";
} from "#app/phases"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
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 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";
import { SPLASH_ONLY } from "../utils/testUtils"; import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Moves - Flower Shield", () => { describe("Moves - Flower Shield", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,13 +1,9 @@
import { BattlerIndex } from "#app/battle.js"; import { BattlerIndex } from "#app/battle.js";
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
import { import { CommandPhase, SelectTargetPhase, TurnEndPhase } from "#app/phases";
CommandPhase, import GameManager from "#test/utils/gameManager";
SelectTargetPhase, import { getMovePosition } from "#test/utils/gameManagerUtils";
TurnEndPhase,
} from "#app/phases";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";

View File

@ -1,8 +1,7 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
@ -25,16 +24,16 @@ describe("Moves - Fusion Bolt", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ fusionBolt ]); game.override.moveset([ fusionBolt ]);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1); game.override.startingLevel(1);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RESHIRAM); game.override.enemySpecies(Species.RESHIRAM);
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ROUGH_SKIN); game.override.enemyAbility(Abilities.ROUGH_SKIN);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]); game.override.enemyMoveset([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]);
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single"); game.override.battleType("single");
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(97); game.override.startingWave(97);
vi.spyOn(overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); game.override.disableCrits();
}); });
it("should not make contact", async() => { it("should not make contact", async() => {

View File

@ -1,9 +1,8 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides";
import { TurnStartPhase } from "#app/phases"; import { TurnStartPhase } from "#app/phases";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { StatusEffect } from "#app/data/status-effect"; import { StatusEffect } from "#app/data/status-effect";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
@ -26,15 +25,15 @@ describe("Moves - Fusion Flare", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ fusionFlare ]); game.override.moveset([ fusionFlare ]);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1); game.override.startingLevel(1);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RESHIRAM); game.override.enemySpecies(Species.RESHIRAM);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.REST, Moves.REST, Moves.REST, Moves.REST ]); game.override.enemyMoveset([ Moves.REST, Moves.REST, Moves.REST, Moves.REST ]);
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single"); game.override.battleType("single");
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(97); game.override.startingWave(97);
vi.spyOn(overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); game.override.disableCrits();
}); });
it("should thaw freeze status condition", async() => { it("should thaw freeze status condition", async() => {

View File

@ -1,9 +1,8 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import overrides from "#app/overrides";
import { MoveEffectPhase, MovePhase, MoveEndPhase, TurnStartPhase, DamagePhase } from "#app/phases"; import { MoveEffectPhase, MovePhase, MoveEndPhase, TurnStartPhase, DamagePhase } from "#app/phases";
import { getMovePosition } from "#app/test/utils/gameManagerUtils"; import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Stat } from "#app/data/pokemon-stat"; import { Stat } from "#app/data/pokemon-stat";
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/move";
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
@ -29,15 +28,15 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ fusionFlare.id, fusionBolt.id ]); game.override.moveset([ fusionFlare.id, fusionBolt.id ]);
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1); game.override.startingLevel(1);
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RESHIRAM); game.override.enemySpecies(Species.RESHIRAM);
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.REST, Moves.REST, Moves.REST, Moves.REST ]); game.override.enemyMoveset([ Moves.REST, Moves.REST, Moves.REST, Moves.REST ]);
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double"); game.override.battleType("double");
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(97); game.override.startingWave(97);
vi.spyOn(overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); game.override.disableCrits();
vi.spyOn(fusionFlare, "calculateBattlePower"); vi.spyOn(fusionFlare, "calculateBattlePower");
vi.spyOn(fusionBolt, "calculateBattlePower"); vi.spyOn(fusionBolt, "calculateBattlePower");
@ -133,7 +132,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
}, 20000); }, 20000);
it("FUSION_FLARE should not double power of subsequent FUSION_BOLT if a move succeeded in between", async() => { it("FUSION_FLARE should not double power of subsequent FUSION_BOLT if a move succeeded in between", async() => {
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]); game.override.enemyMoveset([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]);
await game.startBattle([ await game.startBattle([
Species.ZEKROM, Species.ZEKROM,
Species.ZEKROM Species.ZEKROM
@ -194,7 +193,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
}, 20000); }, 20000);
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves", async() => { it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves", async() => {
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ fusionFlare.id, fusionFlare.id, fusionFlare.id, fusionFlare.id ]); game.override.enemyMoveset([ fusionFlare.id, fusionFlare.id, fusionFlare.id, fusionFlare.id ]);
await game.startBattle([ await game.startBattle([
Species.ZEKROM, Species.ZEKROM,
Species.ZEKROM Species.ZEKROM
@ -258,7 +257,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
}, 20000); }, 20000);
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves if moves are aimed at allies", async() => { it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves if moves are aimed at allies", async() => {
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ fusionFlare.id, fusionFlare.id, fusionFlare.id, fusionFlare.id ]); game.override.enemyMoveset([ fusionFlare.id, fusionFlare.id, fusionFlare.id, fusionFlare.id ]);
await game.startBattle([ await game.startBattle([
Species.ZEKROM, Species.ZEKROM,
Species.ZEKROM Species.ZEKROM

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