Merge branch 'beta' into testsaveeggmoves

This commit is contained in:
Lugiad 2024-09-09 21:35:57 +02:00 committed by GitHub
commit e01e00dce8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
161 changed files with 2000 additions and 1711 deletions

View File

@ -20,12 +20,15 @@ const type = args[0]; // "move" or "ability"
let fileName = args[1]; // The file name let fileName = args[1]; // The file name
if (!type || !fileName) { if (!type || !fileName) {
console.error('Please provide both a type ("move", "ability", or "item") and a file name.'); console.error('Please provide a type ("move", "ability", or "item") and a file name.');
process.exit(1); process.exit(1);
} }
// Convert fileName from to snake_case if camelCase is given // Convert fileName from kebab-case or camelCase to snake_case
fileName = fileName.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase(); fileName = fileName
.replace(/-+/g, '_') // Convert kebab-case (dashes) to underscores
.replace(/([a-z])([A-Z])/g, '$1_$2') // Convert camelCase to snake_case
.toLowerCase(); // Ensure all lowercase
// Format the description for the test case // Format the description for the test case
const formattedName = fileName const formattedName = fileName
@ -64,10 +67,11 @@ if (fs.existsSync(filePath)) {
// Define the content template // Define the content template
const content = `import { Abilities } from "#enums/abilities"; const content = `import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest";
describe("${description}", () => { describe("${description}", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -87,14 +91,15 @@ describe("${description}", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.moveset([Moves.SPLASH])
.battleType("single") .battleType("single")
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("test case", async () => { it("test case", async () => {
// await game.classicMode.startBattle(); // await game.classicMode.startBattle([Species.MAGIKARP]);
// game.move.select(); // game.move.select(Moves.SPLASH);
}, TIMEOUT); }, TIMEOUT);
}); });
`; `;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

View File

@ -3923,7 +3923,7 @@ export class PostBattleLootAbAttr extends PostBattleAbAttr {
} }
export class PostFaintAbAttr extends AbAttr { export class PostFaintAbAttr extends AbAttr {
applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean {
return false; return false;
} }
} }
@ -3974,7 +3974,7 @@ export class PostFaintClearWeatherAbAttr extends PostFaintAbAttr {
* @param args N/A * @param args N/A
* @returns {boolean} Returns true if the weather clears, otherwise false. * @returns {boolean} Returns true if the weather clears, otherwise false.
*/ */
applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean {
const weatherType = pokemon.scene.arena.weather?.weatherType; const weatherType = pokemon.scene.arena.weather?.weatherType;
let turnOffWeather = false; let turnOffWeather = false;
@ -4022,8 +4022,8 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr {
this.damageRatio = damageRatio; this.damageRatio = damageRatio;
} }
applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean {
if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) { if (move !== undefined && attacker !== undefined && move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) { //If the mon didn't die to indirect damage
const cancelled = new Utils.BooleanHolder(false); const cancelled = new Utils.BooleanHolder(false);
pokemon.scene.getField(true).map(p => applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled, simulated)); pokemon.scene.getField(true).map(p => applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled, simulated));
if (cancelled.value || attacker.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) { if (cancelled.value || attacker.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) {
@ -4052,8 +4052,8 @@ export class PostFaintHPDamageAbAttr extends PostFaintAbAttr {
super (); super ();
} }
applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): boolean { applyPostFaint(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker?: Pokemon, move?: Move, hitResult?: HitResult, ...args: any[]): boolean {
if (!simulated) { if (move !== undefined && attacker !== undefined && !simulated) { //If the mon didn't die to indirect damage
const damage = pokemon.turnData.attacksReceived[0].damage; const damage = pokemon.turnData.attacksReceived[0].damage;
attacker.damageAndUpdate((damage), HitResult.OTHER); attacker.damageAndUpdate((damage), HitResult.OTHER);
attacker.turnData.damageTaken += damage; attacker.turnData.damageTaken += damage;
@ -4711,7 +4711,7 @@ export function applyPostBattleAbAttrs(attrType: Constructor<PostBattleAbAttr>,
} }
export function applyPostFaintAbAttrs(attrType: Constructor<PostFaintAbAttr>, export function applyPostFaintAbAttrs(attrType: Constructor<PostFaintAbAttr>,
pokemon: Pokemon, attacker: Pokemon, move: Move, hitResult: HitResult, simulated: boolean = false, ...args: any[]): Promise<void> { pokemon: Pokemon, attacker?: Pokemon, move?: Move, hitResult?: HitResult, simulated: boolean = false, ...args: any[]): Promise<void> {
return applyAbAttrsInternal<PostFaintAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPostFaint(pokemon, passive, simulated, attacker, move, hitResult, args), args, false, simulated); return applyAbAttrsInternal<PostFaintAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPostFaint(pokemon, passive, simulated, attacker, move, hitResult, args), args, false, simulated);
} }

View File

@ -107,8 +107,8 @@ export interface TerrainBattlerTag {
* to select restricted moves. * to select restricted moves.
*/ */
export abstract class MoveRestrictionBattlerTag extends BattlerTag { export abstract class MoveRestrictionBattlerTag extends BattlerTag {
constructor(tagType: BattlerTagType, turnCount: integer, sourceMove?: Moves, sourceId?: integer) { constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: integer, sourceMove?: Moves, sourceId?: integer) {
super(tagType, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END ], turnCount, sourceMove, sourceId); super(tagType, lapseType, turnCount, sourceMove, sourceId);
} }
/** @override */ /** @override */
@ -158,6 +158,49 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag {
abstract interruptedText(pokemon: Pokemon, move: Moves): string; abstract interruptedText(pokemon: Pokemon, move: Moves): string;
} }
/**
* Tag representing the "Throat Chop" effect. Pokemon with this tag cannot use sound-based moves.
* @see {@link https://bulbapedia.bulbagarden.net/wiki/Throat_Chop_(move) | Throat Chop}
* @extends MoveRestrictionBattlerTag
*/
export class ThroatChoppedTag extends MoveRestrictionBattlerTag {
constructor() {
super(BattlerTagType.THROAT_CHOPPED, [ BattlerTagLapseType.TURN_END, BattlerTagLapseType.PRE_MOVE ], 2, Moves.THROAT_CHOP);
}
/**
* Checks if a {@linkcode Moves | move} is restricted by Throat Chop.
* @override
* @param {Moves} move the {@linkcode Moves | move} to check for sound-based restriction
* @returns true if the move is sound-based
*/
override isMoveRestricted(move: Moves): boolean {
return allMoves[move].hasFlag(MoveFlags.SOUND_BASED);
}
/**
* Shows a message when the player attempts to select a move that is restricted by Throat Chop.
* @override
* @param {Pokemon} pokemon the {@linkcode Pokemon} that is attempting to select the restricted move
* @param {Moves} move the {@linkcode Moves | move} that is being restricted
* @returns the message to display when the player attempts to select the restricted move
*/
override selectionDeniedText(pokemon: Pokemon, move: Moves): string {
return i18next.t("battle:moveCannotBeSelected", { moveName: allMoves[move].name });
}
/**
* Shows a message when a move is interrupted by Throat Chop.
* @override
* @param {Pokemon} pokemon the interrupted {@linkcode Pokemon}
* @param {Moves} move the {@linkcode Moves | move} that was interrupted
* @returns the message to display when the move is interrupted
*/
override interruptedText(pokemon: Pokemon, move: Moves): string {
return i18next.t("battle:throatChopInterruptedMove", { pokemonName: getPokemonNameWithAffix(pokemon) });
}
}
/** /**
* Tag representing the "disabling" effect performed by {@linkcode Moves.DISABLE} and {@linkcode Abilities.CURSED_BODY}. * Tag representing the "disabling" effect performed by {@linkcode Moves.DISABLE} and {@linkcode Abilities.CURSED_BODY}.
* When the tag is added, the last-used move of the tag holder is set as the disabled move. * When the tag is added, the last-used move of the tag holder is set as the disabled move.
@ -167,7 +210,7 @@ export class DisabledTag extends MoveRestrictionBattlerTag {
private moveId: Moves = Moves.NONE; private moveId: Moves = Moves.NONE;
constructor(sourceId: number) { constructor(sourceId: number) {
super(BattlerTagType.DISABLED, 4, Moves.DISABLE, sourceId); super(BattlerTagType.DISABLED, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END ], 4, Moves.DISABLE, sourceId);
} }
/** @override */ /** @override */
@ -2158,6 +2201,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
return new GulpMissileTag(tagType, sourceMove); return new GulpMissileTag(tagType, sourceMove);
case BattlerTagType.TAR_SHOT: case BattlerTagType.TAR_SHOT:
return new TarShotTag(); return new TarShotTag();
case BattlerTagType.THROAT_CHOPPED:
return new ThroatChoppedTag();
case BattlerTagType.NONE: case BattlerTagType.NONE:
default: default:
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);

View File

@ -5987,9 +5987,8 @@ export class SwapStatAttr extends MoveEffectAttr {
} }
/** /**
* Takes the average of the user's and target's corresponding current * Swaps the user's and target's corresponding current
* {@linkcode stat} values and sets that stat to the average for both * {@linkcode EffectiveStat | stat} values
* temporarily.
* @param user the {@linkcode Pokemon} that used the move * @param user the {@linkcode Pokemon} that used the move
* @param target the {@linkcode Pokemon} that the move was used on * @param target the {@linkcode Pokemon} that the move was used on
* @param move N/A * @param move N/A
@ -6013,6 +6012,62 @@ export class SwapStatAttr extends MoveEffectAttr {
} }
} }
/**
* Attribute used to switch the user's own stats.
* Used by Power Shift.
* @extends MoveEffectAttr
*/
export class ShiftStatAttr extends MoveEffectAttr {
private statToSwitch: EffectiveStat;
private statToSwitchWith: EffectiveStat;
constructor(statToSwitch: EffectiveStat, statToSwitchWith: EffectiveStat) {
super();
this.statToSwitch = statToSwitch;
this.statToSwitchWith = statToSwitchWith;
}
/**
* Switches the user's stats based on the {@linkcode statToSwitch} and {@linkcode statToSwitchWith} attributes.
* @param {Pokemon} user the {@linkcode Pokemon} that used the move
* @param target n/a
* @param move n/a
* @param args n/a
* @returns whether the effect was applied
*/
override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args)) {
return false;
}
const firstStat = user.getStat(this.statToSwitch, false);
const secondStat = user.getStat(this.statToSwitchWith, false);
user.setStat(this.statToSwitch, secondStat, false);
user.setStat(this.statToSwitchWith, firstStat, false);
user.scene.queueMessage(i18next.t("moveTriggers:shiftedStats", {
pokemonName: getPokemonNameWithAffix(user),
statToSwitch: i18next.t(getStatKey(this.statToSwitch)),
statToSwitchWith: i18next.t(getStatKey(this.statToSwitchWith))
}));
return true;
}
/**
* Encourages the user to use the move if the stat to switch with is greater than the stat to switch.
* @param {Pokemon} user the {@linkcode Pokemon} that used the move
* @param target n/a
* @param move n/a
* @returns number of points to add to the user's benefit score
*/
override getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
return user.getStat(this.statToSwitchWith, false) > user.getStat(this.statToSwitch, false) ? 10 : 0;
}
}
/** /**
* Attribute used for status moves, namely Power Split and Guard Split, * Attribute used for status moves, namely Power Split and Guard Split,
* that take the average of a user's and target's corresponding * that take the average of a user's and target's corresponding
@ -8404,7 +8459,7 @@ export function initMoves() {
.target(MoveTarget.USER_AND_ALLIES) .target(MoveTarget.USER_AND_ALLIES)
.condition((user, target, move) => !![ user, user.getAlly() ].filter(p => p?.isActive()).find(p => !![ Abilities.PLUS, Abilities.MINUS].find(a => p.hasAbility(a, false)))), .condition((user, target, move) => !![ user, user.getAlly() ].filter(p => p?.isActive()).find(p => !![ Abilities.PLUS, Abilities.MINUS].find(a => p.hasAbility(a, false)))),
new AttackMove(Moves.THROAT_CHOP, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 15, 100, 0, 7) new AttackMove(Moves.THROAT_CHOP, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 15, 100, 0, 7)
.partial(), .attr(AddBattlerTagAttr, BattlerTagType.THROAT_CHOPPED),
new AttackMove(Moves.POLLEN_PUFF, Type.BUG, MoveCategory.SPECIAL, 90, 100, 15, -1, 0, 7) new AttackMove(Moves.POLLEN_PUFF, Type.BUG, MoveCategory.SPECIAL, 90, 100, 15, -1, 0, 7)
.attr(StatusCategoryOnAllyAttr) .attr(StatusCategoryOnAllyAttr)
.attr(HealOnAllyAttr, 0.5, true, false) .attr(HealOnAllyAttr, 0.5, true, false)
@ -8894,7 +8949,8 @@ export function initMoves() {
new AttackMove(Moves.PSYSHIELD_BASH, Type.PSYCHIC, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8) new AttackMove(Moves.PSYSHIELD_BASH, Type.PSYCHIC, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8)
.attr(StatStageChangeAttr, [ Stat.DEF ], 1, true), .attr(StatStageChangeAttr, [ Stat.DEF ], 1, true),
new SelfStatusMove(Moves.POWER_SHIFT, Type.NORMAL, -1, 10, -1, 0, 8) new SelfStatusMove(Moves.POWER_SHIFT, Type.NORMAL, -1, 10, -1, 0, 8)
.unimplemented(), .target(MoveTarget.USER)
.attr(ShiftStatAttr, Stat.ATK, Stat.DEF),
new AttackMove(Moves.STONE_AXE, Type.ROCK, MoveCategory.PHYSICAL, 65, 90, 15, 100, 0, 8) new AttackMove(Moves.STONE_AXE, Type.ROCK, MoveCategory.PHYSICAL, 65, 90, 15, 100, 0, 8)
.attr(AddArenaTrapTagHitAttr, ArenaTagType.STEALTH_ROCK) .attr(AddArenaTrapTagHitAttr, ArenaTagType.STEALTH_ROCK)
.slicingMove(), .slicingMove(),

View File

@ -73,5 +73,6 @@ export enum BattlerTagType {
SHELL_TRAP = "SHELL_TRAP", SHELL_TRAP = "SHELL_TRAP",
DRAGON_CHEER = "DRAGON_CHEER", DRAGON_CHEER = "DRAGON_CHEER",
NO_RETREAT = "NO_RETREAT", NO_RETREAT = "NO_RETREAT",
THROAT_CHOPPED = "THROAT_CHOPPED",
TAR_SHOT = "TAR_SHOT", TAR_SHOT = "TAR_SHOT",
} }

View File

@ -984,10 +984,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
: this.moveset; : this.moveset;
// Overrides moveset based on arrays specified in overrides.ts // Overrides moveset based on arrays specified in overrides.ts
const overrideArray: Array<Moves> = this.isPlayer() ? Overrides.MOVESET_OVERRIDE : Overrides.OPP_MOVESET_OVERRIDE; let overrideArray: Moves | Array<Moves> = this.isPlayer() ? Overrides.MOVESET_OVERRIDE : Overrides.OPP_MOVESET_OVERRIDE;
if (!Array.isArray(overrideArray)) {
overrideArray = [overrideArray];
}
if (overrideArray.length > 0) { if (overrideArray.length > 0) {
if (!this.isPlayer()) {
this.moveset = [];
}
overrideArray.forEach((move: Moves, index: number) => { overrideArray.forEach((move: Moves, index: number) => {
const ppUsed = this.moveset[index]?.ppUsed || 0; const ppUsed = this.moveset[index]?.ppUsed ?? 0;
this.moveset[index] = new PokemonMove(move, Math.min(ppUsed, allMoves[move].pp)); this.moveset[index] = new PokemonMove(move, Math.min(ppUsed, allMoves[move].pp));
}); });
} }

View File

@ -44,7 +44,9 @@
"moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.", "moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.",
"moveNoPP": "There's no PP left for\nthis move!", "moveNoPP": "There's no PP left for\nthis move!",
"moveDisabled": "{{moveName}} is disabled!", "moveDisabled": "{{moveName}} is disabled!",
"moveCannotBeSelected": "{{moveName}} cannot be selected!",
"disableInterruptedMove": "{{pokemonNameWithAffix}}'s {{moveName}}\nis disabled!", "disableInterruptedMove": "{{pokemonNameWithAffix}}'s {{moveName}}\nis disabled!",
"throatChopInterruptedMove": "The effects of Throat Chop prevent\n{{pokemonName}} from using certain moves!",
"noPokeballForce": "An unseen force\nprevents using Poké Balls.", "noPokeballForce": "An unseen force\nprevents using Poké Balls.",
"noPokeballTrainer": "You can't catch\nanother trainer's Pokémon!", "noPokeballTrainer": "You can't catch\nanother trainer's Pokémon!",
"noPokeballMulti": "You can only throw a Poké Ball\nwhen there is one Pokémon remaining!", "noPokeballMulti": "You can only throw a Poké Ball\nwhen there is one Pokémon remaining!",

View File

@ -7,6 +7,7 @@
"switchedStat": "{{pokemonName}} switched {{stat}} with its target!", "switchedStat": "{{pokemonName}} switched {{stat}} with its target!",
"sharedGuard": "{{pokemonName}} shared its guard with the target!", "sharedGuard": "{{pokemonName}} shared its guard with the target!",
"sharedPower": "{{pokemonName}} shared its power with the target!", "sharedPower": "{{pokemonName}} shared its power with the target!",
"shiftedStats": "{{pokemonName}} switched its {{statToSwitch}} and {{statToSwitchWith}}!",
"goingAllOutForAttack": "{{pokemonName}} is going all out for this attack!", "goingAllOutForAttack": "{{pokemonName}} is going all out for this attack!",
"regainedHealth": "{{pokemonName}} regained\nhealth!", "regainedHealth": "{{pokemonName}} regained\nhealth!",
"keptGoingAndCrashed": "{{pokemonName}} kept going\nand crashed!", "keptGoingAndCrashed": "{{pokemonName}} kept going\nand crashed!",

View File

@ -2,11 +2,11 @@
"blockRecoilDamage": "{{pokemonName}}は {{abilityName}}で 反動ダメージを 受けない!", "blockRecoilDamage": "{{pokemonName}}は {{abilityName}}で 反動ダメージを 受けない!",
"badDreams": "{{pokemonName}}は ナイトメアに うなされている!", "badDreams": "{{pokemonName}}は ナイトメアに うなされている!",
"costar": "{{pokemonName}}は {{allyName}}の\n能力変化を コピーした", "costar": "{{pokemonName}}は {{allyName}}の\n能力変化を コピーした",
"iceFaceAvoidedDamage": "{{pokemonName}}は\n{{abilityName}}で ダメージを 受けない!", "iceFaceAvoidedDamage": "{{pokemonNameWithAffix}}は\n{{abilityName}}で ダメージを 受けない!",
"perishBody": "{{pokemonName}}の {{abilityName}}で\nおたがいは 3ターン後に ほろびいてしまう", "perishBody": "{{pokemonName}}の {{abilityName}}で\nおたがいは 3ターン後に ほろびいてしまう",
"poisonHeal": "{{pokemonName}}は {{abilityName}}で 回復した!", "poisonHeal": "{{pokemonName}}は {{abilityName}}で 回復した!",
"trace": "{{pokemonName}}は 相手の {{targetName}}の\n{{abilityName}}を トレースした!", "trace": "{{pokemonName}}は 相手の {{targetName}}の\n{{abilityName}}を トレースした!",
"windPowerCharged": "{{pokemonName}}は\n{{moveName}}を 受けて じゅうでんした!", "windPowerCharged": "{{pokemonNameWithAffix}}は\n{{moveName}}を 受けて じゅうでんした!",
"quickDraw": "{{pokemonName}}は クイックドロウで\n行動が はやくなった", "quickDraw": "{{pokemonName}}は クイックドロウで\n行動が はやくなった",
"disguiseAvoidedDamage": "{{pokemonNameWithAffix}}の\nばけのかわが はがれた", "disguiseAvoidedDamage": "{{pokemonNameWithAffix}}の\nばけのかわが はがれた",
"blockItemTheft": "{{pokemonNameWithAffix}}の {{abilityName}}で\n道具を うばわれない", "blockItemTheft": "{{pokemonNameWithAffix}}の {{abilityName}}で\n道具を うばわれない",

File diff suppressed because it is too large Load Diff

View File

@ -39,5 +39,6 @@
"matBlock": "たたみがえし", "matBlock": "たたみがえし",
"craftyShield": "トリックガード", "craftyShield": "トリックガード",
"tailwind": "おいかぜ", "tailwind": "おいかぜ",
"happyHour": "ハッピータイム" "happyHour": "ハッピータイム",
"safeguard": "しんぴなまもり"
} }

View File

@ -47,5 +47,11 @@
"tailwindOnRemovePlayer": "味方の 追い風が 止んだ!", "tailwindOnRemovePlayer": "味方の 追い風が 止んだ!",
"tailwindOnRemoveEnemy": "相手の 追い風が 止んだ!", "tailwindOnRemoveEnemy": "相手の 追い風が 止んだ!",
"happyHourOnAdd": "みんなが ハッピーな気分に\n包まれた", "happyHourOnAdd": "みんなが ハッピーな気分に\n包まれた",
"happyHourOnRemove": "みんなの 気分が 元に戻った" "happyHourOnRemove": "みんなの 気分が 元に戻った",
"safeguardOnAdd": "場の全体は 神秘のベールに 包まれた!",
"safeguardOnAddPlayer": "味方は 神秘のベールに 包まれた!",
"safeguardOnAddEnemy": "相手は 神秘のベールに 包まれた!",
"safeguardOnRemove": "場の全体を 包んでいた\n神秘のベールが なくなった",
"safeguardOnRemovePlayer": "味方を 包んでいた\n神秘のベールが なくなった",
"safeguardOnRemoveEnemy": "相手を 包んでいた\n神秘のベールが なくなった"
} }

View File

@ -4,7 +4,7 @@
"trainerAppearedDouble": "{{trainerName}}が\n勝負を しかけてきた!", "trainerAppearedDouble": "{{trainerName}}が\n勝負を しかけてきた!",
"trainerSendOut": "{{trainerName}}は\n{{pokemonName}}を 繰り出した!", "trainerSendOut": "{{trainerName}}は\n{{pokemonName}}を 繰り出した!",
"singleWildAppeared": "あっ! 野生の {{pokemonName}}が 飛び出してきた!", "singleWildAppeared": "あっ! 野生の {{pokemonName}}が 飛び出してきた!",
"multiWildAppeared": "あっ! 野生の {{pokemonName1}}と\n{{pokemonName2}}が 飛び出してきた!", "multiWildAppeared": "あっ! 野生の {{pokemonName1}}と\n{{pokemonName2}}が 飛び出してきた!",
"playerComeBack": "{{pokemonName}}! 戻れ!", "playerComeBack": "{{pokemonName}}! 戻れ!",
"trainerComeBack": "{{trainerName}}は\n{{pokemonName}}を 引っ込めた!", "trainerComeBack": "{{trainerName}}は\n{{pokemonName}}を 引っ込めた!",
"playerGo": "ゆけっ! {{pokemonName}}", "playerGo": "ゆけっ! {{pokemonName}}",
@ -51,7 +51,7 @@
"noPokeballStrong": "相手の ポケモンが 強すぎて 捕まえられない!\nまずは 弱めよう", "noPokeballStrong": "相手の ポケモンが 強すぎて 捕まえられない!\nまずは 弱めよう",
"noEscapeForce": "見えない 力の せいで\n逃げることが できない!", "noEscapeForce": "見えない 力の せいで\n逃げることが できない!",
"noEscapeTrainer": "ダメだ! 勝負の最中に\n相手に 背中を 見せられない", "noEscapeTrainer": "ダメだ! 勝負の最中に\n相手に 背中を 見せられない",
"noEscapePokemon": "{{pokemonName}}の {{moveName}}で {{escapeVerb}}!", "noEscapePokemon": "{{pokemonName}}の {{moveName}}で\n{{escapeVerb}}!",
"runAwaySuccess": " うまく 逃げ切れた!", "runAwaySuccess": " うまく 逃げ切れた!",
"runAwayCannotEscape": "逃げることが できない!", "runAwayCannotEscape": "逃げることが できない!",
"escapeVerbSwitch": "入れ替えることが できない", "escapeVerbSwitch": "入れ替えることが できない",
@ -62,6 +62,7 @@
"skipItemQuestion": "本当に アイテムを 取らずに 進みますか?", "skipItemQuestion": "本当に アイテムを 取らずに 進みますか?",
"itemStackFull": "{{fullItemName}}の スタックが いっぱいです。\n代わりに {{itemName}}を 取得します。", "itemStackFull": "{{fullItemName}}の スタックが いっぱいです。\n代わりに {{itemName}}を 取得します。",
"eggHatching": "おや?", "eggHatching": "おや?",
"eggSkipPrompt": "タマゴは ふかします!\nタマゴまとめに 飛ばしますか",
"ivScannerUseQuestion": "{{pokemonName}}を\n個体値スキャナーで 操作しますか?", "ivScannerUseQuestion": "{{pokemonName}}を\n個体値スキャナーで 操作しますか?",
"wildPokemonWithAffix": "野生の {{pokemonName}}", "wildPokemonWithAffix": "野生の {{pokemonName}}",
"foePokemonWithAffix": "相手の {{pokemonName}}", "foePokemonWithAffix": "相手の {{pokemonName}}",

View File

@ -1,46 +1,46 @@
{ {
"SITRUS": { "SITRUS": {
"name": "オボンのみ", "name": "オボンのみ",
"effect": "持たせると HPが 50以下になるとき HPを 25 回復する" "effect": "持たせると HPが 50%以下に なるとき HPを 25% 回復する"
}, },
"LUM": { "LUM": {
"name": "ラムのみ", "name": "ラムのみ",
"effect": "持たせると 状態異常や 混乱になるとき 回復する\n" "effect": "持たせると 状態異常や 混乱に なるとき 回復する"
}, },
"ENIGMA": { "ENIGMA": {
"name": "ナゾのみ", "name": "ナゾのみ",
"effect": "持たせると 効果バツグンの 技を 受けたとき HPを 回復する" "effect": "持たせると 効果バツグンの 技を 受けたとき HPを 25%回復する"
}, },
"LIECHI": { "LIECHI": {
"name": "チイラのみ", "name": "チイラのみ",
"effect": "持たせると HPが 25%以下に なるとき 攻撃が あがる" "effect": "持たせると HPが 25%以下に なるとき 攻撃が あがる"
}, },
"GANLON": { "GANLON": {
"name": "リュガのみ", "name": "リュガのみ",
"effect": "持たせると HPが 25%以下に なるとき 防御が あがる\n" "effect": "持たせると HPが 25%以下に なるとき 防御が あがる"
}, },
"PETAYA": { "PETAYA": {
"name": "ヤタピのみ", "name": "ヤタピのみ",
"effect": "持たせると HPが 25%以下に なるとき 特攻が あがる\n" "effect": "持たせると HPが 25%以下に なるとき 特攻が あがる"
}, },
"APICOT": { "APICOT": {
"name": "ズアのみ", "name": "ズアのみ",
"effect": "持たせると HPが 25%以下に なるとき 特防が あがる\n" "effect": "持たせると HPが 25%以下に なるとき 特防が あがる"
}, },
"SALAC": { "SALAC": {
"name": "カムラのみ", "name": "カムラのみ",
"effect": "持たせると HPが 25%以下に なるとき 素早さが あがる" "effect": "持たせると HPが 25%以下に なるとき 素早さが あがる"
}, },
"LANSAT": { "LANSAT": {
"name": "サンのみ", "name": "サンのみ",
"effect": "持たせると HPが 25%以下に なるとき 攻撃が 急所に 当たりやすくなる" "effect": "持たせると HPが 25%以下に なるとき 攻撃が 急所に 当たりやすくなる"
}, },
"STARF": { "STARF": {
"name": "スターのみ", "name": "スターのみ",
"effect": "持たせると HPが 25%以下に なるとき どれか 1つの 能力が ぐーんと あがる" "effect": "持たせると HPが 25%以下に なるとき どれか 1つの 能力が ぐーんと あがる"
}, },
"LEPPA": { "LEPPA": {
"name": "ヒメリのみ", "name": "ヒメリのみ",
"effect": "持たせると PPが 0になる 技のPPを 10回復する" "effect": "持たせると PPが0になる 技の PPを 10回復する"
} }
} }

View File

@ -2,6 +2,6 @@
"pp": "PP", "pp": "PP",
"power": "威力", "power": "威力",
"accuracy": "命中", "accuracy": "命中",
"abilityFlyInText": " {{pokemonName}}の\n{{passive}}{{abilityName}}", "abilityFlyInText": " {{pokemonName}}の\n{{passive}} {{abilityName}}",
"passive": "パッシブ " "passive": "パッシブ "
} }

View File

@ -22,7 +22,7 @@
"unmatchingPassword": "入力したパスワードが 一致しません", "unmatchingPassword": "入力したパスワードが 一致しません",
"passwordNotMatchingConfirmPassword": "パスワードは パスワード確認と 一致する 必要があります", "passwordNotMatchingConfirmPassword": "パスワードは パスワード確認と 一致する 必要があります",
"confirmPassword": "パスワード確認", "confirmPassword": "パスワード確認",
"registrationAgeWarning": "登録では 歳以上 であることを 確認します。", "registrationAgeWarning": "登録では 13歳以上 であることを 確認します。",
"backToLogin": "ログインへ", "backToLogin": "ログインへ",
"failedToLoadSaveData": "セーブデータの 読み込みは 不可能でした。ページを 再読み込み してください。\n長い間に続く 場合は 管理者に 連絡してください。", "failedToLoadSaveData": "セーブデータの 読み込みは 不可能でした。ページを 再読み込み してください。\n長い間に続く 場合は 管理者に 連絡してください。",
"sessionSuccess": "セッションが 正常に 読み込まれました。", "sessionSuccess": "セッションが 正常に 読み込まれました。",
@ -46,10 +46,10 @@
"yes": "はい", "yes": "はい",
"no": "いいえ", "no": "いいえ",
"disclaimer": "免責", "disclaimer": "免責",
"disclaimerDescription": "このゲームは 未完成作品です。\nセーブデータの 損失を含める ゲーム性に関する 問題が 起きる可能性が あります。\nなお、ゲームは 予告なく変更される 可能性もあり、さらに更新され、完成されるとも 限りません。", "disclaimerDescription": "このゲームは 未完成作品です。\nセーブデータの 損失を含める ゲーム性に関する 問題が 起きる可能性が あります。\nなお、ゲームは 予告なく変更される 可能性もあり、\nさらに更新され、完成されるとも 限りません。",
"choosePokemon": "ポケモンを選ぶ", "choosePokemon": "ポケモンを選ぶ",
"renamePokemon": "ニックネームを変える", "renamePokemon": "ニックネームを変える",
"rename": "変える", "rename": "名前を変える",
"nickname": "ニックネーム", "nickname": "ニックネーム",
"errorServerDown": "おや!\nサーバーとの 接続中に 問題が 発生しました。\nゲームは 自動的に 再接続されます から\nウィンドウは 開いたままに しておいても よろしいです。", "errorServerDown": "おや!\nサーバーとの 接続中に 問題が 発生しました。\nゲームは 自動的に 再接続されます から\nウィンドウは 開いたままに しておいても よろしいです。",
"noSaves": "何の セーブファイルも ありません!", "noSaves": "何の セーブファイルも ありません!",

File diff suppressed because it is too large Load Diff

View File

@ -4,5 +4,44 @@
"CANCEL": "やめる", "CANCEL": "やめる",
"RELEASE": "逃がす", "RELEASE": "逃がす",
"APPLY": "使う", "APPLY": "使う",
"TEACH": "教える" "TEACH": "教える",
"SPLICE": "吸収合体",
"UNSPLICE": "合体を分離",
"ACTIVATE": "有効にする",
"DEACTIVATE": "無効にする",
"TRANSFER": "アイテムを移動",
"ALL": "全部",
"PASS_BATON": "バトンタッチ",
"UNPAUSE_EVOLUTION": "進化を有効にする",
"REVIVE": "復活する",
"RENAME": "名前を変える",
"choosePokemon": "ポケモンを 選んで ください。",
"doWhatWithThisPokemon": "このポケモンを どうする?",
"noEnergy": "{{pokemonName}}は 戦うための\n元気が 残っていません",
"hasEnergy": "{{pokemonName}}は まだまだ 元気だ!",
"cantBeUsed": "{{pokemonName}}は このチャレンジで\n使えられません",
"tooManyItems": "{{pokemonName}}は このアイテムが\nこれ以上 持ちきれない",
"anyEffect": "使っても 効果がないよ",
"unpausedEvolutions": "{{pokemonName}}は また 進化できる。",
"unspliceConfirmation": "本当に {{pokemonName}}を {{fusionName}}から\n分離しますか {{fusionName}}は なくなる。",
"wasReverted": "{{fusionName}}は {{pokemonName}}に 回帰した。",
"releaseConfirmation": "本当に {{pokemonName}}を 逃がしますか?",
"releaseInBattle": "戦闘中の ポケモンを\n逃がすことは できません",
"selectAMove": "技を 選んでください。",
"changeQuantity": "移動する アイテムを 選んでください。\n< と > で 数量が 変えられる。",
"selectAnotherPokemonToSplice": "もう一つの ポケモンを 選んで 合体する。",
"cancel": "キャンセル",
"able": "可能",
"notAble": "不可能",
"learned": "覚えている",
"goodbye": "グッバイ {{pokemonName}}!",
"byebye": "ばいばい {{pokemonName}}!",
"farewell": "さようなら {{pokemonName}}!",
"soLong": "じゃあね {{pokemonName}}!",
"thisIsWhereWePart": "これでお別れだね {{pokemonName}}!",
"illMissYou": "恋しく思うよ {{pokemonName}}!",
"illNeverForgetYou": "一生忘れない {{pokemonName}}!",
"untilWeMeetAgain": "また出会える日まで、{{pokemonName}}!",
"sayonara": "さらば {{pokemonName}}!",
"smellYaLater": "そんじゃ あばよ {{pokemonName}}!"
} }

View File

@ -20,7 +20,7 @@
"normal": "普通", "normal": "普通",
"fast": "早い", "fast": "早い",
"faster": "とても早い", "faster": "とても早い",
"skip": "スキップ", "skip": "飛ばす",
"levelUpNotifications": "レベルアップ時のみ", "levelUpNotifications": "レベルアップ時のみ",
"on": "オン", "on": "オン",
"off": "オフ", "off": "オフ",

View File

@ -23,7 +23,7 @@
"manageNature": "性格を変える", "manageNature": "性格を変える",
"addToFavorites": "お気に入りにする", "addToFavorites": "お気に入りにする",
"removeFromFavorites": "お気に入りから除く", "removeFromFavorites": "お気に入りから除く",
"useCandies": "を使う", "useCandies": "アメを使う",
"selectNature": "性格を選んでください。", "selectNature": "性格を選んでください。",
"selectMoveSwapOut": "入れ替えたい技を選んでください。", "selectMoveSwapOut": "入れ替えたい技を選んでください。",
"selectMoveSwapWith": "他の技と交換してください。", "selectMoveSwapWith": "他の技と交換してください。",

View File

@ -1,10 +1,10 @@
{ {
"intro": "PokéRogueへようこそ!ログライク要素が\n加わったバトル中心のポケモンファンゲームです。\n$このゲームは収益を上げず、Pokémonおよび使用される\n著作権資産に対する所有権を主張しません。\n$ゲームはまだ作業中ですが、完全にプレイすることができます。\nバグ報告はディスコードコミュニティをご利用ください。\n$ゲームが遅い場合は、ブラウザ設定で「ハードウェア\nアクセラレーション」がオンになっていることを確認してください", "intro": "PokéRogueへ ようこそ! グライク要素が\n加わった バトル中心の ポケモンファンゲームです。\n$このゲームは 収益を上げず、Pokémonおよび 使用される\n著作権資産に 対する所有権を 主張しません。\n$ゲームは まだ開発中ですが、完全に プレイすることが できます。\nバグ報告は ディスコードコミュニティを ご利用ください。\n$ゲームが 遅い場合は、ブラウザ設定で「ハードウェア\nアクセラレーション」が オンになっている ことを 確認してください",
"accessMenu": "メニューにアクセスするには、入力待ちの間にMキーまたはEscを押してください。\nメニューには設定やさまざまな機能が含まれています。", "accessMenu": "メニューを開くには 入力待ちの間に MキーEscを 押してください。\nメニューには 設定や 様々な機能が 含まれています。",
"menu": "このメニューから設定にアクセスできます。\n$設定ではゲームスピード、ウィンドウスタイル、\nおよびその他のオプションを変更できます。\n$ここにはさまざまな他の機能もありますので、\nぜひ確認してみてください!", "menu": "このメニューから 設定が 開けます。\n$設定では、ゲームの速さや ウィンドウタイプなどの オプションを 変更できます。\n$ここには 様々な機能が ありますので、\nぜひ 確認してみてください!",
"starterSelect": "この画面でZキーやSpaceを押してポケモンを選択できます。\n選んだポケモンは自分の最初のパーティーになります。\n$最大6匹のパーティーで始めることができますが\nポケモンによってポイントがあり、合計10を超えてはなりません。\n$捕まえたりふかさせたりすることで\n選択できる性別、特性、フォルムなどの幅を広げることができます。\n$個体値も徐々に累積して高くなるので、\n同じポケモンをたくさん捕まえてみてください!", "starterSelect": "この画面で Zキー空白キーを押して ポケモンが 選択できます。\n選んだポケモンは 最初の手持ちに なります。\n$各ポケモンは ポイントが ある。最大6つを 選べますが\nポケモンのポイントが 合計10を超えては いけません。\n$ポケモンを 捕まえたり タマゴからふかしたり することで\n選択できる 性別、特性、フォルムなどの 幅を広げられます。\n$個体値も 徐々に 累積して 高くなるので、\n同じポケモンを たくさん 捕まえて みてください!",
"pokerus": "毎日ランダムでスターターの\n3種類に紫色の枠が表示されます。\n$登録されたスターターの中にあれば、\nパーティに追加してつよさを確認してみましょう!", "pokerus": "毎日、無作為に スターターの\n3種類には 紫色の枠が 表示されます。\n$登録された スターターの 中に いれば、\n手持ちに加えて 強さを 確認してみましょう!",
"statChange": "ポケモンは交代しない限り、\n次のバトルでも能力変化が維持されます。\n$その代わりに、トレーナーバトルや新しいバイオームに\n入る直前に自動的にリセットされます。\n$CキーまたはShiftキーを押し続けると、\n現在のポケモンの能力変化を確認できます。\n$Vキーを押すと、\n相手が使用した技も確認できます。\n$ただし、今のバトルで相手ポケモンがすでに\n使った技のみが表示されます。", "statChange": "ポケモンを 入れ替えない限り、\n次のバトルでも 能力変化は なくなりません。\n$その代わりに、トレーナーバトルや 新しいバイオームに\n入る直前に 自動的に 能力変化は 元に戻ります。\n$CキーShiftキーを 押し続けると、\n場にいるポケモンの 能力変化を 確認できます。\n$Vキーを押すと、\n相手が出した技も 確認できます。\n$ただし、現在のバトルでの 相手ポケモンが\nすでに使った 技のみが 表示されます。",
"selectItem": "バトルが終わるたびに、\nランダムなアイテム3つの中から1つを選んで獲得します。\n$種類は消耗品、ポケモンの持ち物、\n永続的なパッシブアイテムなど様々です。\n$ほとんどの消耗しない道具は\n効果が累積されます。\n$進化用など一部のアイテムは\n使用できる場合にのみ登場します。\n$持ち物を渡す機能を使用して\nポケモン同士で道具を持たせることもできます。\n$持ち物があれば、アイテム選択画面の\n右下に渡す機能が表示されます。\n$お金で消耗品を購入することもでき、\nウェーブが進むにつれて購入可能な種類が増えます。\n$アイテムを選択すると次のウェーブに進むため、\nまず消耗品の購入を行ってください。", "selectItem": "バトルが 終わるたびには、「ショップ」という\n画面で 3つのご褒美から 1つが選べます。\n$種類は 消耗品、ポケモンの持ち物や道具、\n永続的な パッシブアイテムなど 様々です。\n$ほとんどの 消耗しない 道具は\n効果が 累積されます。\n$例えば 進化アイテムなどの ご褒美は\n使用できる 場合にのみ 登場します。\n$持ち物や道具が\n手持ちポケモン間に 移動できる\n$持ち物や道具が あれば、ショップ画面の\n右下に「アイテム移行」が 表示されます。\n$ショップ画面で お金で 消耗品を 買えます。\nラウンドが 進むにつれて 買えるアイテムが 増えます。\n$ご褒美を 選択すると 次のラウンドに\n進むから、まず 消耗品を ってください。",
"eggGacha": "この画面でポケモンのたまごクーポンを\nガチャができます。\n$卵は戦闘を繰り返すうちにふかします。\n珍しいほどもっと長くかかります。\n$ふかさせたポケモンはパーティーに追加されず、\nスターティングに登録されます。\n$卵からふかしたポケモンは一般的に\n野生で捕まえたポケモンよりも高い個体値を持ちます。\n$一部のポケモンは卵からしか手に入りません。\n$各ガチャマシンがそれぞれ異なるボーナスを持っているため、\n好きな方を使ってみてください!," "eggGacha": "この画面では、「タマゴクーポン」で\nポケモンのタマゴを 取得できます。\n$タマゴは ラウンドが進めるうちに ふかします。\nタマゴのふかは レア度によって 時間が かかります。\n$ふかしたポケモンは 手持ちに 加えられず、\nスターターに 登録されます。\n$ふかしたポケモンは 一般的に\n野生ポケモンよりも 高い個体値があります。\n$あるポケモンは タマゴからしか 手に入りません。\n$各ガチャマシンは 個性的なボーナスが あるますから、\n好きな方から 引いてみてください,"
} }

View File

@ -12,6 +12,7 @@
"blockItemTheft": "{{abilityName}} de {{pokemonNameWithAffix}}\nprevine o roubo de itens!", "blockItemTheft": "{{abilityName}} de {{pokemonNameWithAffix}}\nprevine o roubo de itens!",
"typeImmunityHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaurou um pouco de PS!", "typeImmunityHeal": "{{abilityName}} de {{pokemonNameWithAffix}}\nrestaurou um pouco de PS!",
"nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}} evitou dano\ncom {{abilityName}}!", "nonSuperEffectiveImmunity": "{{pokemonNameWithAffix}} evitou dano\ncom {{abilityName}}!",
"fullHpResistType": "{{pokemonNameWithAffix}} fez seu casco brilhar!\nEstá distorcendo o confronte de tipos!",
"moveImmunity": "Isso não afeta {{pokemonNameWithAffix}}!", "moveImmunity": "Isso não afeta {{pokemonNameWithAffix}}!",
"reverseDrain": "{{pokemonNameWithAffix}} absorveu a gosma líquida!", "reverseDrain": "{{pokemonNameWithAffix}} absorveu a gosma líquida!",
"postDefendTypeChange": "{{abilityName}} de {{pokemonNameWithAffix}}\ntransformou-o no tipo {{typeName}}!", "postDefendTypeChange": "{{abilityName}} de {{pokemonNameWithAffix}}\ntransformou-o no tipo {{typeName}}!",

View File

@ -44,6 +44,7 @@
"moveNotImplemented": "{{moveName}} ainda não foi implementado e não pode ser usado.", "moveNotImplemented": "{{moveName}} ainda não foi implementado e não pode ser usado.",
"moveNoPP": "Não há mais PP\npara esse movimento!", "moveNoPP": "Não há mais PP\npara esse movimento!",
"moveDisabled": "Não se pode usar {{moveName}} porque foi desabilitado!", "moveDisabled": "Não se pode usar {{moveName}} porque foi desabilitado!",
"disableInterruptedMove": "{{moveName}} de {{pokemonNameWithAffix}}\nestá desabilitado!",
"noPokeballForce": "Uma força misteriosa\nte impede de usar Poké Bolas.", "noPokeballForce": "Uma força misteriosa\nte impede de usar Poké Bolas.",
"noPokeballTrainer": "Não se pode capturar\nPokémon dos outros!", "noPokeballTrainer": "Não se pode capturar\nPokémon dos outros!",
"noPokeballMulti": "Não se pode lançar Poké Bolas\nquando há mais de um Pokémon!", "noPokeballMulti": "Não se pode lançar Poké Bolas\nquando há mais de um Pokémon!",
@ -61,6 +62,7 @@
"skipItemQuestion": "Tem certeza de que não quer escolher um item?", "skipItemQuestion": "Tem certeza de que não quer escolher um item?",
"itemStackFull": "O estoque de {{fullItemName}} está cheio.\nVocê receberá {{itemName}} no lugar.", "itemStackFull": "O estoque de {{fullItemName}} está cheio.\nVocê receberá {{itemName}} no lugar.",
"eggHatching": "Opa?", "eggHatching": "Opa?",
"eggSkipPrompt": "Pular para súmario de ovos?",
"ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?", "ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?",
"wildPokemonWithAffix": "{{pokemonName}} selvagem", "wildPokemonWithAffix": "{{pokemonName}} selvagem",
"foePokemonWithAffix": "{{pokemonName}} adversário", "foePokemonWithAffix": "{{pokemonName}} adversário",
@ -89,7 +91,7 @@
"statSeverelyFell_other": "{{stats}} de {{pokemonNameWithAffix}} diminuíram severamente!", "statSeverelyFell_other": "{{stats}} de {{pokemonNameWithAffix}} diminuíram severamente!",
"statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}} não vai mais diminuir!", "statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}} não vai mais diminuir!",
"statWontGoAnyLower_other": "{{stats}} de {{pokemonNameWithAffix}} não vão mais diminuir!", "statWontGoAnyLower_other": "{{stats}} de {{pokemonNameWithAffix}} não vão mais diminuir!",
"transformedIntoType": "{{pokemonName}} transformed\ninto the {{type}} type!", "transformedIntoType": "{{pokemonName}} se transformou\nno tipo {{type}}!",
"ppReduced": "O PP do movimento {{moveName}} de\n{{targetName}} foi reduzido em {{reduction}}!", "ppReduced": "O PP do movimento {{moveName}} de\n{{targetName}} foi reduzido em {{reduction}}!",
"retryBattle": "Você gostaria de tentar novamente desde o início da batalha?", "retryBattle": "Você gostaria de tentar novamente desde o início da batalha?",
"unlockedSomething": "{{unlockedThing}}\nfoi desbloqueado.", "unlockedSomething": "{{unlockedThing}}\nfoi desbloqueado.",

View File

@ -67,5 +67,7 @@
"saltCuredLapse": "{{pokemonNameWithAffix}} foi ferido pelo {{moveName}}!", "saltCuredLapse": "{{pokemonNameWithAffix}} foi ferido pelo {{moveName}}!",
"cursedOnAdd": "{{pokemonNameWithAffix}} cortou seus PS pela metade e amaldiçoou {{pokemonName}}!", "cursedOnAdd": "{{pokemonNameWithAffix}} cortou seus PS pela metade e amaldiçoou {{pokemonName}}!",
"cursedLapse": "{{pokemonNameWithAffix}} foi ferido pelo Curse!", "cursedLapse": "{{pokemonNameWithAffix}} foi ferido pelo Curse!",
"stockpilingOnAdd": "{{pokemonNameWithAffix}} estocou {{stockpiledCount}}!" "stockpilingOnAdd": "{{pokemonNameWithAffix}} estocou {{stockpiledCount}}!",
"disabledOnAdd": "{{moveName}} de {{pokemonNameWithAffix}}\nfoi desabilitado!",
"disabledLapse": "{{moveName}} de {{pokemonNameWithAffix}}\nnão está mais desabilitado."
} }

View File

@ -1,6 +1,7 @@
{ {
"title": "Desafios", "title": "Desafios",
"illegalEvolution": "{{pokemon}} não pode ser escolhido\nnesse desafio!", "illegalEvolution": "{{pokemon}} não pode ser escolhido\nnesse desafio!",
"noneSelected": "Nada Selecionado",
"singleGeneration": { "singleGeneration": {
"name": "Geração Única", "name": "Geração Única",
"desc": "Você só pode user Pokémon da {{gen}} geração.", "desc": "Você só pode user Pokémon da {{gen}} geração.",

View File

@ -98,7 +98,7 @@ class DefaultOverrides {
readonly PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE; readonly PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
readonly STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE; readonly STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
readonly GENDER_OVERRIDE: Gender | null = null; readonly GENDER_OVERRIDE: Gender | null = null;
readonly MOVESET_OVERRIDE: Array<Moves> = []; readonly MOVESET_OVERRIDE: Moves | Array<Moves> = [];
readonly SHINY_OVERRIDE: boolean = false; readonly SHINY_OVERRIDE: boolean = false;
readonly VARIANT_OVERRIDE: Variant = 0; readonly VARIANT_OVERRIDE: Variant = 0;
@ -111,7 +111,7 @@ class DefaultOverrides {
readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE; readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
readonly OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE; readonly OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
readonly OPP_GENDER_OVERRIDE: Gender | null = null; readonly OPP_GENDER_OVERRIDE: Gender | null = null;
readonly OPP_MOVESET_OVERRIDE: Array<Moves> = []; readonly OPP_MOVESET_OVERRIDE: Moves | Array<Moves> = [];
readonly OPP_SHINY_OVERRIDE: boolean = false; readonly OPP_SHINY_OVERRIDE: boolean = false;
readonly OPP_VARIANT_OVERRIDE: Variant = 0; readonly OPP_VARIANT_OVERRIDE: Variant = 0;
readonly OPP_IVS_OVERRIDE: number | number[] = []; readonly OPP_IVS_OVERRIDE: number | number[] = [];

View File

@ -65,6 +65,8 @@ export class FaintPhase extends PokemonPhase {
if (pokemon.turnData?.attacksReceived?.length) { if (pokemon.turnData?.attacksReceived?.length) {
const lastAttack = pokemon.turnData.attacksReceived[0]; const lastAttack = pokemon.turnData.attacksReceived[0];
applyPostFaintAbAttrs(PostFaintAbAttr, pokemon, this.scene.getPokemonById(lastAttack.sourceId)!, new PokemonMove(lastAttack.move).getMove(), lastAttack.result); // TODO: is this bang correct? applyPostFaintAbAttrs(PostFaintAbAttr, pokemon, this.scene.getPokemonById(lastAttack.sourceId)!, new PokemonMove(lastAttack.move).getMove(), lastAttack.result); // TODO: is this bang correct?
} else { //If killed by indirect damage, apply post-faint abilities without providing a last move
applyPostFaintAbAttrs(PostFaintAbAttr, pokemon);
} }
const alivePlayField = this.scene.getField(true); const alivePlayField = this.scene.getField(true);

View File

@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -27,7 +26,7 @@ describe("Abilities - Aura Break", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
game.override.moveset([Moves.MOONBLAST, Moves.DARK_PULSE, Moves.MOONBLAST, Moves.DARK_PULSE]); game.override.moveset([Moves.MOONBLAST, Moves.DARK_PULSE, Moves.MOONBLAST, Moves.DARK_PULSE]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.AURA_BREAK); game.override.enemyAbility(Abilities.AURA_BREAK);
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
}); });

View File

@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -31,7 +30,7 @@ describe("Abilities - Battery", () => {
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]); game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
}); });
it("raises the power of allies' special moves by 30%", async () => { it("raises the power of allies' special moves by 30%", async () => {

View File

@ -4,7 +4,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -31,7 +30,7 @@ describe("Abilities - Beast Boost", () => {
.ability(Abilities.BEAST_BOOST) .ability(Abilities.BEAST_BOOST)
.startingLevel(2000) .startingLevel(2000)
.moveset([ Moves.FLAMETHROWER ]) .moveset([ Moves.FLAMETHROWER ])
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("should prefer highest stat to boost its corresponding stat stage by 1 when winning a battle", async() => { it("should prefer highest stat to boost its corresponding stat stage by 1 when winning a battle", async() => {
@ -51,7 +50,7 @@ describe("Abilities - Beast Boost", () => {
}, 20000); }, 20000);
it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => { it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => {
game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT)); game.override.enemyMoveset([Moves.GUARD_SPLIT]);
await game.classicMode.startBattle([Species.SLOWBRO]); await game.classicMode.startBattle([Species.SLOWBRO]);

View File

@ -1,10 +1,10 @@
import { Stat } from "#enums/stat"; import { Moves } from "#app/enums/moves";
import GameManager from "#test/utils/gameManager";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Abilities - Contrary", () => { describe("Abilities - Contrary", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -27,7 +27,7 @@ describe("Abilities - Contrary", () => {
.enemySpecies(Species.BULBASAUR) .enemySpecies(Species.BULBASAUR)
.enemyAbility(Abilities.CONTRARY) .enemyAbility(Abilities.CONTRARY)
.ability(Abilities.INTIMIDATE) .ability(Abilities.INTIMIDATE)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("should invert stat changes when applied", async() => { it("should invert stat changes when applied", async() => {

View File

@ -5,7 +5,6 @@ import { Species } from "#app/enums/species";
import { CommandPhase } from "#app/phases/command-phase"; import { CommandPhase } from "#app/phases/command-phase";
import { MessagePhase } from "#app/phases/message-phase"; import { MessagePhase } from "#app/phases/message-phase";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
@ -30,7 +29,7 @@ describe("Abilities - COSTAR", () => {
game.override.battleType("double"); game.override.battleType("double");
game.override.ability(Abilities.COSTAR); game.override.ability(Abilities.COSTAR);
game.override.moveset([Moves.SPLASH, Moves.NASTY_PLOT]); game.override.moveset([Moves.SPLASH, Moves.NASTY_PLOT]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
}); });

View File

@ -30,7 +30,7 @@ describe("Abilities - Dancer", () => {
.moveset([Moves.SWORDS_DANCE, Moves.SPLASH]) .moveset([Moves.SWORDS_DANCE, Moves.SPLASH])
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.DANCER) .enemyAbility(Abilities.DANCER)
.enemyMoveset(Array(4).fill(Moves.VICTORY_DANCE)); .enemyMoveset([Moves.VICTORY_DANCE]);
}); });
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Dancer_(Ability) // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Dancer_(Ability)

View File

@ -6,7 +6,6 @@ import { StatusEffect } from "#app/data/status-effect";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -31,7 +30,7 @@ describe("Abilities - Disguise", () => {
game.override game.override
.battleType("single") .battleType("single")
.enemySpecies(Species.MIMIKYU) .enemySpecies(Species.MIMIKYU)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.starterSpecies(Species.REGIELEKI) .starterSpecies(Species.REGIELEKI)
.moveset([Moves.SHADOW_SNEAK, Moves.VACUUM_WAVE, Moves.TOXIC_THREAD, Moves.SPLASH]); .moveset([Moves.SHADOW_SNEAK, Moves.VACUUM_WAVE, Moves.TOXIC_THREAD, Moves.SPLASH]);
}, TIMEOUT); }, TIMEOUT);
@ -108,7 +107,7 @@ describe("Abilities - Disguise", () => {
}, TIMEOUT); }, TIMEOUT);
it("persists form change when switched out", async () => { it("persists form change when switched out", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
game.override.starterSpecies(0); game.override.starterSpecies(0);
await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]); await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]);
@ -194,7 +193,7 @@ describe("Abilities - Disguise", () => {
}, TIMEOUT); }, TIMEOUT);
it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => { it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.ENDURE)); game.override.enemyMoveset([Moves.ENDURE]);
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const mimikyu = game.scene.getEnemyPokemon()!; const mimikyu = game.scene.getEnemyPokemon()!;

View File

@ -1,9 +1,7 @@
import { Species } from "#app/enums/species"; import { Species } from "#app/enums/species";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -23,63 +21,56 @@ describe("Abilities - Dry Skin", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override
game.override.disableCrits(); .battleType("single")
game.override.enemyAbility(Abilities.DRY_SKIN); .disableCrits()
game.override.enemyMoveset(SPLASH_ONLY); .enemyAbility(Abilities.DRY_SKIN)
game.override.enemySpecies(Species.CHARMANDER); .enemyMoveset(Moves.SPLASH)
game.override.ability(Abilities.UNNERVE); .enemySpecies(Species.CHARMANDER)
game.override.starterSpecies(Species.CHANDELURE); .ability(Abilities.BALL_FETCH)
.moveset([Moves.SUNNY_DAY, Moves.RAIN_DANCE, Moves.SPLASH, Moves.WATER_GUN])
.starterSpecies(Species.CHANDELURE);
}); });
it("during sunlight, lose 1/8 of maximum health at the end of each turn", async () => { it("during sunlight, lose 1/8 of maximum health at the end of each turn", async () => {
game.override.moveset([Moves.SUNNY_DAY, Moves.SPLASH]); await game.classicMode.startBattle();
await game.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
// first turn // first turn
let previousEnemyHp = enemy.hp;
game.move.select(Moves.SUNNY_DAY); game.move.select(Moves.SUNNY_DAY);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeLessThan(previousEnemyHp); expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
// second turn // second turn
previousEnemyHp = enemy.hp; enemy.hp = enemy.getMaxHp();
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeLessThan(previousEnemyHp); expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
}); });
it("during rain, gain 1/8 of maximum health at the end of each turn", async () => { it("during rain, gain 1/8 of maximum health at the end of each turn", async () => {
game.override.moveset([Moves.RAIN_DANCE, Moves.SPLASH]); await game.classicMode.startBattle();
await game.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1; enemy.hp = 1;
// first turn // first turn
let previousEnemyHp = enemy.hp;
game.move.select(Moves.RAIN_DANCE); game.move.select(Moves.RAIN_DANCE);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeGreaterThan(previousEnemyHp); expect(enemy.hp).toBeGreaterThan(1);
// second turn // second turn
previousEnemyHp = enemy.hp; enemy.hp = 1;
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeGreaterThan(previousEnemyHp); expect(enemy.hp).toBeGreaterThan(1);
}); });
it("opposing fire attacks do 25% more damage", async () => { it("opposing fire attacks do 25% more damage", async () => {
game.override.moveset([Moves.FLAMETHROWER]); game.override.moveset([Moves.FLAMETHROWER]);
await game.classicMode.startBattle();
await game.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
const initialHP = 1000; const initialHP = 1000;
@ -87,72 +78,65 @@ describe("Abilities - Dry Skin", () => {
// first turn // first turn
game.move.select(Moves.FLAMETHROWER); game.move.select(Moves.FLAMETHROWER);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
const fireDamageTakenWithDrySkin = initialHP - enemy.hp; const fireDamageTakenWithDrySkin = initialHP - enemy.hp;
expect(enemy.hp > 0);
enemy.hp = initialHP; enemy.hp = initialHP;
game.override.enemyAbility(Abilities.NONE); game.override.enemyAbility(Abilities.NONE);
// second turn // second turn
game.move.select(Moves.FLAMETHROWER); game.move.select(Moves.FLAMETHROWER);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
const fireDamageTakenWithoutDrySkin = initialHP - enemy.hp; const fireDamageTakenWithoutDrySkin = initialHP - enemy.hp;
expect(fireDamageTakenWithDrySkin).toBeGreaterThan(fireDamageTakenWithoutDrySkin); expect(fireDamageTakenWithDrySkin).toBeGreaterThan(fireDamageTakenWithoutDrySkin);
}); });
it("opposing water attacks heal 1/4 of maximum health and deal no damage", async () => { it("opposing water attacks heal 1/4 of maximum health and deal no damage", async () => {
game.override.moveset([Moves.WATER_GUN]); await game.classicMode.startBattle();
await game.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1; enemy.hp = 1;
game.move.select(Moves.WATER_GUN); game.move.select(Moves.WATER_GUN);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeGreaterThan(1); expect(enemy.hp).toBeGreaterThan(1);
}); });
it("opposing water attacks do not heal if they were protected from", async () => { it("opposing water attacks do not heal if they were protected from", async () => {
game.override.moveset([Moves.WATER_GUN]); game.override.enemyMoveset([Moves.PROTECT]);
await game.startBattle(); await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1; enemy.hp = 1;
game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
game.move.select(Moves.WATER_GUN); game.move.select(Moves.WATER_GUN);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBe(1); expect(enemy.hp).toBe(1);
}); });
it("multi-strike water attacks only heal once", async () => { it("multi-strike water attacks only heal once", async () => {
game.override.moveset([Moves.WATER_GUN, Moves.WATER_SHURIKEN]); game.override.moveset([Moves.WATER_GUN, Moves.WATER_SHURIKEN]);
await game.startBattle(); await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1; enemy.hp = 1;
// first turn // first turn
game.move.select(Moves.WATER_SHURIKEN); game.move.select(Moves.WATER_SHURIKEN);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
const healthGainedFromWaterShuriken = enemy.hp - 1; const healthGainedFromWaterShuriken = enemy.hp - 1;
enemy.hp = 1; enemy.hp = 1;
// second turn // second turn
game.move.select(Moves.WATER_GUN); game.move.select(Moves.WATER_GUN);
await game.phaseInterceptor.to(TurnEndPhase); await game.phaseInterceptor.to("TurnEndPhase");
const healthGainedFromWaterGun = enemy.hp - 1; const healthGainedFromWaterGun = enemy.hp - 1;
expect(healthGainedFromWaterShuriken).toBe(healthGainedFromWaterGun); expect(healthGainedFromWaterShuriken).toBe(healthGainedFromWaterGun);

View File

@ -7,7 +7,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -38,7 +37,7 @@ describe("Abilities - Flash Fire", () => {
it("immune to Fire-type moves", async () => { it("immune to Fire-type moves", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY); game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;
@ -49,7 +48,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("not activate if the Pokémon is protected from the Fire-type move", async () => { it("not activate if the Pokémon is protected from the Fire-type move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.PROTECT]); game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.PROTECT]);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;
@ -60,7 +59,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("activated by Will-O-Wisp", async () => { it("activated by Will-O-Wisp", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WILL_O_WISP)).moveset(SPLASH_ONLY); game.override.enemyMoveset([Moves.WILL_O_WISP]).moveset(Moves.SPLASH);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;
@ -75,7 +74,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("activated after being frozen", async () => { it("activated after being frozen", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY); game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH);
game.override.statusEffect(StatusEffect.FREEZE); game.override.statusEffect(StatusEffect.FREEZE);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
@ -88,7 +87,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("not passing with baton pass", async () => { it("not passing with baton pass", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.BATON_PASS]); game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.BATON_PASS]);
await game.startBattle([Species.BLISSEY, Species.CHANSEY]); await game.startBattle([Species.BLISSEY, Species.CHANSEY]);
// ensure use baton pass after enemy moved // ensure use baton pass after enemy moved
@ -104,7 +103,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("boosts Fire-type move when the ability is activated", async () => { it("boosts Fire-type move when the ability is activated", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.FIRE_PLEDGE)).moveset([Moves.EMBER, Moves.SPLASH]); game.override.enemyMoveset([Moves.FIRE_PLEDGE]).moveset([Moves.EMBER, Moves.SPLASH]);
game.override.enemyAbility(Abilities.FLASH_FIRE).ability(Abilities.NONE); game.override.enemyAbility(Abilities.FLASH_FIRE).ability(Abilities.NONE);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;

View File

@ -5,7 +5,6 @@ import { WeatherType } from "#app/enums/weather-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -44,7 +43,7 @@ describe("Abilities - Flower Gift", () => {
game.override game.override
.moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.SKILL_SWAP]) .moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.SKILL_SWAP])
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });
@ -92,7 +91,7 @@ describe("Abilities - Flower Gift", () => {
}); });
it("reverts to Overcast Form when the Pokémon loses Flower Gift, changes form under Harsh Sunlight/Sunny when it regains it", async () => { it("reverts to Overcast Form when the Pokémon loses Flower Gift, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP)).weather(WeatherType.HARSH_SUN); game.override.enemyMoveset([Moves.SKILL_SWAP]).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM]); await game.classicMode.startBattle([Species.CHERRIM]);
@ -111,7 +110,7 @@ describe("Abilities - Flower Gift", () => {
}); });
it("reverts to Overcast Form when the Flower Gift is suppressed, changes form under Harsh Sunlight/Sunny when it regains it", async () => { it("reverts to Overcast Form when the Flower Gift is suppressed, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.HARSH_SUN); game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM, Species.MAGIKARP]); await game.classicMode.startBattle([Species.CHERRIM, Species.MAGIKARP]);

View File

@ -10,7 +10,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -67,7 +66,7 @@ describe("Abilities - Forecast", () => {
game.override game.override
.moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.TACKLE]) .moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.TACKLE])
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });
@ -229,7 +228,7 @@ describe("Abilities - Forecast", () => {
}); });
it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => { it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.RAIN); game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN);
await game.startBattle([Species.CASTFORM, Species.PIKACHU]); await game.startBattle([Species.CASTFORM, Species.PIKACHU]);
const castform = game.scene.getPlayerPokemon()!; const castform = game.scene.getPlayerPokemon()!;
@ -260,7 +259,7 @@ describe("Abilities - Forecast", () => {
}); });
it("does not change Castform's form until after Stealth Rock deals damage", async () => { it("does not change Castform's form until after Stealth Rock deals damage", async () => {
game.override.weather(WeatherType.RAIN).enemyMoveset(Array(4).fill(Moves.STEALTH_ROCK)); game.override.weather(WeatherType.RAIN).enemyMoveset([Moves.STEALTH_ROCK]);
await game.startBattle([Species.PIKACHU, Species.CASTFORM]); await game.startBattle([Species.PIKACHU, Species.CASTFORM]);
// First turn - set up stealth rock // First turn - set up stealth rock

View File

@ -6,7 +6,6 @@ import { Moves } from "#app/enums/moves";
import { Species } from "#app/enums/species"; import { Species } from "#app/enums/species";
import { HitResult } from "#app/field/pokemon"; import { HitResult } from "#app/field/pokemon";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -36,7 +35,7 @@ describe("Abilities - Galvanize", () => {
.moveset([Moves.TACKLE, Moves.REVELATION_DANCE, Moves.FURY_SWIPES]) .moveset([Moves.TACKLE, Moves.REVELATION_DANCE, Moves.FURY_SWIPES])
.enemySpecies(Species.DUSCLOPS) .enemySpecies(Species.DUSCLOPS)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyLevel(100); .enemyLevel(100);
}); });

View File

@ -11,7 +11,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
describe("Abilities - Gulp Missile", () => { describe("Abilities - Gulp Missile", () => {
@ -49,7 +48,7 @@ describe("Abilities - Gulp Missile", () => {
.moveset([Moves.SURF, Moves.DIVE, Moves.SPLASH]) .moveset([Moves.SURF, Moves.DIVE, Moves.SPLASH])
.enemySpecies(Species.SNORLAX) .enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyLevel(5); .enemyLevel(5);
}); });
@ -108,7 +107,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("deals 1/4 of the attacker's maximum HP when hit by a damaging attack", async () => { it("deals 1/4 of the attacker's maximum HP when hit by a damaging attack", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -121,7 +120,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("does not have any effect when hit by non-damaging attack", async () => { it("does not have any effect when hit by non-damaging attack", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TAIL_WHIP)); game.override.enemyMoveset([Moves.TAIL_WHIP]);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -140,7 +139,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("lowers attacker's DEF stat stage by 1 when hit in Gulping form", async () => { it("lowers attacker's DEF stat stage by 1 when hit in Gulping form", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -164,7 +163,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("paralyzes the enemy when hit in Gorging form", async () => { it("paralyzes the enemy when hit in Gorging form", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -188,7 +187,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("does not activate the ability when underwater", async () => { it("does not activate the ability when underwater", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SURF)); game.override.enemyMoveset([Moves.SURF]);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -201,7 +200,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("prevents effect damage but inflicts secondary effect on attacker with Magic Guard", async () => { it("prevents effect damage but inflicts secondary effect on attacker with Magic Guard", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)).enemyAbility(Abilities.MAGIC_GUARD); game.override.enemyMoveset([Moves.TACKLE]).enemyAbility(Abilities.MAGIC_GUARD);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -225,7 +224,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("cannot be suppressed", async () => { it("cannot be suppressed", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)); game.override.enemyMoveset([Moves.GASTRO_ACID]);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -245,7 +244,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("cannot be swapped with another ability", async () => { it("cannot be swapped with another ability", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP)); game.override.enemyMoveset([Moves.SKILL_SWAP]);
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;

View File

@ -5,7 +5,6 @@ import { toDmgValue } from "#app/utils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -30,7 +29,7 @@ describe("Abilities - Heatproof", () => {
.disableCrits() .disableCrits()
.enemySpecies(Species.CHARMANDER) .enemySpecies(Species.CHARMANDER)
.enemyAbility(Abilities.HEATPROOF) .enemyAbility(Abilities.HEATPROOF)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyLevel(100) .enemyLevel(100)
.starterSpecies(Species.CHANDELURE) .starterSpecies(Species.CHANDELURE)
.ability(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH)

View File

@ -4,7 +4,6 @@ import { Stat } from "#app/enums/stat";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -29,7 +28,7 @@ describe("Abilities - Hustle", () => {
.moveset([ Moves.TACKLE, Moves.GIGA_DRAIN, Moves.FISSURE ]) .moveset([ Moves.TACKLE, Moves.GIGA_DRAIN, Moves.FISSURE ])
.disableCrits() .disableCrits()
.battleType("single") .battleType("single")
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemySpecies(Species.SHUCKLE) .enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });

View File

@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -29,7 +28,7 @@ describe("Abilities - Hyper Cutter", () => {
.ability(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH)
.enemySpecies(Species.SHUCKLE) .enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.HYPER_CUTTER) .enemyAbility(Abilities.HYPER_CUTTER)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability) // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability)

View File

@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { SPLASH_ONLY } from "../utils/testUtils";
// TODO: Add more tests once Imposter is fully implemented // TODO: Add more tests once Imposter is fully implemented
describe("Abilities - Imposter", () => { describe("Abilities - Imposter", () => {
@ -31,9 +30,9 @@ describe("Abilities - Imposter", () => {
.enemyLevel(200) .enemyLevel(200)
.enemyAbility(Abilities.BEAST_BOOST) .enemyAbility(Abilities.BEAST_BOOST)
.enemyPassiveAbility(Abilities.BALL_FETCH) .enemyPassiveAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.ability(Abilities.IMPOSTER) .ability(Abilities.IMPOSTER)
.moveset(SPLASH_ONLY); .moveset(Moves.SPLASH);
}); });
it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => { it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => {
@ -77,7 +76,7 @@ describe("Abilities - Imposter", () => {
}, 20000); }, 20000);
it("should copy in-battle overridden stats", async () => { it("should copy in-battle overridden stats", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT)); game.override.enemyMoveset([Moves.POWER_SPLIT]);
await game.startBattle([ await game.startBattle([
Species.DITTO Species.DITTO

View File

@ -7,7 +7,6 @@ import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Intimidate", () => { describe("Abilities - Intimidate", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -31,7 +30,7 @@ describe("Abilities - Intimidate", () => {
.enemyPassiveAbility(Abilities.HYDRATION) .enemyPassiveAbility(Abilities.HYDRATION)
.ability(Abilities.INTIMIDATE) .ability(Abilities.INTIMIDATE)
.startingWave(3) .startingWave(3)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("should lower ATK stat stage by 1 of enemy Pokemon on entry and player switch", async () => { it("should lower ATK stat stage by 1 of enemy Pokemon on entry and player switch", async () => {
@ -108,7 +107,7 @@ describe("Abilities - Intimidate", () => {
it("should lower ATK stat stage by 1 for every switch", async () => { it("should lower ATK stat stage by 1 for every switch", async () => {
game.override.moveset([Moves.SPLASH]) game.override.moveset([Moves.SPLASH])
.enemyMoveset(new Array(4).fill(Moves.VOLT_SWITCH)) .enemyMoveset([Moves.VOLT_SWITCH])
.startingWave(5); .startingWave(5);
await game.classicMode.startBattle([ Species.MIGHTYENA, Species.POOCHYENA ]); await game.classicMode.startBattle([ Species.MIGHTYENA, Species.POOCHYENA ]);

View File

@ -9,7 +9,6 @@ import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
@ -183,7 +182,7 @@ describe("Abilities - Libero", () => {
"ability applies correctly even if the pokemon's move misses", "ability applies correctly even if the pokemon's move misses",
async () => { async () => {
game.override.moveset([Moves.TACKLE]); game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);

View File

@ -8,7 +8,6 @@ import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -39,7 +38,7 @@ describe("Abilities - Magic Guard", () => {
/** Enemy Pokemon overrides */ /** Enemy Pokemon overrides */
game.override.enemySpecies(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyLevel(100); game.override.enemyLevel(100);
}); });

View File

@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -29,8 +28,8 @@ describe("Abilities - Moody", () => {
.enemySpecies(Species.RATTATA) .enemySpecies(Species.RATTATA)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.ability(Abilities.MOODY) .ability(Abilities.MOODY)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.moveset(SPLASH_ONLY); .moveset(Moves.SPLASH);
}); });
it("should increase one stat stage by 2 and decrease a different stat stage by 1", it("should increase one stat stage by 2 and decrease a different stat stage by 1",

View File

@ -5,7 +5,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { EnemyCommandPhase } from "#app/phases/enemy-command-phase";
import { VictoryPhase } from "#app/phases/victory-phase"; import { VictoryPhase } from "#app/phases/victory-phase";
@ -34,7 +33,7 @@ describe("Abilities - Moxie", () => {
game.override.ability(Abilities.MOXIE); game.override.ability(Abilities.MOXIE);
game.override.startingLevel(2000); game.override.startingLevel(2000);
game.override.moveset([ moveToUse ]); game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
}); });
it("should raise ATK stat stage by 1 when winning a battle", async() => { it("should raise ATK stat stage by 1 when winning a battle", async() => {

View File

@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -34,7 +33,7 @@ describe("Abilities - Parental Bond", () => {
game.override.ability(Abilities.PARENTAL_BOND); game.override.ability(Abilities.PARENTAL_BOND);
game.override.enemySpecies(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.FUR_COAT); game.override.enemyAbility(Abilities.FUR_COAT);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.startingLevel(100); game.override.startingLevel(100);
game.override.enemyLevel(100); game.override.enemyLevel(100);
}); });
@ -175,7 +174,7 @@ describe("Abilities - Parental Bond", () => {
"should not apply multiplier to counter moves", "should not apply multiplier to counter moves",
async () => { async () => {
game.override.moveset([Moves.COUNTER]); game.override.moveset([Moves.COUNTER]);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); game.override.enemyMoveset([Moves.TACKLE]);
await game.classicMode.startBattle([Species.SHUCKLE]); await game.classicMode.startBattle([Species.SHUCKLE]);
@ -465,7 +464,7 @@ describe("Abilities - Parental Bond", () => {
"should not cause user to hit into King's Shield more than once", "should not cause user to hit into King's Shield more than once",
async () => { async () => {
game.override.moveset([Moves.TACKLE]); game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(Array(4).fill(Moves.KINGS_SHIELD)); game.override.enemyMoveset([Moves.KINGS_SHIELD]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([Species.MAGIKARP]);

View File

@ -8,7 +8,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Abilities - Pastel Veil", () => { describe("Abilities - Pastel Veil", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -31,7 +30,7 @@ describe("Abilities - Pastel Veil", () => {
.moveset([Moves.TOXIC_THREAD, Moves.SPLASH]) .moveset([Moves.TOXIC_THREAD, Moves.SPLASH])
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemySpecies(Species.SUNKERN) .enemySpecies(Species.SUNKERN)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("prevents the user and its allies from being afflicted by poison", async () => { it("prevents the user and its allies from being afflicted by poison", async () => {

View File

@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -29,7 +28,7 @@ describe("Abilities - Power Spot", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("double"); game.override.battleType("double");
game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]); game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
}); });

View File

@ -9,7 +9,6 @@ import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
@ -183,7 +182,7 @@ describe("Abilities - Protean", () => {
"ability applies correctly even if the pokemon's move misses", "ability applies correctly even if the pokemon's move misses",
async () => { async () => {
game.override.moveset([Moves.TACKLE]); game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);

View File

@ -32,7 +32,7 @@ describe("Abilities - Quick Draw", () => {
game.override.enemyLevel(100); game.override.enemyLevel(100);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); game.override.enemyMoveset([Moves.TACKLE]);
vi.spyOn(allAbilities[Abilities.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue(100); vi.spyOn(allAbilities[Abilities.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue(100);
}); });
@ -76,7 +76,7 @@ describe("Abilities - Quick Draw", () => {
); );
test("does not increase priority", async () => { test("does not increase priority", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EXTREME_SPEED)); game.override.enemyMoveset([Moves.EXTREME_SPEED]);
await game.startBattle(); await game.startBattle();

View File

@ -35,7 +35,7 @@ describe("Abilities - Sand Spit", () => {
}); });
it("should trigger when hit with damaging move", async () => { it("should trigger when hit with damaging move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle(); await game.startBattle();
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
@ -45,7 +45,7 @@ describe("Abilities - Sand Spit", () => {
}, 20000); }, 20000);
it("should not trigger when targetted with status moves", async () => { it("should not trigger when targetted with status moves", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); game.override.enemyMoveset([Moves.GROWL]);
await game.startBattle(); await game.startBattle();
game.move.select(Moves.COIL); game.move.select(Moves.COIL);

View File

@ -9,7 +9,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
// See also: TypeImmunityAbAttr // See also: TypeImmunityAbAttr
describe("Abilities - Sap Sipper", () => { describe("Abilities - Sap Sipper", () => {
@ -37,7 +36,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER; const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]); game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.DUSKULL); game.override.enemySpecies(Species.DUSKULL);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -59,7 +58,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER; const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]); game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -80,7 +79,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER; const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]); game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -100,7 +99,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER; const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]); game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -123,7 +122,7 @@ describe("Abilities - Sap Sipper", () => {
game.override.moveset([ moveToUse ]); game.override.moveset([ moveToUse ]);
game.override.ability(ability); game.override.ability(ability);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.NONE); game.override.enemyAbility(Abilities.NONE);

View File

@ -1,10 +1,10 @@
import { Stat } from "#enums/stat"; import { Moves } from "#app/enums/moves";
import GameManager from "#test/utils/gameManager";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Abilities - Simple", () => { describe("Abilities - Simple", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -27,7 +27,7 @@ describe("Abilities - Simple", () => {
.enemySpecies(Species.BULBASAUR) .enemySpecies(Species.BULBASAUR)
.enemyAbility(Abilities.SIMPLE) .enemyAbility(Abilities.SIMPLE)
.ability(Abilities.INTIMIDATE) .ability(Abilities.INTIMIDATE)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("should double stat changes when applied", async() => { it("should double stat changes when applied", async() => {

View File

@ -4,7 +4,6 @@ import { Abilities } from "#app/enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -31,7 +30,7 @@ describe("Abilities - Steely Spirit", () => {
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.moveset([Moves.IRON_HEAD, Moves.SPLASH]); game.override.moveset([Moves.IRON_HEAD, Moves.SPLASH]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
vi.spyOn(allMoves[moveToCheck], "calculateBattlePower"); vi.spyOn(allMoves[moveToCheck], "calculateBattlePower");
}); });

View File

@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -45,7 +44,7 @@ describe("Abilities - Sweet Veil", () => {
}); });
it("causes Rest to fail when used by the user or its allies", async () => { it("causes Rest to fail when used by the user or its allies", async () => {
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
@ -72,7 +71,7 @@ describe("Abilities - Sweet Veil", () => {
game.override.enemySpecies(Species.PIKACHU); game.override.enemySpecies(Species.PIKACHU);
game.override.enemyLevel(5); game.override.enemyLevel(5);
game.override.startingLevel(5); game.override.startingLevel(5);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]); await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]);

View File

@ -30,7 +30,7 @@ describe("Abilities - Tera Shell", () => {
.moveset([Moves.SPLASH]) .moveset([Moves.SPLASH])
.enemySpecies(Species.SNORLAX) .enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA) .enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.MACH_PUNCH)) .enemyMoveset([Moves.MACH_PUNCH])
.startingLevel(100) .startingLevel(100)
.enemyLevel(100); .enemyLevel(100);
}); });
@ -60,7 +60,7 @@ describe("Abilities - Tera Shell", () => {
it( it(
"should not override type immunities", "should not override type immunities",
async () => { async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK)); game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
await game.classicMode.startBattle([Species.SNORLAX]); await game.classicMode.startBattle([Species.SNORLAX]);
@ -77,7 +77,7 @@ describe("Abilities - Tera Shell", () => {
it( it(
"should not override type multipliers less than 0.5x", "should not override type multipliers less than 0.5x",
async () => { async () => {
game.override.enemyMoveset(Array(4).fill(Moves.QUICK_ATTACK)); game.override.enemyMoveset([Moves.QUICK_ATTACK]);
await game.classicMode.startBattle([Species.AGGRON]); await game.classicMode.startBattle([Species.AGGRON]);
@ -94,7 +94,7 @@ describe("Abilities - Tera Shell", () => {
it( it(
"should not affect the effectiveness of fixed-damage moves", "should not affect the effectiveness of fixed-damage moves",
async () => { async () => {
game.override.enemyMoveset(Array(4).fill(Moves.DRAGON_RAGE)); game.override.enemyMoveset([Moves.DRAGON_RAGE]);
await game.classicMode.startBattle([Species.CHARIZARD]); await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -28,7 +27,7 @@ describe("Abilities - Wind Power", () => {
game.override.enemySpecies(Species.SHIFTRY); game.override.enemySpecies(Species.SHIFTRY);
game.override.enemyAbility(Abilities.WIND_POWER); game.override.enemyAbility(Abilities.WIND_POWER);
game.override.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]); game.override.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
}); });
it("it becomes charged when hit by wind moves", async () => { it("it becomes charged when hit by wind moves", async () => {

View File

@ -3,7 +3,6 @@ import GameManager from "#test/utils/gameManager";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -28,7 +27,7 @@ describe("Abilities - Wind Rider", () => {
.enemySpecies(Species.SHIFTRY) .enemySpecies(Species.SHIFTRY)
.enemyAbility(Abilities.WIND_RIDER) .enemyAbility(Abilities.WIND_RIDER)
.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]) .moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM])
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("takes no damage from wind moves and its ATK stat stage is raised by 1 when hit by one", async () => { it("takes no damage from wind moves and its ATK stat stage is raised by 1 when hit by one", async () => {

View File

@ -5,7 +5,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -30,7 +29,7 @@ describe("Abilities - Wonder Skin", () => {
game.override.ability(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.WONDER_SKIN); game.override.enemyAbility(Abilities.WONDER_SKIN);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
}); });
it("lowers accuracy of status moves to 50%", async () => { it("lowers accuracy of status moves to 50%", async () => {

View File

@ -6,7 +6,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -30,8 +29,8 @@ describe("Abilities - ZERO TO HERO", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleType("single") .battleType("single")
.moveset(SPLASH_ONLY) .moveset(Moves.SPLASH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });

View File

@ -8,7 +8,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Arena - Gravity", () => { describe("Arena - Gravity", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -32,7 +31,7 @@ describe("Arena - Gravity", () => {
.ability(Abilities.UNNERVE) .ability(Abilities.UNNERVE)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemySpecies(Species.SHUCKLE) .enemySpecies(Species.SHUCKLE)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
// Reference: https://bulbapedia.bulbagarden.net/wiki/Gravity_(move) // Reference: https://bulbapedia.bulbagarden.net/wiki/Gravity_(move)

View File

@ -31,7 +31,7 @@ describe("Weather - Fog", () => {
game.override.ability(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH)); game.override.enemyMoveset([Moves.SPLASH]);
}); });
it("move accuracy is multiplied by 90%", async () => { it("move accuracy is multiplied by 90%", async () => {

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
describe("Weather - Hail", () => { describe("Weather - Hail", () => {
@ -26,8 +25,8 @@ describe("Weather - Hail", () => {
game.override game.override
.weather(WeatherType.HAIL) .weather(WeatherType.HAIL)
.battleType("single") .battleType("single")
.moveset(SPLASH_ONLY) .moveset(Moves.SPLASH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemySpecies(Species.MAGIKARP); .enemySpecies(Species.MAGIKARP);
}); });

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Weather - Sandstorm", () => { describe("Weather - Sandstorm", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -25,8 +24,8 @@ describe("Weather - Sandstorm", () => {
game.override game.override
.weather(WeatherType.SANDSTORM) .weather(WeatherType.SANDSTORM)
.battleType("single") .battleType("single")
.moveset(SPLASH_ONLY) .moveset(Moves.SPLASH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemySpecies(Species.MAGIKARP); .enemySpecies(Species.MAGIKARP);
}); });

View File

@ -1,4 +1,5 @@
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/move";
import { StatusEffect } from "#app/enums/status-effect";
import { TurnStartPhase } from "#app/phases/turn-start-phase"; import { TurnStartPhase } from "#app/phases/turn-start-phase";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
@ -33,7 +34,7 @@ describe("Weather - Strong Winds", () => {
it("electric type move is not very effective on Rayquaza", async () => { it("electric type move is not very effective on Rayquaza", async () => {
game.override.enemySpecies(Species.RAYQUAZA); game.override.enemySpecies(Species.RAYQUAZA);
await game.startBattle([Species.PIKACHU]); await game.classicMode.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -44,7 +45,7 @@ describe("Weather - Strong Winds", () => {
}); });
it("electric type move is neutral for flying type pokemon", async () => { it("electric type move is neutral for flying type pokemon", async () => {
await game.startBattle([Species.PIKACHU]); await game.classicMode.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -55,7 +56,7 @@ describe("Weather - Strong Winds", () => {
}); });
it("ice type move is neutral for flying type pokemon", async () => { it("ice type move is neutral for flying type pokemon", async () => {
await game.startBattle([Species.PIKACHU]); await game.classicMode.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -66,7 +67,7 @@ describe("Weather - Strong Winds", () => {
}); });
it("rock type move is neutral for flying type pokemon", async () => { it("rock type move is neutral for flying type pokemon", async () => {
await game.startBattle([Species.PIKACHU]); await game.classicMode.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -75,4 +76,18 @@ describe("Weather - Strong Winds", () => {
await game.phaseInterceptor.to(TurnStartPhase); await game.phaseInterceptor.to(TurnStartPhase);
expect(enemy.getAttackTypeEffectiveness(allMoves[Moves.ROCK_SLIDE].type, pikachu)).toBe(1); expect(enemy.getAttackTypeEffectiveness(allMoves[Moves.ROCK_SLIDE].type, pikachu)).toBe(1);
}); });
it("weather goes away when last trainer pokemon dies to indirect damage", async () => {
game.override.enemyStatusEffect(StatusEffect.POISON);
await game.classicMode.startBattle([Species.MAGIKARP]);
const enemy = game.scene.getEnemyPokemon()!;
enemy.hp = 1;
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase");
expect(game.scene.arena.weather?.weatherType).toBeUndefined();
});
}); });

View File

@ -25,7 +25,6 @@ import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Test Battle Phase", () => { describe("Test Battle Phase", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -319,7 +318,7 @@ describe("Test Battle Phase", () => {
.startingWave(1) .startingWave(1)
.startingLevel(100) .startingLevel(100)
.moveset([moveToUse]) .moveset([moveToUse])
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.startingHeldItems([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]); .startingHeldItems([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]);
await game.startBattle(); await game.startBattle();

View File

@ -5,7 +5,6 @@ import { ArenaTagType } from "#enums/arena-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -31,7 +30,7 @@ describe("Round Down and Minimun 1 test in Damage Calculation", () => {
it("When the user fails to use Jump Kick with Wonder Guard ability, the damage should be 1.", async () => { it("When the user fails to use Jump Kick with Wonder Guard ability, the damage should be 1.", async () => {
game.override.enemySpecies(Species.GASTLY); game.override.enemySpecies(Species.GASTLY);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.starterSpecies(Species.SHEDINJA); game.override.starterSpecies(Species.SHEDINJA);
game.override.moveset([Moves.JUMP_KICK]); game.override.moveset([Moves.JUMP_KICK]);
game.override.ability(Abilities.WONDER_GUARD); game.override.ability(Abilities.WONDER_GUARD);

View File

@ -4,7 +4,6 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -29,7 +28,7 @@ describe("Double Battles", () => {
// double-battle player's pokemon both fainted in same round, then revive one, and next double battle summons two player's pokemon successfully. // double-battle player's pokemon both fainted in same round, then revive one, and next double battle summons two player's pokemon successfully.
// (There were bugs that either only summon one when can summon two, player stuck in switchPhase etc) // (There were bugs that either only summon one when can summon two, player stuck in switchPhase etc)
it("3v2 edge case: player summons 2 pokemon on the next battle after being fainted and revived", async () => { it("3v2 edge case: player summons 2 pokemon on the next battle after being fainted and revived", async () => {
game.override.battleType("double").enemyMoveset(SPLASH_ONLY).moveset(SPLASH_ONLY); game.override.battleType("double").enemyMoveset(Moves.SPLASH).moveset(Moves.SPLASH);
await game.startBattle([ await game.startBattle([
Species.BULBASAUR, Species.BULBASAUR,
Species.CHARIZARD, Species.CHARIZARD,

View File

@ -8,7 +8,6 @@ import { Species } from "#enums/species";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -38,7 +37,7 @@ describe("Inverse Battle", () => {
.ability(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH)
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
}); });
it("Immune types are 2x effective - Thunderbolt against Ground Type", async () => { it("Immune types are 2x effective - Thunderbolt against Ground Type", async () => {

View File

@ -2,7 +2,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import GameManager from "./utils/gameManager"; import GameManager from "./utils/gameManager";
import { Species } from "#app/enums/species"; import { Species } from "#app/enums/species";
import { getPokemonSpecies } from "#app/data/pokemon-species"; import { getPokemonSpecies } from "#app/data/pokemon-species";
import { SPLASH_ONLY } from "./utils/testUtils";
import { Abilities } from "#app/enums/abilities"; import { Abilities } from "#app/enums/abilities";
import { Moves } from "#app/enums/moves"; import { Moves } from "#app/enums/moves";
import { EFFECTIVE_STATS } from "#app/enums/stat"; import { EFFECTIVE_STATS } from "#app/enums/stat";
@ -33,7 +32,7 @@ describe("Boss Pokemon / Shields", () => {
.disableTrainerWaves() .disableTrainerWaves()
.disableCrits() .disableCrits()
.enemySpecies(Species.RATTATA) .enemySpecies(Species.RATTATA)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyHeldItems([]) .enemyHeldItems([])
.startingLevel(1000) .startingLevel(1000)
.moveset([Moves.FALSE_SWIPE, Moves.SUPER_FANG, Moves.SPLASH]) .moveset([Moves.FALSE_SWIPE, Moves.SUPER_FANG, Moves.SPLASH])

View File

@ -6,7 +6,6 @@ import * as Utils from "#app/utils";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "./utils/testUtils";
describe("Evolution", () => { describe("Evolution", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -99,7 +98,7 @@ describe("Evolution", () => {
it("should increase both HP and max HP when evolving", async () => { it("should increase both HP and max HP when evolving", async () => {
game.override.moveset([Moves.SURF]) game.override.moveset([Moves.SURF])
.enemySpecies(Species.GOLEM) .enemySpecies(Species.GOLEM)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.startingWave(21) .startingWave(21)
.startingLevel(16) .startingLevel(16)
.enemyLevel(50); .enemyLevel(50);
@ -126,7 +125,7 @@ describe("Evolution", () => {
it("should not fully heal HP when evolving", async () => { it("should not fully heal HP when evolving", async () => {
game.override.moveset([Moves.SURF]) game.override.moveset([Moves.SURF])
.enemySpecies(Species.GOLEM) .enemySpecies(Species.GOLEM)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.startingWave(21) .startingWave(21)
.startingLevel(13) .startingLevel(13)
.enemyLevel(30); .enemyLevel(30);

View File

@ -7,7 +7,6 @@ import { GameModes } from "#app/game-mode";
import { TurnHeldItemTransferModifier } from "#app/modifier/modifier"; import { TurnHeldItemTransferModifier } from "#app/modifier/modifier";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import GameManager from "./utils/gameManager"; import GameManager from "./utils/gameManager";
import { SPLASH_ONLY } from "./utils/testUtils";
const FinalWave = { const FinalWave = {
Classic: 200, Classic: 200,
@ -29,7 +28,7 @@ describe("Final Boss", () => {
.startingWave(FinalWave.Classic) .startingWave(FinalWave.Classic)
.startingBiome(Biome.END) .startingBiome(Biome.END)
.disableCrits() .disableCrits()
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.moveset([ Moves.SPLASH, Moves.WILL_O_WISP, Moves.DRAGON_PULSE ]) .moveset([ Moves.SPLASH, Moves.WILL_O_WISP, Moves.DRAGON_PULSE ])
.startingLevel(10000); .startingLevel(10000);
}); });

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phase from "phaser"; import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { BattleEndPhase } from "#app/phases/battle-end-phase";
import { TempCritBoosterModifier } from "#app/modifier/modifier"; import { TempCritBoosterModifier } from "#app/modifier/modifier";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
@ -34,7 +33,7 @@ describe("Items - Dire Hit", () => {
game.override game.override
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.moveset([ Moves.POUND ]) .moveset([ Moves.POUND ])
.startingHeldItems([{ name: "DIRE_HIT" }]) .startingHeldItems([{ name: "DIRE_HIT" }])
.battleType("single") .battleType("single")

View File

@ -4,7 +4,6 @@ import { DoubleBattleChanceBoosterModifier } from "#app/modifier/modifier";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js"; import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js";
import { Mode } from "#app/ui/ui.js"; import { Mode } from "#app/ui/ui.js";
import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler.js"; import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler.js";
@ -64,7 +63,7 @@ describe("Items - Double Battle Chance Boosters", () => {
game.override game.override
.startingModifier([{ name: "LURE" }]) .startingModifier([{ name: "LURE" }])
.itemRewards([{ name: "LURE" }]) .itemRewards([{ name: "LURE" }])
.moveset(SPLASH_ONLY) .moveset(Moves.SPLASH)
.startingLevel(200); .startingLevel(200);
await game.classicMode.startBattle([ await game.classicMode.startBattle([

View File

@ -8,7 +8,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phase from "phaser"; import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000; // 20 seconds const TIMEOUT = 20 * 1000; // 20 seconds
@ -38,7 +37,7 @@ describe("Items - Grip Claw", () => {
]) ])
.enemySpecies(Species.SNORLAX) .enemySpecies(Species.SNORLAX)
.ability(Abilities.KLUTZ) .ability(Abilities.KLUTZ)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyHeldItems([ .enemyHeldItems([
{ name: "BERRY", type: BerryType.SITRUS, count: 2 }, { name: "BERRY", type: BerryType.SITRUS, count: 2 },
{ name: "BERRY", type: BerryType.LUM, count: 2 }, { name: "BERRY", type: BerryType.LUM, count: 2 },

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phase from "phaser"; import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Items - Scope Lens", () => { describe("Items - Scope Lens", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -25,7 +24,7 @@ describe("Items - Scope Lens", () => {
game.override game.override
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.moveset([ Moves.POUND ]) .moveset([ Moves.POUND ])
.startingHeldItems([{ name: "SCOPE_LENS" }]) .startingHeldItems([{ name: "SCOPE_LENS" }])
.battleType("single") .battleType("single")

View File

@ -5,7 +5,6 @@ import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { Moves } from "#app/enums/moves"; import { Moves } from "#app/enums/moves";
import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { SPLASH_ONLY } from "../utils/testUtils";
import { Abilities } from "#app/enums/abilities"; import { Abilities } from "#app/enums/abilities";
import { TempStatStageBoosterModifier } from "#app/modifier/modifier"; import { TempStatStageBoosterModifier } from "#app/modifier/modifier";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
@ -34,7 +33,7 @@ describe("Items - Temporary Stat Stage Boosters", () => {
game.override game.override
.battleType("single") .battleType("single")
.enemySpecies(Species.SHUCKLE) .enemySpecies(Species.SHUCKLE)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.moveset([ Moves.TACKLE, Moves.SPLASH, Moves.HONE_CLAWS, Moves.BELLY_DRUM ]) .moveset([ Moves.TACKLE, Moves.SPLASH, Moves.HONE_CLAWS, Moves.BELLY_DRUM ])
.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]); .startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);

View File

@ -31,7 +31,7 @@ describe("Moves - Alluring Voice", () => {
.disableCrits() .disableCrits()
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.ICE_SCALES) .enemyAbility(Abilities.ICE_SCALES)
.enemyMoveset(Array(4).fill(Moves.HOWL)) .enemyMoveset([Moves.HOWL])
.startingLevel(10) .startingLevel(10)
.enemyLevel(10) .enemyLevel(10)
.starterSpecies(Species.FEEBAS) .starterSpecies(Species.FEEBAS)

View File

@ -5,7 +5,6 @@ import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -31,7 +30,7 @@ describe("Moves - Baton Pass", () => {
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.BATON_PASS, Moves.NASTY_PLOT, Moves.SPLASH]) .moveset([Moves.BATON_PASS, Moves.NASTY_PLOT, Moves.SPLASH])
.ability(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.disableCrits(); .disableCrits();
}); });
@ -71,7 +70,10 @@ describe("Moves - Baton Pass", () => {
// round 2 - baton pass // round 2 - baton pass
game.scene.getEnemyPokemon()!.hp = 100; game.scene.getEnemyPokemon()!.hp = 100;
game.override.enemyMoveset(new Array(4).fill(Moves.BATON_PASS)); game.override.enemyMoveset([Moves.BATON_PASS]);
// Force moveset to update mid-battle
// TODO: replace with enemy ai control function when it's added
game.scene.getEnemyParty()[0].getMoveset();
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("PostSummonPhase", false); await game.phaseInterceptor.to("PostSummonPhase", false);
@ -90,7 +92,7 @@ describe("Moves - Baton Pass", () => {
}, 20000); }, 20000);
it("doesn't transfer effects that aren't transferrable", async() => { it("doesn't transfer effects that aren't transferrable", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.SALT_CURE)); game.override.enemyMoveset([Moves.SALT_CURE]);
await game.classicMode.startBattle([Species.PIKACHU, Species.FEEBAS]); await game.classicMode.startBattle([Species.PIKACHU, Species.FEEBAS]);
const [player1, player2] = game.scene.getParty(); const [player1, player2] = game.scene.getParty();

View File

@ -34,7 +34,7 @@ describe("Moves - Beak Blast", () => {
.moveset([Moves.BEAK_BLAST]) .moveset([Moves.BEAK_BLAST])
.enemySpecies(Species.SNORLAX) .enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA) .enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.TACKLE)) .enemyMoveset([Moves.TACKLE])
.startingLevel(100) .startingLevel(100)
.enemyLevel(100); .enemyLevel(100);
}); });
@ -80,7 +80,7 @@ describe("Moves - Beak Blast", () => {
it( it(
"should not burn attackers that don't make contact", "should not burn attackers that don't make contact",
async () => { async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WATER_GUN)); game.override.enemyMoveset([Moves.WATER_GUN]);
await game.startBattle([Species.BLASTOISE]); await game.startBattle([Species.BLASTOISE]);
@ -116,7 +116,7 @@ describe("Moves - Beak Blast", () => {
it( it(
"should be blocked by Protect", "should be blocked by Protect",
async () => { async () => {
game.override.enemyMoveset(Array(4).fill(Moves.PROTECT)); game.override.enemyMoveset([Moves.PROTECT]);
await game.startBattle([Species.BLASTOISE]); await game.startBattle([Species.BLASTOISE]);

View File

@ -29,7 +29,7 @@ describe("Moves - Beat Up", () => {
game.override.enemySpecies(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
game.override.enemyLevel(100); game.override.enemyLevel(100);
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH)); game.override.enemyMoveset([Moves.SPLASH]);
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100); game.override.startingLevel(100);

View File

@ -6,7 +6,6 @@ import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { Abilities } from "#app/enums/abilities"; import { Abilities } from "#app/enums/abilities";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -37,7 +36,7 @@ describe("Moves - BELLY DRUM", () => {
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([Moves.BELLY_DRUM]) .moveset([Moves.BELLY_DRUM])
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });

View File

@ -7,7 +7,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -32,7 +31,7 @@ describe("Moves - Burning Jealousy", () => {
.disableCrits() .disableCrits()
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.ICE_SCALES) .enemyAbility(Abilities.ICE_SCALES)
.enemyMoveset(Array(4).fill(Moves.HOWL)) .enemyMoveset([Moves.HOWL])
.startingLevel(10) .startingLevel(10)
.enemyLevel(10) .enemyLevel(10)
.starterSpecies(Species.FEEBAS) .starterSpecies(Species.FEEBAS)
@ -73,7 +72,7 @@ describe("Moves - Burning Jealousy", () => {
game.override game.override
.enemySpecies(Species.DITTO) .enemySpecies(Species.DITTO)
.enemyAbility(Abilities.IMPOSTER) .enemyAbility(Abilities.IMPOSTER)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -91,7 +90,7 @@ describe("Moves - Burning Jealousy", () => {
it("should be boosted by Sheer Force even if opponent didn't raise stat stages", async () => { it("should be boosted by Sheer Force even if opponent didn't raise stat stages", async () => {
game.override game.override
.ability(Abilities.SHEER_FORCE) .ability(Abilities.SHEER_FORCE)
.enemyMoveset(SPLASH_ONLY); .enemyMoveset(Moves.SPLASH);
vi.spyOn(allMoves[Moves.BURNING_JEALOUSY], "calculateBattlePower"); vi.spyOn(allMoves[Moves.BURNING_JEALOUSY], "calculateBattlePower");
await game.classicMode.startBattle(); await game.classicMode.startBattle();

View File

@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
/** HP Cost of Move */ /** HP Cost of Move */
@ -34,7 +33,7 @@ describe("Moves - Clangorous Soul", () => {
game.override.startingLevel(100); game.override.startingLevel(100);
game.override.enemyLevel(100); game.override.enemyLevel(100);
game.override.moveset([Moves.CLANGOROUS_SOUL]); game.override.moveset([Moves.CLANGOROUS_SOUL]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
}); });
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move) //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move)

View File

@ -33,7 +33,7 @@ describe("Moves - Crafty Shield", () => {
game.override.moveset([Moves.CRAFTY_SHIELD, Moves.SPLASH, Moves.SWORDS_DANCE]); game.override.moveset([Moves.CRAFTY_SHIELD, Moves.SPLASH, Moves.SWORDS_DANCE]);
game.override.enemySpecies(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.GROWL)); game.override.enemyMoveset([Moves.GROWL]);
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100); game.override.startingLevel(100);
@ -62,7 +62,7 @@ describe("Moves - Crafty Shield", () => {
test( test(
"should not protect the user and allies from attack moves", "should not protect the user and allies from attack moves",
async () => { async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)); game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -84,7 +84,7 @@ describe("Moves - Crafty Shield", () => {
"should protect the user and allies from moves that ignore other protection", "should protect the user and allies from moves that ignore other protection",
async () => { async () => {
game.override.enemySpecies(Species.DUSCLOPS); game.override.enemySpecies(Species.DUSCLOPS);
game.override.enemyMoveset(Array(4).fill(Moves.CURSE)); game.override.enemyMoveset([Moves.CURSE]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);

View File

@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
describe("Moves - Disable", () => { describe("Moves - Disable", () => {
@ -28,7 +27,7 @@ describe("Moves - Disable", () => {
.ability(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.DISABLE, Moves.SPLASH]) .moveset([Moves.DISABLE, Moves.SPLASH])
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.starterSpecies(Species.PIKACHU) .starterSpecies(Species.PIKACHU)
.enemySpecies(Species.SHUCKLE); .enemySpecies(Species.SHUCKLE);
}); });
@ -79,7 +78,7 @@ describe("Moves - Disable", () => {
}, 20000); }, 20000);
it("cannot disable STRUGGLE", async() => { it("cannot disable STRUGGLE", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.STRUGGLE)); game.override.enemyMoveset([Moves.STRUGGLE]);
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const playerMon = game.scene.getPlayerPokemon()!; const playerMon = game.scene.getPlayerPokemon()!;
@ -114,7 +113,7 @@ describe("Moves - Disable", () => {
}, 20000); }, 20000);
it("disables NATURE POWER, not the move invoked by it", async() => { it("disables NATURE POWER, not the move invoked by it", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.NATURE_POWER)); game.override.enemyMoveset([Moves.NATURE_POWER]);
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const enemyMon = game.scene.getEnemyPokemon()!; const enemyMon = game.scene.getEnemyPokemon()!;

View File

@ -4,7 +4,6 @@ import { Moves } from "#app/enums/moves";
import { Species } from "#app/enums/species"; import { Species } from "#app/enums/species";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -28,7 +27,7 @@ describe("Moves - Dragon Cheer", () => {
game.override game.override
.battleType("double") .battleType("double")
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.enemyLevel(20) .enemyLevel(20)
.moveset([Moves.DRAGON_CHEER, Moves.TACKLE, Moves.SPLASH]); .moveset([Moves.DRAGON_CHEER, Moves.TACKLE, Moves.SPLASH]);
}); });

View File

@ -8,7 +8,6 @@ import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -42,7 +41,7 @@ describe("Moves - Dragon Rage", () => {
game.override.startingLevel(100); game.override.startingLevel(100);
game.override.enemySpecies(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyPassiveAbility(Abilities.BALL_FETCH); game.override.enemyPassiveAbility(Abilities.BALL_FETCH);
game.override.enemyLevel(100); game.override.enemyLevel(100);

View File

@ -9,7 +9,6 @@ import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager"; import GameManager from "../utils/gameManager";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000; const TIMEOUT = 20 * 1000;
@ -32,7 +31,7 @@ describe("Moves - Dragon Tail", () => {
game.override.battleType("single") game.override.battleType("single")
.moveset([Moves.DRAGON_TAIL, Moves.SPLASH]) .moveset([Moves.DRAGON_TAIL, Moves.SPLASH])
.enemySpecies(Species.WAILORD) .enemySpecies(Species.WAILORD)
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.startingLevel(5) .startingLevel(5)
.enemyLevel(5); .enemyLevel(5);
@ -82,7 +81,7 @@ describe("Moves - Dragon Tail", () => {
test( test(
"Double battles should proceed without crashing", "Double battles should proceed without crashing",
async () => { async () => {
game.override.battleType("double").enemyMoveset(SPLASH_ONLY); game.override.battleType("double").enemyMoveset(Moves.SPLASH);
game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER]) game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER])
.enemyAbility(Abilities.ROUGH_SKIN); .enemyAbility(Abilities.ROUGH_SKIN);
await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]); await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]);
@ -116,7 +115,7 @@ describe("Moves - Dragon Tail", () => {
test( test(
"Flee move redirection works", "Flee move redirection works",
async () => { async () => {
game.override.battleType("double").enemyMoveset(SPLASH_ONLY); game.override.battleType("double").enemyMoveset(Moves.SPLASH);
game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER]); game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER]);
game.override.enemyAbility(Abilities.ROUGH_SKIN); game.override.enemyAbility(Abilities.ROUGH_SKIN);
await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]); await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]);

View File

@ -3,7 +3,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Moves - Fake Out", () => { describe("Moves - Fake Out", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -26,7 +25,7 @@ describe("Moves - Fake Out", () => {
.enemySpecies(Species.CORVIKNIGHT) .enemySpecies(Species.CORVIKNIGHT)
.starterSpecies(Species.FEEBAS) .starterSpecies(Species.FEEBAS)
.moveset([Moves.FAKE_OUT, Moves.SPLASH]) .moveset([Moves.FAKE_OUT, Moves.SPLASH])
.enemyMoveset(SPLASH_ONLY) .enemyMoveset(Moves.SPLASH)
.disableCrits(); .disableCrits();
}); });

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