forked from External/mage
Added frameStyle Characteristic for cards
* Added FrameStyle Enum containing a list of styles that cards can be rendered in. * Added getFrameStyle() getter to Card interface. * Implemented getFrameStyle() for various concrete implementations of Card.
This commit is contained in:
parent
0ea9d33211
commit
b549dfe0dc
12 changed files with 115 additions and 3 deletions
|
|
@ -39,6 +39,7 @@ import mage.abilities.common.CastCommanderAbility;
|
|||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.FrameStyle;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.util.GameLog;
|
||||
|
|
@ -150,6 +151,11 @@ public class Commander implements CommandObject {
|
|||
return card.getFrameColor(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrameStyle getFrameStyle() {
|
||||
return card.getFrameStyle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaCosts<ManaCost> getManaCost() {
|
||||
return card.getManaCost();
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.cards.FrameStyle;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.util.GameLog;
|
||||
|
|
@ -55,6 +56,7 @@ public class Emblem implements CommandObject {
|
|||
private UUID id;
|
||||
private UUID controllerId;
|
||||
private UUID sourceId;
|
||||
private FrameStyle frameStyle;
|
||||
private Abilities<Ability> abilites = new AbilitiesImpl<>();
|
||||
private String expansionSetCodeForImage = null;
|
||||
|
||||
|
|
@ -65,11 +67,17 @@ public class Emblem implements CommandObject {
|
|||
public Emblem(final Emblem emblem) {
|
||||
this.id = emblem.id;
|
||||
this.name = emblem.name;
|
||||
this.frameStyle = emblem.frameStyle;
|
||||
this.controllerId = emblem.controllerId;
|
||||
this.sourceId = emblem.sourceId;
|
||||
this.abilites = emblem.abilites.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrameStyle getFrameStyle() {
|
||||
return frameStyle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void assignNewId() {
|
||||
this.id = UUID.randomUUID();
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ public class PermanentCard extends PermanentImpl {
|
|||
this.cardType.addAll(card.getCardType());
|
||||
this.color = card.getColor(null).copy();
|
||||
this.frameColor = card.getFrameColor(null).copy();
|
||||
this.frameStyle = card.getFrameStyle();
|
||||
this.manaCost = card.getManaCost().copy();
|
||||
if (card instanceof PermanentCard) {
|
||||
this.maxLevelCounters = ((PermanentCard) card).maxLevelCounters;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ public class PermanentToken extends PermanentImpl {
|
|||
this.cardType = token.getCardType();
|
||||
this.color = token.getColor(game).copy();
|
||||
this.frameColor = token.getFrameColor(game);
|
||||
this.frameStyle = token.getFrameStyle();
|
||||
this.power.modifyBaseValue(token.getPower().getBaseValueModified());
|
||||
this.toughness.modifyBaseValue(token.getToughness().getBaseValueModified());
|
||||
this.supertype = token.getSupertype();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import mage.abilities.keyword.BestowAbility;
|
|||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.FrameStyle;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -77,6 +78,7 @@ public class Spell extends StackObjImpl implements Card {
|
|||
private final Card card;
|
||||
private final ObjectColor color;
|
||||
private final ObjectColor frameColor;
|
||||
private final FrameStyle frameStyle;
|
||||
private final SpellAbility ability;
|
||||
private final Zone fromZone;
|
||||
private final UUID id;
|
||||
|
|
@ -90,6 +92,7 @@ public class Spell extends StackObjImpl implements Card {
|
|||
this.card = card;
|
||||
this.color = card.getColor(null).copy();
|
||||
this.frameColor = card.getFrameColor(null).copy();
|
||||
this.frameStyle = card.getFrameStyle();
|
||||
id = ability.getId();
|
||||
this.ability = ability;
|
||||
this.ability.setControllerId(controllerId);
|
||||
|
|
@ -131,6 +134,7 @@ public class Spell extends StackObjImpl implements Card {
|
|||
this.faceDown = spell.faceDown;
|
||||
this.color = spell.color.copy();
|
||||
this.frameColor = spell.color.copy();
|
||||
this.frameStyle = spell.frameStyle;
|
||||
}
|
||||
|
||||
public boolean activate(Game game, boolean noMana) {
|
||||
|
|
@ -492,6 +496,11 @@ public class Spell extends StackObjImpl implements Card {
|
|||
return frameColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrameStyle getFrameStyle() {
|
||||
return frameStyle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaCosts<ManaCost> getManaCost() {
|
||||
return card.getManaCost();
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.FrameStyle;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -198,6 +199,12 @@ public class StackAbility extends StackObjImpl implements Ability {
|
|||
return ability.getSourceObject(game).getFrameColor(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrameStyle getFrameStyle() {
|
||||
// Abilities all use the same frame
|
||||
return FrameStyle.M15_NORMAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaCosts<ManaCost> getManaCost() {
|
||||
return emptyCost;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue