mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-24 00:09:31 +02:00
Merge branch 'beta' into fixscaleshottest
This commit is contained in:
commit
c9bb78a18d
@ -41,6 +41,11 @@ export default [
|
|||||||
"keyword-spacing": ["error", { "before": true, "after": true }], // Enforces spacing before and after keywords
|
"keyword-spacing": ["error", { "before": true, "after": true }], // Enforces spacing before and after keywords
|
||||||
"comma-spacing": ["error", { "before": false, "after": true }], // Enforces spacing after comma
|
"comma-spacing": ["error", { "before": false, "after": true }], // Enforces spacing after comma
|
||||||
"import-x/extensions": ["error", "never", { "json": "always" }], // Enforces no extension for imports unless json
|
"import-x/extensions": ["error", "never", { "json": "always" }], // Enforces no extension for imports unless json
|
||||||
|
"array-bracket-spacing": ["error", "always", { "objectsInArrays": false, "arraysInArrays": false }], // Enforces consistent spacing inside array brackets
|
||||||
|
"object-curly-spacing": ["error", "always", { "arraysInObjects": false, "objectsInObjects": false }], // Enforces consistent spacing inside braces of object literals, destructuring assignments, and import/export specifiers
|
||||||
|
"computed-property-spacing": ["error", "never" ], // Enforces consistent spacing inside computed property brackets
|
||||||
|
"space-infix-ops": ["error", { "int32Hint": false }], // Enforces spacing around infix operators
|
||||||
|
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], // Disallows multiple empty lines
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -889,6 +889,9 @@ export default class BattleScene extends SceneBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource);
|
const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource);
|
||||||
|
if (Overrides.OPP_FUSION_OVERRIDE) {
|
||||||
|
pokemon.generateFusionSpecies();
|
||||||
|
}
|
||||||
|
|
||||||
overrideModifiers(this, false);
|
overrideModifiers(this, false);
|
||||||
overrideHeldItems(this, pokemon, false);
|
overrideHeldItems(this, pokemon, false);
|
||||||
|
@ -1033,4 +1033,3 @@ export class WeightRequirement extends EncounterPokemonRequirement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -484,6 +484,8 @@ export abstract class PokemonSpeciesForm {
|
|||||||
frameRate: 12,
|
frameRate: 12,
|
||||||
repeat: -1
|
repeat: -1
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
scene.anims.get(spriteKey).frameRate = 12;
|
||||||
}
|
}
|
||||||
let spritePath = this.getSpriteAtlasPath(female, formIndex, shiny, variant).replace("variant/", "").replace(/_[1-3]$/, "");
|
let spritePath = this.getSpriteAtlasPath(female, formIndex, shiny, variant).replace("variant/", "").replace(/_[1-3]$/, "");
|
||||||
const useExpSprite = scene.experimentalSprites && scene.hasExpSprite(spriteKey);
|
const useExpSprite = scene.experimentalSprites && scene.hasExpSprite(spriteKey);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export enum ArenaTagType {
|
export enum ArenaTagType {
|
||||||
NONE = "NONE",
|
NONE = "NONE",
|
||||||
MUD_SPORT = "MUD_SPORT",
|
MUD_SPORT = "MUD_SPORT",
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export enum BattlerTagType {
|
export enum BattlerTagType {
|
||||||
NONE = "NONE",
|
NONE = "NONE",
|
||||||
RECHARGING = "RECHARGING",
|
RECHARGING = "RECHARGING",
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export enum BerryType {
|
export enum BerryType {
|
||||||
SITRUS,
|
SITRUS,
|
||||||
LUM,
|
LUM,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export enum Biome {
|
export enum Biome {
|
||||||
TOWN,
|
TOWN,
|
||||||
PLAINS,
|
PLAINS,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export enum TimeOfDay {
|
export enum TimeOfDay {
|
||||||
ALL = -1,
|
ALL = -1,
|
||||||
DAWN,
|
DAWN,
|
||||||
|
@ -1531,7 +1531,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the effectiveness of a move against the Pokémon.
|
* Calculates the effectiveness of a move against the Pokémon.
|
||||||
* This includes modifiers from move and ability attributes.
|
* This includes modifiers from move and ability attributes.
|
||||||
@ -1965,7 +1964,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
&& species.speciesId !== this.species.speciesId;
|
&& species.speciesId !== this.species.speciesId;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.fusionSpecies = this.scene.randomSpecies(this.scene.currentBattle?.waveIndex || 0, this.level, false, filter, true);
|
let fusionOverride: PokemonSpecies | undefined = undefined;
|
||||||
|
|
||||||
|
if (forStarter && this instanceof PlayerPokemon && Overrides.STARTER_FUSION_SPECIES_OVERRIDE) {
|
||||||
|
fusionOverride = getPokemonSpecies(Overrides.STARTER_FUSION_SPECIES_OVERRIDE);
|
||||||
|
} else if (this instanceof EnemyPokemon && Overrides.OPP_FUSION_SPECIES_OVERRIDE) {
|
||||||
|
fusionOverride = getPokemonSpecies(Overrides.OPP_FUSION_SPECIES_OVERRIDE);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.fusionSpecies = fusionOverride ?? this.scene.randomSpecies(this.scene.currentBattle?.waveIndex || 0, this.level, false, filter, true);
|
||||||
this.fusionAbilityIndex = (this.fusionSpecies.abilityHidden && hasHiddenAbility ? 2 : this.fusionSpecies.ability2 !== this.fusionSpecies.ability1 ? randAbilityIndex : 0);
|
this.fusionAbilityIndex = (this.fusionSpecies.abilityHidden && hasHiddenAbility ? 2 : this.fusionSpecies.ability2 !== this.fusionSpecies.ability1 ? randAbilityIndex : 0);
|
||||||
this.fusionShiny = this.shiny;
|
this.fusionShiny = this.shiny;
|
||||||
this.fusionVariant = this.variant;
|
this.fusionVariant = this.variant;
|
||||||
|
@ -100,6 +100,14 @@ class DefaultOverrides {
|
|||||||
* @example SPECIES_OVERRIDE = Species.Bulbasaur;
|
* @example SPECIES_OVERRIDE = Species.Bulbasaur;
|
||||||
*/
|
*/
|
||||||
readonly STARTER_SPECIES_OVERRIDE: Species | number = 0;
|
readonly STARTER_SPECIES_OVERRIDE: Species | number = 0;
|
||||||
|
/**
|
||||||
|
* This will force your starter to be a random fusion
|
||||||
|
*/
|
||||||
|
readonly STARTER_FUSION_OVERRIDE: boolean = false;
|
||||||
|
/**
|
||||||
|
* This will override the species of the fusion
|
||||||
|
*/
|
||||||
|
readonly STARTER_FUSION_SPECIES_OVERRIDE: Species | integer = 0;
|
||||||
readonly ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
readonly ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
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;
|
||||||
@ -112,6 +120,14 @@ class DefaultOverrides {
|
|||||||
// OPPONENT / ENEMY OVERRIDES
|
// OPPONENT / ENEMY OVERRIDES
|
||||||
// --------------------------
|
// --------------------------
|
||||||
readonly OPP_SPECIES_OVERRIDE: Species | number = 0;
|
readonly OPP_SPECIES_OVERRIDE: Species | number = 0;
|
||||||
|
/**
|
||||||
|
* This will make all opponents fused Pokemon
|
||||||
|
*/
|
||||||
|
readonly OPP_FUSION_OVERRIDE: boolean = false;
|
||||||
|
/**
|
||||||
|
* This will override the species of the fusion only when the opponent is already a fusion
|
||||||
|
*/
|
||||||
|
readonly OPP_FUSION_SPECIES_OVERRIDE: Species | integer = 0;
|
||||||
readonly OPP_LEVEL_OVERRIDE: number = 0;
|
readonly OPP_LEVEL_OVERRIDE: number = 0;
|
||||||
readonly OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
readonly OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
|
@ -407,7 +407,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
const semiInvulnerableTag = target.getTag(SemiInvulnerableTag);
|
const semiInvulnerableTag = target.getTag(SemiInvulnerableTag);
|
||||||
if (semiInvulnerableTag
|
if (semiInvulnerableTag
|
||||||
&& !this.move.getMove().getAttrs(HitsTagAttr).some(hta => hta.tagType === semiInvulnerableTag.tagType)
|
&& !this.move.getMove().getAttrs(HitsTagAttr).some(hta => hta.tagType === semiInvulnerableTag.tagType)
|
||||||
&& !(this.move.getMove().getAttrs(ToxicAccuracyAttr) && user.isOfType(Type.POISON))
|
&& !(this.move.getMove().hasAttr(ToxicAccuracyAttr) && user.isOfType(Type.POISON))
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ import Pokemon from "#app/field/pokemon";
|
|||||||
import { BattlePhase } from "#app/phases/battle-phase";
|
import { BattlePhase } from "#app/phases/battle-phase";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export class PokemonAnimPhase extends BattlePhase {
|
export class PokemonAnimPhase extends BattlePhase {
|
||||||
/** The type of animation to play in this phase */
|
/** The type of animation to play in this phase */
|
||||||
private key: PokemonAnimType;
|
private key: PokemonAnimType;
|
||||||
|
@ -80,7 +80,7 @@ export class SelectStarterPhase extends Phase {
|
|||||||
starterPokemon.nickname = starter.nickname;
|
starterPokemon.nickname = starter.nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.scene.gameMode.isSplicedOnly) {
|
if (this.scene.gameMode.isSplicedOnly || Overrides.STARTER_FUSION_OVERRIDE) {
|
||||||
starterPokemon.generateFusionSpecies(true);
|
starterPokemon.generateFusionSpecies(true);
|
||||||
}
|
}
|
||||||
starterPokemon.setVisible(false);
|
starterPokemon.setVisible(false);
|
||||||
|
@ -8,7 +8,6 @@ import GameManager from "#test/utils/gameManager";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - BATTLE BOND", () => {
|
describe("Abilities - BATTLE BOND", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - COSTAR", () => {
|
describe("Abilities - COSTAR", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Dancer", () => {
|
describe("Abilities - Dancer", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import GameManager from "#test/utils/gameManager";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Disguise", () => {
|
describe("Abilities - Disguise", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -10,7 +10,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Galvanize", () => {
|
describe("Abilities - Galvanize", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -13,7 +13,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Libero", () => {
|
describe("Abilities - Libero", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Parental Bond", () => {
|
describe("Abilities - Parental Bond", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import GameManager from "#test/utils/gameManager";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - POWER CONSTRUCT", () => {
|
describe("Abilities - POWER CONSTRUCT", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -13,7 +13,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Protean", () => {
|
describe("Abilities - Protean", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -12,7 +12,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Sand Veil", () => {
|
describe("Abilities - Sand Veil", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import GameManager from "#test/utils/gameManager";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - SCHOOLING", () => {
|
describe("Abilities - SCHOOLING", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import GameManager from "#test/utils/gameManager";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - SHIELDS DOWN", () => {
|
describe("Abilities - SHIELDS DOWN", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Sturdy", () => {
|
describe("Abilities - Sturdy", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import { BattlerTagType } from "#app/enums/battler-tag-type";
|
|||||||
import { BerryPhase } from "#app/phases/berry-phase";
|
import { BerryPhase } from "#app/phases/berry-phase";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - Unseen Fist", () => {
|
describe("Abilities - Unseen Fist", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -21,7 +21,6 @@ import { Status, StatusEffect } from "#app/data/status-effect";
|
|||||||
import { SwitchType } from "#enums/switch-type";
|
import { SwitchType } from "#enums/switch-type";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - ZEN MODE", () => {
|
describe("Abilities - ZEN MODE", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import GameManager from "#test/utils/gameManager";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Abilities - ZERO TO HERO", () => {
|
describe("Abilities - ZERO TO HERO", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Inverse Battle", () => {
|
describe("Inverse Battle", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - After You", () => {
|
describe("Moves - After You", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Alluring Voice", () => {
|
describe("Moves - Alluring Voice", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -12,7 +12,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Astonish", () => {
|
describe("Moves - Astonish", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import { BattlerIndex } from "#app/battle";
|
|||||||
import { StatusEffect } from "#app/enums/status-effect";
|
import { StatusEffect } from "#app/enums/status-effect";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Baneful Bunker", () => {
|
describe("Moves - Baneful Bunker", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Beak Blast", () => {
|
describe("Moves - Beak Blast", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Burning Jealousy", () => {
|
describe("Moves - Burning Jealousy", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Ceaseless Edge", () => {
|
describe("Moves - Ceaseless Edge", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -10,7 +10,6 @@ import { BerryPhase } from "#app/phases/berry-phase";
|
|||||||
import { CommandPhase } from "#app/phases/command-phase";
|
import { CommandPhase } from "#app/phases/command-phase";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Crafty Shield", () => {
|
describe("Moves - Crafty Shield", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Focus Punch", () => {
|
describe("Moves - Focus Punch", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Follow Me", () => {
|
describe("Moves - Follow Me", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -7,7 +7,6 @@ import GameManager from "#test/utils/gameManager";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Gastro Acid", () => {
|
describe("Moves - Gastro Acid", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -7,7 +7,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Glaive Rush", () => {
|
describe("Moves - Glaive Rush", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -12,7 +12,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Jaw Lock", () => {
|
describe("Moves - Jaw Lock", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Lash Out", () => {
|
describe("Moves - Lash Out", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|||||||
import GameManager from "../utils/gameManager";
|
import GameManager from "../utils/gameManager";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Lucky Chant", () => {
|
describe("Moves - Lucky Chant", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase";
|
|||||||
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
|
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Make It Rain", () => {
|
describe("Moves - Make It Rain", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -10,7 +10,6 @@ import { CommandPhase } from "#app/phases/command-phase";
|
|||||||
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Mat Block", () => {
|
describe("Moves - Mat Block", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Multi-target damage reduction", () => {
|
describe("Multi-target damage reduction", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import { MessagePhase } from "#app/phases/message-phase";
|
|||||||
import { TurnInitPhase } from "#app/phases/turn-init-phase";
|
import { TurnInitPhase } from "#app/phases/turn-init-phase";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Parting Shot", () => {
|
describe("Moves - Parting Shot", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import { BattlerIndex } from "#app/battle";
|
|||||||
import { MoveResult } from "#app/field/pokemon";
|
import { MoveResult } from "#app/field/pokemon";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Protect", () => {
|
describe("Moves - Protect", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Purify", () => {
|
describe("Moves - Purify", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import { BattlerIndex } from "#app/battle";
|
|||||||
import { MoveResult } from "#app/field/pokemon";
|
import { MoveResult } from "#app/field/pokemon";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Quick Guard", () => {
|
describe("Moves - Quick Guard", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -7,7 +7,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Rage Powder", () => {
|
describe("Moves - Rage Powder", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -10,7 +10,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Roost", () => {
|
describe("Moves - Roost", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Safeguard", () => {
|
describe("Moves - Safeguard", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -11,7 +11,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Shell Trap", () => {
|
describe("Moves - Shell Trap", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -7,7 +7,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Spotlight", () => {
|
describe("Moves - Spotlight", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -9,7 +9,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Thousand Arrows", () => {
|
describe("Moves - Thousand Arrows", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -8,7 +8,6 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Thunder Wave", () => {
|
describe("Moves - Thunder Wave", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -73,4 +73,17 @@ describe("Moves - Toxic", () => {
|
|||||||
|
|
||||||
expect(game.scene.getEnemyPokemon()!.status).toBeUndefined();
|
expect(game.scene.getEnemyPokemon()!.status).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("moves other than Toxic should not hit semi-invulnerable targets even if user is Poison-type", async () => {
|
||||||
|
game.override.moveset(Moves.SWIFT);
|
||||||
|
game.override.enemyMoveset(Moves.FLY);
|
||||||
|
await game.classicMode.startBattle([ Species.TOXAPEX ]);
|
||||||
|
|
||||||
|
game.move.select(Moves.SWIFT);
|
||||||
|
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase", false);
|
||||||
|
|
||||||
|
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||||
|
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -9,7 +9,6 @@ import { BerryPhase } from "#app/phases/berry-phase";
|
|||||||
import { CommandPhase } from "#app/phases/command-phase";
|
import { CommandPhase } from "#app/phases/command-phase";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe("Moves - Wide Guard", () => {
|
describe("Moves - Wide Guard", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
@ -85,6 +85,27 @@ export class OverridesHelper extends GameManagerHelper {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override the player (pokemon) to be a random fusion
|
||||||
|
* @returns this
|
||||||
|
*/
|
||||||
|
enableStarterFusion(): this {
|
||||||
|
vi.spyOn(Overrides, "STARTER_FUSION_OVERRIDE", "get").mockReturnValue(true);
|
||||||
|
this.log("Player Pokemon is a random fusion!");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override the player (pokemon) fusion species
|
||||||
|
* @param species the fusion species to set
|
||||||
|
* @returns this
|
||||||
|
*/
|
||||||
|
starterFusionSpecies(species: Species | number): this {
|
||||||
|
vi.spyOn(Overrides, "STARTER_FUSION_SPECIES_OVERRIDE", "get").mockReturnValue(species);
|
||||||
|
this.log(`Player Pokemon fusion species set to ${Species[species]} (=${species})!`);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the player (pokemons) forms
|
* Override the player (pokemons) forms
|
||||||
* @param forms the (pokemon) forms to set
|
* @param forms the (pokemon) forms to set
|
||||||
@ -232,6 +253,27 @@ export class OverridesHelper extends GameManagerHelper {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override the enemy (pokemon) to be a random fusion
|
||||||
|
* @returns this
|
||||||
|
*/
|
||||||
|
enableEnemyFusion(): this {
|
||||||
|
vi.spyOn(Overrides, "OPP_FUSION_OVERRIDE", "get").mockReturnValue(true);
|
||||||
|
this.log("Enemy Pokemon is a random fusion!");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override the enemy (pokemon) fusion species
|
||||||
|
* @param species the fusion species to set
|
||||||
|
* @returns this
|
||||||
|
*/
|
||||||
|
enemyFusionSpecies(species: Species | number): this {
|
||||||
|
vi.spyOn(Overrides, "OPP_FUSION_SPECIES_OVERRIDE", "get").mockReturnValue(species);
|
||||||
|
this.log(`Enemy Pokemon fusion species set to ${Species[species]} (=${species})!`);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the enemy (pokemon) {@linkcode Abilities | ability}
|
* Override the enemy (pokemon) {@linkcode Abilities | ability}
|
||||||
* @param ability the (pokemon) {@linkcode Abilities | ability} to set
|
* @param ability the (pokemon) {@linkcode Abilities | ability} to set
|
||||||
|
@ -212,5 +212,4 @@ export default class MockSprite implements MockGameObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,6 @@ export class ArenaFlyout extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Clears out the current string stored in all arena effect texts */
|
/** Clears out the current string stored in all arena effect texts */
|
||||||
private clearText() {
|
private clearText() {
|
||||||
this.flyoutTextPlayer.text = "";
|
this.flyoutTextPlayer.text = "";
|
||||||
|
@ -6,7 +6,6 @@ export const TOUCH_CONTROL_POSITIONS_LANDSCAPE = "touchControlPositionsLandscape
|
|||||||
export const TOUCH_CONTROL_POSITIONS_PORTRAIT = "touchControlPositionsPortrait";
|
export const TOUCH_CONTROL_POSITIONS_PORTRAIT = "touchControlPositionsPortrait";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type ControlPosition = { id: string, x: number, y: number };
|
type ControlPosition = { id: string, x: number, y: number };
|
||||||
|
|
||||||
type ConfigurationEventListeners = {
|
type ConfigurationEventListeners = {
|
||||||
|
@ -77,7 +77,6 @@ export default class SettingsKeyboardUiHandler extends AbstractControlSettingsUi
|
|||||||
this.settingsContainer.add(deleteText);
|
this.settingsContainer.add(deleteText);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Map the 'noKeyboard' layout options for easy access.
|
// Map the 'noKeyboard' layout options for easy access.
|
||||||
this.layout["noKeyboard"].optionsContainer = optionsContainer;
|
this.layout["noKeyboard"].optionsContainer = optionsContainer;
|
||||||
this.layout["noKeyboard"].label = label;
|
this.layout["noKeyboard"].label = label;
|
||||||
|
@ -2951,7 +2951,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setSpeciesDetails(species: PokemonSpecies, shiny?: boolean, formIndex?: integer, female?: boolean, variant?: Variant, abilityIndex?: integer, natureIndex?: integer, forSeen: boolean = false): void {
|
setSpeciesDetails(species: PokemonSpecies, shiny?: boolean, formIndex?: integer, female?: boolean, variant?: Variant, abilityIndex?: integer, natureIndex?: integer, forSeen: boolean = false): void {
|
||||||
const oldProps = species ? this.scene.gameData.getSpeciesDexAttrProps(species, this.dexAttrCursor) : null;
|
const oldProps = species ? this.scene.gameData.getSpeciesDexAttrProps(species, this.dexAttrCursor) : null;
|
||||||
const oldAbilityIndex = this.abilityCursor > -1 ? this.abilityCursor : this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species);
|
const oldAbilityIndex = this.abilityCursor > -1 ? this.abilityCursor : this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species);
|
||||||
|
Loading…
Reference in New Issue
Block a user