mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
[Bugfix #3930] Moves That a Pokemon Knows and are not in their List of Learnable TMs Display as "Not Able" Rather than Learned (#3935)
* 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 * convert switch case block to if/elif/else
This commit is contained in:
parent
4c4a2c1900
commit
03567ed56c
@ -1321,16 +1321,13 @@ class PartySlot extends Phaser.GameObjects.Container {
|
||||
this.slotHpOverlay.setVisible(false);
|
||||
this.slotHpText.setVisible(false);
|
||||
let slotTmText: string;
|
||||
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):
|
||||
|
||||
if (this.pokemon.getMoveset().filter(m => m?.moveId === tmMoveId).length > 0) {
|
||||
slotTmText = i18next.t("partyUiHandler:learned");
|
||||
break;
|
||||
default:
|
||||
} else if (this.pokemon.compatibleTms.indexOf(tmMoveId) === -1) {
|
||||
slotTmText = i18next.t("partyUiHandler:notAble");
|
||||
} else {
|
||||
slotTmText = i18next.t("partyUiHandler:able");
|
||||
break;
|
||||
}
|
||||
|
||||
this.slotDescriptionLabel.setText(slotTmText);
|
||||
|
Loading…
Reference in New Issue
Block a user