Added changes

This commit is contained in:
frutescens 2024-11-03 15:14:11 -08:00
parent 6bbbdf281d
commit 3f6629c9ba
2 changed files with 5 additions and 12 deletions

View File

@ -2981,19 +2981,13 @@ export default class BattleScene extends SceneBase {
*/ */
getActiveKeys(): string[] { getActiveKeys(): string[] {
const keys: string[] = []; const keys: string[] = [];
const playerParty = this.getParty(); const activePokemon: (PlayerPokemon | EnemyPokemon)[] = this.getParty();
playerParty.forEach(p => { activePokemon.concat(this.getEnemyParty());
activePokemon.forEach((p) => {
keys.push(p.getSpriteKey(true)); keys.push(p.getSpriteKey(true));
if (p instanceof PlayerPokemon) {
keys.push(p.getBattleSpriteKey(true, true)); keys.push(p.getBattleSpriteKey(true, true));
keys.push(p.species.getCryKey(p.formIndex));
if (p.fusionSpecies) {
keys.push(p.fusionSpecies.getCryKey(p.fusionFormIndex));
} }
});
// enemyParty has to be operated on separately from playerParty because playerPokemon =/= enemyPokemon
const enemyParty = this.getEnemyParty();
enemyParty.forEach(p => {
keys.push(p.getSpriteKey(true));
keys.push(p.species.getCryKey(p.formIndex)); keys.push(p.species.getCryKey(p.formIndex));
if (p.fusionSpecies) { if (p.fusionSpecies) {
keys.push(p.fusionSpecies.getCryKey(p.fusionFormIndex)); keys.push(p.fusionSpecies.getCryKey(p.fusionFormIndex));

View File

@ -3228,7 +3228,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
delay: Utils.fixedInt(delay), delay: Utils.fixedInt(delay),
repeat: -1, repeat: -1,
callback: () => { callback: () => {
++i;
frameThreshold = sprite.anims.msPerFrame / rate; frameThreshold = sprite.anims.msPerFrame / rate;
frameProgress += delay; frameProgress += delay;
while (frameProgress > frameThreshold) { while (frameProgress > frameThreshold) {