Fix getFormSpriteKey() and .concat() usage

Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
This commit is contained in:
NightKev 2024-11-03 18:47:38 -08:00 committed by GitHub
parent 0961ce53d0
commit 3c05eb267a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -2981,8 +2981,8 @@ export default class BattleScene extends SceneBase {
*/
getActiveKeys(): string[] {
const keys: string[] = [];
const activePokemon: (PlayerPokemon | EnemyPokemon)[] = this.getParty();
activePokemon.concat(this.getEnemyParty());
let activePokemon: (PlayerPokemon | EnemyPokemon)[] = this.getParty();
activePokemon = activePokemon.concat(this.getEnemyParty());
activePokemon.forEach((p) => {
keys.push(p.getSpriteKey(true));
if (p instanceof PlayerPokemon) {

View File

@ -233,7 +233,7 @@ export default class Battle {
const wildOpponents = scene.getEnemyParty();
for (const pokemon of wildOpponents) {
if (this.battleSpec === BattleSpec.FINAL_BOSS) {
if (pokemon.species.getFormSpriteKey() === SpeciesFormKey.ETERNAMAX) {
if (pokemon.species.getFormSpriteKey(pokemon.formIndex) === SpeciesFormKey.ETERNAMAX) {
return "battle_final";
}
return "battle_final_encounter";
@ -299,7 +299,7 @@ export default class Battle {
return "battle_legendary_sinnoh";
case Species.DIALGA:
case Species.PALKIA:
if (pokemon.species.getFormSpriteKey() === SpeciesFormKey.ORIGIN) {
if (pokemon.species.getFormSpriteKey(pokemon.formIndex) === SpeciesFormKey.ORIGIN) {
return "battle_legendary_origin_forme";
}
return "battle_legendary_dia_pal";