mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-04 13:49:32 +02:00
Compare commits
4 Commits
2424af569d
...
2f2d286a9d
Author | SHA1 | Date | |
---|---|---|---|
|
2f2d286a9d | ||
|
f0a56a3049 | ||
|
7316628448 | ||
|
e20d7047f7 |
41
public/images/trainer/rocket_boss_giovanni_1.json
Normal file
41
public/images/trainer/rocket_boss_giovanni_1.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "rocket_boss_giovanni_1.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 79,
|
||||
"h": 79
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 39,
|
||||
"h": 79
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 39,
|
||||
"h": 79
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 39,
|
||||
"h": 79
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:d6c5e1804414106d43a7c46f83468d39:1f3f7898a58950988acac6ee7167e012:5f742cbdaafcd5ae864f18ec2af7512a$"
|
||||
}
|
||||
}
|
BIN
public/images/trainer/rocket_boss_giovanni_1.png
Normal file
BIN
public/images/trainer/rocket_boss_giovanni_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 698 B |
@ -223,9 +223,8 @@ export class TrainerConfig {
|
||||
case TrainerType.LARRY_ELITE:
|
||||
trainerType = TrainerType.LARRY;
|
||||
break;
|
||||
case TrainerType.ROCKET_BOSS_GIOVANNI_1:
|
||||
case TrainerType.ROCKET_BOSS_GIOVANNI_2:
|
||||
trainerType = TrainerType.GIOVANNI;
|
||||
trainerType = TrainerType.ROCKET_BOSS_GIOVANNI_1;
|
||||
break;
|
||||
case TrainerType.MAXIE_2:
|
||||
trainerType = TrainerType.MAXIE;
|
||||
@ -895,7 +894,7 @@ export class TrainerConfig {
|
||||
|
||||
/**
|
||||
* Helper function to check if a specialty type is set
|
||||
* @returns true if specialtyType is defined and not Type.UNKNOWN
|
||||
* @returns `true` if `specialtyType` is defined and not {@link PokemonType.UNKNOWN}
|
||||
*/
|
||||
hasSpecialtyType(): boolean {
|
||||
return !isNullOrUndefined(this.specialtyType) && this.specialtyType !== PokemonType.UNKNOWN;
|
||||
|
@ -120,14 +120,8 @@ export class MovePhase extends BattlePhase {
|
||||
|
||||
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
|
||||
// or the user no longer being on field), ending the phase early if not.
|
||||
if (!this.canMove(true)) {
|
||||
if (this.pokemon.isActive(true)) {
|
||||
this.fail();
|
||||
this.showMoveText();
|
||||
this.showFailedText();
|
||||
}
|
||||
if (!this.pokemon.isActive(true)) {
|
||||
this.cancel();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
@ -155,6 +149,7 @@ export class MovePhase extends BattlePhase {
|
||||
|
||||
this.resolveCounterAttackTarget();
|
||||
|
||||
// Check status cancellation from sleep, freeze, etc.
|
||||
this.resolvePreMoveStatusEffects();
|
||||
|
||||
this.lapsePreMoveAndMoveTags();
|
||||
@ -180,6 +175,18 @@ export class MovePhase extends BattlePhase {
|
||||
const targets = this.getActiveTargetPokemon();
|
||||
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 (
|
||||
(targets.length === 0 && !this.move.getMove().hasAttr("AddArenaTrapTagAttr")) ||
|
||||
(moveQueue.length > 0 && moveQueue[0].move === MoveId.NONE)
|
||||
|
@ -353,7 +353,7 @@ describe("Status Effects", () => {
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
game.override
|
||||
.moveset([MoveId.SPLASH])
|
||||
.moveset([MoveId.SPLASH, MoveId.DRAGON_CHEER])
|
||||
.ability(AbilityId.BALL_FETCH)
|
||||
.battleStyle("single")
|
||||
.criticalHits(false)
|
||||
@ -390,6 +390,35 @@ describe("Status Effects", () => {
|
||||
expect(player.status).toBeFalsy();
|
||||
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", () => {
|
||||
|
Loading…
Reference in New Issue
Block a user