fix for [Bug] Moves That a Pokemon Knows and are not in their List of Learnable TMs Display as "Not Able" Rather than Learned #3930

This commit is contained in:
njahja 2024-08-30 22:41:20 -07:00
parent ce0ba3fbf9
commit 03c0afc39d

View File

@ -1318,12 +1318,12 @@ class PartySlot extends Phaser.GameObjects.Container {
this.slotHpText.setVisible(false); this.slotHpText.setVisible(false);
let slotTmText: string; let slotTmText: string;
switch (true) { switch (true) {
case (this.pokemon.compatibleTms.indexOf(tmMoveId) === -1):
slotTmText = i18next.t("partyUiHandler:notAble");
break;
case (this.pokemon.getMoveset().filter(m => m?.moveId === tmMoveId).length > 0): case (this.pokemon.getMoveset().filter(m => m?.moveId === tmMoveId).length > 0):
slotTmText = i18next.t("partyUiHandler:learned"); slotTmText = i18next.t("partyUiHandler:learned");
break; break;
case (this.pokemon.compatibleTms.indexOf(tmMoveId) === -1):
slotTmText = i18next.t("partyUiHandler:notAble");
break;
default: default:
slotTmText = i18next.t("partyUiHandler:able"); slotTmText = i18next.t("partyUiHandler:able");
break; break;