mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Card: add Embalmed flag into it, used in CopyPermanentEffect and CloneEffect Vizier of Many Faces
This commit is contained in:
@@ -2,6 +2,8 @@ package forge.game.ability.effects;
|
||||
|
||||
import forge.GameCommand;
|
||||
import forge.card.CardStateName;
|
||||
import forge.card.MagicColor;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.game.Game;
|
||||
import forge.game.ability.AbilityFactory;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
@@ -329,6 +331,12 @@ public class CloneEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
tgtCard.addColor(shortColors, !sa.hasParam("OverwriteColors"), tgtCard.getTimestamp());
|
||||
|
||||
if (sa.hasParam("Embalm") && tgtCard.isEmbalmed()) {
|
||||
tgtCard.addType("Zombie");
|
||||
tgtCard.setColor(MagicColor.WHITE);
|
||||
tgtCard.setManaCost(ManaCost.NO_COST);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -248,6 +248,8 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
|
||||
copy.addType("Zombie");
|
||||
copy.setColor(MagicColor.WHITE);
|
||||
copy.setManaCost(ManaCost.NO_COST);
|
||||
copy.setEmbalmed(true);
|
||||
|
||||
String name = copy.getName().replace(",", "").replace(" ", "_").toLowerCase();
|
||||
copy.setImageKey(ImageKeys.getTokenKey("embalm_" + name));
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
private boolean suspendCast = false;
|
||||
private boolean suspend = false;
|
||||
private boolean tributed = false;
|
||||
private boolean embalmed = false;
|
||||
private boolean madness = false;
|
||||
|
||||
private boolean phasedOut = false;
|
||||
@@ -6197,6 +6198,13 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
tributed = b;
|
||||
}
|
||||
|
||||
public final boolean isEmbalmed() {
|
||||
return embalmed;
|
||||
}
|
||||
public final void setEmbalmed(final boolean b) {
|
||||
embalmed = b;
|
||||
}
|
||||
|
||||
public boolean isMadness() {
|
||||
return madness;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user