Add passive secondary abilities for bosses

This commit is contained in:
Flashfyre committed 2024-04-11 09:24:03 -04:00
1 parent 75075c6fab
commit 31050a5181
12 files changed
+1127 -521

No files matched your search

+3 -3
View File
@@ -38,9 +38,9 @@ export default class AbilityBar extends Phaser.GameObjects.Container {
this.shown = false;
}
showAbility(pokemon: Pokemon): void {
this.pokemonNameText.setText(`${pokemon.name}'s`);
this.abilityNameText.setText(pokemon.getAbility().name);
showAbility(pokemon: Pokemon, passive: boolean = false): void {
this.pokemonNameText.setText(`${pokemon.name}'s${passive ? ' Passive' : ''}`);
this.abilityNameText.setText((!passive ? pokemon.getAbility() : pokemon.getPassiveAbility()).name);
if (this.shown)
return;