When Planeswalkers aren't on the battlefield, show their base loyalty

This commit is contained in:
tehdiplomat
2018-09-22 22:58:15 -04:00
parent e4303df238
commit 939cdb6822

View File

@@ -905,13 +905,21 @@ public class CardView extends GameEntityView {
return get(TrackableProperty.Loyalty); return get(TrackableProperty.Loyalty);
} }
void updateLoyalty(Card c) { void updateLoyalty(Card c) {
set(TrackableProperty.Loyalty, c.getCurrentLoyalty()); updateLoyalty(c.getCurrentLoyalty());
}
void updateLoyalty(int loyalty) {
set(TrackableProperty.Loyalty, loyalty);
} }
void updateLoyalty(CardState c) { void updateLoyalty(CardState c) {
if (CardView.this.getCurrentState() == this) { if (CardView.this.getCurrentState() == this) {
Card card = c.getCard(); Card card = c.getCard();
if (card != null) { if (card != null) {
updateLoyalty(card); //TODO: find a better way to do this if (card.isInZone(ZoneType.Battlefield)) {
updateLoyalty(card);
} else {
updateLoyalty(c.getBaseLoyalty());
}
return; return;
} }
} }