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[] {
const keys: string[] = [];
const playerParty = this.getParty();
playerParty.forEach(p => {
const activePokemon: (PlayerPokemon | EnemyPokemon)[] = this.getParty();
activePokemon.concat(this.getEnemyParty());
activePokemon.forEach((p) => {
keys.push(p.getSpriteKey(true));
if (p instanceof PlayerPokemon) {
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));
if (p.fusionSpecies) {
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),
repeat: -1,
callback: () => {
++i;
frameThreshold = sprite.anims.msPerFrame / rate;
frameProgress += delay;
while (frameProgress > frameThreshold) {