mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Merge branch 'beta' into substitute
This commit is contained in:
commit
1af937a845
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@ -205,7 +205,11 @@ export class Egg {
|
||||
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
|
||||
// or if the same species egg hits the chance
|
||||
|
@ -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 {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
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;
|
||||
switch (weatherType) {
|
||||
case WeatherType.SUNNY:
|
||||
case WeatherType.SANDSTORM:
|
||||
case WeatherType.HARSH_SUN:
|
||||
accuracy.value = 50;
|
||||
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
|
||||
* against Pokemon with the {@linkcode BattlerTagType.MINIMIZED}
|
||||
@ -8572,17 +8596,17 @@ export function initMoves() {
|
||||
.attr(AddArenaTrapTagHitAttr, ArenaTagType.SPIKES)
|
||||
.slicingMove(),
|
||||
new AttackMove(Moves.BLEAKWIND_STORM, Type.FLYING, MoveCategory.SPECIAL, 100, 80, 10, 30, 0, 8)
|
||||
.attr(ThunderAccuracyAttr)
|
||||
.attr(StormAccuracyAttr)
|
||||
.attr(StatChangeAttr, BattleStat.SPD, -1)
|
||||
.windMove()
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
new AttackMove(Moves.WILDBOLT_STORM, Type.ELECTRIC, MoveCategory.SPECIAL, 100, 80, 10, 20, 0, 8)
|
||||
.attr(ThunderAccuracyAttr)
|
||||
.attr(StormAccuracyAttr)
|
||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS)
|
||||
.windMove()
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
new AttackMove(Moves.SANDSEAR_STORM, Type.GROUND, MoveCategory.SPECIAL, 100, 80, 10, 20, 0, 8)
|
||||
.attr(ThunderAccuracyAttr)
|
||||
.attr(StormAccuracyAttr)
|
||||
.attr(StatusEffectAttr, StatusEffect.BURN)
|
||||
.windMove()
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
|
@ -3319,14 +3319,14 @@ export const starterPassiveAbilities = {
|
||||
[Species.SQUIRTLE]: Abilities.STURDY,
|
||||
[Species.CATERPIE]: Abilities.MAGICIAN,
|
||||
[Species.WEEDLE]: Abilities.TINTED_LENS,
|
||||
[Species.PIDGEY]: Abilities.GALE_WINGS,
|
||||
[Species.PIDGEY]: Abilities.FLARE_BOOST,
|
||||
[Species.RATTATA]: Abilities.STRONG_JAW,
|
||||
[Species.SPEAROW]: Abilities.MOXIE,
|
||||
[Species.EKANS]: Abilities.REGENERATOR,
|
||||
[Species.SANDSHREW]: Abilities.TOUGH_CLAWS,
|
||||
[Species.NIDORAN_F]: Abilities.FLARE_BOOST,
|
||||
[Species.NIDORAN_M]: Abilities.GUTS,
|
||||
[Species.VULPIX]: Abilities.SOLAR_POWER,
|
||||
[Species.VULPIX]: Abilities.FUR_COAT,
|
||||
[Species.ZUBAT]: Abilities.INTIMIDATE,
|
||||
[Species.ODDISH]: Abilities.TRIAGE,
|
||||
[Species.PARAS]: Abilities.TRIAGE,
|
||||
@ -3345,16 +3345,16 @@ export const starterPassiveAbilities = {
|
||||
[Species.PONYTA]: Abilities.MAGIC_GUARD,
|
||||
[Species.SLOWPOKE]: Abilities.UNAWARE,
|
||||
[Species.MAGNEMITE]: Abilities.LEVITATE,
|
||||
[Species.FARFETCHD]: Abilities.HUGE_POWER,
|
||||
[Species.FARFETCHD]: Abilities.SNIPER,
|
||||
[Species.DODUO]: Abilities.PARENTAL_BOND,
|
||||
[Species.SEEL]: Abilities.WATER_BUBBLE,
|
||||
[Species.GRIMER]: Abilities.WATER_ABSORB,
|
||||
[Species.SHELLDER]: Abilities.ICE_SCALES,
|
||||
[Species.GASTLY]: Abilities.SHADOW_SHIELD,
|
||||
[Species.ONIX]: Abilities.ROCKY_PAYLOAD,
|
||||
[Species.DROWZEE]: Abilities.BAD_DREAMS,
|
||||
[Species.DROWZEE]: Abilities.MAGICIAN,
|
||||
[Species.KRABBY]: Abilities.UNBURDEN,
|
||||
[Species.VOLTORB]: Abilities.ELECTRIC_SURGE,
|
||||
[Species.VOLTORB]: Abilities.TRANSISTOR,
|
||||
[Species.EXEGGCUTE]: Abilities.RIPEN,
|
||||
[Species.CUBONE]: Abilities.PARENTAL_BOND,
|
||||
[Species.LICKITUNG]: Abilities.THICK_FAT,
|
||||
@ -3374,7 +3374,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.EEVEE]: Abilities.SIMPLE,
|
||||
[Species.PORYGON]: Abilities.PROTEAN,
|
||||
[Species.OMANYTE]: Abilities.STURDY,
|
||||
[Species.KABUTO]: Abilities.SHARPNESS,
|
||||
[Species.KABUTO]: Abilities.TOUGH_CLAWS,
|
||||
[Species.AERODACTYL]: Abilities.ORICHALCUM_PULSE,
|
||||
[Species.ARTICUNO]: Abilities.SNOW_WARNING,
|
||||
[Species.ZAPDOS]: Abilities.DRIZZLE,
|
||||
@ -3476,7 +3476,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.CACNEA]: Abilities.SAND_RUSH,
|
||||
[Species.SWABLU]: Abilities.ADAPTABILITY,
|
||||
[Species.ZANGOOSE]: Abilities.POISON_HEAL,
|
||||
[Species.SEVIPER]: Abilities.INTIMIDATE,
|
||||
[Species.SEVIPER]: Abilities.MULTISCALE,
|
||||
[Species.LUNATONE]: Abilities.SHADOW_SHIELD,
|
||||
[Species.SOLROCK]: Abilities.DROUGHT,
|
||||
[Species.BARBOACH]: Abilities.SIMPLE,
|
||||
@ -3495,16 +3495,16 @@ export const starterPassiveAbilities = {
|
||||
[Species.SNORUNT]: Abilities.SNOW_WARNING,
|
||||
[Species.SPHEAL]: Abilities.UNAWARE,
|
||||
[Species.CLAMPERL]: Abilities.DRIZZLE,
|
||||
[Species.RELICANTH]: Abilities.SOLID_ROCK,
|
||||
[Species.RELICANTH]: Abilities.PRIMORDIAL_SEA,
|
||||
[Species.LUVDISC]: Abilities.MULTISCALE,
|
||||
[Species.BAGON]: Abilities.ADAPTABILITY,
|
||||
[Species.BAGON]: Abilities.DRAGONS_MAW,
|
||||
[Species.BELDUM]: Abilities.LEVITATE,
|
||||
[Species.REGIROCK]: Abilities.SAND_STREAM,
|
||||
[Species.REGICE]: Abilities.SNOW_WARNING,
|
||||
[Species.REGISTEEL]: Abilities.FILTER,
|
||||
[Species.LATIAS]: Abilities.SOUL_HEART,
|
||||
[Species.LATIAS]: Abilities.PRISM_ARMOR,
|
||||
[Species.LATIOS]: Abilities.TINTED_LENS,
|
||||
[Species.KYOGRE]: Abilities.RAIN_DISH,
|
||||
[Species.KYOGRE]: Abilities.MOLD_BREAKER,
|
||||
[Species.GROUDON]: Abilities.TURBOBLAZE,
|
||||
[Species.RAYQUAZA]: Abilities.UNNERVE,
|
||||
[Species.JIRACHI]: Abilities.COMATOSE,
|
||||
@ -3523,7 +3523,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.COMBEE]: Abilities.INTIMIDATE,
|
||||
[Species.PACHIRISU]: Abilities.HONEY_GATHER,
|
||||
[Species.BUIZEL]: Abilities.MOXIE,
|
||||
[Species.CHERUBI]: Abilities.DROUGHT,
|
||||
[Species.CHERUBI]: Abilities.ORICHALCUM_PULSE,
|
||||
[Species.SHELLOS]: Abilities.REGENERATOR,
|
||||
[Species.DRIFLOON]: Abilities.MAGIC_GUARD,
|
||||
[Species.BUNEARY]: Abilities.ADAPTABILITY,
|
||||
@ -3537,13 +3537,13 @@ export const starterPassiveAbilities = {
|
||||
[Species.CHATOT]: Abilities.PUNK_ROCK,
|
||||
[Species.SPIRITOMB]: Abilities.VESSEL_OF_RUIN,
|
||||
[Species.GIBLE]: Abilities.SAND_STREAM,
|
||||
[Species.MUNCHLAX]: Abilities.RIPEN,
|
||||
[Species.MUNCHLAX]: Abilities.HARVEST,
|
||||
[Species.RIOLU]: Abilities.MINDS_EYE,
|
||||
[Species.HIPPOPOTAS]: Abilities.UNAWARE,
|
||||
[Species.SKORUPI]: Abilities.SUPER_LUCK,
|
||||
[Species.CROAGUNK]: Abilities.MOXIE,
|
||||
[Species.CARNIVINE]: Abilities.ARENA_TRAP,
|
||||
[Species.FINNEON]: Abilities.DRIZZLE,
|
||||
[Species.FINNEON]: Abilities.WATER_BUBBLE,
|
||||
[Species.MANTYKE]: Abilities.UNAWARE,
|
||||
[Species.SNOVER]: Abilities.THICK_FAT,
|
||||
[Species.ROTOM]: Abilities.HADRON_ENGINE,
|
||||
@ -3557,7 +3557,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.GIRATINA]: Abilities.SHADOW_SHIELD,
|
||||
[Species.CRESSELIA]: Abilities.MAGIC_BOUNCE,
|
||||
[Species.PHIONE]: Abilities.SIMPLE,
|
||||
[Species.MANAPHY]: Abilities.SIMPLE,
|
||||
[Species.MANAPHY]: Abilities.PRIMORDIAL_SEA,
|
||||
[Species.DARKRAI]: Abilities.UNNERVE,
|
||||
[Species.SHAYMIN]: Abilities.WIND_RIDER,
|
||||
[Species.ARCEUS]: Abilities.ADAPTABILITY,
|
||||
@ -3590,13 +3590,13 @@ export const starterPassiveAbilities = {
|
||||
[Species.SANDILE]: Abilities.TOUGH_CLAWS,
|
||||
[Species.DARUMAKA]: Abilities.GORILLA_TACTICS,
|
||||
[Species.MARACTUS]: Abilities.WELL_BAKED_BODY,
|
||||
[Species.DWEBBLE]: Abilities.ANGER_SHELL,
|
||||
[Species.DWEBBLE]: Abilities.ROCKY_PAYLOAD,
|
||||
[Species.SCRAGGY]: Abilities.PROTEAN,
|
||||
[Species.SIGILYPH]: Abilities.MAGICIAN,
|
||||
[Species.SIGILYPH]: Abilities.FLARE_BOOST,
|
||||
[Species.YAMASK]: Abilities.PURIFYING_SALT,
|
||||
[Species.TIRTOUGA]: Abilities.ANGER_SHELL,
|
||||
[Species.TIRTOUGA]: Abilities.WATER_ABSORB,
|
||||
[Species.ARCHEN]: Abilities.MULTISCALE,
|
||||
[Species.TRUBBISH]: Abilities.TOXIC_DEBRIS,
|
||||
[Species.TRUBBISH]: Abilities.NEUTRALIZING_GAS,
|
||||
[Species.ZORUA]: Abilities.DARK_AURA,
|
||||
[Species.MINCCINO]: Abilities.FUR_COAT,
|
||||
[Species.GOTHITA]: Abilities.UNNERVE,
|
||||
@ -3611,7 +3611,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.ALOMOMOLA]: Abilities.MULTISCALE,
|
||||
[Species.JOLTIK]: Abilities.TRANSISTOR,
|
||||
[Species.FERROSEED]: Abilities.ROUGH_SKIN,
|
||||
[Species.KLINK]: Abilities.STEELWORKER,
|
||||
[Species.KLINK]: Abilities.STEELY_SPIRIT,
|
||||
[Species.TYNAMO]: Abilities.POISON_HEAL,
|
||||
[Species.ELGYEM]: Abilities.PRISM_ARMOR,
|
||||
[Species.LITWICK]: Abilities.SOUL_HEART,
|
||||
@ -3625,7 +3625,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.GOLETT]: Abilities.SHADOW_SHIELD,
|
||||
[Species.PAWNIARD]: Abilities.SWORD_OF_RUIN,
|
||||
[Species.BOUFFALANT]: Abilities.ROCK_HEAD,
|
||||
[Species.RUFFLET]: Abilities.GALE_WINGS,
|
||||
[Species.RUFFLET]: Abilities.SPEED_BOOST,
|
||||
[Species.VULLABY]: Abilities.THICK_FAT,
|
||||
[Species.HEATMOR]: Abilities.CONTRARY,
|
||||
[Species.DURANT]: Abilities.COMPOUND_EYES,
|
||||
@ -3651,12 +3651,12 @@ export const starterPassiveAbilities = {
|
||||
[Species.SCATTERBUG]: Abilities.PRANKSTER,
|
||||
[Species.LITLEO]: Abilities.BEAST_BOOST,
|
||||
[Species.FLABEBE]: Abilities.GRASSY_SURGE,
|
||||
[Species.SKIDDO]: Abilities.GRASSY_SURGE,
|
||||
[Species.SKIDDO]: Abilities.SEED_SOWER,
|
||||
[Species.PANCHAM]: Abilities.FUR_COAT,
|
||||
[Species.FURFROU]: Abilities.FLUFFY,
|
||||
[Species.ESPURR]: Abilities.FUR_COAT,
|
||||
[Species.HONEDGE]: Abilities.SHARPNESS,
|
||||
[Species.SPRITZEE]: Abilities.MISTY_SURGE,
|
||||
[Species.SPRITZEE]: Abilities.FUR_COAT,
|
||||
[Species.SWIRLIX]: Abilities.WELL_BAKED_BODY,
|
||||
[Species.INKAY]: Abilities.UNNERVE,
|
||||
[Species.BINACLE]: Abilities.SAP_SIPPER,
|
||||
@ -3670,17 +3670,17 @@ export const starterPassiveAbilities = {
|
||||
[Species.CARBINK]: Abilities.SOLID_ROCK,
|
||||
[Species.GOOMY]: Abilities.REGENERATOR,
|
||||
[Species.KLEFKI]: Abilities.LEVITATE,
|
||||
[Species.PHANTUMP]: Abilities.RIPEN,
|
||||
[Species.PHANTUMP]: Abilities.SHADOW_TAG,
|
||||
[Species.PUMPKABOO]: Abilities.WELL_BAKED_BODY,
|
||||
[Species.BERGMITE]: Abilities.ICE_SCALES,
|
||||
[Species.NOIBAT]: Abilities.PUNK_ROCK,
|
||||
[Species.XERNEAS]: Abilities.MISTY_SURGE,
|
||||
[Species.XERNEAS]: Abilities.HARVEST,
|
||||
[Species.YVELTAL]: Abilities.SOUL_HEART,
|
||||
[Species.ZYGARDE]: Abilities.HUGE_POWER,
|
||||
[Species.DIANCIE]: Abilities.LEVITATE,
|
||||
[Species.HOOPA]: Abilities.OPPORTUNIST,
|
||||
[Species.VOLCANION]: Abilities.FILTER,
|
||||
[Species.ROWLET]: Abilities.UNBURDEN,
|
||||
[Species.ROWLET]: Abilities.SNIPER,
|
||||
[Species.LITTEN]: Abilities.FUR_COAT,
|
||||
[Species.POPPLIO]: Abilities.PUNK_ROCK,
|
||||
[Species.PIKIPEK]: Abilities.TECHNICIAN,
|
||||
@ -3714,7 +3714,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.BRUXISH]: Abilities.MULTISCALE,
|
||||
[Species.DRAMPA]: Abilities.THICK_FAT,
|
||||
[Species.DHELMISE]: Abilities.WATER_BUBBLE,
|
||||
[Species.JANGMO_O]: Abilities.PUNK_ROCK,
|
||||
[Species.JANGMO_O]: Abilities.DAUNTLESS_SHIELD,
|
||||
[Species.TAPU_KOKO]: Abilities.TRANSISTOR,
|
||||
[Species.TAPU_LELE]: Abilities.SHEER_FORCE,
|
||||
[Species.TAPU_BULU]: Abilities.TRIAGE,
|
||||
@ -3726,7 +3726,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.XURKITREE]: Abilities.TRANSISTOR,
|
||||
[Species.CELESTEELA]: Abilities.HEATPROOF,
|
||||
[Species.KARTANA]: Abilities.SHARPNESS,
|
||||
[Species.GUZZLORD]: Abilities.INNARDS_OUT,
|
||||
[Species.GUZZLORD]: Abilities.POISON_HEAL,
|
||||
[Species.NECROZMA]: Abilities.BEAST_BOOST,
|
||||
[Species.MAGEARNA]: Abilities.STEELY_SPIRIT,
|
||||
[Species.MARSHADOW]: Abilities.IRON_FIST,
|
||||
@ -3738,13 +3738,13 @@ export const starterPassiveAbilities = {
|
||||
[Species.GROOKEY]: Abilities.GRASS_PELT,
|
||||
[Species.SCORBUNNY]: Abilities.NO_GUARD,
|
||||
[Species.SOBBLE]: Abilities.SUPER_LUCK,
|
||||
[Species.SKWOVET]: Abilities.RIPEN,
|
||||
[Species.SKWOVET]: Abilities.HARVEST,
|
||||
[Species.ROOKIDEE]: Abilities.IRON_BARBS,
|
||||
[Species.BLIPBUG]: Abilities.PSYCHIC_SURGE,
|
||||
[Species.NICKIT]: Abilities.MAGICIAN,
|
||||
[Species.GOSSIFLEUR]: Abilities.GRASSY_SURGE,
|
||||
[Species.WOOLOO]: Abilities.SIMPLE,
|
||||
[Species.CHEWTLE]: Abilities.ROCK_HEAD,
|
||||
[Species.CHEWTLE]: Abilities.ROCKY_PAYLOAD,
|
||||
[Species.YAMPER]: Abilities.SHEER_FORCE,
|
||||
[Species.ROLYCOLY]: Abilities.SOLID_ROCK,
|
||||
[Species.APPLIN]: Abilities.DRAGONS_MAW,
|
||||
@ -3757,7 +3757,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.SINISTEA]: Abilities.SHADOW_SHIELD,
|
||||
[Species.HATENNA]: Abilities.FAIRY_AURA,
|
||||
[Species.IMPIDIMP]: Abilities.FUR_COAT,
|
||||
[Species.MILCERY]: Abilities.MISTY_SURGE,
|
||||
[Species.MILCERY]: Abilities.REGENERATOR,
|
||||
[Species.FALINKS]: Abilities.PARENTAL_BOND,
|
||||
[Species.PINCURCHIN]: Abilities.ELECTROMORPHOSIS,
|
||||
[Species.SNOM]: Abilities.SNOW_WARNING,
|
||||
@ -3776,7 +3776,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.ZAMAZENTA]: Abilities.STAMINA,
|
||||
[Species.ETERNATUS]: Abilities.SUPREME_OVERLORD,
|
||||
[Species.KUBFU]: Abilities.IRON_FIST,
|
||||
[Species.ZARUDE]: Abilities.GRASSY_SURGE,
|
||||
[Species.ZARUDE]: Abilities.TOUGH_CLAWS,
|
||||
[Species.REGIELEKI]: Abilities.ELECTRIC_SURGE,
|
||||
[Species.REGIDRAGO]: Abilities.MULTISCALE,
|
||||
[Species.GLASTRIER]: Abilities.FILTER,
|
||||
@ -3785,7 +3785,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.ENAMORUS]: Abilities.FAIRY_AURA,
|
||||
[Species.SPRIGATITO]: Abilities.MAGICIAN,
|
||||
[Species.FUECOCO]: Abilities.PUNK_ROCK,
|
||||
[Species.QUAXLY]: Abilities.DEFIANT,
|
||||
[Species.QUAXLY]: Abilities.OPPORTUNIST,
|
||||
[Species.LECHONK]: Abilities.SIMPLE,
|
||||
[Species.TAROUNTULA]: Abilities.HONEY_GATHER,
|
||||
[Species.NYMBLE]: Abilities.GUTS,
|
||||
@ -3833,7 +3833,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.IRON_MOTH]: Abilities.LEVITATE,
|
||||
[Species.IRON_THORNS]: Abilities.SAND_STREAM,
|
||||
[Species.FRIGIBAX]: Abilities.SNOW_WARNING,
|
||||
[Species.GIMMIGHOUL]: Abilities.CONTRARY,
|
||||
[Species.GIMMIGHOUL]: Abilities.HONEY_GATHER,
|
||||
[Species.WO_CHIEN]: Abilities.VESSEL_OF_RUIN,
|
||||
[Species.CHIEN_PAO]: Abilities.INTREPID_SWORD,
|
||||
[Species.TING_LU]: Abilities.STAMINA,
|
||||
@ -3864,7 +3864,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.ALOLA_GRIMER]: Abilities.TOXIC_DEBRIS,
|
||||
[Species.ETERNAL_FLOETTE]: Abilities.MAGIC_GUARD,
|
||||
[Species.GALAR_MEOWTH]: Abilities.STEELWORKER,
|
||||
[Species.GALAR_PONYTA]: Abilities.PIXILATE,
|
||||
[Species.GALAR_PONYTA]: Abilities.MOXIE,
|
||||
[Species.GALAR_SLOWPOKE]: Abilities.UNAWARE,
|
||||
[Species.GALAR_FARFETCHD]: Abilities.INTREPID_SWORD,
|
||||
[Species.GALAR_ARTICUNO]: Abilities.SERENE_GRACE,
|
||||
@ -3876,7 +3876,7 @@ export const starterPassiveAbilities = {
|
||||
[Species.GALAR_YAMASK]: Abilities.TABLETS_OF_RUIN,
|
||||
[Species.GALAR_STUNFISK]: Abilities.ARENA_TRAP,
|
||||
[Species.HISUI_GROWLITHE]: Abilities.RECKLESS,
|
||||
[Species.HISUI_VOLTORB]: Abilities.ELECTRIC_SURGE,
|
||||
[Species.HISUI_VOLTORB]: Abilities.TRANSISTOR,
|
||||
[Species.HISUI_QWILFISH]: Abilities.MERCILESS,
|
||||
[Species.HISUI_SNEASEL]: Abilities.SCRAPPY,
|
||||
[Species.HISUI_ZORUA]: Abilities.ADAPTABILITY,
|
||||
|
@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
|
||||
"MONO_FAIRY": {
|
||||
name: "Ein ewiges Abenteuer!",
|
||||
},
|
||||
"FRESH_START": {
|
||||
name: "Hussa, noch einmal von vorn!",
|
||||
description: "Schließe die 'Neuanfang' Herausforderung ab"
|
||||
}
|
||||
} as const;
|
||||
|
||||
// Achievement translations for the when the player character is female
|
||||
@ -373,5 +377,6 @@ export const PGFachv: AchievementTranslationEntries = {
|
||||
"MONO_DRAGON": PGMachv.MONO_DRAGON,
|
||||
"MONO_DARK": PGMachv.MONO_DARK,
|
||||
"MONO_FAIRY": PGMachv.MONO_FAIRY,
|
||||
"FRESH_START": PGMachv.FRESH_START
|
||||
} as const;
|
||||
|
||||
|
@ -266,7 +266,7 @@ export const PGMachv: AchievementTranslationEntries = {
|
||||
},
|
||||
"FRESH_START": {
|
||||
name: "First Try!",
|
||||
description: "Complete the fresh start challenge."
|
||||
description: "Complete the Fresh Start challenge."
|
||||
}
|
||||
} as const;
|
||||
|
||||
|
@ -25,7 +25,7 @@ export const challenges: TranslationEntries = {
|
||||
},
|
||||
"freshStart": {
|
||||
"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.1": "On",
|
||||
}
|
||||
|
@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
|
||||
"MONO_FAIRY": {
|
||||
name: "Mono FAIRY",
|
||||
},
|
||||
"FRESH_START": {
|
||||
name: "First Try!",
|
||||
description: "Complete the Fresh Start challenge."
|
||||
}
|
||||
} as const;
|
||||
|
||||
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version)
|
||||
|
@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
|
||||
"desc": "Solo puedes usar Pokémon with the {{type}} type.",
|
||||
"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;
|
||||
|
@ -61,7 +61,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"hpIsFull": "Les PV de {{pokemonName}}\nsont au maximum !",
|
||||
"skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre d’objet ?",
|
||||
"eggHatching": "Hein ?",
|
||||
"ivScannerUseQuestion": "Utiliser le Scanner d’IV sur {{pokemonName}} ?",
|
||||
"ivScannerUseQuestion": "Utiliser le Scanner d’IV\nsur {{pokemonName}} ?",
|
||||
"wildPokemonWithAffix": "{{pokemonName}} sauvage",
|
||||
"foePokemonWithAffix": "{{pokemonName}} ennemi",
|
||||
"useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !",
|
||||
@ -74,21 +74,21 @@ export const battle: SimpleTranslationEntries = {
|
||||
"statsAnd": "et",
|
||||
"stats": "Les stats",
|
||||
"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_other": "{{stats}} de {{pokemonNameWithAffix}}\naugmentent beaucoup !",
|
||||
"statSharplyRose_other": "{{stats}}\nde {{pokemonNameWithAffix}} augmentent beaucoup !",
|
||||
"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_other": "{{stats}} de {{pokemonNameWithAffix}}\nne peuvent plus augmenter !",
|
||||
"statWontGoAnyHigher_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus augmenter !",
|
||||
"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_other": "{{stats}} de {{pokemonNameWithAffix}}\nbaissent beaucoup !",
|
||||
"statHarshlyFell_other": "{{stats}}\nde {{pokemonNameWithAffix}} baissent beaucoup !",
|
||||
"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_other": "{{stats}} de {{pokemonNameWithAffix}}\nne peuvent plus baisser !",
|
||||
"statWontGoAnyLower_other": "{{stats}}\nde {{pokemonNameWithAffix}} ne peuvent plus baisser !",
|
||||
"transformedIntoType": "{{pokemonName}} transformed\ninto the {{type}} type!",
|
||||
"ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !",
|
||||
"retryBattle": "Voulez-vous réessayer depuis le début du combat ?",
|
||||
|
@ -7,7 +7,7 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"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 !",
|
||||
"gen1": "1G",
|
||||
"gen2": "2G",
|
||||
|
@ -99,7 +99,7 @@ export const PGMachv: AchievementTranslationEntries = {
|
||||
},
|
||||
"MEGA_EVOLVE": {
|
||||
name: "Megamorfosi",
|
||||
description: "Megaevolvi un pokémon",
|
||||
description: "Megaevolvi un Pokémon",
|
||||
},
|
||||
"GIGANTAMAX": {
|
||||
name: "Grosso e Cattivo",
|
||||
@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
|
||||
"MONO_FAIRY": {
|
||||
name: "Follettini e follettine",
|
||||
},
|
||||
"FRESH_START": {
|
||||
name: "First Try!",
|
||||
description: "Complete the Fresh Start challenge."
|
||||
}
|
||||
} as const;
|
||||
|
||||
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version)
|
||||
|
@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
|
||||
"desc": "Puoi usare solo Pokémon di tipo {{type}}.",
|
||||
"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;
|
||||
|
@ -13,18 +13,18 @@ export const filterBar: SimpleTranslationEntries = {
|
||||
"passive": "패시브",
|
||||
"passiveUnlocked": "패시브 해금",
|
||||
"passiveLocked": "패시브 잠김",
|
||||
"costReduction": "Cost Reduction",
|
||||
"costReductionUnlocked": "Cost Reduction Unlocked",
|
||||
"costReductionLocked": "Cost Reduction Locked",
|
||||
"costReduction": "코스트 줄이기",
|
||||
"costReductionUnlocked": "코스트 절감됨",
|
||||
"costReductionLocked": "코스트 절감 없음",
|
||||
"ribbon": "클리어 여부",
|
||||
"hasWon": "클리어 함",
|
||||
"hasNotwon": "클리어 안함",
|
||||
"hiddenAbility": "Hidden Ability",
|
||||
"hasHiddenAbility": "Hidden Ability - Yes",
|
||||
"noHiddenAbility": "Hidden Ability - No",
|
||||
"pokerus": "Pokerus",
|
||||
"hasPokerus": "Pokerus - Yes",
|
||||
"noPokerus": "Pokerus - No",
|
||||
"hasWon": "클리어 완료",
|
||||
"hasNotWon": "클리어 안함",
|
||||
"hiddenAbility": "숨겨진 특성",
|
||||
"hasHiddenAbility": "숨겨진 특성 보유",
|
||||
"noHiddenAbility": "숨겨진 특성 없음",
|
||||
"pokerus": "포켓러스",
|
||||
"hasPokerus": "포켓러스 감염",
|
||||
"noPokerus": "포켓러스 없음",
|
||||
"sortByNumber": "도감번호",
|
||||
"sortByCost": "코스트",
|
||||
"sortByCandies": "사탕 수",
|
||||
|
@ -7,7 +7,7 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam": "이 포켓몬들로 시작하시겠습니까?",
|
||||
"confirmExit": "Do you want to exit?",
|
||||
"confirmExit": "나가시겠습니까?",
|
||||
"invalidParty": "스타팅 포켓몬 파티에 적합하지 않습니다!",
|
||||
"gen1": "1세대",
|
||||
"gen2": "2세대",
|
||||
|
@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
|
||||
"desc": "Você só pode user Pokémon do tipo {{type}}.",
|
||||
"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;
|
||||
|
@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
|
||||
"MONO_FAIRY": {
|
||||
name: "林克,醒醒!",
|
||||
},
|
||||
"FRESH_START": {
|
||||
name: "First Try!",
|
||||
description: "Complete the Fresh Start challenge."
|
||||
}
|
||||
} as const;
|
||||
|
||||
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version)
|
||||
|
@ -22,4 +22,10 @@ export const challenges: TranslationEntries = {
|
||||
"desc": "你只能使用{{type}}\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;
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { CommandPhase, MessagePhase, TurnInitPhase } from "#app/phases";
|
||||
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 { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { MoveEffectPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -5,9 +5,9 @@ import { Species } from "#app/enums/species.js";
|
||||
import { CommandPhase, MessagePhase } from "#app/phases.js";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||
import GameManager from "../utils/gameManager";
|
||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
|
||||
@ -42,8 +42,6 @@ describe("Abilities - COSTAR", () => {
|
||||
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
|
||||
|
||||
let [leftPokemon, rightPokemon] = game.scene.getPlayerField();
|
||||
expect(leftPokemon).toBeDefined();
|
||||
expect(rightPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.NASTY_PLOT));
|
||||
await game.phaseInterceptor.to(CommandPhase);
|
||||
@ -73,8 +71,6 @@ describe("Abilities - COSTAR", () => {
|
||||
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
|
||||
|
||||
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);
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { Species } from "#app/enums/species.js";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
@ -83,7 +83,6 @@ describe("Abilities - Dry Skin", () => {
|
||||
await game.startBattle();
|
||||
|
||||
const enemy = game.scene.getEnemyPokemon();
|
||||
expect(enemy).toBeDefined();
|
||||
const initialHP = 1000;
|
||||
enemy.hp = initialHP;
|
||||
|
||||
|
@ -2,13 +2,13 @@ import { allMoves } from "#app/data/move.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { Stat } from "#app/enums/stat.js";
|
||||
import { DamagePhase, MoveEffectPhase } from "#app/phases.js";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,12 +1,7 @@
|
||||
import { QuietFormChangePhase } from "#app/form-change-phase";
|
||||
import {
|
||||
MoveEffectPhase,
|
||||
MoveEndPhase,
|
||||
TurnEndPhase,
|
||||
TurnInitPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { MoveEffectPhase, MoveEndPhase, TurnEndPhase, TurnInitPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { Moves } from "#enums/moves";
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import Overrides from "#app/overrides";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
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 { Status, StatusEffect } from "#app/data/status-effect";
|
||||
import { GameModes, getGameMode } from "#app/game-mode";
|
||||
@ -12,6 +11,7 @@ import { CommandPhase, DamagePhase, EncounterPhase, EnemyCommandPhase, SelectSta
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
describe("Abilities - Intimidate", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
@ -35,7 +35,7 @@ describe("Abilities - Intimidate", () => {
|
||||
game.override.enemyPassiveAbility(Abilities.HYDRATION);
|
||||
game.override.ability(Abilities.INTIMIDATE);
|
||||
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 () => {
|
||||
@ -294,7 +294,7 @@ describe("Abilities - Intimidate", () => {
|
||||
|
||||
it("single - trainer should only trigger once whatever turn we are", async () => {
|
||||
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);
|
||||
await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]);
|
||||
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 () => {
|
||||
game.override.battleType("double");
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "OPP_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{ name: "COIN_CASE" }]);
|
||||
await game.runToSummon([Species.MIGHTYENA]);
|
||||
await game.phaseInterceptor.to(CommandPhase, false);
|
||||
const battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { BattleStat } from "#app/data/battle-stat";
|
||||
import {
|
||||
CommandPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { CommandPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
|
@ -10,9 +10,9 @@ import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||
import GameManager from "../utils/gameManager";
|
||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import Phaser from "phaser";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import { TurnEndPhase, MoveEffectPhase } from "#app/phases";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||
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 { WeatherType } from "#app/data/weather.js";
|
||||
import { StatusEffect, getStatusEffectCatchRateMultiplier } from "#app/data/status-effect";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000; // 20 sec timeout
|
||||
|
||||
@ -33,16 +33,15 @@ describe("Abilities - Magic Guard", () => {
|
||||
game = new GameManager(phaserGame);
|
||||
|
||||
/** Player Pokemon overrides */
|
||||
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD);
|
||||
vi.spyOn(overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE);
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]);
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
game.override.ability(Abilities.MAGIC_GUARD);
|
||||
game.override.moveset([Moves.SPLASH]);
|
||||
game.override.startingLevel(100);
|
||||
|
||||
/** Enemy Pokemon overrides */
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
game.override.enemyMoveset(SPLASH_ONLY);
|
||||
game.override.enemyLevel(100);
|
||||
});
|
||||
|
||||
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Magic_Guard_(Ability)
|
||||
@ -50,15 +49,13 @@ describe("Abilities - Magic Guard", () => {
|
||||
it(
|
||||
"ability should prevent damage caused by weather",
|
||||
async () => {
|
||||
vi.spyOn(overrides, "WEATHER_OVERRIDE", "get").mockReturnValue(WeatherType.SANDSTORM);
|
||||
game.override.weather(WeatherType.SANDSTORM);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
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",
|
||||
async () => {
|
||||
//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]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||
|
||||
@ -105,16 +98,12 @@ describe("Abilities - Magic Guard", () => {
|
||||
it(
|
||||
"ability effect should not persist when the ability is replaced",
|
||||
async () => {
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED]);
|
||||
vi.spyOn(overrides, "STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.POISON);
|
||||
game.override.enemyMoveset([Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED,Moves.WORRY_SEED]);
|
||||
game.override.statusEffect(StatusEffect.POISON);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
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",
|
||||
async () => {
|
||||
vi.spyOn(overrides, "OPP_STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.BURN);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD);
|
||||
game.override.enemyStatusEffect(StatusEffect.BURN);
|
||||
game.override.enemyAbility(Abilities.MAGIC_GUARD);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect (leadPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
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",
|
||||
async () => {
|
||||
vi.spyOn(overrides, "OPP_STATUS_OVERRIDE", "get").mockReturnValue(StatusEffect.TOXIC);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD);
|
||||
game.override.enemyStatusEffect(StatusEffect.TOXIC);
|
||||
game.override.enemyAbility(Abilities.MAGIC_GUARD);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect (leadPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
const toxicStartCounter = enemyPokemon.status.turnCount;
|
||||
//should be 0
|
||||
@ -197,12 +178,10 @@ describe("Abilities - Magic Guard", () => {
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
|
||||
@ -225,12 +204,10 @@ describe("Abilities - Magic Guard", () => {
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
|
||||
@ -250,16 +227,14 @@ describe("Abilities - Magic Guard", () => {
|
||||
it("Magic Guard prevents against damage from volatile status effects",
|
||||
async () => {
|
||||
await game.startBattle([Species.DUSKULL]);
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.CURSE]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MAGIC_GUARD);
|
||||
game.override.moveset([Moves.CURSE]);
|
||||
game.override.enemyAbility(Abilities.MAGIC_GUARD);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect (leadPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.CURSE));
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
|
||||
@ -276,11 +251,10 @@ describe("Abilities - Magic Guard", () => {
|
||||
);
|
||||
|
||||
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]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.HIGH_JUMP_KICK));
|
||||
await game.phaseInterceptor.to(MoveEffectPhase, false);
|
||||
@ -297,11 +271,10 @@ describe("Abilities - Magic Guard", () => {
|
||||
);
|
||||
|
||||
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]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
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 () => {
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.STRUGGLE]);
|
||||
game.override.moveset([Moves.STRUGGLE]);
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
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
|
||||
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]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
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 () => {
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.BELLY_DRUM]);
|
||||
game.override.moveset([Moves.BELLY_DRUM]);
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
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() => {
|
||||
//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
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BAD_DREAMS);
|
||||
game.override.enemyMoveset([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]);
|
||||
game.override.enemyAbility(Abilities.BAD_DREAMS);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
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() => {
|
||||
//Tests the abilities Innards Out/Aftermath
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.AFTERMATH);
|
||||
game.override.moveset([Moves.TACKLE]);
|
||||
game.override.enemyAbility(Abilities.AFTERMATH);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
enemyPokemon.hp = 1;
|
||||
|
||||
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() => {
|
||||
//Tests the abilities Iron Barbs/Rough Skin
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.IRON_BARBS);
|
||||
game.override.moveset([Moves.TACKLE]);
|
||||
game.override.enemyAbility(Abilities.IRON_BARBS);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.TACKLE));
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
@ -464,16 +429,14 @@ describe("Abilities - Magic Guard", () => {
|
||||
|
||||
it("Magic Guard prevents damage from abilities with ReverseDrainAbAttr", async() => {
|
||||
//Tests the ability Liquid Ooze
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.LIQUID_OOZE);
|
||||
game.override.moveset([Moves.ABSORB]);
|
||||
game.override.enemyAbility(Abilities.LIQUID_OOZE);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.ABSORB));
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
@ -490,12 +453,11 @@ describe("Abilities - Magic Guard", () => {
|
||||
|
||||
it("Magic Guard prevents HP loss from abilities with PostWeatherLapseDamageAbAttr", async() => {
|
||||
//Tests the abilities Solar Power/Dry Skin
|
||||
vi.spyOn(overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SOLAR_POWER);
|
||||
vi.spyOn(overrides, "WEATHER_OVERRIDE", "get").mockReturnValue(WeatherType.SUNNY);
|
||||
game.override.passiveAbility(Abilities.SOLAR_POWER);
|
||||
game.override.weather(WeatherType.SUNNY);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
|
||||
|
@ -1,12 +1,8 @@
|
||||
import { BattleStat } from "#app/data/battle-stat";
|
||||
import { Stat } from "#app/data/pokemon-stat";
|
||||
import {
|
||||
CommandPhase,
|
||||
EnemyCommandPhase,
|
||||
VictoryPhase
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { CommandPhase, EnemyCommandPhase, VictoryPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
|
@ -8,9 +8,9 @@ import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||
import GameManager from "../utils/gameManager";
|
||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
|
||||
|
@ -1,14 +1,10 @@
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import Phaser from "phaser";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import {
|
||||
CommandPhase,
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import { CommandPhase, TurnEndPhase } from "#app/phases";
|
||||
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 { allAbilities } from "#app/data/ability.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
@ -30,11 +26,11 @@ describe("Abilities - Pastel Veil", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TOXIC_THREAD, Moves.TOXIC_THREAD, Moves.TOXIC_THREAD, Moves.TOXIC_THREAD]);
|
||||
game.override.battleType("double");
|
||||
game.override.moveset([Moves.SPLASH]);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
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 () => {
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { MoveEffectPhase, TurnEndPhase } from "#app/phases.js";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -10,9 +10,9 @@ import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||
import GameManager from "../utils/gameManager";
|
||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { allAbilities, BypassSpeedChanceAbAttr } from "#app/data/ability";
|
||||
import { FaintPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -1,10 +1,10 @@
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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";
|
||||
|
||||
|
||||
|
@ -7,8 +7,8 @@ import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||
import GameManager from "../utils/gameManager";
|
||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
|
||||
@ -45,10 +45,6 @@ describe("Abilities - Sand Veil", () => {
|
||||
await game.startBattle([Species.SNORLAX, Species.BLISSEY]);
|
||||
|
||||
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]);
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
import { BattleStat } from "#app/data/battle-stat.js";
|
||||
import { TerrainType } from "#app/data/terrain.js";
|
||||
import {
|
||||
MoveEndPhase, TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { MoveEndPhase, TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { Moves } from "#enums/moves";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ArenaTagType } from "#app/enums/arena-tag-type.js";
|
||||
import { PostSummonPhase, TurnEndPhase, } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -1,11 +1,8 @@
|
||||
import { applyAbAttrs, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability";
|
||||
import { Stat } from "#app/data/pokemon-stat";
|
||||
import {
|
||||
CommandPhase,
|
||||
MoveEffectPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { CommandPhase, MoveEffectPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import * as Utils from "#app/utils";
|
||||
|
@ -1,11 +1,8 @@
|
||||
import { applyAbAttrs, applyPostDefendAbAttrs, applyPreAttackAbAttrs, MoveEffectChanceMultiplierAbAttr, MovePowerBoostAbAttr, PostDefendTypeChangeAbAttr } from "#app/data/ability";
|
||||
import { Stat } from "#app/data/pokemon-stat";
|
||||
import {
|
||||
CommandPhase,
|
||||
MoveEffectPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { CommandPhase, MoveEffectPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import * as Utils from "#app/utils";
|
||||
|
@ -1,11 +1,8 @@
|
||||
import { applyAbAttrs, applyPreDefendAbAttrs, IgnoreMoveEffectsAbAttr, MoveEffectChanceMultiplierAbAttr } from "#app/data/ability";
|
||||
import { Stat } from "#app/data/pokemon-stat";
|
||||
import {
|
||||
CommandPhase,
|
||||
MoveEffectPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { CommandPhase, MoveEffectPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import * as Utils from "#app/utils";
|
||||
|
@ -2,13 +2,13 @@ import { allAbilities } from "#app/data/ability.js";
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { MoveEffectPhase, SelectTargetPhase } from "#app/phases.js";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,10 +1,7 @@
|
||||
import { EnemyPokemon } from "#app/field/pokemon.js";
|
||||
import {
|
||||
DamagePhase,
|
||||
MoveEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { DamagePhase, MoveEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -1,19 +1,14 @@
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import Phaser from "phaser";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import {
|
||||
CommandPhase,
|
||||
MoveEffectPhase,
|
||||
MovePhase,
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import { CommandPhase, MoveEffectPhase, MovePhase, TurnEndPhase } from "#app/phases";
|
||||
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 { Abilities } from "#app/enums/abilities.js";
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
describe("Abilities - Sweet Veil", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
@ -31,11 +26,11 @@ describe("Abilities - Sweet Veil", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.REST]);
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.POWDER, Moves.POWDER, Moves.POWDER, Moves.POWDER]);
|
||||
game.override.battleType("double");
|
||||
game.override.moveset([Moves.SPLASH, Moves.REST]);
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
game.override.enemyMoveset([Moves.POWDER, Moves.POWDER, Moves.POWDER, Moves.POWDER]);
|
||||
});
|
||||
|
||||
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 () => {
|
||||
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]);
|
||||
|
||||
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 () => {
|
||||
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]);
|
||||
|
||||
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 () => {
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.PIKACHU);
|
||||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]);
|
||||
game.override.enemySpecies(Species.PIKACHU);
|
||||
game.override.enemyLevel(5);
|
||||
game.override.startingLevel(5);
|
||||
game.override.enemyMoveset([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]);
|
||||
|
||||
await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]);
|
||||
|
||||
|
@ -4,8 +4,8 @@ import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||
import GameManager from "../utils/gameManager";
|
||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
import { BattleStat } from "#app/data/battle-stat.js";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { Moves } from "#enums/moves";
|
||||
|
@ -1,15 +1,13 @@
|
||||
import { BattlerTagType } from "#app/enums/battler-tag-type.js";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,15 +1,13 @@
|
||||
import { BattleStat } from "#app/data/battle-stat.js";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { allAbilities } from "#app/data/ability.js";
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { MoveEffectPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,20 +1,9 @@
|
||||
import { Stat } from "#app/data/pokemon-stat";
|
||||
import { Status, StatusEffect } from "#app/data/status-effect.js";
|
||||
import { QuietFormChangePhase } from "#app/form-change-phase";
|
||||
import {
|
||||
CommandPhase,
|
||||
DamagePhase,
|
||||
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 { CommandPhase, DamagePhase, EnemyCommandPhase, MessagePhase, PostSummonPhase, SwitchPhase, SwitchSummonPhase, TurnEndPhase, TurnInitPhase, TurnStartPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { TurnHeldItemTransferModifier } from "#app/modifier/modifier.js";
|
||||
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 Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
|
@ -1,12 +1,9 @@
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { ArenaTagType } from "#app/enums/arena-tag-type.js";
|
||||
import {
|
||||
MoveEffectPhase,
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { MoveEffectPhase, TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import { WeatherType } from "#app/data/weather.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import {
|
||||
MoveEffectPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { MoveEffectPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
|
@ -1,9 +1,7 @@
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
import {
|
||||
TurnStartPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { TurnStartPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -1,8 +1,4 @@
|
||||
import {
|
||||
BattleStat,
|
||||
getBattleStatLevelChangeDescription,
|
||||
getBattleStatName,
|
||||
} from "#app/data/battle-stat.js";
|
||||
import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "#app/data/battle-stat.js";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { arrayOfRange, mockI18next } from "./utils/testUtils";
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
import { Stat } from "#app/data/pokemon-stat";
|
||||
import {
|
||||
CommandPhase, EnemyCommandPhase, SelectTargetPhase,
|
||||
TurnStartPhase
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { CommandPhase, EnemyCommandPhase, SelectTargetPhase, TurnStartPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import TargetSelectUiHandler from "#app/ui/target-select-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
|
@ -1,20 +1,9 @@
|
||||
import { allSpecies } from "#app/data/pokemon-species";
|
||||
import { GameModes } from "#app/game-mode";
|
||||
import { getGameMode } from "#app/game-mode.js";
|
||||
import {
|
||||
CommandPhase, DamagePhase,
|
||||
EncounterPhase,
|
||||
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 { CommandPhase, DamagePhase, EncounterPhase, EnemyCommandPhase, LoginPhase, SelectGenderPhase, SelectModifierPhase, SelectStarterPhase, SummonPhase, TitlePhase, TurnInitPhase, VictoryPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { generateStarter, getMovePosition, } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
|
@ -1,14 +1,11 @@
|
||||
import {
|
||||
BattleEndPhase,
|
||||
TurnInitPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition, } from "#app/test/utils/gameManagerUtils";
|
||||
import { BattleEndPhase, TurnInitPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition, } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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";
|
||||
|
||||
describe("Test Battle Phase", () => {
|
||||
@ -43,8 +40,6 @@ describe("Test Battle Phase", () => {
|
||||
game.doAttack(getMovePosition(game.scene, 1, Moves.SPLASH));
|
||||
|
||||
for (const pokemon of game.scene.getPlayerField()) {
|
||||
expect(pokemon).toBeDefined();
|
||||
|
||||
pokemon.hp = 0;
|
||||
pokemon.status = new Status(StatusEffect.FAINT);
|
||||
expect(pokemon.isFainted()).toBe(true);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -1,7 +1,5 @@
|
||||
import {
|
||||
CommandPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { CommandPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import BattleScene from "../../battle-scene";
|
||||
import { Egg, getLegendaryGachaSpeciesForTimestamp } from "#app/data/egg.js";
|
||||
import { Species } from "#enums/species";
|
||||
@ -6,7 +6,7 @@ import Phaser from "phaser";
|
||||
import { EggSourceType } from "#app/enums/egg-source-types.js";
|
||||
import { EggTier } from "#app/enums/egg-type.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 * as Utils from "#app/utils.js";
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { pokemonEvolutions } from "#app/data/pokemon-evolutions.js";
|
||||
import { Abilities } from "#app/enums/abilities.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 { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import Phaser from "phaser";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import * as Utils from "#app/utils";
|
||||
|
||||
|
@ -1,13 +1,5 @@
|
||||
import { GameMode, GameModes, getGameMode } from "#app/game-mode.js";
|
||||
import {
|
||||
afterEach,
|
||||
beforeAll,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
vi,
|
||||
} from "vitest";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import GameManager from "./utils/gameManager";
|
||||
import * as Utils from "../utils";
|
||||
describe("game-mode", () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { describe, expect, it} from "vitest";
|
||||
import {initStatsKeys} from "#app/ui/game-stats-ui-handler";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { initStatsKeys } from "#app/ui/game-stats-ui-handler";
|
||||
|
||||
async function importModule() {
|
||||
try {
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import pad_xbox360 from "#app/configs/inputs/pad_xbox360";
|
||||
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", () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
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 { Abilities } from "#app/enums/abilities.js";
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
|
||||
import { EvolutionStatBoosterModifier } from "#app/modifier/modifier";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
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 { Species } from "#enums/species";
|
||||
import Phase from "phaser";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Abilities } from "#app/enums/abilities.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 Phase from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
|
@ -5,10 +5,10 @@ import { BerryType } from "#app/enums/berry-type.js";
|
||||
import { Moves } from "#app/enums/moves.js";
|
||||
import { Species } from "#app/enums/species.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 { 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
|
||||
|
||||
@ -54,11 +54,7 @@ describe("Items - Grip Claw", () => {
|
||||
async () => {
|
||||
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();
|
||||
enemyPokemon.forEach(p => expect(p).toBeDefined());
|
||||
|
||||
const enemyHeldItemCt = enemyPokemon.map(p => p.getHeldItems.length);
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle";
|
||||
import { CritBoosterModifier } from "#app/modifier/modifier";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
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 { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DamagePhase, TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
@ -41,10 +41,6 @@ describe("Items - Leftovers", () => {
|
||||
expect(game.scene.modifiers[0].type.id).toBe("LEFTOVERS");
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
// We should have full hp
|
||||
expect(leadPokemon.isFullHp()).toBe(true);
|
||||
|
@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
|
||||
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
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 { Species } from "#enums/species";
|
||||
import Phase from "phaser";
|
||||
|
@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
|
||||
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
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 { Species } from "#enums/species";
|
||||
import Phase from "phaser";
|
||||
|
@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
|
||||
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
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 { Species } from "#enums/species";
|
||||
import Phase from "phaser";
|
||||
|
@ -2,7 +2,7 @@ import { BattlerIndex } from "#app/battle";
|
||||
import { CritBoosterModifier } from "#app/modifier/modifier";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
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 { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -2,7 +2,7 @@ import { Stat } from "#app/data/pokemon-stat";
|
||||
import { SpeciesStatBoosterModifier } from "#app/modifier/modifier";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
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 { Species } from "#enums/species";
|
||||
import Phase from "phaser";
|
||||
|
@ -1,13 +1,8 @@
|
||||
import { StatusEffect } from "#app/data/status-effect";
|
||||
import {
|
||||
CommandPhase,
|
||||
EnemyCommandPhase,
|
||||
MessagePhase,
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import { CommandPhase, EnemyCommandPhase, MessagePhase, TurnEndPhase } from "#app/phases";
|
||||
import i18next, { initI18n } from "#app/plugins/i18n";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Command } from "#app/ui/command-ui-handler";
|
||||
import { Mode } from "#app/ui/ui";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
|
@ -1,27 +1,26 @@
|
||||
import {beforeAll, describe, expect, it} from "vitest";
|
||||
import {getBattleStatName, getBattleStatLevelChangeDescription} from "#app/data/battle-stat.js";
|
||||
import {BattleStat} from "#app/data/battle-stat.js";
|
||||
import {pokemonInfo as enPokemonInfo} from "#app/locales/en/pokemon-info.js";
|
||||
import {battle as enBattleStat} from "#app/locales/en/battle.js";
|
||||
import {pokemonInfo as dePokemonInfo} from "#app/locales/de/pokemon-info.js";
|
||||
import {battle as deBattleStat} from "#app/locales/de/battle.js";
|
||||
import {pokemonInfo as esPokemonInfo} from "#app/locales/es/pokemon-info.js";
|
||||
import {battle as esBattleStat} from "#app/locales/es/battle.js";
|
||||
import {pokemonInfo as frPokemonInfo} from "#app/locales/fr/pokemon-info.js";
|
||||
import {battle as frBattleStat} from "#app/locales/fr/battle.js";
|
||||
import {pokemonInfo as itPokemonInfo} from "#app/locales/it/pokemon-info.js";
|
||||
import {battle as itBattleStat} from "#app/locales/it/battle.js";
|
||||
import {pokemonInfo as koPokemonInfo} from "#app/locales/ko/pokemon-info.js";
|
||||
import {battle as koBattleStat} from "#app/locales/ko/battle.js";
|
||||
import {pokemonInfo as ptBrPokemonInfo} from "#app/locales/pt_BR/pokemon-info.js";
|
||||
import {battle as ptBrBattleStat} from "#app/locales/pt_BR/battle.js";
|
||||
import {pokemonInfo as zhCnPokemonInfo} from "#app/locales/zh_CN/pokemon-info.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 {battle as zhTwBattleStat} from "#app/locales/zh_TW/battle.js";
|
||||
|
||||
import i18next, {initI18n} from "#app/plugins/i18n";
|
||||
import {KoreanPostpositionProcessor} from "i18next-korean-postposition-processor";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
import { getBattleStatName, getBattleStatLevelChangeDescription } from "#app/data/battle-stat.js";
|
||||
import { BattleStat} from "#app/data/battle-stat.js";
|
||||
import { pokemonInfo as enPokemonInfo } from "#app/locales/en/pokemon-info.js";
|
||||
import { battle as enBattleStat } from "#app/locales/en/battle.js";
|
||||
import { pokemonInfo as dePokemonInfo } from "#app/locales/de/pokemon-info.js";
|
||||
import { battle as deBattleStat } from "#app/locales/de/battle.js";
|
||||
import { pokemonInfo as esPokemonInfo } from "#app/locales/es/pokemon-info.js";
|
||||
import { battle as esBattleStat } from "#app/locales/es/battle.js";
|
||||
import { pokemonInfo as frPokemonInfo } from "#app/locales/fr/pokemon-info.js";
|
||||
import { battle as frBattleStat } from "#app/locales/fr/battle.js";
|
||||
import { pokemonInfo as itPokemonInfo } from "#app/locales/it/pokemon-info.js";
|
||||
import { battle as itBattleStat } from "#app/locales/it/battle.js";
|
||||
import { pokemonInfo as koPokemonInfo } from "#app/locales/ko/pokemon-info.js";
|
||||
import { battle as koBattleStat } from "#app/locales/ko/battle.js";
|
||||
import { pokemonInfo as ptBrPokemonInfo } from "#app/locales/pt_BR/pokemon-info.js";
|
||||
import { battle as ptBrBattleStat } from "#app/locales/pt_BR/battle.js";
|
||||
import { pokemonInfo as zhCnPokemonInfo } from "#app/locales/zh_CN/pokemon-info.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 { battle as zhTwBattleStat } from "#app/locales/zh_TW/battle.js";
|
||||
import i18next, { initI18n } from "#app/plugins/i18n";
|
||||
import { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor";
|
||||
|
||||
interface BattleStatTestUnit {
|
||||
stat: BattleStat,
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {afterEach, beforeAll, describe, expect, it} from "vitest";
|
||||
import { afterEach, beforeAll, describe, expect, it } from "vitest";
|
||||
import Phaser from "phaser";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import {Species} from "#enums/species";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import i18next from "i18next";
|
||||
import {initI18n} from "#app/plugins/i18n";
|
||||
import { initI18n } from "#app/plugins/i18n";
|
||||
|
||||
describe("Lokalization - french", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,14 +1,7 @@
|
||||
import { beforeAll, describe, afterEach, expect, it, vi } from "vitest";
|
||||
import {
|
||||
StatusEffect,
|
||||
getStatusEffectActivationText,
|
||||
getStatusEffectDescriptor,
|
||||
getStatusEffectHealText,
|
||||
getStatusEffectObtainText,
|
||||
getStatusEffectOverlapText,
|
||||
} from "#app/data/status-effect";
|
||||
import { StatusEffect, getStatusEffectActivationText, getStatusEffectDescriptor, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect";
|
||||
import i18next from "i18next";
|
||||
import { mockI18next } from "../utils/testUtils";
|
||||
import { mockI18next } from "#test/utils/testUtils";
|
||||
|
||||
const pokemonName = "PKM";
|
||||
const sourceText = "SOURCE";
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { TerrainType, getTerrainName } from "#app/data/terrain";
|
||||
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 i18next from "i18next";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { mockI18next } from "../utils/testUtils";
|
||||
import { mockI18next } from "#test/utils/testUtils";
|
||||
|
||||
describe("terrain", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -6,8 +6,8 @@ import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||
import GameManager from "../utils/gameManager";
|
||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
|
||||
@ -44,10 +44,8 @@ describe("Moves - Astonish", () => {
|
||||
await game.startBattle([Species.MEOWSCARADA]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.ASTONISH));
|
||||
|
||||
|
@ -4,11 +4,9 @@ import { WeatherType } from "#app/data/weather.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { ArenaTagType } from "#app/enums/arena-tag-type.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { NumberHolder } from "#app/utils.js";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import Overrides from "#app/overrides";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#app/enums/species.js";
|
||||
import { Moves } from "#app/enums/moves.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 { StatusEffect } from "#app/enums/status-effect.js";
|
||||
|
||||
@ -27,15 +26,15 @@ describe("Moves - Beat Up", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
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);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(Array(4).fill(Moves.SPLASH));
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
game.override.enemyLevel(100);
|
||||
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.BEAT_UP]);
|
||||
game.override.startingLevel(100);
|
||||
game.override.moveset([Moves.BEAT_UP]);
|
||||
});
|
||||
|
||||
it(
|
||||
@ -82,7 +81,7 @@ describe("Moves - Beat Up", () => {
|
||||
it(
|
||||
"should hit twice for each player Pokemon if the user has Multi-Lens",
|
||||
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]);
|
||||
|
||||
const playerPokemon = game.scene.getPlayerPokemon();
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { BattleStat } from "#app/data/battle-stat";
|
||||
@ -32,10 +29,10 @@ describe("Moves - BELLY DRUM", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP);
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX);
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
game.override.starterSpecies(Species.MAGIKARP);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
game.override.startingLevel(100);
|
||||
game.override.enemyLevel(100);
|
||||
game.override.moveset([Moves.BELLY_DRUM]);
|
||||
game.override.enemyMoveset([Moves.SPLASH]);
|
||||
});
|
||||
@ -47,7 +44,6 @@ describe("Moves - BELLY DRUM", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.BELLY_DRUM));
|
||||
@ -63,7 +59,6 @@ describe("Moves - BELLY DRUM", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
|
||||
// Here - BattleStat.ATK -> -3 and BattleStat.SPATK -> 6
|
||||
@ -84,7 +79,6 @@ describe("Moves - BELLY DRUM", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
leadPokemon.summonData.battleStats[BattleStat.ATK] = 6;
|
||||
|
||||
@ -101,7 +95,6 @@ describe("Moves - BELLY DRUM", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
leadPokemon.hp = hpLost - PREDAMAGE;
|
||||
|
||||
|
@ -2,12 +2,9 @@ import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag";
|
||||
import { allMoves } from "#app/data/move";
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
import { ArenaTagType } from "#app/enums/arena-tag-type";
|
||||
import {
|
||||
MoveEffectPhase,
|
||||
TurnEndPhase
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { MoveEffectPhase, TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
@ -48,11 +45,7 @@ describe("Moves - Ceaseless Edge", () => {
|
||||
async () => {
|
||||
await game.startBattle([ Species.ILLUMISE ]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
const enemyStartingHp = enemyPokemon.hp;
|
||||
|
||||
@ -77,11 +70,7 @@ describe("Moves - Ceaseless Edge", () => {
|
||||
game.override.startingHeldItems([{name: "MULTI_LENS"}]);
|
||||
await game.startBattle([ Species.ILLUMISE ]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
const enemyPokemon = game.scene.getEnemyPokemon();
|
||||
expect(enemyPokemon).toBeDefined();
|
||||
|
||||
const enemyStartingHp = enemyPokemon.hp;
|
||||
|
||||
@ -108,12 +97,6 @@ describe("Moves - Ceaseless Edge", () => {
|
||||
|
||||
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));
|
||||
await game.phaseInterceptor.to(MoveEffectPhase, false);
|
||||
// Spikes should not have any layers before move effect is applied
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { BattleStat } from "#app/data/battle-stat";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
// RATIO : HP Cost of Move
|
||||
/** HP Cost of Move */
|
||||
const RATIO = 3;
|
||||
// PREDAMAGE : Amount of extra HP lost
|
||||
/** Amount of extra HP lost */
|
||||
const PREDAMAGE = 15;
|
||||
|
||||
describe("Moves - CLANGOROUS_SOUL", () => {
|
||||
@ -32,12 +30,12 @@ describe("Moves - CLANGOROUS_SOUL", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP);
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX);
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
game.override.starterSpecies(Species.MAGIKARP);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
game.override.startingLevel(100);
|
||||
game.override.enemyLevel(100);
|
||||
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)
|
||||
@ -47,7 +45,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.CLANGOROUS_SOUL));
|
||||
@ -67,7 +64,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
|
||||
//Here - BattleStat.SPD -> 0 and BattleStat.SPDEF -> 4
|
||||
@ -93,7 +89,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
leadPokemon.summonData.battleStats[BattleStat.ATK] = 6;
|
||||
leadPokemon.summonData.battleStats[BattleStat.DEF] = 6;
|
||||
@ -118,7 +113,6 @@ describe("Moves - CLANGOROUS_SOUL", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
leadPokemon.hp = hpLost - PREDAMAGE;
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
import { BattleStat } from "#app/data/battle-stat.js";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
|
@ -4,14 +4,14 @@ import { Species } from "#app/enums/species.js";
|
||||
import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { Moves } from "#enums/moves";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { allMoves } from "#app/data/move";
|
||||
import { DamagePhase, MoveEffectPhase, TurnStartPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import {getMovePosition} from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { BattleStat } from "#app/data/battle-stat";
|
||||
import { SPLASH_ONLY } from "#test/utils/testUtils";
|
||||
|
||||
const TIMEOUT = 20 * 1000;
|
||||
// RATIO : HP Cost of Move
|
||||
/** HP Cost of Move */
|
||||
const RATIO = 2;
|
||||
// PREDAMAGE : Amount of extra HP lost
|
||||
/** Amount of extra HP lost */
|
||||
const PREDAMAGE = 15;
|
||||
|
||||
describe("Moves - FILLET AWAY", () => {
|
||||
@ -32,12 +30,12 @@ describe("Moves - FILLET AWAY", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MAGIKARP);
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SNORLAX);
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
game.override.starterSpecies(Species.MAGIKARP);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
game.override.startingLevel(100);
|
||||
game.override.enemyLevel(100);
|
||||
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)
|
||||
@ -47,7 +45,6 @@ describe("Moves - FILLET AWAY", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.FILLET_AWAY));
|
||||
@ -65,7 +62,6 @@ describe("Moves - FILLET AWAY", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
|
||||
//Here - BattleStat.SPD -> 0 and BattleStat.SPATK -> 3
|
||||
@ -87,7 +83,6 @@ describe("Moves - FILLET AWAY", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
|
||||
leadPokemon.summonData.battleStats[BattleStat.ATK] = 6;
|
||||
leadPokemon.summonData.battleStats[BattleStat.SPATK] = 6;
|
||||
@ -108,7 +103,6 @@ describe("Moves - FILLET AWAY", () => {
|
||||
await game.startBattle([Species.MAGIKARP]);
|
||||
|
||||
const leadPokemon = game.scene.getPlayerPokemon();
|
||||
expect(leadPokemon).toBeDefined();
|
||||
const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO);
|
||||
leadPokemon.hp = hpLost - PREDAMAGE;
|
||||
|
||||
|
@ -2,13 +2,13 @@ import { BattleStat } from "#app/data/battle-stat";
|
||||
import { Species } from "#app/enums/species.js";
|
||||
import { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
|
||||
import { DamagePhase, TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,14 +1,10 @@
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import Phaser from "phaser";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import Overrides from "#app/overrides";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import {
|
||||
SelectTargetPhase,
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import { SelectTargetPhase, TurnEndPhase } from "#app/phases";
|
||||
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 { allAbilities } from "#app/data/ability.js";
|
||||
import Pokemon from "#app/field/pokemon.js";
|
||||
@ -40,14 +36,14 @@ describe("Moves - Flame Burst", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(Overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("double");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.FLAME_BURST, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE);
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(4);
|
||||
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.SHUCKLE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(new Array(4).fill(Moves.SPLASH));
|
||||
game.override.battleType("double");
|
||||
game.override.moveset([Moves.FLAME_BURST, Moves.SPLASH]);
|
||||
game.override.disableCrits();
|
||||
game.override.ability(Abilities.UNNERVE);
|
||||
game.override.startingWave(4);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
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 () => {
|
||||
@ -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 () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.FLASH_FIRE);
|
||||
game.override.enemyAbility(Abilities.FLASH_FIRE);
|
||||
|
||||
await game.startBattle([Species.PIKACHU, Species.PIKACHU]);
|
||||
const [ leftEnemy, rightEnemy ] = game.scene.getEnemyField();
|
||||
|
@ -2,17 +2,15 @@ import { BattleStat } from "#app/data/battle-stat.js";
|
||||
import { SemiInvulnerableTag } from "#app/data/battler-tags.js";
|
||||
import { Type } from "#app/data/type.js";
|
||||
import { Biome } from "#app/enums/biome.js";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
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", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -1,13 +1,9 @@
|
||||
import { BattlerIndex } from "#app/battle.js";
|
||||
import { Stat } from "#app/data/pokemon-stat";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import {
|
||||
CommandPhase,
|
||||
SelectTargetPhase,
|
||||
TurnEndPhase,
|
||||
} from "#app/phases";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import { CommandPhase, SelectTargetPhase, TurnEndPhase } from "#app/phases";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import { getMovePosition } from "#test/utils/gameManagerUtils";
|
||||
import { Species } from "#enums/species";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
@ -25,16 +24,16 @@ describe("Moves - Fusion Bolt", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ fusionBolt ]);
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1);
|
||||
game.override.moveset([ fusionBolt ]);
|
||||
game.override.startingLevel(1);
|
||||
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RESHIRAM);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ROUGH_SKIN);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]);
|
||||
game.override.enemySpecies(Species.RESHIRAM);
|
||||
game.override.enemyAbility(Abilities.ROUGH_SKIN);
|
||||
game.override.enemyMoveset([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]);
|
||||
|
||||
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(97);
|
||||
vi.spyOn(overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
game.override.battleType("single");
|
||||
game.override.startingWave(97);
|
||||
game.override.disableCrits();
|
||||
});
|
||||
|
||||
it("should not make contact", async() => {
|
||||
|
@ -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 GameManager from "#app/test/utils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
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 { Species } from "#enums/species";
|
||||
import { Moves } from "#enums/moves";
|
||||
@ -26,15 +25,15 @@ describe("Moves - Fusion Flare", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ fusionFlare ]);
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1);
|
||||
game.override.moveset([ fusionFlare ]);
|
||||
game.override.startingLevel(1);
|
||||
|
||||
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RESHIRAM);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.REST, Moves.REST, Moves.REST, Moves.REST ]);
|
||||
game.override.enemySpecies(Species.RESHIRAM);
|
||||
game.override.enemyMoveset([ Moves.REST, Moves.REST, Moves.REST, Moves.REST ]);
|
||||
|
||||
vi.spyOn(overrides, "BATTLE_TYPE_OVERRIDE", "get").mockReturnValue("single");
|
||||
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(97);
|
||||
vi.spyOn(overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
game.override.battleType("single");
|
||||
game.override.startingWave(97);
|
||||
game.override.disableCrits();
|
||||
});
|
||||
|
||||
it("should thaw freeze status condition", async() => {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user