[Sprite] Set default fps to 10 instead of 12 on pokemon animations (#4842)

* Set default fps to 10 instead of 12 for pokemon sprites

* [Sprite] Set pokemon animation framerate to 10 where assigned
This commit is contained in:
pom-eranian 2024-11-15 11:58:50 -05:00 committed by GitHub
parent ef7d860166
commit 5ca1fd5cfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -505,11 +505,11 @@ export abstract class PokemonSpeciesForm {
scene.anims.create({ scene.anims.create({
key: this.getSpriteKey(female, formIndex, shiny, variant), key: this.getSpriteKey(female, formIndex, shiny, variant),
frames: frameNames, frames: frameNames,
frameRate: 12, frameRate: 10,
repeat: -1 repeat: -1
}); });
} else { } else {
scene.anims.get(spriteKey).frameRate = 12; scene.anims.get(spriteKey).frameRate = 10;
} }
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);

View File

@ -212,7 +212,7 @@ export default class MysteryEncounterIntroVisuals extends Phaser.GameObjects.Con
this.scene.anims.create({ this.scene.anims.create({
key: config.spriteKey, key: config.spriteKey,
frames: frameNames, frames: frameNames,
frameRate: 12, frameRate: 10,
repeat: -1 repeat: -1
}); });
} }

View File

@ -427,7 +427,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.scene.anims.create({ this.scene.anims.create({
key: this.getBattleSpriteKey(), key: this.getBattleSpriteKey(),
frames: battleFrameNames, frames: battleFrameNames,
frameRate: 12, frameRate: 10,
repeat: -1 repeat: -1
}); });
} }
@ -3612,7 +3612,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
this.status = null; this.status = null;
if (lastStatus === StatusEffect.SLEEP) { if (lastStatus === StatusEffect.SLEEP) {
this.setFrameRate(12); this.setFrameRate(10);
if (this.getTag(BattlerTagType.NIGHTMARE)) { if (this.getTag(BattlerTagType.NIGHTMARE)) {
this.lapseTag(BattlerTagType.NIGHTMARE); this.lapseTag(BattlerTagType.NIGHTMARE);
} }