Fainted pkmn slots displaying correctly

This commit is contained in:
Wlowscha 2025-08-11 22:31:11 +02:00
parent fe30946f31
commit f07b94107a
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -1871,13 +1871,13 @@ class PartySlot extends Phaser.GameObjects.Container {
const offsetJa = currentLanguage === "ja";
const isItemManageMode = partyUiMode === PartyUiMode.MODIFIER_TRANSFER || partyUiMode === PartyUiMode.DISCARD;
const slotKey = this.isBenched
this.slotBgKey = this.isBenched
? "party_slot"
: isItemManageMode && globalScene.currentBattle.double
? "party_slot_main_short"
: "party_slot_main";
this.slotBgKey = this.pokemon.hp ? slotKey : `${slotKey}${"_fnt"}`;
this.slotBg = globalScene.add.sprite(0, 0, slotKey, this.slotBgKey);
const fullSlotBgKey = this.pokemon.hp ? this.slotBgKey : `${this.slotBgKey}${"_fnt"}`;
this.slotBg = globalScene.add.sprite(0, 0, this.slotBgKey, fullSlotBgKey);
this.slotBg.setOrigin(0);
this.add(this.slotBg);