mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Reverting back - 711.1. Tokens and cards with a Magic card back can't transform.
This commit is contained in:
parent
da2bdfb893
commit
3ee7c808e1
8 changed files with 8 additions and 48 deletions
|
@ -128,9 +128,9 @@ class ScreechingBatTransformSourceEffect extends OneShotEffect<ScreechingBatTran
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
if (permanent.canTransform()) {
|
||||
Cost cost = new ManaCostsImpl("{2}{B}{B}");
|
||||
if (cost.pay(source, game, permanent.getControllerId(), permanent.getControllerId(), false)) {
|
||||
Cost cost = new ManaCostsImpl("{2}{B}{B}");
|
||||
if (cost.pay(source, game, permanent.getControllerId(), permanent.getControllerId(), false)) {
|
||||
if (permanent.canTransform()) {
|
||||
permanent.setTransformed(!permanent.isTransformed());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,10 @@ class TransformEffect extends ContinuousEffectImpl<TransformEffect> {
|
|||
|
||||
Card card = permanent.getSecondCardFace();
|
||||
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
permanent.setName(card.getName());
|
||||
permanent.getColor().setColor(card.getColor());
|
||||
permanent.getManaCost().clear();
|
||||
|
|
|
@ -61,13 +61,11 @@ public interface Card extends MageObject {
|
|||
public boolean isFaceDown();
|
||||
|
||||
public boolean canTransform();
|
||||
public void setCanTransform(boolean value);
|
||||
public Card getSecondCardFace();
|
||||
public void setSecondCardFace(Card card);
|
||||
|
||||
public boolean isNightCard();
|
||||
|
||||
public void assignNewId();
|
||||
|
||||
/**
|
||||
* Moves the card to the specified zone
|
||||
* @param zone
|
||||
|
|
|
@ -387,13 +387,4 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
|
|||
return this.nightCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCanTransform(boolean canTransform) {
|
||||
this.canTransform = canTransform;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSecondCardFace(Card card) {
|
||||
this.secondSideCard = card;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,8 +47,6 @@ public class Token extends MageObjectImpl<Token> {
|
|||
|
||||
protected String description;
|
||||
private UUID lastAddedTokenId;
|
||||
private boolean canTransform;
|
||||
private Card secondCardFace;
|
||||
|
||||
public Token(String name, String description) {
|
||||
this.name = name;
|
||||
|
@ -70,7 +68,6 @@ public class Token extends MageObjectImpl<Token> {
|
|||
public Token(final Token token) {
|
||||
super(token);
|
||||
this.description = token.description;
|
||||
this.canTransform = token.canTransform;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
|
@ -99,10 +96,6 @@ public class Token extends MageObjectImpl<Token> {
|
|||
amount = event.getAmount();
|
||||
for (int i = 0; i < amount; i++) {
|
||||
PermanentToken permanent = new PermanentToken(this, controllerId, setCode);
|
||||
if (this.canTransform) {
|
||||
permanent.setCanTransform(this.canTransform);
|
||||
permanent.setSecondCardFace(this.secondCardFace);
|
||||
}
|
||||
game.getBattlefield().addPermanent(permanent);
|
||||
this.lastAddedTokenId = permanent.getId();
|
||||
permanent.entersBattlefield(sourceId, game);
|
||||
|
@ -113,12 +106,4 @@ public class Token extends MageObjectImpl<Token> {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setCanTransform(boolean canTransform) {
|
||||
this.canTransform = canTransform;
|
||||
}
|
||||
|
||||
public void setSecondCardFace(Card card) {
|
||||
this.secondCardFace = card;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -351,10 +351,6 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCanTransform(boolean value) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Card getSecondCardFace() {
|
||||
return null;
|
||||
|
@ -440,9 +436,5 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
|
|||
public void setCopiedSpell(boolean isCopied) {
|
||||
this.copiedSpell = isCopied;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSecondCardFace(Card card) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,11 +79,6 @@ public class CopyFunction implements Function<Card, Card> {
|
|||
target.getPower().setValue(source.getPower().getValue());
|
||||
target.getToughness().setValue(source.getToughness().getValue());
|
||||
|
||||
if (source.canTransform()) {
|
||||
target.setCanTransform(true);
|
||||
target.setSecondCardFace(source.getSecondCardFace());
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,11 +80,6 @@ public class CopyTokenFunction implements Function<Token, Card> {
|
|||
target.getPower().setValue(source.getPower().getValue());
|
||||
target.getToughness().setValue(source.getToughness().getValue());
|
||||
|
||||
if (source.canTransform()) {
|
||||
target.setCanTransform(true);
|
||||
target.setSecondCardFace(source.getSecondCardFace());
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue