mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
Now Planeswalkers use counters for loyalty. Fixed Issue 69.
This commit is contained in:
parent
13497ec651
commit
d5c4ac371a
32 changed files with 169 additions and 64 deletions
|
|
@ -37,6 +37,7 @@ import mage.ObjectColor;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.cards.Card;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
|
|
@ -81,11 +82,11 @@ public class CardView implements Serializable {
|
|||
if (card instanceof Permanent) {
|
||||
this.power = Integer.toString(card.getPower().getValue());
|
||||
this.toughness = Integer.toString(card.getToughness().getValue());
|
||||
this.loyalty = Integer.toString(card.getLoyalty().getValue());
|
||||
this.loyalty = Integer.toString(((Permanent) card).getCounters().getCount(CounterType.LOYALTY));
|
||||
} else {
|
||||
this.power = card.getPower().toString();
|
||||
this.toughness = card.getToughness().toString();
|
||||
this.loyalty = card.getLoyalty().toString();
|
||||
this.loyalty = "";
|
||||
}
|
||||
this.cardTypes = card.getCardType();
|
||||
this.subTypes = card.getSubtype();
|
||||
|
|
@ -123,7 +124,7 @@ public class CardView implements Serializable {
|
|||
this.rules = token.getAbilities().getRules(this.name);
|
||||
this.power = token.getPower().toString();
|
||||
this.toughness = token.getToughness().toString();
|
||||
this.loyalty = token.getLoyalty().toString();
|
||||
this.loyalty = "";
|
||||
this.cardTypes = token.getCardType();
|
||||
this.subTypes = token.getSubtype();
|
||||
this.superTypes = token.getSupertype();
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class StackAbilityView extends CardView {
|
|||
rules.add(ability.getRule(sourceName));
|
||||
this.power = ability.getPower().toString();
|
||||
this.toughness = ability.getToughness().toString();
|
||||
this.loyalty = ability.getLoyalty().toString();
|
||||
this.loyalty = "";
|
||||
this.cardTypes = ability.getCardType();
|
||||
this.subTypes = ability.getSubtype();
|
||||
this.superTypes = ability.getSupertype();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue