mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Merge branch 'beta' into sandstorm-anim
This commit is contained in:
commit
4da1a4a989
@ -8,11 +8,11 @@ export type SignatureSpecies = {
|
|||||||
* The signature species for each Gym Leader, Elite Four member, and Champion.
|
* The signature species for each Gym Leader, Elite Four member, and Champion.
|
||||||
* The key is the trainer type, and the value is an array of Species or Species arrays.
|
* The key is the trainer type, and the value is an array of Species or Species arrays.
|
||||||
* This is in a separate const so it can be accessed from other places and not just the trainerConfigs
|
* This is in a separate const so it can be accessed from other places and not just the trainerConfigs
|
||||||
*
|
*
|
||||||
* @remarks
|
* @remarks
|
||||||
* The `Proxy` object allows us to define a handler that will intercept
|
* The `Proxy` object allows us to define a handler that will intercept
|
||||||
* the property access and return an empty array if the property does not exist in the object.
|
* the property access and return an empty array if the property does not exist in the object.
|
||||||
*
|
*
|
||||||
* This means that accessing `signatureSpecies` will not throw an error if the property does not exist,
|
* This means that accessing `signatureSpecies` will not throw an error if the property does not exist,
|
||||||
* but instead default to an empty array.
|
* but instead default to an empty array.
|
||||||
*/
|
*/
|
||||||
|
@ -67104,7 +67104,7 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.CHEWTLE,
|
Species.CHEWTLE,
|
||||||
Species.DREDNAW,
|
Species.DREDNAW,
|
||||||
Species.YAMPER,
|
Species.YAMPER,
|
||||||
Species.BOLTUND,
|
Species.BOLTUND,
|
||||||
Species.ROLYCOLY,
|
Species.ROLYCOLY,
|
||||||
Species.CARKOL,
|
Species.CARKOL,
|
||||||
Species.COALOSSAL,
|
Species.COALOSSAL,
|
||||||
@ -67121,7 +67121,7 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.SIZZLIPEDE,
|
Species.SIZZLIPEDE,
|
||||||
Species.CENTISKORCH,
|
Species.CENTISKORCH,
|
||||||
Species.CLOBBOPUS,
|
Species.CLOBBOPUS,
|
||||||
Species.GRAPPLOCT,
|
Species.GRAPPLOCT,
|
||||||
Species.SINISTEA,
|
Species.SINISTEA,
|
||||||
Species.POLTEAGEIST,
|
Species.POLTEAGEIST,
|
||||||
Species.HATENNA,
|
Species.HATENNA,
|
||||||
|
@ -8052,10 +8052,10 @@ export class UpperHandCondition extends MoveCondition {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class hitsSameTypeAttr extends VariableMoveTypeMultiplierAttr {
|
export class HitsSameTypeAttr extends VariableMoveTypeMultiplierAttr {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const multiplier = args[0] as NumberHolder;
|
const multiplier = args[0] as NumberHolder;
|
||||||
if (!user.getTypes().some(type => target.getTypes().includes(type))) {
|
if (!user.getTypes(true).some(type => target.getTypes(true).includes(type))) {
|
||||||
multiplier.value = 0;
|
multiplier.value = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -9756,7 +9756,7 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.SYNCHRONOISE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.SYNCHRONOISE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
||||||
.target(MoveTarget.ALL_NEAR_OTHERS)
|
.target(MoveTarget.ALL_NEAR_OTHERS)
|
||||||
.condition(unknownTypeCondition)
|
.condition(unknownTypeCondition)
|
||||||
.attr(hitsSameTypeAttr),
|
.attr(HitsSameTypeAttr),
|
||||||
new AttackMove(Moves.ELECTRO_BALL, PokemonType.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.ELECTRO_BALL, PokemonType.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5)
|
||||||
.attr(ElectroBallPowerAttr)
|
.attr(ElectroBallPowerAttr)
|
||||||
.ballBombMove(),
|
.ballBombMove(),
|
||||||
|
@ -5678,7 +5678,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs the action of clearing a Pokemon's status
|
* Performs the action of clearing a Pokemon's status
|
||||||
*
|
*
|
||||||
* This is a helper to {@linkcode resetStatus}, which should be called directly instead of this method
|
* This is a helper to {@linkcode resetStatus}, which should be called directly instead of this method
|
||||||
*/
|
*/
|
||||||
public clearStatus(confusion: boolean, reloadAssets: boolean) {
|
public clearStatus(confusion: boolean, reloadAssets: boolean) {
|
||||||
|
47
test/moves/synchronoise.test.ts
Normal file
47
test/moves/synchronoise.test.ts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import { Abilities } from "#enums/abilities";
|
||||||
|
import { Moves } from "#enums/moves";
|
||||||
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
|
import { Species } from "#enums/species";
|
||||||
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
|
import Phaser from "phaser";
|
||||||
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
describe("Moves - Synchronoise", () => {
|
||||||
|
let phaserGame: Phaser.Game;
|
||||||
|
let game: GameManager;
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
phaserGame = new Phaser.Game({
|
||||||
|
type: Phaser.HEADLESS,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
game.phaseInterceptor.restoreOg();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
game = new GameManager(phaserGame);
|
||||||
|
game.override
|
||||||
|
.moveset([Moves.SYNCHRONOISE])
|
||||||
|
.ability(Abilities.BALL_FETCH)
|
||||||
|
.battleStyle("single")
|
||||||
|
.disableCrits()
|
||||||
|
.enemySpecies(Species.MAGIKARP)
|
||||||
|
.enemyAbility(Abilities.BALL_FETCH)
|
||||||
|
.enemyMoveset(Moves.SPLASH);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should consider the user's tera type if it is terastallized", async () => {
|
||||||
|
await game.classicMode.startBattle([Species.BIDOOF]);
|
||||||
|
const playerPokemon = game.scene.getPlayerPokemon()!;
|
||||||
|
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||||
|
|
||||||
|
// force the player to be terastallized
|
||||||
|
playerPokemon.teraType = PokemonType.WATER;
|
||||||
|
playerPokemon.isTerastallized = true;
|
||||||
|
game.move.select(Moves.SYNCHRONOISE);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp());
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user