mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Fixed that counters on permanents were not shown.
This commit is contained in:
parent
15d95f0fee
commit
e01301d6f6
1 changed files with 13 additions and 6 deletions
|
@ -210,6 +210,12 @@ public class CardView extends SimpleCardView {
|
|||
if (!permanent.getControllerId().equals(permanent.getOwnerId())) {
|
||||
controlledByOwner = false;
|
||||
}
|
||||
if (game != null && permanent.getCounters() != null && !permanent.getCounters().isEmpty()) {
|
||||
counters = new ArrayList<>();
|
||||
for (Counter counter: permanent.getCounters().values()) {
|
||||
counters.add(new CounterView(counter));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (card.isCopy()) {
|
||||
this.mageObjectType = MageObjectType.COPY_CARD;
|
||||
|
@ -217,6 +223,12 @@ public class CardView extends SimpleCardView {
|
|||
this.mageObjectType = MageObjectType.CARD;
|
||||
}
|
||||
this.loyalty = "";
|
||||
if (game != null && card.getCounters(game) != null && !card.getCounters(game).isEmpty()) {
|
||||
counters = new ArrayList<>();
|
||||
for (Counter counter: card.getCounters(game).values()) {
|
||||
counters.add(new CounterView(counter));
|
||||
}
|
||||
}
|
||||
}
|
||||
this.power = Integer.toString(card.getPower().getValue());
|
||||
this.toughness = Integer.toString(card.getToughness().getValue());
|
||||
|
@ -248,12 +260,7 @@ public class CardView extends SimpleCardView {
|
|||
this.rarity = card.getRarity();
|
||||
this.isToken = false;
|
||||
}
|
||||
if (game != null && card.getCounters(game) != null && !card.getCounters(game).isEmpty()) {
|
||||
counters = new ArrayList<>();
|
||||
for (Counter counter: card.getCounters(game).values()) {
|
||||
counters.add(new CounterView(counter));
|
||||
}
|
||||
}
|
||||
|
||||
if (card.getSecondCardFace() != null) {
|
||||
this.secondCardFace = new CardView(card.getSecondCardFace());
|
||||
this.alternateName = secondCardFace.getName();
|
||||
|
|
Loading…
Reference in a new issue