Compare commits

..

No commits in common. "2523feff1fb1d059d857125fe2c5ea35717f673b" and "3012b4fc1fc6ebb40b729c9e7da2545ea6a4b469" have entirely different histories.

165 changed files with 1789 additions and 2187 deletions

View File

@ -20,15 +20,12 @@ 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 a type ("move", "ability", or "item") and a file name.'); console.error('Please provide both a type ("move", "ability", or "item") and a file name.');
process.exit(1); process.exit(1);
} }
// Convert fileName from kebab-case or camelCase to snake_case // Convert fileName from to snake_case if camelCase is given
fileName = fileName fileName = fileName.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
.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
@ -67,11 +64,10 @@ 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, expect } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, it } from "vitest";
describe("${description}", () => { describe("${description}", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -91,15 +87,14 @@ 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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
it("test case", async () => { it("test case", async () => {
// await game.classicMode.startBattle([Species.MAGIKARP]); // await game.classicMode.startBattle();
// game.move.select(Moves.SPLASH); // game.move.select();
}, TIMEOUT); }, TIMEOUT);
}); });
`; `;

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

View File

@ -3957,7 +3957,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;
} }
} }
@ -4008,7 +4008,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;
@ -4056,8 +4056,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 !== undefined && attacker !== undefined && move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) { //If the mon didn't die to indirect damage if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) {
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)) {
@ -4086,8 +4086,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 (move !== undefined && attacker !== undefined && !simulated) { //If the mon didn't die to indirect damage if (!simulated) {
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;
@ -4745,7 +4745,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

@ -162,49 +162,6 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag {
} }
} }
/**
* 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.
@ -2276,8 +2233,6 @@ 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.GORILLA_TACTICS: case BattlerTagType.GORILLA_TACTICS:
return new GorillaTacticsTag(); return new GorillaTacticsTag();
case BattlerTagType.NONE: case BattlerTagType.NONE:

View File

@ -5987,8 +5987,9 @@ export class SwapStatAttr extends MoveEffectAttr {
} }
/** /**
* Swaps the user's and target's corresponding current * Takes the average of the user's and target's corresponding current
* {@linkcode EffectiveStat | stat} values * {@linkcode stat} values and sets that stat to the average for both
* 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
@ -6012,62 +6013,6 @@ 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
@ -8459,7 +8404,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)
.attr(AddBattlerTagAttr, BattlerTagType.THROAT_CHOPPED), .partial(),
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)
@ -8949,8 +8894,7 @@ 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)
.target(MoveTarget.USER) .unimplemented(),
.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

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

View File

@ -984,16 +984,10 @@ 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
let overrideArray: Moves | Array<Moves> = this.isPlayer() ? Overrides.MOVESET_OVERRIDE : Overrides.OPP_MOVESET_OVERRIDE; const overrideArray: 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

@ -45,9 +45,7 @@
"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!",
"canOnlyUseMove": "{{pokemonName}} can only use {{moveName}}!", "canOnlyUseMove": "{{pokemonName}} can only use {{moveName}}!",
"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,7 +7,6 @@
"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": "{{pokemonNameWithAffix}}は\n{{abilityName}}で ダメージを 受けない!", "iceFaceAvoidedDamage": "{{pokemonName}}は\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": "{{pokemonNameWithAffix}}は\n{{moveName}}を 受けて じゅうでんした!", "windPowerCharged": "{{pokemonName}}は\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,6 +39,5 @@
"matBlock": "たたみがえし", "matBlock": "たたみがえし",
"craftyShield": "トリックガード", "craftyShield": "トリックガード",
"tailwind": "おいかぜ", "tailwind": "おいかぜ",
"happyHour": "ハッピータイム", "happyHour": "ハッピータイム"
"safeguard": "しんぴなまもり"
} }

View File

@ -47,11 +47,5 @@
"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}}で\n{{escapeVerb}}!", "noEscapePokemon": "{{pokemonName}}の {{moveName}}で {{escapeVerb}}!",
"runAwaySuccess": " うまく 逃げ切れた!", "runAwaySuccess": " うまく 逃げ切れた!",
"runAwayCannotEscape": "逃げることが できない!", "runAwayCannotEscape": "逃げることが できない!",
"escapeVerbSwitch": "入れ替えることが できない", "escapeVerbSwitch": "入れ替えることが できない",
@ -62,7 +62,6 @@
"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": "持たせると 状態異常や 混乱に なるとき 回復する" "effect": "持たせると 状態異常や 混乱になるとき 回復する\n"
}, },
"ENIGMA": { "ENIGMA": {
"name": "ナゾのみ", "name": "ナゾのみ",
"effect": "持たせると 効果バツグンの 技を 受けたとき HPを 25%回復する" "effect": "持たせると 効果バツグンの 技を 受けたとき HPを 回復する"
}, },
"LIECHI": { "LIECHI": {
"name": "チイラのみ", "name": "チイラのみ",
"effect": "持たせると HPが 25%以下に なるとき 攻撃が あがる" "effect": "持たせると HPが 25%以下に なるとき 攻撃が あがる"
}, },
"GANLON": { "GANLON": {
"name": "リュガのみ", "name": "リュガのみ",
"effect": "持たせると HPが 25%以下に なるとき 防御が あがる" "effect": "持たせると HPが 25%以下に なるとき 防御が あがる\n"
}, },
"PETAYA": { "PETAYA": {
"name": "ヤタピのみ", "name": "ヤタピのみ",
"effect": "持たせると HPが 25%以下に なるとき 特攻が あがる" "effect": "持たせると HPが 25%以下に なるとき 特攻が あがる\n"
}, },
"APICOT": { "APICOT": {
"name": "ズアのみ", "name": "ズアのみ",
"effect": "持たせると HPが 25%以下に なるとき 特防が あがる" "effect": "持たせると HPが 25%以下に なるとき 特防が あがる\n"
}, },
"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": "登録では 13歳以上 であることを 確認します。", "registrationAgeWarning": "登録では 歳以上 であることを 確認します。",
"backToLogin": "ログインへ", "backToLogin": "ログインへ",
"failedToLoadSaveData": "セーブデータの 読み込みは 不可能でした。ページを 再読み込み してください。\n長い間に続く 場合は 管理者に 連絡してください。", "failedToLoadSaveData": "セーブデータの 読み込みは 不可能でした。ページを 再読み込み してください。\n長い間に続く 場合は 管理者に 連絡してください。",
"sessionSuccess": "セッションが 正常に 読み込まれました。", "sessionSuccess": "セッションが 正常に 読み込まれました。",
@ -46,10 +46,10 @@
"yes": "はい", "yes": "はい",
"no": "いいえ", "no": "いいえ",
"disclaimer": "免責", "disclaimer": "免責",
"disclaimerDescription": "このゲームは 未完成作品です。\nセーブデータの 損失を含める ゲーム性に関する 問題が 起きる可能性が あります。\nなお、ゲームは 予告なく変更される 可能性もあり、\nさらに更新され、完成されるとも 限りません。", "disclaimerDescription": "このゲームは 未完成作品です。\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,44 +4,5 @@
"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ぜひ 確認してみてください!", "menu": "このメニューから設定にアクセスできます。\n$設定ではゲームスピード、ウィンドウスタイル、\nおよびその他のオプションを変更できます。\n$ここにはさまざまな他の機能もありますので、\nぜひ確認してみてください!",
"starterSelect": "この画面で Zキー空白キーを押して ポケモンが 選択できます。\n選んだポケモンは 最初の手持ちに なります。\n$各ポケモンは ポイントが ある。最大6つを 選べますが\nポケモンのポイントが 合計10を超えては いけません。\n$ポケモンを 捕まえたり タマゴからふかしたり することで\n選択できる 性別、特性、フォルムなどの 幅を広げられます。\n$個体値も 徐々に 累積して 高くなるので、\n同じポケモンを たくさん 捕まえて みてください!", "starterSelect": "この画面でZキーやSpaceを押してポケモンを選択できます。\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,7 +12,6 @@
"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,7 +44,6 @@
"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!",
@ -62,7 +61,6 @@
"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",
@ -91,7 +89,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}} se transformou\nno tipo {{type}}!", "transformedIntoType": "{{pokemonName}} transformed\ninto the {{type}} 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,7 +67,5 @@
"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,7 +1,6 @@
{ {
"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: Moves | Array<Moves> = []; readonly MOVESET_OVERRIDE: 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: Moves | Array<Moves> = []; readonly OPP_MOVESET_OVERRIDE: 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,8 +65,6 @@ 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

@ -1,6 +1,6 @@
import BattleScene from "#app/battle-scene"; import BattleScene from "#app/battle-scene";
import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims";
import Move, { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/move";
import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms"; import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms";
import { Moves } from "#app/enums/moves"; import { Moves } from "#app/enums/moves";
import { getPokemonNameWithAffix } from "#app/messages"; import { getPokemonNameWithAffix } from "#app/messages";
@ -9,15 +9,14 @@ import { SummaryUiMode } from "#app/ui/summary-ui-handler";
import { Mode } from "#app/ui/ui"; import { Mode } from "#app/ui/ui";
import i18next from "i18next"; import i18next from "i18next";
import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase"; import { PlayerPartyMemberPokemonPhase } from "./player-party-member-pokemon-phase";
import Pokemon from "#app/field/pokemon";
export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
private moveId: Moves; private moveId: Moves;
private messageMode: Mode;
private fromTM: boolean; private fromTM: boolean;
constructor(scene: BattleScene, partyMemberIndex: integer, moveId: Moves, fromTM?: boolean) { constructor(scene: BattleScene, partyMemberIndex: integer, moveId: Moves, fromTM?: boolean) {
super(scene, partyMemberIndex); super(scene, partyMemberIndex);
this.moveId = moveId; this.moveId = moveId;
this.fromTM = fromTM ?? false; this.fromTM = fromTM ?? false;
} }
@ -27,128 +26,87 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
const pokemon = this.getPokemon(); const pokemon = this.getPokemon();
const move = allMoves[this.moveId]; const move = allMoves[this.moveId];
const currentMoveset = pokemon.getMoveset();
// The game first checks if the Pokemon already has the move and ends the phase if it does. const existingMoveIndex = pokemon.getMoveset().findIndex(m => m?.moveId === move.id);
const hasMoveAlready = currentMoveset.some(m => m?.moveId === move.id) && this.moveId !== Moves.SKETCH;
if (hasMoveAlready) { if (existingMoveIndex > -1) {
return this.end(); return this.end();
} }
this.messageMode = this.scene.ui.getHandler() instanceof EvolutionSceneHandler ? Mode.EVOLUTION_SCENE : Mode.MESSAGE; const emptyMoveIndex = pokemon.getMoveset().length < 4
this.scene.ui.setMode(this.messageMode); ? pokemon.getMoveset().length
// If the Pokemon has less than 4 moves, the new move is added to the largest empty moveset index : pokemon.getMoveset().findIndex(m => m === null);
// If it has 4 moves, the phase then checks if the player wants to replace the move itself.
if (currentMoveset.length < 4) {
this.learnMove(currentMoveset.length, move, pokemon);
} else {
this.replaceMoveCheck(move, pokemon);
}
}
/** const messageMode = this.scene.ui.getHandler() instanceof EvolutionSceneHandler
* This displays a chain of messages (listed below) and asks if the user wishes to forget a move. ? Mode.EVOLUTION_SCENE
* : Mode.MESSAGE;
* > [Pokemon] wants to learn the move [MoveName]
* > However, [Pokemon] already knows four moves.
* > Should a move be forgotten and replaced with [MoveName]? --> `Mode.CONFIRM` -> Yes: Go to `this.forgetMoveProcess()`, No: Go to `this.rejectMoveAndEnd()`
* @param move The Move to be learned
* @param Pokemon The Pokemon learning the move
*/
async replaceMoveCheck(move: Move, pokemon: Pokemon) {
const learnMovePrompt = i18next.t("battle:learnMovePrompt", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name });
const moveLimitReached = i18next.t("battle:learnMoveLimitReached", { pokemonName: getPokemonNameWithAffix(pokemon) });
const shouldReplaceQ = i18next.t("battle:learnMoveReplaceQuestion", { moveName: move.name });
const preQText = [learnMovePrompt, moveLimitReached].join("$");
await this.scene.ui.showTextPromise(preQText);
await this.scene.ui.showTextPromise(shouldReplaceQ, undefined, false);
await this.scene.ui.setModeWithoutClear(Mode.CONFIRM,
() => this.forgetMoveProcess(move, pokemon), // Yes
() => { // No
this.scene.ui.setMode(this.messageMode);
this.rejectMoveAndEnd(move, pokemon);
}
);
}
/** if (emptyMoveIndex > -1) {
* This facilitates the process in which an old move is chosen to be forgotten. pokemon.setMove(emptyMoveIndex, this.moveId);
*
* > Which move should be forgotten?
*
* The game then goes `Mode.SUMMARY` to select a move to be forgotten.
* If a player does not select a move or chooses the new move (`moveIndex === 4`), the game goes to `this.rejectMoveAndEnd()`.
* If an old move is selected, the function then passes the `moveIndex` to `this.learnMove()`
* @param move The Move to be learned
* @param Pokemon The Pokemon learning the move
*/
async forgetMoveProcess(move: Move, pokemon: Pokemon) {
this.scene.ui.setMode(this.messageMode);
await this.scene.ui.showTextPromise(i18next.t("battle:learnMoveForgetQuestion"), undefined, true);
await this.scene.ui.setModeWithoutClear(Mode.SUMMARY, pokemon, SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => {
if (moveIndex === 4) {
this.scene.ui.setMode(this.messageMode).then(() => this.rejectMoveAndEnd(move, pokemon));
return;
}
const forgetSuccessText = i18next.t("battle:learnMoveForgetSuccess", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: pokemon.moveset[moveIndex]!.getName() });
const fullText = [i18next.t("battle:countdownPoof"), forgetSuccessText, i18next.t("battle:learnMoveAnd")].join("$");
this.scene.ui.setMode(this.messageMode).then(() => this.learnMove(moveIndex, move, pokemon, fullText));
});
}
/**
* This asks the player if they wish to end the current move learning process.
*
* > Stop trying to teach [MoveName]? --> `Mode.CONFIRM` --> Yes: > [Pokemon] did not learn the move [MoveName], No: `this.replaceMoveCheck()`
*
* If the player wishes to not teach the Pokemon the move, it displays a message and ends the phase.
* If the player reconsiders, it repeats the process for a Pokemon with a full moveset once again.
* @param move The Move to be learned
* @param Pokemon The Pokemon learning the move
*/
async rejectMoveAndEnd(move: Move, pokemon: Pokemon) {
await this.scene.ui.showTextPromise(i18next.t("battle:learnMoveStopTeaching", { moveName: move.name }), undefined, false);
this.scene.ui.setModeWithoutClear(Mode.CONFIRM,
() => {
this.scene.ui.setMode(this.messageMode);
this.scene.ui.showTextPromise(i18next.t("battle:learnMoveNotLearned", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), undefined, true).then(() => this.end());
},
() => {
this.scene.ui.setMode(this.messageMode);
this.replaceMoveCheck(move, pokemon);
}
);
}
/**
* This teaches the Pokemon the new move and ends the phase.
* When a Pokemon forgets a move and learns a new one, its 'Learn Move' message is significantly longer.
*
* Pokemon with a `moveset.length < 4`
* > [Pokemon] learned [MoveName]
*
* Pokemon with a `moveset.length > 4`
* > 1... 2... and 3... and Poof!
* > [Pokemon] forgot how to use [MoveName]
* > And...
* > [Pokemon] learned [MoveName]!
* @param move The Move to be learned
* @param Pokemon The Pokemon learning the move
*/
async learnMove(index: number, move: Move, pokemon: Pokemon, textMessage?: string) {
if (this.fromTM) { if (this.fromTM) {
pokemon.usedTMs.push(this.moveId); pokemon.usedTMs.push(this.moveId);
} }
pokemon.setMove(index, this.moveId);
initMoveAnim(this.scene, this.moveId).then(() => { initMoveAnim(this.scene, this.moveId).then(() => {
loadMoveAnimAssets(this.scene, [this.moveId], true); loadMoveAnimAssets(this.scene, [this.moveId], true)
this.scene.playSound("level_up_fanfare"); // Sound loaded into game as is .then(() => {
}); this.scene.ui.setMode(messageMode).then(() => {
this.scene.ui.setMode(this.messageMode); // Sound loaded into game as is
const learnMoveText = i18next.t("battle:learnMove", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }); this.scene.playSound("level_up_fanfare");
textMessage = textMessage ? textMessage+"$"+learnMoveText : learnMoveText; this.scene.ui.showText(i18next.t("battle:learnMove", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), null, () => {
await this.scene.ui.showTextPromise(textMessage, this.messageMode === Mode.EVOLUTION_SCENE ? 1000 : undefined, true);
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeMoveLearnedTrigger, true); this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeMoveLearnedTrigger, true);
this.end(); this.end();
}, messageMode === Mode.EVOLUTION_SCENE ? 1000 : null, true);
});
});
});
} else {
this.scene.ui.setMode(messageMode).then(() => {
this.scene.ui.showText(i18next.t("battle:learnMovePrompt", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), null, () => {
this.scene.ui.showText(i18next.t("battle:learnMoveLimitReached", { pokemonName: getPokemonNameWithAffix(pokemon) }), null, () => {
this.scene.ui.showText(i18next.t("battle:learnMoveReplaceQuestion", { moveName: move.name }), null, () => {
const noHandler = () => {
this.scene.ui.setMode(messageMode).then(() => {
this.scene.ui.showText(i18next.t("battle:learnMoveStopTeaching", { moveName: move.name }), null, () => {
this.scene.ui.setModeWithoutClear(Mode.CONFIRM, () => {
this.scene.ui.setMode(messageMode);
this.scene.ui.showText(i18next.t("battle:learnMoveNotLearned", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: move.name }), null, () => this.end(), null, true);
}, () => {
this.scene.ui.setMode(messageMode);
this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, this.moveId));
this.end();
});
});
});
};
this.scene.ui.setModeWithoutClear(Mode.CONFIRM, () => {
this.scene.ui.setMode(messageMode);
this.scene.ui.showText(i18next.t("battle:learnMoveForgetQuestion"), null, () => {
this.scene.ui.setModeWithoutClear(Mode.SUMMARY, this.getPokemon(), SummaryUiMode.LEARN_MOVE, move, (moveIndex: integer) => {
if (moveIndex === 4) {
noHandler();
return;
}
this.scene.ui.setMode(messageMode).then(() => {
this.scene.ui.showText(i18next.t("battle:countdownPoof"), null, () => {
this.scene.ui.showText(i18next.t("battle:learnMoveForgetSuccess", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: pokemon.moveset[moveIndex]!.getName() }), null, () => { // TODO: is the bang correct?
this.scene.ui.showText(i18next.t("battle:learnMoveAnd"), null, () => {
if (this.fromTM) {
pokemon.usedTMs.push(this.moveId);
}
pokemon.setMove(moveIndex, Moves.NONE);
this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, this.moveId));
this.end();
}, null, true);
}, null, true);
}, null, true);
});
});
}, null, true);
}, noHandler);
});
}, null, true);
}, null, true);
});
}
} }
} }

View File

@ -3,6 +3,7 @@ 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";
@ -26,7 +27,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
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,6 +5,7 @@ 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";
@ -30,7 +31,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
}); });
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,6 +4,7 @@ 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";
@ -30,7 +31,7 @@ describe("Abilities - Beast Boost", () => {
.ability(Abilities.BEAST_BOOST) .ability(Abilities.BEAST_BOOST)
.startingLevel(2000) .startingLevel(2000)
.moveset([ Moves.FLAMETHROWER ]) .moveset([ Moves.FLAMETHROWER ])
.enemyMoveset(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
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() => {
@ -50,7 +51,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([Moves.GUARD_SPLIT]); game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT));
await game.classicMode.startBattle([Species.SLOWBRO]); await game.classicMode.startBattle([Species.SLOWBRO]);

View File

@ -1,10 +1,10 @@
import { Moves } from "#app/enums/moves";
import { Abilities } from "#enums/abilities";
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 { Abilities } from "#enums/abilities";
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("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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
it("should invert stat changes when applied", async() => { it("should invert stat changes when applied", async() => {

View File

@ -5,6 +5,7 @@ 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";
@ -29,7 +30,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
}); });

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([Moves.VICTORY_DANCE]); .enemyMoveset(Array(4).fill(Moves.VICTORY_DANCE));
}); });
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Dancer_(Ability) // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Dancer_(Ability)

View File

@ -6,6 +6,7 @@ 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;
@ -30,7 +31,7 @@ describe("Abilities - Disguise", () => {
game.override game.override
.battleType("single") .battleType("single")
.enemySpecies(Species.MIMIKYU) .enemySpecies(Species.MIMIKYU)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.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);
@ -107,7 +108,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([Moves.SHADOW_SNEAK]); game.override.enemyMoveset(Array(4).fill(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 ]);
@ -193,7 +194,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([Moves.ENDURE]); game.override.enemyMoveset(Array(4).fill(Moves.ENDURE));
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const mimikyu = game.scene.getEnemyPokemon()!; const mimikyu = game.scene.getEnemyPokemon()!;

View File

@ -1,7 +1,9 @@
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";
@ -21,56 +23,63 @@ describe("Abilities - Dry Skin", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override.battleType("single");
.battleType("single") game.override.disableCrits();
.disableCrits() game.override.enemyAbility(Abilities.DRY_SKIN);
.enemyAbility(Abilities.DRY_SKIN) game.override.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH) game.override.enemySpecies(Species.CHARMANDER);
.enemySpecies(Species.CHARMANDER) game.override.ability(Abilities.UNNERVE);
.ability(Abilities.BALL_FETCH) game.override.starterSpecies(Species.CHANDELURE);
.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 () => {
await game.classicMode.startBattle(); game.override.moveset([Moves.SUNNY_DAY, Moves.SPLASH]);
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(enemy.getMaxHp()); expect(enemy.hp).toBeLessThan(previousEnemyHp);
// second turn // second turn
enemy.hp = enemy.getMaxHp(); previousEnemyHp = enemy.hp;
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to(TurnEndPhase);
expect(enemy.hp).toBeLessThan(enemy.getMaxHp()); expect(enemy.hp).toBeLessThan(previousEnemyHp);
}); });
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 () => {
await game.classicMode.startBattle(); game.override.moveset([Moves.RAIN_DANCE, Moves.SPLASH]);
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(1); expect(enemy.hp).toBeGreaterThan(previousEnemyHp);
// second turn // second turn
enemy.hp = 1; previousEnemyHp = enemy.hp;
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to(TurnEndPhase);
expect(enemy.hp).toBeGreaterThan(1); expect(enemy.hp).toBeGreaterThan(previousEnemyHp);
}); });
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;
@ -78,65 +87,72 @@ 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 () => {
await game.classicMode.startBattle(); game.override.moveset([Moves.WATER_GUN]);
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.enemyMoveset([Moves.PROTECT]); 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.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.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
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,6 +7,7 @@ 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";
@ -37,7 +38,7 @@ describe("Abilities - Flash Fire", () => {
it("immune to Fire-type moves", async () => { it("immune to Fire-type moves", async () => {
game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH); game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;
@ -48,7 +49,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([Moves.EMBER]).moveset([Moves.PROTECT]); game.override.enemyMoveset(Array(4).fill(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()!;
@ -59,7 +60,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("activated by Will-O-Wisp", async () => { it("activated by Will-O-Wisp", async () => {
game.override.enemyMoveset([Moves.WILL_O_WISP]).moveset(Moves.SPLASH); game.override.enemyMoveset(Array(4).fill(Moves.WILL_O_WISP)).moveset(SPLASH_ONLY);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;
@ -74,7 +75,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("activated after being frozen", async () => { it("activated after being frozen", async () => {
game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH); game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY);
game.override.statusEffect(StatusEffect.FREEZE); game.override.statusEffect(StatusEffect.FREEZE);
await game.startBattle([Species.BLISSEY]); await game.startBattle([Species.BLISSEY]);
@ -87,7 +88,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000); }, 20000);
it("not passing with baton pass", async () => { it("not passing with baton pass", async () => {
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.BATON_PASS]); game.override.enemyMoveset(Array(4).fill(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
@ -103,7 +104,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([Moves.FIRE_PLEDGE]).moveset([Moves.EMBER, Moves.SPLASH]); game.override.enemyMoveset(Array(4).fill(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,6 +5,7 @@ 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";
@ -43,7 +44,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });
@ -91,7 +92,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([Moves.SKILL_SWAP]).weather(WeatherType.HARSH_SUN); game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP)).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM]); await game.classicMode.startBattle([Species.CHERRIM]);
@ -110,7 +111,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([Moves.GASTRO_ACID]).weather(WeatherType.HARSH_SUN); game.override.enemyMoveset(Array(4).fill(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,6 +10,7 @@ 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";
@ -66,7 +67,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });
@ -228,7 +229,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([Moves.GASTRO_ACID]).weather(WeatherType.RAIN); game.override.enemyMoveset(Array(4).fill(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()!;
@ -259,7 +260,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([Moves.STEALTH_ROCK]); game.override.weather(WeatherType.RAIN).enemyMoveset(Array(4).fill(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,6 +6,7 @@ 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";
@ -35,7 +36,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyLevel(100); .enemyLevel(100);
}); });

View File

@ -4,6 +4,7 @@ import { Species } from "#app/enums/species";
import { Stat } from "#app/enums/stat"; import { Stat } from "#app/enums/stat";
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 } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -27,7 +28,7 @@ describe("Abilities - Gorilla Tactics", () => {
game.override game.override
.battleType("single") .battleType("single")
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset([Moves.SPLASH, Moves.DISABLE]) .enemyMoveset(SPLASH_ONLY)
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyLevel(30) .enemyLevel(30)
.moveset([Moves.SPLASH, Moves.TACKLE]) .moveset([Moves.SPLASH, Moves.TACKLE])
@ -41,7 +42,6 @@ describe("Abilities - Gorilla Tactics", () => {
const initialAtkStat = darmanitan.getStat(Stat.ATK); const initialAtkStat = darmanitan.getStat(Stat.ATK);
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to("TurnEndPhase");
@ -63,10 +63,9 @@ describe("Abilities - Gorilla Tactics", () => {
// Turn where Tackle is interrupted by Disable // Turn where Tackle is interrupted by Disable
await game.toNextTurn(); await game.toNextTurn();
game.override.enemyMoveset(Array(4).fill(Moves.DISABLE));
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.DISABLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to("TurnEndPhase");

View File

@ -11,6 +11,7 @@ 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", () => {
@ -48,7 +49,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyLevel(5); .enemyLevel(5);
}); });
@ -107,7 +108,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([Moves.TACKLE]); game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -120,7 +121,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([Moves.TAIL_WHIP]); game.override.enemyMoveset(Array(4).fill(Moves.TAIL_WHIP));
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -139,7 +140,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([Moves.TACKLE]); game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -163,7 +164,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([Moves.TACKLE]); game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -187,7 +188,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([Moves.SURF]); game.override.enemyMoveset(Array(4).fill(Moves.SURF));
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -200,7 +201,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([Moves.TACKLE]).enemyAbility(Abilities.MAGIC_GUARD); game.override.enemyMoveset(Array(4).fill(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()!;
@ -224,7 +225,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("cannot be suppressed", async () => { it("cannot be suppressed", async () => {
game.override.enemyMoveset([Moves.GASTRO_ACID]); game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID));
await game.startBattle([Species.CRAMORANT]); await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!; const cramorant = game.scene.getPlayerPokemon()!;
@ -244,7 +245,7 @@ describe("Abilities - Gulp Missile", () => {
}); });
it("cannot be swapped with another ability", async () => { it("cannot be swapped with another ability", async () => {
game.override.enemyMoveset([Moves.SKILL_SWAP]); game.override.enemyMoveset(Array(4).fill(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,6 +5,7 @@ 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";
@ -29,7 +30,7 @@ describe("Abilities - Heatproof", () => {
.disableCrits() .disableCrits()
.enemySpecies(Species.CHARMANDER) .enemySpecies(Species.CHARMANDER)
.enemyAbility(Abilities.HEATPROOF) .enemyAbility(Abilities.HEATPROOF)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyLevel(100) .enemyLevel(100)
.starterSpecies(Species.CHANDELURE) .starterSpecies(Species.CHANDELURE)
.ability(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH)

View File

@ -4,6 +4,7 @@ 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";
@ -28,7 +29,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemySpecies(Species.SHUCKLE) .enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });

View File

@ -3,6 +3,7 @@ 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 +29,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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability) // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability)

View File

@ -6,6 +6,7 @@ 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", () => {
@ -30,9 +31,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.ability(Abilities.IMPOSTER) .ability(Abilities.IMPOSTER)
.moveset(Moves.SPLASH); .moveset(SPLASH_ONLY);
}); });
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 () => {
@ -76,7 +77,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([Moves.POWER_SPLIT]); game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT));
await game.startBattle([ await game.startBattle([
Species.DITTO Species.DITTO

View File

@ -7,6 +7,7 @@ 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;
@ -30,7 +31,7 @@ describe("Abilities - Intimidate", () => {
.enemyPassiveAbility(Abilities.HYDRATION) .enemyPassiveAbility(Abilities.HYDRATION)
.ability(Abilities.INTIMIDATE) .ability(Abilities.INTIMIDATE)
.startingWave(3) .startingWave(3)
.enemyMoveset(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
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 () => {
@ -107,7 +108,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([Moves.VOLT_SWITCH]) .enemyMoveset(new Array(4).fill(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,6 +9,7 @@ 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";
@ -182,7 +183,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);

View File

@ -8,6 +8,7 @@ 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";
@ -38,7 +39,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyLevel(100); game.override.enemyLevel(100);
}); });

View File

@ -3,6 +3,7 @@ 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";
@ -28,8 +29,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.moveset(Moves.SPLASH); .moveset(SPLASH_ONLY);
}); });
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,6 +5,7 @@ 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";
@ -33,7 +34,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
}); });
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,6 +7,7 @@ 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";
@ -33,7 +34,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
game.override.startingLevel(100); game.override.startingLevel(100);
game.override.enemyLevel(100); game.override.enemyLevel(100);
}); });
@ -174,7 +175,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([Moves.TACKLE]); game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
await game.classicMode.startBattle([Species.SHUCKLE]); await game.classicMode.startBattle([Species.SHUCKLE]);
@ -464,7 +465,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([Moves.KINGS_SHIELD]); game.override.enemyMoveset(Array(4).fill(Moves.KINGS_SHIELD));
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([Species.MAGIKARP]);

View File

@ -8,6 +8,7 @@ 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;
@ -30,7 +31,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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
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,6 +5,7 @@ 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";
@ -28,7 +29,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
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,6 +9,7 @@ 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";
@ -182,7 +183,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
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([Moves.TACKLE]); game.override.enemyMoveset(Array(4).fill(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([Moves.EXTREME_SPEED]); game.override.enemyMoveset(Array(4).fill(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([Moves.TACKLE]); game.override.enemyMoveset(Array(4).fill(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([Moves.GROWL]); game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
await game.startBattle(); await game.startBattle();
game.move.select(Moves.COIL); game.move.select(Moves.COIL);

View File

@ -9,6 +9,7 @@ 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", () => {
@ -36,7 +37,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemySpecies(Species.DUSKULL); game.override.enemySpecies(Species.DUSKULL);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -58,7 +59,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -79,7 +80,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -99,7 +100,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility); game.override.enemyAbility(enemyAbility);
@ -122,7 +123,7 @@ describe("Abilities - Sap Sipper", () => {
game.override.moveset([ moveToUse ]); game.override.moveset([ moveToUse ]);
game.override.ability(ability); game.override.ability(ability);
game.override.enemyMoveset(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
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 { Moves } from "#app/enums/moves";
import { Abilities } from "#enums/abilities";
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 { Abilities } from "#enums/abilities";
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("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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
it("should double stat changes when applied", async() => { it("should double stat changes when applied", async() => {

View File

@ -4,6 +4,7 @@ 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";
@ -30,7 +31,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(allMoves[moveToCheck], "calculateBattlePower"); vi.spyOn(allMoves[moveToCheck], "calculateBattlePower");
}); });

View File

@ -6,6 +6,7 @@ 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";
@ -44,7 +45,7 @@ describe("Abilities - Sweet Veil", () => {
}); });
it("causes Rest to fail when used by the user or its allies", async () => { it("causes Rest to fail when used by the user or its allies", async () => {
game.override.enemyMoveset(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
@ -71,7 +72,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
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([Moves.MACH_PUNCH]) .enemyMoveset(Array(4).fill(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([Moves.SHADOW_SNEAK]); game.override.enemyMoveset(Array(4).fill(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([Moves.QUICK_ATTACK]); game.override.enemyMoveset(Array(4).fill(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([Moves.DRAGON_RAGE]); game.override.enemyMoveset(Array(4).fill(Moves.DRAGON_RAGE));
await game.classicMode.startBattle([Species.CHARIZARD]); await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -4,6 +4,7 @@ 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";
@ -27,7 +28,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
}); });
it("it becomes charged when hit by wind moves", async () => { it("it becomes charged when hit by wind moves", async () => {

View File

@ -3,6 +3,7 @@ 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";
@ -27,7 +28,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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
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,6 +5,7 @@ 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,7 +30,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
}); });
it("lowers accuracy of status moves to 50%", async () => { it("lowers accuracy of status moves to 50%", async () => {

View File

@ -6,6 +6,7 @@ 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;
@ -29,8 +30,8 @@ describe("Abilities - ZERO TO HERO", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleType("single") .battleType("single")
.moveset(Moves.SPLASH) .moveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });

View File

@ -8,6 +8,7 @@ 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;
@ -31,7 +32,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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
// 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([Moves.SPLASH]); game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));
}); });
it("move accuracy is multiplied by 90%", async () => { it("move accuracy is multiplied by 90%", async () => {

View File

@ -4,6 +4,7 @@ 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", () => {
@ -25,8 +26,8 @@ describe("Weather - Hail", () => {
game.override game.override
.weather(WeatherType.HAIL) .weather(WeatherType.HAIL)
.battleType("single") .battleType("single")
.moveset(Moves.SPLASH) .moveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemySpecies(Species.MAGIKARP); .enemySpecies(Species.MAGIKARP);
}); });

View File

@ -4,6 +4,7 @@ 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;
@ -24,8 +25,8 @@ describe("Weather - Sandstorm", () => {
game.override game.override
.weather(WeatherType.SANDSTORM) .weather(WeatherType.SANDSTORM)
.battleType("single") .battleType("single")
.moveset(Moves.SPLASH) .moveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemySpecies(Species.MAGIKARP); .enemySpecies(Species.MAGIKARP);
}); });

View File

@ -1,5 +1,4 @@
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";
@ -34,7 +33,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.classicMode.startBattle([Species.PIKACHU]); await game.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -45,7 +44,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.classicMode.startBattle([Species.PIKACHU]); await game.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -56,7 +55,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.classicMode.startBattle([Species.PIKACHU]); await game.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -67,7 +66,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.classicMode.startBattle([Species.PIKACHU]); await game.startBattle([Species.PIKACHU]);
const pikachu = game.scene.getPlayerPokemon()!; const pikachu = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -76,18 +75,4 @@ 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,6 +25,7 @@ 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;
@ -318,7 +319,7 @@ describe("Test Battle Phase", () => {
.startingWave(1) .startingWave(1)
.startingLevel(100) .startingLevel(100)
.moveset([moveToUse]) .moveset([moveToUse])
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.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,6 +5,7 @@ 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";
@ -30,7 +31,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
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,6 +4,7 @@ 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";
@ -28,7 +29,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(Moves.SPLASH).moveset(Moves.SPLASH); game.override.battleType("double").enemyMoveset(SPLASH_ONLY).moveset(SPLASH_ONLY);
await game.startBattle([ await game.startBattle([
Species.BULBASAUR, Species.BULBASAUR,
Species.CHARIZARD, Species.CHARIZARD,

View File

@ -8,6 +8,7 @@ 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;
@ -37,7 +38,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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
}); });
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,6 +2,7 @@ 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";
@ -32,7 +33,7 @@ describe("Boss Pokemon / Shields", () => {
.disableTrainerWaves() .disableTrainerWaves()
.disableCrits() .disableCrits()
.enemySpecies(Species.RATTATA) .enemySpecies(Species.RATTATA)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.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,6 +6,7 @@ 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;
@ -98,7 +99,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.startingWave(21) .startingWave(21)
.startingLevel(16) .startingLevel(16)
.enemyLevel(50); .enemyLevel(50);
@ -125,7 +126,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.startingWave(21) .startingWave(21)
.startingLevel(13) .startingLevel(13)
.enemyLevel(30); .enemyLevel(30);

View File

@ -7,6 +7,7 @@ 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,
@ -28,7 +29,7 @@ describe("Final Boss", () => {
.startingWave(FinalWave.Classic) .startingWave(FinalWave.Classic)
.startingBiome(Biome.END) .startingBiome(Biome.END)
.disableCrits() .disableCrits()
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.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,6 +4,7 @@ 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";
@ -33,7 +34,7 @@ describe("Items - Dire Hit", () => {
game.override game.override
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.moveset([ Moves.POUND ]) .moveset([ Moves.POUND ])
.startingHeldItems([{ name: "DIRE_HIT" }]) .startingHeldItems([{ name: "DIRE_HIT" }])
.battleType("single") .battleType("single")

View File

@ -4,6 +4,7 @@ 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";
@ -63,7 +64,7 @@ describe("Items - Double Battle Chance Boosters", () => {
game.override game.override
.startingModifier([{ name: "LURE" }]) .startingModifier([{ name: "LURE" }])
.itemRewards([{ name: "LURE" }]) .itemRewards([{ name: "LURE" }])
.moveset(Moves.SPLASH) .moveset(SPLASH_ONLY)
.startingLevel(200); .startingLevel(200);
await game.classicMode.startBattle([ await game.classicMode.startBattle([

View File

@ -8,6 +8,7 @@ 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
@ -37,7 +38,7 @@ describe("Items - Grip Claw", () => {
]) ])
.enemySpecies(Species.SNORLAX) .enemySpecies(Species.SNORLAX)
.ability(Abilities.KLUTZ) .ability(Abilities.KLUTZ)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.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,6 +4,7 @@ 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;
@ -24,7 +25,7 @@ describe("Items - Scope Lens", () => {
game.override game.override
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.moveset([ Moves.POUND ]) .moveset([ Moves.POUND ])
.startingHeldItems([{ name: "SCOPE_LENS" }]) .startingHeldItems([{ name: "SCOPE_LENS" }])
.battleType("single") .battleType("single")

View File

@ -5,6 +5,7 @@ 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";
@ -33,7 +34,7 @@ describe("Items - Temporary Stat Stage Boosters", () => {
game.override game.override
.battleType("single") .battleType("single")
.enemySpecies(Species.SHUCKLE) .enemySpecies(Species.SHUCKLE)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.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([Moves.HOWL]) .enemyMoveset(Array(4).fill(Moves.HOWL))
.startingLevel(10) .startingLevel(10)
.enemyLevel(10) .enemyLevel(10)
.starterSpecies(Species.FEEBAS) .starterSpecies(Species.FEEBAS)

View File

@ -5,6 +5,7 @@ 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";
@ -30,7 +31,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.disableCrits(); .disableCrits();
}); });
@ -70,10 +71,7 @@ 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([Moves.BATON_PASS]); game.override.enemyMoveset(new Array(4).fill(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);
@ -92,7 +90,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([Moves.SALT_CURE]); game.override.enemyMoveset(Array(4).fill(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([Moves.TACKLE]) .enemyMoveset(Array(4).fill(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([Moves.WATER_GUN]); game.override.enemyMoveset(Array(4).fill(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([Moves.PROTECT]); game.override.enemyMoveset(Array(4).fill(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([Moves.SPLASH]); game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100); game.override.startingLevel(100);

View File

@ -6,6 +6,7 @@ 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;
@ -36,7 +37,7 @@ describe("Moves - BELLY DRUM", () => {
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([Moves.BELLY_DRUM]) .moveset([Moves.BELLY_DRUM])
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyAbility(Abilities.BALL_FETCH); .enemyAbility(Abilities.BALL_FETCH);
}); });

View File

@ -7,6 +7,7 @@ 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;
@ -31,7 +32,7 @@ describe("Moves - Burning Jealousy", () => {
.disableCrits() .disableCrits()
.enemySpecies(Species.MAGIKARP) .enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.ICE_SCALES) .enemyAbility(Abilities.ICE_SCALES)
.enemyMoveset([Moves.HOWL]) .enemyMoveset(Array(4).fill(Moves.HOWL))
.startingLevel(10) .startingLevel(10)
.enemyLevel(10) .enemyLevel(10)
.starterSpecies(Species.FEEBAS) .starterSpecies(Species.FEEBAS)
@ -72,7 +73,7 @@ describe("Moves - Burning Jealousy", () => {
game.override game.override
.enemySpecies(Species.DITTO) .enemySpecies(Species.DITTO)
.enemyAbility(Abilities.IMPOSTER) .enemyAbility(Abilities.IMPOSTER)
.enemyMoveset(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -90,7 +91,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(Moves.SPLASH); .enemyMoveset(SPLASH_ONLY);
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,6 +5,7 @@ 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 */
@ -33,7 +34,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
}); });
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move) //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move)

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([Moves.GROWL]); game.override.enemyMoveset(Array(4).fill(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([Moves.TACKLE]); game.override.enemyMoveset(Array(4).fill(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([Moves.CURSE]); game.override.enemyMoveset(Array(4).fill(Moves.CURSE));
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);

View File

@ -4,6 +4,7 @@ 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", () => {
@ -27,7 +28,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(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.starterSpecies(Species.PIKACHU) .starterSpecies(Species.PIKACHU)
.enemySpecies(Species.SHUCKLE); .enemySpecies(Species.SHUCKLE);
}); });
@ -78,7 +79,7 @@ describe("Moves - Disable", () => {
}, 20000); }, 20000);
it("cannot disable STRUGGLE", async() => { it("cannot disable STRUGGLE", async() => {
game.override.enemyMoveset([Moves.STRUGGLE]); game.override.enemyMoveset(Array(4).fill(Moves.STRUGGLE));
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const playerMon = game.scene.getPlayerPokemon()!; const playerMon = game.scene.getPlayerPokemon()!;
@ -113,7 +114,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([Moves.NATURE_POWER]); game.override.enemyMoveset(Array(4).fill(Moves.NATURE_POWER));
await game.classicMode.startBattle(); await game.classicMode.startBattle();
const enemyMon = game.scene.getEnemyPokemon()!; const enemyMon = game.scene.getEnemyPokemon()!;

View File

@ -4,6 +4,7 @@ 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";
@ -27,7 +28,7 @@ describe("Moves - Dragon Cheer", () => {
game.override game.override
.battleType("double") .battleType("double")
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(SPLASH_ONLY)
.enemyLevel(20) .enemyLevel(20)
.moveset([Moves.DRAGON_CHEER, Moves.TACKLE, Moves.SPLASH]); .moveset([Moves.DRAGON_CHEER, Moves.TACKLE, Moves.SPLASH]);
}); });

View File

@ -8,6 +8,7 @@ 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";
@ -41,7 +42,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(Moves.SPLASH); game.override.enemyMoveset(SPLASH_ONLY);
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);

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