mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-27 17:59:28 +02:00
Compare commits
3 Commits
c853ca2dd4
...
812ce7af3e
Author | SHA1 | Date | |
---|---|---|---|
|
812ce7af3e | ||
|
907e3c8208 | ||
|
e20d7047f7 |
@ -1865,27 +1865,43 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
.setPartyMemberFunc(
|
.setPartyMemberFunc(
|
||||||
0,
|
0,
|
||||||
getRandomPartyMemberFunc([
|
getRandomPartyMemberFunc([
|
||||||
|
SpeciesId.METAPOD,
|
||||||
|
SpeciesId.LEDYBA,
|
||||||
|
SpeciesId.CLEFFA,
|
||||||
|
SpeciesId.WOOPER,
|
||||||
|
SpeciesId.TEDDIURSA,
|
||||||
|
SpeciesId.REMORAID,
|
||||||
|
SpeciesId.HOUNDOUR,
|
||||||
|
SpeciesId.SILCOON,
|
||||||
SpeciesId.PLUSLE,
|
SpeciesId.PLUSLE,
|
||||||
SpeciesId.VOLBEAT,
|
SpeciesId.VOLBEAT,
|
||||||
SpeciesId.PACHIRISU,
|
SpeciesId.SPINDA,
|
||||||
SpeciesId.SILCOON,
|
SpeciesId.BONSLY,
|
||||||
SpeciesId.METAPOD,
|
|
||||||
SpeciesId.IGGLYBUFF,
|
|
||||||
SpeciesId.PETILIL,
|
SpeciesId.PETILIL,
|
||||||
SpeciesId.EEVEE,
|
SpeciesId.SPRITZEE,
|
||||||
|
SpeciesId.MILCERY,
|
||||||
|
SpeciesId.PICHU,
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
.setPartyMemberFunc(
|
.setPartyMemberFunc(
|
||||||
1,
|
1,
|
||||||
getRandomPartyMemberFunc(
|
getRandomPartyMemberFunc(
|
||||||
[
|
[
|
||||||
|
SpeciesId.KAKUNA,
|
||||||
|
SpeciesId.SPINARAK,
|
||||||
|
SpeciesId.IGGLYBUFF,
|
||||||
|
SpeciesId.PALDEA_WOOPER,
|
||||||
|
SpeciesId.PHANPY,
|
||||||
|
SpeciesId.MANTYKE,
|
||||||
|
SpeciesId.ELECTRIKE,
|
||||||
|
SpeciesId.CASCOON,
|
||||||
SpeciesId.MINUN,
|
SpeciesId.MINUN,
|
||||||
SpeciesId.ILLUMISE,
|
SpeciesId.ILLUMISE,
|
||||||
SpeciesId.EMOLGA,
|
SpeciesId.SPINDA,
|
||||||
SpeciesId.CASCOON,
|
SpeciesId.MIME_JR,
|
||||||
SpeciesId.KAKUNA,
|
|
||||||
SpeciesId.CLEFFA,
|
|
||||||
SpeciesId.COTTONEE,
|
SpeciesId.COTTONEE,
|
||||||
|
SpeciesId.SWIRLIX,
|
||||||
|
SpeciesId.FIDOUGH,
|
||||||
SpeciesId.EEVEE,
|
SpeciesId.EEVEE,
|
||||||
],
|
],
|
||||||
TrainerSlot.TRAINER_PARTNER,
|
TrainerSlot.TRAINER_PARTNER,
|
||||||
|
@ -120,14 +120,8 @@ export class MovePhase extends BattlePhase {
|
|||||||
|
|
||||||
console.log(MoveId[this.move.moveId], enumValueToKey(MoveUseMode, this.useMode));
|
console.log(MoveId[this.move.moveId], enumValueToKey(MoveUseMode, this.useMode));
|
||||||
|
|
||||||
// Check if move is unusable (e.g. running out of PP due to a mid-turn Spite
|
if (!this.pokemon.isActive(true)) {
|
||||||
// or the user no longer being on field), ending the phase early if not.
|
this.cancel();
|
||||||
if (!this.canMove(true)) {
|
|
||||||
if (this.pokemon.isActive(true)) {
|
|
||||||
this.fail();
|
|
||||||
this.showMoveText();
|
|
||||||
this.showFailedText();
|
|
||||||
}
|
|
||||||
this.end();
|
this.end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -155,6 +149,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
|
|
||||||
this.resolveCounterAttackTarget();
|
this.resolveCounterAttackTarget();
|
||||||
|
|
||||||
|
// Check status cancellation from sleep, freeze, etc.
|
||||||
this.resolvePreMoveStatusEffects();
|
this.resolvePreMoveStatusEffects();
|
||||||
|
|
||||||
this.lapsePreMoveAndMoveTags();
|
this.lapsePreMoveAndMoveTags();
|
||||||
@ -180,6 +175,18 @@ export class MovePhase extends BattlePhase {
|
|||||||
const targets = this.getActiveTargetPokemon();
|
const targets = this.getActiveTargetPokemon();
|
||||||
const moveQueue = this.pokemon.getMoveQueue();
|
const moveQueue = this.pokemon.getMoveQueue();
|
||||||
|
|
||||||
|
// Check if move is unusable (e.g. running out of PP due to a mid-turn Spite
|
||||||
|
// or the user no longer being on field)
|
||||||
|
|
||||||
|
if (!this.canMove(true)) {
|
||||||
|
if (this.pokemon.isActive(true)) {
|
||||||
|
this.fail();
|
||||||
|
this.showMoveText();
|
||||||
|
this.showFailedText();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(targets.length === 0 && !this.move.getMove().hasAttr("AddArenaTrapTagAttr")) ||
|
(targets.length === 0 && !this.move.getMove().hasAttr("AddArenaTrapTagAttr")) ||
|
||||||
(moveQueue.length > 0 && moveQueue[0].move === MoveId.NONE)
|
(moveQueue.length > 0 && moveQueue[0].move === MoveId.NONE)
|
||||||
|
@ -353,7 +353,7 @@ describe("Status Effects", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
game.override
|
game.override
|
||||||
.moveset([MoveId.SPLASH])
|
.moveset([MoveId.SPLASH, MoveId.DRAGON_CHEER])
|
||||||
.ability(AbilityId.BALL_FETCH)
|
.ability(AbilityId.BALL_FETCH)
|
||||||
.battleStyle("single")
|
.battleStyle("single")
|
||||||
.criticalHits(false)
|
.criticalHits(false)
|
||||||
@ -390,6 +390,35 @@ describe("Status Effects", () => {
|
|||||||
expect(player.status).toBeFalsy();
|
expect(player.status).toBeFalsy();
|
||||||
expect(player.getLastXMoves(1)[0].result).toBe(MoveResult.SUCCESS);
|
expect(player.getLastXMoves(1)[0].result).toBe(MoveResult.SUCCESS);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("Sleep turns should tick down when failing to use ally-targeting moves", async () => {
|
||||||
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
|
|
||||||
|
const player = game.field.getPlayerPokemon();
|
||||||
|
player.status = new Status(StatusEffect.SLEEP, 0, 4);
|
||||||
|
|
||||||
|
game.move.select(MoveId.DRAGON_CHEER);
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
expect(player.status.effect).toBe(StatusEffect.SLEEP);
|
||||||
|
|
||||||
|
game.move.select(MoveId.DRAGON_CHEER);
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
expect(player.status.effect).toBe(StatusEffect.SLEEP);
|
||||||
|
|
||||||
|
game.move.select(MoveId.DRAGON_CHEER);
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
expect(player.status.effect).toBe(StatusEffect.SLEEP);
|
||||||
|
expect(player.getLastXMoves(1)[0].result).toBe(MoveResult.FAIL);
|
||||||
|
|
||||||
|
game.move.select(MoveId.DRAGON_CHEER);
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
expect(player.status).toBeFalsy();
|
||||||
|
expect(player.getLastXMoves(1)[0].result).toBe(MoveResult.FAIL);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Behavior", () => {
|
describe("Behavior", () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user