forked from External/mage
Implemented banding (#41)
This commit is contained in:
parent
adec5cf88b
commit
e7301e2c08
24 changed files with 708 additions and 136 deletions
|
|
@ -113,6 +113,7 @@ public class CardView extends SimpleCardView {
|
|||
protected List<UUID> targets;
|
||||
|
||||
protected UUID pairedCard;
|
||||
protected List<UUID> bandedCards;
|
||||
protected boolean paid;
|
||||
protected List<CounterView> counters;
|
||||
|
||||
|
|
@ -202,6 +203,7 @@ public class CardView extends SimpleCardView {
|
|||
this.targets = null;
|
||||
|
||||
this.pairedCard = cardView.pairedCard;
|
||||
this.bandedCards = null;
|
||||
this.paid = cardView.paid;
|
||||
this.counters = null;
|
||||
|
||||
|
|
@ -353,6 +355,10 @@ public class CardView extends SimpleCardView {
|
|||
if (permanent.getCounters(game) != null && !permanent.getCounters(game).isEmpty()) {
|
||||
this.loyalty = Integer.toString(permanent.getCounters(game).getCount(CounterType.LOYALTY));
|
||||
this.pairedCard = permanent.getPairedCard() != null ? permanent.getPairedCard().getSourceId() : null;
|
||||
this.bandedCards = new ArrayList<>();
|
||||
for (UUID bandedCard : permanent.getBandedCards()) {
|
||||
bandedCards.add(bandedCard);
|
||||
}
|
||||
counters = new ArrayList<>();
|
||||
for (Counter counter : permanent.getCounters(game).values()) {
|
||||
counters.add(new CounterView(counter));
|
||||
|
|
@ -885,6 +891,10 @@ public class CardView extends SimpleCardView {
|
|||
return pairedCard;
|
||||
}
|
||||
|
||||
public List<UUID> getBandedCards() {
|
||||
return bandedCards;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue