mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
When Planeswalkers aren't on the battlefield, show their base loyalty
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user