From 939cdb6822e4aa16a34a1b194e0176b7efdb7a5c Mon Sep 17 00:00:00 2001 From: tehdiplomat Date: Sat, 22 Sep 2018 22:58:15 -0400 Subject: [PATCH] When Planeswalkers aren't on the battlefield, show their base loyalty --- .../src/main/java/forge/game/card/CardView.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/CardView.java b/forge-game/src/main/java/forge/game/card/CardView.java index 763268e813f..4dcd3896218 100644 --- a/forge-game/src/main/java/forge/game/card/CardView.java +++ b/forge-game/src/main/java/forge/game/card/CardView.java @@ -905,13 +905,21 @@ public class CardView extends GameEntityView { return get(TrackableProperty.Loyalty); } void updateLoyalty(Card c) { - set(TrackableProperty.Loyalty, c.getCurrentLoyalty()); + updateLoyalty(c.getCurrentLoyalty()); + } + void updateLoyalty(int loyalty) { + set(TrackableProperty.Loyalty, loyalty); } void updateLoyalty(CardState c) { if (CardView.this.getCurrentState() == this) { Card card = c.getCard(); 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; } }